/** * 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 SWF { namespace Model { /** */ class TerminateWorkflowExecutionRequest : public SWFRequest { public: AWS_SWF_API TerminateWorkflowExecutionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "TerminateWorkflowExecution"; } AWS_SWF_API Aws::String SerializePayload() const override; AWS_SWF_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The domain of the workflow execution to terminate.

*/ inline const Aws::String& GetDomain() const{ return m_domain; } /** *

The domain of the workflow execution to terminate.

*/ inline bool DomainHasBeenSet() const { return m_domainHasBeenSet; } /** *

The domain of the workflow execution to terminate.

*/ inline void SetDomain(const Aws::String& value) { m_domainHasBeenSet = true; m_domain = value; } /** *

The domain of the workflow execution to terminate.

*/ inline void SetDomain(Aws::String&& value) { m_domainHasBeenSet = true; m_domain = std::move(value); } /** *

The domain of the workflow execution to terminate.

*/ inline void SetDomain(const char* value) { m_domainHasBeenSet = true; m_domain.assign(value); } /** *

The domain of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithDomain(const Aws::String& value) { SetDomain(value); return *this;} /** *

The domain of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithDomain(Aws::String&& value) { SetDomain(std::move(value)); return *this;} /** *

The domain of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithDomain(const char* value) { SetDomain(value); return *this;} /** *

The workflowId of the workflow execution to terminate.

*/ inline const Aws::String& GetWorkflowId() const{ return m_workflowId; } /** *

The workflowId of the workflow execution to terminate.

*/ inline bool WorkflowIdHasBeenSet() const { return m_workflowIdHasBeenSet; } /** *

The workflowId of the workflow execution to terminate.

*/ inline void SetWorkflowId(const Aws::String& value) { m_workflowIdHasBeenSet = true; m_workflowId = value; } /** *

The workflowId of the workflow execution to terminate.

*/ inline void SetWorkflowId(Aws::String&& value) { m_workflowIdHasBeenSet = true; m_workflowId = std::move(value); } /** *

The workflowId of the workflow execution to terminate.

*/ inline void SetWorkflowId(const char* value) { m_workflowIdHasBeenSet = true; m_workflowId.assign(value); } /** *

The workflowId of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithWorkflowId(const Aws::String& value) { SetWorkflowId(value); return *this;} /** *

The workflowId of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithWorkflowId(Aws::String&& value) { SetWorkflowId(std::move(value)); return *this;} /** *

The workflowId of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithWorkflowId(const char* value) { SetWorkflowId(value); return *this;} /** *

The runId of the workflow execution to terminate.

*/ inline const Aws::String& GetRunId() const{ return m_runId; } /** *

The runId of the workflow execution to terminate.

*/ inline bool RunIdHasBeenSet() const { return m_runIdHasBeenSet; } /** *

The runId of the workflow execution to terminate.

*/ inline void SetRunId(const Aws::String& value) { m_runIdHasBeenSet = true; m_runId = value; } /** *

The runId of the workflow execution to terminate.

*/ inline void SetRunId(Aws::String&& value) { m_runIdHasBeenSet = true; m_runId = std::move(value); } /** *

The runId of the workflow execution to terminate.

*/ inline void SetRunId(const char* value) { m_runIdHasBeenSet = true; m_runId.assign(value); } /** *

The runId of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithRunId(const Aws::String& value) { SetRunId(value); return *this;} /** *

The runId of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithRunId(Aws::String&& value) { SetRunId(std::move(value)); return *this;} /** *

The runId of the workflow execution to terminate.

*/ inline TerminateWorkflowExecutionRequest& WithRunId(const char* value) { SetRunId(value); return *this;} /** *

A descriptive reason for terminating the workflow execution.

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

A descriptive reason for terminating the workflow execution.

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

A descriptive reason for terminating the workflow execution.

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

A descriptive reason for terminating the workflow execution.

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

A descriptive reason for terminating the workflow execution.

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

A descriptive reason for terminating the workflow execution.

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

A descriptive reason for terminating the workflow execution.

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

A descriptive reason for terminating the workflow execution.

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

Details for terminating the workflow execution.

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

Details for terminating the workflow execution.

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

Details for terminating the workflow execution.

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

Details for terminating the workflow execution.

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

Details for terminating the workflow execution.

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

Details for terminating the workflow execution.

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

Details for terminating the workflow execution.

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

Details for terminating the workflow execution.

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

If set, specifies the policy to use for the child workflow executions of the * workflow execution being terminated. This policy overrides the child policy * specified for the workflow execution at registration time or when starting the * 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.

A child policy for this workflow execution must * be specified either as a default for the workflow type or through this * parameter. If neither this parameter is set nor a default child policy was * specified at registration time then a fault is returned.

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

If set, specifies the policy to use for the child workflow executions of the * workflow execution being terminated. This policy overrides the child policy * specified for the workflow execution at registration time or when starting the * 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.

A child policy for this workflow execution must * be specified either as a default for the workflow type or through this * parameter. If neither this parameter is set nor a default child policy was * specified at registration time then a fault is returned.

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

If set, specifies the policy to use for the child workflow executions of the * workflow execution being terminated. This policy overrides the child policy * specified for the workflow execution at registration time or when starting the * 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.

A child policy for this workflow execution must * be specified either as a default for the workflow type or through this * parameter. If neither this parameter is set nor a default child policy was * specified at registration time then a fault is returned.

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

If set, specifies the policy to use for the child workflow executions of the * workflow execution being terminated. This policy overrides the child policy * specified for the workflow execution at registration time or when starting the * 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.

A child policy for this workflow execution must * be specified either as a default for the workflow type or through this * parameter. If neither this parameter is set nor a default child policy was * specified at registration time then a fault is returned.

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

If set, specifies the policy to use for the child workflow executions of the * workflow execution being terminated. This policy overrides the child policy * specified for the workflow execution at registration time or when starting the * 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.

A child policy for this workflow execution must * be specified either as a default for the workflow type or through this * parameter. If neither this parameter is set nor a default child policy was * specified at registration time then a fault is returned.

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

If set, specifies the policy to use for the child workflow executions of the * workflow execution being terminated. This policy overrides the child policy * specified for the workflow execution at registration time or when starting the * 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.

A child policy for this workflow execution must * be specified either as a default for the workflow type or through this * parameter. If neither this parameter is set nor a default child policy was * specified at registration time then a fault is returned.

*/ inline TerminateWorkflowExecutionRequest& WithChildPolicy(ChildPolicy&& value) { SetChildPolicy(std::move(value)); return *this;} private: Aws::String m_domain; bool m_domainHasBeenSet = false; Aws::String m_workflowId; bool m_workflowIdHasBeenSet = false; Aws::String m_runId; bool m_runIdHasBeenSet = false; Aws::String m_reason; bool m_reasonHasBeenSet = false; Aws::String m_details; bool m_detailsHasBeenSet = false; ChildPolicy m_childPolicy; bool m_childPolicyHasBeenSet = false; }; } // namespace Model } // namespace SWF } // namespace Aws