/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace SFN { namespace Model { /** */ class SendTaskFailureRequest : public SFNRequest { public: AWS_SFN_API SendTaskFailureRequest(); // 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 "SendTaskFailure"; } AWS_SFN_API Aws::String SerializePayload() const override; AWS_SFN_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The token that represents this task. Task tokens are generated by Step * Functions when tasks are assigned to a worker, or in the context * object when a workflow enters a task state. See * GetActivityTaskOutput$taskToken.

*/ inline const Aws::String& GetTaskToken() const{ return m_taskToken; } /** *

The token that represents this task. Task tokens are generated by Step * Functions when tasks are assigned to a worker, or in the context * object when a workflow enters a task state. See * GetActivityTaskOutput$taskToken.

*/ inline bool TaskTokenHasBeenSet() const { return m_taskTokenHasBeenSet; } /** *

The token that represents this task. Task tokens are generated by Step * Functions when tasks are assigned to a worker, or in the context * object when a workflow enters a task state. See * GetActivityTaskOutput$taskToken.

*/ inline void SetTaskToken(const Aws::String& value) { m_taskTokenHasBeenSet = true; m_taskToken = value; } /** *

The token that represents this task. Task tokens are generated by Step * Functions when tasks are assigned to a worker, or in the context * object when a workflow enters a task state. See * GetActivityTaskOutput$taskToken.

*/ inline void SetTaskToken(Aws::String&& value) { m_taskTokenHasBeenSet = true; m_taskToken = std::move(value); } /** *

The token that represents this task. Task tokens are generated by Step * Functions when tasks are assigned to a worker, or in the context * object when a workflow enters a task state. See * GetActivityTaskOutput$taskToken.

*/ inline void SetTaskToken(const char* value) { m_taskTokenHasBeenSet = true; m_taskToken.assign(value); } /** *

The token that represents this task. Task tokens are generated by Step * Functions when tasks are assigned to a worker, or in the context * object when a workflow enters a task state. See * GetActivityTaskOutput$taskToken.

*/ inline SendTaskFailureRequest& WithTaskToken(const Aws::String& value) { SetTaskToken(value); return *this;} /** *

The token that represents this task. Task tokens are generated by Step * Functions when tasks are assigned to a worker, or in the context * object when a workflow enters a task state. See * GetActivityTaskOutput$taskToken.

*/ inline SendTaskFailureRequest& WithTaskToken(Aws::String&& value) { SetTaskToken(std::move(value)); return *this;} /** *

The token that represents this task. Task tokens are generated by Step * Functions when tasks are assigned to a worker, or in the context * object when a workflow enters a task state. See * GetActivityTaskOutput$taskToken.

*/ inline SendTaskFailureRequest& WithTaskToken(const char* value) { SetTaskToken(value); return *this;} /** *

The error code of the failure.

*/ inline const Aws::String& GetError() const{ return m_error; } /** *

The error code of the failure.

*/ inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; } /** *

The error code of the failure.

*/ inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; } /** *

The error code of the failure.

*/ inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); } /** *

The error code of the failure.

*/ inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); } /** *

The error code of the failure.

*/ inline SendTaskFailureRequest& WithError(const Aws::String& value) { SetError(value); return *this;} /** *

The error code of the failure.

*/ inline SendTaskFailureRequest& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;} /** *

The error code of the failure.

*/ inline SendTaskFailureRequest& WithError(const char* value) { SetError(value); return *this;} /** *

A more detailed explanation of the cause of the failure.

*/ inline const Aws::String& GetCause() const{ return m_cause; } /** *

A more detailed explanation of the cause of the failure.

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

A more detailed explanation of the cause of the failure.

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

A more detailed explanation of the cause of the failure.

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

A more detailed explanation of the cause of the failure.

*/ inline void SetCause(const char* value) { m_causeHasBeenSet = true; m_cause.assign(value); } /** *

A more detailed explanation of the cause of the failure.

*/ inline SendTaskFailureRequest& WithCause(const Aws::String& value) { SetCause(value); return *this;} /** *

A more detailed explanation of the cause of the failure.

*/ inline SendTaskFailureRequest& WithCause(Aws::String&& value) { SetCause(std::move(value)); return *this;} /** *

A more detailed explanation of the cause of the failure.

*/ inline SendTaskFailureRequest& WithCause(const char* value) { SetCause(value); return *this;} private: Aws::String m_taskToken; bool m_taskTokenHasBeenSet = false; Aws::String m_error; bool m_errorHasBeenSet = false; Aws::String m_cause; bool m_causeHasBeenSet = false; }; } // namespace Model } // namespace SFN } // namespace Aws