com.amazonaws.services.simpleworkflow.model.RespondDecisionTaskCompletedRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-simpleworkflow Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.simpleworkflow.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Input data for a TaskCompleted response to a decision task.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RespondDecisionTaskCompletedRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The taskToken
from the DecisionTask.
*
*
*
* taskToken
is generated by the service and should be treated as an opaque value. If the task is
* passed to another process, its taskToken
must also be passed. This enables it to provide its
* progress and respond with results.
*
*
*/
private String taskToken;
/**
*
* The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for
* the Decision structure for details.
*
*/
private java.util.List decisions;
/**
*
* User defined context to add to workflow execution.
*
*/
private String executionContext;
/**
*
* The task list to use for the future decision tasks of this workflow execution. This list overrides the original
* task list you specified while starting the workflow execution.
*
*/
private TaskList taskList;
/**
*
* Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task list
* override is permanent. This parameter makes it possible to temporarily override the task list. If a decision task
* scheduled on the override task list is not started within the timeout, the decision task will time out. Amazon
* SWF will revert the override and schedule a new decision task to the original task list.
*
*
* If a decision task scheduled on the override task list is started within the timeout, but not completed within
* the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision task to the
* original task list.
*
*/
private String taskListScheduleToStartTimeout;
/**
*
* The taskToken
from the DecisionTask.
*
*
*
* taskToken
is generated by the service and should be treated as an opaque value. If the task is
* passed to another process, its taskToken
must also be passed. This enables it to provide its
* progress and respond with results.
*
*
*
* @param taskToken
* The taskToken
from the DecisionTask.
*
* taskToken
is generated by the service and should be treated as an opaque value. If the task
* is passed to another process, its taskToken
must also be passed. This enables it to provide
* its progress and respond with results.
*
*/
public void setTaskToken(String taskToken) {
this.taskToken = taskToken;
}
/**
*
* The taskToken
from the DecisionTask.
*
*
*
* taskToken
is generated by the service and should be treated as an opaque value. If the task is
* passed to another process, its taskToken
must also be passed. This enables it to provide its
* progress and respond with results.
*
*
*
* @return The taskToken
from the DecisionTask.
*
* taskToken
is generated by the service and should be treated as an opaque value. If the task
* is passed to another process, its taskToken
must also be passed. This enables it to provide
* its progress and respond with results.
*
*/
public String getTaskToken() {
return this.taskToken;
}
/**
*
* The taskToken
from the DecisionTask.
*
*
*
* taskToken
is generated by the service and should be treated as an opaque value. If the task is
* passed to another process, its taskToken
must also be passed. This enables it to provide its
* progress and respond with results.
*
*
*
* @param taskToken
* The taskToken
from the DecisionTask.
*
* taskToken
is generated by the service and should be treated as an opaque value. If the task
* is passed to another process, its taskToken
must also be passed. This enables it to provide
* its progress and respond with results.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RespondDecisionTaskCompletedRequest withTaskToken(String taskToken) {
setTaskToken(taskToken);
return this;
}
/**
*
* The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for
* the Decision structure for details.
*
*
* @return The list of decisions (possibly empty) made by the decider while processing this decision task. See the
* docs for the Decision structure for details.
*/
public java.util.List getDecisions() {
return decisions;
}
/**
*
* The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for
* the Decision structure for details.
*
*
* @param decisions
* The list of decisions (possibly empty) made by the decider while processing this decision task. See the
* docs for the Decision structure for details.
*/
public void setDecisions(java.util.Collection decisions) {
if (decisions == null) {
this.decisions = null;
return;
}
this.decisions = new java.util.ArrayList(decisions);
}
/**
*
* The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for
* the Decision structure for details.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDecisions(java.util.Collection)} or {@link #withDecisions(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param decisions
* The list of decisions (possibly empty) made by the decider while processing this decision task. See the
* docs for the Decision structure for details.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RespondDecisionTaskCompletedRequest withDecisions(Decision... decisions) {
if (this.decisions == null) {
setDecisions(new java.util.ArrayList(decisions.length));
}
for (Decision ele : decisions) {
this.decisions.add(ele);
}
return this;
}
/**
*
* The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for
* the Decision structure for details.
*
*
* @param decisions
* The list of decisions (possibly empty) made by the decider while processing this decision task. See the
* docs for the Decision structure for details.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RespondDecisionTaskCompletedRequest withDecisions(java.util.Collection decisions) {
setDecisions(decisions);
return this;
}
/**
*
* User defined context to add to workflow execution.
*
*
* @param executionContext
* User defined context to add to workflow execution.
*/
public void setExecutionContext(String executionContext) {
this.executionContext = executionContext;
}
/**
*
* User defined context to add to workflow execution.
*
*
* @return User defined context to add to workflow execution.
*/
public String getExecutionContext() {
return this.executionContext;
}
/**
*
* User defined context to add to workflow execution.
*
*
* @param executionContext
* User defined context to add to workflow execution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RespondDecisionTaskCompletedRequest withExecutionContext(String executionContext) {
setExecutionContext(executionContext);
return this;
}
/**
*
* The task list to use for the future decision tasks of this workflow execution. This list overrides the original
* task list you specified while starting the workflow execution.
*
*
* @param taskList
* The task list to use for the future decision tasks of this workflow execution. This list overrides the
* original task list you specified while starting the workflow execution.
*/
public void setTaskList(TaskList taskList) {
this.taskList = taskList;
}
/**
*
* The task list to use for the future decision tasks of this workflow execution. This list overrides the original
* task list you specified while starting the workflow execution.
*
*
* @return The task list to use for the future decision tasks of this workflow execution. This list overrides the
* original task list you specified while starting the workflow execution.
*/
public TaskList getTaskList() {
return this.taskList;
}
/**
*
* The task list to use for the future decision tasks of this workflow execution. This list overrides the original
* task list you specified while starting the workflow execution.
*
*
* @param taskList
* The task list to use for the future decision tasks of this workflow execution. This list overrides the
* original task list you specified while starting the workflow execution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RespondDecisionTaskCompletedRequest withTaskList(TaskList taskList) {
setTaskList(taskList);
return this;
}
/**
*
* Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task list
* override is permanent. This parameter makes it possible to temporarily override the task list. If a decision task
* scheduled on the override task list is not started within the timeout, the decision task will time out. Amazon
* SWF will revert the override and schedule a new decision task to the original task list.
*
*
* If a decision task scheduled on the override task list is started within the timeout, but not completed within
* the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision task to the
* original task list.
*
*
* @param taskListScheduleToStartTimeout
* Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task list
* override is permanent. This parameter makes it possible to temporarily override the task list. If a
* decision task scheduled on the override task list is not started within the timeout, the decision task
* will time out. Amazon SWF will revert the override and schedule a new decision task to the original task
* list.
*
* If a decision task scheduled on the override task list is started within the timeout, but not completed
* within the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision
* task to the original task list.
*/
public void setTaskListScheduleToStartTimeout(String taskListScheduleToStartTimeout) {
this.taskListScheduleToStartTimeout = taskListScheduleToStartTimeout;
}
/**
*
* Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task list
* override is permanent. This parameter makes it possible to temporarily override the task list. If a decision task
* scheduled on the override task list is not started within the timeout, the decision task will time out. Amazon
* SWF will revert the override and schedule a new decision task to the original task list.
*
*
* If a decision task scheduled on the override task list is started within the timeout, but not completed within
* the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision task to the
* original task list.
*
*
* @return Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task
* list override is permanent. This parameter makes it possible to temporarily override the task list. If a
* decision task scheduled on the override task list is not started within the timeout, the decision task
* will time out. Amazon SWF will revert the override and schedule a new decision task to the original task
* list.
*
* If a decision task scheduled on the override task list is started within the timeout, but not completed
* within the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision
* task to the original task list.
*/
public String getTaskListScheduleToStartTimeout() {
return this.taskListScheduleToStartTimeout;
}
/**
*
* Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task list
* override is permanent. This parameter makes it possible to temporarily override the task list. If a decision task
* scheduled on the override task list is not started within the timeout, the decision task will time out. Amazon
* SWF will revert the override and schedule a new decision task to the original task list.
*
*
* If a decision task scheduled on the override task list is started within the timeout, but not completed within
* the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision task to the
* original task list.
*
*
* @param taskListScheduleToStartTimeout
* Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task list
* override is permanent. This parameter makes it possible to temporarily override the task list. If a
* decision task scheduled on the override task list is not started within the timeout, the decision task
* will time out. Amazon SWF will revert the override and schedule a new decision task to the original task
* list.
*
* If a decision task scheduled on the override task list is started within the timeout, but not completed
* within the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision
* task to the original task list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RespondDecisionTaskCompletedRequest withTaskListScheduleToStartTimeout(String taskListScheduleToStartTimeout) {
setTaskListScheduleToStartTimeout(taskListScheduleToStartTimeout);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getTaskToken() != null)
sb.append("TaskToken: ").append(getTaskToken()).append(",");
if (getDecisions() != null)
sb.append("Decisions: ").append(getDecisions()).append(",");
if (getExecutionContext() != null)
sb.append("ExecutionContext: ").append(getExecutionContext()).append(",");
if (getTaskList() != null)
sb.append("TaskList: ").append(getTaskList()).append(",");
if (getTaskListScheduleToStartTimeout() != null)
sb.append("TaskListScheduleToStartTimeout: ").append(getTaskListScheduleToStartTimeout());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RespondDecisionTaskCompletedRequest == false)
return false;
RespondDecisionTaskCompletedRequest other = (RespondDecisionTaskCompletedRequest) obj;
if (other.getTaskToken() == null ^ this.getTaskToken() == null)
return false;
if (other.getTaskToken() != null && other.getTaskToken().equals(this.getTaskToken()) == false)
return false;
if (other.getDecisions() == null ^ this.getDecisions() == null)
return false;
if (other.getDecisions() != null && other.getDecisions().equals(this.getDecisions()) == false)
return false;
if (other.getExecutionContext() == null ^ this.getExecutionContext() == null)
return false;
if (other.getExecutionContext() != null && other.getExecutionContext().equals(this.getExecutionContext()) == false)
return false;
if (other.getTaskList() == null ^ this.getTaskList() == null)
return false;
if (other.getTaskList() != null && other.getTaskList().equals(this.getTaskList()) == false)
return false;
if (other.getTaskListScheduleToStartTimeout() == null ^ this.getTaskListScheduleToStartTimeout() == null)
return false;
if (other.getTaskListScheduleToStartTimeout() != null
&& other.getTaskListScheduleToStartTimeout().equals(this.getTaskListScheduleToStartTimeout()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTaskToken() == null) ? 0 : getTaskToken().hashCode());
hashCode = prime * hashCode + ((getDecisions() == null) ? 0 : getDecisions().hashCode());
hashCode = prime * hashCode + ((getExecutionContext() == null) ? 0 : getExecutionContext().hashCode());
hashCode = prime * hashCode + ((getTaskList() == null) ? 0 : getTaskList().hashCode());
hashCode = prime * hashCode + ((getTaskListScheduleToStartTimeout() == null) ? 0 : getTaskListScheduleToStartTimeout().hashCode());
return hashCode;
}
@Override
public RespondDecisionTaskCompletedRequest clone() {
return (RespondDecisionTaskCompletedRequest) super.clone();
}
}