{-# 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.GetDeployment
-- 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)
--
-- Gets a Deployment.
module Amazonka.ApiGatewayV2.GetDeployment
  ( -- * Creating a Request
    GetDeployment (..),
    newGetDeployment,

    -- * Request Lenses
    getDeployment_apiId,
    getDeployment_deploymentId,

    -- * Destructuring the Response
    GetDeploymentResponse (..),
    newGetDeploymentResponse,

    -- * Response Lenses
    getDeploymentResponse_deploymentId,
    getDeploymentResponse_autoDeployed,
    getDeploymentResponse_deploymentStatusMessage,
    getDeploymentResponse_createdDate,
    getDeploymentResponse_deploymentStatus,
    getDeploymentResponse_description,
    getDeploymentResponse_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

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

-- |
-- Create a value of 'GetDeployment' 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:
--
-- 'apiId', 'getDeployment_apiId' - The API identifier.
--
-- 'deploymentId', 'getDeployment_deploymentId' - The deployment ID.
newGetDeployment ::
  -- | 'apiId'
  Prelude.Text ->
  -- | 'deploymentId'
  Prelude.Text ->
  GetDeployment
newGetDeployment :: Text -> Text -> GetDeployment
newGetDeployment Text
pApiId_ Text
pDeploymentId_ =
  GetDeployment' :: Text -> Text -> GetDeployment
GetDeployment'
    { $sel:apiId:GetDeployment' :: Text
apiId = Text
pApiId_,
      $sel:deploymentId:GetDeployment' :: Text
deploymentId = Text
pDeploymentId_
    }

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

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

instance Core.AWSRequest GetDeployment where
  type
    AWSResponse GetDeployment =
      GetDeploymentResponse
  request :: GetDeployment -> Request GetDeployment
request = Service -> GetDeployment -> Request GetDeployment
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDeployment)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDeployment))
-> Logger
-> Service
-> Proxy GetDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDeployment)))
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
-> GetDeploymentResponse
GetDeploymentResponse'
            (Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe DeploymentStatus
 -> Maybe Text
 -> Int
 -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe DeploymentStatus
      -> Maybe Text
      -> Int
      -> GetDeploymentResponse)
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
   -> GetDeploymentResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe DeploymentStatus
      -> Maybe Text
      -> Int
      -> GetDeploymentResponse)
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
   -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe DeploymentStatus
      -> Maybe Text
      -> Int
      -> GetDeploymentResponse)
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
   -> GetDeploymentResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe DeploymentStatus
      -> Maybe Text -> Int -> GetDeploymentResponse)
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 -> GetDeploymentResponse)
-> Either String (Maybe DeploymentStatus)
-> Either String (Maybe Text -> Int -> GetDeploymentResponse)
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 -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetDeploymentResponse)
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 -> GetDeploymentResponse)
-> Either String Int -> Either String GetDeploymentResponse
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 GetDeployment

instance Prelude.NFData GetDeployment

instance Core.ToHeaders GetDeployment where
  toHeaders :: GetDeployment -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDeployment -> 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.ToPath GetDeployment where
  toPath :: GetDeployment -> ByteString
toPath GetDeployment' {Text
deploymentId :: Text
apiId :: Text
$sel:deploymentId:GetDeployment' :: GetDeployment -> Text
$sel:apiId:GetDeployment' :: GetDeployment -> 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 GetDeployment where
  toQuery :: GetDeployment -> QueryString
toQuery = QueryString -> GetDeployment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'GetDeploymentResponse' 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', 'getDeploymentResponse_deploymentId' - The identifier for the deployment.
--
-- 'autoDeployed', 'getDeploymentResponse_autoDeployed' - Specifies whether a deployment was automatically released.
--
-- 'deploymentStatusMessage', 'getDeploymentResponse_deploymentStatusMessage' - May contain additional feedback on the status of an API deployment.
--
-- 'createdDate', 'getDeploymentResponse_createdDate' - The date and time when the Deployment resource was created.
--
-- 'deploymentStatus', 'getDeploymentResponse_deploymentStatus' - The status of the deployment: PENDING, FAILED, or SUCCEEDED.
--
-- 'description', 'getDeploymentResponse_description' - The description for the deployment.
--
-- 'httpStatus', 'getDeploymentResponse_httpStatus' - The response's http status code.
newGetDeploymentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDeploymentResponse
newGetDeploymentResponse :: Int -> GetDeploymentResponse
newGetDeploymentResponse Int
pHttpStatus_ =
  GetDeploymentResponse' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe DeploymentStatus
-> Maybe Text
-> Int
-> GetDeploymentResponse
GetDeploymentResponse'
    { $sel:deploymentId:GetDeploymentResponse' :: Maybe Text
deploymentId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeployed:GetDeploymentResponse' :: Maybe Bool
autoDeployed = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentStatusMessage:GetDeploymentResponse' :: Maybe Text
deploymentStatusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:GetDeploymentResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentStatus:GetDeploymentResponse' :: Maybe DeploymentStatus
deploymentStatus = Maybe DeploymentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetDeploymentResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDeploymentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

-- | The date and time when the Deployment resource was created.
getDeploymentResponse_createdDate :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.UTCTime)
getDeploymentResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_createdDate = (GetDeploymentResponse -> Maybe POSIX)
-> (GetDeploymentResponse -> Maybe POSIX -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe POSIX
a -> GetDeploymentResponse
s {$sel:createdDate:GetDeploymentResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: GetDeploymentResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDeploymentResponse -> f GetDeploymentResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDeploymentResponse
-> f GetDeploymentResponse
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.
getDeploymentResponse_deploymentStatus :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe DeploymentStatus)
getDeploymentResponse_deploymentStatus :: (Maybe DeploymentStatus -> f (Maybe DeploymentStatus))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_deploymentStatus = (GetDeploymentResponse -> Maybe DeploymentStatus)
-> (GetDeploymentResponse
    -> Maybe DeploymentStatus -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe DeploymentStatus)
     (Maybe DeploymentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe DeploymentStatus
deploymentStatus :: Maybe DeploymentStatus
$sel:deploymentStatus:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe DeploymentStatus
deploymentStatus} -> Maybe DeploymentStatus
deploymentStatus) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe DeploymentStatus
a -> GetDeploymentResponse
s {$sel:deploymentStatus:GetDeploymentResponse' :: Maybe DeploymentStatus
deploymentStatus = Maybe DeploymentStatus
a} :: GetDeploymentResponse)

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

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

instance Prelude.NFData GetDeploymentResponse