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