{-# 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.DescribeStateMachineForExecution
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Provides information about a state machine\'s definition, its execution
-- role ARN, and configuration. If an execution was dispatched by a Map
-- Run, the Map Run is returned in the response. Additionally, the state
-- machine returned will be the state machine associated with the Map Run.
--
-- This operation is eventually consistent. The results are best effort and
-- may not reflect very recent updates and changes.
--
-- This API action is not supported by @EXPRESS@ state machines.
module Amazonka.StepFunctions.DescribeStateMachineForExecution
  ( -- * Creating a Request
    DescribeStateMachineForExecution (..),
    newDescribeStateMachineForExecution,

    -- * Request Lenses
    describeStateMachineForExecution_executionArn,

    -- * Destructuring the Response
    DescribeStateMachineForExecutionResponse (..),
    newDescribeStateMachineForExecutionResponse,

    -- * Response Lenses
    describeStateMachineForExecutionResponse_label,
    describeStateMachineForExecutionResponse_loggingConfiguration,
    describeStateMachineForExecutionResponse_mapRunArn,
    describeStateMachineForExecutionResponse_tracingConfiguration,
    describeStateMachineForExecutionResponse_httpStatus,
    describeStateMachineForExecutionResponse_stateMachineArn,
    describeStateMachineForExecutionResponse_name,
    describeStateMachineForExecutionResponse_definition,
    describeStateMachineForExecutionResponse_roleArn,
    describeStateMachineForExecutionResponse_updateDate,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.StepFunctions.Types

-- | /See:/ 'newDescribeStateMachineForExecution' smart constructor.
data DescribeStateMachineForExecution = DescribeStateMachineForExecution'
  { -- | The Amazon Resource Name (ARN) of the execution you want state machine
    -- information for.
    DescribeStateMachineForExecution -> Text
executionArn :: Prelude.Text
  }
  deriving (DescribeStateMachineForExecution
-> DescribeStateMachineForExecution -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStateMachineForExecution
-> DescribeStateMachineForExecution -> Bool
$c/= :: DescribeStateMachineForExecution
-> DescribeStateMachineForExecution -> Bool
== :: DescribeStateMachineForExecution
-> DescribeStateMachineForExecution -> Bool
$c== :: DescribeStateMachineForExecution
-> DescribeStateMachineForExecution -> Bool
Prelude.Eq, ReadPrec [DescribeStateMachineForExecution]
ReadPrec DescribeStateMachineForExecution
Int -> ReadS DescribeStateMachineForExecution
ReadS [DescribeStateMachineForExecution]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStateMachineForExecution]
$creadListPrec :: ReadPrec [DescribeStateMachineForExecution]
readPrec :: ReadPrec DescribeStateMachineForExecution
$creadPrec :: ReadPrec DescribeStateMachineForExecution
readList :: ReadS [DescribeStateMachineForExecution]
$creadList :: ReadS [DescribeStateMachineForExecution]
readsPrec :: Int -> ReadS DescribeStateMachineForExecution
$creadsPrec :: Int -> ReadS DescribeStateMachineForExecution
Prelude.Read, Int -> DescribeStateMachineForExecution -> ShowS
[DescribeStateMachineForExecution] -> ShowS
DescribeStateMachineForExecution -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStateMachineForExecution] -> ShowS
$cshowList :: [DescribeStateMachineForExecution] -> ShowS
show :: DescribeStateMachineForExecution -> String
$cshow :: DescribeStateMachineForExecution -> String
showsPrec :: Int -> DescribeStateMachineForExecution -> ShowS
$cshowsPrec :: Int -> DescribeStateMachineForExecution -> ShowS
Prelude.Show, forall x.
Rep DescribeStateMachineForExecution x
-> DescribeStateMachineForExecution
forall x.
DescribeStateMachineForExecution
-> Rep DescribeStateMachineForExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeStateMachineForExecution x
-> DescribeStateMachineForExecution
$cfrom :: forall x.
DescribeStateMachineForExecution
-> Rep DescribeStateMachineForExecution x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStateMachineForExecution' 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:
--
-- 'executionArn', 'describeStateMachineForExecution_executionArn' - The Amazon Resource Name (ARN) of the execution you want state machine
-- information for.
newDescribeStateMachineForExecution ::
  -- | 'executionArn'
  Prelude.Text ->
  DescribeStateMachineForExecution
newDescribeStateMachineForExecution :: Text -> DescribeStateMachineForExecution
newDescribeStateMachineForExecution Text
pExecutionArn_ =
  DescribeStateMachineForExecution'
    { $sel:executionArn:DescribeStateMachineForExecution' :: Text
executionArn =
        Text
pExecutionArn_
    }

-- | The Amazon Resource Name (ARN) of the execution you want state machine
-- information for.
describeStateMachineForExecution_executionArn :: Lens.Lens' DescribeStateMachineForExecution Prelude.Text
describeStateMachineForExecution_executionArn :: Lens' DescribeStateMachineForExecution Text
describeStateMachineForExecution_executionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecution' {Text
executionArn :: Text
$sel:executionArn:DescribeStateMachineForExecution' :: DescribeStateMachineForExecution -> Text
executionArn} -> Text
executionArn) (\s :: DescribeStateMachineForExecution
s@DescribeStateMachineForExecution' {} Text
a -> DescribeStateMachineForExecution
s {$sel:executionArn:DescribeStateMachineForExecution' :: Text
executionArn = Text
a} :: DescribeStateMachineForExecution)

instance
  Core.AWSRequest
    DescribeStateMachineForExecution
  where
  type
    AWSResponse DescribeStateMachineForExecution =
      DescribeStateMachineForExecutionResponse
  request :: (Service -> Service)
-> DescribeStateMachineForExecution
-> Request DescribeStateMachineForExecution
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeStateMachineForExecution
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeStateMachineForExecution)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe LoggingConfiguration
-> Maybe Text
-> Maybe TracingConfiguration
-> Int
-> Text
-> Text
-> Sensitive Text
-> Text
-> POSIX
-> DescribeStateMachineForExecutionResponse
DescribeStateMachineForExecutionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"label")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"loggingConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"mapRunArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tracingConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"stateMachineArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"definition")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"roleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"updateDate")
      )

instance
  Prelude.Hashable
    DescribeStateMachineForExecution
  where
  hashWithSalt :: Int -> DescribeStateMachineForExecution -> Int
hashWithSalt
    Int
_salt
    DescribeStateMachineForExecution' {Text
executionArn :: Text
$sel:executionArn:DescribeStateMachineForExecution' :: DescribeStateMachineForExecution -> Text
..} =
      Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
executionArn

instance
  Prelude.NFData
    DescribeStateMachineForExecution
  where
  rnf :: DescribeStateMachineForExecution -> ()
rnf DescribeStateMachineForExecution' {Text
executionArn :: Text
$sel:executionArn:DescribeStateMachineForExecution' :: DescribeStateMachineForExecution -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
executionArn

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

instance Data.ToJSON DescribeStateMachineForExecution where
  toJSON :: DescribeStateMachineForExecution -> Value
toJSON DescribeStateMachineForExecution' {Text
executionArn :: Text
$sel:executionArn:DescribeStateMachineForExecution' :: DescribeStateMachineForExecution -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"executionArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
executionArn)]
      )

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

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

-- | /See:/ 'newDescribeStateMachineForExecutionResponse' smart constructor.
data DescribeStateMachineForExecutionResponse = DescribeStateMachineForExecutionResponse'
  { -- | A user-defined or an auto-generated string that identifies a @Map@
    -- state. This field is returned only if the @executionArn@ is a child
    -- workflow execution that was started by a Distributed Map state.
    DescribeStateMachineForExecutionResponse -> Maybe Text
label :: Prelude.Maybe Prelude.Text,
    DescribeStateMachineForExecutionResponse
-> Maybe LoggingConfiguration
loggingConfiguration :: Prelude.Maybe LoggingConfiguration,
    -- | The Amazon Resource Name (ARN) of the Map Run that started the child
    -- workflow execution. This field is returned only if the @executionArn@ is
    -- a child workflow execution that was started by a Distributed Map state.
    DescribeStateMachineForExecutionResponse -> Maybe Text
mapRunArn :: Prelude.Maybe Prelude.Text,
    -- | Selects whether X-Ray tracing is enabled.
    DescribeStateMachineForExecutionResponse
-> Maybe TracingConfiguration
tracingConfiguration :: Prelude.Maybe TracingConfiguration,
    -- | The response's http status code.
    DescribeStateMachineForExecutionResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the state machine associated with the
    -- execution.
    DescribeStateMachineForExecutionResponse -> Text
stateMachineArn :: Prelude.Text,
    -- | The name of the state machine associated with the execution.
    DescribeStateMachineForExecutionResponse -> Text
name :: Prelude.Text,
    -- | The Amazon States Language definition of the state machine. See
    -- <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html Amazon States Language>.
    DescribeStateMachineForExecutionResponse -> Sensitive Text
definition :: Data.Sensitive Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the IAM role of the State Machine for
    -- the execution.
    DescribeStateMachineForExecutionResponse -> Text
roleArn :: Prelude.Text,
    -- | The date and time the state machine associated with an execution was
    -- updated. For a newly created state machine, this is the creation date.
    DescribeStateMachineForExecutionResponse -> POSIX
updateDate :: Data.POSIX
  }
  deriving (DescribeStateMachineForExecutionResponse
-> DescribeStateMachineForExecutionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStateMachineForExecutionResponse
-> DescribeStateMachineForExecutionResponse -> Bool
$c/= :: DescribeStateMachineForExecutionResponse
-> DescribeStateMachineForExecutionResponse -> Bool
== :: DescribeStateMachineForExecutionResponse
-> DescribeStateMachineForExecutionResponse -> Bool
$c== :: DescribeStateMachineForExecutionResponse
-> DescribeStateMachineForExecutionResponse -> Bool
Prelude.Eq, Int -> DescribeStateMachineForExecutionResponse -> ShowS
[DescribeStateMachineForExecutionResponse] -> ShowS
DescribeStateMachineForExecutionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStateMachineForExecutionResponse] -> ShowS
$cshowList :: [DescribeStateMachineForExecutionResponse] -> ShowS
show :: DescribeStateMachineForExecutionResponse -> String
$cshow :: DescribeStateMachineForExecutionResponse -> String
showsPrec :: Int -> DescribeStateMachineForExecutionResponse -> ShowS
$cshowsPrec :: Int -> DescribeStateMachineForExecutionResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeStateMachineForExecutionResponse x
-> DescribeStateMachineForExecutionResponse
forall x.
DescribeStateMachineForExecutionResponse
-> Rep DescribeStateMachineForExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeStateMachineForExecutionResponse x
-> DescribeStateMachineForExecutionResponse
$cfrom :: forall x.
DescribeStateMachineForExecutionResponse
-> Rep DescribeStateMachineForExecutionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStateMachineForExecutionResponse' 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:
--
-- 'label', 'describeStateMachineForExecutionResponse_label' - A user-defined or an auto-generated string that identifies a @Map@
-- state. This field is returned only if the @executionArn@ is a child
-- workflow execution that was started by a Distributed Map state.
--
-- 'loggingConfiguration', 'describeStateMachineForExecutionResponse_loggingConfiguration' - Undocumented member.
--
-- 'mapRunArn', 'describeStateMachineForExecutionResponse_mapRunArn' - The Amazon Resource Name (ARN) of the Map Run that started the child
-- workflow execution. This field is returned only if the @executionArn@ is
-- a child workflow execution that was started by a Distributed Map state.
--
-- 'tracingConfiguration', 'describeStateMachineForExecutionResponse_tracingConfiguration' - Selects whether X-Ray tracing is enabled.
--
-- 'httpStatus', 'describeStateMachineForExecutionResponse_httpStatus' - The response's http status code.
--
-- 'stateMachineArn', 'describeStateMachineForExecutionResponse_stateMachineArn' - The Amazon Resource Name (ARN) of the state machine associated with the
-- execution.
--
-- 'name', 'describeStateMachineForExecutionResponse_name' - The name of the state machine associated with the execution.
--
-- 'definition', 'describeStateMachineForExecutionResponse_definition' - The Amazon States Language definition of the state machine. See
-- <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html Amazon States Language>.
--
-- 'roleArn', 'describeStateMachineForExecutionResponse_roleArn' - The Amazon Resource Name (ARN) of the IAM role of the State Machine for
-- the execution.
--
-- 'updateDate', 'describeStateMachineForExecutionResponse_updateDate' - The date and time the state machine associated with an execution was
-- updated. For a newly created state machine, this is the creation date.
newDescribeStateMachineForExecutionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'stateMachineArn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'definition'
  Prelude.Text ->
  -- | 'roleArn'
  Prelude.Text ->
  -- | 'updateDate'
  Prelude.UTCTime ->
  DescribeStateMachineForExecutionResponse
newDescribeStateMachineForExecutionResponse :: Int
-> Text
-> Text
-> Text
-> Text
-> UTCTime
-> DescribeStateMachineForExecutionResponse
newDescribeStateMachineForExecutionResponse
  Int
pHttpStatus_
  Text
pStateMachineArn_
  Text
pName_
  Text
pDefinition_
  Text
pRoleArn_
  UTCTime
pUpdateDate_ =
    DescribeStateMachineForExecutionResponse'
      { $sel:label:DescribeStateMachineForExecutionResponse' :: Maybe Text
label =
          forall a. Maybe a
Prelude.Nothing,
        $sel:loggingConfiguration:DescribeStateMachineForExecutionResponse' :: Maybe LoggingConfiguration
loggingConfiguration =
          forall a. Maybe a
Prelude.Nothing,
        $sel:mapRunArn:DescribeStateMachineForExecutionResponse' :: Maybe Text
mapRunArn = forall a. Maybe a
Prelude.Nothing,
        $sel:tracingConfiguration:DescribeStateMachineForExecutionResponse' :: Maybe TracingConfiguration
tracingConfiguration =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeStateMachineForExecutionResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:stateMachineArn:DescribeStateMachineForExecutionResponse' :: Text
stateMachineArn =
          Text
pStateMachineArn_,
        $sel:name:DescribeStateMachineForExecutionResponse' :: Text
name = Text
pName_,
        $sel:definition:DescribeStateMachineForExecutionResponse' :: Sensitive Text
definition =
          forall a. Iso' (Sensitive a) a
Data._Sensitive
            forall t b. AReview t b -> b -> t
Lens.# Text
pDefinition_,
        $sel:roleArn:DescribeStateMachineForExecutionResponse' :: Text
roleArn = Text
pRoleArn_,
        $sel:updateDate:DescribeStateMachineForExecutionResponse' :: POSIX
updateDate =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateDate_
      }

-- | A user-defined or an auto-generated string that identifies a @Map@
-- state. This field is returned only if the @executionArn@ is a child
-- workflow execution that was started by a Distributed Map state.
describeStateMachineForExecutionResponse_label :: Lens.Lens' DescribeStateMachineForExecutionResponse (Prelude.Maybe Prelude.Text)
describeStateMachineForExecutionResponse_label :: Lens' DescribeStateMachineForExecutionResponse (Maybe Text)
describeStateMachineForExecutionResponse_label = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {Maybe Text
label :: Maybe Text
$sel:label:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Maybe Text
label} -> Maybe Text
label) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} Maybe Text
a -> DescribeStateMachineForExecutionResponse
s {$sel:label:DescribeStateMachineForExecutionResponse' :: Maybe Text
label = Maybe Text
a} :: DescribeStateMachineForExecutionResponse)

-- | Undocumented member.
describeStateMachineForExecutionResponse_loggingConfiguration :: Lens.Lens' DescribeStateMachineForExecutionResponse (Prelude.Maybe LoggingConfiguration)
describeStateMachineForExecutionResponse_loggingConfiguration :: Lens'
  DescribeStateMachineForExecutionResponse
  (Maybe LoggingConfiguration)
describeStateMachineForExecutionResponse_loggingConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {Maybe LoggingConfiguration
loggingConfiguration :: Maybe LoggingConfiguration
$sel:loggingConfiguration:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse
-> Maybe LoggingConfiguration
loggingConfiguration} -> Maybe LoggingConfiguration
loggingConfiguration) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} Maybe LoggingConfiguration
a -> DescribeStateMachineForExecutionResponse
s {$sel:loggingConfiguration:DescribeStateMachineForExecutionResponse' :: Maybe LoggingConfiguration
loggingConfiguration = Maybe LoggingConfiguration
a} :: DescribeStateMachineForExecutionResponse)

-- | The Amazon Resource Name (ARN) of the Map Run that started the child
-- workflow execution. This field is returned only if the @executionArn@ is
-- a child workflow execution that was started by a Distributed Map state.
describeStateMachineForExecutionResponse_mapRunArn :: Lens.Lens' DescribeStateMachineForExecutionResponse (Prelude.Maybe Prelude.Text)
describeStateMachineForExecutionResponse_mapRunArn :: Lens' DescribeStateMachineForExecutionResponse (Maybe Text)
describeStateMachineForExecutionResponse_mapRunArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {Maybe Text
mapRunArn :: Maybe Text
$sel:mapRunArn:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Maybe Text
mapRunArn} -> Maybe Text
mapRunArn) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} Maybe Text
a -> DescribeStateMachineForExecutionResponse
s {$sel:mapRunArn:DescribeStateMachineForExecutionResponse' :: Maybe Text
mapRunArn = Maybe Text
a} :: DescribeStateMachineForExecutionResponse)

-- | Selects whether X-Ray tracing is enabled.
describeStateMachineForExecutionResponse_tracingConfiguration :: Lens.Lens' DescribeStateMachineForExecutionResponse (Prelude.Maybe TracingConfiguration)
describeStateMachineForExecutionResponse_tracingConfiguration :: Lens'
  DescribeStateMachineForExecutionResponse
  (Maybe TracingConfiguration)
describeStateMachineForExecutionResponse_tracingConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {Maybe TracingConfiguration
tracingConfiguration :: Maybe TracingConfiguration
$sel:tracingConfiguration:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse
-> Maybe TracingConfiguration
tracingConfiguration} -> Maybe TracingConfiguration
tracingConfiguration) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} Maybe TracingConfiguration
a -> DescribeStateMachineForExecutionResponse
s {$sel:tracingConfiguration:DescribeStateMachineForExecutionResponse' :: Maybe TracingConfiguration
tracingConfiguration = Maybe TracingConfiguration
a} :: DescribeStateMachineForExecutionResponse)

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

-- | The Amazon Resource Name (ARN) of the state machine associated with the
-- execution.
describeStateMachineForExecutionResponse_stateMachineArn :: Lens.Lens' DescribeStateMachineForExecutionResponse Prelude.Text
describeStateMachineForExecutionResponse_stateMachineArn :: Lens' DescribeStateMachineForExecutionResponse Text
describeStateMachineForExecutionResponse_stateMachineArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {Text
stateMachineArn :: Text
$sel:stateMachineArn:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Text
stateMachineArn} -> Text
stateMachineArn) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} Text
a -> DescribeStateMachineForExecutionResponse
s {$sel:stateMachineArn:DescribeStateMachineForExecutionResponse' :: Text
stateMachineArn = Text
a} :: DescribeStateMachineForExecutionResponse)

-- | The name of the state machine associated with the execution.
describeStateMachineForExecutionResponse_name :: Lens.Lens' DescribeStateMachineForExecutionResponse Prelude.Text
describeStateMachineForExecutionResponse_name :: Lens' DescribeStateMachineForExecutionResponse Text
describeStateMachineForExecutionResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {Text
name :: Text
$sel:name:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Text
name} -> Text
name) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} Text
a -> DescribeStateMachineForExecutionResponse
s {$sel:name:DescribeStateMachineForExecutionResponse' :: Text
name = Text
a} :: DescribeStateMachineForExecutionResponse)

-- | The Amazon States Language definition of the state machine. See
-- <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html Amazon States Language>.
describeStateMachineForExecutionResponse_definition :: Lens.Lens' DescribeStateMachineForExecutionResponse Prelude.Text
describeStateMachineForExecutionResponse_definition :: Lens' DescribeStateMachineForExecutionResponse Text
describeStateMachineForExecutionResponse_definition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {Sensitive Text
definition :: Sensitive Text
$sel:definition:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Sensitive Text
definition} -> Sensitive Text
definition) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} Sensitive Text
a -> DescribeStateMachineForExecutionResponse
s {$sel:definition:DescribeStateMachineForExecutionResponse' :: Sensitive Text
definition = Sensitive Text
a} :: DescribeStateMachineForExecutionResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The Amazon Resource Name (ARN) of the IAM role of the State Machine for
-- the execution.
describeStateMachineForExecutionResponse_roleArn :: Lens.Lens' DescribeStateMachineForExecutionResponse Prelude.Text
describeStateMachineForExecutionResponse_roleArn :: Lens' DescribeStateMachineForExecutionResponse Text
describeStateMachineForExecutionResponse_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {Text
roleArn :: Text
$sel:roleArn:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Text
roleArn} -> Text
roleArn) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} Text
a -> DescribeStateMachineForExecutionResponse
s {$sel:roleArn:DescribeStateMachineForExecutionResponse' :: Text
roleArn = Text
a} :: DescribeStateMachineForExecutionResponse)

-- | The date and time the state machine associated with an execution was
-- updated. For a newly created state machine, this is the creation date.
describeStateMachineForExecutionResponse_updateDate :: Lens.Lens' DescribeStateMachineForExecutionResponse Prelude.UTCTime
describeStateMachineForExecutionResponse_updateDate :: Lens' DescribeStateMachineForExecutionResponse UTCTime
describeStateMachineForExecutionResponse_updateDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStateMachineForExecutionResponse' {POSIX
updateDate :: POSIX
$sel:updateDate:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> POSIX
updateDate} -> POSIX
updateDate) (\s :: DescribeStateMachineForExecutionResponse
s@DescribeStateMachineForExecutionResponse' {} POSIX
a -> DescribeStateMachineForExecutionResponse
s {$sel:updateDate:DescribeStateMachineForExecutionResponse' :: POSIX
updateDate = POSIX
a} :: DescribeStateMachineForExecutionResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance
  Prelude.NFData
    DescribeStateMachineForExecutionResponse
  where
  rnf :: DescribeStateMachineForExecutionResponse -> ()
rnf DescribeStateMachineForExecutionResponse' {Int
Maybe Text
Maybe LoggingConfiguration
Maybe TracingConfiguration
Text
Sensitive Text
POSIX
updateDate :: POSIX
roleArn :: Text
definition :: Sensitive Text
name :: Text
stateMachineArn :: Text
httpStatus :: Int
tracingConfiguration :: Maybe TracingConfiguration
mapRunArn :: Maybe Text
loggingConfiguration :: Maybe LoggingConfiguration
label :: Maybe Text
$sel:updateDate:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> POSIX
$sel:roleArn:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Text
$sel:definition:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Sensitive Text
$sel:name:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Text
$sel:stateMachineArn:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Text
$sel:httpStatus:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Int
$sel:tracingConfiguration:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse
-> Maybe TracingConfiguration
$sel:mapRunArn:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Maybe Text
$sel:loggingConfiguration:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse
-> Maybe LoggingConfiguration
$sel:label:DescribeStateMachineForExecutionResponse' :: DescribeStateMachineForExecutionResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
label
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LoggingConfiguration
loggingConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mapRunArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TracingConfiguration
tracingConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stateMachineArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
definition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
updateDate