{-# 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.CodePipeline.PutApprovalResult
-- 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)
--
-- Provides the response to a manual approval request to AWS CodePipeline.
-- Valid responses include Approved and Rejected.
module Amazonka.CodePipeline.PutApprovalResult
  ( -- * Creating a Request
    PutApprovalResult (..),
    newPutApprovalResult,

    -- * Request Lenses
    putApprovalResult_pipelineName,
    putApprovalResult_stageName,
    putApprovalResult_actionName,
    putApprovalResult_result,
    putApprovalResult_token,

    -- * Destructuring the Response
    PutApprovalResultResponse (..),
    newPutApprovalResultResponse,

    -- * Response Lenses
    putApprovalResultResponse_approvedAt,
    putApprovalResultResponse_httpStatus,
  )
where

import Amazonka.CodePipeline.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

-- | Represents the input of a @PutApprovalResult@ action.
--
-- /See:/ 'newPutApprovalResult' smart constructor.
data PutApprovalResult = PutApprovalResult'
  { -- | The name of the pipeline that contains the action.
    PutApprovalResult -> Text
pipelineName :: Prelude.Text,
    -- | The name of the stage that contains the action.
    PutApprovalResult -> Text
stageName :: Prelude.Text,
    -- | The name of the action for which approval is requested.
    PutApprovalResult -> Text
actionName :: Prelude.Text,
    -- | Represents information about the result of the approval request.
    PutApprovalResult -> ApprovalResult
result :: ApprovalResult,
    -- | The system-generated token used to identify a unique approval request.
    -- The token for each open approval request can be obtained using the
    -- GetPipelineState action. It is used to validate that the approval
    -- request corresponding to this token is still valid.
    PutApprovalResult -> Text
token :: Prelude.Text
  }
  deriving (PutApprovalResult -> PutApprovalResult -> Bool
(PutApprovalResult -> PutApprovalResult -> Bool)
-> (PutApprovalResult -> PutApprovalResult -> Bool)
-> Eq PutApprovalResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutApprovalResult -> PutApprovalResult -> Bool
$c/= :: PutApprovalResult -> PutApprovalResult -> Bool
== :: PutApprovalResult -> PutApprovalResult -> Bool
$c== :: PutApprovalResult -> PutApprovalResult -> Bool
Prelude.Eq, ReadPrec [PutApprovalResult]
ReadPrec PutApprovalResult
Int -> ReadS PutApprovalResult
ReadS [PutApprovalResult]
(Int -> ReadS PutApprovalResult)
-> ReadS [PutApprovalResult]
-> ReadPrec PutApprovalResult
-> ReadPrec [PutApprovalResult]
-> Read PutApprovalResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutApprovalResult]
$creadListPrec :: ReadPrec [PutApprovalResult]
readPrec :: ReadPrec PutApprovalResult
$creadPrec :: ReadPrec PutApprovalResult
readList :: ReadS [PutApprovalResult]
$creadList :: ReadS [PutApprovalResult]
readsPrec :: Int -> ReadS PutApprovalResult
$creadsPrec :: Int -> ReadS PutApprovalResult
Prelude.Read, Int -> PutApprovalResult -> ShowS
[PutApprovalResult] -> ShowS
PutApprovalResult -> String
(Int -> PutApprovalResult -> ShowS)
-> (PutApprovalResult -> String)
-> ([PutApprovalResult] -> ShowS)
-> Show PutApprovalResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutApprovalResult] -> ShowS
$cshowList :: [PutApprovalResult] -> ShowS
show :: PutApprovalResult -> String
$cshow :: PutApprovalResult -> String
showsPrec :: Int -> PutApprovalResult -> ShowS
$cshowsPrec :: Int -> PutApprovalResult -> ShowS
Prelude.Show, (forall x. PutApprovalResult -> Rep PutApprovalResult x)
-> (forall x. Rep PutApprovalResult x -> PutApprovalResult)
-> Generic PutApprovalResult
forall x. Rep PutApprovalResult x -> PutApprovalResult
forall x. PutApprovalResult -> Rep PutApprovalResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutApprovalResult x -> PutApprovalResult
$cfrom :: forall x. PutApprovalResult -> Rep PutApprovalResult x
Prelude.Generic)

-- |
-- Create a value of 'PutApprovalResult' 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:
--
-- 'pipelineName', 'putApprovalResult_pipelineName' - The name of the pipeline that contains the action.
--
-- 'stageName', 'putApprovalResult_stageName' - The name of the stage that contains the action.
--
-- 'actionName', 'putApprovalResult_actionName' - The name of the action for which approval is requested.
--
-- 'result', 'putApprovalResult_result' - Represents information about the result of the approval request.
--
-- 'token', 'putApprovalResult_token' - The system-generated token used to identify a unique approval request.
-- The token for each open approval request can be obtained using the
-- GetPipelineState action. It is used to validate that the approval
-- request corresponding to this token is still valid.
newPutApprovalResult ::
  -- | 'pipelineName'
  Prelude.Text ->
  -- | 'stageName'
  Prelude.Text ->
  -- | 'actionName'
  Prelude.Text ->
  -- | 'result'
  ApprovalResult ->
  -- | 'token'
  Prelude.Text ->
  PutApprovalResult
newPutApprovalResult :: Text -> Text -> Text -> ApprovalResult -> Text -> PutApprovalResult
newPutApprovalResult
  Text
pPipelineName_
  Text
pStageName_
  Text
pActionName_
  ApprovalResult
pResult_
  Text
pToken_ =
    PutApprovalResult' :: Text -> Text -> Text -> ApprovalResult -> Text -> PutApprovalResult
PutApprovalResult'
      { $sel:pipelineName:PutApprovalResult' :: Text
pipelineName = Text
pPipelineName_,
        $sel:stageName:PutApprovalResult' :: Text
stageName = Text
pStageName_,
        $sel:actionName:PutApprovalResult' :: Text
actionName = Text
pActionName_,
        $sel:result:PutApprovalResult' :: ApprovalResult
result = ApprovalResult
pResult_,
        $sel:token:PutApprovalResult' :: Text
token = Text
pToken_
      }

-- | The name of the pipeline that contains the action.
putApprovalResult_pipelineName :: Lens.Lens' PutApprovalResult Prelude.Text
putApprovalResult_pipelineName :: (Text -> f Text) -> PutApprovalResult -> f PutApprovalResult
putApprovalResult_pipelineName = (PutApprovalResult -> Text)
-> (PutApprovalResult -> Text -> PutApprovalResult)
-> Lens PutApprovalResult PutApprovalResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutApprovalResult' {Text
pipelineName :: Text
$sel:pipelineName:PutApprovalResult' :: PutApprovalResult -> Text
pipelineName} -> Text
pipelineName) (\s :: PutApprovalResult
s@PutApprovalResult' {} Text
a -> PutApprovalResult
s {$sel:pipelineName:PutApprovalResult' :: Text
pipelineName = Text
a} :: PutApprovalResult)

-- | The name of the stage that contains the action.
putApprovalResult_stageName :: Lens.Lens' PutApprovalResult Prelude.Text
putApprovalResult_stageName :: (Text -> f Text) -> PutApprovalResult -> f PutApprovalResult
putApprovalResult_stageName = (PutApprovalResult -> Text)
-> (PutApprovalResult -> Text -> PutApprovalResult)
-> Lens PutApprovalResult PutApprovalResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutApprovalResult' {Text
stageName :: Text
$sel:stageName:PutApprovalResult' :: PutApprovalResult -> Text
stageName} -> Text
stageName) (\s :: PutApprovalResult
s@PutApprovalResult' {} Text
a -> PutApprovalResult
s {$sel:stageName:PutApprovalResult' :: Text
stageName = Text
a} :: PutApprovalResult)

-- | The name of the action for which approval is requested.
putApprovalResult_actionName :: Lens.Lens' PutApprovalResult Prelude.Text
putApprovalResult_actionName :: (Text -> f Text) -> PutApprovalResult -> f PutApprovalResult
putApprovalResult_actionName = (PutApprovalResult -> Text)
-> (PutApprovalResult -> Text -> PutApprovalResult)
-> Lens PutApprovalResult PutApprovalResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutApprovalResult' {Text
actionName :: Text
$sel:actionName:PutApprovalResult' :: PutApprovalResult -> Text
actionName} -> Text
actionName) (\s :: PutApprovalResult
s@PutApprovalResult' {} Text
a -> PutApprovalResult
s {$sel:actionName:PutApprovalResult' :: Text
actionName = Text
a} :: PutApprovalResult)

-- | Represents information about the result of the approval request.
putApprovalResult_result :: Lens.Lens' PutApprovalResult ApprovalResult
putApprovalResult_result :: (ApprovalResult -> f ApprovalResult)
-> PutApprovalResult -> f PutApprovalResult
putApprovalResult_result = (PutApprovalResult -> ApprovalResult)
-> (PutApprovalResult -> ApprovalResult -> PutApprovalResult)
-> Lens
     PutApprovalResult PutApprovalResult ApprovalResult ApprovalResult
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutApprovalResult' {ApprovalResult
result :: ApprovalResult
$sel:result:PutApprovalResult' :: PutApprovalResult -> ApprovalResult
result} -> ApprovalResult
result) (\s :: PutApprovalResult
s@PutApprovalResult' {} ApprovalResult
a -> PutApprovalResult
s {$sel:result:PutApprovalResult' :: ApprovalResult
result = ApprovalResult
a} :: PutApprovalResult)

-- | The system-generated token used to identify a unique approval request.
-- The token for each open approval request can be obtained using the
-- GetPipelineState action. It is used to validate that the approval
-- request corresponding to this token is still valid.
putApprovalResult_token :: Lens.Lens' PutApprovalResult Prelude.Text
putApprovalResult_token :: (Text -> f Text) -> PutApprovalResult -> f PutApprovalResult
putApprovalResult_token = (PutApprovalResult -> Text)
-> (PutApprovalResult -> Text -> PutApprovalResult)
-> Lens PutApprovalResult PutApprovalResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutApprovalResult' {Text
token :: Text
$sel:token:PutApprovalResult' :: PutApprovalResult -> Text
token} -> Text
token) (\s :: PutApprovalResult
s@PutApprovalResult' {} Text
a -> PutApprovalResult
s {$sel:token:PutApprovalResult' :: Text
token = Text
a} :: PutApprovalResult)

instance Core.AWSRequest PutApprovalResult where
  type
    AWSResponse PutApprovalResult =
      PutApprovalResultResponse
  request :: PutApprovalResult -> Request PutApprovalResult
request = Service -> PutApprovalResult -> Request PutApprovalResult
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutApprovalResult
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutApprovalResult)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutApprovalResult))
-> Logger
-> Service
-> Proxy PutApprovalResult
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutApprovalResult)))
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 POSIX -> Int -> PutApprovalResultResponse
PutApprovalResultResponse'
            (Maybe POSIX -> Int -> PutApprovalResultResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> PutApprovalResultResponse)
forall (f :: * -> *) a b. Functor 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
"approvedAt")
            Either String (Int -> PutApprovalResultResponse)
-> Either String Int -> Either String PutApprovalResultResponse
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 PutApprovalResult

instance Prelude.NFData PutApprovalResult

instance Core.ToHeaders PutApprovalResult where
  toHeaders :: PutApprovalResult -> ResponseHeaders
toHeaders =
    ResponseHeaders -> PutApprovalResult -> 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
"CodePipeline_20150709.PutApprovalResult" ::
                          Prelude.ByteString
                      ),
            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 PutApprovalResult where
  toJSON :: PutApprovalResult -> Value
toJSON PutApprovalResult' {Text
ApprovalResult
token :: Text
result :: ApprovalResult
actionName :: Text
stageName :: Text
pipelineName :: Text
$sel:token:PutApprovalResult' :: PutApprovalResult -> Text
$sel:result:PutApprovalResult' :: PutApprovalResult -> ApprovalResult
$sel:actionName:PutApprovalResult' :: PutApprovalResult -> Text
$sel:stageName:PutApprovalResult' :: PutApprovalResult -> Text
$sel:pipelineName:PutApprovalResult' :: PutApprovalResult -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"pipelineName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"stageName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
stageName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"actionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
actionName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"result" Text -> ApprovalResult -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ApprovalResult
result),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"token" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
token)
          ]
      )

instance Core.ToPath PutApprovalResult where
  toPath :: PutApprovalResult -> ByteString
toPath = ByteString -> PutApprovalResult -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | Represents the output of a @PutApprovalResult@ action.
--
-- /See:/ 'newPutApprovalResultResponse' smart constructor.
data PutApprovalResultResponse = PutApprovalResultResponse'
  { -- | The timestamp showing when the approval or rejection was submitted.
    PutApprovalResultResponse -> Maybe POSIX
approvedAt :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    PutApprovalResultResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutApprovalResultResponse -> PutApprovalResultResponse -> Bool
(PutApprovalResultResponse -> PutApprovalResultResponse -> Bool)
-> (PutApprovalResultResponse -> PutApprovalResultResponse -> Bool)
-> Eq PutApprovalResultResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutApprovalResultResponse -> PutApprovalResultResponse -> Bool
$c/= :: PutApprovalResultResponse -> PutApprovalResultResponse -> Bool
== :: PutApprovalResultResponse -> PutApprovalResultResponse -> Bool
$c== :: PutApprovalResultResponse -> PutApprovalResultResponse -> Bool
Prelude.Eq, ReadPrec [PutApprovalResultResponse]
ReadPrec PutApprovalResultResponse
Int -> ReadS PutApprovalResultResponse
ReadS [PutApprovalResultResponse]
(Int -> ReadS PutApprovalResultResponse)
-> ReadS [PutApprovalResultResponse]
-> ReadPrec PutApprovalResultResponse
-> ReadPrec [PutApprovalResultResponse]
-> Read PutApprovalResultResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutApprovalResultResponse]
$creadListPrec :: ReadPrec [PutApprovalResultResponse]
readPrec :: ReadPrec PutApprovalResultResponse
$creadPrec :: ReadPrec PutApprovalResultResponse
readList :: ReadS [PutApprovalResultResponse]
$creadList :: ReadS [PutApprovalResultResponse]
readsPrec :: Int -> ReadS PutApprovalResultResponse
$creadsPrec :: Int -> ReadS PutApprovalResultResponse
Prelude.Read, Int -> PutApprovalResultResponse -> ShowS
[PutApprovalResultResponse] -> ShowS
PutApprovalResultResponse -> String
(Int -> PutApprovalResultResponse -> ShowS)
-> (PutApprovalResultResponse -> String)
-> ([PutApprovalResultResponse] -> ShowS)
-> Show PutApprovalResultResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutApprovalResultResponse] -> ShowS
$cshowList :: [PutApprovalResultResponse] -> ShowS
show :: PutApprovalResultResponse -> String
$cshow :: PutApprovalResultResponse -> String
showsPrec :: Int -> PutApprovalResultResponse -> ShowS
$cshowsPrec :: Int -> PutApprovalResultResponse -> ShowS
Prelude.Show, (forall x.
 PutApprovalResultResponse -> Rep PutApprovalResultResponse x)
-> (forall x.
    Rep PutApprovalResultResponse x -> PutApprovalResultResponse)
-> Generic PutApprovalResultResponse
forall x.
Rep PutApprovalResultResponse x -> PutApprovalResultResponse
forall x.
PutApprovalResultResponse -> Rep PutApprovalResultResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutApprovalResultResponse x -> PutApprovalResultResponse
$cfrom :: forall x.
PutApprovalResultResponse -> Rep PutApprovalResultResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutApprovalResultResponse' 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:
--
-- 'approvedAt', 'putApprovalResultResponse_approvedAt' - The timestamp showing when the approval or rejection was submitted.
--
-- 'httpStatus', 'putApprovalResultResponse_httpStatus' - The response's http status code.
newPutApprovalResultResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutApprovalResultResponse
newPutApprovalResultResponse :: Int -> PutApprovalResultResponse
newPutApprovalResultResponse Int
pHttpStatus_ =
  PutApprovalResultResponse' :: Maybe POSIX -> Int -> PutApprovalResultResponse
PutApprovalResultResponse'
    { $sel:approvedAt:PutApprovalResultResponse' :: Maybe POSIX
approvedAt =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutApprovalResultResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The timestamp showing when the approval or rejection was submitted.
putApprovalResultResponse_approvedAt :: Lens.Lens' PutApprovalResultResponse (Prelude.Maybe Prelude.UTCTime)
putApprovalResultResponse_approvedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutApprovalResultResponse -> f PutApprovalResultResponse
putApprovalResultResponse_approvedAt = (PutApprovalResultResponse -> Maybe POSIX)
-> (PutApprovalResultResponse
    -> Maybe POSIX -> PutApprovalResultResponse)
-> Lens
     PutApprovalResultResponse
     PutApprovalResultResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutApprovalResultResponse' {Maybe POSIX
approvedAt :: Maybe POSIX
$sel:approvedAt:PutApprovalResultResponse' :: PutApprovalResultResponse -> Maybe POSIX
approvedAt} -> Maybe POSIX
approvedAt) (\s :: PutApprovalResultResponse
s@PutApprovalResultResponse' {} Maybe POSIX
a -> PutApprovalResultResponse
s {$sel:approvedAt:PutApprovalResultResponse' :: Maybe POSIX
approvedAt = Maybe POSIX
a} :: PutApprovalResultResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutApprovalResultResponse -> f PutApprovalResultResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutApprovalResultResponse
-> f PutApprovalResultResponse
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 response's http status code.
putApprovalResultResponse_httpStatus :: Lens.Lens' PutApprovalResultResponse Prelude.Int
putApprovalResultResponse_httpStatus :: (Int -> f Int)
-> PutApprovalResultResponse -> f PutApprovalResultResponse
putApprovalResultResponse_httpStatus = (PutApprovalResultResponse -> Int)
-> (PutApprovalResultResponse -> Int -> PutApprovalResultResponse)
-> Lens PutApprovalResultResponse PutApprovalResultResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutApprovalResultResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutApprovalResultResponse' :: PutApprovalResultResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutApprovalResultResponse
s@PutApprovalResultResponse' {} Int
a -> PutApprovalResultResponse
s {$sel:httpStatus:PutApprovalResultResponse' :: Int
httpStatus = Int
a} :: PutApprovalResultResponse)

instance Prelude.NFData PutApprovalResultResponse