{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.StepFunctions.StartSyncExecution
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Starts a Synchronous Express state machine execution.
module Amazonka.StepFunctions.StartSyncExecution
  ( -- * Creating a Request
    StartSyncExecution (..),
    newStartSyncExecution,

    -- * Request Lenses
    startSyncExecution_input,
    startSyncExecution_name,
    startSyncExecution_traceHeader,
    startSyncExecution_stateMachineArn,

    -- * Destructuring the Response
    StartSyncExecutionResponse (..),
    newStartSyncExecutionResponse,

    -- * Response Lenses
    startSyncExecutionResponse_inputDetails,
    startSyncExecutionResponse_error,
    startSyncExecutionResponse_input,
    startSyncExecutionResponse_cause,
    startSyncExecutionResponse_name,
    startSyncExecutionResponse_stateMachineArn,
    startSyncExecutionResponse_output,
    startSyncExecutionResponse_outputDetails,
    startSyncExecutionResponse_traceHeader,
    startSyncExecutionResponse_billingDetails,
    startSyncExecutionResponse_httpStatus,
    startSyncExecutionResponse_executionArn,
    startSyncExecutionResponse_startDate,
    startSyncExecutionResponse_stopDate,
    startSyncExecutionResponse_status,
  )
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.StepFunctions.Types

-- | /See:/ 'newStartSyncExecution' smart constructor.
data StartSyncExecution = StartSyncExecution'
  { -- | The string that contains the JSON input data for the execution, for
    -- example:
    --
    -- @\"input\": \"{\\\"first_name\\\" : \\\"test\\\"}\"@
    --
    -- If you don\'t include any JSON input data, you still must include the
    -- two braces, for example: @\"input\": \"{}\"@
    --
    -- Length constraints apply to the payload size, and are expressed as bytes
    -- in UTF-8 encoding.
    StartSyncExecution -> Maybe (Sensitive Text)
input :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The name of the execution.
    StartSyncExecution -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Passes the AWS X-Ray trace header. The trace header can also be passed
    -- in the request payload.
    StartSyncExecution -> Maybe Text
traceHeader :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the state machine to execute.
    StartSyncExecution -> Text
stateMachineArn :: Prelude.Text
  }
  deriving (StartSyncExecution -> StartSyncExecution -> Bool
(StartSyncExecution -> StartSyncExecution -> Bool)
-> (StartSyncExecution -> StartSyncExecution -> Bool)
-> Eq StartSyncExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSyncExecution -> StartSyncExecution -> Bool
$c/= :: StartSyncExecution -> StartSyncExecution -> Bool
== :: StartSyncExecution -> StartSyncExecution -> Bool
$c== :: StartSyncExecution -> StartSyncExecution -> Bool
Prelude.Eq, Int -> StartSyncExecution -> ShowS
[StartSyncExecution] -> ShowS
StartSyncExecution -> String
(Int -> StartSyncExecution -> ShowS)
-> (StartSyncExecution -> String)
-> ([StartSyncExecution] -> ShowS)
-> Show StartSyncExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSyncExecution] -> ShowS
$cshowList :: [StartSyncExecution] -> ShowS
show :: StartSyncExecution -> String
$cshow :: StartSyncExecution -> String
showsPrec :: Int -> StartSyncExecution -> ShowS
$cshowsPrec :: Int -> StartSyncExecution -> ShowS
Prelude.Show, (forall x. StartSyncExecution -> Rep StartSyncExecution x)
-> (forall x. Rep StartSyncExecution x -> StartSyncExecution)
-> Generic StartSyncExecution
forall x. Rep StartSyncExecution x -> StartSyncExecution
forall x. StartSyncExecution -> Rep StartSyncExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartSyncExecution x -> StartSyncExecution
$cfrom :: forall x. StartSyncExecution -> Rep StartSyncExecution x
Prelude.Generic)

-- |
-- Create a value of 'StartSyncExecution' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'input', 'startSyncExecution_input' - The string that contains the JSON input data for the execution, for
-- example:
--
-- @\"input\": \"{\\\"first_name\\\" : \\\"test\\\"}\"@
--
-- If you don\'t include any JSON input data, you still must include the
-- two braces, for example: @\"input\": \"{}\"@
--
-- Length constraints apply to the payload size, and are expressed as bytes
-- in UTF-8 encoding.
--
-- 'name', 'startSyncExecution_name' - The name of the execution.
--
-- 'traceHeader', 'startSyncExecution_traceHeader' - Passes the AWS X-Ray trace header. The trace header can also be passed
-- in the request payload.
--
-- 'stateMachineArn', 'startSyncExecution_stateMachineArn' - The Amazon Resource Name (ARN) of the state machine to execute.
newStartSyncExecution ::
  -- | 'stateMachineArn'
  Prelude.Text ->
  StartSyncExecution
newStartSyncExecution :: Text -> StartSyncExecution
newStartSyncExecution Text
pStateMachineArn_ =
  StartSyncExecution' :: Maybe (Sensitive Text)
-> Maybe Text -> Maybe Text -> Text -> StartSyncExecution
StartSyncExecution'
    { $sel:input:StartSyncExecution' :: Maybe (Sensitive Text)
input = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:StartSyncExecution' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:traceHeader:StartSyncExecution' :: Maybe Text
traceHeader = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stateMachineArn:StartSyncExecution' :: Text
stateMachineArn = Text
pStateMachineArn_
    }

-- | The string that contains the JSON input data for the execution, for
-- example:
--
-- @\"input\": \"{\\\"first_name\\\" : \\\"test\\\"}\"@
--
-- If you don\'t include any JSON input data, you still must include the
-- two braces, for example: @\"input\": \"{}\"@
--
-- Length constraints apply to the payload size, and are expressed as bytes
-- in UTF-8 encoding.
startSyncExecution_input :: Lens.Lens' StartSyncExecution (Prelude.Maybe Prelude.Text)
startSyncExecution_input :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecution -> f StartSyncExecution
startSyncExecution_input = (StartSyncExecution -> Maybe (Sensitive Text))
-> (StartSyncExecution
    -> Maybe (Sensitive Text) -> StartSyncExecution)
-> Lens
     StartSyncExecution
     StartSyncExecution
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecution' {Maybe (Sensitive Text)
input :: Maybe (Sensitive Text)
$sel:input:StartSyncExecution' :: StartSyncExecution -> Maybe (Sensitive Text)
input} -> Maybe (Sensitive Text)
input) (\s :: StartSyncExecution
s@StartSyncExecution' {} Maybe (Sensitive Text)
a -> StartSyncExecution
s {$sel:input:StartSyncExecution' :: Maybe (Sensitive Text)
input = Maybe (Sensitive Text)
a} :: StartSyncExecution) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> StartSyncExecution -> f StartSyncExecution)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> StartSyncExecution
-> f StartSyncExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The name of the execution.
startSyncExecution_name :: Lens.Lens' StartSyncExecution (Prelude.Maybe Prelude.Text)
startSyncExecution_name :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecution -> f StartSyncExecution
startSyncExecution_name = (StartSyncExecution -> Maybe Text)
-> (StartSyncExecution -> Maybe Text -> StartSyncExecution)
-> Lens
     StartSyncExecution StartSyncExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecution' {Maybe Text
name :: Maybe Text
$sel:name:StartSyncExecution' :: StartSyncExecution -> Maybe Text
name} -> Maybe Text
name) (\s :: StartSyncExecution
s@StartSyncExecution' {} Maybe Text
a -> StartSyncExecution
s {$sel:name:StartSyncExecution' :: Maybe Text
name = Maybe Text
a} :: StartSyncExecution)

-- | Passes the AWS X-Ray trace header. The trace header can also be passed
-- in the request payload.
startSyncExecution_traceHeader :: Lens.Lens' StartSyncExecution (Prelude.Maybe Prelude.Text)
startSyncExecution_traceHeader :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecution -> f StartSyncExecution
startSyncExecution_traceHeader = (StartSyncExecution -> Maybe Text)
-> (StartSyncExecution -> Maybe Text -> StartSyncExecution)
-> Lens
     StartSyncExecution StartSyncExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecution' {Maybe Text
traceHeader :: Maybe Text
$sel:traceHeader:StartSyncExecution' :: StartSyncExecution -> Maybe Text
traceHeader} -> Maybe Text
traceHeader) (\s :: StartSyncExecution
s@StartSyncExecution' {} Maybe Text
a -> StartSyncExecution
s {$sel:traceHeader:StartSyncExecution' :: Maybe Text
traceHeader = Maybe Text
a} :: StartSyncExecution)

-- | The Amazon Resource Name (ARN) of the state machine to execute.
startSyncExecution_stateMachineArn :: Lens.Lens' StartSyncExecution Prelude.Text
startSyncExecution_stateMachineArn :: (Text -> f Text) -> StartSyncExecution -> f StartSyncExecution
startSyncExecution_stateMachineArn = (StartSyncExecution -> Text)
-> (StartSyncExecution -> Text -> StartSyncExecution)
-> Lens StartSyncExecution StartSyncExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecution' {Text
stateMachineArn :: Text
$sel:stateMachineArn:StartSyncExecution' :: StartSyncExecution -> Text
stateMachineArn} -> Text
stateMachineArn) (\s :: StartSyncExecution
s@StartSyncExecution' {} Text
a -> StartSyncExecution
s {$sel:stateMachineArn:StartSyncExecution' :: Text
stateMachineArn = Text
a} :: StartSyncExecution)

instance Core.AWSRequest StartSyncExecution where
  type
    AWSResponse StartSyncExecution =
      StartSyncExecutionResponse
  request :: StartSyncExecution -> Request StartSyncExecution
request = Service -> StartSyncExecution -> Request StartSyncExecution
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartSyncExecution
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartSyncExecution)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartSyncExecution))
-> Logger
-> Service
-> Proxy StartSyncExecution
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartSyncExecution)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe CloudWatchEventsExecutionDataDetails
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe CloudWatchEventsExecutionDataDetails
-> Maybe Text
-> Maybe BillingDetails
-> Int
-> Text
-> POSIX
-> POSIX
-> SyncExecutionStatus
-> StartSyncExecutionResponse
StartSyncExecutionResponse'
            (Maybe CloudWatchEventsExecutionDataDetails
 -> Maybe (Sensitive Text)
 -> Maybe (Sensitive Text)
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe CloudWatchEventsExecutionDataDetails
 -> Maybe Text
 -> Maybe BillingDetails
 -> Int
 -> Text
 -> POSIX
 -> POSIX
 -> SyncExecutionStatus
 -> StartSyncExecutionResponse)
-> Either String (Maybe CloudWatchEventsExecutionDataDetails)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe CloudWatchEventsExecutionDataDetails
      -> Maybe Text
      -> Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either String (Maybe CloudWatchEventsExecutionDataDetails)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"inputDetails")
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe CloudWatchEventsExecutionDataDetails
   -> Maybe Text
   -> Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe CloudWatchEventsExecutionDataDetails
      -> Maybe Text
      -> Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"error")
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe CloudWatchEventsExecutionDataDetails
   -> Maybe Text
   -> Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe CloudWatchEventsExecutionDataDetails
      -> Maybe Text
      -> Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"input")
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe CloudWatchEventsExecutionDataDetails
   -> Maybe Text
   -> Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe CloudWatchEventsExecutionDataDetails
      -> Maybe Text
      -> Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"cause")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe CloudWatchEventsExecutionDataDetails
   -> Maybe Text
   -> Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe CloudWatchEventsExecutionDataDetails
      -> Maybe Text
      -> Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
            Either
  String
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe CloudWatchEventsExecutionDataDetails
   -> Maybe Text
   -> Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe CloudWatchEventsExecutionDataDetails
      -> Maybe Text
      -> Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"stateMachineArn")
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe CloudWatchEventsExecutionDataDetails
   -> Maybe Text
   -> Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe CloudWatchEventsExecutionDataDetails
      -> Maybe Text
      -> Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"output")
            Either
  String
  (Maybe CloudWatchEventsExecutionDataDetails
   -> Maybe Text
   -> Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe CloudWatchEventsExecutionDataDetails)
-> Either
     String
     (Maybe Text
      -> Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe CloudWatchEventsExecutionDataDetails)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"outputDetails")
            Either
  String
  (Maybe Text
   -> Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe BillingDetails
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"traceHeader")
            Either
  String
  (Maybe BillingDetails
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String (Maybe BillingDetails)
-> Either
     String
     (Int
      -> Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe BillingDetails)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"billingDetails")
            Either
  String
  (Int
   -> Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String Int
-> Either
     String
     (Text
      -> POSIX
      -> POSIX
      -> SyncExecutionStatus
      -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  (Text
   -> POSIX
   -> POSIX
   -> SyncExecutionStatus
   -> StartSyncExecutionResponse)
-> Either String Text
-> Either
     String
     (POSIX
      -> POSIX -> SyncExecutionStatus -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"executionArn")
            Either
  String
  (POSIX
   -> POSIX -> SyncExecutionStatus -> StartSyncExecutionResponse)
-> Either String POSIX
-> Either
     String (POSIX -> SyncExecutionStatus -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"startDate")
            Either
  String (POSIX -> SyncExecutionStatus -> StartSyncExecutionResponse)
-> Either String POSIX
-> Either
     String (SyncExecutionStatus -> StartSyncExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"stopDate")
            Either String (SyncExecutionStatus -> StartSyncExecutionResponse)
-> Either String SyncExecutionStatus
-> Either String StartSyncExecutionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String SyncExecutionStatus
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"status")
      )

instance Prelude.Hashable StartSyncExecution

instance Prelude.NFData StartSyncExecution

instance Core.ToHeaders StartSyncExecution where
  toHeaders :: StartSyncExecution -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartSyncExecution -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSStepFunctions.StartSyncExecution" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON StartSyncExecution where
  toJSON :: StartSyncExecution -> Value
toJSON StartSyncExecution' {Maybe Text
Maybe (Sensitive Text)
Text
stateMachineArn :: Text
traceHeader :: Maybe Text
name :: Maybe Text
input :: Maybe (Sensitive Text)
$sel:stateMachineArn:StartSyncExecution' :: StartSyncExecution -> Text
$sel:traceHeader:StartSyncExecution' :: StartSyncExecution -> Maybe Text
$sel:name:StartSyncExecution' :: StartSyncExecution -> Maybe Text
$sel:input:StartSyncExecution' :: StartSyncExecution -> Maybe (Sensitive Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"input" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
input,
            (Text
"name" 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
name,
            (Text
"traceHeader" 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
traceHeader,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"stateMachineArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
stateMachineArn)
          ]
      )

instance Core.ToPath StartSyncExecution where
  toPath :: StartSyncExecution -> ByteString
toPath = ByteString -> StartSyncExecution -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery StartSyncExecution where
  toQuery :: StartSyncExecution -> QueryString
toQuery = QueryString -> StartSyncExecution -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newStartSyncExecutionResponse' smart constructor.
data StartSyncExecutionResponse = StartSyncExecutionResponse'
  { StartSyncExecutionResponse
-> Maybe CloudWatchEventsExecutionDataDetails
inputDetails :: Prelude.Maybe CloudWatchEventsExecutionDataDetails,
    -- | The error code of the failure.
    StartSyncExecutionResponse -> Maybe (Sensitive Text)
error :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The string that contains the JSON input data of the execution. Length
    -- constraints apply to the payload size, and are expressed as bytes in
    -- UTF-8 encoding.
    StartSyncExecutionResponse -> Maybe (Sensitive Text)
input :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | A more detailed explanation of the cause of the failure.
    StartSyncExecutionResponse -> Maybe (Sensitive Text)
cause :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The name of the execution.
    StartSyncExecutionResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) that identifies the state machine.
    StartSyncExecutionResponse -> Maybe Text
stateMachineArn :: Prelude.Maybe Prelude.Text,
    -- | The JSON output data of the execution. Length constraints apply to the
    -- payload size, and are expressed as bytes in UTF-8 encoding.
    --
    -- This field is set only if the execution succeeds. If the execution
    -- fails, this field is null.
    StartSyncExecutionResponse -> Maybe (Sensitive Text)
output :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    StartSyncExecutionResponse
-> Maybe CloudWatchEventsExecutionDataDetails
outputDetails :: Prelude.Maybe CloudWatchEventsExecutionDataDetails,
    -- | The AWS X-Ray trace header that was passed to the execution.
    StartSyncExecutionResponse -> Maybe Text
traceHeader :: Prelude.Maybe Prelude.Text,
    -- | An object that describes workflow billing details, including billed
    -- duration and memory use.
    StartSyncExecutionResponse -> Maybe BillingDetails
billingDetails :: Prelude.Maybe BillingDetails,
    -- | The response's http status code.
    StartSyncExecutionResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) that identifies the execution.
    StartSyncExecutionResponse -> Text
executionArn :: Prelude.Text,
    -- | The date the execution is started.
    StartSyncExecutionResponse -> POSIX
startDate :: Core.POSIX,
    -- | If the execution has already ended, the date the execution stopped.
    StartSyncExecutionResponse -> POSIX
stopDate :: Core.POSIX,
    -- | The current status of the execution.
    StartSyncExecutionResponse -> SyncExecutionStatus
status :: SyncExecutionStatus
  }
  deriving (StartSyncExecutionResponse -> StartSyncExecutionResponse -> Bool
(StartSyncExecutionResponse -> StartSyncExecutionResponse -> Bool)
-> (StartSyncExecutionResponse
    -> StartSyncExecutionResponse -> Bool)
-> Eq StartSyncExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSyncExecutionResponse -> StartSyncExecutionResponse -> Bool
$c/= :: StartSyncExecutionResponse -> StartSyncExecutionResponse -> Bool
== :: StartSyncExecutionResponse -> StartSyncExecutionResponse -> Bool
$c== :: StartSyncExecutionResponse -> StartSyncExecutionResponse -> Bool
Prelude.Eq, Int -> StartSyncExecutionResponse -> ShowS
[StartSyncExecutionResponse] -> ShowS
StartSyncExecutionResponse -> String
(Int -> StartSyncExecutionResponse -> ShowS)
-> (StartSyncExecutionResponse -> String)
-> ([StartSyncExecutionResponse] -> ShowS)
-> Show StartSyncExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSyncExecutionResponse] -> ShowS
$cshowList :: [StartSyncExecutionResponse] -> ShowS
show :: StartSyncExecutionResponse -> String
$cshow :: StartSyncExecutionResponse -> String
showsPrec :: Int -> StartSyncExecutionResponse -> ShowS
$cshowsPrec :: Int -> StartSyncExecutionResponse -> ShowS
Prelude.Show, (forall x.
 StartSyncExecutionResponse -> Rep StartSyncExecutionResponse x)
-> (forall x.
    Rep StartSyncExecutionResponse x -> StartSyncExecutionResponse)
-> Generic StartSyncExecutionResponse
forall x.
Rep StartSyncExecutionResponse x -> StartSyncExecutionResponse
forall x.
StartSyncExecutionResponse -> Rep StartSyncExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartSyncExecutionResponse x -> StartSyncExecutionResponse
$cfrom :: forall x.
StartSyncExecutionResponse -> Rep StartSyncExecutionResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartSyncExecutionResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'inputDetails', 'startSyncExecutionResponse_inputDetails' - Undocumented member.
--
-- 'error', 'startSyncExecutionResponse_error' - The error code of the failure.
--
-- 'input', 'startSyncExecutionResponse_input' - The string that contains the JSON input data of the execution. Length
-- constraints apply to the payload size, and are expressed as bytes in
-- UTF-8 encoding.
--
-- 'cause', 'startSyncExecutionResponse_cause' - A more detailed explanation of the cause of the failure.
--
-- 'name', 'startSyncExecutionResponse_name' - The name of the execution.
--
-- 'stateMachineArn', 'startSyncExecutionResponse_stateMachineArn' - The Amazon Resource Name (ARN) that identifies the state machine.
--
-- 'output', 'startSyncExecutionResponse_output' - The JSON output data of the execution. Length constraints apply to the
-- payload size, and are expressed as bytes in UTF-8 encoding.
--
-- This field is set only if the execution succeeds. If the execution
-- fails, this field is null.
--
-- 'outputDetails', 'startSyncExecutionResponse_outputDetails' - Undocumented member.
--
-- 'traceHeader', 'startSyncExecutionResponse_traceHeader' - The AWS X-Ray trace header that was passed to the execution.
--
-- 'billingDetails', 'startSyncExecutionResponse_billingDetails' - An object that describes workflow billing details, including billed
-- duration and memory use.
--
-- 'httpStatus', 'startSyncExecutionResponse_httpStatus' - The response's http status code.
--
-- 'executionArn', 'startSyncExecutionResponse_executionArn' - The Amazon Resource Name (ARN) that identifies the execution.
--
-- 'startDate', 'startSyncExecutionResponse_startDate' - The date the execution is started.
--
-- 'stopDate', 'startSyncExecutionResponse_stopDate' - If the execution has already ended, the date the execution stopped.
--
-- 'status', 'startSyncExecutionResponse_status' - The current status of the execution.
newStartSyncExecutionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'executionArn'
  Prelude.Text ->
  -- | 'startDate'
  Prelude.UTCTime ->
  -- | 'stopDate'
  Prelude.UTCTime ->
  -- | 'status'
  SyncExecutionStatus ->
  StartSyncExecutionResponse
newStartSyncExecutionResponse :: Int
-> Text
-> UTCTime
-> UTCTime
-> SyncExecutionStatus
-> StartSyncExecutionResponse
newStartSyncExecutionResponse
  Int
pHttpStatus_
  Text
pExecutionArn_
  UTCTime
pStartDate_
  UTCTime
pStopDate_
  SyncExecutionStatus
pStatus_ =
    StartSyncExecutionResponse' :: Maybe CloudWatchEventsExecutionDataDetails
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe CloudWatchEventsExecutionDataDetails
-> Maybe Text
-> Maybe BillingDetails
-> Int
-> Text
-> POSIX
-> POSIX
-> SyncExecutionStatus
-> StartSyncExecutionResponse
StartSyncExecutionResponse'
      { $sel:inputDetails:StartSyncExecutionResponse' :: Maybe CloudWatchEventsExecutionDataDetails
inputDetails =
          Maybe CloudWatchEventsExecutionDataDetails
forall a. Maybe a
Prelude.Nothing,
        $sel:error:StartSyncExecutionResponse' :: Maybe (Sensitive Text)
error = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:input:StartSyncExecutionResponse' :: Maybe (Sensitive Text)
input = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:cause:StartSyncExecutionResponse' :: Maybe (Sensitive Text)
cause = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:name:StartSyncExecutionResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:stateMachineArn:StartSyncExecutionResponse' :: Maybe Text
stateMachineArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:output:StartSyncExecutionResponse' :: Maybe (Sensitive Text)
output = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:outputDetails:StartSyncExecutionResponse' :: Maybe CloudWatchEventsExecutionDataDetails
outputDetails = Maybe CloudWatchEventsExecutionDataDetails
forall a. Maybe a
Prelude.Nothing,
        $sel:traceHeader:StartSyncExecutionResponse' :: Maybe Text
traceHeader = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:billingDetails:StartSyncExecutionResponse' :: Maybe BillingDetails
billingDetails = Maybe BillingDetails
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:StartSyncExecutionResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:executionArn:StartSyncExecutionResponse' :: Text
executionArn = Text
pExecutionArn_,
        $sel:startDate:StartSyncExecutionResponse' :: POSIX
startDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartDate_,
        $sel:stopDate:StartSyncExecutionResponse' :: POSIX
stopDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStopDate_,
        $sel:status:StartSyncExecutionResponse' :: SyncExecutionStatus
status = SyncExecutionStatus
pStatus_
      }

-- | Undocumented member.
startSyncExecutionResponse_inputDetails :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe CloudWatchEventsExecutionDataDetails)
startSyncExecutionResponse_inputDetails :: (Maybe CloudWatchEventsExecutionDataDetails
 -> f (Maybe CloudWatchEventsExecutionDataDetails))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_inputDetails = (StartSyncExecutionResponse
 -> Maybe CloudWatchEventsExecutionDataDetails)
-> (StartSyncExecutionResponse
    -> Maybe CloudWatchEventsExecutionDataDetails
    -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe CloudWatchEventsExecutionDataDetails)
     (Maybe CloudWatchEventsExecutionDataDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe CloudWatchEventsExecutionDataDetails
inputDetails :: Maybe CloudWatchEventsExecutionDataDetails
$sel:inputDetails:StartSyncExecutionResponse' :: StartSyncExecutionResponse
-> Maybe CloudWatchEventsExecutionDataDetails
inputDetails} -> Maybe CloudWatchEventsExecutionDataDetails
inputDetails) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe CloudWatchEventsExecutionDataDetails
a -> StartSyncExecutionResponse
s {$sel:inputDetails:StartSyncExecutionResponse' :: Maybe CloudWatchEventsExecutionDataDetails
inputDetails = Maybe CloudWatchEventsExecutionDataDetails
a} :: StartSyncExecutionResponse)

-- | The error code of the failure.
startSyncExecutionResponse_error :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe Prelude.Text)
startSyncExecutionResponse_error :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_error = (StartSyncExecutionResponse -> Maybe (Sensitive Text))
-> (StartSyncExecutionResponse
    -> Maybe (Sensitive Text) -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe (Sensitive Text)
error :: Maybe (Sensitive Text)
$sel:error:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Maybe (Sensitive Text)
error} -> Maybe (Sensitive Text)
error) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe (Sensitive Text)
a -> StartSyncExecutionResponse
s {$sel:error:StartSyncExecutionResponse' :: Maybe (Sensitive Text)
error = Maybe (Sensitive Text)
a} :: StartSyncExecutionResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> StartSyncExecutionResponse -> f StartSyncExecutionResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse
-> f StartSyncExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The string that contains the JSON input data of the execution. Length
-- constraints apply to the payload size, and are expressed as bytes in
-- UTF-8 encoding.
startSyncExecutionResponse_input :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe Prelude.Text)
startSyncExecutionResponse_input :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_input = (StartSyncExecutionResponse -> Maybe (Sensitive Text))
-> (StartSyncExecutionResponse
    -> Maybe (Sensitive Text) -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe (Sensitive Text)
input :: Maybe (Sensitive Text)
$sel:input:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Maybe (Sensitive Text)
input} -> Maybe (Sensitive Text)
input) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe (Sensitive Text)
a -> StartSyncExecutionResponse
s {$sel:input:StartSyncExecutionResponse' :: Maybe (Sensitive Text)
input = Maybe (Sensitive Text)
a} :: StartSyncExecutionResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> StartSyncExecutionResponse -> f StartSyncExecutionResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse
-> f StartSyncExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | A more detailed explanation of the cause of the failure.
startSyncExecutionResponse_cause :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe Prelude.Text)
startSyncExecutionResponse_cause :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_cause = (StartSyncExecutionResponse -> Maybe (Sensitive Text))
-> (StartSyncExecutionResponse
    -> Maybe (Sensitive Text) -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe (Sensitive Text)
cause :: Maybe (Sensitive Text)
$sel:cause:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Maybe (Sensitive Text)
cause} -> Maybe (Sensitive Text)
cause) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe (Sensitive Text)
a -> StartSyncExecutionResponse
s {$sel:cause:StartSyncExecutionResponse' :: Maybe (Sensitive Text)
cause = Maybe (Sensitive Text)
a} :: StartSyncExecutionResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> StartSyncExecutionResponse -> f StartSyncExecutionResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse
-> f StartSyncExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The name of the execution.
startSyncExecutionResponse_name :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe Prelude.Text)
startSyncExecutionResponse_name :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_name = (StartSyncExecutionResponse -> Maybe Text)
-> (StartSyncExecutionResponse
    -> Maybe Text -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe Text
name :: Maybe Text
$sel:name:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe Text
a -> StartSyncExecutionResponse
s {$sel:name:StartSyncExecutionResponse' :: Maybe Text
name = Maybe Text
a} :: StartSyncExecutionResponse)

-- | The Amazon Resource Name (ARN) that identifies the state machine.
startSyncExecutionResponse_stateMachineArn :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe Prelude.Text)
startSyncExecutionResponse_stateMachineArn :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_stateMachineArn = (StartSyncExecutionResponse -> Maybe Text)
-> (StartSyncExecutionResponse
    -> Maybe Text -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe Text
stateMachineArn :: Maybe Text
$sel:stateMachineArn:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Maybe Text
stateMachineArn} -> Maybe Text
stateMachineArn) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe Text
a -> StartSyncExecutionResponse
s {$sel:stateMachineArn:StartSyncExecutionResponse' :: Maybe Text
stateMachineArn = Maybe Text
a} :: StartSyncExecutionResponse)

-- | The JSON output data of the execution. Length constraints apply to the
-- payload size, and are expressed as bytes in UTF-8 encoding.
--
-- This field is set only if the execution succeeds. If the execution
-- fails, this field is null.
startSyncExecutionResponse_output :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe Prelude.Text)
startSyncExecutionResponse_output :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_output = (StartSyncExecutionResponse -> Maybe (Sensitive Text))
-> (StartSyncExecutionResponse
    -> Maybe (Sensitive Text) -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe (Sensitive Text)
output :: Maybe (Sensitive Text)
$sel:output:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Maybe (Sensitive Text)
output} -> Maybe (Sensitive Text)
output) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe (Sensitive Text)
a -> StartSyncExecutionResponse
s {$sel:output:StartSyncExecutionResponse' :: Maybe (Sensitive Text)
output = Maybe (Sensitive Text)
a} :: StartSyncExecutionResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> StartSyncExecutionResponse -> f StartSyncExecutionResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse
-> f StartSyncExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Undocumented member.
startSyncExecutionResponse_outputDetails :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe CloudWatchEventsExecutionDataDetails)
startSyncExecutionResponse_outputDetails :: (Maybe CloudWatchEventsExecutionDataDetails
 -> f (Maybe CloudWatchEventsExecutionDataDetails))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_outputDetails = (StartSyncExecutionResponse
 -> Maybe CloudWatchEventsExecutionDataDetails)
-> (StartSyncExecutionResponse
    -> Maybe CloudWatchEventsExecutionDataDetails
    -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe CloudWatchEventsExecutionDataDetails)
     (Maybe CloudWatchEventsExecutionDataDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe CloudWatchEventsExecutionDataDetails
outputDetails :: Maybe CloudWatchEventsExecutionDataDetails
$sel:outputDetails:StartSyncExecutionResponse' :: StartSyncExecutionResponse
-> Maybe CloudWatchEventsExecutionDataDetails
outputDetails} -> Maybe CloudWatchEventsExecutionDataDetails
outputDetails) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe CloudWatchEventsExecutionDataDetails
a -> StartSyncExecutionResponse
s {$sel:outputDetails:StartSyncExecutionResponse' :: Maybe CloudWatchEventsExecutionDataDetails
outputDetails = Maybe CloudWatchEventsExecutionDataDetails
a} :: StartSyncExecutionResponse)

-- | The AWS X-Ray trace header that was passed to the execution.
startSyncExecutionResponse_traceHeader :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe Prelude.Text)
startSyncExecutionResponse_traceHeader :: (Maybe Text -> f (Maybe Text))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_traceHeader = (StartSyncExecutionResponse -> Maybe Text)
-> (StartSyncExecutionResponse
    -> Maybe Text -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe Text
traceHeader :: Maybe Text
$sel:traceHeader:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Maybe Text
traceHeader} -> Maybe Text
traceHeader) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe Text
a -> StartSyncExecutionResponse
s {$sel:traceHeader:StartSyncExecutionResponse' :: Maybe Text
traceHeader = Maybe Text
a} :: StartSyncExecutionResponse)

-- | An object that describes workflow billing details, including billed
-- duration and memory use.
startSyncExecutionResponse_billingDetails :: Lens.Lens' StartSyncExecutionResponse (Prelude.Maybe BillingDetails)
startSyncExecutionResponse_billingDetails :: (Maybe BillingDetails -> f (Maybe BillingDetails))
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_billingDetails = (StartSyncExecutionResponse -> Maybe BillingDetails)
-> (StartSyncExecutionResponse
    -> Maybe BillingDetails -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     (Maybe BillingDetails)
     (Maybe BillingDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Maybe BillingDetails
billingDetails :: Maybe BillingDetails
$sel:billingDetails:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Maybe BillingDetails
billingDetails} -> Maybe BillingDetails
billingDetails) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Maybe BillingDetails
a -> StartSyncExecutionResponse
s {$sel:billingDetails:StartSyncExecutionResponse' :: Maybe BillingDetails
billingDetails = Maybe BillingDetails
a} :: StartSyncExecutionResponse)

-- | The response's http status code.
startSyncExecutionResponse_httpStatus :: Lens.Lens' StartSyncExecutionResponse Prelude.Int
startSyncExecutionResponse_httpStatus :: (Int -> f Int)
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_httpStatus = (StartSyncExecutionResponse -> Int)
-> (StartSyncExecutionResponse
    -> Int -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse StartSyncExecutionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Int
a -> StartSyncExecutionResponse
s {$sel:httpStatus:StartSyncExecutionResponse' :: Int
httpStatus = Int
a} :: StartSyncExecutionResponse)

-- | The Amazon Resource Name (ARN) that identifies the execution.
startSyncExecutionResponse_executionArn :: Lens.Lens' StartSyncExecutionResponse Prelude.Text
startSyncExecutionResponse_executionArn :: (Text -> f Text)
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_executionArn = (StartSyncExecutionResponse -> Text)
-> (StartSyncExecutionResponse
    -> Text -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse StartSyncExecutionResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {Text
executionArn :: Text
$sel:executionArn:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> Text
executionArn} -> Text
executionArn) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} Text
a -> StartSyncExecutionResponse
s {$sel:executionArn:StartSyncExecutionResponse' :: Text
executionArn = Text
a} :: StartSyncExecutionResponse)

-- | The date the execution is started.
startSyncExecutionResponse_startDate :: Lens.Lens' StartSyncExecutionResponse Prelude.UTCTime
startSyncExecutionResponse_startDate :: (UTCTime -> f UTCTime)
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_startDate = (StartSyncExecutionResponse -> POSIX)
-> (StartSyncExecutionResponse
    -> POSIX -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse StartSyncExecutionResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {POSIX
startDate :: POSIX
$sel:startDate:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> POSIX
startDate} -> POSIX
startDate) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} POSIX
a -> StartSyncExecutionResponse
s {$sel:startDate:StartSyncExecutionResponse' :: POSIX
startDate = POSIX
a} :: StartSyncExecutionResponse) ((POSIX -> f POSIX)
 -> StartSyncExecutionResponse -> f StartSyncExecutionResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> StartSyncExecutionResponse
-> f StartSyncExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | If the execution has already ended, the date the execution stopped.
startSyncExecutionResponse_stopDate :: Lens.Lens' StartSyncExecutionResponse Prelude.UTCTime
startSyncExecutionResponse_stopDate :: (UTCTime -> f UTCTime)
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_stopDate = (StartSyncExecutionResponse -> POSIX)
-> (StartSyncExecutionResponse
    -> POSIX -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse StartSyncExecutionResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {POSIX
stopDate :: POSIX
$sel:stopDate:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> POSIX
stopDate} -> POSIX
stopDate) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} POSIX
a -> StartSyncExecutionResponse
s {$sel:stopDate:StartSyncExecutionResponse' :: POSIX
stopDate = POSIX
a} :: StartSyncExecutionResponse) ((POSIX -> f POSIX)
 -> StartSyncExecutionResponse -> f StartSyncExecutionResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> StartSyncExecutionResponse
-> f StartSyncExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The current status of the execution.
startSyncExecutionResponse_status :: Lens.Lens' StartSyncExecutionResponse SyncExecutionStatus
startSyncExecutionResponse_status :: (SyncExecutionStatus -> f SyncExecutionStatus)
-> StartSyncExecutionResponse -> f StartSyncExecutionResponse
startSyncExecutionResponse_status = (StartSyncExecutionResponse -> SyncExecutionStatus)
-> (StartSyncExecutionResponse
    -> SyncExecutionStatus -> StartSyncExecutionResponse)
-> Lens
     StartSyncExecutionResponse
     StartSyncExecutionResponse
     SyncExecutionStatus
     SyncExecutionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSyncExecutionResponse' {SyncExecutionStatus
status :: SyncExecutionStatus
$sel:status:StartSyncExecutionResponse' :: StartSyncExecutionResponse -> SyncExecutionStatus
status} -> SyncExecutionStatus
status) (\s :: StartSyncExecutionResponse
s@StartSyncExecutionResponse' {} SyncExecutionStatus
a -> StartSyncExecutionResponse
s {$sel:status:StartSyncExecutionResponse' :: SyncExecutionStatus
status = SyncExecutionStatus
a} :: StartSyncExecutionResponse)

instance Prelude.NFData StartSyncExecutionResponse