{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Cloud9.CreateEnvironmentEC2
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an Cloud9 development environment, launches an Amazon Elastic
-- Compute Cloud (Amazon EC2) instance, and then connects from the instance
-- to the environment.
module Amazonka.Cloud9.CreateEnvironmentEC2
  ( -- * Creating a Request
    CreateEnvironmentEC2 (..),
    newCreateEnvironmentEC2,

    -- * Request Lenses
    createEnvironmentEC2_automaticStopTimeMinutes,
    createEnvironmentEC2_clientRequestToken,
    createEnvironmentEC2_connectionType,
    createEnvironmentEC2_description,
    createEnvironmentEC2_dryRun,
    createEnvironmentEC2_imageId,
    createEnvironmentEC2_ownerArn,
    createEnvironmentEC2_subnetId,
    createEnvironmentEC2_tags,
    createEnvironmentEC2_name,
    createEnvironmentEC2_instanceType,

    -- * Destructuring the Response
    CreateEnvironmentEC2Response (..),
    newCreateEnvironmentEC2Response,

    -- * Response Lenses
    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

-- | /See:/ 'newCreateEnvironmentEC2' smart constructor.
data CreateEnvironmentEC2 = CreateEnvironmentEC2'
  { -- | The number of minutes until the running instance is shut down after the
    -- environment has last been used.
    CreateEnvironmentEC2 -> Maybe Int
automaticStopTimeMinutes :: Prelude.Maybe Prelude.Int,
    -- | A unique, case-sensitive string that helps Cloud9 to ensure this
    -- operation completes no more than one time.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html Client Tokens>
    -- in the /Amazon EC2 API Reference/.
    CreateEnvironmentEC2 -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The connection type used for connecting to an Amazon EC2 environment.
    -- Valid values are @CONNECT_SSH@ (default) and @CONNECT_SSM@ (connected
    -- through Amazon EC2 Systems Manager).
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html Accessing no-ingress EC2 instances with Amazon EC2 Systems Manager>
    -- in the /Cloud9 User Guide/.
    CreateEnvironmentEC2 -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
    -- | The description of the environment to create.
    CreateEnvironmentEC2 -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    CreateEnvironmentEC2 -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The identifier for the Amazon Machine Image (AMI) that\'s used to create
    -- the EC2 instance. To choose an AMI for the instance, you must specify a
    -- valid AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.
    --
    -- The default Amazon Linux AMI is currently used if the parameter isn\'t
    -- explicitly assigned a value in the request.
    --
    -- In the future the parameter for Amazon Linux will no longer be available
    -- when you specify an AMI for your instance. Amazon Linux 2 will then
    -- become the default AMI, which is used to launch your instance if no
    -- parameter is explicitly defined.
    --
    -- __AMI aliases__
    --
    -- -   __Amazon Linux (default): @amazonlinux-1-x86_64@__
    --
    -- -   Amazon Linux 2: @amazonlinux-2-x86_64@
    --
    -- -   Ubuntu 18.04: @ubuntu-18.04-x86_64@
    --
    -- __SSM paths__
    --
    -- -   __Amazon Linux (default):
    --     @resolve:ssm:\/aws\/service\/cloud9\/amis\/amazonlinux-1-x86_64@__
    --
    -- -   Amazon Linux 2:
    --     @resolve:ssm:\/aws\/service\/cloud9\/amis\/amazonlinux-2-x86_64@
    --
    -- -   Ubuntu 18.04:
    --     @resolve:ssm:\/aws\/service\/cloud9\/amis\/ubuntu-18.04-x86_64@
    CreateEnvironmentEC2 -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the environment owner. This ARN can be
    -- the ARN of any IAM principal. If this value is not specified, the ARN
    -- defaults to this environment\'s creator.
    CreateEnvironmentEC2 -> Maybe Text
ownerArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the subnet in Amazon VPC that Cloud9 will use to communicate
    -- with the Amazon EC2 instance.
    CreateEnvironmentEC2 -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
    -- | An array of key-value pairs that will be associated with the new Cloud9
    -- development environment.
    CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
tags :: Prelude.Maybe (Data.Sensitive [Data.Sensitive Tag]),
    -- | The name of the environment to create.
    --
    -- This name is visible to other IAM users in the same Amazon Web Services
    -- account.
    CreateEnvironmentEC2 -> Text
name :: Prelude.Text,
    -- | The type of instance to connect to the environment (for example,
    -- @t2.micro@).
    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)

-- |
-- Create a value of 'CreateEnvironmentEC2' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'automaticStopTimeMinutes', 'createEnvironmentEC2_automaticStopTimeMinutes' - The number of minutes until the running instance is shut down after the
-- environment has last been used.
--
-- 'clientRequestToken', 'createEnvironmentEC2_clientRequestToken' - A unique, case-sensitive string that helps Cloud9 to ensure this
-- operation completes no more than one time.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html Client Tokens>
-- in the /Amazon EC2 API Reference/.
--
-- 'connectionType', 'createEnvironmentEC2_connectionType' - The connection type used for connecting to an Amazon EC2 environment.
-- Valid values are @CONNECT_SSH@ (default) and @CONNECT_SSM@ (connected
-- through Amazon EC2 Systems Manager).
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html Accessing no-ingress EC2 instances with Amazon EC2 Systems Manager>
-- in the /Cloud9 User Guide/.
--
-- 'description', 'createEnvironmentEC2_description' - The description of the environment to create.
--
-- 'dryRun', 'createEnvironmentEC2_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'imageId', 'createEnvironmentEC2_imageId' - The identifier for the Amazon Machine Image (AMI) that\'s used to create
-- the EC2 instance. To choose an AMI for the instance, you must specify a
-- valid AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.
--
-- The default Amazon Linux AMI is currently used if the parameter isn\'t
-- explicitly assigned a value in the request.
--
-- In the future the parameter for Amazon Linux will no longer be available
-- when you specify an AMI for your instance. Amazon Linux 2 will then
-- become the default AMI, which is used to launch your instance if no
-- parameter is explicitly defined.
--
-- __AMI aliases__
--
-- -   __Amazon Linux (default): @amazonlinux-1-x86_64@__
--
-- -   Amazon Linux 2: @amazonlinux-2-x86_64@
--
-- -   Ubuntu 18.04: @ubuntu-18.04-x86_64@
--
-- __SSM paths__
--
-- -   __Amazon Linux (default):
--     @resolve:ssm:\/aws\/service\/cloud9\/amis\/amazonlinux-1-x86_64@__
--
-- -   Amazon Linux 2:
--     @resolve:ssm:\/aws\/service\/cloud9\/amis\/amazonlinux-2-x86_64@
--
-- -   Ubuntu 18.04:
--     @resolve:ssm:\/aws\/service\/cloud9\/amis\/ubuntu-18.04-x86_64@
--
-- 'ownerArn', 'createEnvironmentEC2_ownerArn' - The Amazon Resource Name (ARN) of the environment owner. This ARN can be
-- the ARN of any IAM principal. If this value is not specified, the ARN
-- defaults to this environment\'s creator.
--
-- 'subnetId', 'createEnvironmentEC2_subnetId' - The ID of the subnet in Amazon VPC that Cloud9 will use to communicate
-- with the Amazon EC2 instance.
--
-- 'tags', 'createEnvironmentEC2_tags' - An array of key-value pairs that will be associated with the new Cloud9
-- development environment.
--
-- 'name', 'createEnvironmentEC2_name' - The name of the environment to create.
--
-- This name is visible to other IAM users in the same Amazon Web Services
-- account.
--
-- 'instanceType', 'createEnvironmentEC2_instanceType' - The type of instance to connect to the environment (for example,
-- @t2.micro@).
newCreateEnvironmentEC2 ::
  -- | 'name'
  Prelude.Text ->
  -- | 'instanceType'
  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_
    }

-- | The number of minutes until the running instance is shut down after the
-- environment has last been used.
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)

-- | A unique, case-sensitive string that helps Cloud9 to ensure this
-- operation completes no more than one time.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html Client Tokens>
-- in the /Amazon EC2 API Reference/.
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)

-- | The connection type used for connecting to an Amazon EC2 environment.
-- Valid values are @CONNECT_SSH@ (default) and @CONNECT_SSM@ (connected
-- through Amazon EC2 Systems Manager).
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html Accessing no-ingress EC2 instances with Amazon EC2 Systems Manager>
-- in the /Cloud9 User Guide/.
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)

-- | The description of the environment to create.
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

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
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)

-- | The identifier for the Amazon Machine Image (AMI) that\'s used to create
-- the EC2 instance. To choose an AMI for the instance, you must specify a
-- valid AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.
--
-- The default Amazon Linux AMI is currently used if the parameter isn\'t
-- explicitly assigned a value in the request.
--
-- In the future the parameter for Amazon Linux will no longer be available
-- when you specify an AMI for your instance. Amazon Linux 2 will then
-- become the default AMI, which is used to launch your instance if no
-- parameter is explicitly defined.
--
-- __AMI aliases__
--
-- -   __Amazon Linux (default): @amazonlinux-1-x86_64@__
--
-- -   Amazon Linux 2: @amazonlinux-2-x86_64@
--
-- -   Ubuntu 18.04: @ubuntu-18.04-x86_64@
--
-- __SSM paths__
--
-- -   __Amazon Linux (default):
--     @resolve:ssm:\/aws\/service\/cloud9\/amis\/amazonlinux-1-x86_64@__
--
-- -   Amazon Linux 2:
--     @resolve:ssm:\/aws\/service\/cloud9\/amis\/amazonlinux-2-x86_64@
--
-- -   Ubuntu 18.04:
--     @resolve:ssm:\/aws\/service\/cloud9\/amis\/ubuntu-18.04-x86_64@
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)

-- | The Amazon Resource Name (ARN) of the environment owner. This ARN can be
-- the ARN of any IAM principal. If this value is not specified, the ARN
-- defaults to this environment\'s creator.
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)

-- | The ID of the subnet in Amazon VPC that Cloud9 will use to communicate
-- with the Amazon EC2 instance.
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)

-- | An array of key-value pairs that will be associated with the new Cloud9
-- development environment.
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)

-- | The name of the environment to create.
--
-- This name is visible to other IAM users in the same Amazon Web Services
-- account.
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)

-- | The type of instance to connect to the environment (for example,
-- @t2.micro@).
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

-- | /See:/ 'newCreateEnvironmentEC2Response' smart constructor.
data CreateEnvironmentEC2Response = CreateEnvironmentEC2Response'
  { -- | The ID of the environment that was created.
    CreateEnvironmentEC2Response -> Maybe Text
environmentId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    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)

-- |
-- Create a value of 'CreateEnvironmentEC2Response' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'environmentId', 'createEnvironmentEC2Response_environmentId' - The ID of the environment that was created.
--
-- 'httpStatus', 'createEnvironmentEC2Response_httpStatus' - The response's http status code.
newCreateEnvironmentEC2Response ::
  -- | 'httpStatus'
  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_
    }

-- | The ID of the environment that was created.
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)

-- | The response's http status code.
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