{-# 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.ProvisioningArtifactPreferences where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProvisioningArtifactPreferences = ProvisioningArtifactPreferences'
{
ProvisioningArtifactPreferences -> Maybe [Text]
stackSetRegions :: Prelude.Maybe [Prelude.Text],
ProvisioningArtifactPreferences -> Maybe [Text]
stackSetAccounts :: Prelude.Maybe [Prelude.Text]
}
deriving (ProvisioningArtifactPreferences
-> ProvisioningArtifactPreferences -> Bool
(ProvisioningArtifactPreferences
-> ProvisioningArtifactPreferences -> Bool)
-> (ProvisioningArtifactPreferences
-> ProvisioningArtifactPreferences -> Bool)
-> Eq ProvisioningArtifactPreferences
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisioningArtifactPreferences
-> ProvisioningArtifactPreferences -> Bool
$c/= :: ProvisioningArtifactPreferences
-> ProvisioningArtifactPreferences -> Bool
== :: ProvisioningArtifactPreferences
-> ProvisioningArtifactPreferences -> Bool
$c== :: ProvisioningArtifactPreferences
-> ProvisioningArtifactPreferences -> Bool
Prelude.Eq, ReadPrec [ProvisioningArtifactPreferences]
ReadPrec ProvisioningArtifactPreferences
Int -> ReadS ProvisioningArtifactPreferences
ReadS [ProvisioningArtifactPreferences]
(Int -> ReadS ProvisioningArtifactPreferences)
-> ReadS [ProvisioningArtifactPreferences]
-> ReadPrec ProvisioningArtifactPreferences
-> ReadPrec [ProvisioningArtifactPreferences]
-> Read ProvisioningArtifactPreferences
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisioningArtifactPreferences]
$creadListPrec :: ReadPrec [ProvisioningArtifactPreferences]
readPrec :: ReadPrec ProvisioningArtifactPreferences
$creadPrec :: ReadPrec ProvisioningArtifactPreferences
readList :: ReadS [ProvisioningArtifactPreferences]
$creadList :: ReadS [ProvisioningArtifactPreferences]
readsPrec :: Int -> ReadS ProvisioningArtifactPreferences
$creadsPrec :: Int -> ReadS ProvisioningArtifactPreferences
Prelude.Read, Int -> ProvisioningArtifactPreferences -> ShowS
[ProvisioningArtifactPreferences] -> ShowS
ProvisioningArtifactPreferences -> String
(Int -> ProvisioningArtifactPreferences -> ShowS)
-> (ProvisioningArtifactPreferences -> String)
-> ([ProvisioningArtifactPreferences] -> ShowS)
-> Show ProvisioningArtifactPreferences
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisioningArtifactPreferences] -> ShowS
$cshowList :: [ProvisioningArtifactPreferences] -> ShowS
show :: ProvisioningArtifactPreferences -> String
$cshow :: ProvisioningArtifactPreferences -> String
showsPrec :: Int -> ProvisioningArtifactPreferences -> ShowS
$cshowsPrec :: Int -> ProvisioningArtifactPreferences -> ShowS
Prelude.Show, (forall x.
ProvisioningArtifactPreferences
-> Rep ProvisioningArtifactPreferences x)
-> (forall x.
Rep ProvisioningArtifactPreferences x
-> ProvisioningArtifactPreferences)
-> Generic ProvisioningArtifactPreferences
forall x.
Rep ProvisioningArtifactPreferences x
-> ProvisioningArtifactPreferences
forall x.
ProvisioningArtifactPreferences
-> Rep ProvisioningArtifactPreferences x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProvisioningArtifactPreferences x
-> ProvisioningArtifactPreferences
$cfrom :: forall x.
ProvisioningArtifactPreferences
-> Rep ProvisioningArtifactPreferences x
Prelude.Generic)
newProvisioningArtifactPreferences ::
ProvisioningArtifactPreferences
newProvisioningArtifactPreferences :: ProvisioningArtifactPreferences
newProvisioningArtifactPreferences =
ProvisioningArtifactPreferences' :: Maybe [Text] -> Maybe [Text] -> ProvisioningArtifactPreferences
ProvisioningArtifactPreferences'
{ $sel:stackSetRegions:ProvisioningArtifactPreferences' :: Maybe [Text]
stackSetRegions =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetAccounts:ProvisioningArtifactPreferences' :: Maybe [Text]
stackSetAccounts = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
provisioningArtifactPreferences_stackSetRegions :: Lens.Lens' ProvisioningArtifactPreferences (Prelude.Maybe [Prelude.Text])
provisioningArtifactPreferences_stackSetRegions :: (Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningArtifactPreferences
-> f ProvisioningArtifactPreferences
provisioningArtifactPreferences_stackSetRegions = (ProvisioningArtifactPreferences -> Maybe [Text])
-> (ProvisioningArtifactPreferences
-> Maybe [Text] -> ProvisioningArtifactPreferences)
-> Lens
ProvisioningArtifactPreferences
ProvisioningArtifactPreferences
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningArtifactPreferences' {Maybe [Text]
stackSetRegions :: Maybe [Text]
$sel:stackSetRegions:ProvisioningArtifactPreferences' :: ProvisioningArtifactPreferences -> Maybe [Text]
stackSetRegions} -> Maybe [Text]
stackSetRegions) (\s :: ProvisioningArtifactPreferences
s@ProvisioningArtifactPreferences' {} Maybe [Text]
a -> ProvisioningArtifactPreferences
s {$sel:stackSetRegions:ProvisioningArtifactPreferences' :: Maybe [Text]
stackSetRegions = Maybe [Text]
a} :: ProvisioningArtifactPreferences) ((Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningArtifactPreferences
-> f ProvisioningArtifactPreferences)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningArtifactPreferences
-> f ProvisioningArtifactPreferences
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
provisioningArtifactPreferences_stackSetAccounts :: Lens.Lens' ProvisioningArtifactPreferences (Prelude.Maybe [Prelude.Text])
provisioningArtifactPreferences_stackSetAccounts :: (Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningArtifactPreferences
-> f ProvisioningArtifactPreferences
provisioningArtifactPreferences_stackSetAccounts = (ProvisioningArtifactPreferences -> Maybe [Text])
-> (ProvisioningArtifactPreferences
-> Maybe [Text] -> ProvisioningArtifactPreferences)
-> Lens
ProvisioningArtifactPreferences
ProvisioningArtifactPreferences
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningArtifactPreferences' {Maybe [Text]
stackSetAccounts :: Maybe [Text]
$sel:stackSetAccounts:ProvisioningArtifactPreferences' :: ProvisioningArtifactPreferences -> Maybe [Text]
stackSetAccounts} -> Maybe [Text]
stackSetAccounts) (\s :: ProvisioningArtifactPreferences
s@ProvisioningArtifactPreferences' {} Maybe [Text]
a -> ProvisioningArtifactPreferences
s {$sel:stackSetAccounts:ProvisioningArtifactPreferences' :: Maybe [Text]
stackSetAccounts = Maybe [Text]
a} :: ProvisioningArtifactPreferences) ((Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningArtifactPreferences
-> f ProvisioningArtifactPreferences)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ProvisioningArtifactPreferences
-> f ProvisioningArtifactPreferences
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
instance
Core.FromJSON
ProvisioningArtifactPreferences
where
parseJSON :: Value -> Parser ProvisioningArtifactPreferences
parseJSON =
String
-> (Object -> Parser ProvisioningArtifactPreferences)
-> Value
-> Parser ProvisioningArtifactPreferences
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProvisioningArtifactPreferences"
( \Object
x ->
Maybe [Text] -> Maybe [Text] -> ProvisioningArtifactPreferences
ProvisioningArtifactPreferences'
(Maybe [Text] -> Maybe [Text] -> ProvisioningArtifactPreferences)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> ProvisioningArtifactPreferences)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StackSetRegions"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe [Text] -> ProvisioningArtifactPreferences)
-> Parser (Maybe [Text]) -> Parser ProvisioningArtifactPreferences
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StackSetAccounts"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
ProvisioningArtifactPreferences
instance
Prelude.NFData
ProvisioningArtifactPreferences