{-# 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.UpdateEnvironment
(
UpdateEnvironment (..),
newUpdateEnvironment,
updateEnvironment_protonServiceRoleArn,
updateEnvironment_environmentAccountConnectionId,
updateEnvironment_spec,
updateEnvironment_templateMinorVersion,
updateEnvironment_description,
updateEnvironment_templateMajorVersion,
updateEnvironment_deploymentType,
updateEnvironment_name,
UpdateEnvironmentResponse (..),
newUpdateEnvironmentResponse,
updateEnvironmentResponse_httpStatus,
updateEnvironmentResponse_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 UpdateEnvironment = UpdateEnvironment'
{
UpdateEnvironment -> Maybe Text
protonServiceRoleArn :: Prelude.Maybe Prelude.Text,
UpdateEnvironment -> Maybe Text
environmentAccountConnectionId :: Prelude.Maybe Prelude.Text,
UpdateEnvironment -> Maybe (Sensitive Text)
spec :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateEnvironment -> Maybe Text
templateMinorVersion :: Prelude.Maybe Prelude.Text,
UpdateEnvironment -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateEnvironment -> Maybe Text
templateMajorVersion :: Prelude.Maybe Prelude.Text,
UpdateEnvironment -> DeploymentUpdateType
deploymentType :: DeploymentUpdateType,
UpdateEnvironment -> Text
name :: Prelude.Text
}
deriving (UpdateEnvironment -> UpdateEnvironment -> Bool
(UpdateEnvironment -> UpdateEnvironment -> Bool)
-> (UpdateEnvironment -> UpdateEnvironment -> Bool)
-> Eq UpdateEnvironment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEnvironment -> UpdateEnvironment -> Bool
$c/= :: UpdateEnvironment -> UpdateEnvironment -> Bool
== :: UpdateEnvironment -> UpdateEnvironment -> Bool
$c== :: UpdateEnvironment -> UpdateEnvironment -> Bool
Prelude.Eq, Int -> UpdateEnvironment -> ShowS
[UpdateEnvironment] -> ShowS
UpdateEnvironment -> String
(Int -> UpdateEnvironment -> ShowS)
-> (UpdateEnvironment -> String)
-> ([UpdateEnvironment] -> ShowS)
-> Show UpdateEnvironment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEnvironment] -> ShowS
$cshowList :: [UpdateEnvironment] -> ShowS
show :: UpdateEnvironment -> String
$cshow :: UpdateEnvironment -> String
showsPrec :: Int -> UpdateEnvironment -> ShowS
$cshowsPrec :: Int -> UpdateEnvironment -> ShowS
Prelude.Show, (forall x. UpdateEnvironment -> Rep UpdateEnvironment x)
-> (forall x. Rep UpdateEnvironment x -> UpdateEnvironment)
-> Generic UpdateEnvironment
forall x. Rep UpdateEnvironment x -> UpdateEnvironment
forall x. UpdateEnvironment -> Rep UpdateEnvironment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateEnvironment x -> UpdateEnvironment
$cfrom :: forall x. UpdateEnvironment -> Rep UpdateEnvironment x
Prelude.Generic)
newUpdateEnvironment ::
DeploymentUpdateType ->
Prelude.Text ->
UpdateEnvironment
newUpdateEnvironment :: DeploymentUpdateType -> Text -> UpdateEnvironment
newUpdateEnvironment DeploymentUpdateType
pDeploymentType_ Text
pName_ =
UpdateEnvironment' :: Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> DeploymentUpdateType
-> Text
-> UpdateEnvironment
UpdateEnvironment'
{ $sel:protonServiceRoleArn:UpdateEnvironment' :: Maybe Text
protonServiceRoleArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:environmentAccountConnectionId:UpdateEnvironment' :: Maybe Text
environmentAccountConnectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:spec:UpdateEnvironment' :: Maybe (Sensitive Text)
spec = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:templateMinorVersion:UpdateEnvironment' :: Maybe Text
templateMinorVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateEnvironment' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:templateMajorVersion:UpdateEnvironment' :: Maybe Text
templateMajorVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentType:UpdateEnvironment' :: DeploymentUpdateType
deploymentType = DeploymentUpdateType
pDeploymentType_,
$sel:name:UpdateEnvironment' :: Text
name = Text
pName_
}
updateEnvironment_protonServiceRoleArn :: Lens.Lens' UpdateEnvironment (Prelude.Maybe Prelude.Text)
updateEnvironment_protonServiceRoleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateEnvironment -> f UpdateEnvironment
updateEnvironment_protonServiceRoleArn = (UpdateEnvironment -> Maybe Text)
-> (UpdateEnvironment -> Maybe Text -> UpdateEnvironment)
-> Lens
UpdateEnvironment UpdateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironment' {Maybe Text
protonServiceRoleArn :: Maybe Text
$sel:protonServiceRoleArn:UpdateEnvironment' :: UpdateEnvironment -> Maybe Text
protonServiceRoleArn} -> Maybe Text
protonServiceRoleArn) (\s :: UpdateEnvironment
s@UpdateEnvironment' {} Maybe Text
a -> UpdateEnvironment
s {$sel:protonServiceRoleArn:UpdateEnvironment' :: Maybe Text
protonServiceRoleArn = Maybe Text
a} :: UpdateEnvironment)
updateEnvironment_environmentAccountConnectionId :: Lens.Lens' UpdateEnvironment (Prelude.Maybe Prelude.Text)
updateEnvironment_environmentAccountConnectionId :: (Maybe Text -> f (Maybe Text))
-> UpdateEnvironment -> f UpdateEnvironment
updateEnvironment_environmentAccountConnectionId = (UpdateEnvironment -> Maybe Text)
-> (UpdateEnvironment -> Maybe Text -> UpdateEnvironment)
-> Lens
UpdateEnvironment UpdateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironment' {Maybe Text
environmentAccountConnectionId :: Maybe Text
$sel:environmentAccountConnectionId:UpdateEnvironment' :: UpdateEnvironment -> Maybe Text
environmentAccountConnectionId} -> Maybe Text
environmentAccountConnectionId) (\s :: UpdateEnvironment
s@UpdateEnvironment' {} Maybe Text
a -> UpdateEnvironment
s {$sel:environmentAccountConnectionId:UpdateEnvironment' :: Maybe Text
environmentAccountConnectionId = Maybe Text
a} :: UpdateEnvironment)
updateEnvironment_spec :: Lens.Lens' UpdateEnvironment (Prelude.Maybe Prelude.Text)
updateEnvironment_spec :: (Maybe Text -> f (Maybe Text))
-> UpdateEnvironment -> f UpdateEnvironment
updateEnvironment_spec = (UpdateEnvironment -> Maybe (Sensitive Text))
-> (UpdateEnvironment
-> Maybe (Sensitive Text) -> UpdateEnvironment)
-> Lens
UpdateEnvironment
UpdateEnvironment
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironment' {Maybe (Sensitive Text)
spec :: Maybe (Sensitive Text)
$sel:spec:UpdateEnvironment' :: UpdateEnvironment -> Maybe (Sensitive Text)
spec} -> Maybe (Sensitive Text)
spec) (\s :: UpdateEnvironment
s@UpdateEnvironment' {} Maybe (Sensitive Text)
a -> UpdateEnvironment
s {$sel:spec:UpdateEnvironment' :: Maybe (Sensitive Text)
spec = Maybe (Sensitive Text)
a} :: UpdateEnvironment) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateEnvironment -> f UpdateEnvironment)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateEnvironment
-> f UpdateEnvironment
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
updateEnvironment_templateMinorVersion :: Lens.Lens' UpdateEnvironment (Prelude.Maybe Prelude.Text)
updateEnvironment_templateMinorVersion :: (Maybe Text -> f (Maybe Text))
-> UpdateEnvironment -> f UpdateEnvironment
updateEnvironment_templateMinorVersion = (UpdateEnvironment -> Maybe Text)
-> (UpdateEnvironment -> Maybe Text -> UpdateEnvironment)
-> Lens
UpdateEnvironment UpdateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironment' {Maybe Text
templateMinorVersion :: Maybe Text
$sel:templateMinorVersion:UpdateEnvironment' :: UpdateEnvironment -> Maybe Text
templateMinorVersion} -> Maybe Text
templateMinorVersion) (\s :: UpdateEnvironment
s@UpdateEnvironment' {} Maybe Text
a -> UpdateEnvironment
s {$sel:templateMinorVersion:UpdateEnvironment' :: Maybe Text
templateMinorVersion = Maybe Text
a} :: UpdateEnvironment)
updateEnvironment_description :: Lens.Lens' UpdateEnvironment (Prelude.Maybe Prelude.Text)
updateEnvironment_description :: (Maybe Text -> f (Maybe Text))
-> UpdateEnvironment -> f UpdateEnvironment
updateEnvironment_description = (UpdateEnvironment -> Maybe (Sensitive Text))
-> (UpdateEnvironment
-> Maybe (Sensitive Text) -> UpdateEnvironment)
-> Lens
UpdateEnvironment
UpdateEnvironment
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironment' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:UpdateEnvironment' :: UpdateEnvironment -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: UpdateEnvironment
s@UpdateEnvironment' {} Maybe (Sensitive Text)
a -> UpdateEnvironment
s {$sel:description:UpdateEnvironment' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: UpdateEnvironment) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateEnvironment -> f UpdateEnvironment)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateEnvironment
-> f UpdateEnvironment
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
updateEnvironment_templateMajorVersion :: Lens.Lens' UpdateEnvironment (Prelude.Maybe Prelude.Text)
updateEnvironment_templateMajorVersion :: (Maybe Text -> f (Maybe Text))
-> UpdateEnvironment -> f UpdateEnvironment
updateEnvironment_templateMajorVersion = (UpdateEnvironment -> Maybe Text)
-> (UpdateEnvironment -> Maybe Text -> UpdateEnvironment)
-> Lens
UpdateEnvironment UpdateEnvironment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironment' {Maybe Text
templateMajorVersion :: Maybe Text
$sel:templateMajorVersion:UpdateEnvironment' :: UpdateEnvironment -> Maybe Text
templateMajorVersion} -> Maybe Text
templateMajorVersion) (\s :: UpdateEnvironment
s@UpdateEnvironment' {} Maybe Text
a -> UpdateEnvironment
s {$sel:templateMajorVersion:UpdateEnvironment' :: Maybe Text
templateMajorVersion = Maybe Text
a} :: UpdateEnvironment)
updateEnvironment_deploymentType :: Lens.Lens' UpdateEnvironment DeploymentUpdateType
updateEnvironment_deploymentType :: (DeploymentUpdateType -> f DeploymentUpdateType)
-> UpdateEnvironment -> f UpdateEnvironment
updateEnvironment_deploymentType = (UpdateEnvironment -> DeploymentUpdateType)
-> (UpdateEnvironment -> DeploymentUpdateType -> UpdateEnvironment)
-> Lens
UpdateEnvironment
UpdateEnvironment
DeploymentUpdateType
DeploymentUpdateType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironment' {DeploymentUpdateType
deploymentType :: DeploymentUpdateType
$sel:deploymentType:UpdateEnvironment' :: UpdateEnvironment -> DeploymentUpdateType
deploymentType} -> DeploymentUpdateType
deploymentType) (\s :: UpdateEnvironment
s@UpdateEnvironment' {} DeploymentUpdateType
a -> UpdateEnvironment
s {$sel:deploymentType:UpdateEnvironment' :: DeploymentUpdateType
deploymentType = DeploymentUpdateType
a} :: UpdateEnvironment)
updateEnvironment_name :: Lens.Lens' UpdateEnvironment Prelude.Text
updateEnvironment_name :: (Text -> f Text) -> UpdateEnvironment -> f UpdateEnvironment
updateEnvironment_name = (UpdateEnvironment -> Text)
-> (UpdateEnvironment -> Text -> UpdateEnvironment)
-> Lens UpdateEnvironment UpdateEnvironment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironment' {Text
name :: Text
$sel:name:UpdateEnvironment' :: UpdateEnvironment -> Text
name} -> Text
name) (\s :: UpdateEnvironment
s@UpdateEnvironment' {} Text
a -> UpdateEnvironment
s {$sel:name:UpdateEnvironment' :: Text
name = Text
a} :: UpdateEnvironment)
instance Core.AWSRequest UpdateEnvironment where
type
AWSResponse UpdateEnvironment =
UpdateEnvironmentResponse
request :: UpdateEnvironment -> Request UpdateEnvironment
request = Service -> UpdateEnvironment -> Request UpdateEnvironment
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateEnvironment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateEnvironment)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateEnvironment))
-> Logger
-> Service
-> Proxy UpdateEnvironment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateEnvironment)))
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 -> UpdateEnvironmentResponse
UpdateEnvironmentResponse'
(Int -> Environment -> UpdateEnvironmentResponse)
-> Either String Int
-> Either String (Environment -> UpdateEnvironmentResponse)
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 -> UpdateEnvironmentResponse)
-> Either String Environment
-> Either String UpdateEnvironmentResponse
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 UpdateEnvironment
instance Prelude.NFData UpdateEnvironment
instance Core.ToHeaders UpdateEnvironment where
toHeaders :: UpdateEnvironment -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateEnvironment -> 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.UpdateEnvironment" ::
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 UpdateEnvironment where
toJSON :: UpdateEnvironment -> Value
toJSON UpdateEnvironment' {Maybe Text
Maybe (Sensitive Text)
Text
DeploymentUpdateType
name :: Text
deploymentType :: DeploymentUpdateType
templateMajorVersion :: Maybe Text
description :: Maybe (Sensitive Text)
templateMinorVersion :: Maybe Text
spec :: Maybe (Sensitive Text)
environmentAccountConnectionId :: Maybe Text
protonServiceRoleArn :: Maybe Text
$sel:name:UpdateEnvironment' :: UpdateEnvironment -> Text
$sel:deploymentType:UpdateEnvironment' :: UpdateEnvironment -> DeploymentUpdateType
$sel:templateMajorVersion:UpdateEnvironment' :: UpdateEnvironment -> Maybe Text
$sel:description:UpdateEnvironment' :: UpdateEnvironment -> Maybe (Sensitive Text)
$sel:templateMinorVersion:UpdateEnvironment' :: UpdateEnvironment -> Maybe Text
$sel:spec:UpdateEnvironment' :: UpdateEnvironment -> Maybe (Sensitive Text)
$sel:environmentAccountConnectionId:UpdateEnvironment' :: UpdateEnvironment -> Maybe Text
$sel:protonServiceRoleArn:UpdateEnvironment' :: UpdateEnvironment -> 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
"spec" 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)
spec,
(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
"templateMajorVersion" 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
templateMajorVersion,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"deploymentType" Text -> DeploymentUpdateType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DeploymentUpdateType
deploymentType),
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)
]
)
instance Core.ToPath UpdateEnvironment where
toPath :: UpdateEnvironment -> ByteString
toPath = ByteString -> UpdateEnvironment -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateEnvironment where
toQuery :: UpdateEnvironment -> QueryString
toQuery = QueryString -> UpdateEnvironment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateEnvironmentResponse = UpdateEnvironmentResponse'
{
UpdateEnvironmentResponse -> Int
httpStatus :: Prelude.Int,
UpdateEnvironmentResponse -> Environment
environment :: Environment
}
deriving (UpdateEnvironmentResponse -> UpdateEnvironmentResponse -> Bool
(UpdateEnvironmentResponse -> UpdateEnvironmentResponse -> Bool)
-> (UpdateEnvironmentResponse -> UpdateEnvironmentResponse -> Bool)
-> Eq UpdateEnvironmentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEnvironmentResponse -> UpdateEnvironmentResponse -> Bool
$c/= :: UpdateEnvironmentResponse -> UpdateEnvironmentResponse -> Bool
== :: UpdateEnvironmentResponse -> UpdateEnvironmentResponse -> Bool
$c== :: UpdateEnvironmentResponse -> UpdateEnvironmentResponse -> Bool
Prelude.Eq, Int -> UpdateEnvironmentResponse -> ShowS
[UpdateEnvironmentResponse] -> ShowS
UpdateEnvironmentResponse -> String
(Int -> UpdateEnvironmentResponse -> ShowS)
-> (UpdateEnvironmentResponse -> String)
-> ([UpdateEnvironmentResponse] -> ShowS)
-> Show UpdateEnvironmentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEnvironmentResponse] -> ShowS
$cshowList :: [UpdateEnvironmentResponse] -> ShowS
show :: UpdateEnvironmentResponse -> String
$cshow :: UpdateEnvironmentResponse -> String
showsPrec :: Int -> UpdateEnvironmentResponse -> ShowS
$cshowsPrec :: Int -> UpdateEnvironmentResponse -> ShowS
Prelude.Show, (forall x.
UpdateEnvironmentResponse -> Rep UpdateEnvironmentResponse x)
-> (forall x.
Rep UpdateEnvironmentResponse x -> UpdateEnvironmentResponse)
-> Generic UpdateEnvironmentResponse
forall x.
Rep UpdateEnvironmentResponse x -> UpdateEnvironmentResponse
forall x.
UpdateEnvironmentResponse -> Rep UpdateEnvironmentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEnvironmentResponse x -> UpdateEnvironmentResponse
$cfrom :: forall x.
UpdateEnvironmentResponse -> Rep UpdateEnvironmentResponse x
Prelude.Generic)
newUpdateEnvironmentResponse ::
Prelude.Int ->
Environment ->
UpdateEnvironmentResponse
newUpdateEnvironmentResponse :: Int -> Environment -> UpdateEnvironmentResponse
newUpdateEnvironmentResponse
Int
pHttpStatus_
Environment
pEnvironment_ =
UpdateEnvironmentResponse' :: Int -> Environment -> UpdateEnvironmentResponse
UpdateEnvironmentResponse'
{ $sel:httpStatus:UpdateEnvironmentResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:environment:UpdateEnvironmentResponse' :: Environment
environment = Environment
pEnvironment_
}
updateEnvironmentResponse_httpStatus :: Lens.Lens' UpdateEnvironmentResponse Prelude.Int
updateEnvironmentResponse_httpStatus :: (Int -> f Int)
-> UpdateEnvironmentResponse -> f UpdateEnvironmentResponse
updateEnvironmentResponse_httpStatus = (UpdateEnvironmentResponse -> Int)
-> (UpdateEnvironmentResponse -> Int -> UpdateEnvironmentResponse)
-> Lens UpdateEnvironmentResponse UpdateEnvironmentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironmentResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateEnvironmentResponse' :: UpdateEnvironmentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateEnvironmentResponse
s@UpdateEnvironmentResponse' {} Int
a -> UpdateEnvironmentResponse
s {$sel:httpStatus:UpdateEnvironmentResponse' :: Int
httpStatus = Int
a} :: UpdateEnvironmentResponse)
updateEnvironmentResponse_environment :: Lens.Lens' UpdateEnvironmentResponse Environment
updateEnvironmentResponse_environment :: (Environment -> f Environment)
-> UpdateEnvironmentResponse -> f UpdateEnvironmentResponse
updateEnvironmentResponse_environment = (UpdateEnvironmentResponse -> Environment)
-> (UpdateEnvironmentResponse
-> Environment -> UpdateEnvironmentResponse)
-> Lens
UpdateEnvironmentResponse
UpdateEnvironmentResponse
Environment
Environment
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironmentResponse' {Environment
environment :: Environment
$sel:environment:UpdateEnvironmentResponse' :: UpdateEnvironmentResponse -> Environment
environment} -> Environment
environment) (\s :: UpdateEnvironmentResponse
s@UpdateEnvironmentResponse' {} Environment
a -> UpdateEnvironmentResponse
s {$sel:environment:UpdateEnvironmentResponse' :: Environment
environment = Environment
a} :: UpdateEnvironmentResponse)
instance Prelude.NFData UpdateEnvironmentResponse