{-# 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.RespondActivityTaskCanceled
(
RespondActivityTaskCanceled (..),
newRespondActivityTaskCanceled,
respondActivityTaskCanceled_details,
respondActivityTaskCanceled_taskToken,
RespondActivityTaskCanceledResponse (..),
newRespondActivityTaskCanceledResponse,
)
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 RespondActivityTaskCanceled = RespondActivityTaskCanceled'
{
RespondActivityTaskCanceled -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
RespondActivityTaskCanceled -> Text
taskToken :: Prelude.Text
}
deriving (RespondActivityTaskCanceled -> RespondActivityTaskCanceled -> Bool
(RespondActivityTaskCanceled
-> RespondActivityTaskCanceled -> Bool)
-> (RespondActivityTaskCanceled
-> RespondActivityTaskCanceled -> Bool)
-> Eq RespondActivityTaskCanceled
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RespondActivityTaskCanceled -> RespondActivityTaskCanceled -> Bool
$c/= :: RespondActivityTaskCanceled -> RespondActivityTaskCanceled -> Bool
== :: RespondActivityTaskCanceled -> RespondActivityTaskCanceled -> Bool
$c== :: RespondActivityTaskCanceled -> RespondActivityTaskCanceled -> Bool
Prelude.Eq, ReadPrec [RespondActivityTaskCanceled]
ReadPrec RespondActivityTaskCanceled
Int -> ReadS RespondActivityTaskCanceled
ReadS [RespondActivityTaskCanceled]
(Int -> ReadS RespondActivityTaskCanceled)
-> ReadS [RespondActivityTaskCanceled]
-> ReadPrec RespondActivityTaskCanceled
-> ReadPrec [RespondActivityTaskCanceled]
-> Read RespondActivityTaskCanceled
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RespondActivityTaskCanceled]
$creadListPrec :: ReadPrec [RespondActivityTaskCanceled]
readPrec :: ReadPrec RespondActivityTaskCanceled
$creadPrec :: ReadPrec RespondActivityTaskCanceled
readList :: ReadS [RespondActivityTaskCanceled]
$creadList :: ReadS [RespondActivityTaskCanceled]
readsPrec :: Int -> ReadS RespondActivityTaskCanceled
$creadsPrec :: Int -> ReadS RespondActivityTaskCanceled
Prelude.Read, Int -> RespondActivityTaskCanceled -> ShowS
[RespondActivityTaskCanceled] -> ShowS
RespondActivityTaskCanceled -> String
(Int -> RespondActivityTaskCanceled -> ShowS)
-> (RespondActivityTaskCanceled -> String)
-> ([RespondActivityTaskCanceled] -> ShowS)
-> Show RespondActivityTaskCanceled
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RespondActivityTaskCanceled] -> ShowS
$cshowList :: [RespondActivityTaskCanceled] -> ShowS
show :: RespondActivityTaskCanceled -> String
$cshow :: RespondActivityTaskCanceled -> String
showsPrec :: Int -> RespondActivityTaskCanceled -> ShowS
$cshowsPrec :: Int -> RespondActivityTaskCanceled -> ShowS
Prelude.Show, (forall x.
RespondActivityTaskCanceled -> Rep RespondActivityTaskCanceled x)
-> (forall x.
Rep RespondActivityTaskCanceled x -> RespondActivityTaskCanceled)
-> Generic RespondActivityTaskCanceled
forall x.
Rep RespondActivityTaskCanceled x -> RespondActivityTaskCanceled
forall x.
RespondActivityTaskCanceled -> Rep RespondActivityTaskCanceled x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RespondActivityTaskCanceled x -> RespondActivityTaskCanceled
$cfrom :: forall x.
RespondActivityTaskCanceled -> Rep RespondActivityTaskCanceled x
Prelude.Generic)
newRespondActivityTaskCanceled ::
Prelude.Text ->
RespondActivityTaskCanceled
newRespondActivityTaskCanceled :: Text -> RespondActivityTaskCanceled
newRespondActivityTaskCanceled Text
pTaskToken_ =
RespondActivityTaskCanceled' :: Maybe Text -> Text -> RespondActivityTaskCanceled
RespondActivityTaskCanceled'
{ $sel:details:RespondActivityTaskCanceled' :: Maybe Text
details =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taskToken:RespondActivityTaskCanceled' :: Text
taskToken = Text
pTaskToken_
}
respondActivityTaskCanceled_details :: Lens.Lens' RespondActivityTaskCanceled (Prelude.Maybe Prelude.Text)
respondActivityTaskCanceled_details :: (Maybe Text -> f (Maybe Text))
-> RespondActivityTaskCanceled -> f RespondActivityTaskCanceled
respondActivityTaskCanceled_details = (RespondActivityTaskCanceled -> Maybe Text)
-> (RespondActivityTaskCanceled
-> Maybe Text -> RespondActivityTaskCanceled)
-> Lens
RespondActivityTaskCanceled
RespondActivityTaskCanceled
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RespondActivityTaskCanceled' {Maybe Text
details :: Maybe Text
$sel:details:RespondActivityTaskCanceled' :: RespondActivityTaskCanceled -> Maybe Text
details} -> Maybe Text
details) (\s :: RespondActivityTaskCanceled
s@RespondActivityTaskCanceled' {} Maybe Text
a -> RespondActivityTaskCanceled
s {$sel:details:RespondActivityTaskCanceled' :: Maybe Text
details = Maybe Text
a} :: RespondActivityTaskCanceled)
respondActivityTaskCanceled_taskToken :: Lens.Lens' RespondActivityTaskCanceled Prelude.Text
respondActivityTaskCanceled_taskToken :: (Text -> f Text)
-> RespondActivityTaskCanceled -> f RespondActivityTaskCanceled
respondActivityTaskCanceled_taskToken = (RespondActivityTaskCanceled -> Text)
-> (RespondActivityTaskCanceled
-> Text -> RespondActivityTaskCanceled)
-> Lens
RespondActivityTaskCanceled RespondActivityTaskCanceled Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RespondActivityTaskCanceled' {Text
taskToken :: Text
$sel:taskToken:RespondActivityTaskCanceled' :: RespondActivityTaskCanceled -> Text
taskToken} -> Text
taskToken) (\s :: RespondActivityTaskCanceled
s@RespondActivityTaskCanceled' {} Text
a -> RespondActivityTaskCanceled
s {$sel:taskToken:RespondActivityTaskCanceled' :: Text
taskToken = Text
a} :: RespondActivityTaskCanceled)
instance Core.AWSRequest RespondActivityTaskCanceled where
type
AWSResponse RespondActivityTaskCanceled =
RespondActivityTaskCanceledResponse
request :: RespondActivityTaskCanceled -> Request RespondActivityTaskCanceled
request = Service
-> RespondActivityTaskCanceled
-> Request RespondActivityTaskCanceled
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RespondActivityTaskCanceled
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RespondActivityTaskCanceled)))
response =
AWSResponse RespondActivityTaskCanceled
-> Logger
-> Service
-> Proxy RespondActivityTaskCanceled
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RespondActivityTaskCanceled)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse RespondActivityTaskCanceled
RespondActivityTaskCanceledResponse
RespondActivityTaskCanceledResponse'
instance Prelude.Hashable RespondActivityTaskCanceled
instance Prelude.NFData RespondActivityTaskCanceled
instance Core.ToHeaders RespondActivityTaskCanceled where
toHeaders :: RespondActivityTaskCanceled -> [Header]
toHeaders =
[Header] -> RespondActivityTaskCanceled -> [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.RespondActivityTaskCanceled" ::
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 RespondActivityTaskCanceled where
toJSON :: RespondActivityTaskCanceled -> Value
toJSON RespondActivityTaskCanceled' {Maybe Text
Text
taskToken :: Text
details :: Maybe Text
$sel:taskToken:RespondActivityTaskCanceled' :: RespondActivityTaskCanceled -> Text
$sel:details:RespondActivityTaskCanceled' :: RespondActivityTaskCanceled -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"details" 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
details,
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 RespondActivityTaskCanceled where
toPath :: RespondActivityTaskCanceled -> ByteString
toPath = ByteString -> RespondActivityTaskCanceled -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RespondActivityTaskCanceled where
toQuery :: RespondActivityTaskCanceled -> QueryString
toQuery = QueryString -> RespondActivityTaskCanceled -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RespondActivityTaskCanceledResponse = RespondActivityTaskCanceledResponse'
{
}
deriving (RespondActivityTaskCanceledResponse
-> RespondActivityTaskCanceledResponse -> Bool
(RespondActivityTaskCanceledResponse
-> RespondActivityTaskCanceledResponse -> Bool)
-> (RespondActivityTaskCanceledResponse
-> RespondActivityTaskCanceledResponse -> Bool)
-> Eq RespondActivityTaskCanceledResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RespondActivityTaskCanceledResponse
-> RespondActivityTaskCanceledResponse -> Bool
$c/= :: RespondActivityTaskCanceledResponse
-> RespondActivityTaskCanceledResponse -> Bool
== :: RespondActivityTaskCanceledResponse
-> RespondActivityTaskCanceledResponse -> Bool
$c== :: RespondActivityTaskCanceledResponse
-> RespondActivityTaskCanceledResponse -> Bool
Prelude.Eq, ReadPrec [RespondActivityTaskCanceledResponse]
ReadPrec RespondActivityTaskCanceledResponse
Int -> ReadS RespondActivityTaskCanceledResponse
ReadS [RespondActivityTaskCanceledResponse]
(Int -> ReadS RespondActivityTaskCanceledResponse)
-> ReadS [RespondActivityTaskCanceledResponse]
-> ReadPrec RespondActivityTaskCanceledResponse
-> ReadPrec [RespondActivityTaskCanceledResponse]
-> Read RespondActivityTaskCanceledResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RespondActivityTaskCanceledResponse]
$creadListPrec :: ReadPrec [RespondActivityTaskCanceledResponse]
readPrec :: ReadPrec RespondActivityTaskCanceledResponse
$creadPrec :: ReadPrec RespondActivityTaskCanceledResponse
readList :: ReadS [RespondActivityTaskCanceledResponse]
$creadList :: ReadS [RespondActivityTaskCanceledResponse]
readsPrec :: Int -> ReadS RespondActivityTaskCanceledResponse
$creadsPrec :: Int -> ReadS RespondActivityTaskCanceledResponse
Prelude.Read, Int -> RespondActivityTaskCanceledResponse -> ShowS
[RespondActivityTaskCanceledResponse] -> ShowS
RespondActivityTaskCanceledResponse -> String
(Int -> RespondActivityTaskCanceledResponse -> ShowS)
-> (RespondActivityTaskCanceledResponse -> String)
-> ([RespondActivityTaskCanceledResponse] -> ShowS)
-> Show RespondActivityTaskCanceledResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RespondActivityTaskCanceledResponse] -> ShowS
$cshowList :: [RespondActivityTaskCanceledResponse] -> ShowS
show :: RespondActivityTaskCanceledResponse -> String
$cshow :: RespondActivityTaskCanceledResponse -> String
showsPrec :: Int -> RespondActivityTaskCanceledResponse -> ShowS
$cshowsPrec :: Int -> RespondActivityTaskCanceledResponse -> ShowS
Prelude.Show, (forall x.
RespondActivityTaskCanceledResponse
-> Rep RespondActivityTaskCanceledResponse x)
-> (forall x.
Rep RespondActivityTaskCanceledResponse x
-> RespondActivityTaskCanceledResponse)
-> Generic RespondActivityTaskCanceledResponse
forall x.
Rep RespondActivityTaskCanceledResponse x
-> RespondActivityTaskCanceledResponse
forall x.
RespondActivityTaskCanceledResponse
-> Rep RespondActivityTaskCanceledResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RespondActivityTaskCanceledResponse x
-> RespondActivityTaskCanceledResponse
$cfrom :: forall x.
RespondActivityTaskCanceledResponse
-> Rep RespondActivityTaskCanceledResponse x
Prelude.Generic)
newRespondActivityTaskCanceledResponse ::
RespondActivityTaskCanceledResponse
newRespondActivityTaskCanceledResponse :: RespondActivityTaskCanceledResponse
newRespondActivityTaskCanceledResponse =
RespondActivityTaskCanceledResponse
RespondActivityTaskCanceledResponse'
instance
Prelude.NFData
RespondActivityTaskCanceledResponse