{-# 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.AppStream.CreateFleet
(
CreateFleet (..),
newCreateFleet,
createFleet_domainJoinInfo,
createFleet_iamRoleArn,
createFleet_disconnectTimeoutInSeconds,
createFleet_maxUserDurationInSeconds,
createFleet_idleDisconnectTimeoutInSeconds,
createFleet_fleetType,
createFleet_vpcConfig,
createFleet_imageArn,
createFleet_displayName,
createFleet_enableDefaultInternetAccess,
createFleet_imageName,
createFleet_description,
createFleet_streamView,
createFleet_tags,
createFleet_name,
createFleet_instanceType,
createFleet_computeCapacity,
CreateFleetResponse (..),
newCreateFleetResponse,
createFleetResponse_fleet,
createFleetResponse_httpStatus,
)
where
import Amazonka.AppStream.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateFleet = CreateFleet'
{
CreateFleet -> Maybe DomainJoinInfo
domainJoinInfo :: Prelude.Maybe DomainJoinInfo,
CreateFleet -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
CreateFleet -> Maybe Int
disconnectTimeoutInSeconds :: Prelude.Maybe Prelude.Int,
CreateFleet -> Maybe Int
maxUserDurationInSeconds :: Prelude.Maybe Prelude.Int,
CreateFleet -> Maybe Int
idleDisconnectTimeoutInSeconds :: Prelude.Maybe Prelude.Int,
CreateFleet -> Maybe FleetType
fleetType :: Prelude.Maybe FleetType,
CreateFleet -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
CreateFleet -> Maybe Text
imageArn :: Prelude.Maybe Prelude.Text,
CreateFleet -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
CreateFleet -> Maybe Bool
enableDefaultInternetAccess :: Prelude.Maybe Prelude.Bool,
CreateFleet -> Maybe Text
imageName :: Prelude.Maybe Prelude.Text,
CreateFleet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateFleet -> Maybe StreamView
streamView :: Prelude.Maybe StreamView,
CreateFleet -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateFleet -> Text
name :: Prelude.Text,
CreateFleet -> Text
instanceType :: Prelude.Text,
CreateFleet -> ComputeCapacity
computeCapacity :: ComputeCapacity
}
deriving (CreateFleet -> CreateFleet -> Bool
(CreateFleet -> CreateFleet -> Bool)
-> (CreateFleet -> CreateFleet -> Bool) -> Eq CreateFleet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFleet -> CreateFleet -> Bool
$c/= :: CreateFleet -> CreateFleet -> Bool
== :: CreateFleet -> CreateFleet -> Bool
$c== :: CreateFleet -> CreateFleet -> Bool
Prelude.Eq, ReadPrec [CreateFleet]
ReadPrec CreateFleet
Int -> ReadS CreateFleet
ReadS [CreateFleet]
(Int -> ReadS CreateFleet)
-> ReadS [CreateFleet]
-> ReadPrec CreateFleet
-> ReadPrec [CreateFleet]
-> Read CreateFleet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFleet]
$creadListPrec :: ReadPrec [CreateFleet]
readPrec :: ReadPrec CreateFleet
$creadPrec :: ReadPrec CreateFleet
readList :: ReadS [CreateFleet]
$creadList :: ReadS [CreateFleet]
readsPrec :: Int -> ReadS CreateFleet
$creadsPrec :: Int -> ReadS CreateFleet
Prelude.Read, Int -> CreateFleet -> ShowS
[CreateFleet] -> ShowS
CreateFleet -> String
(Int -> CreateFleet -> ShowS)
-> (CreateFleet -> String)
-> ([CreateFleet] -> ShowS)
-> Show CreateFleet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFleet] -> ShowS
$cshowList :: [CreateFleet] -> ShowS
show :: CreateFleet -> String
$cshow :: CreateFleet -> String
showsPrec :: Int -> CreateFleet -> ShowS
$cshowsPrec :: Int -> CreateFleet -> ShowS
Prelude.Show, (forall x. CreateFleet -> Rep CreateFleet x)
-> (forall x. Rep CreateFleet x -> CreateFleet)
-> Generic CreateFleet
forall x. Rep CreateFleet x -> CreateFleet
forall x. CreateFleet -> Rep CreateFleet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFleet x -> CreateFleet
$cfrom :: forall x. CreateFleet -> Rep CreateFleet x
Prelude.Generic)
newCreateFleet ::
Prelude.Text ->
Prelude.Text ->
ComputeCapacity ->
CreateFleet
newCreateFleet :: Text -> Text -> ComputeCapacity -> CreateFleet
newCreateFleet
Text
pName_
Text
pInstanceType_
ComputeCapacity
pComputeCapacity_ =
CreateFleet' :: Maybe DomainJoinInfo
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe FleetType
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StreamView
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ComputeCapacity
-> CreateFleet
CreateFleet'
{ $sel:domainJoinInfo:CreateFleet' :: Maybe DomainJoinInfo
domainJoinInfo = Maybe DomainJoinInfo
forall a. Maybe a
Prelude.Nothing,
$sel:iamRoleArn:CreateFleet' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:disconnectTimeoutInSeconds:CreateFleet' :: Maybe Int
disconnectTimeoutInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:maxUserDurationInSeconds:CreateFleet' :: Maybe Int
maxUserDurationInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:idleDisconnectTimeoutInSeconds:CreateFleet' :: Maybe Int
idleDisconnectTimeoutInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:fleetType:CreateFleet' :: Maybe FleetType
fleetType = Maybe FleetType
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:CreateFleet' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:imageArn:CreateFleet' :: Maybe Text
imageArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:displayName:CreateFleet' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableDefaultInternetAccess:CreateFleet' :: Maybe Bool
enableDefaultInternetAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:imageName:CreateFleet' :: Maybe Text
imageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateFleet' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:streamView:CreateFleet' :: Maybe StreamView
streamView = Maybe StreamView
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateFleet' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateFleet' :: Text
name = Text
pName_,
$sel:instanceType:CreateFleet' :: Text
instanceType = Text
pInstanceType_,
$sel:computeCapacity:CreateFleet' :: ComputeCapacity
computeCapacity = ComputeCapacity
pComputeCapacity_
}
createFleet_domainJoinInfo :: Lens.Lens' CreateFleet (Prelude.Maybe DomainJoinInfo)
createFleet_domainJoinInfo :: (Maybe DomainJoinInfo -> f (Maybe DomainJoinInfo))
-> CreateFleet -> f CreateFleet
createFleet_domainJoinInfo = (CreateFleet -> Maybe DomainJoinInfo)
-> (CreateFleet -> Maybe DomainJoinInfo -> CreateFleet)
-> Lens
CreateFleet
CreateFleet
(Maybe DomainJoinInfo)
(Maybe DomainJoinInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe DomainJoinInfo
domainJoinInfo :: Maybe DomainJoinInfo
$sel:domainJoinInfo:CreateFleet' :: CreateFleet -> Maybe DomainJoinInfo
domainJoinInfo} -> Maybe DomainJoinInfo
domainJoinInfo) (\s :: CreateFleet
s@CreateFleet' {} Maybe DomainJoinInfo
a -> CreateFleet
s {$sel:domainJoinInfo:CreateFleet' :: Maybe DomainJoinInfo
domainJoinInfo = Maybe DomainJoinInfo
a} :: CreateFleet)
createFleet_iamRoleArn :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Text)
createFleet_iamRoleArn :: (Maybe Text -> f (Maybe Text)) -> CreateFleet -> f CreateFleet
createFleet_iamRoleArn = (CreateFleet -> Maybe Text)
-> (CreateFleet -> Maybe Text -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:CreateFleet' :: CreateFleet -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: CreateFleet
s@CreateFleet' {} Maybe Text
a -> CreateFleet
s {$sel:iamRoleArn:CreateFleet' :: Maybe Text
iamRoleArn = Maybe Text
a} :: CreateFleet)
createFleet_disconnectTimeoutInSeconds :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Int)
createFleet_disconnectTimeoutInSeconds :: (Maybe Int -> f (Maybe Int)) -> CreateFleet -> f CreateFleet
createFleet_disconnectTimeoutInSeconds = (CreateFleet -> Maybe Int)
-> (CreateFleet -> Maybe Int -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Int
disconnectTimeoutInSeconds :: Maybe Int
$sel:disconnectTimeoutInSeconds:CreateFleet' :: CreateFleet -> Maybe Int
disconnectTimeoutInSeconds} -> Maybe Int
disconnectTimeoutInSeconds) (\s :: CreateFleet
s@CreateFleet' {} Maybe Int
a -> CreateFleet
s {$sel:disconnectTimeoutInSeconds:CreateFleet' :: Maybe Int
disconnectTimeoutInSeconds = Maybe Int
a} :: CreateFleet)
createFleet_maxUserDurationInSeconds :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Int)
createFleet_maxUserDurationInSeconds :: (Maybe Int -> f (Maybe Int)) -> CreateFleet -> f CreateFleet
createFleet_maxUserDurationInSeconds = (CreateFleet -> Maybe Int)
-> (CreateFleet -> Maybe Int -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Int
maxUserDurationInSeconds :: Maybe Int
$sel:maxUserDurationInSeconds:CreateFleet' :: CreateFleet -> Maybe Int
maxUserDurationInSeconds} -> Maybe Int
maxUserDurationInSeconds) (\s :: CreateFleet
s@CreateFleet' {} Maybe Int
a -> CreateFleet
s {$sel:maxUserDurationInSeconds:CreateFleet' :: Maybe Int
maxUserDurationInSeconds = Maybe Int
a} :: CreateFleet)
createFleet_idleDisconnectTimeoutInSeconds :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Int)
createFleet_idleDisconnectTimeoutInSeconds :: (Maybe Int -> f (Maybe Int)) -> CreateFleet -> f CreateFleet
createFleet_idleDisconnectTimeoutInSeconds = (CreateFleet -> Maybe Int)
-> (CreateFleet -> Maybe Int -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Int
idleDisconnectTimeoutInSeconds :: Maybe Int
$sel:idleDisconnectTimeoutInSeconds:CreateFleet' :: CreateFleet -> Maybe Int
idleDisconnectTimeoutInSeconds} -> Maybe Int
idleDisconnectTimeoutInSeconds) (\s :: CreateFleet
s@CreateFleet' {} Maybe Int
a -> CreateFleet
s {$sel:idleDisconnectTimeoutInSeconds:CreateFleet' :: Maybe Int
idleDisconnectTimeoutInSeconds = Maybe Int
a} :: CreateFleet)
createFleet_fleetType :: Lens.Lens' CreateFleet (Prelude.Maybe FleetType)
createFleet_fleetType :: (Maybe FleetType -> f (Maybe FleetType))
-> CreateFleet -> f CreateFleet
createFleet_fleetType = (CreateFleet -> Maybe FleetType)
-> (CreateFleet -> Maybe FleetType -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe FleetType) (Maybe FleetType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe FleetType
fleetType :: Maybe FleetType
$sel:fleetType:CreateFleet' :: CreateFleet -> Maybe FleetType
fleetType} -> Maybe FleetType
fleetType) (\s :: CreateFleet
s@CreateFleet' {} Maybe FleetType
a -> CreateFleet
s {$sel:fleetType:CreateFleet' :: Maybe FleetType
fleetType = Maybe FleetType
a} :: CreateFleet)
createFleet_vpcConfig :: Lens.Lens' CreateFleet (Prelude.Maybe VpcConfig)
createFleet_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> CreateFleet -> f CreateFleet
createFleet_vpcConfig = (CreateFleet -> Maybe VpcConfig)
-> (CreateFleet -> Maybe VpcConfig -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe VpcConfig) (Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:CreateFleet' :: CreateFleet -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: CreateFleet
s@CreateFleet' {} Maybe VpcConfig
a -> CreateFleet
s {$sel:vpcConfig:CreateFleet' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: CreateFleet)
createFleet_imageArn :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Text)
createFleet_imageArn :: (Maybe Text -> f (Maybe Text)) -> CreateFleet -> f CreateFleet
createFleet_imageArn = (CreateFleet -> Maybe Text)
-> (CreateFleet -> Maybe Text -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Text
imageArn :: Maybe Text
$sel:imageArn:CreateFleet' :: CreateFleet -> Maybe Text
imageArn} -> Maybe Text
imageArn) (\s :: CreateFleet
s@CreateFleet' {} Maybe Text
a -> CreateFleet
s {$sel:imageArn:CreateFleet' :: Maybe Text
imageArn = Maybe Text
a} :: CreateFleet)
createFleet_displayName :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Text)
createFleet_displayName :: (Maybe Text -> f (Maybe Text)) -> CreateFleet -> f CreateFleet
createFleet_displayName = (CreateFleet -> Maybe Text)
-> (CreateFleet -> Maybe Text -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Text
displayName :: Maybe Text
$sel:displayName:CreateFleet' :: CreateFleet -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: CreateFleet
s@CreateFleet' {} Maybe Text
a -> CreateFleet
s {$sel:displayName:CreateFleet' :: Maybe Text
displayName = Maybe Text
a} :: CreateFleet)
createFleet_enableDefaultInternetAccess :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Bool)
createFleet_enableDefaultInternetAccess :: (Maybe Bool -> f (Maybe Bool)) -> CreateFleet -> f CreateFleet
createFleet_enableDefaultInternetAccess = (CreateFleet -> Maybe Bool)
-> (CreateFleet -> Maybe Bool -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Bool
enableDefaultInternetAccess :: Maybe Bool
$sel:enableDefaultInternetAccess:CreateFleet' :: CreateFleet -> Maybe Bool
enableDefaultInternetAccess} -> Maybe Bool
enableDefaultInternetAccess) (\s :: CreateFleet
s@CreateFleet' {} Maybe Bool
a -> CreateFleet
s {$sel:enableDefaultInternetAccess:CreateFleet' :: Maybe Bool
enableDefaultInternetAccess = Maybe Bool
a} :: CreateFleet)
createFleet_imageName :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Text)
createFleet_imageName :: (Maybe Text -> f (Maybe Text)) -> CreateFleet -> f CreateFleet
createFleet_imageName = (CreateFleet -> Maybe Text)
-> (CreateFleet -> Maybe Text -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Text
imageName :: Maybe Text
$sel:imageName:CreateFleet' :: CreateFleet -> Maybe Text
imageName} -> Maybe Text
imageName) (\s :: CreateFleet
s@CreateFleet' {} Maybe Text
a -> CreateFleet
s {$sel:imageName:CreateFleet' :: Maybe Text
imageName = Maybe Text
a} :: CreateFleet)
createFleet_description :: Lens.Lens' CreateFleet (Prelude.Maybe Prelude.Text)
createFleet_description :: (Maybe Text -> f (Maybe Text)) -> CreateFleet -> f CreateFleet
createFleet_description = (CreateFleet -> Maybe Text)
-> (CreateFleet -> Maybe Text -> CreateFleet)
-> Lens CreateFleet CreateFleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe Text
description :: Maybe Text
$sel:description:CreateFleet' :: CreateFleet -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateFleet
s@CreateFleet' {} Maybe Text
a -> CreateFleet
s {$sel:description:CreateFleet' :: Maybe Text
description = Maybe Text
a} :: CreateFleet)
createFleet_streamView :: Lens.Lens' CreateFleet (Prelude.Maybe StreamView)
createFleet_streamView :: (Maybe StreamView -> f (Maybe StreamView))
-> CreateFleet -> f CreateFleet
createFleet_streamView = (CreateFleet -> Maybe StreamView)
-> (CreateFleet -> Maybe StreamView -> CreateFleet)
-> Lens
CreateFleet CreateFleet (Maybe StreamView) (Maybe StreamView)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe StreamView
streamView :: Maybe StreamView
$sel:streamView:CreateFleet' :: CreateFleet -> Maybe StreamView
streamView} -> Maybe StreamView
streamView) (\s :: CreateFleet
s@CreateFleet' {} Maybe StreamView
a -> CreateFleet
s {$sel:streamView:CreateFleet' :: Maybe StreamView
streamView = Maybe StreamView
a} :: CreateFleet)
createFleet_tags :: Lens.Lens' CreateFleet (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createFleet_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFleet -> f CreateFleet
createFleet_tags = (CreateFleet -> Maybe (HashMap Text Text))
-> (CreateFleet -> Maybe (HashMap Text Text) -> CreateFleet)
-> Lens
CreateFleet
CreateFleet
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateFleet' :: CreateFleet -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateFleet
s@CreateFleet' {} Maybe (HashMap Text Text)
a -> CreateFleet
s {$sel:tags:CreateFleet' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateFleet) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFleet -> f CreateFleet)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFleet
-> f CreateFleet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFleet_name :: Lens.Lens' CreateFleet Prelude.Text
createFleet_name :: (Text -> f Text) -> CreateFleet -> f CreateFleet
createFleet_name = (CreateFleet -> Text)
-> (CreateFleet -> Text -> CreateFleet)
-> Lens CreateFleet CreateFleet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Text
name :: Text
$sel:name:CreateFleet' :: CreateFleet -> Text
name} -> Text
name) (\s :: CreateFleet
s@CreateFleet' {} Text
a -> CreateFleet
s {$sel:name:CreateFleet' :: Text
name = Text
a} :: CreateFleet)
createFleet_instanceType :: Lens.Lens' CreateFleet Prelude.Text
createFleet_instanceType :: (Text -> f Text) -> CreateFleet -> f CreateFleet
createFleet_instanceType = (CreateFleet -> Text)
-> (CreateFleet -> Text -> CreateFleet)
-> Lens CreateFleet CreateFleet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {Text
instanceType :: Text
$sel:instanceType:CreateFleet' :: CreateFleet -> Text
instanceType} -> Text
instanceType) (\s :: CreateFleet
s@CreateFleet' {} Text
a -> CreateFleet
s {$sel:instanceType:CreateFleet' :: Text
instanceType = Text
a} :: CreateFleet)
createFleet_computeCapacity :: Lens.Lens' CreateFleet ComputeCapacity
createFleet_computeCapacity :: (ComputeCapacity -> f ComputeCapacity)
-> CreateFleet -> f CreateFleet
createFleet_computeCapacity = (CreateFleet -> ComputeCapacity)
-> (CreateFleet -> ComputeCapacity -> CreateFleet)
-> Lens CreateFleet CreateFleet ComputeCapacity ComputeCapacity
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleet' {ComputeCapacity
computeCapacity :: ComputeCapacity
$sel:computeCapacity:CreateFleet' :: CreateFleet -> ComputeCapacity
computeCapacity} -> ComputeCapacity
computeCapacity) (\s :: CreateFleet
s@CreateFleet' {} ComputeCapacity
a -> CreateFleet
s {$sel:computeCapacity:CreateFleet' :: ComputeCapacity
computeCapacity = ComputeCapacity
a} :: CreateFleet)
instance Core.AWSRequest CreateFleet where
type AWSResponse CreateFleet = CreateFleetResponse
request :: CreateFleet -> Request CreateFleet
request = Service -> CreateFleet -> Request CreateFleet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateFleet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFleet)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateFleet))
-> Logger
-> Service
-> Proxy CreateFleet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFleet)))
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 Fleet -> Int -> CreateFleetResponse
CreateFleetResponse'
(Maybe Fleet -> Int -> CreateFleetResponse)
-> Either String (Maybe Fleet)
-> Either String (Int -> CreateFleetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Fleet)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Fleet")
Either String (Int -> CreateFleetResponse)
-> Either String Int -> Either String CreateFleetResponse
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 CreateFleet
instance Prelude.NFData CreateFleet
instance Core.ToHeaders CreateFleet where
toHeaders :: CreateFleet -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateFleet -> 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
"PhotonAdminProxyService.CreateFleet" ::
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 CreateFleet where
toJSON :: CreateFleet -> Value
toJSON CreateFleet' {Maybe Bool
Maybe Int
Maybe Text
Maybe (HashMap Text Text)
Maybe DomainJoinInfo
Maybe FleetType
Maybe StreamView
Maybe VpcConfig
Text
ComputeCapacity
computeCapacity :: ComputeCapacity
instanceType :: Text
name :: Text
tags :: Maybe (HashMap Text Text)
streamView :: Maybe StreamView
description :: Maybe Text
imageName :: Maybe Text
enableDefaultInternetAccess :: Maybe Bool
displayName :: Maybe Text
imageArn :: Maybe Text
vpcConfig :: Maybe VpcConfig
fleetType :: Maybe FleetType
idleDisconnectTimeoutInSeconds :: Maybe Int
maxUserDurationInSeconds :: Maybe Int
disconnectTimeoutInSeconds :: Maybe Int
iamRoleArn :: Maybe Text
domainJoinInfo :: Maybe DomainJoinInfo
$sel:computeCapacity:CreateFleet' :: CreateFleet -> ComputeCapacity
$sel:instanceType:CreateFleet' :: CreateFleet -> Text
$sel:name:CreateFleet' :: CreateFleet -> Text
$sel:tags:CreateFleet' :: CreateFleet -> Maybe (HashMap Text Text)
$sel:streamView:CreateFleet' :: CreateFleet -> Maybe StreamView
$sel:description:CreateFleet' :: CreateFleet -> Maybe Text
$sel:imageName:CreateFleet' :: CreateFleet -> Maybe Text
$sel:enableDefaultInternetAccess:CreateFleet' :: CreateFleet -> Maybe Bool
$sel:displayName:CreateFleet' :: CreateFleet -> Maybe Text
$sel:imageArn:CreateFleet' :: CreateFleet -> Maybe Text
$sel:vpcConfig:CreateFleet' :: CreateFleet -> Maybe VpcConfig
$sel:fleetType:CreateFleet' :: CreateFleet -> Maybe FleetType
$sel:idleDisconnectTimeoutInSeconds:CreateFleet' :: CreateFleet -> Maybe Int
$sel:maxUserDurationInSeconds:CreateFleet' :: CreateFleet -> Maybe Int
$sel:disconnectTimeoutInSeconds:CreateFleet' :: CreateFleet -> Maybe Int
$sel:iamRoleArn:CreateFleet' :: CreateFleet -> Maybe Text
$sel:domainJoinInfo:CreateFleet' :: CreateFleet -> Maybe DomainJoinInfo
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DomainJoinInfo" Text -> DomainJoinInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DomainJoinInfo -> Pair) -> Maybe DomainJoinInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DomainJoinInfo
domainJoinInfo,
(Text
"IamRoleArn" 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
iamRoleArn,
(Text
"DisconnectTimeoutInSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
disconnectTimeoutInSeconds,
(Text
"MaxUserDurationInSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxUserDurationInSeconds,
(Text
"IdleDisconnectTimeoutInSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
idleDisconnectTimeoutInSeconds,
(Text
"FleetType" Text -> FleetType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (FleetType -> Pair) -> Maybe FleetType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FleetType
fleetType,
(Text
"VpcConfig" Text -> VpcConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VpcConfig -> Pair) -> Maybe VpcConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
(Text
"ImageArn" 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
imageArn,
(Text
"DisplayName" 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
displayName,
(Text
"EnableDefaultInternetAccess" 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
enableDefaultInternetAccess,
(Text
"ImageName" 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
imageName,
(Text
"Description" 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
description,
(Text
"StreamView" Text -> StreamView -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (StreamView -> Pair) -> Maybe StreamView -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StreamView
streamView,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
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
"ComputeCapacity" Text -> ComputeCapacity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ComputeCapacity
computeCapacity)
]
)
instance Core.ToPath CreateFleet where
toPath :: CreateFleet -> ByteString
toPath = ByteString -> CreateFleet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateFleet where
toQuery :: CreateFleet -> QueryString
toQuery = QueryString -> CreateFleet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateFleetResponse = CreateFleetResponse'
{
CreateFleetResponse -> Maybe Fleet
fleet :: Prelude.Maybe Fleet,
CreateFleetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateFleetResponse -> CreateFleetResponse -> Bool
(CreateFleetResponse -> CreateFleetResponse -> Bool)
-> (CreateFleetResponse -> CreateFleetResponse -> Bool)
-> Eq CreateFleetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFleetResponse -> CreateFleetResponse -> Bool
$c/= :: CreateFleetResponse -> CreateFleetResponse -> Bool
== :: CreateFleetResponse -> CreateFleetResponse -> Bool
$c== :: CreateFleetResponse -> CreateFleetResponse -> Bool
Prelude.Eq, ReadPrec [CreateFleetResponse]
ReadPrec CreateFleetResponse
Int -> ReadS CreateFleetResponse
ReadS [CreateFleetResponse]
(Int -> ReadS CreateFleetResponse)
-> ReadS [CreateFleetResponse]
-> ReadPrec CreateFleetResponse
-> ReadPrec [CreateFleetResponse]
-> Read CreateFleetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFleetResponse]
$creadListPrec :: ReadPrec [CreateFleetResponse]
readPrec :: ReadPrec CreateFleetResponse
$creadPrec :: ReadPrec CreateFleetResponse
readList :: ReadS [CreateFleetResponse]
$creadList :: ReadS [CreateFleetResponse]
readsPrec :: Int -> ReadS CreateFleetResponse
$creadsPrec :: Int -> ReadS CreateFleetResponse
Prelude.Read, Int -> CreateFleetResponse -> ShowS
[CreateFleetResponse] -> ShowS
CreateFleetResponse -> String
(Int -> CreateFleetResponse -> ShowS)
-> (CreateFleetResponse -> String)
-> ([CreateFleetResponse] -> ShowS)
-> Show CreateFleetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFleetResponse] -> ShowS
$cshowList :: [CreateFleetResponse] -> ShowS
show :: CreateFleetResponse -> String
$cshow :: CreateFleetResponse -> String
showsPrec :: Int -> CreateFleetResponse -> ShowS
$cshowsPrec :: Int -> CreateFleetResponse -> ShowS
Prelude.Show, (forall x. CreateFleetResponse -> Rep CreateFleetResponse x)
-> (forall x. Rep CreateFleetResponse x -> CreateFleetResponse)
-> Generic CreateFleetResponse
forall x. Rep CreateFleetResponse x -> CreateFleetResponse
forall x. CreateFleetResponse -> Rep CreateFleetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFleetResponse x -> CreateFleetResponse
$cfrom :: forall x. CreateFleetResponse -> Rep CreateFleetResponse x
Prelude.Generic)
newCreateFleetResponse ::
Prelude.Int ->
CreateFleetResponse
newCreateFleetResponse :: Int -> CreateFleetResponse
newCreateFleetResponse Int
pHttpStatus_ =
CreateFleetResponse' :: Maybe Fleet -> Int -> CreateFleetResponse
CreateFleetResponse'
{ $sel:fleet:CreateFleetResponse' :: Maybe Fleet
fleet = Maybe Fleet
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateFleetResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createFleetResponse_fleet :: Lens.Lens' CreateFleetResponse (Prelude.Maybe Fleet)
createFleetResponse_fleet :: (Maybe Fleet -> f (Maybe Fleet))
-> CreateFleetResponse -> f CreateFleetResponse
createFleetResponse_fleet = (CreateFleetResponse -> Maybe Fleet)
-> (CreateFleetResponse -> Maybe Fleet -> CreateFleetResponse)
-> Lens
CreateFleetResponse CreateFleetResponse (Maybe Fleet) (Maybe Fleet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetResponse' {Maybe Fleet
fleet :: Maybe Fleet
$sel:fleet:CreateFleetResponse' :: CreateFleetResponse -> Maybe Fleet
fleet} -> Maybe Fleet
fleet) (\s :: CreateFleetResponse
s@CreateFleetResponse' {} Maybe Fleet
a -> CreateFleetResponse
s {$sel:fleet:CreateFleetResponse' :: Maybe Fleet
fleet = Maybe Fleet
a} :: CreateFleetResponse)
createFleetResponse_httpStatus :: Lens.Lens' CreateFleetResponse Prelude.Int
createFleetResponse_httpStatus :: (Int -> f Int) -> CreateFleetResponse -> f CreateFleetResponse
createFleetResponse_httpStatus = (CreateFleetResponse -> Int)
-> (CreateFleetResponse -> Int -> CreateFleetResponse)
-> Lens CreateFleetResponse CreateFleetResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFleetResponse' :: CreateFleetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFleetResponse
s@CreateFleetResponse' {} Int
a -> CreateFleetResponse
s {$sel:httpStatus:CreateFleetResponse' :: Int
httpStatus = Int
a} :: CreateFleetResponse)
instance Prelude.NFData CreateFleetResponse