{-# 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.CloudFormation.RecordHandlerProgress
-- 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)
--
-- Reports progress of a resource handler to CloudFormation.
--
-- Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
-- Do not use this API in your code.
module Amazonka.CloudFormation.RecordHandlerProgress
  ( -- * Creating a Request
    RecordHandlerProgress (..),
    newRecordHandlerProgress,

    -- * Request Lenses
    recordHandlerProgress_resourceModel,
    recordHandlerProgress_statusMessage,
    recordHandlerProgress_errorCode,
    recordHandlerProgress_currentOperationStatus,
    recordHandlerProgress_clientRequestToken,
    recordHandlerProgress_bearerToken,
    recordHandlerProgress_operationStatus,

    -- * Destructuring the Response
    RecordHandlerProgressResponse (..),
    newRecordHandlerProgressResponse,

    -- * Response Lenses
    recordHandlerProgressResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.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:/ 'newRecordHandlerProgress' smart constructor.
data RecordHandlerProgress = RecordHandlerProgress'
  { -- | Reserved for use by the
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
    RecordHandlerProgress -> Maybe Text
resourceModel :: Prelude.Maybe Prelude.Text,
    -- | Reserved for use by the
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
    RecordHandlerProgress -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | Reserved for use by the
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
    RecordHandlerProgress -> Maybe HandlerErrorCode
errorCode :: Prelude.Maybe HandlerErrorCode,
    -- | Reserved for use by the
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
    RecordHandlerProgress -> Maybe OperationStatus
currentOperationStatus :: Prelude.Maybe OperationStatus,
    -- | Reserved for use by the
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
    RecordHandlerProgress -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Reserved for use by the
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
    RecordHandlerProgress -> Text
bearerToken :: Prelude.Text,
    -- | Reserved for use by the
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
    RecordHandlerProgress -> OperationStatus
operationStatus :: OperationStatus
  }
  deriving (RecordHandlerProgress -> RecordHandlerProgress -> Bool
(RecordHandlerProgress -> RecordHandlerProgress -> Bool)
-> (RecordHandlerProgress -> RecordHandlerProgress -> Bool)
-> Eq RecordHandlerProgress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecordHandlerProgress -> RecordHandlerProgress -> Bool
$c/= :: RecordHandlerProgress -> RecordHandlerProgress -> Bool
== :: RecordHandlerProgress -> RecordHandlerProgress -> Bool
$c== :: RecordHandlerProgress -> RecordHandlerProgress -> Bool
Prelude.Eq, ReadPrec [RecordHandlerProgress]
ReadPrec RecordHandlerProgress
Int -> ReadS RecordHandlerProgress
ReadS [RecordHandlerProgress]
(Int -> ReadS RecordHandlerProgress)
-> ReadS [RecordHandlerProgress]
-> ReadPrec RecordHandlerProgress
-> ReadPrec [RecordHandlerProgress]
-> Read RecordHandlerProgress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecordHandlerProgress]
$creadListPrec :: ReadPrec [RecordHandlerProgress]
readPrec :: ReadPrec RecordHandlerProgress
$creadPrec :: ReadPrec RecordHandlerProgress
readList :: ReadS [RecordHandlerProgress]
$creadList :: ReadS [RecordHandlerProgress]
readsPrec :: Int -> ReadS RecordHandlerProgress
$creadsPrec :: Int -> ReadS RecordHandlerProgress
Prelude.Read, Int -> RecordHandlerProgress -> ShowS
[RecordHandlerProgress] -> ShowS
RecordHandlerProgress -> String
(Int -> RecordHandlerProgress -> ShowS)
-> (RecordHandlerProgress -> String)
-> ([RecordHandlerProgress] -> ShowS)
-> Show RecordHandlerProgress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecordHandlerProgress] -> ShowS
$cshowList :: [RecordHandlerProgress] -> ShowS
show :: RecordHandlerProgress -> String
$cshow :: RecordHandlerProgress -> String
showsPrec :: Int -> RecordHandlerProgress -> ShowS
$cshowsPrec :: Int -> RecordHandlerProgress -> ShowS
Prelude.Show, (forall x. RecordHandlerProgress -> Rep RecordHandlerProgress x)
-> (forall x. Rep RecordHandlerProgress x -> RecordHandlerProgress)
-> Generic RecordHandlerProgress
forall x. Rep RecordHandlerProgress x -> RecordHandlerProgress
forall x. RecordHandlerProgress -> Rep RecordHandlerProgress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RecordHandlerProgress x -> RecordHandlerProgress
$cfrom :: forall x. RecordHandlerProgress -> Rep RecordHandlerProgress x
Prelude.Generic)

-- |
-- Create a value of 'RecordHandlerProgress' 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:
--
-- 'resourceModel', 'recordHandlerProgress_resourceModel' - Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
--
-- 'statusMessage', 'recordHandlerProgress_statusMessage' - Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
--
-- 'errorCode', 'recordHandlerProgress_errorCode' - Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
--
-- 'currentOperationStatus', 'recordHandlerProgress_currentOperationStatus' - Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
--
-- 'clientRequestToken', 'recordHandlerProgress_clientRequestToken' - Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
--
-- 'bearerToken', 'recordHandlerProgress_bearerToken' - Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
--
-- 'operationStatus', 'recordHandlerProgress_operationStatus' - Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
newRecordHandlerProgress ::
  -- | 'bearerToken'
  Prelude.Text ->
  -- | 'operationStatus'
  OperationStatus ->
  RecordHandlerProgress
newRecordHandlerProgress :: Text -> OperationStatus -> RecordHandlerProgress
newRecordHandlerProgress
  Text
pBearerToken_
  OperationStatus
pOperationStatus_ =
    RecordHandlerProgress' :: Maybe Text
-> Maybe Text
-> Maybe HandlerErrorCode
-> Maybe OperationStatus
-> Maybe Text
-> Text
-> OperationStatus
-> RecordHandlerProgress
RecordHandlerProgress'
      { $sel:resourceModel:RecordHandlerProgress' :: Maybe Text
resourceModel =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:statusMessage:RecordHandlerProgress' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:errorCode:RecordHandlerProgress' :: Maybe HandlerErrorCode
errorCode = Maybe HandlerErrorCode
forall a. Maybe a
Prelude.Nothing,
        $sel:currentOperationStatus:RecordHandlerProgress' :: Maybe OperationStatus
currentOperationStatus = Maybe OperationStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:RecordHandlerProgress' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:bearerToken:RecordHandlerProgress' :: Text
bearerToken = Text
pBearerToken_,
        $sel:operationStatus:RecordHandlerProgress' :: OperationStatus
operationStatus = OperationStatus
pOperationStatus_
      }

-- | Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
recordHandlerProgress_resourceModel :: Lens.Lens' RecordHandlerProgress (Prelude.Maybe Prelude.Text)
recordHandlerProgress_resourceModel :: (Maybe Text -> f (Maybe Text))
-> RecordHandlerProgress -> f RecordHandlerProgress
recordHandlerProgress_resourceModel = (RecordHandlerProgress -> Maybe Text)
-> (RecordHandlerProgress -> Maybe Text -> RecordHandlerProgress)
-> Lens
     RecordHandlerProgress
     RecordHandlerProgress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecordHandlerProgress' {Maybe Text
resourceModel :: Maybe Text
$sel:resourceModel:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe Text
resourceModel} -> Maybe Text
resourceModel) (\s :: RecordHandlerProgress
s@RecordHandlerProgress' {} Maybe Text
a -> RecordHandlerProgress
s {$sel:resourceModel:RecordHandlerProgress' :: Maybe Text
resourceModel = Maybe Text
a} :: RecordHandlerProgress)

-- | Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
recordHandlerProgress_statusMessage :: Lens.Lens' RecordHandlerProgress (Prelude.Maybe Prelude.Text)
recordHandlerProgress_statusMessage :: (Maybe Text -> f (Maybe Text))
-> RecordHandlerProgress -> f RecordHandlerProgress
recordHandlerProgress_statusMessage = (RecordHandlerProgress -> Maybe Text)
-> (RecordHandlerProgress -> Maybe Text -> RecordHandlerProgress)
-> Lens
     RecordHandlerProgress
     RecordHandlerProgress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecordHandlerProgress' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: RecordHandlerProgress
s@RecordHandlerProgress' {} Maybe Text
a -> RecordHandlerProgress
s {$sel:statusMessage:RecordHandlerProgress' :: Maybe Text
statusMessage = Maybe Text
a} :: RecordHandlerProgress)

-- | Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
recordHandlerProgress_errorCode :: Lens.Lens' RecordHandlerProgress (Prelude.Maybe HandlerErrorCode)
recordHandlerProgress_errorCode :: (Maybe HandlerErrorCode -> f (Maybe HandlerErrorCode))
-> RecordHandlerProgress -> f RecordHandlerProgress
recordHandlerProgress_errorCode = (RecordHandlerProgress -> Maybe HandlerErrorCode)
-> (RecordHandlerProgress
    -> Maybe HandlerErrorCode -> RecordHandlerProgress)
-> Lens
     RecordHandlerProgress
     RecordHandlerProgress
     (Maybe HandlerErrorCode)
     (Maybe HandlerErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecordHandlerProgress' {Maybe HandlerErrorCode
errorCode :: Maybe HandlerErrorCode
$sel:errorCode:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe HandlerErrorCode
errorCode} -> Maybe HandlerErrorCode
errorCode) (\s :: RecordHandlerProgress
s@RecordHandlerProgress' {} Maybe HandlerErrorCode
a -> RecordHandlerProgress
s {$sel:errorCode:RecordHandlerProgress' :: Maybe HandlerErrorCode
errorCode = Maybe HandlerErrorCode
a} :: RecordHandlerProgress)

-- | Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
recordHandlerProgress_currentOperationStatus :: Lens.Lens' RecordHandlerProgress (Prelude.Maybe OperationStatus)
recordHandlerProgress_currentOperationStatus :: (Maybe OperationStatus -> f (Maybe OperationStatus))
-> RecordHandlerProgress -> f RecordHandlerProgress
recordHandlerProgress_currentOperationStatus = (RecordHandlerProgress -> Maybe OperationStatus)
-> (RecordHandlerProgress
    -> Maybe OperationStatus -> RecordHandlerProgress)
-> Lens
     RecordHandlerProgress
     RecordHandlerProgress
     (Maybe OperationStatus)
     (Maybe OperationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecordHandlerProgress' {Maybe OperationStatus
currentOperationStatus :: Maybe OperationStatus
$sel:currentOperationStatus:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe OperationStatus
currentOperationStatus} -> Maybe OperationStatus
currentOperationStatus) (\s :: RecordHandlerProgress
s@RecordHandlerProgress' {} Maybe OperationStatus
a -> RecordHandlerProgress
s {$sel:currentOperationStatus:RecordHandlerProgress' :: Maybe OperationStatus
currentOperationStatus = Maybe OperationStatus
a} :: RecordHandlerProgress)

-- | Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
recordHandlerProgress_clientRequestToken :: Lens.Lens' RecordHandlerProgress (Prelude.Maybe Prelude.Text)
recordHandlerProgress_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> RecordHandlerProgress -> f RecordHandlerProgress
recordHandlerProgress_clientRequestToken = (RecordHandlerProgress -> Maybe Text)
-> (RecordHandlerProgress -> Maybe Text -> RecordHandlerProgress)
-> Lens
     RecordHandlerProgress
     RecordHandlerProgress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecordHandlerProgress' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: RecordHandlerProgress
s@RecordHandlerProgress' {} Maybe Text
a -> RecordHandlerProgress
s {$sel:clientRequestToken:RecordHandlerProgress' :: Maybe Text
clientRequestToken = Maybe Text
a} :: RecordHandlerProgress)

-- | Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
recordHandlerProgress_bearerToken :: Lens.Lens' RecordHandlerProgress Prelude.Text
recordHandlerProgress_bearerToken :: (Text -> f Text)
-> RecordHandlerProgress -> f RecordHandlerProgress
recordHandlerProgress_bearerToken = (RecordHandlerProgress -> Text)
-> (RecordHandlerProgress -> Text -> RecordHandlerProgress)
-> Lens RecordHandlerProgress RecordHandlerProgress Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecordHandlerProgress' {Text
bearerToken :: Text
$sel:bearerToken:RecordHandlerProgress' :: RecordHandlerProgress -> Text
bearerToken} -> Text
bearerToken) (\s :: RecordHandlerProgress
s@RecordHandlerProgress' {} Text
a -> RecordHandlerProgress
s {$sel:bearerToken:RecordHandlerProgress' :: Text
bearerToken = Text
a} :: RecordHandlerProgress)

-- | Reserved for use by the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html CloudFormation CLI>.
recordHandlerProgress_operationStatus :: Lens.Lens' RecordHandlerProgress OperationStatus
recordHandlerProgress_operationStatus :: (OperationStatus -> f OperationStatus)
-> RecordHandlerProgress -> f RecordHandlerProgress
recordHandlerProgress_operationStatus = (RecordHandlerProgress -> OperationStatus)
-> (RecordHandlerProgress
    -> OperationStatus -> RecordHandlerProgress)
-> Lens
     RecordHandlerProgress
     RecordHandlerProgress
     OperationStatus
     OperationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecordHandlerProgress' {OperationStatus
operationStatus :: OperationStatus
$sel:operationStatus:RecordHandlerProgress' :: RecordHandlerProgress -> OperationStatus
operationStatus} -> OperationStatus
operationStatus) (\s :: RecordHandlerProgress
s@RecordHandlerProgress' {} OperationStatus
a -> RecordHandlerProgress
s {$sel:operationStatus:RecordHandlerProgress' :: OperationStatus
operationStatus = OperationStatus
a} :: RecordHandlerProgress)

instance Core.AWSRequest RecordHandlerProgress where
  type
    AWSResponse RecordHandlerProgress =
      RecordHandlerProgressResponse
  request :: RecordHandlerProgress -> Request RecordHandlerProgress
request = Service -> RecordHandlerProgress -> Request RecordHandlerProgress
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy RecordHandlerProgress
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RecordHandlerProgress)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse RecordHandlerProgress))
-> Logger
-> Service
-> Proxy RecordHandlerProgress
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RecordHandlerProgress)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"RecordHandlerProgressResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> RecordHandlerProgressResponse
RecordHandlerProgressResponse'
            (Int -> RecordHandlerProgressResponse)
-> Either String Int -> Either String RecordHandlerProgressResponse
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))
      )

instance Prelude.Hashable RecordHandlerProgress

instance Prelude.NFData RecordHandlerProgress

instance Core.ToHeaders RecordHandlerProgress where
  toHeaders :: RecordHandlerProgress -> ResponseHeaders
toHeaders = ResponseHeaders -> RecordHandlerProgress -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery RecordHandlerProgress where
  toQuery :: RecordHandlerProgress -> QueryString
toQuery RecordHandlerProgress' {Maybe Text
Maybe HandlerErrorCode
Maybe OperationStatus
Text
OperationStatus
operationStatus :: OperationStatus
bearerToken :: Text
clientRequestToken :: Maybe Text
currentOperationStatus :: Maybe OperationStatus
errorCode :: Maybe HandlerErrorCode
statusMessage :: Maybe Text
resourceModel :: Maybe Text
$sel:operationStatus:RecordHandlerProgress' :: RecordHandlerProgress -> OperationStatus
$sel:bearerToken:RecordHandlerProgress' :: RecordHandlerProgress -> Text
$sel:clientRequestToken:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe Text
$sel:currentOperationStatus:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe OperationStatus
$sel:errorCode:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe HandlerErrorCode
$sel:statusMessage:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe Text
$sel:resourceModel:RecordHandlerProgress' :: RecordHandlerProgress -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"RecordHandlerProgress" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"ResourceModel" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
resourceModel,
        ByteString
"StatusMessage" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
statusMessage,
        ByteString
"ErrorCode" ByteString -> Maybe HandlerErrorCode -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe HandlerErrorCode
errorCode,
        ByteString
"CurrentOperationStatus"
          ByteString -> Maybe OperationStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe OperationStatus
currentOperationStatus,
        ByteString
"ClientRequestToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clientRequestToken,
        ByteString
"BearerToken" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
bearerToken,
        ByteString
"OperationStatus" ByteString -> OperationStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: OperationStatus
operationStatus
      ]

-- | /See:/ 'newRecordHandlerProgressResponse' smart constructor.
data RecordHandlerProgressResponse = RecordHandlerProgressResponse'
  { -- | The response's http status code.
    RecordHandlerProgressResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RecordHandlerProgressResponse
-> RecordHandlerProgressResponse -> Bool
(RecordHandlerProgressResponse
 -> RecordHandlerProgressResponse -> Bool)
-> (RecordHandlerProgressResponse
    -> RecordHandlerProgressResponse -> Bool)
-> Eq RecordHandlerProgressResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecordHandlerProgressResponse
-> RecordHandlerProgressResponse -> Bool
$c/= :: RecordHandlerProgressResponse
-> RecordHandlerProgressResponse -> Bool
== :: RecordHandlerProgressResponse
-> RecordHandlerProgressResponse -> Bool
$c== :: RecordHandlerProgressResponse
-> RecordHandlerProgressResponse -> Bool
Prelude.Eq, ReadPrec [RecordHandlerProgressResponse]
ReadPrec RecordHandlerProgressResponse
Int -> ReadS RecordHandlerProgressResponse
ReadS [RecordHandlerProgressResponse]
(Int -> ReadS RecordHandlerProgressResponse)
-> ReadS [RecordHandlerProgressResponse]
-> ReadPrec RecordHandlerProgressResponse
-> ReadPrec [RecordHandlerProgressResponse]
-> Read RecordHandlerProgressResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecordHandlerProgressResponse]
$creadListPrec :: ReadPrec [RecordHandlerProgressResponse]
readPrec :: ReadPrec RecordHandlerProgressResponse
$creadPrec :: ReadPrec RecordHandlerProgressResponse
readList :: ReadS [RecordHandlerProgressResponse]
$creadList :: ReadS [RecordHandlerProgressResponse]
readsPrec :: Int -> ReadS RecordHandlerProgressResponse
$creadsPrec :: Int -> ReadS RecordHandlerProgressResponse
Prelude.Read, Int -> RecordHandlerProgressResponse -> ShowS
[RecordHandlerProgressResponse] -> ShowS
RecordHandlerProgressResponse -> String
(Int -> RecordHandlerProgressResponse -> ShowS)
-> (RecordHandlerProgressResponse -> String)
-> ([RecordHandlerProgressResponse] -> ShowS)
-> Show RecordHandlerProgressResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecordHandlerProgressResponse] -> ShowS
$cshowList :: [RecordHandlerProgressResponse] -> ShowS
show :: RecordHandlerProgressResponse -> String
$cshow :: RecordHandlerProgressResponse -> String
showsPrec :: Int -> RecordHandlerProgressResponse -> ShowS
$cshowsPrec :: Int -> RecordHandlerProgressResponse -> ShowS
Prelude.Show, (forall x.
 RecordHandlerProgressResponse
 -> Rep RecordHandlerProgressResponse x)
-> (forall x.
    Rep RecordHandlerProgressResponse x
    -> RecordHandlerProgressResponse)
-> Generic RecordHandlerProgressResponse
forall x.
Rep RecordHandlerProgressResponse x
-> RecordHandlerProgressResponse
forall x.
RecordHandlerProgressResponse
-> Rep RecordHandlerProgressResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RecordHandlerProgressResponse x
-> RecordHandlerProgressResponse
$cfrom :: forall x.
RecordHandlerProgressResponse
-> Rep RecordHandlerProgressResponse x
Prelude.Generic)

-- |
-- Create a value of 'RecordHandlerProgressResponse' 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:
--
-- 'httpStatus', 'recordHandlerProgressResponse_httpStatus' - The response's http status code.
newRecordHandlerProgressResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RecordHandlerProgressResponse
newRecordHandlerProgressResponse :: Int -> RecordHandlerProgressResponse
newRecordHandlerProgressResponse Int
pHttpStatus_ =
  RecordHandlerProgressResponse' :: Int -> RecordHandlerProgressResponse
RecordHandlerProgressResponse'
    { $sel:httpStatus:RecordHandlerProgressResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance Prelude.NFData RecordHandlerProgressResponse