{-# 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.CreateChannelFlow
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a channel flow, a container for processors. Processors are AWS
-- Lambda functions that perform actions on chat messages, such as
-- stripping out profanity. You can associate channel flows with channels,
-- and the processors in the channel flow then take action on all messages
-- sent to that channel. This is a developer API.
--
-- Channel flows process the following items:
--
-- 1.  New and updated messages
--
-- 2.  Persistent and non-persistent messages
--
-- 3.  The Standard message type
--
-- Channel flows don\'t process Control or System messages. For more
-- information about the message types provided by Chime SDK Messaging,
-- refer to
-- <https://docs.aws.amazon.com/chime/latest/dg/using-the-messaging-sdk.html#msg-types Message types>
-- in the /Amazon Chime developer guide/.
module Amazonka.ChimeSDKMessaging.CreateChannelFlow
  ( -- * Creating a Request
    CreateChannelFlow (..),
    newCreateChannelFlow,

    -- * Request Lenses
    createChannelFlow_tags,
    createChannelFlow_appInstanceArn,
    createChannelFlow_processors,
    createChannelFlow_name,
    createChannelFlow_clientRequestToken,

    -- * Destructuring the Response
    CreateChannelFlowResponse (..),
    newCreateChannelFlowResponse,

    -- * Response Lenses
    createChannelFlowResponse_channelFlowArn,
    createChannelFlowResponse_httpStatus,
  )
where

import Amazonka.ChimeSDKMessaging.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateChannelFlow' smart constructor.
data CreateChannelFlow = CreateChannelFlow'
  { -- | The tags for the creation request.
    CreateChannelFlow -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The ARN of the channel flow request.
    CreateChannelFlow -> Text
appInstanceArn :: Prelude.Text,
    -- | Information about the processor Lambda functions.
    CreateChannelFlow -> NonEmpty Processor
processors :: Prelude.NonEmpty Processor,
    -- | The name of the channel flow.
    CreateChannelFlow -> Sensitive Text
name :: Data.Sensitive Prelude.Text,
    -- | The client token for the request. An Idempotency token.
    CreateChannelFlow -> Sensitive Text
clientRequestToken :: Data.Sensitive Prelude.Text
  }
  deriving (CreateChannelFlow -> CreateChannelFlow -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateChannelFlow -> CreateChannelFlow -> Bool
$c/= :: CreateChannelFlow -> CreateChannelFlow -> Bool
== :: CreateChannelFlow -> CreateChannelFlow -> Bool
$c== :: CreateChannelFlow -> CreateChannelFlow -> Bool
Prelude.Eq, Int -> CreateChannelFlow -> ShowS
[CreateChannelFlow] -> ShowS
CreateChannelFlow -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateChannelFlow] -> ShowS
$cshowList :: [CreateChannelFlow] -> ShowS
show :: CreateChannelFlow -> String
$cshow :: CreateChannelFlow -> String
showsPrec :: Int -> CreateChannelFlow -> ShowS
$cshowsPrec :: Int -> CreateChannelFlow -> ShowS
Prelude.Show, forall x. Rep CreateChannelFlow x -> CreateChannelFlow
forall x. CreateChannelFlow -> Rep CreateChannelFlow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateChannelFlow x -> CreateChannelFlow
$cfrom :: forall x. CreateChannelFlow -> Rep CreateChannelFlow x
Prelude.Generic)

-- |
-- Create a value of 'CreateChannelFlow' 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:
--
-- 'tags', 'createChannelFlow_tags' - The tags for the creation request.
--
-- 'appInstanceArn', 'createChannelFlow_appInstanceArn' - The ARN of the channel flow request.
--
-- 'processors', 'createChannelFlow_processors' - Information about the processor Lambda functions.
--
-- 'name', 'createChannelFlow_name' - The name of the channel flow.
--
-- 'clientRequestToken', 'createChannelFlow_clientRequestToken' - The client token for the request. An Idempotency token.
newCreateChannelFlow ::
  -- | 'appInstanceArn'
  Prelude.Text ->
  -- | 'processors'
  Prelude.NonEmpty Processor ->
  -- | 'name'
  Prelude.Text ->
  -- | 'clientRequestToken'
  Prelude.Text ->
  CreateChannelFlow
newCreateChannelFlow :: Text -> NonEmpty Processor -> Text -> Text -> CreateChannelFlow
newCreateChannelFlow
  Text
pAppInstanceArn_
  NonEmpty Processor
pProcessors_
  Text
pName_
  Text
pClientRequestToken_ =
    CreateChannelFlow'
      { $sel:tags:CreateChannelFlow' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:appInstanceArn:CreateChannelFlow' :: Text
appInstanceArn = Text
pAppInstanceArn_,
        $sel:processors:CreateChannelFlow' :: NonEmpty Processor
processors = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Processor
pProcessors_,
        $sel:name:CreateChannelFlow' :: Sensitive Text
name = forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pName_,
        $sel:clientRequestToken:CreateChannelFlow' :: Sensitive Text
clientRequestToken =
          forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pClientRequestToken_
      }

-- | The tags for the creation request.
createChannelFlow_tags :: Lens.Lens' CreateChannelFlow (Prelude.Maybe (Prelude.NonEmpty Tag))
createChannelFlow_tags :: Lens' CreateChannelFlow (Maybe (NonEmpty Tag))
createChannelFlow_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelFlow' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateChannelFlow' :: CreateChannelFlow -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateChannelFlow
s@CreateChannelFlow' {} Maybe (NonEmpty Tag)
a -> CreateChannelFlow
s {$sel:tags:CreateChannelFlow' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateChannelFlow) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ARN of the channel flow request.
createChannelFlow_appInstanceArn :: Lens.Lens' CreateChannelFlow Prelude.Text
createChannelFlow_appInstanceArn :: Lens' CreateChannelFlow Text
createChannelFlow_appInstanceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelFlow' {Text
appInstanceArn :: Text
$sel:appInstanceArn:CreateChannelFlow' :: CreateChannelFlow -> Text
appInstanceArn} -> Text
appInstanceArn) (\s :: CreateChannelFlow
s@CreateChannelFlow' {} Text
a -> CreateChannelFlow
s {$sel:appInstanceArn:CreateChannelFlow' :: Text
appInstanceArn = Text
a} :: CreateChannelFlow)

-- | Information about the processor Lambda functions.
createChannelFlow_processors :: Lens.Lens' CreateChannelFlow (Prelude.NonEmpty Processor)
createChannelFlow_processors :: Lens' CreateChannelFlow (NonEmpty Processor)
createChannelFlow_processors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelFlow' {NonEmpty Processor
processors :: NonEmpty Processor
$sel:processors:CreateChannelFlow' :: CreateChannelFlow -> NonEmpty Processor
processors} -> NonEmpty Processor
processors) (\s :: CreateChannelFlow
s@CreateChannelFlow' {} NonEmpty Processor
a -> CreateChannelFlow
s {$sel:processors:CreateChannelFlow' :: NonEmpty Processor
processors = NonEmpty Processor
a} :: CreateChannelFlow) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the channel flow.
createChannelFlow_name :: Lens.Lens' CreateChannelFlow Prelude.Text
createChannelFlow_name :: Lens' CreateChannelFlow Text
createChannelFlow_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelFlow' {Sensitive Text
name :: Sensitive Text
$sel:name:CreateChannelFlow' :: CreateChannelFlow -> Sensitive Text
name} -> Sensitive Text
name) (\s :: CreateChannelFlow
s@CreateChannelFlow' {} Sensitive Text
a -> CreateChannelFlow
s {$sel:name:CreateChannelFlow' :: Sensitive Text
name = Sensitive Text
a} :: CreateChannelFlow) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The client token for the request. An Idempotency token.
createChannelFlow_clientRequestToken :: Lens.Lens' CreateChannelFlow Prelude.Text
createChannelFlow_clientRequestToken :: Lens' CreateChannelFlow Text
createChannelFlow_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelFlow' {Sensitive Text
clientRequestToken :: Sensitive Text
$sel:clientRequestToken:CreateChannelFlow' :: CreateChannelFlow -> Sensitive Text
clientRequestToken} -> Sensitive Text
clientRequestToken) (\s :: CreateChannelFlow
s@CreateChannelFlow' {} Sensitive Text
a -> CreateChannelFlow
s {$sel:clientRequestToken:CreateChannelFlow' :: Sensitive Text
clientRequestToken = Sensitive Text
a} :: CreateChannelFlow) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

instance Core.AWSRequest CreateChannelFlow where
  type
    AWSResponse CreateChannelFlow =
      CreateChannelFlowResponse
  request :: (Service -> Service)
-> CreateChannelFlow -> Request CreateChannelFlow
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateChannelFlow
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateChannelFlow)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateChannelFlowResponse
CreateChannelFlowResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ChannelFlowArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateChannelFlow where
  hashWithSalt :: Int -> CreateChannelFlow -> Int
hashWithSalt Int
_salt CreateChannelFlow' {Maybe (NonEmpty Tag)
NonEmpty Processor
Text
Sensitive Text
clientRequestToken :: Sensitive Text
name :: Sensitive Text
processors :: NonEmpty Processor
appInstanceArn :: Text
tags :: Maybe (NonEmpty Tag)
$sel:clientRequestToken:CreateChannelFlow' :: CreateChannelFlow -> Sensitive Text
$sel:name:CreateChannelFlow' :: CreateChannelFlow -> Sensitive Text
$sel:processors:CreateChannelFlow' :: CreateChannelFlow -> NonEmpty Processor
$sel:appInstanceArn:CreateChannelFlow' :: CreateChannelFlow -> Text
$sel:tags:CreateChannelFlow' :: CreateChannelFlow -> Maybe (NonEmpty Tag)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appInstanceArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Processor
processors
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
clientRequestToken

instance Prelude.NFData CreateChannelFlow where
  rnf :: CreateChannelFlow -> ()
rnf CreateChannelFlow' {Maybe (NonEmpty Tag)
NonEmpty Processor
Text
Sensitive Text
clientRequestToken :: Sensitive Text
name :: Sensitive Text
processors :: NonEmpty Processor
appInstanceArn :: Text
tags :: Maybe (NonEmpty Tag)
$sel:clientRequestToken:CreateChannelFlow' :: CreateChannelFlow -> Sensitive Text
$sel:name:CreateChannelFlow' :: CreateChannelFlow -> Sensitive Text
$sel:processors:CreateChannelFlow' :: CreateChannelFlow -> NonEmpty Processor
$sel:appInstanceArn:CreateChannelFlow' :: CreateChannelFlow -> Text
$sel:tags:CreateChannelFlow' :: CreateChannelFlow -> Maybe (NonEmpty Tag)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appInstanceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Processor
processors
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
clientRequestToken

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

instance Data.ToJSON CreateChannelFlow where
  toJSON :: CreateChannelFlow -> Value
toJSON CreateChannelFlow' {Maybe (NonEmpty Tag)
NonEmpty Processor
Text
Sensitive Text
clientRequestToken :: Sensitive Text
name :: Sensitive Text
processors :: NonEmpty Processor
appInstanceArn :: Text
tags :: Maybe (NonEmpty Tag)
$sel:clientRequestToken:CreateChannelFlow' :: CreateChannelFlow -> Sensitive Text
$sel:name:CreateChannelFlow' :: CreateChannelFlow -> Sensitive Text
$sel:processors:CreateChannelFlow' :: CreateChannelFlow -> NonEmpty Processor
$sel:appInstanceArn:CreateChannelFlow' :: CreateChannelFlow -> Text
$sel:tags:CreateChannelFlow' :: CreateChannelFlow -> Maybe (NonEmpty Tag)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"AppInstanceArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
appInstanceArn),
            forall a. a -> Maybe a
Prelude.Just (Key
"Processors" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Processor
processors),
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
name),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
clientRequestToken)
          ]
      )

instance Data.ToPath CreateChannelFlow where
  toPath :: CreateChannelFlow -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/channel-flows"

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

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

-- |
-- Create a value of 'CreateChannelFlowResponse' 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:
--
-- 'channelFlowArn', 'createChannelFlowResponse_channelFlowArn' - The ARN of the channel flow.
--
-- 'httpStatus', 'createChannelFlowResponse_httpStatus' - The response's http status code.
newCreateChannelFlowResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateChannelFlowResponse
newCreateChannelFlowResponse :: Int -> CreateChannelFlowResponse
newCreateChannelFlowResponse Int
pHttpStatus_ =
  CreateChannelFlowResponse'
    { $sel:channelFlowArn:CreateChannelFlowResponse' :: Maybe Text
channelFlowArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateChannelFlowResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the channel flow.
createChannelFlowResponse_channelFlowArn :: Lens.Lens' CreateChannelFlowResponse (Prelude.Maybe Prelude.Text)
createChannelFlowResponse_channelFlowArn :: Lens' CreateChannelFlowResponse (Maybe Text)
createChannelFlowResponse_channelFlowArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelFlowResponse' {Maybe Text
channelFlowArn :: Maybe Text
$sel:channelFlowArn:CreateChannelFlowResponse' :: CreateChannelFlowResponse -> Maybe Text
channelFlowArn} -> Maybe Text
channelFlowArn) (\s :: CreateChannelFlowResponse
s@CreateChannelFlowResponse' {} Maybe Text
a -> CreateChannelFlowResponse
s {$sel:channelFlowArn:CreateChannelFlowResponse' :: Maybe Text
channelFlowArn = Maybe Text
a} :: CreateChannelFlowResponse)

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

instance Prelude.NFData CreateChannelFlowResponse where
  rnf :: CreateChannelFlowResponse -> ()
rnf CreateChannelFlowResponse' {Int
Maybe Text
httpStatus :: Int
channelFlowArn :: Maybe Text
$sel:httpStatus:CreateChannelFlowResponse' :: CreateChannelFlowResponse -> Int
$sel:channelFlowArn:CreateChannelFlowResponse' :: CreateChannelFlowResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
channelFlowArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus