{-# 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_protonServiceRoleArn,
createEnvironment_environmentAccountConnectionId,
createEnvironment_templateMinorVersion,
createEnvironment_description,
createEnvironment_tags,
createEnvironment_name,
createEnvironment_spec,
createEnvironment_templateMajorVersion,
createEnvironment_templateName,
CreateEnvironmentResponse (..),
newCreateEnvironmentResponse,
createEnvironmentResponse_httpStatus,
createEnvironmentResponse_environment,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
protonServiceRoleArn :: Prelude.Maybe Prelude.Text,
CreateEnvironment -> Maybe Text
environmentAccountConnectionId :: Prelude.Maybe Prelude.Text,
CreateEnvironment -> Maybe Text
templateMinorVersion :: Prelude.Maybe Prelude.Text,
CreateEnvironment -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateEnvironment -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateEnvironment -> Text
name :: Prelude.Text,
CreateEnvironment -> Sensitive Text
spec :: Core.Sensitive Prelude.Text,
CreateEnvironment -> Text
templateMajorVersion :: Prelude.Text,
CreateEnvironment -> Text
templateName :: Prelude.Text
}
deriving (CreateEnvironment -> CreateEnvironment -> Bool
(CreateEnvironment -> CreateEnvironment -> Bool)
-> (CreateEnvironment -> CreateEnvironment -> Bool)
-> Eq CreateEnvironment
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
(Int -> CreateEnvironment -> ShowS)
-> (CreateEnvironment -> String)
-> ([CreateEnvironment] -> ShowS)
-> Show CreateEnvironment
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. CreateEnvironment -> Rep CreateEnvironment x)
-> (forall x. Rep CreateEnvironment x -> CreateEnvironment)
-> Generic CreateEnvironment
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' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe [Tag]
-> Text
-> Sensitive Text
-> Text
-> Text
-> CreateEnvironment
CreateEnvironment'
{ $sel:protonServiceRoleArn:CreateEnvironment' :: Maybe Text
protonServiceRoleArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:environmentAccountConnectionId:CreateEnvironment' :: Maybe Text
environmentAccountConnectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:templateMinorVersion:CreateEnvironment' :: Maybe Text
templateMinorVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateEnvironment' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateEnvironment' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateEnvironment' :: Text
name = Text
pName_,
$sel:spec:CreateEnvironment' :: Sensitive Text
spec = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
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_protonServiceRoleArn :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_protonServiceRoleArn :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_protonServiceRoleArn = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
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_environmentAccountConnectionId :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_environmentAccountConnectionId :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_environmentAccountConnectionId = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
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_templateMinorVersion :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_templateMinorVersion :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_templateMinorVersion = (CreateEnvironment -> Maybe Text)
-> (CreateEnvironment -> Maybe Text -> CreateEnvironment)
-> Lens
CreateEnvironment CreateEnvironment (Maybe Text) (Maybe Text)
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_description :: Lens.Lens' CreateEnvironment (Prelude.Maybe Prelude.Text)
createEnvironment_description :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_description = (CreateEnvironment -> Maybe (Sensitive Text))
-> (CreateEnvironment
-> Maybe (Sensitive Text) -> CreateEnvironment)
-> Lens
CreateEnvironment
CreateEnvironment
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateEnvironment -> f CreateEnvironment)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateEnvironment
-> f CreateEnvironment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createEnvironment_tags :: Lens.Lens' CreateEnvironment (Prelude.Maybe [Tag])
createEnvironment_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEnvironment -> f CreateEnvironment
createEnvironment_tags = (CreateEnvironment -> Maybe [Tag])
-> (CreateEnvironment -> Maybe [Tag] -> CreateEnvironment)
-> Lens
CreateEnvironment CreateEnvironment (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEnvironment -> f CreateEnvironment)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEnvironment
-> f CreateEnvironment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEnvironment_name :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_name :: (Text -> f Text) -> CreateEnvironment -> f CreateEnvironment
createEnvironment_name = (CreateEnvironment -> Text)
-> (CreateEnvironment -> Text -> CreateEnvironment)
-> Lens CreateEnvironment CreateEnvironment Text Text
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 :: (Text -> f Text) -> CreateEnvironment -> f CreateEnvironment
createEnvironment_spec = (CreateEnvironment -> Sensitive Text)
-> (CreateEnvironment -> Sensitive Text -> CreateEnvironment)
-> Lens
CreateEnvironment
CreateEnvironment
(Sensitive Text)
(Sensitive Text)
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) ((Sensitive Text -> f (Sensitive Text))
-> CreateEnvironment -> f CreateEnvironment)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> CreateEnvironment
-> f CreateEnvironment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
createEnvironment_templateMajorVersion :: Lens.Lens' CreateEnvironment Prelude.Text
createEnvironment_templateMajorVersion :: (Text -> f Text) -> CreateEnvironment -> f CreateEnvironment
createEnvironment_templateMajorVersion = (CreateEnvironment -> Text)
-> (CreateEnvironment -> Text -> CreateEnvironment)
-> Lens CreateEnvironment CreateEnvironment Text Text
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 :: (Text -> f Text) -> CreateEnvironment -> f CreateEnvironment
createEnvironment_templateName = (CreateEnvironment -> Text)
-> (CreateEnvironment -> Text -> CreateEnvironment)
-> Lens CreateEnvironment CreateEnvironment Text Text
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 :: CreateEnvironment -> Request CreateEnvironment
request = Service -> CreateEnvironment -> Request CreateEnvironment
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateEnvironment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEnvironment)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateEnvironment))
-> Logger
-> Service
-> Proxy CreateEnvironment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEnvironment)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Environment -> CreateEnvironmentResponse
CreateEnvironmentResponse'
(Int -> Environment -> CreateEnvironmentResponse)
-> Either String Int
-> Either String (Environment -> CreateEnvironmentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (Environment -> CreateEnvironmentResponse)
-> Either String Environment
-> Either String CreateEnvironmentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Environment
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"environment")
)
instance Prelude.Hashable CreateEnvironment
instance Prelude.NFData CreateEnvironment
instance Core.ToHeaders CreateEnvironment where
toHeaders :: CreateEnvironment -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateEnvironment -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AwsProton20200720.CreateEnvironment" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateEnvironment where
toJSON :: CreateEnvironment -> Value
toJSON CreateEnvironment' {Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Text
Sensitive Text
templateName :: Text
templateMajorVersion :: Text
spec :: Sensitive Text
name :: Text
tags :: Maybe [Tag]
description :: Maybe (Sensitive Text)
templateMinorVersion :: Maybe Text
environmentAccountConnectionId :: Maybe Text
protonServiceRoleArn :: Maybe Text
$sel:templateName:CreateEnvironment' :: CreateEnvironment -> Text
$sel:templateMajorVersion:CreateEnvironment' :: CreateEnvironment -> Text
$sel:spec:CreateEnvironment' :: CreateEnvironment -> Sensitive Text
$sel:name:CreateEnvironment' :: CreateEnvironment -> Text
$sel:tags:CreateEnvironment' :: CreateEnvironment -> Maybe [Tag]
$sel:description:CreateEnvironment' :: CreateEnvironment -> Maybe (Sensitive Text)
$sel:templateMinorVersion:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:environmentAccountConnectionId:CreateEnvironment' :: CreateEnvironment -> Maybe Text
$sel:protonServiceRoleArn:CreateEnvironment' :: CreateEnvironment -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"protonServiceRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
protonServiceRoleArn,
(Text
"environmentAccountConnectionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
environmentAccountConnectionId,
(Text
"templateMinorVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
templateMinorVersion,
(Text
"description" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
description,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"spec" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
spec),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"templateMajorVersion"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
templateMajorVersion
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"templateName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
templateName)
]
)
instance Core.ToPath CreateEnvironment where
toPath :: CreateEnvironment -> ByteString
toPath = ByteString -> CreateEnvironment -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateEnvironment where
toQuery :: CreateEnvironment -> QueryString
toQuery = QueryString -> CreateEnvironment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateEnvironmentResponse = CreateEnvironmentResponse'
{
CreateEnvironmentResponse -> Int
httpStatus :: Prelude.Int,
CreateEnvironmentResponse -> Environment
environment :: Environment
}
deriving (CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool
(CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool)
-> (CreateEnvironmentResponse -> CreateEnvironmentResponse -> Bool)
-> Eq CreateEnvironmentResponse
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
(Int -> CreateEnvironmentResponse -> ShowS)
-> (CreateEnvironmentResponse -> String)
-> ([CreateEnvironmentResponse] -> ShowS)
-> Show CreateEnvironmentResponse
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.
CreateEnvironmentResponse -> Rep CreateEnvironmentResponse x)
-> (forall x.
Rep CreateEnvironmentResponse x -> CreateEnvironmentResponse)
-> Generic CreateEnvironmentResponse
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' :: Int -> Environment -> CreateEnvironmentResponse
CreateEnvironmentResponse'
{ $sel:httpStatus:CreateEnvironmentResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:environment:CreateEnvironmentResponse' :: Environment
environment = Environment
pEnvironment_
}
createEnvironmentResponse_httpStatus :: Lens.Lens' CreateEnvironmentResponse Prelude.Int
createEnvironmentResponse_httpStatus :: (Int -> f Int)
-> CreateEnvironmentResponse -> f CreateEnvironmentResponse
createEnvironmentResponse_httpStatus = (CreateEnvironmentResponse -> Int)
-> (CreateEnvironmentResponse -> Int -> CreateEnvironmentResponse)
-> Lens CreateEnvironmentResponse CreateEnvironmentResponse Int Int
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 :: (Environment -> f Environment)
-> CreateEnvironmentResponse -> f CreateEnvironmentResponse
createEnvironmentResponse_environment = (CreateEnvironmentResponse -> Environment)
-> (CreateEnvironmentResponse
-> Environment -> CreateEnvironmentResponse)
-> Lens
CreateEnvironmentResponse
CreateEnvironmentResponse
Environment
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