/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SWF { namespace Model { /** *

Provides the details of the WorkflowExecutionTerminated * event.

See Also:

AWS * API Reference

*/ class WorkflowExecutionTerminatedEventAttributes { public: AWS_SWF_API WorkflowExecutionTerminatedEventAttributes(); AWS_SWF_API WorkflowExecutionTerminatedEventAttributes(Aws::Utils::Json::JsonView jsonValue); AWS_SWF_API WorkflowExecutionTerminatedEventAttributes& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SWF_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The reason provided for the termination.

*/ inline const Aws::String& GetReason() const{ return m_reason; } /** *

The reason provided for the termination.

*/ inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } /** *

The reason provided for the termination.

*/ inline void SetReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason = value; } /** *

The reason provided for the termination.

*/ inline void SetReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } /** *

The reason provided for the termination.

*/ inline void SetReason(const char* value) { m_reasonHasBeenSet = true; m_reason.assign(value); } /** *

The reason provided for the termination.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithReason(const Aws::String& value) { SetReason(value); return *this;} /** *

The reason provided for the termination.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithReason(Aws::String&& value) { SetReason(std::move(value)); return *this;} /** *

The reason provided for the termination.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithReason(const char* value) { SetReason(value); return *this;} /** *

The details provided for the termination.

*/ inline const Aws::String& GetDetails() const{ return m_details; } /** *

The details provided for the termination.

*/ inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; } /** *

The details provided for the termination.

*/ inline void SetDetails(const Aws::String& value) { m_detailsHasBeenSet = true; m_details = value; } /** *

The details provided for the termination.

*/ inline void SetDetails(Aws::String&& value) { m_detailsHasBeenSet = true; m_details = std::move(value); } /** *

The details provided for the termination.

*/ inline void SetDetails(const char* value) { m_detailsHasBeenSet = true; m_details.assign(value); } /** *

The details provided for the termination.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithDetails(const Aws::String& value) { SetDetails(value); return *this;} /** *

The details provided for the termination.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithDetails(Aws::String&& value) { SetDetails(std::move(value)); return *this;} /** *

The details provided for the termination.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithDetails(const char* value) { SetDetails(value); return *this;} /** *

The policy used for the child workflow executions of this workflow * execution.

The supported child policies are:

  • * TERMINATE – The child executions are terminated.

  • * REQUEST_CANCEL – A request to cancel is attempted for each child * execution by recording a WorkflowExecutionCancelRequested event in * its history. It is up to the decider to take appropriate actions when it * receives an execution history with this event.

  • * ABANDON – No action is taken. The child executions continue to * run.

*/ inline const ChildPolicy& GetChildPolicy() const{ return m_childPolicy; } /** *

The policy used for the child workflow executions of this workflow * execution.

The supported child policies are:

  • * TERMINATE – The child executions are terminated.

  • * REQUEST_CANCEL – A request to cancel is attempted for each child * execution by recording a WorkflowExecutionCancelRequested event in * its history. It is up to the decider to take appropriate actions when it * receives an execution history with this event.

  • * ABANDON – No action is taken. The child executions continue to * run.

*/ inline bool ChildPolicyHasBeenSet() const { return m_childPolicyHasBeenSet; } /** *

The policy used for the child workflow executions of this workflow * execution.

The supported child policies are:

  • * TERMINATE – The child executions are terminated.

  • * REQUEST_CANCEL – A request to cancel is attempted for each child * execution by recording a WorkflowExecutionCancelRequested event in * its history. It is up to the decider to take appropriate actions when it * receives an execution history with this event.

  • * ABANDON – No action is taken. The child executions continue to * run.

*/ inline void SetChildPolicy(const ChildPolicy& value) { m_childPolicyHasBeenSet = true; m_childPolicy = value; } /** *

The policy used for the child workflow executions of this workflow * execution.

The supported child policies are:

  • * TERMINATE – The child executions are terminated.

  • * REQUEST_CANCEL – A request to cancel is attempted for each child * execution by recording a WorkflowExecutionCancelRequested event in * its history. It is up to the decider to take appropriate actions when it * receives an execution history with this event.

  • * ABANDON – No action is taken. The child executions continue to * run.

*/ inline void SetChildPolicy(ChildPolicy&& value) { m_childPolicyHasBeenSet = true; m_childPolicy = std::move(value); } /** *

The policy used for the child workflow executions of this workflow * execution.

The supported child policies are:

  • * TERMINATE – The child executions are terminated.

  • * REQUEST_CANCEL – A request to cancel is attempted for each child * execution by recording a WorkflowExecutionCancelRequested event in * its history. It is up to the decider to take appropriate actions when it * receives an execution history with this event.

  • * ABANDON – No action is taken. The child executions continue to * run.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithChildPolicy(const ChildPolicy& value) { SetChildPolicy(value); return *this;} /** *

The policy used for the child workflow executions of this workflow * execution.

The supported child policies are:

  • * TERMINATE – The child executions are terminated.

  • * REQUEST_CANCEL – A request to cancel is attempted for each child * execution by recording a WorkflowExecutionCancelRequested event in * its history. It is up to the decider to take appropriate actions when it * receives an execution history with this event.

  • * ABANDON – No action is taken. The child executions continue to * run.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithChildPolicy(ChildPolicy&& value) { SetChildPolicy(std::move(value)); return *this;} /** *

If set, indicates that the workflow execution was automatically terminated, * and specifies the cause. This happens if the parent workflow execution times out * or is terminated and the child policy is set to terminate child executions.

*/ inline const WorkflowExecutionTerminatedCause& GetCause() const{ return m_cause; } /** *

If set, indicates that the workflow execution was automatically terminated, * and specifies the cause. This happens if the parent workflow execution times out * or is terminated and the child policy is set to terminate child executions.

*/ inline bool CauseHasBeenSet() const { return m_causeHasBeenSet; } /** *

If set, indicates that the workflow execution was automatically terminated, * and specifies the cause. This happens if the parent workflow execution times out * or is terminated and the child policy is set to terminate child executions.

*/ inline void SetCause(const WorkflowExecutionTerminatedCause& value) { m_causeHasBeenSet = true; m_cause = value; } /** *

If set, indicates that the workflow execution was automatically terminated, * and specifies the cause. This happens if the parent workflow execution times out * or is terminated and the child policy is set to terminate child executions.

*/ inline void SetCause(WorkflowExecutionTerminatedCause&& value) { m_causeHasBeenSet = true; m_cause = std::move(value); } /** *

If set, indicates that the workflow execution was automatically terminated, * and specifies the cause. This happens if the parent workflow execution times out * or is terminated and the child policy is set to terminate child executions.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithCause(const WorkflowExecutionTerminatedCause& value) { SetCause(value); return *this;} /** *

If set, indicates that the workflow execution was automatically terminated, * and specifies the cause. This happens if the parent workflow execution times out * or is terminated and the child policy is set to terminate child executions.

*/ inline WorkflowExecutionTerminatedEventAttributes& WithCause(WorkflowExecutionTerminatedCause&& value) { SetCause(std::move(value)); return *this;} private: Aws::String m_reason; bool m_reasonHasBeenSet = false; Aws::String m_details; bool m_detailsHasBeenSet = false; ChildPolicy m_childPolicy; bool m_childPolicyHasBeenSet = false; WorkflowExecutionTerminatedCause m_cause; bool m_causeHasBeenSet = false; }; } // namespace Model } // namespace SWF } // namespace Aws