{-# 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.SignalWorkflowExecution
(
SignalWorkflowExecution (..),
newSignalWorkflowExecution,
signalWorkflowExecution_input,
signalWorkflowExecution_runId,
signalWorkflowExecution_domain,
signalWorkflowExecution_workflowId,
signalWorkflowExecution_signalName,
SignalWorkflowExecutionResponse (..),
newSignalWorkflowExecutionResponse,
)
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 SignalWorkflowExecution = SignalWorkflowExecution'
{
SignalWorkflowExecution -> Maybe Text
input :: Prelude.Maybe Prelude.Text,
SignalWorkflowExecution -> Maybe Text
runId :: Prelude.Maybe Prelude.Text,
SignalWorkflowExecution -> Text
domain :: Prelude.Text,
SignalWorkflowExecution -> Text
workflowId :: Prelude.Text,
SignalWorkflowExecution -> Text
signalName :: Prelude.Text
}
deriving (SignalWorkflowExecution -> SignalWorkflowExecution -> Bool
(SignalWorkflowExecution -> SignalWorkflowExecution -> Bool)
-> (SignalWorkflowExecution -> SignalWorkflowExecution -> Bool)
-> Eq SignalWorkflowExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignalWorkflowExecution -> SignalWorkflowExecution -> Bool
$c/= :: SignalWorkflowExecution -> SignalWorkflowExecution -> Bool
== :: SignalWorkflowExecution -> SignalWorkflowExecution -> Bool
$c== :: SignalWorkflowExecution -> SignalWorkflowExecution -> Bool
Prelude.Eq, ReadPrec [SignalWorkflowExecution]
ReadPrec SignalWorkflowExecution
Int -> ReadS SignalWorkflowExecution
ReadS [SignalWorkflowExecution]
(Int -> ReadS SignalWorkflowExecution)
-> ReadS [SignalWorkflowExecution]
-> ReadPrec SignalWorkflowExecution
-> ReadPrec [SignalWorkflowExecution]
-> Read SignalWorkflowExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignalWorkflowExecution]
$creadListPrec :: ReadPrec [SignalWorkflowExecution]
readPrec :: ReadPrec SignalWorkflowExecution
$creadPrec :: ReadPrec SignalWorkflowExecution
readList :: ReadS [SignalWorkflowExecution]
$creadList :: ReadS [SignalWorkflowExecution]
readsPrec :: Int -> ReadS SignalWorkflowExecution
$creadsPrec :: Int -> ReadS SignalWorkflowExecution
Prelude.Read, Int -> SignalWorkflowExecution -> ShowS
[SignalWorkflowExecution] -> ShowS
SignalWorkflowExecution -> String
(Int -> SignalWorkflowExecution -> ShowS)
-> (SignalWorkflowExecution -> String)
-> ([SignalWorkflowExecution] -> ShowS)
-> Show SignalWorkflowExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignalWorkflowExecution] -> ShowS
$cshowList :: [SignalWorkflowExecution] -> ShowS
show :: SignalWorkflowExecution -> String
$cshow :: SignalWorkflowExecution -> String
showsPrec :: Int -> SignalWorkflowExecution -> ShowS
$cshowsPrec :: Int -> SignalWorkflowExecution -> ShowS
Prelude.Show, (forall x.
SignalWorkflowExecution -> Rep SignalWorkflowExecution x)
-> (forall x.
Rep SignalWorkflowExecution x -> SignalWorkflowExecution)
-> Generic SignalWorkflowExecution
forall x. Rep SignalWorkflowExecution x -> SignalWorkflowExecution
forall x. SignalWorkflowExecution -> Rep SignalWorkflowExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SignalWorkflowExecution x -> SignalWorkflowExecution
$cfrom :: forall x. SignalWorkflowExecution -> Rep SignalWorkflowExecution x
Prelude.Generic)
newSignalWorkflowExecution ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
SignalWorkflowExecution
newSignalWorkflowExecution :: Text -> Text -> Text -> SignalWorkflowExecution
newSignalWorkflowExecution
Text
pDomain_
Text
pWorkflowId_
Text
pSignalName_ =
SignalWorkflowExecution' :: Maybe Text
-> Maybe Text -> Text -> Text -> Text -> SignalWorkflowExecution
SignalWorkflowExecution'
{ $sel:input:SignalWorkflowExecution' :: Maybe Text
input = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:runId:SignalWorkflowExecution' :: Maybe Text
runId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domain:SignalWorkflowExecution' :: Text
domain = Text
pDomain_,
$sel:workflowId:SignalWorkflowExecution' :: Text
workflowId = Text
pWorkflowId_,
$sel:signalName:SignalWorkflowExecution' :: Text
signalName = Text
pSignalName_
}
signalWorkflowExecution_input :: Lens.Lens' SignalWorkflowExecution (Prelude.Maybe Prelude.Text)
signalWorkflowExecution_input :: (Maybe Text -> f (Maybe Text))
-> SignalWorkflowExecution -> f SignalWorkflowExecution
signalWorkflowExecution_input = (SignalWorkflowExecution -> Maybe Text)
-> (SignalWorkflowExecution
-> Maybe Text -> SignalWorkflowExecution)
-> Lens
SignalWorkflowExecution
SignalWorkflowExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalWorkflowExecution' {Maybe Text
input :: Maybe Text
$sel:input:SignalWorkflowExecution' :: SignalWorkflowExecution -> Maybe Text
input} -> Maybe Text
input) (\s :: SignalWorkflowExecution
s@SignalWorkflowExecution' {} Maybe Text
a -> SignalWorkflowExecution
s {$sel:input:SignalWorkflowExecution' :: Maybe Text
input = Maybe Text
a} :: SignalWorkflowExecution)
signalWorkflowExecution_runId :: Lens.Lens' SignalWorkflowExecution (Prelude.Maybe Prelude.Text)
signalWorkflowExecution_runId :: (Maybe Text -> f (Maybe Text))
-> SignalWorkflowExecution -> f SignalWorkflowExecution
signalWorkflowExecution_runId = (SignalWorkflowExecution -> Maybe Text)
-> (SignalWorkflowExecution
-> Maybe Text -> SignalWorkflowExecution)
-> Lens
SignalWorkflowExecution
SignalWorkflowExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalWorkflowExecution' {Maybe Text
runId :: Maybe Text
$sel:runId:SignalWorkflowExecution' :: SignalWorkflowExecution -> Maybe Text
runId} -> Maybe Text
runId) (\s :: SignalWorkflowExecution
s@SignalWorkflowExecution' {} Maybe Text
a -> SignalWorkflowExecution
s {$sel:runId:SignalWorkflowExecution' :: Maybe Text
runId = Maybe Text
a} :: SignalWorkflowExecution)
signalWorkflowExecution_domain :: Lens.Lens' SignalWorkflowExecution Prelude.Text
signalWorkflowExecution_domain :: (Text -> f Text)
-> SignalWorkflowExecution -> f SignalWorkflowExecution
signalWorkflowExecution_domain = (SignalWorkflowExecution -> Text)
-> (SignalWorkflowExecution -> Text -> SignalWorkflowExecution)
-> Lens SignalWorkflowExecution SignalWorkflowExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalWorkflowExecution' {Text
domain :: Text
$sel:domain:SignalWorkflowExecution' :: SignalWorkflowExecution -> Text
domain} -> Text
domain) (\s :: SignalWorkflowExecution
s@SignalWorkflowExecution' {} Text
a -> SignalWorkflowExecution
s {$sel:domain:SignalWorkflowExecution' :: Text
domain = Text
a} :: SignalWorkflowExecution)
signalWorkflowExecution_workflowId :: Lens.Lens' SignalWorkflowExecution Prelude.Text
signalWorkflowExecution_workflowId :: (Text -> f Text)
-> SignalWorkflowExecution -> f SignalWorkflowExecution
signalWorkflowExecution_workflowId = (SignalWorkflowExecution -> Text)
-> (SignalWorkflowExecution -> Text -> SignalWorkflowExecution)
-> Lens SignalWorkflowExecution SignalWorkflowExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalWorkflowExecution' {Text
workflowId :: Text
$sel:workflowId:SignalWorkflowExecution' :: SignalWorkflowExecution -> Text
workflowId} -> Text
workflowId) (\s :: SignalWorkflowExecution
s@SignalWorkflowExecution' {} Text
a -> SignalWorkflowExecution
s {$sel:workflowId:SignalWorkflowExecution' :: Text
workflowId = Text
a} :: SignalWorkflowExecution)
signalWorkflowExecution_signalName :: Lens.Lens' SignalWorkflowExecution Prelude.Text
signalWorkflowExecution_signalName :: (Text -> f Text)
-> SignalWorkflowExecution -> f SignalWorkflowExecution
signalWorkflowExecution_signalName = (SignalWorkflowExecution -> Text)
-> (SignalWorkflowExecution -> Text -> SignalWorkflowExecution)
-> Lens SignalWorkflowExecution SignalWorkflowExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalWorkflowExecution' {Text
signalName :: Text
$sel:signalName:SignalWorkflowExecution' :: SignalWorkflowExecution -> Text
signalName} -> Text
signalName) (\s :: SignalWorkflowExecution
s@SignalWorkflowExecution' {} Text
a -> SignalWorkflowExecution
s {$sel:signalName:SignalWorkflowExecution' :: Text
signalName = Text
a} :: SignalWorkflowExecution)
instance Core.AWSRequest SignalWorkflowExecution where
type
AWSResponse SignalWorkflowExecution =
SignalWorkflowExecutionResponse
request :: SignalWorkflowExecution -> Request SignalWorkflowExecution
request = Service
-> SignalWorkflowExecution -> Request SignalWorkflowExecution
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SignalWorkflowExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SignalWorkflowExecution)))
response =
AWSResponse SignalWorkflowExecution
-> Logger
-> Service
-> Proxy SignalWorkflowExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SignalWorkflowExecution)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse SignalWorkflowExecution
SignalWorkflowExecutionResponse
SignalWorkflowExecutionResponse'
instance Prelude.Hashable SignalWorkflowExecution
instance Prelude.NFData SignalWorkflowExecution
instance Core.ToHeaders SignalWorkflowExecution where
toHeaders :: SignalWorkflowExecution -> [Header]
toHeaders =
[Header] -> SignalWorkflowExecution -> [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.SignalWorkflowExecution" ::
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 SignalWorkflowExecution where
toJSON :: SignalWorkflowExecution -> Value
toJSON SignalWorkflowExecution' {Maybe Text
Text
signalName :: Text
workflowId :: Text
domain :: Text
runId :: Maybe Text
input :: Maybe Text
$sel:signalName:SignalWorkflowExecution' :: SignalWorkflowExecution -> Text
$sel:workflowId:SignalWorkflowExecution' :: SignalWorkflowExecution -> Text
$sel:domain:SignalWorkflowExecution' :: SignalWorkflowExecution -> Text
$sel:runId:SignalWorkflowExecution' :: SignalWorkflowExecution -> Maybe Text
$sel:input:SignalWorkflowExecution' :: SignalWorkflowExecution -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"input" 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
input,
(Text
"runId" 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
runId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"domain" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domain),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"workflowId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workflowId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"signalName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
signalName)
]
)
instance Core.ToPath SignalWorkflowExecution where
toPath :: SignalWorkflowExecution -> ByteString
toPath = ByteString -> SignalWorkflowExecution -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SignalWorkflowExecution where
toQuery :: SignalWorkflowExecution -> QueryString
toQuery = QueryString -> SignalWorkflowExecution -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SignalWorkflowExecutionResponse = SignalWorkflowExecutionResponse'
{
}
deriving (SignalWorkflowExecutionResponse
-> SignalWorkflowExecutionResponse -> Bool
(SignalWorkflowExecutionResponse
-> SignalWorkflowExecutionResponse -> Bool)
-> (SignalWorkflowExecutionResponse
-> SignalWorkflowExecutionResponse -> Bool)
-> Eq SignalWorkflowExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignalWorkflowExecutionResponse
-> SignalWorkflowExecutionResponse -> Bool
$c/= :: SignalWorkflowExecutionResponse
-> SignalWorkflowExecutionResponse -> Bool
== :: SignalWorkflowExecutionResponse
-> SignalWorkflowExecutionResponse -> Bool
$c== :: SignalWorkflowExecutionResponse
-> SignalWorkflowExecutionResponse -> Bool
Prelude.Eq, ReadPrec [SignalWorkflowExecutionResponse]
ReadPrec SignalWorkflowExecutionResponse
Int -> ReadS SignalWorkflowExecutionResponse
ReadS [SignalWorkflowExecutionResponse]
(Int -> ReadS SignalWorkflowExecutionResponse)
-> ReadS [SignalWorkflowExecutionResponse]
-> ReadPrec SignalWorkflowExecutionResponse
-> ReadPrec [SignalWorkflowExecutionResponse]
-> Read SignalWorkflowExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignalWorkflowExecutionResponse]
$creadListPrec :: ReadPrec [SignalWorkflowExecutionResponse]
readPrec :: ReadPrec SignalWorkflowExecutionResponse
$creadPrec :: ReadPrec SignalWorkflowExecutionResponse
readList :: ReadS [SignalWorkflowExecutionResponse]
$creadList :: ReadS [SignalWorkflowExecutionResponse]
readsPrec :: Int -> ReadS SignalWorkflowExecutionResponse
$creadsPrec :: Int -> ReadS SignalWorkflowExecutionResponse
Prelude.Read, Int -> SignalWorkflowExecutionResponse -> ShowS
[SignalWorkflowExecutionResponse] -> ShowS
SignalWorkflowExecutionResponse -> String
(Int -> SignalWorkflowExecutionResponse -> ShowS)
-> (SignalWorkflowExecutionResponse -> String)
-> ([SignalWorkflowExecutionResponse] -> ShowS)
-> Show SignalWorkflowExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignalWorkflowExecutionResponse] -> ShowS
$cshowList :: [SignalWorkflowExecutionResponse] -> ShowS
show :: SignalWorkflowExecutionResponse -> String
$cshow :: SignalWorkflowExecutionResponse -> String
showsPrec :: Int -> SignalWorkflowExecutionResponse -> ShowS
$cshowsPrec :: Int -> SignalWorkflowExecutionResponse -> ShowS
Prelude.Show, (forall x.
SignalWorkflowExecutionResponse
-> Rep SignalWorkflowExecutionResponse x)
-> (forall x.
Rep SignalWorkflowExecutionResponse x
-> SignalWorkflowExecutionResponse)
-> Generic SignalWorkflowExecutionResponse
forall x.
Rep SignalWorkflowExecutionResponse x
-> SignalWorkflowExecutionResponse
forall x.
SignalWorkflowExecutionResponse
-> Rep SignalWorkflowExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SignalWorkflowExecutionResponse x
-> SignalWorkflowExecutionResponse
$cfrom :: forall x.
SignalWorkflowExecutionResponse
-> Rep SignalWorkflowExecutionResponse x
Prelude.Generic)
newSignalWorkflowExecutionResponse ::
SignalWorkflowExecutionResponse
newSignalWorkflowExecutionResponse :: SignalWorkflowExecutionResponse
newSignalWorkflowExecutionResponse =
SignalWorkflowExecutionResponse
SignalWorkflowExecutionResponse'
instance
Prelude.NFData
SignalWorkflowExecutionResponse