{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.SWF.Types.SignalExternalWorkflowExecutionFailedEventAttributes
-- 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)
module Amazonka.SWF.Types.SignalExternalWorkflowExecutionFailedEventAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.SignalExternalWorkflowExecutionFailedCause

-- | Provides the details of the @SignalExternalWorkflowExecutionFailed@
-- event.
--
-- /See:/ 'newSignalExternalWorkflowExecutionFailedEventAttributes' smart constructor.
data SignalExternalWorkflowExecutionFailedEventAttributes = SignalExternalWorkflowExecutionFailedEventAttributes'
  { -- | The data attached to the event that the decider can use in subsequent
    -- workflow tasks. This data isn\'t sent to the workflow execution.
    SignalExternalWorkflowExecutionFailedEventAttributes -> Maybe Text
control :: Prelude.Maybe Prelude.Text,
    -- | The @runId@ of the external workflow execution that the signal was being
    -- delivered to.
    SignalExternalWorkflowExecutionFailedEventAttributes -> Maybe Text
runId :: Prelude.Maybe Prelude.Text,
    -- | The @workflowId@ of the external workflow execution that the signal was
    -- being delivered to.
    SignalExternalWorkflowExecutionFailedEventAttributes -> Text
workflowId :: Prelude.Text,
    -- | The cause of the failure. This information is generated by the system
    -- and can be useful for diagnostic purposes.
    --
    -- If @cause@ is set to @OPERATION_NOT_PERMITTED@, the decision failed
    -- because it lacked sufficient permissions. For details and example IAM
    -- policies, see
    -- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html Using IAM to Manage Access to Amazon SWF Workflows>
    -- in the /Amazon SWF Developer Guide/.
    SignalExternalWorkflowExecutionFailedEventAttributes
-> SignalExternalWorkflowExecutionFailedCause
cause :: SignalExternalWorkflowExecutionFailedCause,
    -- | The ID of the @SignalExternalWorkflowExecutionInitiated@ event
    -- corresponding to the @SignalExternalWorkflowExecution@ decision to
    -- request this signal. This information can be useful for diagnosing
    -- problems by tracing back the chain of events leading up to this event.
    SignalExternalWorkflowExecutionFailedEventAttributes -> Integer
initiatedEventId :: Prelude.Integer,
    -- | The ID of the @DecisionTaskCompleted@ event corresponding to the
    -- decision task that resulted in the @SignalExternalWorkflowExecution@
    -- decision for this signal. This information can be useful for diagnosing
    -- problems by tracing back the chain of events leading up to this event.
    SignalExternalWorkflowExecutionFailedEventAttributes -> Integer
decisionTaskCompletedEventId :: Prelude.Integer
  }
  deriving (SignalExternalWorkflowExecutionFailedEventAttributes
-> SignalExternalWorkflowExecutionFailedEventAttributes -> Bool
(SignalExternalWorkflowExecutionFailedEventAttributes
 -> SignalExternalWorkflowExecutionFailedEventAttributes -> Bool)
-> (SignalExternalWorkflowExecutionFailedEventAttributes
    -> SignalExternalWorkflowExecutionFailedEventAttributes -> Bool)
-> Eq SignalExternalWorkflowExecutionFailedEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignalExternalWorkflowExecutionFailedEventAttributes
-> SignalExternalWorkflowExecutionFailedEventAttributes -> Bool
$c/= :: SignalExternalWorkflowExecutionFailedEventAttributes
-> SignalExternalWorkflowExecutionFailedEventAttributes -> Bool
== :: SignalExternalWorkflowExecutionFailedEventAttributes
-> SignalExternalWorkflowExecutionFailedEventAttributes -> Bool
$c== :: SignalExternalWorkflowExecutionFailedEventAttributes
-> SignalExternalWorkflowExecutionFailedEventAttributes -> Bool
Prelude.Eq, ReadPrec [SignalExternalWorkflowExecutionFailedEventAttributes]
ReadPrec SignalExternalWorkflowExecutionFailedEventAttributes
Int -> ReadS SignalExternalWorkflowExecutionFailedEventAttributes
ReadS [SignalExternalWorkflowExecutionFailedEventAttributes]
(Int -> ReadS SignalExternalWorkflowExecutionFailedEventAttributes)
-> ReadS [SignalExternalWorkflowExecutionFailedEventAttributes]
-> ReadPrec SignalExternalWorkflowExecutionFailedEventAttributes
-> ReadPrec [SignalExternalWorkflowExecutionFailedEventAttributes]
-> Read SignalExternalWorkflowExecutionFailedEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SignalExternalWorkflowExecutionFailedEventAttributes]
$creadListPrec :: ReadPrec [SignalExternalWorkflowExecutionFailedEventAttributes]
readPrec :: ReadPrec SignalExternalWorkflowExecutionFailedEventAttributes
$creadPrec :: ReadPrec SignalExternalWorkflowExecutionFailedEventAttributes
readList :: ReadS [SignalExternalWorkflowExecutionFailedEventAttributes]
$creadList :: ReadS [SignalExternalWorkflowExecutionFailedEventAttributes]
readsPrec :: Int -> ReadS SignalExternalWorkflowExecutionFailedEventAttributes
$creadsPrec :: Int -> ReadS SignalExternalWorkflowExecutionFailedEventAttributes
Prelude.Read, Int
-> SignalExternalWorkflowExecutionFailedEventAttributes -> ShowS
[SignalExternalWorkflowExecutionFailedEventAttributes] -> ShowS
SignalExternalWorkflowExecutionFailedEventAttributes -> String
(Int
 -> SignalExternalWorkflowExecutionFailedEventAttributes -> ShowS)
-> (SignalExternalWorkflowExecutionFailedEventAttributes -> String)
-> ([SignalExternalWorkflowExecutionFailedEventAttributes]
    -> ShowS)
-> Show SignalExternalWorkflowExecutionFailedEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignalExternalWorkflowExecutionFailedEventAttributes] -> ShowS
$cshowList :: [SignalExternalWorkflowExecutionFailedEventAttributes] -> ShowS
show :: SignalExternalWorkflowExecutionFailedEventAttributes -> String
$cshow :: SignalExternalWorkflowExecutionFailedEventAttributes -> String
showsPrec :: Int
-> SignalExternalWorkflowExecutionFailedEventAttributes -> ShowS
$cshowsPrec :: Int
-> SignalExternalWorkflowExecutionFailedEventAttributes -> ShowS
Prelude.Show, (forall x.
 SignalExternalWorkflowExecutionFailedEventAttributes
 -> Rep SignalExternalWorkflowExecutionFailedEventAttributes x)
-> (forall x.
    Rep SignalExternalWorkflowExecutionFailedEventAttributes x
    -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Generic SignalExternalWorkflowExecutionFailedEventAttributes
forall x.
Rep SignalExternalWorkflowExecutionFailedEventAttributes x
-> SignalExternalWorkflowExecutionFailedEventAttributes
forall x.
SignalExternalWorkflowExecutionFailedEventAttributes
-> Rep SignalExternalWorkflowExecutionFailedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SignalExternalWorkflowExecutionFailedEventAttributes x
-> SignalExternalWorkflowExecutionFailedEventAttributes
$cfrom :: forall x.
SignalExternalWorkflowExecutionFailedEventAttributes
-> Rep SignalExternalWorkflowExecutionFailedEventAttributes x
Prelude.Generic)

-- |
-- Create a value of 'SignalExternalWorkflowExecutionFailedEventAttributes' 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:
--
-- 'control', 'signalExternalWorkflowExecutionFailedEventAttributes_control' - The data attached to the event that the decider can use in subsequent
-- workflow tasks. This data isn\'t sent to the workflow execution.
--
-- 'runId', 'signalExternalWorkflowExecutionFailedEventAttributes_runId' - The @runId@ of the external workflow execution that the signal was being
-- delivered to.
--
-- 'workflowId', 'signalExternalWorkflowExecutionFailedEventAttributes_workflowId' - The @workflowId@ of the external workflow execution that the signal was
-- being delivered to.
--
-- 'cause', 'signalExternalWorkflowExecutionFailedEventAttributes_cause' - The cause of the failure. This information is generated by the system
-- and can be useful for diagnostic purposes.
--
-- If @cause@ is set to @OPERATION_NOT_PERMITTED@, the decision failed
-- because it lacked sufficient permissions. For details and example IAM
-- policies, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html Using IAM to Manage Access to Amazon SWF Workflows>
-- in the /Amazon SWF Developer Guide/.
--
-- 'initiatedEventId', 'signalExternalWorkflowExecutionFailedEventAttributes_initiatedEventId' - The ID of the @SignalExternalWorkflowExecutionInitiated@ event
-- corresponding to the @SignalExternalWorkflowExecution@ decision to
-- request this signal. This information can be useful for diagnosing
-- problems by tracing back the chain of events leading up to this event.
--
-- 'decisionTaskCompletedEventId', 'signalExternalWorkflowExecutionFailedEventAttributes_decisionTaskCompletedEventId' - The ID of the @DecisionTaskCompleted@ event corresponding to the
-- decision task that resulted in the @SignalExternalWorkflowExecution@
-- decision for this signal. This information can be useful for diagnosing
-- problems by tracing back the chain of events leading up to this event.
newSignalExternalWorkflowExecutionFailedEventAttributes ::
  -- | 'workflowId'
  Prelude.Text ->
  -- | 'cause'
  SignalExternalWorkflowExecutionFailedCause ->
  -- | 'initiatedEventId'
  Prelude.Integer ->
  -- | 'decisionTaskCompletedEventId'
  Prelude.Integer ->
  SignalExternalWorkflowExecutionFailedEventAttributes
newSignalExternalWorkflowExecutionFailedEventAttributes :: Text
-> SignalExternalWorkflowExecutionFailedCause
-> Integer
-> Integer
-> SignalExternalWorkflowExecutionFailedEventAttributes
newSignalExternalWorkflowExecutionFailedEventAttributes
  Text
pWorkflowId_
  SignalExternalWorkflowExecutionFailedCause
pCause_
  Integer
pInitiatedEventId_
  Integer
pDecisionTaskCompletedEventId_ =
    SignalExternalWorkflowExecutionFailedEventAttributes' :: Maybe Text
-> Maybe Text
-> Text
-> SignalExternalWorkflowExecutionFailedCause
-> Integer
-> Integer
-> SignalExternalWorkflowExecutionFailedEventAttributes
SignalExternalWorkflowExecutionFailedEventAttributes'
      { $sel:control:SignalExternalWorkflowExecutionFailedEventAttributes' :: Maybe Text
control =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:runId:SignalExternalWorkflowExecutionFailedEventAttributes' :: Maybe Text
runId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:workflowId:SignalExternalWorkflowExecutionFailedEventAttributes' :: Text
workflowId =
          Text
pWorkflowId_,
        $sel:cause:SignalExternalWorkflowExecutionFailedEventAttributes' :: SignalExternalWorkflowExecutionFailedCause
cause = SignalExternalWorkflowExecutionFailedCause
pCause_,
        $sel:initiatedEventId:SignalExternalWorkflowExecutionFailedEventAttributes' :: Integer
initiatedEventId =
          Integer
pInitiatedEventId_,
        $sel:decisionTaskCompletedEventId:SignalExternalWorkflowExecutionFailedEventAttributes' :: Integer
decisionTaskCompletedEventId =
          Integer
pDecisionTaskCompletedEventId_
      }

-- | The data attached to the event that the decider can use in subsequent
-- workflow tasks. This data isn\'t sent to the workflow execution.
signalExternalWorkflowExecutionFailedEventAttributes_control :: Lens.Lens' SignalExternalWorkflowExecutionFailedEventAttributes (Prelude.Maybe Prelude.Text)
signalExternalWorkflowExecutionFailedEventAttributes_control :: (Maybe Text -> f (Maybe Text))
-> SignalExternalWorkflowExecutionFailedEventAttributes
-> f SignalExternalWorkflowExecutionFailedEventAttributes
signalExternalWorkflowExecutionFailedEventAttributes_control = (SignalExternalWorkflowExecutionFailedEventAttributes
 -> Maybe Text)
-> (SignalExternalWorkflowExecutionFailedEventAttributes
    -> Maybe Text
    -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Lens
     SignalExternalWorkflowExecutionFailedEventAttributes
     SignalExternalWorkflowExecutionFailedEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {Maybe Text
control :: Maybe Text
$sel:control:SignalExternalWorkflowExecutionFailedEventAttributes' :: SignalExternalWorkflowExecutionFailedEventAttributes -> Maybe Text
control} -> Maybe Text
control) (\s :: SignalExternalWorkflowExecutionFailedEventAttributes
s@SignalExternalWorkflowExecutionFailedEventAttributes' {} Maybe Text
a -> SignalExternalWorkflowExecutionFailedEventAttributes
s {$sel:control:SignalExternalWorkflowExecutionFailedEventAttributes' :: Maybe Text
control = Maybe Text
a} :: SignalExternalWorkflowExecutionFailedEventAttributes)

-- | The @runId@ of the external workflow execution that the signal was being
-- delivered to.
signalExternalWorkflowExecutionFailedEventAttributes_runId :: Lens.Lens' SignalExternalWorkflowExecutionFailedEventAttributes (Prelude.Maybe Prelude.Text)
signalExternalWorkflowExecutionFailedEventAttributes_runId :: (Maybe Text -> f (Maybe Text))
-> SignalExternalWorkflowExecutionFailedEventAttributes
-> f SignalExternalWorkflowExecutionFailedEventAttributes
signalExternalWorkflowExecutionFailedEventAttributes_runId = (SignalExternalWorkflowExecutionFailedEventAttributes
 -> Maybe Text)
-> (SignalExternalWorkflowExecutionFailedEventAttributes
    -> Maybe Text
    -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Lens
     SignalExternalWorkflowExecutionFailedEventAttributes
     SignalExternalWorkflowExecutionFailedEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {Maybe Text
runId :: Maybe Text
$sel:runId:SignalExternalWorkflowExecutionFailedEventAttributes' :: SignalExternalWorkflowExecutionFailedEventAttributes -> Maybe Text
runId} -> Maybe Text
runId) (\s :: SignalExternalWorkflowExecutionFailedEventAttributes
s@SignalExternalWorkflowExecutionFailedEventAttributes' {} Maybe Text
a -> SignalExternalWorkflowExecutionFailedEventAttributes
s {$sel:runId:SignalExternalWorkflowExecutionFailedEventAttributes' :: Maybe Text
runId = Maybe Text
a} :: SignalExternalWorkflowExecutionFailedEventAttributes)

-- | The @workflowId@ of the external workflow execution that the signal was
-- being delivered to.
signalExternalWorkflowExecutionFailedEventAttributes_workflowId :: Lens.Lens' SignalExternalWorkflowExecutionFailedEventAttributes Prelude.Text
signalExternalWorkflowExecutionFailedEventAttributes_workflowId :: (Text -> f Text)
-> SignalExternalWorkflowExecutionFailedEventAttributes
-> f SignalExternalWorkflowExecutionFailedEventAttributes
signalExternalWorkflowExecutionFailedEventAttributes_workflowId = (SignalExternalWorkflowExecutionFailedEventAttributes -> Text)
-> (SignalExternalWorkflowExecutionFailedEventAttributes
    -> Text -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Lens
     SignalExternalWorkflowExecutionFailedEventAttributes
     SignalExternalWorkflowExecutionFailedEventAttributes
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {Text
workflowId :: Text
$sel:workflowId:SignalExternalWorkflowExecutionFailedEventAttributes' :: SignalExternalWorkflowExecutionFailedEventAttributes -> Text
workflowId} -> Text
workflowId) (\s :: SignalExternalWorkflowExecutionFailedEventAttributes
s@SignalExternalWorkflowExecutionFailedEventAttributes' {} Text
a -> SignalExternalWorkflowExecutionFailedEventAttributes
s {$sel:workflowId:SignalExternalWorkflowExecutionFailedEventAttributes' :: Text
workflowId = Text
a} :: SignalExternalWorkflowExecutionFailedEventAttributes)

-- | The cause of the failure. This information is generated by the system
-- and can be useful for diagnostic purposes.
--
-- If @cause@ is set to @OPERATION_NOT_PERMITTED@, the decision failed
-- because it lacked sufficient permissions. For details and example IAM
-- policies, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html Using IAM to Manage Access to Amazon SWF Workflows>
-- in the /Amazon SWF Developer Guide/.
signalExternalWorkflowExecutionFailedEventAttributes_cause :: Lens.Lens' SignalExternalWorkflowExecutionFailedEventAttributes SignalExternalWorkflowExecutionFailedCause
signalExternalWorkflowExecutionFailedEventAttributes_cause :: (SignalExternalWorkflowExecutionFailedCause
 -> f SignalExternalWorkflowExecutionFailedCause)
-> SignalExternalWorkflowExecutionFailedEventAttributes
-> f SignalExternalWorkflowExecutionFailedEventAttributes
signalExternalWorkflowExecutionFailedEventAttributes_cause = (SignalExternalWorkflowExecutionFailedEventAttributes
 -> SignalExternalWorkflowExecutionFailedCause)
-> (SignalExternalWorkflowExecutionFailedEventAttributes
    -> SignalExternalWorkflowExecutionFailedCause
    -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Lens
     SignalExternalWorkflowExecutionFailedEventAttributes
     SignalExternalWorkflowExecutionFailedEventAttributes
     SignalExternalWorkflowExecutionFailedCause
     SignalExternalWorkflowExecutionFailedCause
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {SignalExternalWorkflowExecutionFailedCause
cause :: SignalExternalWorkflowExecutionFailedCause
$sel:cause:SignalExternalWorkflowExecutionFailedEventAttributes' :: SignalExternalWorkflowExecutionFailedEventAttributes
-> SignalExternalWorkflowExecutionFailedCause
cause} -> SignalExternalWorkflowExecutionFailedCause
cause) (\s :: SignalExternalWorkflowExecutionFailedEventAttributes
s@SignalExternalWorkflowExecutionFailedEventAttributes' {} SignalExternalWorkflowExecutionFailedCause
a -> SignalExternalWorkflowExecutionFailedEventAttributes
s {$sel:cause:SignalExternalWorkflowExecutionFailedEventAttributes' :: SignalExternalWorkflowExecutionFailedCause
cause = SignalExternalWorkflowExecutionFailedCause
a} :: SignalExternalWorkflowExecutionFailedEventAttributes)

-- | The ID of the @SignalExternalWorkflowExecutionInitiated@ event
-- corresponding to the @SignalExternalWorkflowExecution@ decision to
-- request this signal. This information can be useful for diagnosing
-- problems by tracing back the chain of events leading up to this event.
signalExternalWorkflowExecutionFailedEventAttributes_initiatedEventId :: Lens.Lens' SignalExternalWorkflowExecutionFailedEventAttributes Prelude.Integer
signalExternalWorkflowExecutionFailedEventAttributes_initiatedEventId :: (Integer -> f Integer)
-> SignalExternalWorkflowExecutionFailedEventAttributes
-> f SignalExternalWorkflowExecutionFailedEventAttributes
signalExternalWorkflowExecutionFailedEventAttributes_initiatedEventId = (SignalExternalWorkflowExecutionFailedEventAttributes -> Integer)
-> (SignalExternalWorkflowExecutionFailedEventAttributes
    -> Integer -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Lens
     SignalExternalWorkflowExecutionFailedEventAttributes
     SignalExternalWorkflowExecutionFailedEventAttributes
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {Integer
initiatedEventId :: Integer
$sel:initiatedEventId:SignalExternalWorkflowExecutionFailedEventAttributes' :: SignalExternalWorkflowExecutionFailedEventAttributes -> Integer
initiatedEventId} -> Integer
initiatedEventId) (\s :: SignalExternalWorkflowExecutionFailedEventAttributes
s@SignalExternalWorkflowExecutionFailedEventAttributes' {} Integer
a -> SignalExternalWorkflowExecutionFailedEventAttributes
s {$sel:initiatedEventId:SignalExternalWorkflowExecutionFailedEventAttributes' :: Integer
initiatedEventId = Integer
a} :: SignalExternalWorkflowExecutionFailedEventAttributes)

-- | The ID of the @DecisionTaskCompleted@ event corresponding to the
-- decision task that resulted in the @SignalExternalWorkflowExecution@
-- decision for this signal. This information can be useful for diagnosing
-- problems by tracing back the chain of events leading up to this event.
signalExternalWorkflowExecutionFailedEventAttributes_decisionTaskCompletedEventId :: Lens.Lens' SignalExternalWorkflowExecutionFailedEventAttributes Prelude.Integer
signalExternalWorkflowExecutionFailedEventAttributes_decisionTaskCompletedEventId :: (Integer -> f Integer)
-> SignalExternalWorkflowExecutionFailedEventAttributes
-> f SignalExternalWorkflowExecutionFailedEventAttributes
signalExternalWorkflowExecutionFailedEventAttributes_decisionTaskCompletedEventId = (SignalExternalWorkflowExecutionFailedEventAttributes -> Integer)
-> (SignalExternalWorkflowExecutionFailedEventAttributes
    -> Integer -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Lens
     SignalExternalWorkflowExecutionFailedEventAttributes
     SignalExternalWorkflowExecutionFailedEventAttributes
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {Integer
decisionTaskCompletedEventId :: Integer
$sel:decisionTaskCompletedEventId:SignalExternalWorkflowExecutionFailedEventAttributes' :: SignalExternalWorkflowExecutionFailedEventAttributes -> Integer
decisionTaskCompletedEventId} -> Integer
decisionTaskCompletedEventId) (\s :: SignalExternalWorkflowExecutionFailedEventAttributes
s@SignalExternalWorkflowExecutionFailedEventAttributes' {} Integer
a -> SignalExternalWorkflowExecutionFailedEventAttributes
s {$sel:decisionTaskCompletedEventId:SignalExternalWorkflowExecutionFailedEventAttributes' :: Integer
decisionTaskCompletedEventId = Integer
a} :: SignalExternalWorkflowExecutionFailedEventAttributes)

instance
  Core.FromJSON
    SignalExternalWorkflowExecutionFailedEventAttributes
  where
  parseJSON :: Value
-> Parser SignalExternalWorkflowExecutionFailedEventAttributes
parseJSON =
    String
-> (Object
    -> Parser SignalExternalWorkflowExecutionFailedEventAttributes)
-> Value
-> Parser SignalExternalWorkflowExecutionFailedEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SignalExternalWorkflowExecutionFailedEventAttributes"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Text
-> SignalExternalWorkflowExecutionFailedCause
-> Integer
-> Integer
-> SignalExternalWorkflowExecutionFailedEventAttributes
SignalExternalWorkflowExecutionFailedEventAttributes'
            (Maybe Text
 -> Maybe Text
 -> Text
 -> SignalExternalWorkflowExecutionFailedCause
 -> Integer
 -> Integer
 -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text
      -> SignalExternalWorkflowExecutionFailedCause
      -> Integer
      -> Integer
      -> SignalExternalWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"control")
              Parser
  (Maybe Text
   -> Text
   -> SignalExternalWorkflowExecutionFailedCause
   -> Integer
   -> Integer
   -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> SignalExternalWorkflowExecutionFailedCause
      -> Integer
      -> Integer
      -> SignalExternalWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"runId")
              Parser
  (Text
   -> SignalExternalWorkflowExecutionFailedCause
   -> Integer
   -> Integer
   -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Parser Text
-> Parser
     (SignalExternalWorkflowExecutionFailedCause
      -> Integer
      -> Integer
      -> SignalExternalWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"workflowId")
              Parser
  (SignalExternalWorkflowExecutionFailedCause
   -> Integer
   -> Integer
   -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Parser SignalExternalWorkflowExecutionFailedCause
-> Parser
     (Integer
      -> Integer -> SignalExternalWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser SignalExternalWorkflowExecutionFailedCause
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"cause")
              Parser
  (Integer
   -> Integer -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Parser Integer
-> Parser
     (Integer -> SignalExternalWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"initiatedEventId")
              Parser
  (Integer -> SignalExternalWorkflowExecutionFailedEventAttributes)
-> Parser Integer
-> Parser SignalExternalWorkflowExecutionFailedEventAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"decisionTaskCompletedEventId")
      )

instance
  Prelude.Hashable
    SignalExternalWorkflowExecutionFailedEventAttributes

instance
  Prelude.NFData
    SignalExternalWorkflowExecutionFailedEventAttributes