{-# 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.StartTaskContact
(
StartTaskContact (..),
newStartTaskContact,
startTaskContact_attributes,
startTaskContact_clientToken,
startTaskContact_contactFlowId,
startTaskContact_description,
startTaskContact_previousContactId,
startTaskContact_quickConnectId,
startTaskContact_references,
startTaskContact_scheduledTime,
startTaskContact_taskTemplateId,
startTaskContact_instanceId,
startTaskContact_name,
StartTaskContactResponse (..),
newStartTaskContactResponse,
startTaskContactResponse_contactId,
startTaskContactResponse_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 StartTaskContact = StartTaskContact'
{
StartTaskContact -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StartTaskContact -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
StartTaskContact -> Maybe Text
contactFlowId :: Prelude.Maybe Prelude.Text,
StartTaskContact -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
StartTaskContact -> Maybe Text
previousContactId :: Prelude.Maybe Prelude.Text,
StartTaskContact -> Maybe Text
quickConnectId :: Prelude.Maybe Prelude.Text,
StartTaskContact -> Maybe (HashMap Text Reference)
references :: Prelude.Maybe (Prelude.HashMap Prelude.Text Reference),
StartTaskContact -> Maybe POSIX
scheduledTime :: Prelude.Maybe Data.POSIX,
StartTaskContact -> Maybe Text
taskTemplateId :: Prelude.Maybe Prelude.Text,
StartTaskContact -> Text
instanceId :: Prelude.Text,
StartTaskContact -> Text
name :: Prelude.Text
}
deriving (StartTaskContact -> StartTaskContact -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTaskContact -> StartTaskContact -> Bool
$c/= :: StartTaskContact -> StartTaskContact -> Bool
== :: StartTaskContact -> StartTaskContact -> Bool
$c== :: StartTaskContact -> StartTaskContact -> Bool
Prelude.Eq, ReadPrec [StartTaskContact]
ReadPrec StartTaskContact
Int -> ReadS StartTaskContact
ReadS [StartTaskContact]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTaskContact]
$creadListPrec :: ReadPrec [StartTaskContact]
readPrec :: ReadPrec StartTaskContact
$creadPrec :: ReadPrec StartTaskContact
readList :: ReadS [StartTaskContact]
$creadList :: ReadS [StartTaskContact]
readsPrec :: Int -> ReadS StartTaskContact
$creadsPrec :: Int -> ReadS StartTaskContact
Prelude.Read, Int -> StartTaskContact -> ShowS
[StartTaskContact] -> ShowS
StartTaskContact -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTaskContact] -> ShowS
$cshowList :: [StartTaskContact] -> ShowS
show :: StartTaskContact -> String
$cshow :: StartTaskContact -> String
showsPrec :: Int -> StartTaskContact -> ShowS
$cshowsPrec :: Int -> StartTaskContact -> ShowS
Prelude.Show, forall x. Rep StartTaskContact x -> StartTaskContact
forall x. StartTaskContact -> Rep StartTaskContact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartTaskContact x -> StartTaskContact
$cfrom :: forall x. StartTaskContact -> Rep StartTaskContact x
Prelude.Generic)
newStartTaskContact ::
Prelude.Text ->
Prelude.Text ->
StartTaskContact
newStartTaskContact :: Text -> Text -> StartTaskContact
newStartTaskContact Text
pInstanceId_ Text
pName_ =
StartTaskContact'
{ $sel:attributes:StartTaskContact' :: Maybe (HashMap Text Text)
attributes = forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:StartTaskContact' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:contactFlowId:StartTaskContact' :: Maybe Text
contactFlowId = forall a. Maybe a
Prelude.Nothing,
$sel:description:StartTaskContact' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:previousContactId:StartTaskContact' :: Maybe Text
previousContactId = forall a. Maybe a
Prelude.Nothing,
$sel:quickConnectId:StartTaskContact' :: Maybe Text
quickConnectId = forall a. Maybe a
Prelude.Nothing,
$sel:references:StartTaskContact' :: Maybe (HashMap Text Reference)
references = forall a. Maybe a
Prelude.Nothing,
$sel:scheduledTime:StartTaskContact' :: Maybe POSIX
scheduledTime = forall a. Maybe a
Prelude.Nothing,
$sel:taskTemplateId:StartTaskContact' :: Maybe Text
taskTemplateId = forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:StartTaskContact' :: Text
instanceId = Text
pInstanceId_,
$sel:name:StartTaskContact' :: Text
name = Text
pName_
}
startTaskContact_attributes :: Lens.Lens' StartTaskContact (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startTaskContact_attributes :: Lens' StartTaskContact (Maybe (HashMap Text Text))
startTaskContact_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:StartTaskContact' :: StartTaskContact -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe (HashMap Text Text)
a -> StartTaskContact
s {$sel:attributes:StartTaskContact' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: StartTaskContact) 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
startTaskContact_clientToken :: Lens.Lens' StartTaskContact (Prelude.Maybe Prelude.Text)
startTaskContact_clientToken :: Lens' StartTaskContact (Maybe Text)
startTaskContact_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:StartTaskContact' :: StartTaskContact -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe Text
a -> StartTaskContact
s {$sel:clientToken:StartTaskContact' :: Maybe Text
clientToken = Maybe Text
a} :: StartTaskContact)
startTaskContact_contactFlowId :: Lens.Lens' StartTaskContact (Prelude.Maybe Prelude.Text)
startTaskContact_contactFlowId :: Lens' StartTaskContact (Maybe Text)
startTaskContact_contactFlowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe Text
contactFlowId :: Maybe Text
$sel:contactFlowId:StartTaskContact' :: StartTaskContact -> Maybe Text
contactFlowId} -> Maybe Text
contactFlowId) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe Text
a -> StartTaskContact
s {$sel:contactFlowId:StartTaskContact' :: Maybe Text
contactFlowId = Maybe Text
a} :: StartTaskContact)
startTaskContact_description :: Lens.Lens' StartTaskContact (Prelude.Maybe Prelude.Text)
startTaskContact_description :: Lens' StartTaskContact (Maybe Text)
startTaskContact_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe Text
description :: Maybe Text
$sel:description:StartTaskContact' :: StartTaskContact -> Maybe Text
description} -> Maybe Text
description) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe Text
a -> StartTaskContact
s {$sel:description:StartTaskContact' :: Maybe Text
description = Maybe Text
a} :: StartTaskContact)
startTaskContact_previousContactId :: Lens.Lens' StartTaskContact (Prelude.Maybe Prelude.Text)
startTaskContact_previousContactId :: Lens' StartTaskContact (Maybe Text)
startTaskContact_previousContactId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe Text
previousContactId :: Maybe Text
$sel:previousContactId:StartTaskContact' :: StartTaskContact -> Maybe Text
previousContactId} -> Maybe Text
previousContactId) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe Text
a -> StartTaskContact
s {$sel:previousContactId:StartTaskContact' :: Maybe Text
previousContactId = Maybe Text
a} :: StartTaskContact)
startTaskContact_quickConnectId :: Lens.Lens' StartTaskContact (Prelude.Maybe Prelude.Text)
startTaskContact_quickConnectId :: Lens' StartTaskContact (Maybe Text)
startTaskContact_quickConnectId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe Text
quickConnectId :: Maybe Text
$sel:quickConnectId:StartTaskContact' :: StartTaskContact -> Maybe Text
quickConnectId} -> Maybe Text
quickConnectId) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe Text
a -> StartTaskContact
s {$sel:quickConnectId:StartTaskContact' :: Maybe Text
quickConnectId = Maybe Text
a} :: StartTaskContact)
startTaskContact_references :: Lens.Lens' StartTaskContact (Prelude.Maybe (Prelude.HashMap Prelude.Text Reference))
startTaskContact_references :: Lens' StartTaskContact (Maybe (HashMap Text Reference))
startTaskContact_references = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe (HashMap Text Reference)
references :: Maybe (HashMap Text Reference)
$sel:references:StartTaskContact' :: StartTaskContact -> Maybe (HashMap Text Reference)
references} -> Maybe (HashMap Text Reference)
references) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe (HashMap Text Reference)
a -> StartTaskContact
s {$sel:references:StartTaskContact' :: Maybe (HashMap Text Reference)
references = Maybe (HashMap Text Reference)
a} :: StartTaskContact) 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
startTaskContact_scheduledTime :: Lens.Lens' StartTaskContact (Prelude.Maybe Prelude.UTCTime)
startTaskContact_scheduledTime :: Lens' StartTaskContact (Maybe UTCTime)
startTaskContact_scheduledTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe POSIX
scheduledTime :: Maybe POSIX
$sel:scheduledTime:StartTaskContact' :: StartTaskContact -> Maybe POSIX
scheduledTime} -> Maybe POSIX
scheduledTime) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe POSIX
a -> StartTaskContact
s {$sel:scheduledTime:StartTaskContact' :: Maybe POSIX
scheduledTime = Maybe POSIX
a} :: StartTaskContact) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
startTaskContact_taskTemplateId :: Lens.Lens' StartTaskContact (Prelude.Maybe Prelude.Text)
startTaskContact_taskTemplateId :: Lens' StartTaskContact (Maybe Text)
startTaskContact_taskTemplateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Maybe Text
taskTemplateId :: Maybe Text
$sel:taskTemplateId:StartTaskContact' :: StartTaskContact -> Maybe Text
taskTemplateId} -> Maybe Text
taskTemplateId) (\s :: StartTaskContact
s@StartTaskContact' {} Maybe Text
a -> StartTaskContact
s {$sel:taskTemplateId:StartTaskContact' :: Maybe Text
taskTemplateId = Maybe Text
a} :: StartTaskContact)
startTaskContact_instanceId :: Lens.Lens' StartTaskContact Prelude.Text
startTaskContact_instanceId :: Lens' StartTaskContact Text
startTaskContact_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Text
instanceId :: Text
$sel:instanceId:StartTaskContact' :: StartTaskContact -> Text
instanceId} -> Text
instanceId) (\s :: StartTaskContact
s@StartTaskContact' {} Text
a -> StartTaskContact
s {$sel:instanceId:StartTaskContact' :: Text
instanceId = Text
a} :: StartTaskContact)
startTaskContact_name :: Lens.Lens' StartTaskContact Prelude.Text
startTaskContact_name :: Lens' StartTaskContact Text
startTaskContact_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContact' {Text
name :: Text
$sel:name:StartTaskContact' :: StartTaskContact -> Text
name} -> Text
name) (\s :: StartTaskContact
s@StartTaskContact' {} Text
a -> StartTaskContact
s {$sel:name:StartTaskContact' :: Text
name = Text
a} :: StartTaskContact)
instance Core.AWSRequest StartTaskContact where
type
AWSResponse StartTaskContact =
StartTaskContactResponse
request :: (Service -> Service)
-> StartTaskContact -> Request StartTaskContact
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 StartTaskContact
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartTaskContact)))
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 -> StartTaskContactResponse
StartTaskContactResponse'
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 StartTaskContact where
hashWithSalt :: Int -> StartTaskContact -> Int
hashWithSalt Int
_salt StartTaskContact' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text Reference)
Maybe POSIX
Text
name :: Text
instanceId :: Text
taskTemplateId :: Maybe Text
scheduledTime :: Maybe POSIX
references :: Maybe (HashMap Text Reference)
quickConnectId :: Maybe Text
previousContactId :: Maybe Text
description :: Maybe Text
contactFlowId :: Maybe Text
clientToken :: Maybe Text
attributes :: Maybe (HashMap Text Text)
$sel:name:StartTaskContact' :: StartTaskContact -> Text
$sel:instanceId:StartTaskContact' :: StartTaskContact -> Text
$sel:taskTemplateId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:scheduledTime:StartTaskContact' :: StartTaskContact -> Maybe POSIX
$sel:references:StartTaskContact' :: StartTaskContact -> Maybe (HashMap Text Reference)
$sel:quickConnectId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:previousContactId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:description:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:contactFlowId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:clientToken:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:attributes:StartTaskContact' :: StartTaskContact -> Maybe (HashMap Text Text)
..} =
Int
_salt
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
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contactFlowId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
previousContactId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
quickConnectId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Reference)
references
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
scheduledTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
taskTemplateId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData StartTaskContact where
rnf :: StartTaskContact -> ()
rnf StartTaskContact' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text Reference)
Maybe POSIX
Text
name :: Text
instanceId :: Text
taskTemplateId :: Maybe Text
scheduledTime :: Maybe POSIX
references :: Maybe (HashMap Text Reference)
quickConnectId :: Maybe Text
previousContactId :: Maybe Text
description :: Maybe Text
contactFlowId :: Maybe Text
clientToken :: Maybe Text
attributes :: Maybe (HashMap Text Text)
$sel:name:StartTaskContact' :: StartTaskContact -> Text
$sel:instanceId:StartTaskContact' :: StartTaskContact -> Text
$sel:taskTemplateId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:scheduledTime:StartTaskContact' :: StartTaskContact -> Maybe POSIX
$sel:references:StartTaskContact' :: StartTaskContact -> Maybe (HashMap Text Reference)
$sel:quickConnectId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:previousContactId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:description:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:contactFlowId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:clientToken:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:attributes:StartTaskContact' :: StartTaskContact -> Maybe (HashMap Text Text)
..} =
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
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contactFlowId
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 Text
previousContactId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
quickConnectId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Reference)
references
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
scheduledTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
taskTemplateId
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
instance Data.ToHeaders StartTaskContact where
toHeaders :: StartTaskContact -> 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 StartTaskContact where
toJSON :: StartTaskContact -> Value
toJSON StartTaskContact' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text Reference)
Maybe POSIX
Text
name :: Text
instanceId :: Text
taskTemplateId :: Maybe Text
scheduledTime :: Maybe POSIX
references :: Maybe (HashMap Text Reference)
quickConnectId :: Maybe Text
previousContactId :: Maybe Text
description :: Maybe Text
contactFlowId :: Maybe Text
clientToken :: Maybe Text
attributes :: Maybe (HashMap Text Text)
$sel:name:StartTaskContact' :: StartTaskContact -> Text
$sel:instanceId:StartTaskContact' :: StartTaskContact -> Text
$sel:taskTemplateId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:scheduledTime:StartTaskContact' :: StartTaskContact -> Maybe POSIX
$sel:references:StartTaskContact' :: StartTaskContact -> Maybe (HashMap Text Reference)
$sel:quickConnectId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:previousContactId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:description:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:contactFlowId:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:clientToken:StartTaskContact' :: StartTaskContact -> Maybe Text
$sel:attributes:StartTaskContact' :: StartTaskContact -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"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
"ContactFlowId" 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
contactFlowId,
(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
"PreviousContactId" 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
previousContactId,
(Key
"QuickConnectId" 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
quickConnectId,
(Key
"References" 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 Reference)
references,
(Key
"ScheduledTime" 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 POSIX
scheduledTime,
(Key
"TaskTemplateId" 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
taskTemplateId,
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
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
]
)
instance Data.ToPath StartTaskContact where
toPath :: StartTaskContact -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/contact/task"
instance Data.ToQuery StartTaskContact where
toQuery :: StartTaskContact -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartTaskContactResponse = StartTaskContactResponse'
{
StartTaskContactResponse -> Maybe Text
contactId :: Prelude.Maybe Prelude.Text,
StartTaskContactResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartTaskContactResponse -> StartTaskContactResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTaskContactResponse -> StartTaskContactResponse -> Bool
$c/= :: StartTaskContactResponse -> StartTaskContactResponse -> Bool
== :: StartTaskContactResponse -> StartTaskContactResponse -> Bool
$c== :: StartTaskContactResponse -> StartTaskContactResponse -> Bool
Prelude.Eq, ReadPrec [StartTaskContactResponse]
ReadPrec StartTaskContactResponse
Int -> ReadS StartTaskContactResponse
ReadS [StartTaskContactResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTaskContactResponse]
$creadListPrec :: ReadPrec [StartTaskContactResponse]
readPrec :: ReadPrec StartTaskContactResponse
$creadPrec :: ReadPrec StartTaskContactResponse
readList :: ReadS [StartTaskContactResponse]
$creadList :: ReadS [StartTaskContactResponse]
readsPrec :: Int -> ReadS StartTaskContactResponse
$creadsPrec :: Int -> ReadS StartTaskContactResponse
Prelude.Read, Int -> StartTaskContactResponse -> ShowS
[StartTaskContactResponse] -> ShowS
StartTaskContactResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTaskContactResponse] -> ShowS
$cshowList :: [StartTaskContactResponse] -> ShowS
show :: StartTaskContactResponse -> String
$cshow :: StartTaskContactResponse -> String
showsPrec :: Int -> StartTaskContactResponse -> ShowS
$cshowsPrec :: Int -> StartTaskContactResponse -> ShowS
Prelude.Show, forall x.
Rep StartTaskContactResponse x -> StartTaskContactResponse
forall x.
StartTaskContactResponse -> Rep StartTaskContactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartTaskContactResponse x -> StartTaskContactResponse
$cfrom :: forall x.
StartTaskContactResponse -> Rep StartTaskContactResponse x
Prelude.Generic)
newStartTaskContactResponse ::
Prelude.Int ->
StartTaskContactResponse
newStartTaskContactResponse :: Int -> StartTaskContactResponse
newStartTaskContactResponse Int
pHttpStatus_ =
StartTaskContactResponse'
{ $sel:contactId:StartTaskContactResponse' :: Maybe Text
contactId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartTaskContactResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startTaskContactResponse_contactId :: Lens.Lens' StartTaskContactResponse (Prelude.Maybe Prelude.Text)
startTaskContactResponse_contactId :: Lens' StartTaskContactResponse (Maybe Text)
startTaskContactResponse_contactId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContactResponse' {Maybe Text
contactId :: Maybe Text
$sel:contactId:StartTaskContactResponse' :: StartTaskContactResponse -> Maybe Text
contactId} -> Maybe Text
contactId) (\s :: StartTaskContactResponse
s@StartTaskContactResponse' {} Maybe Text
a -> StartTaskContactResponse
s {$sel:contactId:StartTaskContactResponse' :: Maybe Text
contactId = Maybe Text
a} :: StartTaskContactResponse)
startTaskContactResponse_httpStatus :: Lens.Lens' StartTaskContactResponse Prelude.Int
startTaskContactResponse_httpStatus :: Lens' StartTaskContactResponse Int
startTaskContactResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskContactResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartTaskContactResponse' :: StartTaskContactResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartTaskContactResponse
s@StartTaskContactResponse' {} Int
a -> StartTaskContactResponse
s {$sel:httpStatus:StartTaskContactResponse' :: Int
httpStatus = Int
a} :: StartTaskContactResponse)
instance Prelude.NFData StartTaskContactResponse where
rnf :: StartTaskContactResponse -> ()
rnf StartTaskContactResponse' {Int
Maybe Text
httpStatus :: Int
contactId :: Maybe Text
$sel:httpStatus:StartTaskContactResponse' :: StartTaskContactResponse -> Int
$sel:contactId:StartTaskContactResponse' :: StartTaskContactResponse -> 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