{-# 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.Proton.CreateEnvironment
(
CreateEnvironment (..),
newCreateEnvironment,
createEnvironment_codebuildRoleArn,
createEnvironment_componentRoleArn,
createEnvironment_description,
createEnvironment_environmentAccountConnectionId,
createEnvironment_protonServiceRoleArn,
createEnvironment_provisioningRepository,
createEnvironment_tags,
createEnvironment_templateMinorVersion,
createEnvironment_name,
createEnvironment_spec,
createEnvironment_templateMajorVersion,
createEnvironment_templateName,
CreateEnvironmentResponse (..),
newCreateEnvironmentResponse,
createEnvironmentResponse_httpStatus,
createEnvironmentResponse_environment,
)
where
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 Amazonka.Proton.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateEnvironment = CreateEnvironment'
{
CreateEnvironment -> Maybe Text
codebuildRoleArn :: Prelude.Maybe Prelude.Text,
CreateEnvironment -> Maybe Text
componentRoleArn :: Prelude.Maybe Prelude.Text,
CreateEnvironment -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
CreateEnvironment -> Maybe Text
environmentAccountConnectionId :: Prelude.Maybe Prelude.Text,
CreateEnvironment -> Maybe Text
protonServiceRoleArn :: Prelude.Maybe Prelude.Text,
CreateEnvironment -> Maybe RepositoryBranchInput
provisioningRepository :: Prelude.Maybe RepositoryBranchInput,
CreateEnvironment -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateEnvironment -> Maybe Text
templateMinorVersion :: Prelude.Maybe Prelude.Text,
CreateEnvironment -> Text
name :: Prelude.Text,
CreateEnvironment -> Sensitive Text
spec :: Data.Sensitive Prelude.Text,
CreateEnvironment -> Text
templateMajorVersion :: Prelude.Text,
CreateEnvironment -> Text
templateName :: Prelude.Text
}
deriving (CreateEnvironment -> CreateEnvironment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEnvironment -> CreateEnvironment -> Bool
$c/= :: CreateEnvironment -> CreateEnvironment -> Bool
== :: CreateEnvironment -> CreateEnvironment -> Bool
$c== :: CreateEnvironment -> CreateEnvironment -> Bool
Prelude.Eq, Int -> CreateEnvironment -> ShowS
[CreateEnvironment] -> ShowS
CreateEnvironment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEnvironment] -> ShowS
$cshowList :: [CreateEnvironment] -> ShowS
show :: CreateEnvironment -> String
$cshow :: CreateEnvironment -> String
showsPrec :: Int -> CreateEnvironment -> ShowS
$cshowsPrec :: Int -> CreateEnvironment -> ShowS
Prelude.Show, forall x. Rep CreateEnvironment x -> CreateEnvironment
forall x. CreateEnvironment -> Rep CreateEnvironment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEnvironment x -> CreateEnvironment
$cfrom :: forall x. CreateEnvironment -> Rep CreateEnvironment x
Prelude.Generic)
newCreateEnvironment ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateEnvironment
newCreateEnvironment :: Text -> Text -> Text -> Text -> CreateEnvironment
newCreateEnvironment
Text
pName_
Text
pSpec_
Text
pTemplateMajorVersion_
Text
pTemplateName_ =
CreateEnvironment'
{ $sel:codebuildRoleArn:CreateEnvironment' :: Maybe Text
codebuildRoleArn =
forall a. Maybe a
Prelude.Nothing,
$sel:componentRoleArn:CreateEnvironment' :: Maybe Text
componentRoleArn = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateEnvironment' :: Maybe (Sensitive Text)
description = forall a. Maybe a
Prelude.Nothing,
$sel:environmentAccountConnectionId:CreateEnvironment' :: Maybe Text
environmentAccountConnectionId = forall a. Maybe a
Prelude.Nothing,
$sel:protonServiceRoleArn:CreateEnvironment' :: Maybe Text
protonServiceRoleArn = forall a. Maybe a
Prelude.Nothing,
$sel:provisioningRepository:CreateEnvironment' :: Maybe RepositoryBranchInput
provisioningRepository = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateEnvironment' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:templateMinorVersion:CreateEnvironment' :: Maybe Text
templateMinorVersion = forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateEnvironment' :: Text
name = Text
pName_,
$sel:spec:CreateEnvironment' :: Sensitive Text
spec = forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pSpec_,
$sel:templateMajorVersion:CreateEnvironment' :: Text
templateMajorVersion = Text
pTemplateMajorVersion_,
$sel:templateName:CreateEnvironment' :: Text
templateName = Text
pTemplateName_
}
createEnvironment_codebuildRoleArn :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_codebuildRoleArn :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_codebuildRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
codebuildRoleArn :: Maybe Text
$sel:codebuildRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
codebuildRoleArn} -> Maybe Text
codebuildRoleArn) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:codebuildRoleArn:CreateEnvironment' :: Maybe Text
codebuildRoleArn = Maybe Text
a} :: CreateEnvironment)
createEnvironment_componentRoleArn :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_componentRoleArn :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_componentRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
componentRoleArn :: Maybe Text
$sel:componentRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
componentRoleArn} -> Maybe Text
componentRoleArn) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:componentRoleArn:CreateEnvironment' :: Maybe Text
componentRoleArn = Maybe Text
a} :: CreateEnvironment)
createEnvironment_description :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_description :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:CreateEnvironment' :: CreateEnvironment -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe (Sensitive Text)
a -> CreateEnvironment
s {$sel:description:CreateEnvironment' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: CreateEnvironment) 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
createEnvironment_environmentAccountConnectionId :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_environmentAccountConnectionId :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_environmentAccountConnectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
environmentAccountConnectionId :: Maybe Text
$sel:environmentAccountConnectionId:CreateEnvironment' :: CreateEnvironment -> Maybe Text
environmentAccountConnectionId} -> Maybe Text
environmentAccountConnectionId) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:environmentAccountConnectionId:CreateEnvironment' :: Maybe Text
environmentAccountConnectionId = Maybe Text
a} :: CreateEnvironment)
createEnvironment_protonServiceRoleArn :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_protonServiceRoleArn :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_protonServiceRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
protonServiceRoleArn :: Maybe Text
$sel:protonServiceRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
protonServiceRoleArn} -> Maybe Text
protonServiceRoleArn) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:protonServiceRoleArn:CreateEnvironment' :: Maybe Text
protonServiceRoleArn = Maybe Text
a} :: CreateEnvironment)
createEnvironment_provisioningRepository :: Lens.Lens' CreateEnvironment (Prelude.Maybe RepositoryBranchInput)
createEnvironment_provisioningRepository :: Lens' CreateEnvironment (Maybe RepositoryBranchInput)
createEnvironment_provisioningRepository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe RepositoryBranchInput
provisioningRepository :: Maybe RepositoryBranchInput
$sel:provisioningRepository:CreateEnvironment' :: CreateEnvironment -> Maybe RepositoryBranchInput
provisioningRepository} -> Maybe RepositoryBranchInput
provisioningRepository) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe RepositoryBranchInput
a -> CreateEnvironment
s {$sel:provisioningRepository:CreateEnvironment' :: Maybe RepositoryBranchInput
provisioningRepository = Maybe RepositoryBranchInput
a} :: CreateEnvironment)
createEnvironment_tags :: Lens.Lens' CreateEnvironment (Prelude.Maybe [Tag])
createEnvironment_tags :: Lens' CreateEnvironment (Maybe [Tag])
createEnvironment_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe [Tag]
a -> CreateEnvironment
s {$sel:tags:CreateEnvironment' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateEnvironment) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEnvironment_templateMinorVersion :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_templateMinorVersion :: Lens' CreateEnvironment (Maybe Text)
createEnvironment_templateMinorVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Maybe Text
templateMinorVersion :: Maybe Text
$sel:templateMinorVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
templateMinorVersion} -> Maybe Text
templateMinorVersion) (\s :: CreateEnvironment
s@CreateEnvironment' {} Maybe Text
a -> CreateEnvironment
s {$sel:templateMinorVersion:CreateEnvironment' :: Maybe Text
templateMinorVersion = Maybe Text
a} :: CreateEnvironment)
createEnvironment_name :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_name :: Lens' CreateEnvironment Text
createEnvironment_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Text
name :: Text
$sel:name:CreateEnvironment' :: CreateEnvironment -> Text
name} -> Text
name) (\s :: CreateEnvironment
s@CreateEnvironment' {} Text
a -> CreateEnvironment
s {$sel:name:CreateEnvironment' :: Text
name = Text
a} :: CreateEnvironment)
createEnvironment_spec :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_spec :: Lens' CreateEnvironment Text
createEnvironment_spec = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Sensitive Text
spec :: Sensitive Text
$sel:spec:CreateEnvironment' :: CreateEnvironment -> Sensitive Text
spec} -> Sensitive Text
spec) (\s :: CreateEnvironment
s@CreateEnvironment' {} Sensitive Text
a -> CreateEnvironment
s {$sel:spec:CreateEnvironment' :: Sensitive Text
spec = Sensitive Text
a} :: CreateEnvironment) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
createEnvironment_templateMajorVersion :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_templateMajorVersion :: Lens' CreateEnvironment Text
createEnvironment_templateMajorVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Text
templateMajorVersion :: Text
$sel:templateMajorVersion:CreateEnvironment' :: CreateEnvironment -> Text
templateMajorVersion} -> Text
templateMajorVersion) (\s :: CreateEnvironment
s@CreateEnvironment' {} Text
a -> CreateEnvironment
s {$sel:templateMajorVersion:CreateEnvironment' :: Text
templateMajorVersion = Text
a} :: CreateEnvironment)
createEnvironment_templateName :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_templateName :: Lens' CreateEnvironment Text
createEnvironment_templateName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironment' {Text
templateName :: Text
$sel:templateName:CreateEnvironment' :: CreateEnvironment -> Text
templateName} -> Text
templateName) (\s :: CreateEnvironment
s@CreateEnvironment' {} Text
a -> CreateEnvironment
s {$sel:templateName:CreateEnvironment' :: Text
templateName = Text
a} :: CreateEnvironment)
instance Core.AWSRequest CreateEnvironment where
type
AWSResponse CreateEnvironment =
CreateEnvironmentResponse
request :: (Service -> Service)
-> CreateEnvironment -> Request CreateEnvironment
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 CreateEnvironment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEnvironment)))
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 ->
Int -> Environment -> CreateEnvironmentResponse
CreateEnvironmentResponse'
forall (f :: * -> *) a b. Functor 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))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"environment")
)
instance Prelude.Hashable CreateEnvironment where
hashWithSalt :: Int -> CreateEnvironment -> Int
hashWithSalt Int
_salt CreateEnvironment' {Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Maybe RepositoryBranchInput
Text
Sensitive Text
templateName :: Text
templateMajorVersion :: Text
spec :: Sensitive Text
name :: Text
templateMinorVersion :: Maybe Text
tags :: Maybe [Tag]
provisioningRepository :: Maybe RepositoryBranchInput
protonServiceRoleArn :: Maybe Text
environmentAccountConnectionId :: Maybe Text
description :: Maybe (Sensitive Text)
componentRoleArn :: Maybe Text
codebuildRoleArn :: Maybe Text
$sel:templateName:CreateEnvironment' :: CreateEnvironment -> Text
$sel:templateMajorVersion:CreateEnvironment' :: CreateEnvironment -> Text
$sel:spec:CreateEnvironment' :: CreateEnvironment -> Sensitive Text
$sel:name:CreateEnvironment' :: CreateEnvironment -> Text
$sel:templateMinorVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe [Tag]
$sel:provisioningRepository:CreateEnvironment' :: CreateEnvironment -> Maybe RepositoryBranchInput
$sel:protonServiceRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:environmentAccountConnectionId:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:description:CreateEnvironment' :: CreateEnvironment -> Maybe (Sensitive Text)
$sel:componentRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:codebuildRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
codebuildRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
environmentAccountConnectionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
protonServiceRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RepositoryBranchInput
provisioningRepository
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateMinorVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
spec
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateMajorVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName
instance Prelude.NFData CreateEnvironment where
rnf :: CreateEnvironment -> ()
rnf CreateEnvironment' {Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Maybe RepositoryBranchInput
Text
Sensitive Text
templateName :: Text
templateMajorVersion :: Text
spec :: Sensitive Text
name :: Text
templateMinorVersion :: Maybe Text
tags :: Maybe [Tag]
provisioningRepository :: Maybe RepositoryBranchInput
protonServiceRoleArn :: Maybe Text
environmentAccountConnectionId :: Maybe Text
description :: Maybe (Sensitive Text)
componentRoleArn :: Maybe Text
codebuildRoleArn :: Maybe Text
$sel:templateName:CreateEnvironment' :: CreateEnvironment -> Text
$sel:templateMajorVersion:CreateEnvironment' :: CreateEnvironment -> Text
$sel:spec:CreateEnvironment' :: CreateEnvironment -> Sensitive Text
$sel:name:CreateEnvironment' :: CreateEnvironment -> Text
$sel:templateMinorVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe [Tag]
$sel:provisioningRepository:CreateEnvironment' :: CreateEnvironment -> Maybe RepositoryBranchInput
$sel:protonServiceRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:environmentAccountConnectionId:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:description:CreateEnvironment' :: CreateEnvironment -> Maybe (Sensitive Text)
$sel:componentRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:codebuildRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
codebuildRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentRoleArn
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 Text
environmentAccountConnectionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
protonServiceRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RepositoryBranchInput
provisioningRepository
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateMinorVersion
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 Sensitive Text
spec
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateMajorVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateName
instance Data.ToHeaders CreateEnvironment where
toHeaders :: CreateEnvironment -> 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
"AwsProton20200720.CreateEnvironment" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateEnvironment where
toJSON :: CreateEnvironment -> Value
toJSON CreateEnvironment' {Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Maybe RepositoryBranchInput
Text
Sensitive Text
templateName :: Text
templateMajorVersion :: Text
spec :: Sensitive Text
name :: Text
templateMinorVersion :: Maybe Text
tags :: Maybe [Tag]
provisioningRepository :: Maybe RepositoryBranchInput
protonServiceRoleArn :: Maybe Text
environmentAccountConnectionId :: Maybe Text
description :: Maybe (Sensitive Text)
componentRoleArn :: Maybe Text
codebuildRoleArn :: Maybe Text
$sel:templateName:CreateEnvironment' :: CreateEnvironment -> Text
$sel:templateMajorVersion:CreateEnvironment' :: CreateEnvironment -> Text
$sel:spec:CreateEnvironment' :: CreateEnvironment -> Sensitive Text
$sel:name:CreateEnvironment' :: CreateEnvironment -> Text
$sel:templateMinorVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe [Tag]
$sel:provisioningRepository:CreateEnvironment' :: CreateEnvironment -> Maybe RepositoryBranchInput
$sel:protonServiceRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:environmentAccountConnectionId:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:description:CreateEnvironment' :: CreateEnvironment -> Maybe (Sensitive Text)
$sel:componentRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:codebuildRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"codebuildRoleArn" 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
codebuildRoleArn,
(Key
"componentRoleArn" 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
componentRoleArn,
(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
"environmentAccountConnectionId" 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
environmentAccountConnectionId,
(Key
"protonServiceRoleArn" 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
protonServiceRoleArn,
(Key
"provisioningRepository" 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 RepositoryBranchInput
provisioningRepository,
(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 [Tag]
tags,
(Key
"templateMinorVersion" 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
templateMinorVersion,
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
"spec" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
spec),
forall a. a -> Maybe a
Prelude.Just
( Key
"templateMajorVersion"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
templateMajorVersion
),
forall a. a -> Maybe a
Prelude.Just (Key
"templateName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
templateName)
]
)
instance Data.ToPath CreateEnvironment where
toPath :: CreateEnvironment -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateEnvironment where
toQuery :: CreateEnvironment -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateEnvironmentResponse = CreateEnvironmentResponse'
{
CreateEnvironmentResponse -> Int
httpStatus :: Prelude.Int,
CreateEnvironmentResponse -> Environment
environment :: Environment
}
deriving (CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
$c/= :: CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
== :: CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
$c== :: CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
Prelude.Eq, Int -> CreateEnvironmentResponse -> ShowS
[CreateEnvironmentResponse] -> ShowS
CreateEnvironmentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEnvironmentResponse] -> ShowS
$cshowList :: [CreateEnvironmentResponse] -> ShowS
show :: CreateEnvironmentResponse -> String
$cshow :: CreateEnvironmentResponse -> String
showsPrec :: Int -> CreateEnvironmentResponse -> ShowS
$cshowsPrec :: Int -> CreateEnvironmentResponse -> ShowS
Prelude.Show, forall x.
Rep CreateEnvironmentResponse x -> CreateEnvironmentResponse
forall x.
CreateEnvironmentResponse -> Rep CreateEnvironmentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEnvironmentResponse x -> CreateEnvironmentResponse
$cfrom :: forall x.
CreateEnvironmentResponse -> Rep CreateEnvironmentResponse x
Prelude.Generic)
newCreateEnvironmentResponse ::
Prelude.Int ->
Environment ->
CreateEnvironmentResponse
newCreateEnvironmentResponse :: Int -> Environment -> CreateEnvironmentResponse
newCreateEnvironmentResponse
Int
pHttpStatus_
Environment
pEnvironment_ =
CreateEnvironmentResponse'
{ $sel:httpStatus:CreateEnvironmentResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:environment:CreateEnvironmentResponse' :: Environment
environment = Environment
pEnvironment_
}
createEnvironmentResponse_httpStatus :: Lens.Lens' CreateEnvironmentResponse Prelude.Int
createEnvironmentResponse_httpStatus :: Lens' CreateEnvironmentResponse Int
createEnvironmentResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateEnvironmentResponse' :: CreateEnvironmentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateEnvironmentResponse
s@CreateEnvironmentResponse' {} Int
a -> CreateEnvironmentResponse
s {$sel:httpStatus:CreateEnvironmentResponse' :: Int
httpStatus = Int
a} :: CreateEnvironmentResponse)
createEnvironmentResponse_environment :: Lens.Lens' CreateEnvironmentResponse Environment
createEnvironmentResponse_environment :: Lens' CreateEnvironmentResponse Environment
createEnvironmentResponse_environment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentResponse' {Environment
environment :: Environment
$sel:environment:CreateEnvironmentResponse' :: CreateEnvironmentResponse -> Environment
environment} -> Environment
environment) (\s :: CreateEnvironmentResponse
s@CreateEnvironmentResponse' {} Environment
a -> CreateEnvironmentResponse
s {$sel:environment:CreateEnvironmentResponse' :: Environment
environment = Environment
a} :: CreateEnvironmentResponse)
instance Prelude.NFData CreateEnvironmentResponse where
rnf :: CreateEnvironmentResponse -> ()
rnf CreateEnvironmentResponse' {Int
Environment
environment :: Environment
httpStatus :: Int
$sel:environment:CreateEnvironmentResponse' :: CreateEnvironmentResponse -> Environment
$sel:httpStatus:CreateEnvironmentResponse' :: CreateEnvironmentResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Environment
environment