module Stratosphere.GameLift.GameServerGroup.LaunchTemplateProperty (
        LaunchTemplateProperty(..), mkLaunchTemplateProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LaunchTemplateProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-launchtemplate.html>
    LaunchTemplateProperty {LaunchTemplateProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-launchtemplate.html#cfn-gamelift-gameservergroup-launchtemplate-launchtemplateid>
                            LaunchTemplateProperty -> Maybe (Value Text)
launchTemplateId :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-launchtemplate.html#cfn-gamelift-gameservergroup-launchtemplate-launchtemplatename>
                            LaunchTemplateProperty -> Maybe (Value Text)
launchTemplateName :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-gameservergroup-launchtemplate.html#cfn-gamelift-gameservergroup-launchtemplate-version>
                            LaunchTemplateProperty -> Maybe (Value Text)
version :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LaunchTemplateProperty -> LaunchTemplateProperty -> Bool
(LaunchTemplateProperty -> LaunchTemplateProperty -> Bool)
-> (LaunchTemplateProperty -> LaunchTemplateProperty -> Bool)
-> Eq LaunchTemplateProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LaunchTemplateProperty -> LaunchTemplateProperty -> Bool
== :: LaunchTemplateProperty -> LaunchTemplateProperty -> Bool
$c/= :: LaunchTemplateProperty -> LaunchTemplateProperty -> Bool
/= :: LaunchTemplateProperty -> LaunchTemplateProperty -> Bool
Prelude.Eq, Int -> LaunchTemplateProperty -> ShowS
[LaunchTemplateProperty] -> ShowS
LaunchTemplateProperty -> String
(Int -> LaunchTemplateProperty -> ShowS)
-> (LaunchTemplateProperty -> String)
-> ([LaunchTemplateProperty] -> ShowS)
-> Show LaunchTemplateProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LaunchTemplateProperty -> ShowS
showsPrec :: Int -> LaunchTemplateProperty -> ShowS
$cshow :: LaunchTemplateProperty -> String
show :: LaunchTemplateProperty -> String
$cshowList :: [LaunchTemplateProperty] -> ShowS
showList :: [LaunchTemplateProperty] -> ShowS
Prelude.Show)
mkLaunchTemplateProperty :: LaunchTemplateProperty
mkLaunchTemplateProperty :: LaunchTemplateProperty
mkLaunchTemplateProperty
  = LaunchTemplateProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), launchTemplateId :: Maybe (Value Text)
launchTemplateId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       launchTemplateName :: Maybe (Value Text)
launchTemplateName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, version :: Maybe (Value Text)
version = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LaunchTemplateProperty where
  toResourceProperties :: LaunchTemplateProperty -> ResourceProperties
toResourceProperties LaunchTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateProperty -> ()
launchTemplateId :: LaunchTemplateProperty -> Maybe (Value Text)
launchTemplateName :: LaunchTemplateProperty -> Maybe (Value Text)
version :: LaunchTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
launchTemplateName :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GameLift::GameServerGroup.LaunchTemplate",
         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
"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 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 -> 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
"Version" (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)
version])}
instance JSON.ToJSON LaunchTemplateProperty where
  toJSON :: LaunchTemplateProperty -> Value
toJSON LaunchTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateProperty -> ()
launchTemplateId :: LaunchTemplateProperty -> Maybe (Value Text)
launchTemplateName :: LaunchTemplateProperty -> Maybe (Value Text)
version :: LaunchTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
launchTemplateName :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = [(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
"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 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 -> 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
"Version" (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)
version]))
instance Property "LaunchTemplateId" LaunchTemplateProperty where
  type PropertyType "LaunchTemplateId" LaunchTemplateProperty = Value Prelude.Text
  set :: PropertyType "LaunchTemplateId" LaunchTemplateProperty
-> LaunchTemplateProperty -> LaunchTemplateProperty
set PropertyType "LaunchTemplateId" LaunchTemplateProperty
newValue LaunchTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateProperty -> ()
launchTemplateId :: LaunchTemplateProperty -> Maybe (Value Text)
launchTemplateName :: LaunchTemplateProperty -> Maybe (Value Text)
version :: LaunchTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
launchTemplateName :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = LaunchTemplateProperty
        {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" LaunchTemplateProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
launchTemplateName :: Maybe (Value Text)
version :: Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateName :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
instance Property "LaunchTemplateName" LaunchTemplateProperty where
  type PropertyType "LaunchTemplateName" LaunchTemplateProperty = Value Prelude.Text
  set :: PropertyType "LaunchTemplateName" LaunchTemplateProperty
-> LaunchTemplateProperty -> LaunchTemplateProperty
set PropertyType "LaunchTemplateName" LaunchTemplateProperty
newValue LaunchTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateProperty -> ()
launchTemplateId :: LaunchTemplateProperty -> Maybe (Value Text)
launchTemplateName :: LaunchTemplateProperty -> Maybe (Value Text)
version :: LaunchTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
launchTemplateName :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = LaunchTemplateProperty
        {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" LaunchTemplateProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
version :: Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
instance Property "Version" LaunchTemplateProperty where
  type PropertyType "Version" LaunchTemplateProperty = Value Prelude.Text
  set :: PropertyType "Version" LaunchTemplateProperty
-> LaunchTemplateProperty -> LaunchTemplateProperty
set PropertyType "Version" LaunchTemplateProperty
newValue LaunchTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: LaunchTemplateProperty -> ()
launchTemplateId :: LaunchTemplateProperty -> Maybe (Value Text)
launchTemplateName :: LaunchTemplateProperty -> Maybe (Value Text)
version :: LaunchTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
launchTemplateName :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = LaunchTemplateProperty {version :: Maybe (Value Text)
version = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Version" LaunchTemplateProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
launchTemplateName :: Maybe (Value Text)
haddock_workaround_ :: ()
launchTemplateId :: Maybe (Value Text)
launchTemplateName :: Maybe (Value Text)
..}