{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ProvisioningArtifactPreferences = ProvisioningArtifactPreferences'
{
ProvisioningArtifactPreferences -> Maybe [Text]
stackSetAccounts :: Prelude.Maybe [Prelude.Text],
ProvisioningArtifactPreferences -> Maybe [Text]
stackSetRegions :: Prelude.Maybe [Prelude.Text]
}
deriving (ProvisioningArtifactPreferences
-> ProvisioningArtifactPreferences -> Bool
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]
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
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.
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'
{ $sel:stackSetAccounts:ProvisioningArtifactPreferences' :: Maybe [Text]
stackSetAccounts =
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetRegions:ProvisioningArtifactPreferences' :: Maybe [Text]
stackSetRegions = forall a. Maybe a
Prelude.Nothing
}
provisioningArtifactPreferences_stackSetAccounts :: Lens.Lens' ProvisioningArtifactPreferences (Prelude.Maybe [Prelude.Text])
provisioningArtifactPreferences_stackSetAccounts :: Lens' ProvisioningArtifactPreferences (Maybe [Text])
provisioningArtifactPreferences_stackSetAccounts = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
provisioningArtifactPreferences_stackSetRegions :: Lens.Lens' ProvisioningArtifactPreferences (Prelude.Maybe [Prelude.Text])
provisioningArtifactPreferences_stackSetRegions :: Lens' ProvisioningArtifactPreferences (Maybe [Text])
provisioningArtifactPreferences_stackSetRegions = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Data.FromJSON
ProvisioningArtifactPreferences
where
parseJSON :: Value -> Parser ProvisioningArtifactPreferences
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProvisioningArtifactPreferences"
( \Object
x ->
Maybe [Text] -> Maybe [Text] -> ProvisioningArtifactPreferences
ProvisioningArtifactPreferences'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StackSetAccounts"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StackSetRegions"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
ProvisioningArtifactPreferences
where
hashWithSalt :: Int -> ProvisioningArtifactPreferences -> Int
hashWithSalt
Int
_salt
ProvisioningArtifactPreferences' {Maybe [Text]
stackSetRegions :: Maybe [Text]
stackSetAccounts :: Maybe [Text]
$sel:stackSetRegions:ProvisioningArtifactPreferences' :: ProvisioningArtifactPreferences -> Maybe [Text]
$sel:stackSetAccounts:ProvisioningArtifactPreferences' :: ProvisioningArtifactPreferences -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
stackSetAccounts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
stackSetRegions
instance
Prelude.NFData
ProvisioningArtifactPreferences
where
rnf :: ProvisioningArtifactPreferences -> ()
rnf ProvisioningArtifactPreferences' {Maybe [Text]
stackSetRegions :: Maybe [Text]
stackSetAccounts :: Maybe [Text]
$sel:stackSetRegions:ProvisioningArtifactPreferences' :: ProvisioningArtifactPreferences -> Maybe [Text]
$sel:stackSetAccounts:ProvisioningArtifactPreferences' :: ProvisioningArtifactPreferences -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
stackSetAccounts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
stackSetRegions