{-# 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-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)
--
-- Describes the state machine associated with a specific execution.
--
-- 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_tracingConfiguration,
    describeStateMachineForExecutionResponse_loggingConfiguration,
    describeStateMachineForExecutionResponse_httpStatus,
    describeStateMachineForExecutionResponse_stateMachineArn,
    describeStateMachineForExecutionResponse_name,
    describeStateMachineForExecutionResponse_definition,
    describeStateMachineForExecutionResponse_roleArn,
    describeStateMachineForExecutionResponse_updateDate,
  )
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:/ '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
(DescribeStateMachineForExecution
 -> DescribeStateMachineForExecution -> Bool)
-> (DescribeStateMachineForExecution
    -> DescribeStateMachineForExecution -> Bool)
-> Eq DescribeStateMachineForExecution
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]
(Int -> ReadS DescribeStateMachineForExecution)
-> ReadS [DescribeStateMachineForExecution]
-> ReadPrec DescribeStateMachineForExecution
-> ReadPrec [DescribeStateMachineForExecution]
-> Read 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
(Int -> DescribeStateMachineForExecution -> ShowS)
-> (DescribeStateMachineForExecution -> String)
-> ([DescribeStateMachineForExecution] -> ShowS)
-> Show DescribeStateMachineForExecution
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.
 DescribeStateMachineForExecution
 -> Rep DescribeStateMachineForExecution x)
-> (forall x.
    Rep DescribeStateMachineForExecution x
    -> DescribeStateMachineForExecution)
-> Generic DescribeStateMachineForExecution
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' :: Text -> DescribeStateMachineForExecution
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 :: (Text -> f Text)
-> DescribeStateMachineForExecution
-> f DescribeStateMachineForExecution
describeStateMachineForExecution_executionArn = (DescribeStateMachineForExecution -> Text)
-> (DescribeStateMachineForExecution
    -> Text -> DescribeStateMachineForExecution)
-> Lens
     DescribeStateMachineForExecution
     DescribeStateMachineForExecution
     Text
     Text
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 :: DescribeStateMachineForExecution
-> Request DescribeStateMachineForExecution
request = Service
-> DescribeStateMachineForExecution
-> Request DescribeStateMachineForExecution
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeStateMachineForExecution
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeStateMachineForExecution)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeStateMachineForExecution))
-> Logger
-> Service
-> Proxy DescribeStateMachineForExecution
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeStateMachineForExecution)))
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 TracingConfiguration
-> Maybe LoggingConfiguration
-> Int
-> Text
-> Text
-> Sensitive Text
-> Text
-> POSIX
-> DescribeStateMachineForExecutionResponse
DescribeStateMachineForExecutionResponse'
            (Maybe TracingConfiguration
 -> Maybe LoggingConfiguration
 -> Int
 -> Text
 -> Text
 -> Sensitive Text
 -> Text
 -> POSIX
 -> DescribeStateMachineForExecutionResponse)
-> Either String (Maybe TracingConfiguration)
-> Either
     String
     (Maybe LoggingConfiguration
      -> Int
      -> Text
      -> Text
      -> Sensitive Text
      -> Text
      -> POSIX
      -> DescribeStateMachineForExecutionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TracingConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tracingConfiguration")
            Either
  String
  (Maybe LoggingConfiguration
   -> Int
   -> Text
   -> Text
   -> Sensitive Text
   -> Text
   -> POSIX
   -> DescribeStateMachineForExecutionResponse)
-> Either String (Maybe LoggingConfiguration)
-> Either
     String
     (Int
      -> Text
      -> Text
      -> Sensitive Text
      -> Text
      -> POSIX
      -> DescribeStateMachineForExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LoggingConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"loggingConfiguration")
            Either
  String
  (Int
   -> Text
   -> Text
   -> Sensitive Text
   -> Text
   -> POSIX
   -> DescribeStateMachineForExecutionResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> Sensitive Text
      -> Text
      -> POSIX
      -> DescribeStateMachineForExecutionResponse)
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
   -> Text
   -> Sensitive Text
   -> Text
   -> POSIX
   -> DescribeStateMachineForExecutionResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Sensitive Text
      -> Text
      -> POSIX
      -> DescribeStateMachineForExecutionResponse)
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
"stateMachineArn")
            Either
  String
  (Text
   -> Sensitive Text
   -> Text
   -> POSIX
   -> DescribeStateMachineForExecutionResponse)
-> Either String Text
-> Either
     String
     (Sensitive Text
      -> Text -> POSIX -> DescribeStateMachineForExecutionResponse)
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
"name")
            Either
  String
  (Sensitive Text
   -> Text -> POSIX -> DescribeStateMachineForExecutionResponse)
-> Either String (Sensitive Text)
-> Either
     String (Text -> POSIX -> DescribeStateMachineForExecutionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Sensitive Text)
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"definition")
            Either
  String (Text -> POSIX -> DescribeStateMachineForExecutionResponse)
-> Either String Text
-> Either
     String (POSIX -> DescribeStateMachineForExecutionResponse)
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
"roleArn")
            Either String (POSIX -> DescribeStateMachineForExecutionResponse)
-> Either String POSIX
-> Either String DescribeStateMachineForExecutionResponse
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
"updateDate")
      )

instance
  Prelude.Hashable
    DescribeStateMachineForExecution

instance
  Prelude.NFData
    DescribeStateMachineForExecution

instance
  Core.ToHeaders
    DescribeStateMachineForExecution
  where
  toHeaders :: DescribeStateMachineForExecution -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeStateMachineForExecution -> 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.DescribeStateMachineForExecution" ::
                          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 DescribeStateMachineForExecution where
  toJSON :: DescribeStateMachineForExecution -> Value
toJSON DescribeStateMachineForExecution' {Text
executionArn :: Text
$sel:executionArn:DescribeStateMachineForExecution' :: DescribeStateMachineForExecution -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"executionArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
executionArn)]
      )

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

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

-- | /See:/ 'newDescribeStateMachineForExecutionResponse' smart constructor.
data DescribeStateMachineForExecutionResponse = DescribeStateMachineForExecutionResponse'
  { -- | Selects whether AWS X-Ray tracing is enabled.
    DescribeStateMachineForExecutionResponse
-> Maybe TracingConfiguration
tracingConfiguration :: Prelude.Maybe TracingConfiguration,
    DescribeStateMachineForExecutionResponse
-> Maybe LoggingConfiguration
loggingConfiguration :: Prelude.Maybe LoggingConfiguration,
    -- | 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 :: Core.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 :: Core.POSIX
  }
  deriving (DescribeStateMachineForExecutionResponse
-> DescribeStateMachineForExecutionResponse -> Bool
(DescribeStateMachineForExecutionResponse
 -> DescribeStateMachineForExecutionResponse -> Bool)
-> (DescribeStateMachineForExecutionResponse
    -> DescribeStateMachineForExecutionResponse -> Bool)
-> Eq DescribeStateMachineForExecutionResponse
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
(Int -> DescribeStateMachineForExecutionResponse -> ShowS)
-> (DescribeStateMachineForExecutionResponse -> String)
-> ([DescribeStateMachineForExecutionResponse] -> ShowS)
-> Show DescribeStateMachineForExecutionResponse
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.
 DescribeStateMachineForExecutionResponse
 -> Rep DescribeStateMachineForExecutionResponse x)
-> (forall x.
    Rep DescribeStateMachineForExecutionResponse x
    -> DescribeStateMachineForExecutionResponse)
-> Generic DescribeStateMachineForExecutionResponse
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:
--
-- 'tracingConfiguration', 'describeStateMachineForExecutionResponse_tracingConfiguration' - Selects whether AWS X-Ray tracing is enabled.
--
-- 'loggingConfiguration', 'describeStateMachineForExecutionResponse_loggingConfiguration' - Undocumented member.
--
-- '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' :: Maybe TracingConfiguration
-> Maybe LoggingConfiguration
-> Int
-> Text
-> Text
-> Sensitive Text
-> Text
-> POSIX
-> DescribeStateMachineForExecutionResponse
DescribeStateMachineForExecutionResponse'
      { $sel:tracingConfiguration:DescribeStateMachineForExecutionResponse' :: Maybe TracingConfiguration
tracingConfiguration =
          Maybe TracingConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:loggingConfiguration:DescribeStateMachineForExecutionResponse' :: Maybe LoggingConfiguration
loggingConfiguration =
          Maybe LoggingConfiguration
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 =
          Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive
            (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pDefinition_,
        $sel:roleArn:DescribeStateMachineForExecutionResponse' :: Text
roleArn = Text
pRoleArn_,
        $sel:updateDate:DescribeStateMachineForExecutionResponse' :: POSIX
updateDate =
          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
pUpdateDate_
      }

-- | Selects whether AWS X-Ray tracing is enabled.
describeStateMachineForExecutionResponse_tracingConfiguration :: Lens.Lens' DescribeStateMachineForExecutionResponse (Prelude.Maybe TracingConfiguration)
describeStateMachineForExecutionResponse_tracingConfiguration :: (Maybe TracingConfiguration -> f (Maybe TracingConfiguration))
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
describeStateMachineForExecutionResponse_tracingConfiguration = (DescribeStateMachineForExecutionResponse
 -> Maybe TracingConfiguration)
-> (DescribeStateMachineForExecutionResponse
    -> Maybe TracingConfiguration
    -> DescribeStateMachineForExecutionResponse)
-> Lens
     DescribeStateMachineForExecutionResponse
     DescribeStateMachineForExecutionResponse
     (Maybe TracingConfiguration)
     (Maybe 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)

-- | Undocumented member.
describeStateMachineForExecutionResponse_loggingConfiguration :: Lens.Lens' DescribeStateMachineForExecutionResponse (Prelude.Maybe LoggingConfiguration)
describeStateMachineForExecutionResponse_loggingConfiguration :: (Maybe LoggingConfiguration -> f (Maybe LoggingConfiguration))
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
describeStateMachineForExecutionResponse_loggingConfiguration = (DescribeStateMachineForExecutionResponse
 -> Maybe LoggingConfiguration)
-> (DescribeStateMachineForExecutionResponse
    -> Maybe LoggingConfiguration
    -> DescribeStateMachineForExecutionResponse)
-> Lens
     DescribeStateMachineForExecutionResponse
     DescribeStateMachineForExecutionResponse
     (Maybe LoggingConfiguration)
     (Maybe 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 response's http status code.
describeStateMachineForExecutionResponse_httpStatus :: Lens.Lens' DescribeStateMachineForExecutionResponse Prelude.Int
describeStateMachineForExecutionResponse_httpStatus :: (Int -> f Int)
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
describeStateMachineForExecutionResponse_httpStatus = (DescribeStateMachineForExecutionResponse -> Int)
-> (DescribeStateMachineForExecutionResponse
    -> Int -> DescribeStateMachineForExecutionResponse)
-> Lens
     DescribeStateMachineForExecutionResponse
     DescribeStateMachineForExecutionResponse
     Int
     Int
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 :: (Text -> f Text)
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
describeStateMachineForExecutionResponse_stateMachineArn = (DescribeStateMachineForExecutionResponse -> Text)
-> (DescribeStateMachineForExecutionResponse
    -> Text -> DescribeStateMachineForExecutionResponse)
-> Lens
     DescribeStateMachineForExecutionResponse
     DescribeStateMachineForExecutionResponse
     Text
     Text
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 :: (Text -> f Text)
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
describeStateMachineForExecutionResponse_name = (DescribeStateMachineForExecutionResponse -> Text)
-> (DescribeStateMachineForExecutionResponse
    -> Text -> DescribeStateMachineForExecutionResponse)
-> Lens
     DescribeStateMachineForExecutionResponse
     DescribeStateMachineForExecutionResponse
     Text
     Text
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 :: (Text -> f Text)
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
describeStateMachineForExecutionResponse_definition = (DescribeStateMachineForExecutionResponse -> Sensitive Text)
-> (DescribeStateMachineForExecutionResponse
    -> Sensitive Text -> DescribeStateMachineForExecutionResponse)
-> Lens
     DescribeStateMachineForExecutionResponse
     DescribeStateMachineForExecutionResponse
     (Sensitive Text)
     (Sensitive Text)
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) ((Sensitive Text -> f (Sensitive Text))
 -> DescribeStateMachineForExecutionResponse
 -> f DescribeStateMachineForExecutionResponse)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._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 :: (Text -> f Text)
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
describeStateMachineForExecutionResponse_roleArn = (DescribeStateMachineForExecutionResponse -> Text)
-> (DescribeStateMachineForExecutionResponse
    -> Text -> DescribeStateMachineForExecutionResponse)
-> Lens
     DescribeStateMachineForExecutionResponse
     DescribeStateMachineForExecutionResponse
     Text
     Text
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 :: (UTCTime -> f UTCTime)
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
describeStateMachineForExecutionResponse_updateDate = (DescribeStateMachineForExecutionResponse -> POSIX)
-> (DescribeStateMachineForExecutionResponse
    -> POSIX -> DescribeStateMachineForExecutionResponse)
-> Lens
     DescribeStateMachineForExecutionResponse
     DescribeStateMachineForExecutionResponse
     POSIX
     POSIX
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) ((POSIX -> f POSIX)
 -> DescribeStateMachineForExecutionResponse
 -> f DescribeStateMachineForExecutionResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeStateMachineForExecutionResponse
-> f DescribeStateMachineForExecutionResponse
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

instance
  Prelude.NFData
    DescribeStateMachineForExecutionResponse