{-# 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 #-}
module Amazonka.Connect.StartOutboundVoiceContact
(
StartOutboundVoiceContact (..),
newStartOutboundVoiceContact,
startOutboundVoiceContact_answerMachineDetectionConfig,
startOutboundVoiceContact_attributes,
startOutboundVoiceContact_campaignId,
startOutboundVoiceContact_clientToken,
startOutboundVoiceContact_queueId,
startOutboundVoiceContact_sourcePhoneNumber,
startOutboundVoiceContact_trafficType,
startOutboundVoiceContact_destinationPhoneNumber,
startOutboundVoiceContact_contactFlowId,
startOutboundVoiceContact_instanceId,
StartOutboundVoiceContactResponse (..),
newStartOutboundVoiceContactResponse,
startOutboundVoiceContactResponse_contactId,
startOutboundVoiceContactResponse_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
data StartOutboundVoiceContact = StartOutboundVoiceContact'
{
StartOutboundVoiceContact -> Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig :: Prelude.Maybe AnswerMachineDetectionConfig,
StartOutboundVoiceContact -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StartOutboundVoiceContact -> Maybe Text
campaignId :: Prelude.Maybe Prelude.Text,
StartOutboundVoiceContact -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
StartOutboundVoiceContact -> Maybe Text
queueId :: Prelude.Maybe Prelude.Text,
StartOutboundVoiceContact -> Maybe Text
sourcePhoneNumber :: Prelude.Maybe Prelude.Text,
StartOutboundVoiceContact -> Maybe TrafficType
trafficType :: Prelude.Maybe TrafficType,
StartOutboundVoiceContact -> Text
destinationPhoneNumber :: Prelude.Text,
StartOutboundVoiceContact -> Text
contactFlowId :: Prelude.Text,
StartOutboundVoiceContact -> Text
instanceId :: Prelude.Text
}
deriving (StartOutboundVoiceContact -> StartOutboundVoiceContact -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartOutboundVoiceContact -> StartOutboundVoiceContact -> Bool
$c/= :: StartOutboundVoiceContact -> StartOutboundVoiceContact -> Bool
== :: StartOutboundVoiceContact -> StartOutboundVoiceContact -> Bool
$c== :: StartOutboundVoiceContact -> StartOutboundVoiceContact -> Bool
Prelude.Eq, ReadPrec [StartOutboundVoiceContact]
ReadPrec StartOutboundVoiceContact
Int -> ReadS StartOutboundVoiceContact
ReadS [StartOutboundVoiceContact]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartOutboundVoiceContact]
$creadListPrec :: ReadPrec [StartOutboundVoiceContact]
readPrec :: ReadPrec StartOutboundVoiceContact
$creadPrec :: ReadPrec StartOutboundVoiceContact
readList :: ReadS [StartOutboundVoiceContact]
$creadList :: ReadS [StartOutboundVoiceContact]
readsPrec :: Int -> ReadS StartOutboundVoiceContact
$creadsPrec :: Int -> ReadS StartOutboundVoiceContact
Prelude.Read, Int -> StartOutboundVoiceContact -> ShowS
[StartOutboundVoiceContact] -> ShowS
StartOutboundVoiceContact -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartOutboundVoiceContact] -> ShowS
$cshowList :: [StartOutboundVoiceContact] -> ShowS
show :: StartOutboundVoiceContact -> String
$cshow :: StartOutboundVoiceContact -> String
showsPrec :: Int -> StartOutboundVoiceContact -> ShowS
$cshowsPrec :: Int -> StartOutboundVoiceContact -> ShowS
Prelude.Show, forall x.
Rep StartOutboundVoiceContact x -> StartOutboundVoiceContact
forall x.
StartOutboundVoiceContact -> Rep StartOutboundVoiceContact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartOutboundVoiceContact x -> StartOutboundVoiceContact
$cfrom :: forall x.
StartOutboundVoiceContact -> Rep StartOutboundVoiceContact x
Prelude.Generic)
newStartOutboundVoiceContact ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
StartOutboundVoiceContact
newStartOutboundVoiceContact :: Text -> Text -> Text -> StartOutboundVoiceContact
newStartOutboundVoiceContact
Text
pDestinationPhoneNumber_
Text
pContactFlowId_
Text
pInstanceId_ =
StartOutboundVoiceContact'
{ $sel:answerMachineDetectionConfig:StartOutboundVoiceContact' :: Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig =
forall a. Maybe a
Prelude.Nothing,
$sel:attributes:StartOutboundVoiceContact' :: Maybe (HashMap Text Text)
attributes = forall a. Maybe a
Prelude.Nothing,
$sel:campaignId:StartOutboundVoiceContact' :: Maybe Text
campaignId = forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:StartOutboundVoiceContact' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:queueId:StartOutboundVoiceContact' :: Maybe Text
queueId = forall a. Maybe a
Prelude.Nothing,
$sel:sourcePhoneNumber:StartOutboundVoiceContact' :: Maybe Text
sourcePhoneNumber = forall a. Maybe a
Prelude.Nothing,
$sel:trafficType:StartOutboundVoiceContact' :: Maybe TrafficType
trafficType = forall a. Maybe a
Prelude.Nothing,
$sel:destinationPhoneNumber:StartOutboundVoiceContact' :: Text
destinationPhoneNumber =
Text
pDestinationPhoneNumber_,
$sel:contactFlowId:StartOutboundVoiceContact' :: Text
contactFlowId = Text
pContactFlowId_,
$sel:instanceId:StartOutboundVoiceContact' :: Text
instanceId = Text
pInstanceId_
}
startOutboundVoiceContact_answerMachineDetectionConfig :: Lens.Lens' StartOutboundVoiceContact (Prelude.Maybe AnswerMachineDetectionConfig)
startOutboundVoiceContact_answerMachineDetectionConfig :: Lens'
StartOutboundVoiceContact (Maybe AnswerMachineDetectionConfig)
startOutboundVoiceContact_answerMachineDetectionConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:answerMachineDetectionConfig:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig} -> Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Maybe AnswerMachineDetectionConfig
a -> StartOutboundVoiceContact
s {$sel:answerMachineDetectionConfig:StartOutboundVoiceContact' :: Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig = Maybe AnswerMachineDetectionConfig
a} :: StartOutboundVoiceContact)
startOutboundVoiceContact_attributes :: Lens.Lens' StartOutboundVoiceContact (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startOutboundVoiceContact_attributes :: Lens' StartOutboundVoiceContact (Maybe (HashMap Text Text))
startOutboundVoiceContact_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Maybe (HashMap Text Text)
a -> StartOutboundVoiceContact
s {$sel:attributes:StartOutboundVoiceContact' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: StartOutboundVoiceContact) 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
startOutboundVoiceContact_campaignId :: Lens.Lens' StartOutboundVoiceContact (Prelude.Maybe Prelude.Text)
startOutboundVoiceContact_campaignId :: Lens' StartOutboundVoiceContact (Maybe Text)
startOutboundVoiceContact_campaignId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Maybe Text
campaignId :: Maybe Text
$sel:campaignId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
campaignId} -> Maybe Text
campaignId) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Maybe Text
a -> StartOutboundVoiceContact
s {$sel:campaignId:StartOutboundVoiceContact' :: Maybe Text
campaignId = Maybe Text
a} :: StartOutboundVoiceContact)
startOutboundVoiceContact_clientToken :: Lens.Lens' StartOutboundVoiceContact (Prelude.Maybe Prelude.Text)
startOutboundVoiceContact_clientToken :: Lens' StartOutboundVoiceContact (Maybe Text)
startOutboundVoiceContact_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Maybe Text
a -> StartOutboundVoiceContact
s {$sel:clientToken:StartOutboundVoiceContact' :: Maybe Text
clientToken = Maybe Text
a} :: StartOutboundVoiceContact)
startOutboundVoiceContact_queueId :: Lens.Lens' StartOutboundVoiceContact (Prelude.Maybe Prelude.Text)
startOutboundVoiceContact_queueId :: Lens' StartOutboundVoiceContact (Maybe Text)
startOutboundVoiceContact_queueId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Maybe Text
queueId :: Maybe Text
$sel:queueId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
queueId} -> Maybe Text
queueId) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Maybe Text
a -> StartOutboundVoiceContact
s {$sel:queueId:StartOutboundVoiceContact' :: Maybe Text
queueId = Maybe Text
a} :: StartOutboundVoiceContact)
startOutboundVoiceContact_sourcePhoneNumber :: Lens.Lens' StartOutboundVoiceContact (Prelude.Maybe Prelude.Text)
startOutboundVoiceContact_sourcePhoneNumber :: Lens' StartOutboundVoiceContact (Maybe Text)
startOutboundVoiceContact_sourcePhoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Maybe Text
sourcePhoneNumber :: Maybe Text
$sel:sourcePhoneNumber:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
sourcePhoneNumber} -> Maybe Text
sourcePhoneNumber) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Maybe Text
a -> StartOutboundVoiceContact
s {$sel:sourcePhoneNumber:StartOutboundVoiceContact' :: Maybe Text
sourcePhoneNumber = Maybe Text
a} :: StartOutboundVoiceContact)
startOutboundVoiceContact_trafficType :: Lens.Lens' StartOutboundVoiceContact (Prelude.Maybe TrafficType)
startOutboundVoiceContact_trafficType :: Lens' StartOutboundVoiceContact (Maybe TrafficType)
startOutboundVoiceContact_trafficType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Maybe TrafficType
trafficType :: Maybe TrafficType
$sel:trafficType:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe TrafficType
trafficType} -> Maybe TrafficType
trafficType) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Maybe TrafficType
a -> StartOutboundVoiceContact
s {$sel:trafficType:StartOutboundVoiceContact' :: Maybe TrafficType
trafficType = Maybe TrafficType
a} :: StartOutboundVoiceContact)
startOutboundVoiceContact_destinationPhoneNumber :: Lens.Lens' StartOutboundVoiceContact Prelude.Text
startOutboundVoiceContact_destinationPhoneNumber :: Lens' StartOutboundVoiceContact Text
startOutboundVoiceContact_destinationPhoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Text
destinationPhoneNumber :: Text
$sel:destinationPhoneNumber:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
destinationPhoneNumber} -> Text
destinationPhoneNumber) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Text
a -> StartOutboundVoiceContact
s {$sel:destinationPhoneNumber:StartOutboundVoiceContact' :: Text
destinationPhoneNumber = Text
a} :: StartOutboundVoiceContact)
startOutboundVoiceContact_contactFlowId :: Lens.Lens' StartOutboundVoiceContact Prelude.Text
startOutboundVoiceContact_contactFlowId :: Lens' StartOutboundVoiceContact Text
startOutboundVoiceContact_contactFlowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Text
contactFlowId :: Text
$sel:contactFlowId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
contactFlowId} -> Text
contactFlowId) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Text
a -> StartOutboundVoiceContact
s {$sel:contactFlowId:StartOutboundVoiceContact' :: Text
contactFlowId = Text
a} :: StartOutboundVoiceContact)
startOutboundVoiceContact_instanceId :: Lens.Lens' StartOutboundVoiceContact Prelude.Text
startOutboundVoiceContact_instanceId :: Lens' StartOutboundVoiceContact Text
startOutboundVoiceContact_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContact' {Text
instanceId :: Text
$sel:instanceId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
instanceId} -> Text
instanceId) (\s :: StartOutboundVoiceContact
s@StartOutboundVoiceContact' {} Text
a -> StartOutboundVoiceContact
s {$sel:instanceId:StartOutboundVoiceContact' :: Text
instanceId = Text
a} :: StartOutboundVoiceContact)
instance Core.AWSRequest StartOutboundVoiceContact where
type
AWSResponse StartOutboundVoiceContact =
StartOutboundVoiceContactResponse
request :: (Service -> Service)
-> StartOutboundVoiceContact -> Request StartOutboundVoiceContact
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 StartOutboundVoiceContact
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartOutboundVoiceContact)))
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 -> StartOutboundVoiceContactResponse
StartOutboundVoiceContactResponse'
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
"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 StartOutboundVoiceContact where
hashWithSalt :: Int -> StartOutboundVoiceContact -> Int
hashWithSalt Int
_salt StartOutboundVoiceContact' {Maybe Text
Maybe (HashMap Text Text)
Maybe AnswerMachineDetectionConfig
Maybe TrafficType
Text
instanceId :: Text
contactFlowId :: Text
destinationPhoneNumber :: Text
trafficType :: Maybe TrafficType
sourcePhoneNumber :: Maybe Text
queueId :: Maybe Text
clientToken :: Maybe Text
campaignId :: Maybe Text
attributes :: Maybe (HashMap Text Text)
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:instanceId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:contactFlowId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:destinationPhoneNumber:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:trafficType:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe TrafficType
$sel:sourcePhoneNumber:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:queueId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:clientToken:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:campaignId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:attributes:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe (HashMap Text Text)
$sel:answerMachineDetectionConfig:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe AnswerMachineDetectionConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
attributes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
campaignId
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
sourcePhoneNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TrafficType
trafficType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destinationPhoneNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
contactFlowId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
instance Prelude.NFData StartOutboundVoiceContact where
rnf :: StartOutboundVoiceContact -> ()
rnf StartOutboundVoiceContact' {Maybe Text
Maybe (HashMap Text Text)
Maybe AnswerMachineDetectionConfig
Maybe TrafficType
Text
instanceId :: Text
contactFlowId :: Text
destinationPhoneNumber :: Text
trafficType :: Maybe TrafficType
sourcePhoneNumber :: Maybe Text
queueId :: Maybe Text
clientToken :: Maybe Text
campaignId :: Maybe Text
attributes :: Maybe (HashMap Text Text)
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:instanceId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:contactFlowId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:destinationPhoneNumber:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:trafficType:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe TrafficType
$sel:sourcePhoneNumber:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:queueId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:clientToken:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:campaignId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:attributes:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe (HashMap Text Text)
$sel:answerMachineDetectionConfig:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe AnswerMachineDetectionConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
attributes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
campaignId
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
sourcePhoneNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TrafficType
trafficType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
destinationPhoneNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
contactFlowId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceId
instance Data.ToHeaders StartOutboundVoiceContact where
toHeaders :: StartOutboundVoiceContact -> 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 StartOutboundVoiceContact where
toJSON :: StartOutboundVoiceContact -> Value
toJSON StartOutboundVoiceContact' {Maybe Text
Maybe (HashMap Text Text)
Maybe AnswerMachineDetectionConfig
Maybe TrafficType
Text
instanceId :: Text
contactFlowId :: Text
destinationPhoneNumber :: Text
trafficType :: Maybe TrafficType
sourcePhoneNumber :: Maybe Text
queueId :: Maybe Text
clientToken :: Maybe Text
campaignId :: Maybe Text
attributes :: Maybe (HashMap Text Text)
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:instanceId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:contactFlowId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:destinationPhoneNumber:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Text
$sel:trafficType:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe TrafficType
$sel:sourcePhoneNumber:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:queueId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:clientToken:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:campaignId:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe Text
$sel:attributes:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe (HashMap Text Text)
$sel:answerMachineDetectionConfig:StartOutboundVoiceContact' :: StartOutboundVoiceContact -> Maybe AnswerMachineDetectionConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AnswerMachineDetectionConfig" 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 AnswerMachineDetectionConfig
answerMachineDetectionConfig,
(Key
"Attributes" 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)
attributes,
(Key
"CampaignId" 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
campaignId,
(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
"SourcePhoneNumber" 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
sourcePhoneNumber,
(Key
"TrafficType" 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 TrafficType
trafficType,
forall a. a -> Maybe a
Prelude.Just
( Key
"DestinationPhoneNumber"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
destinationPhoneNumber
),
forall a. a -> Maybe a
Prelude.Just (Key
"ContactFlowId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
contactFlowId),
forall a. a -> Maybe a
Prelude.Just (Key
"InstanceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
instanceId)
]
)
instance Data.ToPath StartOutboundVoiceContact where
toPath :: StartOutboundVoiceContact -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/contact/outbound-voice"
instance Data.ToQuery StartOutboundVoiceContact where
toQuery :: StartOutboundVoiceContact -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartOutboundVoiceContactResponse = StartOutboundVoiceContactResponse'
{
StartOutboundVoiceContactResponse -> Maybe Text
contactId :: Prelude.Maybe Prelude.Text,
StartOutboundVoiceContactResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartOutboundVoiceContactResponse
-> StartOutboundVoiceContactResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartOutboundVoiceContactResponse
-> StartOutboundVoiceContactResponse -> Bool
$c/= :: StartOutboundVoiceContactResponse
-> StartOutboundVoiceContactResponse -> Bool
== :: StartOutboundVoiceContactResponse
-> StartOutboundVoiceContactResponse -> Bool
$c== :: StartOutboundVoiceContactResponse
-> StartOutboundVoiceContactResponse -> Bool
Prelude.Eq, ReadPrec [StartOutboundVoiceContactResponse]
ReadPrec StartOutboundVoiceContactResponse
Int -> ReadS StartOutboundVoiceContactResponse
ReadS [StartOutboundVoiceContactResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartOutboundVoiceContactResponse]
$creadListPrec :: ReadPrec [StartOutboundVoiceContactResponse]
readPrec :: ReadPrec StartOutboundVoiceContactResponse
$creadPrec :: ReadPrec StartOutboundVoiceContactResponse
readList :: ReadS [StartOutboundVoiceContactResponse]
$creadList :: ReadS [StartOutboundVoiceContactResponse]
readsPrec :: Int -> ReadS StartOutboundVoiceContactResponse
$creadsPrec :: Int -> ReadS StartOutboundVoiceContactResponse
Prelude.Read, Int -> StartOutboundVoiceContactResponse -> ShowS
[StartOutboundVoiceContactResponse] -> ShowS
StartOutboundVoiceContactResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartOutboundVoiceContactResponse] -> ShowS
$cshowList :: [StartOutboundVoiceContactResponse] -> ShowS
show :: StartOutboundVoiceContactResponse -> String
$cshow :: StartOutboundVoiceContactResponse -> String
showsPrec :: Int -> StartOutboundVoiceContactResponse -> ShowS
$cshowsPrec :: Int -> StartOutboundVoiceContactResponse -> ShowS
Prelude.Show, forall x.
Rep StartOutboundVoiceContactResponse x
-> StartOutboundVoiceContactResponse
forall x.
StartOutboundVoiceContactResponse
-> Rep StartOutboundVoiceContactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartOutboundVoiceContactResponse x
-> StartOutboundVoiceContactResponse
$cfrom :: forall x.
StartOutboundVoiceContactResponse
-> Rep StartOutboundVoiceContactResponse x
Prelude.Generic)
newStartOutboundVoiceContactResponse ::
Prelude.Int ->
StartOutboundVoiceContactResponse
newStartOutboundVoiceContactResponse :: Int -> StartOutboundVoiceContactResponse
newStartOutboundVoiceContactResponse Int
pHttpStatus_ =
StartOutboundVoiceContactResponse'
{ $sel:contactId:StartOutboundVoiceContactResponse' :: Maybe Text
contactId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartOutboundVoiceContactResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startOutboundVoiceContactResponse_contactId :: Lens.Lens' StartOutboundVoiceContactResponse (Prelude.Maybe Prelude.Text)
startOutboundVoiceContactResponse_contactId :: Lens' StartOutboundVoiceContactResponse (Maybe Text)
startOutboundVoiceContactResponse_contactId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContactResponse' {Maybe Text
contactId :: Maybe Text
$sel:contactId:StartOutboundVoiceContactResponse' :: StartOutboundVoiceContactResponse -> Maybe Text
contactId} -> Maybe Text
contactId) (\s :: StartOutboundVoiceContactResponse
s@StartOutboundVoiceContactResponse' {} Maybe Text
a -> StartOutboundVoiceContactResponse
s {$sel:contactId:StartOutboundVoiceContactResponse' :: Maybe Text
contactId = Maybe Text
a} :: StartOutboundVoiceContactResponse)
startOutboundVoiceContactResponse_httpStatus :: Lens.Lens' StartOutboundVoiceContactResponse Prelude.Int
startOutboundVoiceContactResponse_httpStatus :: Lens' StartOutboundVoiceContactResponse Int
startOutboundVoiceContactResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartOutboundVoiceContactResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartOutboundVoiceContactResponse' :: StartOutboundVoiceContactResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartOutboundVoiceContactResponse
s@StartOutboundVoiceContactResponse' {} Int
a -> StartOutboundVoiceContactResponse
s {$sel:httpStatus:StartOutboundVoiceContactResponse' :: Int
httpStatus = Int
a} :: StartOutboundVoiceContactResponse)
instance
Prelude.NFData
StartOutboundVoiceContactResponse
where
rnf :: StartOutboundVoiceContactResponse -> ()
rnf StartOutboundVoiceContactResponse' {Int
Maybe Text
httpStatus :: Int
contactId :: Maybe Text
$sel:httpStatus:StartOutboundVoiceContactResponse' :: StartOutboundVoiceContactResponse -> Int
$sel:contactId:StartOutboundVoiceContactResponse' :: StartOutboundVoiceContactResponse -> Maybe Text
..} =
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