{-# 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.Cloud9.CreateEnvironmentEC2
(
CreateEnvironmentEC2 (..),
newCreateEnvironmentEC2,
createEnvironmentEC2_automaticStopTimeMinutes,
createEnvironmentEC2_clientRequestToken,
createEnvironmentEC2_connectionType,
createEnvironmentEC2_description,
createEnvironmentEC2_dryRun,
createEnvironmentEC2_imageId,
createEnvironmentEC2_ownerArn,
createEnvironmentEC2_subnetId,
createEnvironmentEC2_tags,
createEnvironmentEC2_name,
createEnvironmentEC2_instanceType,
CreateEnvironmentEC2Response (..),
newCreateEnvironmentEC2Response,
createEnvironmentEC2Response_environmentId,
createEnvironmentEC2Response_httpStatus,
)
where
import Amazonka.Cloud9.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateEnvironmentEC2 = CreateEnvironmentEC2'
{
CreateEnvironmentEC2 -> Maybe Int
automaticStopTimeMinutes :: Prelude.Maybe Prelude.Int,
CreateEnvironmentEC2 -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2 -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
CreateEnvironmentEC2 -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
CreateEnvironmentEC2 -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
CreateEnvironmentEC2 -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2 -> Maybe Text
ownerArn :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2 -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
tags :: Prelude.Maybe (Data.Sensitive [Data.Sensitive Tag]),
CreateEnvironmentEC2 -> Text
name :: Prelude.Text,
CreateEnvironmentEC2 -> Text
instanceType :: Prelude.Text
}
deriving (CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
$c/= :: CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
== :: CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
$c== :: CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
Prelude.Eq, Int -> CreateEnvironmentEC2 -> ShowS
[CreateEnvironmentEC2] -> ShowS
CreateEnvironmentEC2 -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEnvironmentEC2] -> ShowS
$cshowList :: [CreateEnvironmentEC2] -> ShowS
show :: CreateEnvironmentEC2 -> String
$cshow :: CreateEnvironmentEC2 -> String
showsPrec :: Int -> CreateEnvironmentEC2 -> ShowS
$cshowsPrec :: Int -> CreateEnvironmentEC2 -> ShowS
Prelude.Show, forall x. Rep CreateEnvironmentEC2 x -> CreateEnvironmentEC2
forall x. CreateEnvironmentEC2 -> Rep CreateEnvironmentEC2 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEnvironmentEC2 x -> CreateEnvironmentEC2
$cfrom :: forall x. CreateEnvironmentEC2 -> Rep CreateEnvironmentEC2 x
Prelude.Generic)
newCreateEnvironmentEC2 ::
Prelude.Text ->
Prelude.Text ->
CreateEnvironmentEC2
newCreateEnvironmentEC2 :: Text -> Text -> CreateEnvironmentEC2
newCreateEnvironmentEC2 Text
pName_ Text
pInstanceType_ =
CreateEnvironmentEC2'
{ $sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: Maybe Int
automaticStopTimeMinutes =
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateEnvironmentEC2' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
$sel:connectionType:CreateEnvironmentEC2' :: Maybe ConnectionType
connectionType = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateEnvironmentEC2' :: Maybe (Sensitive Text)
description = forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:CreateEnvironmentEC2' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:imageId:CreateEnvironmentEC2' :: Maybe Text
imageId = forall a. Maybe a
Prelude.Nothing,
$sel:ownerArn:CreateEnvironmentEC2' :: Maybe Text
ownerArn = forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:CreateEnvironmentEC2' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateEnvironmentEC2' :: Maybe (Sensitive [Sensitive Tag])
tags = forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateEnvironmentEC2' :: Text
name = Text
pName_,
$sel:instanceType:CreateEnvironmentEC2' :: Text
instanceType = Text
pInstanceType_
}
createEnvironmentEC2_automaticStopTimeMinutes :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Int)
createEnvironmentEC2_automaticStopTimeMinutes :: Lens' CreateEnvironmentEC2 (Maybe Int)
createEnvironmentEC2_automaticStopTimeMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Int
automaticStopTimeMinutes :: Maybe Int
$sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Int
automaticStopTimeMinutes} -> Maybe Int
automaticStopTimeMinutes) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Int
a -> CreateEnvironmentEC2
s {$sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: Maybe Int
automaticStopTimeMinutes = Maybe Int
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_clientRequestToken :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_clientRequestToken :: Lens' CreateEnvironmentEC2 (Maybe Text)
createEnvironmentEC2_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Text
a -> CreateEnvironmentEC2
s {$sel:clientRequestToken:CreateEnvironmentEC2' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_connectionType :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe ConnectionType)
createEnvironmentEC2_connectionType :: Lens' CreateEnvironmentEC2 (Maybe ConnectionType)
createEnvironmentEC2_connectionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe ConnectionType
a -> CreateEnvironmentEC2
s {$sel:connectionType:CreateEnvironmentEC2' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_description :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_description :: Lens' CreateEnvironmentEC2 (Maybe Text)
createEnvironmentEC2_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe (Sensitive Text)
a -> CreateEnvironmentEC2
s {$sel:description:CreateEnvironmentEC2' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: CreateEnvironmentEC2) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
createEnvironmentEC2_dryRun :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Bool)
createEnvironmentEC2_dryRun :: Lens' CreateEnvironmentEC2 (Maybe Bool)
createEnvironmentEC2_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Bool
a -> CreateEnvironmentEC2
s {$sel:dryRun:CreateEnvironmentEC2' :: Maybe Bool
dryRun = Maybe Bool
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_imageId :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_imageId :: Lens' CreateEnvironmentEC2 (Maybe Text)
createEnvironmentEC2_imageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Text
imageId :: Maybe Text
$sel:imageId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Text
a -> CreateEnvironmentEC2
s {$sel:imageId:CreateEnvironmentEC2' :: Maybe Text
imageId = Maybe Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_ownerArn :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_ownerArn :: Lens' CreateEnvironmentEC2 (Maybe Text)
createEnvironmentEC2_ownerArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Text
ownerArn :: Maybe Text
$sel:ownerArn:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
ownerArn} -> Maybe Text
ownerArn) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Text
a -> CreateEnvironmentEC2
s {$sel:ownerArn:CreateEnvironmentEC2' :: Maybe Text
ownerArn = Maybe Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_subnetId :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_subnetId :: Lens' CreateEnvironmentEC2 (Maybe Text)
createEnvironmentEC2_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Text
a -> CreateEnvironmentEC2
s {$sel:subnetId:CreateEnvironmentEC2' :: Maybe Text
subnetId = Maybe Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_tags :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe [Tag])
createEnvironmentEC2_tags :: Lens' CreateEnvironmentEC2 (Maybe [Tag])
createEnvironmentEC2_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe (Sensitive [Sensitive Tag])
tags :: Maybe (Sensitive [Sensitive Tag])
$sel:tags:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
tags} -> Maybe (Sensitive [Sensitive Tag])
tags) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe (Sensitive [Sensitive Tag])
a -> CreateEnvironmentEC2
s {$sel:tags:CreateEnvironmentEC2' :: Maybe (Sensitive [Sensitive Tag])
tags = Maybe (Sensitive [Sensitive Tag])
a} :: CreateEnvironmentEC2) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
createEnvironmentEC2_name :: Lens.Lens' CreateEnvironmentEC2 Prelude.Text
createEnvironmentEC2_name :: Lens' CreateEnvironmentEC2 Text
createEnvironmentEC2_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Text
name :: Text
$sel:name:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
name} -> Text
name) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Text
a -> CreateEnvironmentEC2
s {$sel:name:CreateEnvironmentEC2' :: Text
name = Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_instanceType :: Lens.Lens' CreateEnvironmentEC2 Prelude.Text
createEnvironmentEC2_instanceType :: Lens' CreateEnvironmentEC2 Text
createEnvironmentEC2_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Text
instanceType :: Text
$sel:instanceType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
instanceType} -> Text
instanceType) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Text
a -> CreateEnvironmentEC2
s {$sel:instanceType:CreateEnvironmentEC2' :: Text
instanceType = Text
a} :: CreateEnvironmentEC2)
instance Core.AWSRequest CreateEnvironmentEC2 where
type
AWSResponse CreateEnvironmentEC2 =
CreateEnvironmentEC2Response
request :: (Service -> Service)
-> CreateEnvironmentEC2 -> Request CreateEnvironmentEC2
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateEnvironmentEC2
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEnvironmentEC2)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateEnvironmentEC2Response
CreateEnvironmentEC2Response'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"environmentId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateEnvironmentEC2 where
hashWithSalt :: Int -> CreateEnvironmentEC2 -> Int
hashWithSalt Int
_salt CreateEnvironmentEC2' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive [Sensitive Tag])
Maybe (Sensitive Text)
Maybe ConnectionType
Text
instanceType :: Text
name :: Text
tags :: Maybe (Sensitive [Sensitive Tag])
subnetId :: Maybe Text
ownerArn :: Maybe Text
imageId :: Maybe Text
dryRun :: Maybe Bool
description :: Maybe (Sensitive Text)
connectionType :: Maybe ConnectionType
clientRequestToken :: Maybe Text
automaticStopTimeMinutes :: Maybe Int
$sel:instanceType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
$sel:name:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
$sel:tags:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
$sel:subnetId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:ownerArn:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:imageId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:dryRun:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Bool
$sel:description:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive Text)
$sel:connectionType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe ConnectionType
$sel:clientRequestToken:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
automaticStopTimeMinutes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectionType
connectionType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownerArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive [Sensitive Tag])
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceType
instance Prelude.NFData CreateEnvironmentEC2 where
rnf :: CreateEnvironmentEC2 -> ()
rnf CreateEnvironmentEC2' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive [Sensitive Tag])
Maybe (Sensitive Text)
Maybe ConnectionType
Text
instanceType :: Text
name :: Text
tags :: Maybe (Sensitive [Sensitive Tag])
subnetId :: Maybe Text
ownerArn :: Maybe Text
imageId :: Maybe Text
dryRun :: Maybe Bool
description :: Maybe (Sensitive Text)
connectionType :: Maybe ConnectionType
clientRequestToken :: Maybe Text
automaticStopTimeMinutes :: Maybe Int
$sel:instanceType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
$sel:name:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
$sel:tags:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
$sel:subnetId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:ownerArn:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:imageId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:dryRun:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Bool
$sel:description:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive Text)
$sel:connectionType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe ConnectionType
$sel:clientRequestToken:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
automaticStopTimeMinutes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectionType
connectionType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive [Sensitive Tag])
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceType
instance Data.ToHeaders CreateEnvironmentEC2 where
toHeaders :: CreateEnvironmentEC2 -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSCloud9WorkspaceManagementService.CreateEnvironmentEC2" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateEnvironmentEC2 where
toJSON :: CreateEnvironmentEC2 -> Value
toJSON CreateEnvironmentEC2' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive [Sensitive Tag])
Maybe (Sensitive Text)
Maybe ConnectionType
Text
instanceType :: Text
name :: Text
tags :: Maybe (Sensitive [Sensitive Tag])
subnetId :: Maybe Text
ownerArn :: Maybe Text
imageId :: Maybe Text
dryRun :: Maybe Bool
description :: Maybe (Sensitive Text)
connectionType :: Maybe ConnectionType
clientRequestToken :: Maybe Text
automaticStopTimeMinutes :: Maybe Int
$sel:instanceType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
$sel:name:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
$sel:tags:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
$sel:subnetId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:ownerArn:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:imageId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:dryRun:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Bool
$sel:description:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive Text)
$sel:connectionType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe ConnectionType
$sel:clientRequestToken:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Int
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"automaticStopTimeMinutes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
automaticStopTimeMinutes,
(Key
"clientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
(Key
"connectionType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionType
connectionType,
(Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
description,
(Key
"dryRun" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
(Key
"imageId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageId,
(Key
"ownerArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ownerArn,
(Key
"subnetId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
subnetId,
(Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive [Sensitive Tag])
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"instanceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
instanceType)
]
)
instance Data.ToPath CreateEnvironmentEC2 where
toPath :: CreateEnvironmentEC2 -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateEnvironmentEC2 where
toQuery :: CreateEnvironmentEC2 -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateEnvironmentEC2Response = CreateEnvironmentEC2Response'
{
CreateEnvironmentEC2Response -> Maybe Text
environmentId :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2Response -> Int
httpStatus :: Prelude.Int
}
deriving (CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
$c/= :: CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
== :: CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
$c== :: CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
Prelude.Eq, ReadPrec [CreateEnvironmentEC2Response]
ReadPrec CreateEnvironmentEC2Response
Int -> ReadS CreateEnvironmentEC2Response
ReadS [CreateEnvironmentEC2Response]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEnvironmentEC2Response]
$creadListPrec :: ReadPrec [CreateEnvironmentEC2Response]
readPrec :: ReadPrec CreateEnvironmentEC2Response
$creadPrec :: ReadPrec CreateEnvironmentEC2Response
readList :: ReadS [CreateEnvironmentEC2Response]
$creadList :: ReadS [CreateEnvironmentEC2Response]
readsPrec :: Int -> ReadS CreateEnvironmentEC2Response
$creadsPrec :: Int -> ReadS CreateEnvironmentEC2Response
Prelude.Read, Int -> CreateEnvironmentEC2Response -> ShowS
[CreateEnvironmentEC2Response] -> ShowS
CreateEnvironmentEC2Response -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEnvironmentEC2Response] -> ShowS
$cshowList :: [CreateEnvironmentEC2Response] -> ShowS
show :: CreateEnvironmentEC2Response -> String
$cshow :: CreateEnvironmentEC2Response -> String
showsPrec :: Int -> CreateEnvironmentEC2Response -> ShowS
$cshowsPrec :: Int -> CreateEnvironmentEC2Response -> ShowS
Prelude.Show, forall x.
Rep CreateEnvironmentEC2Response x -> CreateEnvironmentEC2Response
forall x.
CreateEnvironmentEC2Response -> Rep CreateEnvironmentEC2Response x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEnvironmentEC2Response x -> CreateEnvironmentEC2Response
$cfrom :: forall x.
CreateEnvironmentEC2Response -> Rep CreateEnvironmentEC2Response x
Prelude.Generic)
newCreateEnvironmentEC2Response ::
Prelude.Int ->
CreateEnvironmentEC2Response
newCreateEnvironmentEC2Response :: Int -> CreateEnvironmentEC2Response
newCreateEnvironmentEC2Response Int
pHttpStatus_ =
CreateEnvironmentEC2Response'
{ $sel:environmentId:CreateEnvironmentEC2Response' :: Maybe Text
environmentId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateEnvironmentEC2Response' :: Int
httpStatus = Int
pHttpStatus_
}
createEnvironmentEC2Response_environmentId :: Lens.Lens' CreateEnvironmentEC2Response (Prelude.Maybe Prelude.Text)
createEnvironmentEC2Response_environmentId :: Lens' CreateEnvironmentEC2Response (Maybe Text)
createEnvironmentEC2Response_environmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2Response' {Maybe Text
environmentId :: Maybe Text
$sel:environmentId:CreateEnvironmentEC2Response' :: CreateEnvironmentEC2Response -> Maybe Text
environmentId} -> Maybe Text
environmentId) (\s :: CreateEnvironmentEC2Response
s@CreateEnvironmentEC2Response' {} Maybe Text
a -> CreateEnvironmentEC2Response
s {$sel:environmentId:CreateEnvironmentEC2Response' :: Maybe Text
environmentId = Maybe Text
a} :: CreateEnvironmentEC2Response)
createEnvironmentEC2Response_httpStatus :: Lens.Lens' CreateEnvironmentEC2Response Prelude.Int
createEnvironmentEC2Response_httpStatus :: Lens' CreateEnvironmentEC2Response Int
createEnvironmentEC2Response_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2Response' {Int
httpStatus :: Int
$sel:httpStatus:CreateEnvironmentEC2Response' :: CreateEnvironmentEC2Response -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateEnvironmentEC2Response
s@CreateEnvironmentEC2Response' {} Int
a -> CreateEnvironmentEC2Response
s {$sel:httpStatus:CreateEnvironmentEC2Response' :: Int
httpStatus = Int
a} :: CreateEnvironmentEC2Response)
instance Prelude.NFData CreateEnvironmentEC2Response where
rnf :: CreateEnvironmentEC2Response -> ()
rnf CreateEnvironmentEC2Response' {Int
Maybe Text
httpStatus :: Int
environmentId :: Maybe Text
$sel:httpStatus:CreateEnvironmentEC2Response' :: CreateEnvironmentEC2Response -> Int
$sel:environmentId:CreateEnvironmentEC2Response' :: CreateEnvironmentEC2Response -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
environmentId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus