{-# 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.Connect.CreateContactFlowModule
-- 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 flow module for the specified Amazon Connect instance.
module Amazonka.Connect.CreateContactFlowModule
  ( -- * Creating a Request
    CreateContactFlowModule (..),
    newCreateContactFlowModule,

    -- * Request Lenses
    createContactFlowModule_clientToken,
    createContactFlowModule_description,
    createContactFlowModule_tags,
    createContactFlowModule_instanceId,
    createContactFlowModule_name,
    createContactFlowModule_content,

    -- * Destructuring the Response
    CreateContactFlowModuleResponse (..),
    newCreateContactFlowModuleResponse,

    -- * Response Lenses
    createContactFlowModuleResponse_arn,
    createContactFlowModuleResponse_id,
    createContactFlowModuleResponse_httpStatus,
  )
where

import Amazonka.Connect.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:/ 'newCreateContactFlowModule' smart constructor.
data CreateContactFlowModule = CreateContactFlowModule'
  { -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request. If not provided, the Amazon Web Services SDK
    -- populates this field. For more information about idempotency, see
    -- <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/ Making retries safe with idempotent APIs>.
    CreateContactFlowModule -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The description of the flow module.
    CreateContactFlowModule -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags used to organize, track, or control access for this resource.
    -- For example, { \"tags\": {\"key1\":\"value1\", \"key2\":\"value2\"} }.
    CreateContactFlowModule -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    CreateContactFlowModule -> Text
instanceId :: Prelude.Text,
    -- | The name of the flow module.
    CreateContactFlowModule -> Text
name :: Prelude.Text,
    -- | The content of the flow module.
    CreateContactFlowModule -> Text
content :: Prelude.Text
  }
  deriving (CreateContactFlowModule -> CreateContactFlowModule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateContactFlowModule -> CreateContactFlowModule -> Bool
$c/= :: CreateContactFlowModule -> CreateContactFlowModule -> Bool
== :: CreateContactFlowModule -> CreateContactFlowModule -> Bool
$c== :: CreateContactFlowModule -> CreateContactFlowModule -> Bool
Prelude.Eq, ReadPrec [CreateContactFlowModule]
ReadPrec CreateContactFlowModule
Int -> ReadS CreateContactFlowModule
ReadS [CreateContactFlowModule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateContactFlowModule]
$creadListPrec :: ReadPrec [CreateContactFlowModule]
readPrec :: ReadPrec CreateContactFlowModule
$creadPrec :: ReadPrec CreateContactFlowModule
readList :: ReadS [CreateContactFlowModule]
$creadList :: ReadS [CreateContactFlowModule]
readsPrec :: Int -> ReadS CreateContactFlowModule
$creadsPrec :: Int -> ReadS CreateContactFlowModule
Prelude.Read, Int -> CreateContactFlowModule -> ShowS
[CreateContactFlowModule] -> ShowS
CreateContactFlowModule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateContactFlowModule] -> ShowS
$cshowList :: [CreateContactFlowModule] -> ShowS
show :: CreateContactFlowModule -> String
$cshow :: CreateContactFlowModule -> String
showsPrec :: Int -> CreateContactFlowModule -> ShowS
$cshowsPrec :: Int -> CreateContactFlowModule -> ShowS
Prelude.Show, forall x. Rep CreateContactFlowModule x -> CreateContactFlowModule
forall x. CreateContactFlowModule -> Rep CreateContactFlowModule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateContactFlowModule x -> CreateContactFlowModule
$cfrom :: forall x. CreateContactFlowModule -> Rep CreateContactFlowModule x
Prelude.Generic)

-- |
-- Create a value of 'CreateContactFlowModule' 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:
--
-- 'clientToken', 'createContactFlowModule_clientToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. If not provided, the Amazon Web Services SDK
-- populates this field. For more information about idempotency, see
-- <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/ Making retries safe with idempotent APIs>.
--
-- 'description', 'createContactFlowModule_description' - The description of the flow module.
--
-- 'tags', 'createContactFlowModule_tags' - The tags used to organize, track, or control access for this resource.
-- For example, { \"tags\": {\"key1\":\"value1\", \"key2\":\"value2\"} }.
--
-- 'instanceId', 'createContactFlowModule_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
--
-- 'name', 'createContactFlowModule_name' - The name of the flow module.
--
-- 'content', 'createContactFlowModule_content' - The content of the flow module.
newCreateContactFlowModule ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'content'
  Prelude.Text ->
  CreateContactFlowModule
newCreateContactFlowModule :: Text -> Text -> Text -> CreateContactFlowModule
newCreateContactFlowModule
  Text
pInstanceId_
  Text
pName_
  Text
pContent_ =
    CreateContactFlowModule'
      { $sel:clientToken:CreateContactFlowModule' :: Maybe Text
clientToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:description:CreateContactFlowModule' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateContactFlowModule' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:instanceId:CreateContactFlowModule' :: Text
instanceId = Text
pInstanceId_,
        $sel:name:CreateContactFlowModule' :: Text
name = Text
pName_,
        $sel:content:CreateContactFlowModule' :: Text
content = Text
pContent_
      }

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. If not provided, the Amazon Web Services SDK
-- populates this field. For more information about idempotency, see
-- <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/ Making retries safe with idempotent APIs>.
createContactFlowModule_clientToken :: Lens.Lens' CreateContactFlowModule (Prelude.Maybe Prelude.Text)
createContactFlowModule_clientToken :: Lens' CreateContactFlowModule (Maybe Text)
createContactFlowModule_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactFlowModule' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateContactFlowModule
s@CreateContactFlowModule' {} Maybe Text
a -> CreateContactFlowModule
s {$sel:clientToken:CreateContactFlowModule' :: Maybe Text
clientToken = Maybe Text
a} :: CreateContactFlowModule)

-- | The description of the flow module.
createContactFlowModule_description :: Lens.Lens' CreateContactFlowModule (Prelude.Maybe Prelude.Text)
createContactFlowModule_description :: Lens' CreateContactFlowModule (Maybe Text)
createContactFlowModule_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactFlowModule' {Maybe Text
description :: Maybe Text
$sel:description:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateContactFlowModule
s@CreateContactFlowModule' {} Maybe Text
a -> CreateContactFlowModule
s {$sel:description:CreateContactFlowModule' :: Maybe Text
description = Maybe Text
a} :: CreateContactFlowModule)

-- | The tags used to organize, track, or control access for this resource.
-- For example, { \"tags\": {\"key1\":\"value1\", \"key2\":\"value2\"} }.
createContactFlowModule_tags :: Lens.Lens' CreateContactFlowModule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createContactFlowModule_tags :: Lens' CreateContactFlowModule (Maybe (HashMap Text Text))
createContactFlowModule_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactFlowModule' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateContactFlowModule
s@CreateContactFlowModule' {} Maybe (HashMap Text Text)
a -> CreateContactFlowModule
s {$sel:tags:CreateContactFlowModule' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateContactFlowModule) 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 identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
createContactFlowModule_instanceId :: Lens.Lens' CreateContactFlowModule Prelude.Text
createContactFlowModule_instanceId :: Lens' CreateContactFlowModule Text
createContactFlowModule_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactFlowModule' {Text
instanceId :: Text
$sel:instanceId:CreateContactFlowModule' :: CreateContactFlowModule -> Text
instanceId} -> Text
instanceId) (\s :: CreateContactFlowModule
s@CreateContactFlowModule' {} Text
a -> CreateContactFlowModule
s {$sel:instanceId:CreateContactFlowModule' :: Text
instanceId = Text
a} :: CreateContactFlowModule)

-- | The name of the flow module.
createContactFlowModule_name :: Lens.Lens' CreateContactFlowModule Prelude.Text
createContactFlowModule_name :: Lens' CreateContactFlowModule Text
createContactFlowModule_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactFlowModule' {Text
name :: Text
$sel:name:CreateContactFlowModule' :: CreateContactFlowModule -> Text
name} -> Text
name) (\s :: CreateContactFlowModule
s@CreateContactFlowModule' {} Text
a -> CreateContactFlowModule
s {$sel:name:CreateContactFlowModule' :: Text
name = Text
a} :: CreateContactFlowModule)

-- | The content of the flow module.
createContactFlowModule_content :: Lens.Lens' CreateContactFlowModule Prelude.Text
createContactFlowModule_content :: Lens' CreateContactFlowModule Text
createContactFlowModule_content = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactFlowModule' {Text
content :: Text
$sel:content:CreateContactFlowModule' :: CreateContactFlowModule -> Text
content} -> Text
content) (\s :: CreateContactFlowModule
s@CreateContactFlowModule' {} Text
a -> CreateContactFlowModule
s {$sel:content:CreateContactFlowModule' :: Text
content = Text
a} :: CreateContactFlowModule)

instance Core.AWSRequest CreateContactFlowModule where
  type
    AWSResponse CreateContactFlowModule =
      CreateContactFlowModuleResponse
  request :: (Service -> Service)
-> CreateContactFlowModule -> Request CreateContactFlowModule
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateContactFlowModule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateContactFlowModule)))
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 -> Maybe Text -> Int -> CreateContactFlowModuleResponse
CreateContactFlowModuleResponse'
            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
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Id")
            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 CreateContactFlowModule where
  hashWithSalt :: Int -> CreateContactFlowModule -> Int
hashWithSalt Int
_salt CreateContactFlowModule' {Maybe Text
Maybe (HashMap Text Text)
Text
content :: Text
name :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:content:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:name:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:instanceId:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:tags:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe (HashMap Text Text)
$sel:description:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
$sel:clientToken:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
content

instance Prelude.NFData CreateContactFlowModule where
  rnf :: CreateContactFlowModule -> ()
rnf CreateContactFlowModule' {Maybe Text
Maybe (HashMap Text Text)
Text
content :: Text
name :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:content:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:name:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:instanceId:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:tags:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe (HashMap Text Text)
$sel:description:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
$sel:clientToken:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
content

instance Data.ToHeaders CreateContactFlowModule where
  toHeaders :: CreateContactFlowModule -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateContactFlowModule where
  toJSON :: CreateContactFlowModule -> Value
toJSON CreateContactFlowModule' {Maybe Text
Maybe (HashMap Text Text)
Text
content :: Text
name :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:content:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:name:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:instanceId:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:tags:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe (HashMap Text Text)
$sel:description:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
$sel:clientToken:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClientToken" 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 Text
clientToken,
            (Key
"Description" 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 Text
description,
            (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 (HashMap Text Text)
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"Content" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
content)
          ]
      )

instance Data.ToPath CreateContactFlowModule where
  toPath :: CreateContactFlowModule -> ByteString
toPath CreateContactFlowModule' {Maybe Text
Maybe (HashMap Text Text)
Text
content :: Text
name :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:content:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:name:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:instanceId:CreateContactFlowModule' :: CreateContactFlowModule -> Text
$sel:tags:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe (HashMap Text Text)
$sel:description:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
$sel:clientToken:CreateContactFlowModule' :: CreateContactFlowModule -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/contact-flow-modules/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
instanceId]

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

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

-- |
-- Create a value of 'CreateContactFlowModuleResponse' 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:
--
-- 'arn', 'createContactFlowModuleResponse_arn' - The Amazon Resource Name (ARN) of the flow module.
--
-- 'id', 'createContactFlowModuleResponse_id' - The identifier of the flow module.
--
-- 'httpStatus', 'createContactFlowModuleResponse_httpStatus' - The response's http status code.
newCreateContactFlowModuleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateContactFlowModuleResponse
newCreateContactFlowModuleResponse :: Int -> CreateContactFlowModuleResponse
newCreateContactFlowModuleResponse Int
pHttpStatus_ =
  CreateContactFlowModuleResponse'
    { $sel:arn:CreateContactFlowModuleResponse' :: Maybe Text
arn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateContactFlowModuleResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateContactFlowModuleResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the flow module.
createContactFlowModuleResponse_arn :: Lens.Lens' CreateContactFlowModuleResponse (Prelude.Maybe Prelude.Text)
createContactFlowModuleResponse_arn :: Lens' CreateContactFlowModuleResponse (Maybe Text)
createContactFlowModuleResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactFlowModuleResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateContactFlowModuleResponse' :: CreateContactFlowModuleResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateContactFlowModuleResponse
s@CreateContactFlowModuleResponse' {} Maybe Text
a -> CreateContactFlowModuleResponse
s {$sel:arn:CreateContactFlowModuleResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateContactFlowModuleResponse)

-- | The identifier of the flow module.
createContactFlowModuleResponse_id :: Lens.Lens' CreateContactFlowModuleResponse (Prelude.Maybe Prelude.Text)
createContactFlowModuleResponse_id :: Lens' CreateContactFlowModuleResponse (Maybe Text)
createContactFlowModuleResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactFlowModuleResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateContactFlowModuleResponse' :: CreateContactFlowModuleResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateContactFlowModuleResponse
s@CreateContactFlowModuleResponse' {} Maybe Text
a -> CreateContactFlowModuleResponse
s {$sel:id:CreateContactFlowModuleResponse' :: Maybe Text
id = Maybe Text
a} :: CreateContactFlowModuleResponse)

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

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