{-# 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.SWF.RespondActivityTaskCompleted
(
RespondActivityTaskCompleted (..),
newRespondActivityTaskCompleted,
respondActivityTaskCompleted_result,
respondActivityTaskCompleted_taskToken,
RespondActivityTaskCompletedResponse (..),
newRespondActivityTaskCompletedResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SWF.Types
data RespondActivityTaskCompleted = RespondActivityTaskCompleted'
{
RespondActivityTaskCompleted -> Maybe Text
result :: Prelude.Maybe Prelude.Text,
RespondActivityTaskCompleted -> Text
taskToken :: Prelude.Text
}
deriving (RespondActivityTaskCompleted
-> RespondActivityTaskCompleted -> Bool
(RespondActivityTaskCompleted
-> RespondActivityTaskCompleted -> Bool)
-> (RespondActivityTaskCompleted
-> RespondActivityTaskCompleted -> Bool)
-> Eq RespondActivityTaskCompleted
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RespondActivityTaskCompleted
-> RespondActivityTaskCompleted -> Bool
$c/= :: RespondActivityTaskCompleted
-> RespondActivityTaskCompleted -> Bool
== :: RespondActivityTaskCompleted
-> RespondActivityTaskCompleted -> Bool
$c== :: RespondActivityTaskCompleted
-> RespondActivityTaskCompleted -> Bool
Prelude.Eq, ReadPrec [RespondActivityTaskCompleted]
ReadPrec RespondActivityTaskCompleted
Int -> ReadS RespondActivityTaskCompleted
ReadS [RespondActivityTaskCompleted]
(Int -> ReadS RespondActivityTaskCompleted)
-> ReadS [RespondActivityTaskCompleted]
-> ReadPrec RespondActivityTaskCompleted
-> ReadPrec [RespondActivityTaskCompleted]
-> Read RespondActivityTaskCompleted
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RespondActivityTaskCompleted]
$creadListPrec :: ReadPrec [RespondActivityTaskCompleted]
readPrec :: ReadPrec RespondActivityTaskCompleted
$creadPrec :: ReadPrec RespondActivityTaskCompleted
readList :: ReadS [RespondActivityTaskCompleted]
$creadList :: ReadS [RespondActivityTaskCompleted]
readsPrec :: Int -> ReadS RespondActivityTaskCompleted
$creadsPrec :: Int -> ReadS RespondActivityTaskCompleted
Prelude.Read, Int -> RespondActivityTaskCompleted -> ShowS
[RespondActivityTaskCompleted] -> ShowS
RespondActivityTaskCompleted -> String
(Int -> RespondActivityTaskCompleted -> ShowS)
-> (RespondActivityTaskCompleted -> String)
-> ([RespondActivityTaskCompleted] -> ShowS)
-> Show RespondActivityTaskCompleted
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RespondActivityTaskCompleted] -> ShowS
$cshowList :: [RespondActivityTaskCompleted] -> ShowS
show :: RespondActivityTaskCompleted -> String
$cshow :: RespondActivityTaskCompleted -> String
showsPrec :: Int -> RespondActivityTaskCompleted -> ShowS
$cshowsPrec :: Int -> RespondActivityTaskCompleted -> ShowS
Prelude.Show, (forall x.
RespondActivityTaskCompleted -> Rep RespondActivityTaskCompleted x)
-> (forall x.
Rep RespondActivityTaskCompleted x -> RespondActivityTaskCompleted)
-> Generic RespondActivityTaskCompleted
forall x.
Rep RespondActivityTaskCompleted x -> RespondActivityTaskCompleted
forall x.
RespondActivityTaskCompleted -> Rep RespondActivityTaskCompleted x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RespondActivityTaskCompleted x -> RespondActivityTaskCompleted
$cfrom :: forall x.
RespondActivityTaskCompleted -> Rep RespondActivityTaskCompleted x
Prelude.Generic)
newRespondActivityTaskCompleted ::
Prelude.Text ->
RespondActivityTaskCompleted
newRespondActivityTaskCompleted :: Text -> RespondActivityTaskCompleted
newRespondActivityTaskCompleted Text
pTaskToken_ =
RespondActivityTaskCompleted' :: Maybe Text -> Text -> RespondActivityTaskCompleted
RespondActivityTaskCompleted'
{ $sel:result:RespondActivityTaskCompleted' :: Maybe Text
result =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taskToken:RespondActivityTaskCompleted' :: Text
taskToken = Text
pTaskToken_
}
respondActivityTaskCompleted_result :: Lens.Lens' RespondActivityTaskCompleted (Prelude.Maybe Prelude.Text)
respondActivityTaskCompleted_result :: (Maybe Text -> f (Maybe Text))
-> RespondActivityTaskCompleted -> f RespondActivityTaskCompleted
respondActivityTaskCompleted_result = (RespondActivityTaskCompleted -> Maybe Text)
-> (RespondActivityTaskCompleted
-> Maybe Text -> RespondActivityTaskCompleted)
-> Lens
RespondActivityTaskCompleted
RespondActivityTaskCompleted
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RespondActivityTaskCompleted' {Maybe Text
result :: Maybe Text
$sel:result:RespondActivityTaskCompleted' :: RespondActivityTaskCompleted -> Maybe Text
result} -> Maybe Text
result) (\s :: RespondActivityTaskCompleted
s@RespondActivityTaskCompleted' {} Maybe Text
a -> RespondActivityTaskCompleted
s {$sel:result:RespondActivityTaskCompleted' :: Maybe Text
result = Maybe Text
a} :: RespondActivityTaskCompleted)
respondActivityTaskCompleted_taskToken :: Lens.Lens' RespondActivityTaskCompleted Prelude.Text
respondActivityTaskCompleted_taskToken :: (Text -> f Text)
-> RespondActivityTaskCompleted -> f RespondActivityTaskCompleted
respondActivityTaskCompleted_taskToken = (RespondActivityTaskCompleted -> Text)
-> (RespondActivityTaskCompleted
-> Text -> RespondActivityTaskCompleted)
-> Lens
RespondActivityTaskCompleted RespondActivityTaskCompleted Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RespondActivityTaskCompleted' {Text
taskToken :: Text
$sel:taskToken:RespondActivityTaskCompleted' :: RespondActivityTaskCompleted -> Text
taskToken} -> Text
taskToken) (\s :: RespondActivityTaskCompleted
s@RespondActivityTaskCompleted' {} Text
a -> RespondActivityTaskCompleted
s {$sel:taskToken:RespondActivityTaskCompleted' :: Text
taskToken = Text
a} :: RespondActivityTaskCompleted)
instance Core.AWSRequest RespondActivityTaskCompleted where
type
AWSResponse RespondActivityTaskCompleted =
RespondActivityTaskCompletedResponse
request :: RespondActivityTaskCompleted
-> Request RespondActivityTaskCompleted
request = Service
-> RespondActivityTaskCompleted
-> Request RespondActivityTaskCompleted
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RespondActivityTaskCompleted
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RespondActivityTaskCompleted)))
response =
AWSResponse RespondActivityTaskCompleted
-> Logger
-> Service
-> Proxy RespondActivityTaskCompleted
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RespondActivityTaskCompleted)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse RespondActivityTaskCompleted
RespondActivityTaskCompletedResponse
RespondActivityTaskCompletedResponse'
instance
Prelude.Hashable
RespondActivityTaskCompleted
instance Prelude.NFData RespondActivityTaskCompleted
instance Core.ToHeaders RespondActivityTaskCompleted where
toHeaders :: RespondActivityTaskCompleted -> [Header]
toHeaders =
[Header] -> RespondActivityTaskCompleted -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"SimpleWorkflowService.RespondActivityTaskCompleted" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON RespondActivityTaskCompleted where
toJSON :: RespondActivityTaskCompleted -> Value
toJSON RespondActivityTaskCompleted' {Maybe Text
Text
taskToken :: Text
result :: Maybe Text
$sel:taskToken:RespondActivityTaskCompleted' :: RespondActivityTaskCompleted -> Text
$sel:result:RespondActivityTaskCompleted' :: RespondActivityTaskCompleted -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"result" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
result,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"taskToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
taskToken)
]
)
instance Core.ToPath RespondActivityTaskCompleted where
toPath :: RespondActivityTaskCompleted -> ByteString
toPath = ByteString -> RespondActivityTaskCompleted -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RespondActivityTaskCompleted where
toQuery :: RespondActivityTaskCompleted -> QueryString
toQuery = QueryString -> RespondActivityTaskCompleted -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RespondActivityTaskCompletedResponse = RespondActivityTaskCompletedResponse'
{
}
deriving (RespondActivityTaskCompletedResponse
-> RespondActivityTaskCompletedResponse -> Bool
(RespondActivityTaskCompletedResponse
-> RespondActivityTaskCompletedResponse -> Bool)
-> (RespondActivityTaskCompletedResponse
-> RespondActivityTaskCompletedResponse -> Bool)
-> Eq RespondActivityTaskCompletedResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RespondActivityTaskCompletedResponse
-> RespondActivityTaskCompletedResponse -> Bool
$c/= :: RespondActivityTaskCompletedResponse
-> RespondActivityTaskCompletedResponse -> Bool
== :: RespondActivityTaskCompletedResponse
-> RespondActivityTaskCompletedResponse -> Bool
$c== :: RespondActivityTaskCompletedResponse
-> RespondActivityTaskCompletedResponse -> Bool
Prelude.Eq, ReadPrec [RespondActivityTaskCompletedResponse]
ReadPrec RespondActivityTaskCompletedResponse
Int -> ReadS RespondActivityTaskCompletedResponse
ReadS [RespondActivityTaskCompletedResponse]
(Int -> ReadS RespondActivityTaskCompletedResponse)
-> ReadS [RespondActivityTaskCompletedResponse]
-> ReadPrec RespondActivityTaskCompletedResponse
-> ReadPrec [RespondActivityTaskCompletedResponse]
-> Read RespondActivityTaskCompletedResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RespondActivityTaskCompletedResponse]
$creadListPrec :: ReadPrec [RespondActivityTaskCompletedResponse]
readPrec :: ReadPrec RespondActivityTaskCompletedResponse
$creadPrec :: ReadPrec RespondActivityTaskCompletedResponse
readList :: ReadS [RespondActivityTaskCompletedResponse]
$creadList :: ReadS [RespondActivityTaskCompletedResponse]
readsPrec :: Int -> ReadS RespondActivityTaskCompletedResponse
$creadsPrec :: Int -> ReadS RespondActivityTaskCompletedResponse
Prelude.Read, Int -> RespondActivityTaskCompletedResponse -> ShowS
[RespondActivityTaskCompletedResponse] -> ShowS
RespondActivityTaskCompletedResponse -> String
(Int -> RespondActivityTaskCompletedResponse -> ShowS)
-> (RespondActivityTaskCompletedResponse -> String)
-> ([RespondActivityTaskCompletedResponse] -> ShowS)
-> Show RespondActivityTaskCompletedResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RespondActivityTaskCompletedResponse] -> ShowS
$cshowList :: [RespondActivityTaskCompletedResponse] -> ShowS
show :: RespondActivityTaskCompletedResponse -> String
$cshow :: RespondActivityTaskCompletedResponse -> String
showsPrec :: Int -> RespondActivityTaskCompletedResponse -> ShowS
$cshowsPrec :: Int -> RespondActivityTaskCompletedResponse -> ShowS
Prelude.Show, (forall x.
RespondActivityTaskCompletedResponse
-> Rep RespondActivityTaskCompletedResponse x)
-> (forall x.
Rep RespondActivityTaskCompletedResponse x
-> RespondActivityTaskCompletedResponse)
-> Generic RespondActivityTaskCompletedResponse
forall x.
Rep RespondActivityTaskCompletedResponse x
-> RespondActivityTaskCompletedResponse
forall x.
RespondActivityTaskCompletedResponse
-> Rep RespondActivityTaskCompletedResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RespondActivityTaskCompletedResponse x
-> RespondActivityTaskCompletedResponse
$cfrom :: forall x.
RespondActivityTaskCompletedResponse
-> Rep RespondActivityTaskCompletedResponse x
Prelude.Generic)
newRespondActivityTaskCompletedResponse ::
RespondActivityTaskCompletedResponse
newRespondActivityTaskCompletedResponse :: RespondActivityTaskCompletedResponse
newRespondActivityTaskCompletedResponse =
RespondActivityTaskCompletedResponse
RespondActivityTaskCompletedResponse'
instance
Prelude.NFData
RespondActivityTaskCompletedResponse