module Stratosphere.ImageBuilder.DistributionConfiguration.LaunchTemplateConfigurationProperty (
LaunchTemplateConfigurationProperty(..),
mkLaunchTemplateConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LaunchTemplateConfigurationProperty
=
LaunchTemplateConfigurationProperty {LaunchTemplateConfigurationProperty -> ()
haddock_workaround_ :: (),
LaunchTemplateConfigurationProperty -> Maybe (Value Text)
accountId :: (Prelude.Maybe (Value Prelude.Text)),
LaunchTemplateConfigurationProperty -> Maybe (Value Text)
launchTemplateId :: (Prelude.Maybe (Value Prelude.Text)),
LaunchTemplateConfigurationProperty -> Maybe (Value Bool)
setDefaultVersion :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty -> Bool
(LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty -> Bool)
-> (LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty -> Bool)
-> Eq LaunchTemplateConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty -> Bool
== :: LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty -> Bool
$c/= :: LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty -> Bool
/= :: LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty -> Bool
Prelude.Eq, Int -> LaunchTemplateConfigurationProperty -> ShowS
[LaunchTemplateConfigurationProperty] -> ShowS
LaunchTemplateConfigurationProperty -> String
(Int -> LaunchTemplateConfigurationProperty -> ShowS)
-> (LaunchTemplateConfigurationProperty -> String)
-> ([LaunchTemplateConfigurationProperty] -> ShowS)
-> Show LaunchTemplateConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LaunchTemplateConfigurationProperty -> ShowS
showsPrec :: Int -> LaunchTemplateConfigurationProperty -> ShowS
$cshow :: LaunchTemplateConfigurationProperty -> String
show :: LaunchTemplateConfigurationProperty -> String
$cshowList :: [LaunchTemplateConfigurationProperty] -> ShowS
showList :: [LaunchTemplateConfigurationProperty] -> ShowS
Prelude.Show)
mkLaunchTemplateConfigurationProperty ::
LaunchTemplateConfigurationProperty
mkLaunchTemplateConfigurationProperty :: LaunchTemplateConfigurationProperty
mkLaunchTemplateConfigurationProperty
= LaunchTemplateConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), accountId :: Maybe (Value Text)
accountId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
launchTemplateId :: Maybe (Value Text)
launchTemplateId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
setDefaultVersion :: Maybe (Value Bool)
setDefaultVersion = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LaunchTemplateConfigurationProperty where
toResourceProperties :: LaunchTemplateConfigurationProperty -> ResourceProperties
toResourceProperties LaunchTemplateConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateConfigurationProperty -> ()
accountId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
launchTemplateId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
setDefaultVersion :: LaunchTemplateConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
launchTemplateId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ImageBuilder::DistributionConfiguration.LaunchTemplateConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AccountId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
accountId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LaunchTemplateId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
launchTemplateId,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SetDefaultVersion" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
setDefaultVersion])}
instance JSON.ToJSON LaunchTemplateConfigurationProperty where
toJSON :: LaunchTemplateConfigurationProperty -> Value
toJSON LaunchTemplateConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateConfigurationProperty -> ()
accountId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
launchTemplateId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
setDefaultVersion :: LaunchTemplateConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
launchTemplateId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AccountId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
accountId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LaunchTemplateId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
launchTemplateId,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SetDefaultVersion" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
setDefaultVersion]))
instance Property "AccountId" LaunchTemplateConfigurationProperty where
type PropertyType "AccountId" LaunchTemplateConfigurationProperty = Value Prelude.Text
set :: PropertyType "AccountId" LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty
set PropertyType "AccountId" LaunchTemplateConfigurationProperty
newValue LaunchTemplateConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateConfigurationProperty -> ()
accountId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
launchTemplateId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
setDefaultVersion :: LaunchTemplateConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
launchTemplateId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
..}
= LaunchTemplateConfigurationProperty
{accountId :: Maybe (Value Text)
accountId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AccountId" LaunchTemplateConfigurationProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
..}
instance Property "LaunchTemplateId" LaunchTemplateConfigurationProperty where
type PropertyType "LaunchTemplateId" LaunchTemplateConfigurationProperty = Value Prelude.Text
set :: PropertyType "LaunchTemplateId" LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty
set PropertyType "LaunchTemplateId" LaunchTemplateConfigurationProperty
newValue LaunchTemplateConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateConfigurationProperty -> ()
accountId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
launchTemplateId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
setDefaultVersion :: LaunchTemplateConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
launchTemplateId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
..}
= LaunchTemplateConfigurationProperty
{launchTemplateId :: Maybe (Value Text)
launchTemplateId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LaunchTemplateId" LaunchTemplateConfigurationProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
..}
instance Property "SetDefaultVersion" LaunchTemplateConfigurationProperty where
type PropertyType "SetDefaultVersion" LaunchTemplateConfigurationProperty = Value Prelude.Bool
set :: PropertyType
"SetDefaultVersion" LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty
-> LaunchTemplateConfigurationProperty
set PropertyType
"SetDefaultVersion" LaunchTemplateConfigurationProperty
newValue LaunchTemplateConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateConfigurationProperty -> ()
accountId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
launchTemplateId :: LaunchTemplateConfigurationProperty -> Maybe (Value Text)
setDefaultVersion :: LaunchTemplateConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
launchTemplateId :: Maybe (Value Text)
setDefaultVersion :: Maybe (Value Bool)
..}
= LaunchTemplateConfigurationProperty
{setDefaultVersion :: Maybe (Value Bool)
setDefaultVersion = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"SetDefaultVersion" LaunchTemplateConfigurationProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
launchTemplateId :: Maybe (Value Text)
haddock_workaround_ :: ()
accountId :: Maybe (Value Text)
launchTemplateId :: Maybe (Value Text)
..}