module Stratosphere.EC2.EC2Fleet.TagSpecificationProperty (
        TagSpecificationProperty(..), mkTagSpecificationProperty
    ) 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 TagSpecificationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-tagspecification.html>
    TagSpecificationProperty {TagSpecificationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-tagspecification.html#cfn-ec2-ec2fleet-tagspecification-resourcetype>
                              TagSpecificationProperty -> Maybe (Value Text)
resourceType :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-tagspecification.html#cfn-ec2-ec2fleet-tagspecification-tags>
                              TagSpecificationProperty -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (TagSpecificationProperty -> TagSpecificationProperty -> Bool
(TagSpecificationProperty -> TagSpecificationProperty -> Bool)
-> (TagSpecificationProperty -> TagSpecificationProperty -> Bool)
-> Eq TagSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TagSpecificationProperty -> TagSpecificationProperty -> Bool
== :: TagSpecificationProperty -> TagSpecificationProperty -> Bool
$c/= :: TagSpecificationProperty -> TagSpecificationProperty -> Bool
/= :: TagSpecificationProperty -> TagSpecificationProperty -> Bool
Prelude.Eq, Int -> TagSpecificationProperty -> ShowS
[TagSpecificationProperty] -> ShowS
TagSpecificationProperty -> String
(Int -> TagSpecificationProperty -> ShowS)
-> (TagSpecificationProperty -> String)
-> ([TagSpecificationProperty] -> ShowS)
-> Show TagSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TagSpecificationProperty -> ShowS
showsPrec :: Int -> TagSpecificationProperty -> ShowS
$cshow :: TagSpecificationProperty -> String
show :: TagSpecificationProperty -> String
$cshowList :: [TagSpecificationProperty] -> ShowS
showList :: [TagSpecificationProperty] -> ShowS
Prelude.Show)
mkTagSpecificationProperty :: TagSpecificationProperty
mkTagSpecificationProperty :: TagSpecificationProperty
mkTagSpecificationProperty
  = TagSpecificationProperty
      {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 TagSpecificationProperty where
  toResourceProperties :: TagSpecificationProperty -> ResourceProperties
toResourceProperties TagSpecificationProperty {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: TagSpecificationProperty -> ()
resourceType :: TagSpecificationProperty -> Maybe (Value Text)
tags :: TagSpecificationProperty -> Maybe [Tag]
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::EC2Fleet.TagSpecification",
         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 TagSpecificationProperty where
  toJSON :: TagSpecificationProperty -> Value
toJSON TagSpecificationProperty {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: TagSpecificationProperty -> ()
resourceType :: TagSpecificationProperty -> Maybe (Value Text)
tags :: TagSpecificationProperty -> 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" TagSpecificationProperty where
  type PropertyType "ResourceType" TagSpecificationProperty = Value Prelude.Text
  set :: PropertyType "ResourceType" TagSpecificationProperty
-> TagSpecificationProperty -> TagSpecificationProperty
set PropertyType "ResourceType" TagSpecificationProperty
newValue TagSpecificationProperty {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: TagSpecificationProperty -> ()
resourceType :: TagSpecificationProperty -> Maybe (Value Text)
tags :: TagSpecificationProperty -> Maybe [Tag]
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = TagSpecificationProperty
        {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" TagSpecificationProperty
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" TagSpecificationProperty where
  type PropertyType "Tags" TagSpecificationProperty = [Tag]
  set :: PropertyType "Tags" TagSpecificationProperty
-> TagSpecificationProperty -> TagSpecificationProperty
set PropertyType "Tags" TagSpecificationProperty
newValue TagSpecificationProperty {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: TagSpecificationProperty -> ()
resourceType :: TagSpecificationProperty -> Maybe (Value Text)
tags :: TagSpecificationProperty -> Maybe [Tag]
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = TagSpecificationProperty {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" TagSpecificationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
haddock_workaround_ :: ()
resourceType :: Maybe (Value Text)
..}