module Stratosphere.EC2.LaunchTemplate.LaunchTemplateTagSpecificationProperty (
LaunchTemplateTagSpecificationProperty(..),
mkLaunchTemplateTagSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data LaunchTemplateTagSpecificationProperty
=
LaunchTemplateTagSpecificationProperty {LaunchTemplateTagSpecificationProperty -> ()
haddock_workaround_ :: (),
LaunchTemplateTagSpecificationProperty -> Maybe (Value Text)
resourceType :: (Prelude.Maybe (Value Prelude.Text)),
LaunchTemplateTagSpecificationProperty -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty -> Bool
(LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty -> Bool)
-> (LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty -> Bool)
-> Eq LaunchTemplateTagSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty -> Bool
== :: LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty -> Bool
$c/= :: LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty -> Bool
/= :: LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty -> Bool
Prelude.Eq, Int -> LaunchTemplateTagSpecificationProperty -> ShowS
[LaunchTemplateTagSpecificationProperty] -> ShowS
LaunchTemplateTagSpecificationProperty -> String
(Int -> LaunchTemplateTagSpecificationProperty -> ShowS)
-> (LaunchTemplateTagSpecificationProperty -> String)
-> ([LaunchTemplateTagSpecificationProperty] -> ShowS)
-> Show LaunchTemplateTagSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LaunchTemplateTagSpecificationProperty -> ShowS
showsPrec :: Int -> LaunchTemplateTagSpecificationProperty -> ShowS
$cshow :: LaunchTemplateTagSpecificationProperty -> String
show :: LaunchTemplateTagSpecificationProperty -> String
$cshowList :: [LaunchTemplateTagSpecificationProperty] -> ShowS
showList :: [LaunchTemplateTagSpecificationProperty] -> ShowS
Prelude.Show)
mkLaunchTemplateTagSpecificationProperty ::
LaunchTemplateTagSpecificationProperty
mkLaunchTemplateTagSpecificationProperty :: LaunchTemplateTagSpecificationProperty
mkLaunchTemplateTagSpecificationProperty
= LaunchTemplateTagSpecificationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), resourceType :: Maybe (Value Text)
resourceType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LaunchTemplateTagSpecificationProperty where
toResourceProperties :: LaunchTemplateTagSpecificationProperty -> ResourceProperties
toResourceProperties LaunchTemplateTagSpecificationProperty {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateTagSpecificationProperty -> ()
resourceType :: LaunchTemplateTagSpecificationProperty -> Maybe (Value Text)
tags :: LaunchTemplateTagSpecificationProperty -> Maybe [Tag]
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.LaunchTemplateTagSpecification",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"ResourceType" (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)
resourceType,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])}
instance JSON.ToJSON LaunchTemplateTagSpecificationProperty where
toJSON :: LaunchTemplateTagSpecificationProperty -> Value
toJSON LaunchTemplateTagSpecificationProperty {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateTagSpecificationProperty -> ()
resourceType :: LaunchTemplateTagSpecificationProperty -> Maybe (Value Text)
tags :: LaunchTemplateTagSpecificationProperty -> Maybe [Tag]
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= [(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
"ResourceType" (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)
resourceType,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))
instance Property "ResourceType" LaunchTemplateTagSpecificationProperty where
type PropertyType "ResourceType" LaunchTemplateTagSpecificationProperty = Value Prelude.Text
set :: PropertyType "ResourceType" LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty
set PropertyType "ResourceType" LaunchTemplateTagSpecificationProperty
newValue LaunchTemplateTagSpecificationProperty {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateTagSpecificationProperty -> ()
resourceType :: LaunchTemplateTagSpecificationProperty -> Maybe (Value Text)
tags :: LaunchTemplateTagSpecificationProperty -> Maybe [Tag]
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= LaunchTemplateTagSpecificationProperty
{resourceType :: Maybe (Value Text)
resourceType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResourceType" LaunchTemplateTagSpecificationProperty
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" LaunchTemplateTagSpecificationProperty where
type PropertyType "Tags" LaunchTemplateTagSpecificationProperty = [Tag]
set :: PropertyType "Tags" LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty
-> LaunchTemplateTagSpecificationProperty
set PropertyType "Tags" LaunchTemplateTagSpecificationProperty
newValue LaunchTemplateTagSpecificationProperty {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateTagSpecificationProperty -> ()
resourceType :: LaunchTemplateTagSpecificationProperty -> Maybe (Value Text)
tags :: LaunchTemplateTagSpecificationProperty -> Maybe [Tag]
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= LaunchTemplateTagSpecificationProperty
{tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" LaunchTemplateTagSpecificationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
..}