{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SMS.Types.ServerLaunchConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SMS.Types.S3Location
import Amazonka.SMS.Types.ScriptType
import Amazonka.SMS.Types.Server
import Amazonka.SMS.Types.UserData
data ServerLaunchConfiguration = ServerLaunchConfiguration'
{
ServerLaunchConfiguration -> Maybe Text
ec2KeyName :: Prelude.Maybe Prelude.Text,
ServerLaunchConfiguration -> Maybe ScriptType
configureScriptType :: Prelude.Maybe ScriptType,
ServerLaunchConfiguration -> Maybe Bool
associatePublicIpAddress :: Prelude.Maybe Prelude.Bool,
ServerLaunchConfiguration -> Maybe Text
iamInstanceProfileName :: Prelude.Maybe Prelude.Text,
ServerLaunchConfiguration -> Maybe Text
subnet :: Prelude.Maybe Prelude.Text,
ServerLaunchConfiguration -> Maybe Text
logicalId :: Prelude.Maybe Prelude.Text,
ServerLaunchConfiguration -> Maybe Text
securityGroup :: Prelude.Maybe Prelude.Text,
ServerLaunchConfiguration -> Maybe UserData
userData :: Prelude.Maybe UserData,
ServerLaunchConfiguration -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
ServerLaunchConfiguration -> Maybe S3Location
configureScript :: Prelude.Maybe S3Location,
ServerLaunchConfiguration -> Maybe Server
server :: Prelude.Maybe Server,
ServerLaunchConfiguration -> Maybe Text
vpc :: Prelude.Maybe Prelude.Text
}
deriving (ServerLaunchConfiguration -> ServerLaunchConfiguration -> Bool
(ServerLaunchConfiguration -> ServerLaunchConfiguration -> Bool)
-> (ServerLaunchConfiguration -> ServerLaunchConfiguration -> Bool)
-> Eq ServerLaunchConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServerLaunchConfiguration -> ServerLaunchConfiguration -> Bool
$c/= :: ServerLaunchConfiguration -> ServerLaunchConfiguration -> Bool
== :: ServerLaunchConfiguration -> ServerLaunchConfiguration -> Bool
$c== :: ServerLaunchConfiguration -> ServerLaunchConfiguration -> Bool
Prelude.Eq, ReadPrec [ServerLaunchConfiguration]
ReadPrec ServerLaunchConfiguration
Int -> ReadS ServerLaunchConfiguration
ReadS [ServerLaunchConfiguration]
(Int -> ReadS ServerLaunchConfiguration)
-> ReadS [ServerLaunchConfiguration]
-> ReadPrec ServerLaunchConfiguration
-> ReadPrec [ServerLaunchConfiguration]
-> Read ServerLaunchConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServerLaunchConfiguration]
$creadListPrec :: ReadPrec [ServerLaunchConfiguration]
readPrec :: ReadPrec ServerLaunchConfiguration
$creadPrec :: ReadPrec ServerLaunchConfiguration
readList :: ReadS [ServerLaunchConfiguration]
$creadList :: ReadS [ServerLaunchConfiguration]
readsPrec :: Int -> ReadS ServerLaunchConfiguration
$creadsPrec :: Int -> ReadS ServerLaunchConfiguration
Prelude.Read, Int -> ServerLaunchConfiguration -> ShowS
[ServerLaunchConfiguration] -> ShowS
ServerLaunchConfiguration -> String
(Int -> ServerLaunchConfiguration -> ShowS)
-> (ServerLaunchConfiguration -> String)
-> ([ServerLaunchConfiguration] -> ShowS)
-> Show ServerLaunchConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServerLaunchConfiguration] -> ShowS
$cshowList :: [ServerLaunchConfiguration] -> ShowS
show :: ServerLaunchConfiguration -> String
$cshow :: ServerLaunchConfiguration -> String
showsPrec :: Int -> ServerLaunchConfiguration -> ShowS
$cshowsPrec :: Int -> ServerLaunchConfiguration -> ShowS
Prelude.Show, (forall x.
ServerLaunchConfiguration -> Rep ServerLaunchConfiguration x)
-> (forall x.
Rep ServerLaunchConfiguration x -> ServerLaunchConfiguration)
-> Generic ServerLaunchConfiguration
forall x.
Rep ServerLaunchConfiguration x -> ServerLaunchConfiguration
forall x.
ServerLaunchConfiguration -> Rep ServerLaunchConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServerLaunchConfiguration x -> ServerLaunchConfiguration
$cfrom :: forall x.
ServerLaunchConfiguration -> Rep ServerLaunchConfiguration x
Prelude.Generic)
newServerLaunchConfiguration ::
ServerLaunchConfiguration
newServerLaunchConfiguration :: ServerLaunchConfiguration
newServerLaunchConfiguration =
ServerLaunchConfiguration' :: Maybe Text
-> Maybe ScriptType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration
ServerLaunchConfiguration'
{ $sel:ec2KeyName:ServerLaunchConfiguration' :: Maybe Text
ec2KeyName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configureScriptType:ServerLaunchConfiguration' :: Maybe ScriptType
configureScriptType = Maybe ScriptType
forall a. Maybe a
Prelude.Nothing,
$sel:associatePublicIpAddress:ServerLaunchConfiguration' :: Maybe Bool
associatePublicIpAddress = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:iamInstanceProfileName:ServerLaunchConfiguration' :: Maybe Text
iamInstanceProfileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnet:ServerLaunchConfiguration' :: Maybe Text
subnet = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:logicalId:ServerLaunchConfiguration' :: Maybe Text
logicalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:securityGroup:ServerLaunchConfiguration' :: Maybe Text
securityGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userData:ServerLaunchConfiguration' :: Maybe UserData
userData = Maybe UserData
forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:ServerLaunchConfiguration' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configureScript:ServerLaunchConfiguration' :: Maybe S3Location
configureScript = Maybe S3Location
forall a. Maybe a
Prelude.Nothing,
$sel:server:ServerLaunchConfiguration' :: Maybe Server
server = Maybe Server
forall a. Maybe a
Prelude.Nothing,
$sel:vpc:ServerLaunchConfiguration' :: Maybe Text
vpc = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
serverLaunchConfiguration_ec2KeyName :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Prelude.Text)
serverLaunchConfiguration_ec2KeyName :: (Maybe Text -> f (Maybe Text))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_ec2KeyName = (ServerLaunchConfiguration -> Maybe Text)
-> (ServerLaunchConfiguration
-> Maybe Text -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Text
ec2KeyName :: Maybe Text
$sel:ec2KeyName:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
ec2KeyName} -> Maybe Text
ec2KeyName) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Text
a -> ServerLaunchConfiguration
s {$sel:ec2KeyName:ServerLaunchConfiguration' :: Maybe Text
ec2KeyName = Maybe Text
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_configureScriptType :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe ScriptType)
serverLaunchConfiguration_configureScriptType :: (Maybe ScriptType -> f (Maybe ScriptType))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_configureScriptType = (ServerLaunchConfiguration -> Maybe ScriptType)
-> (ServerLaunchConfiguration
-> Maybe ScriptType -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe ScriptType)
(Maybe ScriptType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe ScriptType
configureScriptType :: Maybe ScriptType
$sel:configureScriptType:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe ScriptType
configureScriptType} -> Maybe ScriptType
configureScriptType) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe ScriptType
a -> ServerLaunchConfiguration
s {$sel:configureScriptType:ServerLaunchConfiguration' :: Maybe ScriptType
configureScriptType = Maybe ScriptType
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_associatePublicIpAddress :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Prelude.Bool)
serverLaunchConfiguration_associatePublicIpAddress :: (Maybe Bool -> f (Maybe Bool))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_associatePublicIpAddress = (ServerLaunchConfiguration -> Maybe Bool)
-> (ServerLaunchConfiguration
-> Maybe Bool -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Bool
associatePublicIpAddress :: Maybe Bool
$sel:associatePublicIpAddress:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Bool
associatePublicIpAddress} -> Maybe Bool
associatePublicIpAddress) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Bool
a -> ServerLaunchConfiguration
s {$sel:associatePublicIpAddress:ServerLaunchConfiguration' :: Maybe Bool
associatePublicIpAddress = Maybe Bool
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_iamInstanceProfileName :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Prelude.Text)
serverLaunchConfiguration_iamInstanceProfileName :: (Maybe Text -> f (Maybe Text))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_iamInstanceProfileName = (ServerLaunchConfiguration -> Maybe Text)
-> (ServerLaunchConfiguration
-> Maybe Text -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Text
iamInstanceProfileName :: Maybe Text
$sel:iamInstanceProfileName:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
iamInstanceProfileName} -> Maybe Text
iamInstanceProfileName) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Text
a -> ServerLaunchConfiguration
s {$sel:iamInstanceProfileName:ServerLaunchConfiguration' :: Maybe Text
iamInstanceProfileName = Maybe Text
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_subnet :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Prelude.Text)
serverLaunchConfiguration_subnet :: (Maybe Text -> f (Maybe Text))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_subnet = (ServerLaunchConfiguration -> Maybe Text)
-> (ServerLaunchConfiguration
-> Maybe Text -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Text
subnet :: Maybe Text
$sel:subnet:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
subnet} -> Maybe Text
subnet) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Text
a -> ServerLaunchConfiguration
s {$sel:subnet:ServerLaunchConfiguration' :: Maybe Text
subnet = Maybe Text
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_logicalId :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Prelude.Text)
serverLaunchConfiguration_logicalId :: (Maybe Text -> f (Maybe Text))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_logicalId = (ServerLaunchConfiguration -> Maybe Text)
-> (ServerLaunchConfiguration
-> Maybe Text -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Text
logicalId :: Maybe Text
$sel:logicalId:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
logicalId} -> Maybe Text
logicalId) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Text
a -> ServerLaunchConfiguration
s {$sel:logicalId:ServerLaunchConfiguration' :: Maybe Text
logicalId = Maybe Text
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_securityGroup :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Prelude.Text)
serverLaunchConfiguration_securityGroup :: (Maybe Text -> f (Maybe Text))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_securityGroup = (ServerLaunchConfiguration -> Maybe Text)
-> (ServerLaunchConfiguration
-> Maybe Text -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Text
securityGroup :: Maybe Text
$sel:securityGroup:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
securityGroup} -> Maybe Text
securityGroup) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Text
a -> ServerLaunchConfiguration
s {$sel:securityGroup:ServerLaunchConfiguration' :: Maybe Text
securityGroup = Maybe Text
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_userData :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe UserData)
serverLaunchConfiguration_userData :: (Maybe UserData -> f (Maybe UserData))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_userData = (ServerLaunchConfiguration -> Maybe UserData)
-> (ServerLaunchConfiguration
-> Maybe UserData -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe UserData)
(Maybe UserData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe UserData
userData :: Maybe UserData
$sel:userData:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe UserData
userData} -> Maybe UserData
userData) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe UserData
a -> ServerLaunchConfiguration
s {$sel:userData:ServerLaunchConfiguration' :: Maybe UserData
userData = Maybe UserData
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_instanceType :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Prelude.Text)
serverLaunchConfiguration_instanceType :: (Maybe Text -> f (Maybe Text))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_instanceType = (ServerLaunchConfiguration -> Maybe Text)
-> (ServerLaunchConfiguration
-> Maybe Text -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Text
a -> ServerLaunchConfiguration
s {$sel:instanceType:ServerLaunchConfiguration' :: Maybe Text
instanceType = Maybe Text
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_configureScript :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe S3Location)
serverLaunchConfiguration_configureScript :: (Maybe S3Location -> f (Maybe S3Location))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_configureScript = (ServerLaunchConfiguration -> Maybe S3Location)
-> (ServerLaunchConfiguration
-> Maybe S3Location -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe S3Location)
(Maybe S3Location)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe S3Location
configureScript :: Maybe S3Location
$sel:configureScript:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe S3Location
configureScript} -> Maybe S3Location
configureScript) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe S3Location
a -> ServerLaunchConfiguration
s {$sel:configureScript:ServerLaunchConfiguration' :: Maybe S3Location
configureScript = Maybe S3Location
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_server :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Server)
serverLaunchConfiguration_server :: (Maybe Server -> f (Maybe Server))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_server = (ServerLaunchConfiguration -> Maybe Server)
-> (ServerLaunchConfiguration
-> Maybe Server -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Server)
(Maybe Server)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Server
server :: Maybe Server
$sel:server:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Server
server} -> Maybe Server
server) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Server
a -> ServerLaunchConfiguration
s {$sel:server:ServerLaunchConfiguration' :: Maybe Server
server = Maybe Server
a} :: ServerLaunchConfiguration)
serverLaunchConfiguration_vpc :: Lens.Lens' ServerLaunchConfiguration (Prelude.Maybe Prelude.Text)
serverLaunchConfiguration_vpc :: (Maybe Text -> f (Maybe Text))
-> ServerLaunchConfiguration -> f ServerLaunchConfiguration
serverLaunchConfiguration_vpc = (ServerLaunchConfiguration -> Maybe Text)
-> (ServerLaunchConfiguration
-> Maybe Text -> ServerLaunchConfiguration)
-> Lens
ServerLaunchConfiguration
ServerLaunchConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerLaunchConfiguration' {Maybe Text
vpc :: Maybe Text
$sel:vpc:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
vpc} -> Maybe Text
vpc) (\s :: ServerLaunchConfiguration
s@ServerLaunchConfiguration' {} Maybe Text
a -> ServerLaunchConfiguration
s {$sel:vpc:ServerLaunchConfiguration' :: Maybe Text
vpc = Maybe Text
a} :: ServerLaunchConfiguration)
instance Core.FromJSON ServerLaunchConfiguration where
parseJSON :: Value -> Parser ServerLaunchConfiguration
parseJSON =
String
-> (Object -> Parser ServerLaunchConfiguration)
-> Value
-> Parser ServerLaunchConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServerLaunchConfiguration"
( \Object
x ->
Maybe Text
-> Maybe ScriptType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration
ServerLaunchConfiguration'
(Maybe Text
-> Maybe ScriptType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe ScriptType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ec2KeyName")
Parser
(Maybe ScriptType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe ScriptType)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ScriptType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configureScriptType")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"associatePublicIpAddress")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"iamInstanceProfileName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"subnet")
Parser
(Maybe Text
-> Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"logicalId")
Parser
(Maybe Text
-> Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"securityGroup")
Parser
(Maybe UserData
-> Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe UserData)
-> Parser
(Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserData)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"userData")
Parser
(Maybe Text
-> Maybe S3Location
-> Maybe Server
-> Maybe Text
-> ServerLaunchConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe S3Location
-> Maybe Server -> Maybe Text -> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"instanceType")
Parser
(Maybe S3Location
-> Maybe Server -> Maybe Text -> ServerLaunchConfiguration)
-> Parser (Maybe S3Location)
-> Parser (Maybe Server -> Maybe Text -> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe S3Location)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configureScript")
Parser (Maybe Server -> Maybe Text -> ServerLaunchConfiguration)
-> Parser (Maybe Server)
-> Parser (Maybe Text -> ServerLaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Server)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"server")
Parser (Maybe Text -> ServerLaunchConfiguration)
-> Parser (Maybe Text) -> Parser ServerLaunchConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vpc")
)
instance Prelude.Hashable ServerLaunchConfiguration
instance Prelude.NFData ServerLaunchConfiguration
instance Core.ToJSON ServerLaunchConfiguration where
toJSON :: ServerLaunchConfiguration -> Value
toJSON ServerLaunchConfiguration' {Maybe Bool
Maybe Text
Maybe S3Location
Maybe ScriptType
Maybe UserData
Maybe Server
vpc :: Maybe Text
server :: Maybe Server
configureScript :: Maybe S3Location
instanceType :: Maybe Text
userData :: Maybe UserData
securityGroup :: Maybe Text
logicalId :: Maybe Text
subnet :: Maybe Text
iamInstanceProfileName :: Maybe Text
associatePublicIpAddress :: Maybe Bool
configureScriptType :: Maybe ScriptType
ec2KeyName :: Maybe Text
$sel:vpc:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
$sel:server:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Server
$sel:configureScript:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe S3Location
$sel:instanceType:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
$sel:userData:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe UserData
$sel:securityGroup:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
$sel:logicalId:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
$sel:subnet:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
$sel:iamInstanceProfileName:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
$sel:associatePublicIpAddress:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Bool
$sel:configureScriptType:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe ScriptType
$sel:ec2KeyName:ServerLaunchConfiguration' :: ServerLaunchConfiguration -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ec2KeyName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ec2KeyName,
(Text
"configureScriptType" Text -> ScriptType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ScriptType -> Pair) -> Maybe ScriptType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScriptType
configureScriptType,
(Text
"associatePublicIpAddress" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
associatePublicIpAddress,
(Text
"iamInstanceProfileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
iamInstanceProfileName,
(Text
"subnet" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
subnet,
(Text
"logicalId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
logicalId,
(Text
"securityGroup" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
securityGroup,
(Text
"userData" Text -> UserData -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UserData -> Pair) -> Maybe UserData -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UserData
userData,
(Text
"instanceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
instanceType,
(Text
"configureScript" Text -> S3Location -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(S3Location -> Pair) -> Maybe S3Location -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3Location
configureScript,
(Text
"server" Text -> Server -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Server -> Pair) -> Maybe Server -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Server
server,
(Text
"vpc" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vpc
]
)