{-# 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.TransferContact
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Transfers contacts from one agent or queue to another agent or queue at
-- any point after a contact is created. You can transfer a contact to
-- another queue by providing the flow which orchestrates the contact to
-- the destination queue. This gives you more control over contact handling
-- and helps you adhere to the service level agreement (SLA) guaranteed to
-- your customers.
--
-- Note the following requirements:
--
-- -   Transfer is supported for only @TASK@ contacts.
--
-- -   Do not use both @QueueId@ and @UserId@ in the same call.
--
-- -   The following flow types are supported: Inbound flow, Transfer to
--     agent flow, and Transfer to queue flow.
--
-- -   The @TransferContact@ API can be called only on active contacts.
--
-- -   A contact cannot be transferred more than 11 times.
module Amazonka.Connect.TransferContact
  ( -- * Creating a Request
    TransferContact (..),
    newTransferContact,

    -- * Request Lenses
    transferContact_clientToken,
    transferContact_queueId,
    transferContact_userId,
    transferContact_instanceId,
    transferContact_contactId,
    transferContact_contactFlowId,

    -- * Destructuring the Response
    TransferContactResponse (..),
    newTransferContactResponse,

    -- * Response Lenses
    transferContactResponse_contactArn,
    transferContactResponse_contactId,
    transferContactResponse_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:/ 'newTransferContact' smart constructor.
data TransferContact = TransferContact'
  { -- | 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>.
    TransferContact -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the queue.
    TransferContact -> Maybe Text
queueId :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the user.
    TransferContact -> Maybe Text
userId :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    TransferContact -> Text
instanceId :: Prelude.Text,
    -- | The identifier of the contact in this instance of Amazon Connect.
    TransferContact -> Text
contactId :: Prelude.Text,
    -- | The identifier of the flow.
    TransferContact -> Text
contactFlowId :: Prelude.Text
  }
  deriving (TransferContact -> TransferContact -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransferContact -> TransferContact -> Bool
$c/= :: TransferContact -> TransferContact -> Bool
== :: TransferContact -> TransferContact -> Bool
$c== :: TransferContact -> TransferContact -> Bool
Prelude.Eq, ReadPrec [TransferContact]
ReadPrec TransferContact
Int -> ReadS TransferContact
ReadS [TransferContact]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransferContact]
$creadListPrec :: ReadPrec [TransferContact]
readPrec :: ReadPrec TransferContact
$creadPrec :: ReadPrec TransferContact
readList :: ReadS [TransferContact]
$creadList :: ReadS [TransferContact]
readsPrec :: Int -> ReadS TransferContact
$creadsPrec :: Int -> ReadS TransferContact
Prelude.Read, Int -> TransferContact -> ShowS
[TransferContact] -> ShowS
TransferContact -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransferContact] -> ShowS
$cshowList :: [TransferContact] -> ShowS
show :: TransferContact -> String
$cshow :: TransferContact -> String
showsPrec :: Int -> TransferContact -> ShowS
$cshowsPrec :: Int -> TransferContact -> ShowS
Prelude.Show, forall x. Rep TransferContact x -> TransferContact
forall x. TransferContact -> Rep TransferContact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TransferContact x -> TransferContact
$cfrom :: forall x. TransferContact -> Rep TransferContact x
Prelude.Generic)

-- |
-- Create a value of 'TransferContact' 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', 'transferContact_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>.
--
-- 'queueId', 'transferContact_queueId' - The identifier for the queue.
--
-- 'userId', 'transferContact_userId' - The identifier for the user.
--
-- 'instanceId', 'transferContact_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
--
-- 'contactId', 'transferContact_contactId' - The identifier of the contact in this instance of Amazon Connect.
--
-- 'contactFlowId', 'transferContact_contactFlowId' - The identifier of the flow.
newTransferContact ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'contactId'
  Prelude.Text ->
  -- | 'contactFlowId'
  Prelude.Text ->
  TransferContact
newTransferContact :: Text -> Text -> Text -> TransferContact
newTransferContact
  Text
pInstanceId_
  Text
pContactId_
  Text
pContactFlowId_ =
    TransferContact'
      { $sel:clientToken:TransferContact' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
        $sel:queueId:TransferContact' :: Maybe Text
queueId = forall a. Maybe a
Prelude.Nothing,
        $sel:userId:TransferContact' :: Maybe Text
userId = forall a. Maybe a
Prelude.Nothing,
        $sel:instanceId:TransferContact' :: Text
instanceId = Text
pInstanceId_,
        $sel:contactId:TransferContact' :: Text
contactId = Text
pContactId_,
        $sel:contactFlowId:TransferContact' :: Text
contactFlowId = Text
pContactFlowId_
      }

-- | 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>.
transferContact_clientToken :: Lens.Lens' TransferContact (Prelude.Maybe Prelude.Text)
transferContact_clientToken :: Lens' TransferContact (Maybe Text)
transferContact_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferContact' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:TransferContact' :: TransferContact -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: TransferContact
s@TransferContact' {} Maybe Text
a -> TransferContact
s {$sel:clientToken:TransferContact' :: Maybe Text
clientToken = Maybe Text
a} :: TransferContact)

-- | The identifier for the queue.
transferContact_queueId :: Lens.Lens' TransferContact (Prelude.Maybe Prelude.Text)
transferContact_queueId :: Lens' TransferContact (Maybe Text)
transferContact_queueId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferContact' {Maybe Text
queueId :: Maybe Text
$sel:queueId:TransferContact' :: TransferContact -> Maybe Text
queueId} -> Maybe Text
queueId) (\s :: TransferContact
s@TransferContact' {} Maybe Text
a -> TransferContact
s {$sel:queueId:TransferContact' :: Maybe Text
queueId = Maybe Text
a} :: TransferContact)

-- | The identifier for the user.
transferContact_userId :: Lens.Lens' TransferContact (Prelude.Maybe Prelude.Text)
transferContact_userId :: Lens' TransferContact (Maybe Text)
transferContact_userId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferContact' {Maybe Text
userId :: Maybe Text
$sel:userId:TransferContact' :: TransferContact -> Maybe Text
userId} -> Maybe Text
userId) (\s :: TransferContact
s@TransferContact' {} Maybe Text
a -> TransferContact
s {$sel:userId:TransferContact' :: Maybe Text
userId = Maybe Text
a} :: TransferContact)

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
transferContact_instanceId :: Lens.Lens' TransferContact Prelude.Text
transferContact_instanceId :: Lens' TransferContact Text
transferContact_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferContact' {Text
instanceId :: Text
$sel:instanceId:TransferContact' :: TransferContact -> Text
instanceId} -> Text
instanceId) (\s :: TransferContact
s@TransferContact' {} Text
a -> TransferContact
s {$sel:instanceId:TransferContact' :: Text
instanceId = Text
a} :: TransferContact)

-- | The identifier of the contact in this instance of Amazon Connect.
transferContact_contactId :: Lens.Lens' TransferContact Prelude.Text
transferContact_contactId :: Lens' TransferContact Text
transferContact_contactId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferContact' {Text
contactId :: Text
$sel:contactId:TransferContact' :: TransferContact -> Text
contactId} -> Text
contactId) (\s :: TransferContact
s@TransferContact' {} Text
a -> TransferContact
s {$sel:contactId:TransferContact' :: Text
contactId = Text
a} :: TransferContact)

-- | The identifier of the flow.
transferContact_contactFlowId :: Lens.Lens' TransferContact Prelude.Text
transferContact_contactFlowId :: Lens' TransferContact Text
transferContact_contactFlowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferContact' {Text
contactFlowId :: Text
$sel:contactFlowId:TransferContact' :: TransferContact -> Text
contactFlowId} -> Text
contactFlowId) (\s :: TransferContact
s@TransferContact' {} Text
a -> TransferContact
s {$sel:contactFlowId:TransferContact' :: Text
contactFlowId = Text
a} :: TransferContact)

instance Core.AWSRequest TransferContact where
  type
    AWSResponse TransferContact =
      TransferContactResponse
  request :: (Service -> Service) -> TransferContact -> Request TransferContact
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 TransferContact
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TransferContact)))
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 -> TransferContactResponse
TransferContactResponse'
            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
"ContactArn")
            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
"ContactId")
            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 TransferContact where
  hashWithSalt :: Int -> TransferContact -> Int
hashWithSalt Int
_salt TransferContact' {Maybe Text
Text
contactFlowId :: Text
contactId :: Text
instanceId :: Text
userId :: Maybe Text
queueId :: Maybe Text
clientToken :: Maybe Text
$sel:contactFlowId:TransferContact' :: TransferContact -> Text
$sel:contactId:TransferContact' :: TransferContact -> Text
$sel:instanceId:TransferContact' :: TransferContact -> Text
$sel:userId:TransferContact' :: TransferContact -> Maybe Text
$sel:queueId:TransferContact' :: TransferContact -> Maybe Text
$sel:clientToken:TransferContact' :: TransferContact -> 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
queueId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
contactId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
contactFlowId

instance Prelude.NFData TransferContact where
  rnf :: TransferContact -> ()
rnf TransferContact' {Maybe Text
Text
contactFlowId :: Text
contactId :: Text
instanceId :: Text
userId :: Maybe Text
queueId :: Maybe Text
clientToken :: Maybe Text
$sel:contactFlowId:TransferContact' :: TransferContact -> Text
$sel:contactId:TransferContact' :: TransferContact -> Text
$sel:instanceId:TransferContact' :: TransferContact -> Text
$sel:userId:TransferContact' :: TransferContact -> Maybe Text
$sel:queueId:TransferContact' :: TransferContact -> Maybe Text
$sel:clientToken:TransferContact' :: TransferContact -> 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
queueId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userId
      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
contactId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
contactFlowId

instance Data.ToHeaders TransferContact where
  toHeaders :: TransferContact -> 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 TransferContact where
  toJSON :: TransferContact -> Value
toJSON TransferContact' {Maybe Text
Text
contactFlowId :: Text
contactId :: Text
instanceId :: Text
userId :: Maybe Text
queueId :: Maybe Text
clientToken :: Maybe Text
$sel:contactFlowId:TransferContact' :: TransferContact -> Text
$sel:contactId:TransferContact' :: TransferContact -> Text
$sel:instanceId:TransferContact' :: TransferContact -> Text
$sel:userId:TransferContact' :: TransferContact -> Maybe Text
$sel:queueId:TransferContact' :: TransferContact -> Maybe Text
$sel:clientToken:TransferContact' :: TransferContact -> 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
"QueueId" 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
queueId,
            (Key
"UserId" 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
userId,
            forall a. a -> Maybe a
Prelude.Just (Key
"InstanceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
instanceId),
            forall a. a -> Maybe a
Prelude.Just (Key
"ContactId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
contactId),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ContactFlowId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
contactFlowId)
          ]
      )

instance Data.ToPath TransferContact where
  toPath :: TransferContact -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/contact/transfer"

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

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

-- |
-- Create a value of 'TransferContactResponse' 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:
--
-- 'contactArn', 'transferContactResponse_contactArn' - The Amazon Resource Name (ARN) of the contact.
--
-- 'contactId', 'transferContactResponse_contactId' - The identifier of the contact in this instance of Amazon Connect.
--
-- 'httpStatus', 'transferContactResponse_httpStatus' - The response's http status code.
newTransferContactResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  TransferContactResponse
newTransferContactResponse :: Int -> TransferContactResponse
newTransferContactResponse Int
pHttpStatus_ =
  TransferContactResponse'
    { $sel:contactArn:TransferContactResponse' :: Maybe Text
contactArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:contactId:TransferContactResponse' :: Maybe Text
contactId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:TransferContactResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the contact.
transferContactResponse_contactArn :: Lens.Lens' TransferContactResponse (Prelude.Maybe Prelude.Text)
transferContactResponse_contactArn :: Lens' TransferContactResponse (Maybe Text)
transferContactResponse_contactArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferContactResponse' {Maybe Text
contactArn :: Maybe Text
$sel:contactArn:TransferContactResponse' :: TransferContactResponse -> Maybe Text
contactArn} -> Maybe Text
contactArn) (\s :: TransferContactResponse
s@TransferContactResponse' {} Maybe Text
a -> TransferContactResponse
s {$sel:contactArn:TransferContactResponse' :: Maybe Text
contactArn = Maybe Text
a} :: TransferContactResponse)

-- | The identifier of the contact in this instance of Amazon Connect.
transferContactResponse_contactId :: Lens.Lens' TransferContactResponse (Prelude.Maybe Prelude.Text)
transferContactResponse_contactId :: Lens' TransferContactResponse (Maybe Text)
transferContactResponse_contactId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferContactResponse' {Maybe Text
contactId :: Maybe Text
$sel:contactId:TransferContactResponse' :: TransferContactResponse -> Maybe Text
contactId} -> Maybe Text
contactId) (\s :: TransferContactResponse
s@TransferContactResponse' {} Maybe Text
a -> TransferContactResponse
s {$sel:contactId:TransferContactResponse' :: Maybe Text
contactId = Maybe Text
a} :: TransferContactResponse)

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

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