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

A structure that represents a decision task. Decision tasks are sent to * deciders in order for them to make decisions.

See Also:

AWS * API Reference

*/ class PollForDecisionTaskResult { public: AWS_SWF_API PollForDecisionTaskResult(); AWS_SWF_API PollForDecisionTaskResult(const Aws::AmazonWebServiceResult& result); AWS_SWF_API PollForDecisionTaskResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The opaque string used as a handle on the task. This token is used by workers * to communicate progress and response information back to the system about the * task.

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

The opaque string used as a handle on the task. This token is used by workers * to communicate progress and response information back to the system about the * task.

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

The opaque string used as a handle on the task. This token is used by workers * to communicate progress and response information back to the system about the * task.

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

The opaque string used as a handle on the task. This token is used by workers * to communicate progress and response information back to the system about the * task.

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

The opaque string used as a handle on the task. This token is used by workers * to communicate progress and response information back to the system about the * task.

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

The opaque string used as a handle on the task. This token is used by workers * to communicate progress and response information back to the system about the * task.

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

The opaque string used as a handle on the task. This token is used by workers * to communicate progress and response information back to the system about the * task.

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

The ID of the DecisionTaskStarted event recorded in the * history.

*/ inline long long GetStartedEventId() const{ return m_startedEventId; } /** *

The ID of the DecisionTaskStarted event recorded in the * history.

*/ inline void SetStartedEventId(long long value) { m_startedEventId = value; } /** *

The ID of the DecisionTaskStarted event recorded in the * history.

*/ inline PollForDecisionTaskResult& WithStartedEventId(long long value) { SetStartedEventId(value); return *this;} /** *

The workflow execution for which this decision task was created.

*/ inline const WorkflowExecution& GetWorkflowExecution() const{ return m_workflowExecution; } /** *

The workflow execution for which this decision task was created.

*/ inline void SetWorkflowExecution(const WorkflowExecution& value) { m_workflowExecution = value; } /** *

The workflow execution for which this decision task was created.

*/ inline void SetWorkflowExecution(WorkflowExecution&& value) { m_workflowExecution = std::move(value); } /** *

The workflow execution for which this decision task was created.

*/ inline PollForDecisionTaskResult& WithWorkflowExecution(const WorkflowExecution& value) { SetWorkflowExecution(value); return *this;} /** *

The workflow execution for which this decision task was created.

*/ inline PollForDecisionTaskResult& WithWorkflowExecution(WorkflowExecution&& value) { SetWorkflowExecution(std::move(value)); return *this;} /** *

The type of the workflow execution for which this decision task was * created.

*/ inline const WorkflowType& GetWorkflowType() const{ return m_workflowType; } /** *

The type of the workflow execution for which this decision task was * created.

*/ inline void SetWorkflowType(const WorkflowType& value) { m_workflowType = value; } /** *

The type of the workflow execution for which this decision task was * created.

*/ inline void SetWorkflowType(WorkflowType&& value) { m_workflowType = std::move(value); } /** *

The type of the workflow execution for which this decision task was * created.

*/ inline PollForDecisionTaskResult& WithWorkflowType(const WorkflowType& value) { SetWorkflowType(value); return *this;} /** *

The type of the workflow execution for which this decision task was * created.

*/ inline PollForDecisionTaskResult& WithWorkflowType(WorkflowType&& value) { SetWorkflowType(std::move(value)); return *this;} /** *

A paginated list of history events of the workflow execution. The decider * uses this during the processing of the decision task.

*/ inline const Aws::Vector& GetEvents() const{ return m_events; } /** *

A paginated list of history events of the workflow execution. The decider * uses this during the processing of the decision task.

*/ inline void SetEvents(const Aws::Vector& value) { m_events = value; } /** *

A paginated list of history events of the workflow execution. The decider * uses this during the processing of the decision task.

*/ inline void SetEvents(Aws::Vector&& value) { m_events = std::move(value); } /** *

A paginated list of history events of the workflow execution. The decider * uses this during the processing of the decision task.

*/ inline PollForDecisionTaskResult& WithEvents(const Aws::Vector& value) { SetEvents(value); return *this;} /** *

A paginated list of history events of the workflow execution. The decider * uses this during the processing of the decision task.

*/ inline PollForDecisionTaskResult& WithEvents(Aws::Vector&& value) { SetEvents(std::move(value)); return *this;} /** *

A paginated list of history events of the workflow execution. The decider * uses this during the processing of the decision task.

*/ inline PollForDecisionTaskResult& AddEvents(const HistoryEvent& value) { m_events.push_back(value); return *this; } /** *

A paginated list of history events of the workflow execution. The decider * uses this during the processing of the decision task.

*/ inline PollForDecisionTaskResult& AddEvents(HistoryEvent&& value) { m_events.push_back(std::move(value)); return *this; } /** *

If a NextPageToken was returned by a previous call, there are * more results available. To retrieve the next page of results, make the call * again using the returned token in nextPageToken. Keep all other * arguments unchanged.

The configured maximumPageSize * determines how many results can be returned in a single call.

*/ inline const Aws::String& GetNextPageToken() const{ return m_nextPageToken; } /** *

If a NextPageToken was returned by a previous call, there are * more results available. To retrieve the next page of results, make the call * again using the returned token in nextPageToken. Keep all other * arguments unchanged.

The configured maximumPageSize * determines how many results can be returned in a single call.

*/ inline void SetNextPageToken(const Aws::String& value) { m_nextPageToken = value; } /** *

If a NextPageToken was returned by a previous call, there are * more results available. To retrieve the next page of results, make the call * again using the returned token in nextPageToken. Keep all other * arguments unchanged.

The configured maximumPageSize * determines how many results can be returned in a single call.

*/ inline void SetNextPageToken(Aws::String&& value) { m_nextPageToken = std::move(value); } /** *

If a NextPageToken was returned by a previous call, there are * more results available. To retrieve the next page of results, make the call * again using the returned token in nextPageToken. Keep all other * arguments unchanged.

The configured maximumPageSize * determines how many results can be returned in a single call.

*/ inline void SetNextPageToken(const char* value) { m_nextPageToken.assign(value); } /** *

If a NextPageToken was returned by a previous call, there are * more results available. To retrieve the next page of results, make the call * again using the returned token in nextPageToken. Keep all other * arguments unchanged.

The configured maximumPageSize * determines how many results can be returned in a single call.

*/ inline PollForDecisionTaskResult& WithNextPageToken(const Aws::String& value) { SetNextPageToken(value); return *this;} /** *

If a NextPageToken was returned by a previous call, there are * more results available. To retrieve the next page of results, make the call * again using the returned token in nextPageToken. Keep all other * arguments unchanged.

The configured maximumPageSize * determines how many results can be returned in a single call.

*/ inline PollForDecisionTaskResult& WithNextPageToken(Aws::String&& value) { SetNextPageToken(std::move(value)); return *this;} /** *

If a NextPageToken was returned by a previous call, there are * more results available. To retrieve the next page of results, make the call * again using the returned token in nextPageToken. Keep all other * arguments unchanged.

The configured maximumPageSize * determines how many results can be returned in a single call.

*/ inline PollForDecisionTaskResult& WithNextPageToken(const char* value) { SetNextPageToken(value); return *this;} /** *

The ID of the DecisionTaskStarted event of the previous decision task of this * workflow execution that was processed by the decider. This can be used to * determine the events in the history new since the last decision task received by * the decider.

*/ inline long long GetPreviousStartedEventId() const{ return m_previousStartedEventId; } /** *

The ID of the DecisionTaskStarted event of the previous decision task of this * workflow execution that was processed by the decider. This can be used to * determine the events in the history new since the last decision task received by * the decider.

*/ inline void SetPreviousStartedEventId(long long value) { m_previousStartedEventId = value; } /** *

The ID of the DecisionTaskStarted event of the previous decision task of this * workflow execution that was processed by the decider. This can be used to * determine the events in the history new since the last decision task received by * the decider.

*/ inline PollForDecisionTaskResult& WithPreviousStartedEventId(long long value) { SetPreviousStartedEventId(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline PollForDecisionTaskResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline PollForDecisionTaskResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline PollForDecisionTaskResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_taskToken; long long m_startedEventId; WorkflowExecution m_workflowExecution; WorkflowType m_workflowType; Aws::Vector m_events; Aws::String m_nextPageToken; long long m_previousStartedEventId; Aws::String m_requestId; }; } // namespace Model } // namespace SWF } // namespace Aws