{-# 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.ApiGatewayV2.UpdateDeployment
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a Deployment.
module Amazonka.ApiGatewayV2.UpdateDeployment
  ( -- * Creating a Request
    UpdateDeployment (..),
    newUpdateDeployment,

    -- * Request Lenses
    updateDeployment_description,
    updateDeployment_apiId,
    updateDeployment_deploymentId,

    -- * Destructuring the Response
    UpdateDeploymentResponse (..),
    newUpdateDeploymentResponse,

    -- * Response Lenses
    updateDeploymentResponse_deploymentId,
    updateDeploymentResponse_autoDeployed,
    updateDeploymentResponse_deploymentStatusMessage,
    updateDeploymentResponse_createdDate,
    updateDeploymentResponse_deploymentStatus,
    updateDeploymentResponse_description,
    updateDeploymentResponse_httpStatus,
  )
where

import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Updates a Deployment.
--
-- /See:/ 'newUpdateDeployment' smart constructor.
data UpdateDeployment = UpdateDeployment'
  { -- | The description for the deployment resource.
    UpdateDeployment -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The API identifier.
    UpdateDeployment -> Text
apiId :: Prelude.Text,
    -- | The deployment ID.
    UpdateDeployment -> Text
deploymentId :: Prelude.Text
  }
  deriving (UpdateDeployment -> UpdateDeployment -> Bool
(UpdateDeployment -> UpdateDeployment -> Bool)
-> (UpdateDeployment -> UpdateDeployment -> Bool)
-> Eq UpdateDeployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDeployment -> UpdateDeployment -> Bool
$c/= :: UpdateDeployment -> UpdateDeployment -> Bool
== :: UpdateDeployment -> UpdateDeployment -> Bool
$c== :: UpdateDeployment -> UpdateDeployment -> Bool
Prelude.Eq, ReadPrec [UpdateDeployment]
ReadPrec UpdateDeployment
Int -> ReadS UpdateDeployment
ReadS [UpdateDeployment]
(Int -> ReadS UpdateDeployment)
-> ReadS [UpdateDeployment]
-> ReadPrec UpdateDeployment
-> ReadPrec [UpdateDeployment]
-> Read UpdateDeployment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDeployment]
$creadListPrec :: ReadPrec [UpdateDeployment]
readPrec :: ReadPrec UpdateDeployment
$creadPrec :: ReadPrec UpdateDeployment
readList :: ReadS [UpdateDeployment]
$creadList :: ReadS [UpdateDeployment]
readsPrec :: Int -> ReadS UpdateDeployment
$creadsPrec :: Int -> ReadS UpdateDeployment
Prelude.Read, Int -> UpdateDeployment -> ShowS
[UpdateDeployment] -> ShowS
UpdateDeployment -> String
(Int -> UpdateDeployment -> ShowS)
-> (UpdateDeployment -> String)
-> ([UpdateDeployment] -> ShowS)
-> Show UpdateDeployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDeployment] -> ShowS
$cshowList :: [UpdateDeployment] -> ShowS
show :: UpdateDeployment -> String
$cshow :: UpdateDeployment -> String
showsPrec :: Int -> UpdateDeployment -> ShowS
$cshowsPrec :: Int -> UpdateDeployment -> ShowS
Prelude.Show, (forall x. UpdateDeployment -> Rep UpdateDeployment x)
-> (forall x. Rep UpdateDeployment x -> UpdateDeployment)
-> Generic UpdateDeployment
forall x. Rep UpdateDeployment x -> UpdateDeployment
forall x. UpdateDeployment -> Rep UpdateDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDeployment x -> UpdateDeployment
$cfrom :: forall x. UpdateDeployment -> Rep UpdateDeployment x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDeployment' 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:
--
-- 'description', 'updateDeployment_description' - The description for the deployment resource.
--
-- 'apiId', 'updateDeployment_apiId' - The API identifier.
--
-- 'deploymentId', 'updateDeployment_deploymentId' - The deployment ID.
newUpdateDeployment ::
  -- | 'apiId'
  Prelude.Text ->
  -- | 'deploymentId'
  Prelude.Text ->
  UpdateDeployment
newUpdateDeployment :: Text -> Text -> UpdateDeployment
newUpdateDeployment Text
pApiId_ Text
pDeploymentId_ =
  UpdateDeployment' :: Maybe Text -> Text -> Text -> UpdateDeployment
UpdateDeployment'
    { $sel:description:UpdateDeployment' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:apiId:UpdateDeployment' :: Text
apiId = Text
pApiId_,
      $sel:deploymentId:UpdateDeployment' :: Text
deploymentId = Text
pDeploymentId_
    }

-- | The description for the deployment resource.
updateDeployment_description :: Lens.Lens' UpdateDeployment (Prelude.Maybe Prelude.Text)
updateDeployment_description :: (Maybe Text -> f (Maybe Text))
-> UpdateDeployment -> f UpdateDeployment
updateDeployment_description = (UpdateDeployment -> Maybe Text)
-> (UpdateDeployment -> Maybe Text -> UpdateDeployment)
-> Lens UpdateDeployment UpdateDeployment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeployment' {Maybe Text
description :: Maybe Text
$sel:description:UpdateDeployment' :: UpdateDeployment -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateDeployment
s@UpdateDeployment' {} Maybe Text
a -> UpdateDeployment
s {$sel:description:UpdateDeployment' :: Maybe Text
description = Maybe Text
a} :: UpdateDeployment)

-- | The API identifier.
updateDeployment_apiId :: Lens.Lens' UpdateDeployment Prelude.Text
updateDeployment_apiId :: (Text -> f Text) -> UpdateDeployment -> f UpdateDeployment
updateDeployment_apiId = (UpdateDeployment -> Text)
-> (UpdateDeployment -> Text -> UpdateDeployment)
-> Lens UpdateDeployment UpdateDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeployment' {Text
apiId :: Text
$sel:apiId:UpdateDeployment' :: UpdateDeployment -> Text
apiId} -> Text
apiId) (\s :: UpdateDeployment
s@UpdateDeployment' {} Text
a -> UpdateDeployment
s {$sel:apiId:UpdateDeployment' :: Text
apiId = Text
a} :: UpdateDeployment)

-- | The deployment ID.
updateDeployment_deploymentId :: Lens.Lens' UpdateDeployment Prelude.Text
updateDeployment_deploymentId :: (Text -> f Text) -> UpdateDeployment -> f UpdateDeployment
updateDeployment_deploymentId = (UpdateDeployment -> Text)
-> (UpdateDeployment -> Text -> UpdateDeployment)
-> Lens UpdateDeployment UpdateDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeployment' {Text
deploymentId :: Text
$sel:deploymentId:UpdateDeployment' :: UpdateDeployment -> Text
deploymentId} -> Text
deploymentId) (\s :: UpdateDeployment
s@UpdateDeployment' {} Text
a -> UpdateDeployment
s {$sel:deploymentId:UpdateDeployment' :: Text
deploymentId = Text
a} :: UpdateDeployment)

instance Core.AWSRequest UpdateDeployment where
  type
    AWSResponse UpdateDeployment =
      UpdateDeploymentResponse
  request :: UpdateDeployment -> Request UpdateDeployment
request = Service -> UpdateDeployment -> Request UpdateDeployment
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDeployment)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDeployment))
-> Logger
-> Service
-> Proxy UpdateDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDeployment)))
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 ->
          Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe DeploymentStatus
-> Maybe Text
-> Int
-> UpdateDeploymentResponse
UpdateDeploymentResponse'
            (Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe DeploymentStatus
 -> Maybe Text
 -> Int
 -> UpdateDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe DeploymentStatus
      -> Maybe Text
      -> Int
      -> UpdateDeploymentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentId")
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe DeploymentStatus
   -> Maybe Text
   -> Int
   -> UpdateDeploymentResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe DeploymentStatus
      -> Maybe Text
      -> Int
      -> UpdateDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"autoDeployed")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe DeploymentStatus
   -> Maybe Text
   -> Int
   -> UpdateDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe DeploymentStatus
      -> Maybe Text
      -> Int
      -> UpdateDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentStatusMessage")
            Either
  String
  (Maybe POSIX
   -> Maybe DeploymentStatus
   -> Maybe Text
   -> Int
   -> UpdateDeploymentResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe DeploymentStatus
      -> Maybe Text -> Int -> UpdateDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdDate")
            Either
  String
  (Maybe DeploymentStatus
   -> Maybe Text -> Int -> UpdateDeploymentResponse)
-> Either String (Maybe DeploymentStatus)
-> Either String (Maybe Text -> Int -> UpdateDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DeploymentStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentStatus")
            Either String (Maybe Text -> Int -> UpdateDeploymentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either String (Int -> UpdateDeploymentResponse)
-> Either String Int -> Either String UpdateDeploymentResponse
forall (f :: * -> *) a b. Applicative f => 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))
      )

instance Prelude.Hashable UpdateDeployment

instance Prelude.NFData UpdateDeployment

instance Core.ToHeaders UpdateDeployment where
  toHeaders :: UpdateDeployment -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateDeployment -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateDeployment where
  toJSON :: UpdateDeployment -> Value
toJSON UpdateDeployment' {Maybe Text
Text
deploymentId :: Text
apiId :: Text
description :: Maybe Text
$sel:deploymentId:UpdateDeployment' :: UpdateDeployment -> Text
$sel:apiId:UpdateDeployment' :: UpdateDeployment -> Text
$sel:description:UpdateDeployment' :: UpdateDeployment -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Text
"description" 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
description]
      )

instance Core.ToPath UpdateDeployment where
  toPath :: UpdateDeployment -> ByteString
toPath UpdateDeployment' {Maybe Text
Text
deploymentId :: Text
apiId :: Text
description :: Maybe Text
$sel:deploymentId:UpdateDeployment' :: UpdateDeployment -> Text
$sel:apiId:UpdateDeployment' :: UpdateDeployment -> Text
$sel:description:UpdateDeployment' :: UpdateDeployment -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/apis/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
apiId,
        ByteString
"/deployments/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
deploymentId
      ]

instance Core.ToQuery UpdateDeployment where
  toQuery :: UpdateDeployment -> QueryString
toQuery = QueryString -> UpdateDeployment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateDeploymentResponse' smart constructor.
data UpdateDeploymentResponse = UpdateDeploymentResponse'
  { -- | The identifier for the deployment.
    UpdateDeploymentResponse -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether a deployment was automatically released.
    UpdateDeploymentResponse -> Maybe Bool
autoDeployed :: Prelude.Maybe Prelude.Bool,
    -- | May contain additional feedback on the status of an API deployment.
    UpdateDeploymentResponse -> Maybe Text
deploymentStatusMessage :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the Deployment resource was created.
    UpdateDeploymentResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The status of the deployment: PENDING, FAILED, or SUCCEEDED.
    UpdateDeploymentResponse -> Maybe DeploymentStatus
deploymentStatus :: Prelude.Maybe DeploymentStatus,
    -- | The description for the deployment.
    UpdateDeploymentResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateDeploymentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateDeploymentResponse -> UpdateDeploymentResponse -> Bool
(UpdateDeploymentResponse -> UpdateDeploymentResponse -> Bool)
-> (UpdateDeploymentResponse -> UpdateDeploymentResponse -> Bool)
-> Eq UpdateDeploymentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDeploymentResponse -> UpdateDeploymentResponse -> Bool
$c/= :: UpdateDeploymentResponse -> UpdateDeploymentResponse -> Bool
== :: UpdateDeploymentResponse -> UpdateDeploymentResponse -> Bool
$c== :: UpdateDeploymentResponse -> UpdateDeploymentResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDeploymentResponse]
ReadPrec UpdateDeploymentResponse
Int -> ReadS UpdateDeploymentResponse
ReadS [UpdateDeploymentResponse]
(Int -> ReadS UpdateDeploymentResponse)
-> ReadS [UpdateDeploymentResponse]
-> ReadPrec UpdateDeploymentResponse
-> ReadPrec [UpdateDeploymentResponse]
-> Read UpdateDeploymentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDeploymentResponse]
$creadListPrec :: ReadPrec [UpdateDeploymentResponse]
readPrec :: ReadPrec UpdateDeploymentResponse
$creadPrec :: ReadPrec UpdateDeploymentResponse
readList :: ReadS [UpdateDeploymentResponse]
$creadList :: ReadS [UpdateDeploymentResponse]
readsPrec :: Int -> ReadS UpdateDeploymentResponse
$creadsPrec :: Int -> ReadS UpdateDeploymentResponse
Prelude.Read, Int -> UpdateDeploymentResponse -> ShowS
[UpdateDeploymentResponse] -> ShowS
UpdateDeploymentResponse -> String
(Int -> UpdateDeploymentResponse -> ShowS)
-> (UpdateDeploymentResponse -> String)
-> ([UpdateDeploymentResponse] -> ShowS)
-> Show UpdateDeploymentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDeploymentResponse] -> ShowS
$cshowList :: [UpdateDeploymentResponse] -> ShowS
show :: UpdateDeploymentResponse -> String
$cshow :: UpdateDeploymentResponse -> String
showsPrec :: Int -> UpdateDeploymentResponse -> ShowS
$cshowsPrec :: Int -> UpdateDeploymentResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDeploymentResponse -> Rep UpdateDeploymentResponse x)
-> (forall x.
    Rep UpdateDeploymentResponse x -> UpdateDeploymentResponse)
-> Generic UpdateDeploymentResponse
forall x.
Rep UpdateDeploymentResponse x -> UpdateDeploymentResponse
forall x.
UpdateDeploymentResponse -> Rep UpdateDeploymentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDeploymentResponse x -> UpdateDeploymentResponse
$cfrom :: forall x.
UpdateDeploymentResponse -> Rep UpdateDeploymentResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDeploymentResponse' 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:
--
-- 'deploymentId', 'updateDeploymentResponse_deploymentId' - The identifier for the deployment.
--
-- 'autoDeployed', 'updateDeploymentResponse_autoDeployed' - Specifies whether a deployment was automatically released.
--
-- 'deploymentStatusMessage', 'updateDeploymentResponse_deploymentStatusMessage' - May contain additional feedback on the status of an API deployment.
--
-- 'createdDate', 'updateDeploymentResponse_createdDate' - The date and time when the Deployment resource was created.
--
-- 'deploymentStatus', 'updateDeploymentResponse_deploymentStatus' - The status of the deployment: PENDING, FAILED, or SUCCEEDED.
--
-- 'description', 'updateDeploymentResponse_description' - The description for the deployment.
--
-- 'httpStatus', 'updateDeploymentResponse_httpStatus' - The response's http status code.
newUpdateDeploymentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDeploymentResponse
newUpdateDeploymentResponse :: Int -> UpdateDeploymentResponse
newUpdateDeploymentResponse Int
pHttpStatus_ =
  UpdateDeploymentResponse' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe DeploymentStatus
-> Maybe Text
-> Int
-> UpdateDeploymentResponse
UpdateDeploymentResponse'
    { $sel:deploymentId:UpdateDeploymentResponse' :: Maybe Text
deploymentId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeployed:UpdateDeploymentResponse' :: Maybe Bool
autoDeployed = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentStatusMessage:UpdateDeploymentResponse' :: Maybe Text
deploymentStatusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:UpdateDeploymentResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentStatus:UpdateDeploymentResponse' :: Maybe DeploymentStatus
deploymentStatus = Maybe DeploymentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateDeploymentResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateDeploymentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier for the deployment.
updateDeploymentResponse_deploymentId :: Lens.Lens' UpdateDeploymentResponse (Prelude.Maybe Prelude.Text)
updateDeploymentResponse_deploymentId :: (Maybe Text -> f (Maybe Text))
-> UpdateDeploymentResponse -> f UpdateDeploymentResponse
updateDeploymentResponse_deploymentId = (UpdateDeploymentResponse -> Maybe Text)
-> (UpdateDeploymentResponse
    -> Maybe Text -> UpdateDeploymentResponse)
-> Lens
     UpdateDeploymentResponse
     UpdateDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeploymentResponse' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:UpdateDeploymentResponse' :: UpdateDeploymentResponse -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: UpdateDeploymentResponse
s@UpdateDeploymentResponse' {} Maybe Text
a -> UpdateDeploymentResponse
s {$sel:deploymentId:UpdateDeploymentResponse' :: Maybe Text
deploymentId = Maybe Text
a} :: UpdateDeploymentResponse)

-- | Specifies whether a deployment was automatically released.
updateDeploymentResponse_autoDeployed :: Lens.Lens' UpdateDeploymentResponse (Prelude.Maybe Prelude.Bool)
updateDeploymentResponse_autoDeployed :: (Maybe Bool -> f (Maybe Bool))
-> UpdateDeploymentResponse -> f UpdateDeploymentResponse
updateDeploymentResponse_autoDeployed = (UpdateDeploymentResponse -> Maybe Bool)
-> (UpdateDeploymentResponse
    -> Maybe Bool -> UpdateDeploymentResponse)
-> Lens
     UpdateDeploymentResponse
     UpdateDeploymentResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeploymentResponse' {Maybe Bool
autoDeployed :: Maybe Bool
$sel:autoDeployed:UpdateDeploymentResponse' :: UpdateDeploymentResponse -> Maybe Bool
autoDeployed} -> Maybe Bool
autoDeployed) (\s :: UpdateDeploymentResponse
s@UpdateDeploymentResponse' {} Maybe Bool
a -> UpdateDeploymentResponse
s {$sel:autoDeployed:UpdateDeploymentResponse' :: Maybe Bool
autoDeployed = Maybe Bool
a} :: UpdateDeploymentResponse)

-- | May contain additional feedback on the status of an API deployment.
updateDeploymentResponse_deploymentStatusMessage :: Lens.Lens' UpdateDeploymentResponse (Prelude.Maybe Prelude.Text)
updateDeploymentResponse_deploymentStatusMessage :: (Maybe Text -> f (Maybe Text))
-> UpdateDeploymentResponse -> f UpdateDeploymentResponse
updateDeploymentResponse_deploymentStatusMessage = (UpdateDeploymentResponse -> Maybe Text)
-> (UpdateDeploymentResponse
    -> Maybe Text -> UpdateDeploymentResponse)
-> Lens
     UpdateDeploymentResponse
     UpdateDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeploymentResponse' {Maybe Text
deploymentStatusMessage :: Maybe Text
$sel:deploymentStatusMessage:UpdateDeploymentResponse' :: UpdateDeploymentResponse -> Maybe Text
deploymentStatusMessage} -> Maybe Text
deploymentStatusMessage) (\s :: UpdateDeploymentResponse
s@UpdateDeploymentResponse' {} Maybe Text
a -> UpdateDeploymentResponse
s {$sel:deploymentStatusMessage:UpdateDeploymentResponse' :: Maybe Text
deploymentStatusMessage = Maybe Text
a} :: UpdateDeploymentResponse)

-- | The date and time when the Deployment resource was created.
updateDeploymentResponse_createdDate :: Lens.Lens' UpdateDeploymentResponse (Prelude.Maybe Prelude.UTCTime)
updateDeploymentResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDeploymentResponse -> f UpdateDeploymentResponse
updateDeploymentResponse_createdDate = (UpdateDeploymentResponse -> Maybe POSIX)
-> (UpdateDeploymentResponse
    -> Maybe POSIX -> UpdateDeploymentResponse)
-> Lens
     UpdateDeploymentResponse
     UpdateDeploymentResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeploymentResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:UpdateDeploymentResponse' :: UpdateDeploymentResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: UpdateDeploymentResponse
s@UpdateDeploymentResponse' {} Maybe POSIX
a -> UpdateDeploymentResponse
s {$sel:createdDate:UpdateDeploymentResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: UpdateDeploymentResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateDeploymentResponse -> f UpdateDeploymentResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDeploymentResponse
-> f UpdateDeploymentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The status of the deployment: PENDING, FAILED, or SUCCEEDED.
updateDeploymentResponse_deploymentStatus :: Lens.Lens' UpdateDeploymentResponse (Prelude.Maybe DeploymentStatus)
updateDeploymentResponse_deploymentStatus :: (Maybe DeploymentStatus -> f (Maybe DeploymentStatus))
-> UpdateDeploymentResponse -> f UpdateDeploymentResponse
updateDeploymentResponse_deploymentStatus = (UpdateDeploymentResponse -> Maybe DeploymentStatus)
-> (UpdateDeploymentResponse
    -> Maybe DeploymentStatus -> UpdateDeploymentResponse)
-> Lens
     UpdateDeploymentResponse
     UpdateDeploymentResponse
     (Maybe DeploymentStatus)
     (Maybe DeploymentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeploymentResponse' {Maybe DeploymentStatus
deploymentStatus :: Maybe DeploymentStatus
$sel:deploymentStatus:UpdateDeploymentResponse' :: UpdateDeploymentResponse -> Maybe DeploymentStatus
deploymentStatus} -> Maybe DeploymentStatus
deploymentStatus) (\s :: UpdateDeploymentResponse
s@UpdateDeploymentResponse' {} Maybe DeploymentStatus
a -> UpdateDeploymentResponse
s {$sel:deploymentStatus:UpdateDeploymentResponse' :: Maybe DeploymentStatus
deploymentStatus = Maybe DeploymentStatus
a} :: UpdateDeploymentResponse)

-- | The description for the deployment.
updateDeploymentResponse_description :: Lens.Lens' UpdateDeploymentResponse (Prelude.Maybe Prelude.Text)
updateDeploymentResponse_description :: (Maybe Text -> f (Maybe Text))
-> UpdateDeploymentResponse -> f UpdateDeploymentResponse
updateDeploymentResponse_description = (UpdateDeploymentResponse -> Maybe Text)
-> (UpdateDeploymentResponse
    -> Maybe Text -> UpdateDeploymentResponse)
-> Lens
     UpdateDeploymentResponse
     UpdateDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeploymentResponse' {Maybe Text
description :: Maybe Text
$sel:description:UpdateDeploymentResponse' :: UpdateDeploymentResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateDeploymentResponse
s@UpdateDeploymentResponse' {} Maybe Text
a -> UpdateDeploymentResponse
s {$sel:description:UpdateDeploymentResponse' :: Maybe Text
description = Maybe Text
a} :: UpdateDeploymentResponse)

-- | The response's http status code.
updateDeploymentResponse_httpStatus :: Lens.Lens' UpdateDeploymentResponse Prelude.Int
updateDeploymentResponse_httpStatus :: (Int -> f Int)
-> UpdateDeploymentResponse -> f UpdateDeploymentResponse
updateDeploymentResponse_httpStatus = (UpdateDeploymentResponse -> Int)
-> (UpdateDeploymentResponse -> Int -> UpdateDeploymentResponse)
-> Lens UpdateDeploymentResponse UpdateDeploymentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeploymentResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateDeploymentResponse' :: UpdateDeploymentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateDeploymentResponse
s@UpdateDeploymentResponse' {} Int
a -> UpdateDeploymentResponse
s {$sel:httpStatus:UpdateDeploymentResponse' :: Int
httpStatus = Int
a} :: UpdateDeploymentResponse)

instance Prelude.NFData UpdateDeploymentResponse