{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.OpsWorksCM.CreateServer
(
CreateServer (..),
newCreateServer,
createServer_engineVersion,
createServer_disableAutomatedBackup,
createServer_securityGroupIds,
createServer_associatePublicIpAddress,
createServer_subnetIds,
createServer_keyPair,
createServer_backupId,
createServer_customDomain,
createServer_customPrivateKey,
createServer_engineModel,
createServer_engineAttributes,
createServer_preferredMaintenanceWindow,
createServer_preferredBackupWindow,
createServer_customCertificate,
createServer_tags,
createServer_backupRetentionCount,
createServer_engine,
createServer_serverName,
createServer_instanceProfileArn,
createServer_instanceType,
createServer_serviceRoleArn,
CreateServerResponse (..),
newCreateServerResponse,
createServerResponse_server,
createServerResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorksCM.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateServer = CreateServer'
{
CreateServer -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
CreateServer -> Maybe Bool
disableAutomatedBackup :: Prelude.Maybe Prelude.Bool,
CreateServer -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
CreateServer -> Maybe Bool
associatePublicIpAddress :: Prelude.Maybe Prelude.Bool,
CreateServer -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
CreateServer -> Maybe Text
keyPair :: Prelude.Maybe Prelude.Text,
CreateServer -> Maybe Text
backupId :: Prelude.Maybe Prelude.Text,
CreateServer -> Maybe Text
customDomain :: Prelude.Maybe Prelude.Text,
CreateServer -> Maybe (Sensitive Text)
customPrivateKey :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateServer -> Maybe Text
engineModel :: Prelude.Maybe Prelude.Text,
CreateServer -> Maybe [EngineAttribute]
engineAttributes :: Prelude.Maybe [EngineAttribute],
CreateServer -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
CreateServer -> Maybe Text
preferredBackupWindow :: Prelude.Maybe Prelude.Text,
CreateServer -> Maybe Text
customCertificate :: Prelude.Maybe Prelude.Text,
CreateServer -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateServer -> Maybe Natural
backupRetentionCount :: Prelude.Maybe Prelude.Natural,
CreateServer -> Text
engine :: Prelude.Text,
CreateServer -> Text
serverName :: Prelude.Text,
CreateServer -> Text
instanceProfileArn :: Prelude.Text,
CreateServer -> Text
instanceType :: Prelude.Text,
CreateServer -> Text
serviceRoleArn :: Prelude.Text
}
deriving (CreateServer -> CreateServer -> Bool
(CreateServer -> CreateServer -> Bool)
-> (CreateServer -> CreateServer -> Bool) -> Eq CreateServer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateServer -> CreateServer -> Bool
$c/= :: CreateServer -> CreateServer -> Bool
== :: CreateServer -> CreateServer -> Bool
$c== :: CreateServer -> CreateServer -> Bool
Prelude.Eq, Int -> CreateServer -> ShowS
[CreateServer] -> ShowS
CreateServer -> String
(Int -> CreateServer -> ShowS)
-> (CreateServer -> String)
-> ([CreateServer] -> ShowS)
-> Show CreateServer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateServer] -> ShowS
$cshowList :: [CreateServer] -> ShowS
show :: CreateServer -> String
$cshow :: CreateServer -> String
showsPrec :: Int -> CreateServer -> ShowS
$cshowsPrec :: Int -> CreateServer -> ShowS
Prelude.Show, (forall x. CreateServer -> Rep CreateServer x)
-> (forall x. Rep CreateServer x -> CreateServer)
-> Generic CreateServer
forall x. Rep CreateServer x -> CreateServer
forall x. CreateServer -> Rep CreateServer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateServer x -> CreateServer
$cfrom :: forall x. CreateServer -> Rep CreateServer x
Prelude.Generic)
newCreateServer ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateServer
newCreateServer :: Text -> Text -> Text -> Text -> Text -> CreateServer
newCreateServer
Text
pEngine_
Text
pServerName_
Text
pInstanceProfileArn_
Text
pInstanceType_
Text
pServiceRoleArn_ =
CreateServer' :: Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe [EngineAttribute]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe Natural
-> Text
-> Text
-> Text
-> Text
-> Text
-> CreateServer
CreateServer'
{ $sel:engineVersion:CreateServer' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:disableAutomatedBackup:CreateServer' :: Maybe Bool
disableAutomatedBackup = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:securityGroupIds:CreateServer' :: Maybe [Text]
securityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:associatePublicIpAddress:CreateServer' :: Maybe Bool
associatePublicIpAddress = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:CreateServer' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:keyPair:CreateServer' :: Maybe Text
keyPair = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:backupId:CreateServer' :: Maybe Text
backupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customDomain:CreateServer' :: Maybe Text
customDomain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customPrivateKey:CreateServer' :: Maybe (Sensitive Text)
customPrivateKey = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:engineModel:CreateServer' :: Maybe Text
engineModel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engineAttributes:CreateServer' :: Maybe [EngineAttribute]
engineAttributes = Maybe [EngineAttribute]
forall a. Maybe a
Prelude.Nothing,
$sel:preferredMaintenanceWindow:CreateServer' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:preferredBackupWindow:CreateServer' :: Maybe Text
preferredBackupWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customCertificate:CreateServer' :: Maybe Text
customCertificate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateServer' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:backupRetentionCount:CreateServer' :: Maybe Natural
backupRetentionCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:engine:CreateServer' :: Text
engine = Text
pEngine_,
$sel:serverName:CreateServer' :: Text
serverName = Text
pServerName_,
$sel:instanceProfileArn:CreateServer' :: Text
instanceProfileArn = Text
pInstanceProfileArn_,
$sel:instanceType:CreateServer' :: Text
instanceType = Text
pInstanceType_,
$sel:serviceRoleArn:CreateServer' :: Text
serviceRoleArn = Text
pServiceRoleArn_
}
createServer_engineVersion :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_engineVersion :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_engineVersion = (CreateServer -> Maybe Text)
-> (CreateServer -> Maybe Text -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:CreateServer' :: CreateServer -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:engineVersion:CreateServer' :: Maybe Text
engineVersion = Maybe Text
a} :: CreateServer)
createServer_disableAutomatedBackup :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Bool)
createServer_disableAutomatedBackup :: (Maybe Bool -> f (Maybe Bool)) -> CreateServer -> f CreateServer
createServer_disableAutomatedBackup = (CreateServer -> Maybe Bool)
-> (CreateServer -> Maybe Bool -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Bool
disableAutomatedBackup :: Maybe Bool
$sel:disableAutomatedBackup:CreateServer' :: CreateServer -> Maybe Bool
disableAutomatedBackup} -> Maybe Bool
disableAutomatedBackup) (\s :: CreateServer
s@CreateServer' {} Maybe Bool
a -> CreateServer
s {$sel:disableAutomatedBackup:CreateServer' :: Maybe Bool
disableAutomatedBackup = Maybe Bool
a} :: CreateServer)
createServer_securityGroupIds :: Lens.Lens' CreateServer (Prelude.Maybe [Prelude.Text])
createServer_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateServer -> f CreateServer
createServer_securityGroupIds = (CreateServer -> Maybe [Text])
-> (CreateServer -> Maybe [Text] -> CreateServer)
-> Lens CreateServer CreateServer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:CreateServer' :: CreateServer -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: CreateServer
s@CreateServer' {} Maybe [Text]
a -> CreateServer
s {$sel:securityGroupIds:CreateServer' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: CreateServer) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateServer -> f CreateServer)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateServer
-> f CreateServer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createServer_associatePublicIpAddress :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Bool)
createServer_associatePublicIpAddress :: (Maybe Bool -> f (Maybe Bool)) -> CreateServer -> f CreateServer
createServer_associatePublicIpAddress = (CreateServer -> Maybe Bool)
-> (CreateServer -> Maybe Bool -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Bool
associatePublicIpAddress :: Maybe Bool
$sel:associatePublicIpAddress:CreateServer' :: CreateServer -> Maybe Bool
associatePublicIpAddress} -> Maybe Bool
associatePublicIpAddress) (\s :: CreateServer
s@CreateServer' {} Maybe Bool
a -> CreateServer
s {$sel:associatePublicIpAddress:CreateServer' :: Maybe Bool
associatePublicIpAddress = Maybe Bool
a} :: CreateServer)
createServer_subnetIds :: Lens.Lens' CreateServer (Prelude.Maybe [Prelude.Text])
createServer_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateServer -> f CreateServer
createServer_subnetIds = (CreateServer -> Maybe [Text])
-> (CreateServer -> Maybe [Text] -> CreateServer)
-> Lens CreateServer CreateServer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:CreateServer' :: CreateServer -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: CreateServer
s@CreateServer' {} Maybe [Text]
a -> CreateServer
s {$sel:subnetIds:CreateServer' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: CreateServer) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateServer -> f CreateServer)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateServer
-> f CreateServer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createServer_keyPair :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_keyPair :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_keyPair = (CreateServer -> Maybe Text)
-> (CreateServer -> Maybe Text -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
keyPair :: Maybe Text
$sel:keyPair:CreateServer' :: CreateServer -> Maybe Text
keyPair} -> Maybe Text
keyPair) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:keyPair:CreateServer' :: Maybe Text
keyPair = Maybe Text
a} :: CreateServer)
createServer_backupId :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_backupId :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_backupId = (CreateServer -> Maybe Text)
-> (CreateServer -> Maybe Text -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
backupId :: Maybe Text
$sel:backupId:CreateServer' :: CreateServer -> Maybe Text
backupId} -> Maybe Text
backupId) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:backupId:CreateServer' :: Maybe Text
backupId = Maybe Text
a} :: CreateServer)
createServer_customDomain :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_customDomain :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_customDomain = (CreateServer -> Maybe Text)
-> (CreateServer -> Maybe Text -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
customDomain :: Maybe Text
$sel:customDomain:CreateServer' :: CreateServer -> Maybe Text
customDomain} -> Maybe Text
customDomain) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:customDomain:CreateServer' :: Maybe Text
customDomain = Maybe Text
a} :: CreateServer)
createServer_customPrivateKey :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_customPrivateKey :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_customPrivateKey = (CreateServer -> Maybe (Sensitive Text))
-> (CreateServer -> Maybe (Sensitive Text) -> CreateServer)
-> Lens
CreateServer
CreateServer
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe (Sensitive Text)
customPrivateKey :: Maybe (Sensitive Text)
$sel:customPrivateKey:CreateServer' :: CreateServer -> Maybe (Sensitive Text)
customPrivateKey} -> Maybe (Sensitive Text)
customPrivateKey) (\s :: CreateServer
s@CreateServer' {} Maybe (Sensitive Text)
a -> CreateServer
s {$sel:customPrivateKey:CreateServer' :: Maybe (Sensitive Text)
customPrivateKey = Maybe (Sensitive Text)
a} :: CreateServer) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateServer -> f CreateServer)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateServer
-> f CreateServer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createServer_engineModel :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_engineModel :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_engineModel = (CreateServer -> Maybe Text)
-> (CreateServer -> Maybe Text -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
engineModel :: Maybe Text
$sel:engineModel:CreateServer' :: CreateServer -> Maybe Text
engineModel} -> Maybe Text
engineModel) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:engineModel:CreateServer' :: Maybe Text
engineModel = Maybe Text
a} :: CreateServer)
createServer_engineAttributes :: Lens.Lens' CreateServer (Prelude.Maybe [EngineAttribute])
createServer_engineAttributes :: (Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
-> CreateServer -> f CreateServer
createServer_engineAttributes = (CreateServer -> Maybe [EngineAttribute])
-> (CreateServer -> Maybe [EngineAttribute] -> CreateServer)
-> Lens
CreateServer
CreateServer
(Maybe [EngineAttribute])
(Maybe [EngineAttribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe [EngineAttribute]
engineAttributes :: Maybe [EngineAttribute]
$sel:engineAttributes:CreateServer' :: CreateServer -> Maybe [EngineAttribute]
engineAttributes} -> Maybe [EngineAttribute]
engineAttributes) (\s :: CreateServer
s@CreateServer' {} Maybe [EngineAttribute]
a -> CreateServer
s {$sel:engineAttributes:CreateServer' :: Maybe [EngineAttribute]
engineAttributes = Maybe [EngineAttribute]
a} :: CreateServer) ((Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
-> CreateServer -> f CreateServer)
-> ((Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
-> Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
-> (Maybe [EngineAttribute] -> f (Maybe [EngineAttribute]))
-> CreateServer
-> f CreateServer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[EngineAttribute]
[EngineAttribute]
[EngineAttribute]
[EngineAttribute]
-> Iso
(Maybe [EngineAttribute])
(Maybe [EngineAttribute])
(Maybe [EngineAttribute])
(Maybe [EngineAttribute])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[EngineAttribute]
[EngineAttribute]
[EngineAttribute]
[EngineAttribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createServer_preferredMaintenanceWindow :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_preferredMaintenanceWindow = (CreateServer -> Maybe Text)
-> (CreateServer -> Maybe Text -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:CreateServer' :: CreateServer -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:preferredMaintenanceWindow:CreateServer' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: CreateServer)
createServer_preferredBackupWindow :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_preferredBackupWindow :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_preferredBackupWindow = (CreateServer -> Maybe Text)
-> (CreateServer -> Maybe Text -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
preferredBackupWindow :: Maybe Text
$sel:preferredBackupWindow:CreateServer' :: CreateServer -> Maybe Text
preferredBackupWindow} -> Maybe Text
preferredBackupWindow) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:preferredBackupWindow:CreateServer' :: Maybe Text
preferredBackupWindow = Maybe Text
a} :: CreateServer)
createServer_customCertificate :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Text)
createServer_customCertificate :: (Maybe Text -> f (Maybe Text)) -> CreateServer -> f CreateServer
createServer_customCertificate = (CreateServer -> Maybe Text)
-> (CreateServer -> Maybe Text -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Text
customCertificate :: Maybe Text
$sel:customCertificate:CreateServer' :: CreateServer -> Maybe Text
customCertificate} -> Maybe Text
customCertificate) (\s :: CreateServer
s@CreateServer' {} Maybe Text
a -> CreateServer
s {$sel:customCertificate:CreateServer' :: Maybe Text
customCertificate = Maybe Text
a} :: CreateServer)
createServer_tags :: Lens.Lens' CreateServer (Prelude.Maybe [Tag])
createServer_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> CreateServer -> f CreateServer
createServer_tags = (CreateServer -> Maybe [Tag])
-> (CreateServer -> Maybe [Tag] -> CreateServer)
-> Lens CreateServer CreateServer (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateServer' :: CreateServer -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateServer
s@CreateServer' {} Maybe [Tag]
a -> CreateServer
s {$sel:tags:CreateServer' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateServer) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateServer -> f CreateServer)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateServer
-> f CreateServer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createServer_backupRetentionCount :: Lens.Lens' CreateServer (Prelude.Maybe Prelude.Natural)
createServer_backupRetentionCount :: (Maybe Natural -> f (Maybe Natural))
-> CreateServer -> f CreateServer
createServer_backupRetentionCount = (CreateServer -> Maybe Natural)
-> (CreateServer -> Maybe Natural -> CreateServer)
-> Lens CreateServer CreateServer (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Maybe Natural
backupRetentionCount :: Maybe Natural
$sel:backupRetentionCount:CreateServer' :: CreateServer -> Maybe Natural
backupRetentionCount} -> Maybe Natural
backupRetentionCount) (\s :: CreateServer
s@CreateServer' {} Maybe Natural
a -> CreateServer
s {$sel:backupRetentionCount:CreateServer' :: Maybe Natural
backupRetentionCount = Maybe Natural
a} :: CreateServer)
createServer_engine :: Lens.Lens' CreateServer Prelude.Text
createServer_engine :: (Text -> f Text) -> CreateServer -> f CreateServer
createServer_engine = (CreateServer -> Text)
-> (CreateServer -> Text -> CreateServer)
-> Lens CreateServer CreateServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Text
engine :: Text
$sel:engine:CreateServer' :: CreateServer -> Text
engine} -> Text
engine) (\s :: CreateServer
s@CreateServer' {} Text
a -> CreateServer
s {$sel:engine:CreateServer' :: Text
engine = Text
a} :: CreateServer)
createServer_serverName :: Lens.Lens' CreateServer Prelude.Text
createServer_serverName :: (Text -> f Text) -> CreateServer -> f CreateServer
createServer_serverName = (CreateServer -> Text)
-> (CreateServer -> Text -> CreateServer)
-> Lens CreateServer CreateServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Text
serverName :: Text
$sel:serverName:CreateServer' :: CreateServer -> Text
serverName} -> Text
serverName) (\s :: CreateServer
s@CreateServer' {} Text
a -> CreateServer
s {$sel:serverName:CreateServer' :: Text
serverName = Text
a} :: CreateServer)
createServer_instanceProfileArn :: Lens.Lens' CreateServer Prelude.Text
createServer_instanceProfileArn :: (Text -> f Text) -> CreateServer -> f CreateServer
createServer_instanceProfileArn = (CreateServer -> Text)
-> (CreateServer -> Text -> CreateServer)
-> Lens CreateServer CreateServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Text
instanceProfileArn :: Text
$sel:instanceProfileArn:CreateServer' :: CreateServer -> Text
instanceProfileArn} -> Text
instanceProfileArn) (\s :: CreateServer
s@CreateServer' {} Text
a -> CreateServer
s {$sel:instanceProfileArn:CreateServer' :: Text
instanceProfileArn = Text
a} :: CreateServer)
createServer_instanceType :: Lens.Lens' CreateServer Prelude.Text
createServer_instanceType :: (Text -> f Text) -> CreateServer -> f CreateServer
createServer_instanceType = (CreateServer -> Text)
-> (CreateServer -> Text -> CreateServer)
-> Lens CreateServer CreateServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Text
instanceType :: Text
$sel:instanceType:CreateServer' :: CreateServer -> Text
instanceType} -> Text
instanceType) (\s :: CreateServer
s@CreateServer' {} Text
a -> CreateServer
s {$sel:instanceType:CreateServer' :: Text
instanceType = Text
a} :: CreateServer)
createServer_serviceRoleArn :: Lens.Lens' CreateServer Prelude.Text
createServer_serviceRoleArn :: (Text -> f Text) -> CreateServer -> f CreateServer
createServer_serviceRoleArn = (CreateServer -> Text)
-> (CreateServer -> Text -> CreateServer)
-> Lens CreateServer CreateServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServer' {Text
serviceRoleArn :: Text
$sel:serviceRoleArn:CreateServer' :: CreateServer -> Text
serviceRoleArn} -> Text
serviceRoleArn) (\s :: CreateServer
s@CreateServer' {} Text
a -> CreateServer
s {$sel:serviceRoleArn:CreateServer' :: Text
serviceRoleArn = Text
a} :: CreateServer)
instance Core.AWSRequest CreateServer where
type AWSResponse CreateServer = CreateServerResponse
request :: CreateServer -> Request CreateServer
request = Service -> CreateServer -> Request CreateServer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateServer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateServer)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateServer))
-> Logger
-> Service
-> Proxy CreateServer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateServer)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Server -> Int -> CreateServerResponse
CreateServerResponse'
(Maybe Server -> Int -> CreateServerResponse)
-> Either String (Maybe Server)
-> Either String (Int -> CreateServerResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Server)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Server")
Either String (Int -> CreateServerResponse)
-> Either String Int -> Either String CreateServerResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateServer
instance Prelude.NFData CreateServer
instance Core.ToHeaders CreateServer where
toHeaders :: CreateServer -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateServer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"OpsWorksCM_V2016_11_01.CreateServer" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateServer where
toJSON :: CreateServer -> Value
toJSON CreateServer' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [EngineAttribute]
Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Text
serviceRoleArn :: Text
instanceType :: Text
instanceProfileArn :: Text
serverName :: Text
engine :: Text
backupRetentionCount :: Maybe Natural
tags :: Maybe [Tag]
customCertificate :: Maybe Text
preferredBackupWindow :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
engineAttributes :: Maybe [EngineAttribute]
engineModel :: Maybe Text
customPrivateKey :: Maybe (Sensitive Text)
customDomain :: Maybe Text
backupId :: Maybe Text
keyPair :: Maybe Text
subnetIds :: Maybe [Text]
associatePublicIpAddress :: Maybe Bool
securityGroupIds :: Maybe [Text]
disableAutomatedBackup :: Maybe Bool
engineVersion :: Maybe Text
$sel:serviceRoleArn:CreateServer' :: CreateServer -> Text
$sel:instanceType:CreateServer' :: CreateServer -> Text
$sel:instanceProfileArn:CreateServer' :: CreateServer -> Text
$sel:serverName:CreateServer' :: CreateServer -> Text
$sel:engine:CreateServer' :: CreateServer -> Text
$sel:backupRetentionCount:CreateServer' :: CreateServer -> Maybe Natural
$sel:tags:CreateServer' :: CreateServer -> Maybe [Tag]
$sel:customCertificate:CreateServer' :: CreateServer -> Maybe Text
$sel:preferredBackupWindow:CreateServer' :: CreateServer -> Maybe Text
$sel:preferredMaintenanceWindow:CreateServer' :: CreateServer -> Maybe Text
$sel:engineAttributes:CreateServer' :: CreateServer -> Maybe [EngineAttribute]
$sel:engineModel:CreateServer' :: CreateServer -> Maybe Text
$sel:customPrivateKey:CreateServer' :: CreateServer -> Maybe (Sensitive Text)
$sel:customDomain:CreateServer' :: CreateServer -> Maybe Text
$sel:backupId:CreateServer' :: CreateServer -> Maybe Text
$sel:keyPair:CreateServer' :: CreateServer -> Maybe Text
$sel:subnetIds:CreateServer' :: CreateServer -> Maybe [Text]
$sel:associatePublicIpAddress:CreateServer' :: CreateServer -> Maybe Bool
$sel:securityGroupIds:CreateServer' :: CreateServer -> Maybe [Text]
$sel:disableAutomatedBackup:CreateServer' :: CreateServer -> Maybe Bool
$sel:engineVersion:CreateServer' :: CreateServer -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EngineVersion" 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
engineVersion,
(Text
"DisableAutomatedBackup" 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
disableAutomatedBackup,
(Text
"SecurityGroupIds" 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]
securityGroupIds,
(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
"SubnetIds" 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]
subnetIds,
(Text
"KeyPair" 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
keyPair,
(Text
"BackupId" 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
backupId,
(Text
"CustomDomain" 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
customDomain,
(Text
"CustomPrivateKey" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
customPrivateKey,
(Text
"EngineModel" 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
engineModel,
(Text
"EngineAttributes" Text -> [EngineAttribute] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([EngineAttribute] -> Pair)
-> Maybe [EngineAttribute] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EngineAttribute]
engineAttributes,
(Text
"PreferredMaintenanceWindow" 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
preferredMaintenanceWindow,
(Text
"PreferredBackupWindow" 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
preferredBackupWindow,
(Text
"CustomCertificate" 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
customCertificate,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Text
"BackupRetentionCount" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
backupRetentionCount,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Engine" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
engine),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serverName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"InstanceProfileArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceProfileArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"InstanceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ServiceRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceRoleArn)
]
)
instance Core.ToPath CreateServer where
toPath :: CreateServer -> ByteString
toPath = ByteString -> CreateServer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateServer where
toQuery :: CreateServer -> QueryString
toQuery = QueryString -> CreateServer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateServerResponse = CreateServerResponse'
{
CreateServerResponse -> Maybe Server
server :: Prelude.Maybe Server,
CreateServerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateServerResponse -> CreateServerResponse -> Bool
(CreateServerResponse -> CreateServerResponse -> Bool)
-> (CreateServerResponse -> CreateServerResponse -> Bool)
-> Eq CreateServerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateServerResponse -> CreateServerResponse -> Bool
$c/= :: CreateServerResponse -> CreateServerResponse -> Bool
== :: CreateServerResponse -> CreateServerResponse -> Bool
$c== :: CreateServerResponse -> CreateServerResponse -> Bool
Prelude.Eq, Int -> CreateServerResponse -> ShowS
[CreateServerResponse] -> ShowS
CreateServerResponse -> String
(Int -> CreateServerResponse -> ShowS)
-> (CreateServerResponse -> String)
-> ([CreateServerResponse] -> ShowS)
-> Show CreateServerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateServerResponse] -> ShowS
$cshowList :: [CreateServerResponse] -> ShowS
show :: CreateServerResponse -> String
$cshow :: CreateServerResponse -> String
showsPrec :: Int -> CreateServerResponse -> ShowS
$cshowsPrec :: Int -> CreateServerResponse -> ShowS
Prelude.Show, (forall x. CreateServerResponse -> Rep CreateServerResponse x)
-> (forall x. Rep CreateServerResponse x -> CreateServerResponse)
-> Generic CreateServerResponse
forall x. Rep CreateServerResponse x -> CreateServerResponse
forall x. CreateServerResponse -> Rep CreateServerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateServerResponse x -> CreateServerResponse
$cfrom :: forall x. CreateServerResponse -> Rep CreateServerResponse x
Prelude.Generic)
newCreateServerResponse ::
Prelude.Int ->
CreateServerResponse
newCreateServerResponse :: Int -> CreateServerResponse
newCreateServerResponse Int
pHttpStatus_ =
CreateServerResponse' :: Maybe Server -> Int -> CreateServerResponse
CreateServerResponse'
{ $sel:server:CreateServerResponse' :: Maybe Server
server = Maybe Server
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateServerResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createServerResponse_server :: Lens.Lens' CreateServerResponse (Prelude.Maybe Server)
createServerResponse_server :: (Maybe Server -> f (Maybe Server))
-> CreateServerResponse -> f CreateServerResponse
createServerResponse_server = (CreateServerResponse -> Maybe Server)
-> (CreateServerResponse -> Maybe Server -> CreateServerResponse)
-> Lens
CreateServerResponse
CreateServerResponse
(Maybe Server)
(Maybe Server)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServerResponse' {Maybe Server
server :: Maybe Server
$sel:server:CreateServerResponse' :: CreateServerResponse -> Maybe Server
server} -> Maybe Server
server) (\s :: CreateServerResponse
s@CreateServerResponse' {} Maybe Server
a -> CreateServerResponse
s {$sel:server:CreateServerResponse' :: Maybe Server
server = Maybe Server
a} :: CreateServerResponse)
createServerResponse_httpStatus :: Lens.Lens' CreateServerResponse Prelude.Int
createServerResponse_httpStatus :: (Int -> f Int) -> CreateServerResponse -> f CreateServerResponse
createServerResponse_httpStatus = (CreateServerResponse -> Int)
-> (CreateServerResponse -> Int -> CreateServerResponse)
-> Lens CreateServerResponse CreateServerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServerResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateServerResponse' :: CreateServerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateServerResponse
s@CreateServerResponse' {} Int
a -> CreateServerResponse
s {$sel:httpStatus:CreateServerResponse' :: Int
httpStatus = Int
a} :: CreateServerResponse)
instance Prelude.NFData CreateServerResponse