{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ServiceCatalog.Types.ProvisioningPreferences where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProvisioningPreferences = ProvisioningPreferences'
{
ProvisioningPreferences -> Maybe [Text]
stackSetRegions :: Prelude.Maybe [Prelude.Text],
ProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyPercentage :: Prelude.Maybe Prelude.Natural,
ProvisioningPreferences -> Maybe Natural
stackSetFailureToleranceCount :: Prelude.Maybe Prelude.Natural,
ProvisioningPreferences -> Maybe Natural
stackSetFailureTolerancePercentage :: Prelude.Maybe Prelude.Natural,
ProvisioningPreferences -> Maybe [Text]
stackSetAccounts :: Prelude.Maybe [Prelude.Text],
ProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyCount :: Prelude.Maybe Prelude.Natural
}
deriving (ProvisioningPreferences -> ProvisioningPreferences -> Bool
(ProvisioningPreferences -> ProvisioningPreferences -> Bool)
-> (ProvisioningPreferences -> ProvisioningPreferences -> Bool)
-> Eq ProvisioningPreferences
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisioningPreferences -> ProvisioningPreferences -> Bool
$c/= :: ProvisioningPreferences -> ProvisioningPreferences -> Bool
== :: ProvisioningPreferences -> ProvisioningPreferences -> Bool
$c== :: ProvisioningPreferences -> ProvisioningPreferences -> Bool
Prelude.Eq, ReadPrec [ProvisioningPreferences]
ReadPrec ProvisioningPreferences
Int -> ReadS ProvisioningPreferences
ReadS [ProvisioningPreferences]
(Int -> ReadS ProvisioningPreferences)
-> ReadS [ProvisioningPreferences]
-> ReadPrec ProvisioningPreferences
-> ReadPrec [ProvisioningPreferences]
-> Read ProvisioningPreferences
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisioningPreferences]
$creadListPrec :: ReadPrec [ProvisioningPreferences]
readPrec :: ReadPrec ProvisioningPreferences
$creadPrec :: ReadPrec ProvisioningPreferences
readList :: ReadS [ProvisioningPreferences]
$creadList :: ReadS [ProvisioningPreferences]
readsPrec :: Int -> ReadS ProvisioningPreferences
$creadsPrec :: Int -> ReadS ProvisioningPreferences
Prelude.Read, Int -> ProvisioningPreferences -> ShowS
[ProvisioningPreferences] -> ShowS
ProvisioningPreferences -> String
(Int -> ProvisioningPreferences -> ShowS)
-> (ProvisioningPreferences -> String)
-> ([ProvisioningPreferences] -> ShowS)
-> Show ProvisioningPreferences
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisioningPreferences] -> ShowS
$cshowList :: [ProvisioningPreferences] -> ShowS
show :: ProvisioningPreferences -> String
$cshow :: ProvisioningPreferences -> String
showsPrec :: Int -> ProvisioningPreferences -> ShowS
$cshowsPrec :: Int -> ProvisioningPreferences -> ShowS
Prelude.Show, (forall x.
ProvisioningPreferences -> Rep ProvisioningPreferences x)
-> (forall x.
Rep ProvisioningPreferences x -> ProvisioningPreferences)
-> Generic ProvisioningPreferences
forall x. Rep ProvisioningPreferences x -> ProvisioningPreferences
forall x. ProvisioningPreferences -> Rep ProvisioningPreferences x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProvisioningPreferences x -> ProvisioningPreferences
$cfrom :: forall x. ProvisioningPreferences -> Rep ProvisioningPreferences x
Prelude.Generic)
newProvisioningPreferences ::
ProvisioningPreferences
newProvisioningPreferences :: ProvisioningPreferences
newProvisioningPreferences =
ProvisioningPreferences' :: Maybe [Text]
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe [Text]
-> Maybe Natural
-> ProvisioningPreferences
ProvisioningPreferences'
{ $sel:stackSetRegions:ProvisioningPreferences' :: Maybe [Text]
stackSetRegions =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyPercentage = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: Maybe Natural
stackSetFailureToleranceCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: Maybe Natural
stackSetFailureTolerancePercentage =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetAccounts:ProvisioningPreferences' :: Maybe [Text]
stackSetAccounts = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
provisioningPreferences_stackSetRegions :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe [Prelude.Text])
provisioningPreferences_stackSetRegions :: (Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningPreferences -> f ProvisioningPreferences
provisioningPreferences_stackSetRegions = (ProvisioningPreferences -> Maybe [Text])
-> (ProvisioningPreferences
-> Maybe [Text] -> ProvisioningPreferences)
-> Lens
ProvisioningPreferences
ProvisioningPreferences
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe [Text]
stackSetRegions :: Maybe [Text]
$sel:stackSetRegions:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
stackSetRegions} -> Maybe [Text]
stackSetRegions) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe [Text]
a -> ProvisioningPreferences
s {$sel:stackSetRegions:ProvisioningPreferences' :: Maybe [Text]
stackSetRegions = Maybe [Text]
a} :: ProvisioningPreferences) ((Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningPreferences -> f ProvisioningPreferences)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningPreferences
-> f ProvisioningPreferences
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
provisioningPreferences_stackSetMaxConcurrencyPercentage :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe Prelude.Natural)
provisioningPreferences_stackSetMaxConcurrencyPercentage :: (Maybe Natural -> f (Maybe Natural))
-> ProvisioningPreferences -> f ProvisioningPreferences
provisioningPreferences_stackSetMaxConcurrencyPercentage = (ProvisioningPreferences -> Maybe Natural)
-> (ProvisioningPreferences
-> Maybe Natural -> ProvisioningPreferences)
-> Lens
ProvisioningPreferences
ProvisioningPreferences
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe Natural
stackSetMaxConcurrencyPercentage :: Maybe Natural
$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyPercentage} -> Maybe Natural
stackSetMaxConcurrencyPercentage) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe Natural
a -> ProvisioningPreferences
s {$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyPercentage = Maybe Natural
a} :: ProvisioningPreferences)
provisioningPreferences_stackSetFailureToleranceCount :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe Prelude.Natural)
provisioningPreferences_stackSetFailureToleranceCount :: (Maybe Natural -> f (Maybe Natural))
-> ProvisioningPreferences -> f ProvisioningPreferences
provisioningPreferences_stackSetFailureToleranceCount = (ProvisioningPreferences -> Maybe Natural)
-> (ProvisioningPreferences
-> Maybe Natural -> ProvisioningPreferences)
-> Lens
ProvisioningPreferences
ProvisioningPreferences
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
stackSetFailureToleranceCount} -> Maybe Natural
stackSetFailureToleranceCount) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe Natural
a -> ProvisioningPreferences
s {$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: Maybe Natural
stackSetFailureToleranceCount = Maybe Natural
a} :: ProvisioningPreferences)
provisioningPreferences_stackSetFailureTolerancePercentage :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe Prelude.Natural)
provisioningPreferences_stackSetFailureTolerancePercentage :: (Maybe Natural -> f (Maybe Natural))
-> ProvisioningPreferences -> f ProvisioningPreferences
provisioningPreferences_stackSetFailureTolerancePercentage = (ProvisioningPreferences -> Maybe Natural)
-> (ProvisioningPreferences
-> Maybe Natural -> ProvisioningPreferences)
-> Lens
ProvisioningPreferences
ProvisioningPreferences
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
stackSetFailureTolerancePercentage} -> Maybe Natural
stackSetFailureTolerancePercentage) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe Natural
a -> ProvisioningPreferences
s {$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: Maybe Natural
stackSetFailureTolerancePercentage = Maybe Natural
a} :: ProvisioningPreferences)
provisioningPreferences_stackSetAccounts :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe [Prelude.Text])
provisioningPreferences_stackSetAccounts :: (Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningPreferences -> f ProvisioningPreferences
provisioningPreferences_stackSetAccounts = (ProvisioningPreferences -> Maybe [Text])
-> (ProvisioningPreferences
-> Maybe [Text] -> ProvisioningPreferences)
-> Lens
ProvisioningPreferences
ProvisioningPreferences
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe [Text]
stackSetAccounts :: Maybe [Text]
$sel:stackSetAccounts:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
stackSetAccounts} -> Maybe [Text]
stackSetAccounts) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe [Text]
a -> ProvisioningPreferences
s {$sel:stackSetAccounts:ProvisioningPreferences' :: Maybe [Text]
stackSetAccounts = Maybe [Text]
a} :: ProvisioningPreferences) ((Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningPreferences -> f ProvisioningPreferences)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningPreferences
-> f ProvisioningPreferences
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
provisioningPreferences_stackSetMaxConcurrencyCount :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe Prelude.Natural)
provisioningPreferences_stackSetMaxConcurrencyCount :: (Maybe Natural -> f (Maybe Natural))
-> ProvisioningPreferences -> f ProvisioningPreferences
provisioningPreferences_stackSetMaxConcurrencyCount = (ProvisioningPreferences -> Maybe Natural)
-> (ProvisioningPreferences
-> Maybe Natural -> ProvisioningPreferences)
-> Lens
ProvisioningPreferences
ProvisioningPreferences
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyCount} -> Maybe Natural
stackSetMaxConcurrencyCount) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe Natural
a -> ProvisioningPreferences
s {$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyCount = Maybe Natural
a} :: ProvisioningPreferences)
instance Prelude.Hashable ProvisioningPreferences
instance Prelude.NFData ProvisioningPreferences
instance Core.ToJSON ProvisioningPreferences where
toJSON :: ProvisioningPreferences -> Value
toJSON ProvisioningPreferences' {Maybe Natural
Maybe [Text]
stackSetMaxConcurrencyCount :: Maybe Natural
stackSetAccounts :: Maybe [Text]
stackSetFailureTolerancePercentage :: Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
stackSetMaxConcurrencyPercentage :: Maybe Natural
stackSetRegions :: Maybe [Text]
$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetAccounts:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetRegions:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"StackSetRegions" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
stackSetRegions,
(Text
"StackSetMaxConcurrencyPercentage" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stackSetMaxConcurrencyPercentage,
(Text
"StackSetFailureToleranceCount" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stackSetFailureToleranceCount,
(Text
"StackSetFailureTolerancePercentage" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stackSetFailureTolerancePercentage,
(Text
"StackSetAccounts" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
stackSetAccounts,
(Text
"StackSetMaxConcurrencyCount" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stackSetMaxConcurrencyCount
]
)