module Stratosphere.EC2.LaunchTemplate (
        module Exports, LaunchTemplate(..), mkLaunchTemplate
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.LaunchTemplate.LaunchTemplateDataProperty as Exports
import {-# SOURCE #-} Stratosphere.EC2.LaunchTemplate.LaunchTemplateTagSpecificationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LaunchTemplate
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html>
    LaunchTemplate {LaunchTemplate -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#cfn-ec2-launchtemplate-launchtemplatedata>
                    LaunchTemplate -> LaunchTemplateDataProperty
launchTemplateData :: LaunchTemplateDataProperty,
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#cfn-ec2-launchtemplate-launchtemplatename>
                    LaunchTemplate -> Maybe (Value Text)
launchTemplateName :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#cfn-ec2-launchtemplate-tagspecifications>
                    LaunchTemplate -> Maybe [LaunchTemplateTagSpecificationProperty]
tagSpecifications :: (Prelude.Maybe [LaunchTemplateTagSpecificationProperty]),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#cfn-ec2-launchtemplate-versiondescription>
                    LaunchTemplate -> Maybe (Value Text)
versionDescription :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LaunchTemplate -> LaunchTemplate -> Bool
(LaunchTemplate -> LaunchTemplate -> Bool)
-> (LaunchTemplate -> LaunchTemplate -> Bool) -> Eq LaunchTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LaunchTemplate -> LaunchTemplate -> Bool
== :: LaunchTemplate -> LaunchTemplate -> Bool
$c/= :: LaunchTemplate -> LaunchTemplate -> Bool
/= :: LaunchTemplate -> LaunchTemplate -> Bool
Prelude.Eq, Int -> LaunchTemplate -> ShowS
[LaunchTemplate] -> ShowS
LaunchTemplate -> String
(Int -> LaunchTemplate -> ShowS)
-> (LaunchTemplate -> String)
-> ([LaunchTemplate] -> ShowS)
-> Show LaunchTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LaunchTemplate -> ShowS
showsPrec :: Int -> LaunchTemplate -> ShowS
$cshow :: LaunchTemplate -> String
show :: LaunchTemplate -> String
$cshowList :: [LaunchTemplate] -> ShowS
showList :: [LaunchTemplate] -> ShowS
Prelude.Show)
mkLaunchTemplate :: LaunchTemplateDataProperty -> LaunchTemplate
mkLaunchTemplate :: LaunchTemplateDataProperty -> LaunchTemplate
mkLaunchTemplate LaunchTemplateDataProperty
launchTemplateData
  = LaunchTemplate
      {haddock_workaround_ :: ()
haddock_workaround_ = (), launchTemplateData :: LaunchTemplateDataProperty
launchTemplateData = LaunchTemplateDataProperty
launchTemplateData,
       launchTemplateName :: Maybe (Value Text)
launchTemplateName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
tagSpecifications = Maybe [LaunchTemplateTagSpecificationProperty]
forall a. Maybe a
Prelude.Nothing,
       versionDescription :: Maybe (Value Text)
versionDescription = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LaunchTemplate where
  toResourceProperties :: LaunchTemplate -> ResourceProperties
toResourceProperties LaunchTemplate {Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: LaunchTemplate -> ()
launchTemplateData :: LaunchTemplate -> LaunchTemplateDataProperty
launchTemplateName :: LaunchTemplate -> Maybe (Value Text)
tagSpecifications :: LaunchTemplate -> Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: LaunchTemplate -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"LaunchTemplateData" Key -> LaunchTemplateDataProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= LaunchTemplateDataProperty
launchTemplateData]
                           ([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
"LaunchTemplateName" (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)
launchTemplateName,
                               Key -> [LaunchTemplateTagSpecificationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TagSpecifications" ([LaunchTemplateTagSpecificationProperty] -> (Key, Value))
-> Maybe [LaunchTemplateTagSpecificationProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LaunchTemplateTagSpecificationProperty]
tagSpecifications,
                               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
"VersionDescription" (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)
versionDescription]))}
instance JSON.ToJSON LaunchTemplate where
  toJSON :: LaunchTemplate -> Value
toJSON LaunchTemplate {Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: LaunchTemplate -> ()
launchTemplateData :: LaunchTemplate -> LaunchTemplateDataProperty
launchTemplateName :: LaunchTemplate -> Maybe (Value Text)
tagSpecifications :: LaunchTemplate -> Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: LaunchTemplate -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"LaunchTemplateData" Key -> LaunchTemplateDataProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= LaunchTemplateDataProperty
launchTemplateData]
              ([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
"LaunchTemplateName" (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)
launchTemplateName,
                  Key -> [LaunchTemplateTagSpecificationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TagSpecifications" ([LaunchTemplateTagSpecificationProperty] -> (Key, Value))
-> Maybe [LaunchTemplateTagSpecificationProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LaunchTemplateTagSpecificationProperty]
tagSpecifications,
                  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
"VersionDescription" (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)
versionDescription])))
instance Property "LaunchTemplateData" LaunchTemplate where
  type PropertyType "LaunchTemplateData" LaunchTemplate = LaunchTemplateDataProperty
  set :: PropertyType "LaunchTemplateData" LaunchTemplate
-> LaunchTemplate -> LaunchTemplate
set PropertyType "LaunchTemplateData" LaunchTemplate
newValue LaunchTemplate {Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: LaunchTemplate -> ()
launchTemplateData :: LaunchTemplate -> LaunchTemplateDataProperty
launchTemplateName :: LaunchTemplate -> Maybe (Value Text)
tagSpecifications :: LaunchTemplate -> Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: LaunchTemplate -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
..}
    = LaunchTemplate {launchTemplateData :: LaunchTemplateDataProperty
launchTemplateData = PropertyType "LaunchTemplateData" LaunchTemplate
LaunchTemplateDataProperty
newValue, Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
..}
instance Property "LaunchTemplateName" LaunchTemplate where
  type PropertyType "LaunchTemplateName" LaunchTemplate = Value Prelude.Text
  set :: PropertyType "LaunchTemplateName" LaunchTemplate
-> LaunchTemplate -> LaunchTemplate
set PropertyType "LaunchTemplateName" LaunchTemplate
newValue LaunchTemplate {Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: LaunchTemplate -> ()
launchTemplateData :: LaunchTemplate -> LaunchTemplateDataProperty
launchTemplateName :: LaunchTemplate -> Maybe (Value Text)
tagSpecifications :: LaunchTemplate -> Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: LaunchTemplate -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
..}
    = LaunchTemplate {launchTemplateName :: Maybe (Value Text)
launchTemplateName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LaunchTemplateName" LaunchTemplate
Value Text
newValue, Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
..}
instance Property "TagSpecifications" LaunchTemplate where
  type PropertyType "TagSpecifications" LaunchTemplate = [LaunchTemplateTagSpecificationProperty]
  set :: PropertyType "TagSpecifications" LaunchTemplate
-> LaunchTemplate -> LaunchTemplate
set PropertyType "TagSpecifications" LaunchTemplate
newValue LaunchTemplate {Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: LaunchTemplate -> ()
launchTemplateData :: LaunchTemplate -> LaunchTemplateDataProperty
launchTemplateName :: LaunchTemplate -> Maybe (Value Text)
tagSpecifications :: LaunchTemplate -> Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: LaunchTemplate -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
..}
    = LaunchTemplate {tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
tagSpecifications = [LaunchTemplateTagSpecificationProperty]
-> Maybe [LaunchTemplateTagSpecificationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [LaunchTemplateTagSpecificationProperty]
PropertyType "TagSpecifications" LaunchTemplate
newValue, Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
versionDescription :: Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
versionDescription :: Maybe (Value Text)
..}
instance Property "VersionDescription" LaunchTemplate where
  type PropertyType "VersionDescription" LaunchTemplate = Value Prelude.Text
  set :: PropertyType "VersionDescription" LaunchTemplate
-> LaunchTemplate -> LaunchTemplate
set PropertyType "VersionDescription" LaunchTemplate
newValue LaunchTemplate {Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: LaunchTemplate -> ()
launchTemplateData :: LaunchTemplate -> LaunchTemplateDataProperty
launchTemplateName :: LaunchTemplate -> Maybe (Value Text)
tagSpecifications :: LaunchTemplate -> Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: LaunchTemplate -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
versionDescription :: Maybe (Value Text)
..}
    = LaunchTemplate {versionDescription :: Maybe (Value Text)
versionDescription = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VersionDescription" LaunchTemplate
Value Text
newValue, Maybe [LaunchTemplateTagSpecificationProperty]
Maybe (Value Text)
()
LaunchTemplateDataProperty
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
haddock_workaround_ :: ()
launchTemplateData :: LaunchTemplateDataProperty
launchTemplateName :: Maybe (Value Text)
tagSpecifications :: Maybe [LaunchTemplateTagSpecificationProperty]
..}