{-# 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.ChimeSDKMessaging.ChannelFlowCallback
-- 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)
--
-- Calls back Chime SDK Messaging with a processing response message. This
-- should be invoked from the processor Lambda. This is a developer API.
--
-- You can return one of the following processing responses:
--
-- -   Update message content or metadata
--
-- -   Deny a message
--
-- -   Make no changes to the message
module Amazonka.ChimeSDKMessaging.ChannelFlowCallback
  ( -- * Creating a Request
    ChannelFlowCallback (..),
    newChannelFlowCallback,

    -- * Request Lenses
    channelFlowCallback_deleteResource,
    channelFlowCallback_callbackId,
    channelFlowCallback_channelArn,
    channelFlowCallback_channelMessage,

    -- * Destructuring the Response
    ChannelFlowCallbackResponse (..),
    newChannelFlowCallbackResponse,

    -- * Response Lenses
    channelFlowCallbackResponse_callbackId,
    channelFlowCallbackResponse_channelArn,
    channelFlowCallbackResponse_httpStatus,
  )
where

import Amazonka.ChimeSDKMessaging.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:/ 'newChannelFlowCallback' smart constructor.
data ChannelFlowCallback = ChannelFlowCallback'
  { -- | When a processor determines that a message needs to be @DENIED@, pass
    -- this parameter with a value of true.
    ChannelFlowCallback -> Maybe Bool
deleteResource :: Prelude.Maybe Prelude.Bool,
    -- | The identifier passed to the processor by the service when invoked. Use
    -- the identifier to call back the service.
    ChannelFlowCallback -> Text
callbackId :: Prelude.Text,
    -- | The ARN of the channel.
    ChannelFlowCallback -> Text
channelArn :: Prelude.Text,
    -- | Stores information about the processed message.
    ChannelFlowCallback -> ChannelMessageCallback
channelMessage :: ChannelMessageCallback
  }
  deriving (ChannelFlowCallback -> ChannelFlowCallback -> Bool
(ChannelFlowCallback -> ChannelFlowCallback -> Bool)
-> (ChannelFlowCallback -> ChannelFlowCallback -> Bool)
-> Eq ChannelFlowCallback
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelFlowCallback -> ChannelFlowCallback -> Bool
$c/= :: ChannelFlowCallback -> ChannelFlowCallback -> Bool
== :: ChannelFlowCallback -> ChannelFlowCallback -> Bool
$c== :: ChannelFlowCallback -> ChannelFlowCallback -> Bool
Prelude.Eq, Int -> ChannelFlowCallback -> ShowS
[ChannelFlowCallback] -> ShowS
ChannelFlowCallback -> String
(Int -> ChannelFlowCallback -> ShowS)
-> (ChannelFlowCallback -> String)
-> ([ChannelFlowCallback] -> ShowS)
-> Show ChannelFlowCallback
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelFlowCallback] -> ShowS
$cshowList :: [ChannelFlowCallback] -> ShowS
show :: ChannelFlowCallback -> String
$cshow :: ChannelFlowCallback -> String
showsPrec :: Int -> ChannelFlowCallback -> ShowS
$cshowsPrec :: Int -> ChannelFlowCallback -> ShowS
Prelude.Show, (forall x. ChannelFlowCallback -> Rep ChannelFlowCallback x)
-> (forall x. Rep ChannelFlowCallback x -> ChannelFlowCallback)
-> Generic ChannelFlowCallback
forall x. Rep ChannelFlowCallback x -> ChannelFlowCallback
forall x. ChannelFlowCallback -> Rep ChannelFlowCallback x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelFlowCallback x -> ChannelFlowCallback
$cfrom :: forall x. ChannelFlowCallback -> Rep ChannelFlowCallback x
Prelude.Generic)

-- |
-- Create a value of 'ChannelFlowCallback' 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:
--
-- 'deleteResource', 'channelFlowCallback_deleteResource' - When a processor determines that a message needs to be @DENIED@, pass
-- this parameter with a value of true.
--
-- 'callbackId', 'channelFlowCallback_callbackId' - The identifier passed to the processor by the service when invoked. Use
-- the identifier to call back the service.
--
-- 'channelArn', 'channelFlowCallback_channelArn' - The ARN of the channel.
--
-- 'channelMessage', 'channelFlowCallback_channelMessage' - Stores information about the processed message.
newChannelFlowCallback ::
  -- | 'callbackId'
  Prelude.Text ->
  -- | 'channelArn'
  Prelude.Text ->
  -- | 'channelMessage'
  ChannelMessageCallback ->
  ChannelFlowCallback
newChannelFlowCallback :: Text -> Text -> ChannelMessageCallback -> ChannelFlowCallback
newChannelFlowCallback
  Text
pCallbackId_
  Text
pChannelArn_
  ChannelMessageCallback
pChannelMessage_ =
    ChannelFlowCallback' :: Maybe Bool
-> Text -> Text -> ChannelMessageCallback -> ChannelFlowCallback
ChannelFlowCallback'
      { $sel:deleteResource:ChannelFlowCallback' :: Maybe Bool
deleteResource =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:callbackId:ChannelFlowCallback' :: Text
callbackId = Text
pCallbackId_,
        $sel:channelArn:ChannelFlowCallback' :: Text
channelArn = Text
pChannelArn_,
        $sel:channelMessage:ChannelFlowCallback' :: ChannelMessageCallback
channelMessage = ChannelMessageCallback
pChannelMessage_
      }

-- | When a processor determines that a message needs to be @DENIED@, pass
-- this parameter with a value of true.
channelFlowCallback_deleteResource :: Lens.Lens' ChannelFlowCallback (Prelude.Maybe Prelude.Bool)
channelFlowCallback_deleteResource :: (Maybe Bool -> f (Maybe Bool))
-> ChannelFlowCallback -> f ChannelFlowCallback
channelFlowCallback_deleteResource = (ChannelFlowCallback -> Maybe Bool)
-> (ChannelFlowCallback -> Maybe Bool -> ChannelFlowCallback)
-> Lens
     ChannelFlowCallback ChannelFlowCallback (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowCallback' {Maybe Bool
deleteResource :: Maybe Bool
$sel:deleteResource:ChannelFlowCallback' :: ChannelFlowCallback -> Maybe Bool
deleteResource} -> Maybe Bool
deleteResource) (\s :: ChannelFlowCallback
s@ChannelFlowCallback' {} Maybe Bool
a -> ChannelFlowCallback
s {$sel:deleteResource:ChannelFlowCallback' :: Maybe Bool
deleteResource = Maybe Bool
a} :: ChannelFlowCallback)

-- | The identifier passed to the processor by the service when invoked. Use
-- the identifier to call back the service.
channelFlowCallback_callbackId :: Lens.Lens' ChannelFlowCallback Prelude.Text
channelFlowCallback_callbackId :: (Text -> f Text) -> ChannelFlowCallback -> f ChannelFlowCallback
channelFlowCallback_callbackId = (ChannelFlowCallback -> Text)
-> (ChannelFlowCallback -> Text -> ChannelFlowCallback)
-> Lens ChannelFlowCallback ChannelFlowCallback Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowCallback' {Text
callbackId :: Text
$sel:callbackId:ChannelFlowCallback' :: ChannelFlowCallback -> Text
callbackId} -> Text
callbackId) (\s :: ChannelFlowCallback
s@ChannelFlowCallback' {} Text
a -> ChannelFlowCallback
s {$sel:callbackId:ChannelFlowCallback' :: Text
callbackId = Text
a} :: ChannelFlowCallback)

-- | The ARN of the channel.
channelFlowCallback_channelArn :: Lens.Lens' ChannelFlowCallback Prelude.Text
channelFlowCallback_channelArn :: (Text -> f Text) -> ChannelFlowCallback -> f ChannelFlowCallback
channelFlowCallback_channelArn = (ChannelFlowCallback -> Text)
-> (ChannelFlowCallback -> Text -> ChannelFlowCallback)
-> Lens ChannelFlowCallback ChannelFlowCallback Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowCallback' {Text
channelArn :: Text
$sel:channelArn:ChannelFlowCallback' :: ChannelFlowCallback -> Text
channelArn} -> Text
channelArn) (\s :: ChannelFlowCallback
s@ChannelFlowCallback' {} Text
a -> ChannelFlowCallback
s {$sel:channelArn:ChannelFlowCallback' :: Text
channelArn = Text
a} :: ChannelFlowCallback)

-- | Stores information about the processed message.
channelFlowCallback_channelMessage :: Lens.Lens' ChannelFlowCallback ChannelMessageCallback
channelFlowCallback_channelMessage :: (ChannelMessageCallback -> f ChannelMessageCallback)
-> ChannelFlowCallback -> f ChannelFlowCallback
channelFlowCallback_channelMessage = (ChannelFlowCallback -> ChannelMessageCallback)
-> (ChannelFlowCallback
    -> ChannelMessageCallback -> ChannelFlowCallback)
-> Lens
     ChannelFlowCallback
     ChannelFlowCallback
     ChannelMessageCallback
     ChannelMessageCallback
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowCallback' {ChannelMessageCallback
channelMessage :: ChannelMessageCallback
$sel:channelMessage:ChannelFlowCallback' :: ChannelFlowCallback -> ChannelMessageCallback
channelMessage} -> ChannelMessageCallback
channelMessage) (\s :: ChannelFlowCallback
s@ChannelFlowCallback' {} ChannelMessageCallback
a -> ChannelFlowCallback
s {$sel:channelMessage:ChannelFlowCallback' :: ChannelMessageCallback
channelMessage = ChannelMessageCallback
a} :: ChannelFlowCallback)

instance Core.AWSRequest ChannelFlowCallback where
  type
    AWSResponse ChannelFlowCallback =
      ChannelFlowCallbackResponse
  request :: ChannelFlowCallback -> Request ChannelFlowCallback
request = Service -> ChannelFlowCallback -> Request ChannelFlowCallback
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ChannelFlowCallback
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ChannelFlowCallback)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ChannelFlowCallback))
-> Logger
-> Service
-> Proxy ChannelFlowCallback
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ChannelFlowCallback)))
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 Text -> Int -> ChannelFlowCallbackResponse
ChannelFlowCallbackResponse'
            (Maybe Text -> Maybe Text -> Int -> ChannelFlowCallbackResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> ChannelFlowCallbackResponse)
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
"CallbackId")
            Either String (Maybe Text -> Int -> ChannelFlowCallbackResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ChannelFlowCallbackResponse)
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
"ChannelArn")
            Either String (Int -> ChannelFlowCallbackResponse)
-> Either String Int -> Either String ChannelFlowCallbackResponse
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 ChannelFlowCallback

instance Prelude.NFData ChannelFlowCallback

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

instance Core.ToJSON ChannelFlowCallback where
  toJSON :: ChannelFlowCallback -> Value
toJSON ChannelFlowCallback' {Maybe Bool
Text
ChannelMessageCallback
channelMessage :: ChannelMessageCallback
channelArn :: Text
callbackId :: Text
deleteResource :: Maybe Bool
$sel:channelMessage:ChannelFlowCallback' :: ChannelFlowCallback -> ChannelMessageCallback
$sel:channelArn:ChannelFlowCallback' :: ChannelFlowCallback -> Text
$sel:callbackId:ChannelFlowCallback' :: ChannelFlowCallback -> Text
$sel:deleteResource:ChannelFlowCallback' :: ChannelFlowCallback -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DeleteResource" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
deleteResource,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"CallbackId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
callbackId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ChannelMessage" Text -> ChannelMessageCallback -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ChannelMessageCallback
channelMessage)
          ]
      )

instance Core.ToPath ChannelFlowCallback where
  toPath :: ChannelFlowCallback -> ByteString
toPath ChannelFlowCallback' {Maybe Bool
Text
ChannelMessageCallback
channelMessage :: ChannelMessageCallback
channelArn :: Text
callbackId :: Text
deleteResource :: Maybe Bool
$sel:channelMessage:ChannelFlowCallback' :: ChannelFlowCallback -> ChannelMessageCallback
$sel:channelArn:ChannelFlowCallback' :: ChannelFlowCallback -> Text
$sel:callbackId:ChannelFlowCallback' :: ChannelFlowCallback -> Text
$sel:deleteResource:ChannelFlowCallback' :: ChannelFlowCallback -> Maybe Bool
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/channels/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelArn]

instance Core.ToQuery ChannelFlowCallback where
  toQuery :: ChannelFlowCallback -> QueryString
toQuery =
    QueryString -> ChannelFlowCallback -> QueryString
forall a b. a -> b -> a
Prelude.const
      ([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"operation=channel-flow-callback"])

-- | /See:/ 'newChannelFlowCallbackResponse' smart constructor.
data ChannelFlowCallbackResponse = ChannelFlowCallbackResponse'
  { -- | The call back ID passed in the request.
    ChannelFlowCallbackResponse -> Maybe Text
callbackId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the channel.
    ChannelFlowCallbackResponse -> Maybe Text
channelArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ChannelFlowCallbackResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ChannelFlowCallbackResponse -> ChannelFlowCallbackResponse -> Bool
(ChannelFlowCallbackResponse
 -> ChannelFlowCallbackResponse -> Bool)
-> (ChannelFlowCallbackResponse
    -> ChannelFlowCallbackResponse -> Bool)
-> Eq ChannelFlowCallbackResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelFlowCallbackResponse -> ChannelFlowCallbackResponse -> Bool
$c/= :: ChannelFlowCallbackResponse -> ChannelFlowCallbackResponse -> Bool
== :: ChannelFlowCallbackResponse -> ChannelFlowCallbackResponse -> Bool
$c== :: ChannelFlowCallbackResponse -> ChannelFlowCallbackResponse -> Bool
Prelude.Eq, ReadPrec [ChannelFlowCallbackResponse]
ReadPrec ChannelFlowCallbackResponse
Int -> ReadS ChannelFlowCallbackResponse
ReadS [ChannelFlowCallbackResponse]
(Int -> ReadS ChannelFlowCallbackResponse)
-> ReadS [ChannelFlowCallbackResponse]
-> ReadPrec ChannelFlowCallbackResponse
-> ReadPrec [ChannelFlowCallbackResponse]
-> Read ChannelFlowCallbackResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChannelFlowCallbackResponse]
$creadListPrec :: ReadPrec [ChannelFlowCallbackResponse]
readPrec :: ReadPrec ChannelFlowCallbackResponse
$creadPrec :: ReadPrec ChannelFlowCallbackResponse
readList :: ReadS [ChannelFlowCallbackResponse]
$creadList :: ReadS [ChannelFlowCallbackResponse]
readsPrec :: Int -> ReadS ChannelFlowCallbackResponse
$creadsPrec :: Int -> ReadS ChannelFlowCallbackResponse
Prelude.Read, Int -> ChannelFlowCallbackResponse -> ShowS
[ChannelFlowCallbackResponse] -> ShowS
ChannelFlowCallbackResponse -> String
(Int -> ChannelFlowCallbackResponse -> ShowS)
-> (ChannelFlowCallbackResponse -> String)
-> ([ChannelFlowCallbackResponse] -> ShowS)
-> Show ChannelFlowCallbackResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelFlowCallbackResponse] -> ShowS
$cshowList :: [ChannelFlowCallbackResponse] -> ShowS
show :: ChannelFlowCallbackResponse -> String
$cshow :: ChannelFlowCallbackResponse -> String
showsPrec :: Int -> ChannelFlowCallbackResponse -> ShowS
$cshowsPrec :: Int -> ChannelFlowCallbackResponse -> ShowS
Prelude.Show, (forall x.
 ChannelFlowCallbackResponse -> Rep ChannelFlowCallbackResponse x)
-> (forall x.
    Rep ChannelFlowCallbackResponse x -> ChannelFlowCallbackResponse)
-> Generic ChannelFlowCallbackResponse
forall x.
Rep ChannelFlowCallbackResponse x -> ChannelFlowCallbackResponse
forall x.
ChannelFlowCallbackResponse -> Rep ChannelFlowCallbackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ChannelFlowCallbackResponse x -> ChannelFlowCallbackResponse
$cfrom :: forall x.
ChannelFlowCallbackResponse -> Rep ChannelFlowCallbackResponse x
Prelude.Generic)

-- |
-- Create a value of 'ChannelFlowCallbackResponse' 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:
--
-- 'callbackId', 'channelFlowCallbackResponse_callbackId' - The call back ID passed in the request.
--
-- 'channelArn', 'channelFlowCallbackResponse_channelArn' - The ARN of the channel.
--
-- 'httpStatus', 'channelFlowCallbackResponse_httpStatus' - The response's http status code.
newChannelFlowCallbackResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ChannelFlowCallbackResponse
newChannelFlowCallbackResponse :: Int -> ChannelFlowCallbackResponse
newChannelFlowCallbackResponse Int
pHttpStatus_ =
  ChannelFlowCallbackResponse' :: Maybe Text -> Maybe Text -> Int -> ChannelFlowCallbackResponse
ChannelFlowCallbackResponse'
    { $sel:callbackId:ChannelFlowCallbackResponse' :: Maybe Text
callbackId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:channelArn:ChannelFlowCallbackResponse' :: Maybe Text
channelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ChannelFlowCallbackResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The call back ID passed in the request.
channelFlowCallbackResponse_callbackId :: Lens.Lens' ChannelFlowCallbackResponse (Prelude.Maybe Prelude.Text)
channelFlowCallbackResponse_callbackId :: (Maybe Text -> f (Maybe Text))
-> ChannelFlowCallbackResponse -> f ChannelFlowCallbackResponse
channelFlowCallbackResponse_callbackId = (ChannelFlowCallbackResponse -> Maybe Text)
-> (ChannelFlowCallbackResponse
    -> Maybe Text -> ChannelFlowCallbackResponse)
-> Lens
     ChannelFlowCallbackResponse
     ChannelFlowCallbackResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowCallbackResponse' {Maybe Text
callbackId :: Maybe Text
$sel:callbackId:ChannelFlowCallbackResponse' :: ChannelFlowCallbackResponse -> Maybe Text
callbackId} -> Maybe Text
callbackId) (\s :: ChannelFlowCallbackResponse
s@ChannelFlowCallbackResponse' {} Maybe Text
a -> ChannelFlowCallbackResponse
s {$sel:callbackId:ChannelFlowCallbackResponse' :: Maybe Text
callbackId = Maybe Text
a} :: ChannelFlowCallbackResponse)

-- | The ARN of the channel.
channelFlowCallbackResponse_channelArn :: Lens.Lens' ChannelFlowCallbackResponse (Prelude.Maybe Prelude.Text)
channelFlowCallbackResponse_channelArn :: (Maybe Text -> f (Maybe Text))
-> ChannelFlowCallbackResponse -> f ChannelFlowCallbackResponse
channelFlowCallbackResponse_channelArn = (ChannelFlowCallbackResponse -> Maybe Text)
-> (ChannelFlowCallbackResponse
    -> Maybe Text -> ChannelFlowCallbackResponse)
-> Lens
     ChannelFlowCallbackResponse
     ChannelFlowCallbackResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowCallbackResponse' {Maybe Text
channelArn :: Maybe Text
$sel:channelArn:ChannelFlowCallbackResponse' :: ChannelFlowCallbackResponse -> Maybe Text
channelArn} -> Maybe Text
channelArn) (\s :: ChannelFlowCallbackResponse
s@ChannelFlowCallbackResponse' {} Maybe Text
a -> ChannelFlowCallbackResponse
s {$sel:channelArn:ChannelFlowCallbackResponse' :: Maybe Text
channelArn = Maybe Text
a} :: ChannelFlowCallbackResponse)

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

instance Prelude.NFData ChannelFlowCallbackResponse