{-# 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-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.SWF.Types.SignalExternalWorkflowExecutionFailedEventAttributes 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 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. control :: Prelude.Maybe Prelude.Text, -- | The @runId@ of the external workflow execution that the signal was being -- delivered to. runId :: Prelude.Maybe Prelude.Text, -- | The @workflowId@ of the external workflow execution that the signal was -- being delivered to. 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 -- -- in the /Amazon SWF Developer Guide/. 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. 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. decisionTaskCompletedEventId :: Prelude.Integer } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'SignalExternalWorkflowExecutionFailedEventAttributes' with all optional fields omitted. -- -- Use or 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 -- -- 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 pWorkflowId_ pCause_ pInitiatedEventId_ pDecisionTaskCompletedEventId_ = SignalExternalWorkflowExecutionFailedEventAttributes' { control = Prelude.Nothing, runId = Prelude.Nothing, workflowId = pWorkflowId_, cause = pCause_, initiatedEventId = pInitiatedEventId_, decisionTaskCompletedEventId = 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 = Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {control} -> control) (\s@SignalExternalWorkflowExecutionFailedEventAttributes' {} a -> s {control = 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 = Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {runId} -> runId) (\s@SignalExternalWorkflowExecutionFailedEventAttributes' {} a -> s {runId = 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 = Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {workflowId} -> workflowId) (\s@SignalExternalWorkflowExecutionFailedEventAttributes' {} a -> s {workflowId = 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 -- -- in the /Amazon SWF Developer Guide/. signalExternalWorkflowExecutionFailedEventAttributes_cause :: Lens.Lens' SignalExternalWorkflowExecutionFailedEventAttributes SignalExternalWorkflowExecutionFailedCause signalExternalWorkflowExecutionFailedEventAttributes_cause = Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {cause} -> cause) (\s@SignalExternalWorkflowExecutionFailedEventAttributes' {} a -> s {cause = 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 = Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {initiatedEventId} -> initiatedEventId) (\s@SignalExternalWorkflowExecutionFailedEventAttributes' {} a -> s {initiatedEventId = 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 = Lens.lens (\SignalExternalWorkflowExecutionFailedEventAttributes' {decisionTaskCompletedEventId} -> decisionTaskCompletedEventId) (\s@SignalExternalWorkflowExecutionFailedEventAttributes' {} a -> s {decisionTaskCompletedEventId = a} :: SignalExternalWorkflowExecutionFailedEventAttributes) instance Data.FromJSON SignalExternalWorkflowExecutionFailedEventAttributes where parseJSON = Data.withObject "SignalExternalWorkflowExecutionFailedEventAttributes" ( \x -> SignalExternalWorkflowExecutionFailedEventAttributes' Prelude.<$> (x Data..:? "control") Prelude.<*> (x Data..:? "runId") Prelude.<*> (x Data..: "workflowId") Prelude.<*> (x Data..: "cause") Prelude.<*> (x Data..: "initiatedEventId") Prelude.<*> (x Data..: "decisionTaskCompletedEventId") ) instance Prelude.Hashable SignalExternalWorkflowExecutionFailedEventAttributes where hashWithSalt _salt SignalExternalWorkflowExecutionFailedEventAttributes' {..} = _salt `Prelude.hashWithSalt` control `Prelude.hashWithSalt` runId `Prelude.hashWithSalt` workflowId `Prelude.hashWithSalt` cause `Prelude.hashWithSalt` initiatedEventId `Prelude.hashWithSalt` decisionTaskCompletedEventId instance Prelude.NFData SignalExternalWorkflowExecutionFailedEventAttributes where rnf SignalExternalWorkflowExecutionFailedEventAttributes' {..} = Prelude.rnf control `Prelude.seq` Prelude.rnf runId `Prelude.seq` Prelude.rnf workflowId `Prelude.seq` Prelude.rnf cause `Prelude.seq` Prelude.rnf initiatedEventId `Prelude.seq` Prelude.rnf decisionTaskCompletedEventId