
com.amazonaws.services.simpleworkflow.model.ContinueAsNewWorkflowExecutionDecisionAttributes Maven / Gradle / Ivy
Show all versions of aws-java-sdk-simpleworkflow Show documentation
/*
* Copyright 2010-2016 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;
/**
*
* Provides details of the ContinueAsNewWorkflowExecution
decision.
*
*
* Access Control
*
*
* You can use IAM policies to control this decision's access to Amazon SWF
* resources as follows:
*
*
* - Use a
Resource
element with the domain name to limit the
* action to only specified domains.
* - Use an
Action
element to allow or deny permission to call
* this action.
* - Constrain the following parameters by using a
Condition
* element with the appropriate keys.
*
* -
tag
: Optional.. A tag used to identify the workflow
* execution
* taskList
: String constraint. The key is
* swf:taskList.name
.
* workflowType.version
: String constraint. The key is
* swf:workflowType.version
.
*
*
*
*
* If the caller does not have sufficient permissions to invoke the action, or
* the parameter values fall outside the specified constraints, the action
* fails. The associated event attribute's cause parameter will be set to
* OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows.
*
*/
public class ContinueAsNewWorkflowExecutionDecisionAttributes implements
Serializable, Cloneable {
/**
*
* The input provided to the new workflow execution.
*
*/
private String input;
/**
*
* If set, specifies the total duration for this workflow execution. This
* overrides the defaultExecutionStartToCloseTimeout
specified
* when registering the workflow type.
*
*
* The duration is specified in seconds; an integer greater than or equal to
* 0. The value "NONE" can be used to specify unlimited duration.
*
* An execution start-to-close timeout for this workflow execution
* must be specified either as a default for the workflow type or through
* this field. If neither this field is set nor a default execution
* start-to-close timeout was specified at registration time then a fault
* will be returned.
*/
private String executionStartToCloseTimeout;
private TaskList taskList;
/**
*
* Optional. The task priority that, if set, specifies the priority
* for the decision tasks for this workflow execution. This overrides the
* defaultTaskPriority specified when registering the workflow type. Valid
* values are integers that range from Java's Integer.MIN_VALUE
* (-2147483648) to Integer.MAX_VALUE
(2147483647). Higher
* numbers indicate higher priority.
*
*
* For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer
* Guide.
*
*/
private String taskPriority;
/**
*
* Specifies the maximum duration of decision tasks for the new workflow
* execution. This parameter overrides the
* defaultTaskStartToCloseTimout
specified when registering the
* workflow type using RegisterWorkflowType.
*
*
* The duration is specified in seconds; an integer greater than or equal to
* 0. The value "NONE" can be used to specify unlimited duration.
*
* A task start-to-close timeout for the new 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 task
* start-to-close timeout was specified at registration time then a fault
* will be returned.
*/
private String taskStartToCloseTimeout;
/**
*
* If set, specifies the policy to use for the child workflow executions of
* the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an expired
* timeout. This policy overrides the default child policy specified when
* registering the workflow type using RegisterWorkflowType.
*
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions will
* 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 will be returned.
*/
private String childPolicy;
/**
*
* The list of tags to associate with the new workflow execution. A maximum
* of 5 tags can be specified. You can list workflow executions with a
* specific tag by calling ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a TagFilter.
*
*/
private java.util.List tagList;
private String workflowTypeVersion;
/**
*
* The ARN of an IAM role that authorizes Amazon SWF to invoke AWS Lambda
* functions.
*
* In order for this workflow execution to invoke AWS Lambda
* functions, an appropriate IAM role must be specified either as a default
* for the workflow type or through this field.
*/
private String lambdaRole;
/**
*
* The input provided to the new workflow execution.
*
*
* @param input
* The input provided to the new workflow execution.
*/
public void setInput(String input) {
this.input = input;
}
/**
*
* The input provided to the new workflow execution.
*
*
* @return The input provided to the new workflow execution.
*/
public String getInput() {
return this.input;
}
/**
*
* The input provided to the new workflow execution.
*
*
* @param input
* The input provided to the new workflow execution.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withInput(
String input) {
setInput(input);
return this;
}
/**
*
* If set, specifies the total duration for this workflow execution. This
* overrides the defaultExecutionStartToCloseTimeout
specified
* when registering the workflow type.
*
*
* The duration is specified in seconds; an integer greater than or equal to
* 0. The value "NONE" can be used to specify unlimited duration.
*
* An execution start-to-close timeout for this workflow execution
* must be specified either as a default for the workflow type or through
* this field. If neither this field is set nor a default execution
* start-to-close timeout was specified at registration time then a fault
* will be returned.
*
* @param executionStartToCloseTimeout
* If set, specifies the total duration for this workflow execution.
* This overrides the
* defaultExecutionStartToCloseTimeout
specified when
* registering the workflow type.
*
* The duration is specified in seconds; an integer greater than or
* equal to 0. The value "NONE" can be used to specify unlimited
* duration.
*
* An execution start-to-close timeout for this workflow
* execution must be specified either as a default for the workflow
* type or through this field. If neither this field is set nor a
* default execution start-to-close timeout was specified at
* registration time then a fault will be returned.
*/
public void setExecutionStartToCloseTimeout(
String executionStartToCloseTimeout) {
this.executionStartToCloseTimeout = executionStartToCloseTimeout;
}
/**
*
* If set, specifies the total duration for this workflow execution. This
* overrides the defaultExecutionStartToCloseTimeout
specified
* when registering the workflow type.
*
*
* The duration is specified in seconds; an integer greater than or equal to
* 0. The value "NONE" can be used to specify unlimited duration.
*
* An execution start-to-close timeout for this workflow execution
* must be specified either as a default for the workflow type or through
* this field. If neither this field is set nor a default execution
* start-to-close timeout was specified at registration time then a fault
* will be returned.
*
* @return If set, specifies the total duration for this workflow execution.
* This overrides the
* defaultExecutionStartToCloseTimeout
specified when
* registering the workflow type.
*
* The duration is specified in seconds; an integer greater than or
* equal to 0. The value "NONE" can be used to specify unlimited
* duration.
*
* An execution start-to-close timeout for this workflow
* execution must be specified either as a default for the workflow
* type or through this field. If neither this field is set nor a
* default execution start-to-close timeout was specified at
* registration time then a fault will be returned.
*/
public String getExecutionStartToCloseTimeout() {
return this.executionStartToCloseTimeout;
}
/**
*
* If set, specifies the total duration for this workflow execution. This
* overrides the defaultExecutionStartToCloseTimeout
specified
* when registering the workflow type.
*
*
* The duration is specified in seconds; an integer greater than or equal to
* 0. The value "NONE" can be used to specify unlimited duration.
*
* An execution start-to-close timeout for this workflow execution
* must be specified either as a default for the workflow type or through
* this field. If neither this field is set nor a default execution
* start-to-close timeout was specified at registration time then a fault
* will be returned.
*
* @param executionStartToCloseTimeout
* If set, specifies the total duration for this workflow execution.
* This overrides the
* defaultExecutionStartToCloseTimeout
specified when
* registering the workflow type.
*
* The duration is specified in seconds; an integer greater than or
* equal to 0. The value "NONE" can be used to specify unlimited
* duration.
*
* An execution start-to-close timeout for this workflow
* execution must be specified either as a default for the workflow
* type or through this field. If neither this field is set nor a
* default execution start-to-close timeout was specified at
* registration time then a fault will be returned.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withExecutionStartToCloseTimeout(
String executionStartToCloseTimeout) {
setExecutionStartToCloseTimeout(executionStartToCloseTimeout);
return this;
}
/**
* @param taskList
*/
public void setTaskList(TaskList taskList) {
this.taskList = taskList;
}
/**
* @return
*/
public TaskList getTaskList() {
return this.taskList;
}
/**
* @param taskList
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withTaskList(
TaskList taskList) {
setTaskList(taskList);
return this;
}
/**
*
* Optional. The task priority that, if set, specifies the priority
* for the decision tasks for this workflow execution. This overrides the
* defaultTaskPriority specified when registering the workflow type. Valid
* values are integers that range from Java's Integer.MIN_VALUE
* (-2147483648) to Integer.MAX_VALUE
(2147483647). Higher
* numbers indicate higher priority.
*
*
* For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer
* Guide.
*
*
* @param taskPriority
* Optional. The task priority that, if set, specifies the
* priority for the decision tasks for this workflow execution. This
* overrides the defaultTaskPriority specified when registering the
* workflow type. Valid values are integers that range from Java's
* Integer.MIN_VALUE
(-2147483648) to
* Integer.MAX_VALUE
(2147483647). Higher numbers
* indicate higher priority.
*
* For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow
* Developer Guide
*/
public void setTaskPriority(String taskPriority) {
this.taskPriority = taskPriority;
}
/**
*
* Optional. The task priority that, if set, specifies the priority
* for the decision tasks for this workflow execution. This overrides the
* defaultTaskPriority specified when registering the workflow type. Valid
* values are integers that range from Java's Integer.MIN_VALUE
* (-2147483648) to Integer.MAX_VALUE
(2147483647). Higher
* numbers indicate higher priority.
*
*
* For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer
* Guide.
*
*
* @return Optional. The task priority that, if set, specifies the
* priority for the decision tasks for this workflow execution. This
* overrides the defaultTaskPriority specified when registering the
* workflow type. Valid values are integers that range from Java's
* Integer.MIN_VALUE
(-2147483648) to
* Integer.MAX_VALUE
(2147483647). Higher numbers
* indicate higher priority.
*
* For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow
* Developer Guide
*/
public String getTaskPriority() {
return this.taskPriority;
}
/**
*
* Optional. The task priority that, if set, specifies the priority
* for the decision tasks for this workflow execution. This overrides the
* defaultTaskPriority specified when registering the workflow type. Valid
* values are integers that range from Java's Integer.MIN_VALUE
* (-2147483648) to Integer.MAX_VALUE
(2147483647). Higher
* numbers indicate higher priority.
*
*
* For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer
* Guide.
*
*
* @param taskPriority
* Optional. The task priority that, if set, specifies the
* priority for the decision tasks for this workflow execution. This
* overrides the defaultTaskPriority specified when registering the
* workflow type. Valid values are integers that range from Java's
* Integer.MIN_VALUE
(-2147483648) to
* Integer.MAX_VALUE
(2147483647). Higher numbers
* indicate higher priority.
*
* For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow
* Developer Guide
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withTaskPriority(
String taskPriority) {
setTaskPriority(taskPriority);
return this;
}
/**
*
* Specifies the maximum duration of decision tasks for the new workflow
* execution. This parameter overrides the
* defaultTaskStartToCloseTimout
specified when registering the
* workflow type using RegisterWorkflowType.
*
*
* The duration is specified in seconds; an integer greater than or equal to
* 0. The value "NONE" can be used to specify unlimited duration.
*
* A task start-to-close timeout for the new 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 task
* start-to-close timeout was specified at registration time then a fault
* will be returned.
*
* @param taskStartToCloseTimeout
* Specifies the maximum duration of decision tasks for the new
* workflow execution. This parameter overrides the
* defaultTaskStartToCloseTimout
specified when
* registering the workflow type using
* RegisterWorkflowType.
*
* The duration is specified in seconds; an integer greater than or
* equal to 0. The value "NONE" can be used to specify unlimited
* duration.
*
* A task start-to-close timeout for the new 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 task start-to-close timeout was specified at registration
* time then a fault will be returned.
*/
public void setTaskStartToCloseTimeout(String taskStartToCloseTimeout) {
this.taskStartToCloseTimeout = taskStartToCloseTimeout;
}
/**
*
* Specifies the maximum duration of decision tasks for the new workflow
* execution. This parameter overrides the
* defaultTaskStartToCloseTimout
specified when registering the
* workflow type using RegisterWorkflowType.
*
*
* The duration is specified in seconds; an integer greater than or equal to
* 0. The value "NONE" can be used to specify unlimited duration.
*
* A task start-to-close timeout for the new 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 task
* start-to-close timeout was specified at registration time then a fault
* will be returned.
*
* @return Specifies the maximum duration of decision tasks for the new
* workflow execution. This parameter overrides the
* defaultTaskStartToCloseTimout
specified when
* registering the workflow type using
* RegisterWorkflowType.
*
* The duration is specified in seconds; an integer greater than or
* equal to 0. The value "NONE" can be used to specify unlimited
* duration.
*
* A task start-to-close timeout for the new 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 task start-to-close timeout was specified at
* registration time then a fault will be returned.
*/
public String getTaskStartToCloseTimeout() {
return this.taskStartToCloseTimeout;
}
/**
*
* Specifies the maximum duration of decision tasks for the new workflow
* execution. This parameter overrides the
* defaultTaskStartToCloseTimout
specified when registering the
* workflow type using RegisterWorkflowType.
*
*
* The duration is specified in seconds; an integer greater than or equal to
* 0. The value "NONE" can be used to specify unlimited duration.
*
* A task start-to-close timeout for the new 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 task
* start-to-close timeout was specified at registration time then a fault
* will be returned.
*
* @param taskStartToCloseTimeout
* Specifies the maximum duration of decision tasks for the new
* workflow execution. This parameter overrides the
* defaultTaskStartToCloseTimout
specified when
* registering the workflow type using
* RegisterWorkflowType.
*
* The duration is specified in seconds; an integer greater than or
* equal to 0. The value "NONE" can be used to specify unlimited
* duration.
*
* A task start-to-close timeout for the new 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 task start-to-close timeout was specified at registration
* time then a fault will be returned.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withTaskStartToCloseTimeout(
String taskStartToCloseTimeout) {
setTaskStartToCloseTimeout(taskStartToCloseTimeout);
return this;
}
/**
*
* If set, specifies the policy to use for the child workflow executions of
* the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an expired
* timeout. This policy overrides the default child policy specified when
* registering the workflow type using RegisterWorkflowType.
*
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions will
* 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 will be returned.
*
* @param childPolicy
* If set, specifies the policy to use for the child workflow
* executions of the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an
* expired timeout. This policy overrides the default child policy
* specified when registering the workflow type using
* RegisterWorkflowType.
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions
* will 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 will be
* returned.
* @see ChildPolicy
*/
public void setChildPolicy(String childPolicy) {
this.childPolicy = childPolicy;
}
/**
*
* If set, specifies the policy to use for the child workflow executions of
* the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an expired
* timeout. This policy overrides the default child policy specified when
* registering the workflow type using RegisterWorkflowType.
*
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions will
* 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 will be returned.
*
* @return If set, specifies the policy to use for the child workflow
* executions of the new execution if it is terminated by calling
* the TerminateWorkflowExecution action explicitly or due to
* an expired timeout. This policy overrides the default child
* policy specified when registering the workflow type using
* RegisterWorkflowType.
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions
* will 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 will
* be returned.
* @see ChildPolicy
*/
public String getChildPolicy() {
return this.childPolicy;
}
/**
*
* If set, specifies the policy to use for the child workflow executions of
* the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an expired
* timeout. This policy overrides the default child policy specified when
* registering the workflow type using RegisterWorkflowType.
*
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions will
* 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 will be returned.
*
* @param childPolicy
* If set, specifies the policy to use for the child workflow
* executions of the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an
* expired timeout. This policy overrides the default child policy
* specified when registering the workflow type using
* RegisterWorkflowType.
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions
* will 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 will be
* returned.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see ChildPolicy
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withChildPolicy(
String childPolicy) {
setChildPolicy(childPolicy);
return this;
}
/**
*
* If set, specifies the policy to use for the child workflow executions of
* the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an expired
* timeout. This policy overrides the default child policy specified when
* registering the workflow type using RegisterWorkflowType.
*
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions will
* 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 will be returned.
*
* @param childPolicy
* If set, specifies the policy to use for the child workflow
* executions of the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an
* expired timeout. This policy overrides the default child policy
* specified when registering the workflow type using
* RegisterWorkflowType.
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions
* will 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 will be
* returned.
* @see ChildPolicy
*/
public void setChildPolicy(ChildPolicy childPolicy) {
this.childPolicy = childPolicy.toString();
}
/**
*
* If set, specifies the policy to use for the child workflow executions of
* the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an expired
* timeout. This policy overrides the default child policy specified when
* registering the workflow type using RegisterWorkflowType.
*
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions will
* 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 will be returned.
*
* @param childPolicy
* If set, specifies the policy to use for the child workflow
* executions of the new execution if it is terminated by calling the
* TerminateWorkflowExecution action explicitly or due to an
* expired timeout. This policy overrides the default child policy
* specified when registering the workflow type using
* RegisterWorkflowType.
*
* The supported child policies are:
*
*
* - TERMINATE: the child executions will be terminated.
* - REQUEST_CANCEL: a request to cancel will be 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 will be taken. The child executions
* will 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 will be
* returned.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see ChildPolicy
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withChildPolicy(
ChildPolicy childPolicy) {
setChildPolicy(childPolicy);
return this;
}
/**
*
* The list of tags to associate with the new workflow execution. A maximum
* of 5 tags can be specified. You can list workflow executions with a
* specific tag by calling ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a TagFilter.
*
*
* @return The list of tags to associate with the new workflow execution. A
* maximum of 5 tags can be specified. You can list workflow
* executions with a specific tag by calling
* ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a
* TagFilter.
*/
public java.util.List getTagList() {
return tagList;
}
/**
*
* The list of tags to associate with the new workflow execution. A maximum
* of 5 tags can be specified. You can list workflow executions with a
* specific tag by calling ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a TagFilter.
*
*
* @param tagList
* The list of tags to associate with the new workflow execution. A
* maximum of 5 tags can be specified. You can list workflow
* executions with a specific tag by calling
* ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a
* TagFilter.
*/
public void setTagList(java.util.Collection tagList) {
if (tagList == null) {
this.tagList = null;
return;
}
this.tagList = new java.util.ArrayList(tagList);
}
/**
*
* The list of tags to associate with the new workflow execution. A maximum
* of 5 tags can be specified. You can list workflow executions with a
* specific tag by calling ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a TagFilter.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setTagList(java.util.Collection)} or
* {@link #withTagList(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tagList
* The list of tags to associate with the new workflow execution. A
* maximum of 5 tags can be specified. You can list workflow
* executions with a specific tag by calling
* ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a
* TagFilter.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withTagList(
String... tagList) {
if (this.tagList == null) {
setTagList(new java.util.ArrayList(tagList.length));
}
for (String ele : tagList) {
this.tagList.add(ele);
}
return this;
}
/**
*
* The list of tags to associate with the new workflow execution. A maximum
* of 5 tags can be specified. You can list workflow executions with a
* specific tag by calling ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a TagFilter.
*
*
* @param tagList
* The list of tags to associate with the new workflow execution. A
* maximum of 5 tags can be specified. You can list workflow
* executions with a specific tag by calling
* ListOpenWorkflowExecutions or
* ListClosedWorkflowExecutions and specifying a
* TagFilter.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withTagList(
java.util.Collection tagList) {
setTagList(tagList);
return this;
}
/**
* @param workflowTypeVersion
*/
public void setWorkflowTypeVersion(String workflowTypeVersion) {
this.workflowTypeVersion = workflowTypeVersion;
}
/**
* @return
*/
public String getWorkflowTypeVersion() {
return this.workflowTypeVersion;
}
/**
* @param workflowTypeVersion
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withWorkflowTypeVersion(
String workflowTypeVersion) {
setWorkflowTypeVersion(workflowTypeVersion);
return this;
}
/**
*
* The ARN of an IAM role that authorizes Amazon SWF to invoke AWS Lambda
* functions.
*
* In order for this workflow execution to invoke AWS Lambda
* functions, an appropriate IAM role must be specified either as a default
* for the workflow type or through this field.
*
* @param lambdaRole
* The ARN of an IAM role that authorizes Amazon SWF to invoke AWS
* Lambda functions. In order for this workflow execution
* to invoke AWS Lambda functions, an appropriate IAM role must be
* specified either as a default for the workflow type or through
* this field.
*/
public void setLambdaRole(String lambdaRole) {
this.lambdaRole = lambdaRole;
}
/**
*
* The ARN of an IAM role that authorizes Amazon SWF to invoke AWS Lambda
* functions.
*
* In order for this workflow execution to invoke AWS Lambda
* functions, an appropriate IAM role must be specified either as a default
* for the workflow type or through this field.
*
* @return The ARN of an IAM role that authorizes Amazon SWF to invoke AWS
* Lambda functions. In order for this workflow execution
* to invoke AWS Lambda functions, an appropriate IAM role must be
* specified either as a default for the workflow type or through
* this field.
*/
public String getLambdaRole() {
return this.lambdaRole;
}
/**
*
* The ARN of an IAM role that authorizes Amazon SWF to invoke AWS Lambda
* functions.
*
* In order for this workflow execution to invoke AWS Lambda
* functions, an appropriate IAM role must be specified either as a default
* for the workflow type or through this field.
*
* @param lambdaRole
* The ARN of an IAM role that authorizes Amazon SWF to invoke AWS
* Lambda functions. In order for this workflow execution
* to invoke AWS Lambda functions, an appropriate IAM role must be
* specified either as a default for the workflow type or through
* this field.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ContinueAsNewWorkflowExecutionDecisionAttributes withLambdaRole(
String lambdaRole) {
setLambdaRole(lambdaRole);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getInput() != null)
sb.append("Input: " + getInput() + ",");
if (getExecutionStartToCloseTimeout() != null)
sb.append("ExecutionStartToCloseTimeout: "
+ getExecutionStartToCloseTimeout() + ",");
if (getTaskList() != null)
sb.append("TaskList: " + getTaskList() + ",");
if (getTaskPriority() != null)
sb.append("TaskPriority: " + getTaskPriority() + ",");
if (getTaskStartToCloseTimeout() != null)
sb.append("TaskStartToCloseTimeout: "
+ getTaskStartToCloseTimeout() + ",");
if (getChildPolicy() != null)
sb.append("ChildPolicy: " + getChildPolicy() + ",");
if (getTagList() != null)
sb.append("TagList: " + getTagList() + ",");
if (getWorkflowTypeVersion() != null)
sb.append("WorkflowTypeVersion: " + getWorkflowTypeVersion() + ",");
if (getLambdaRole() != null)
sb.append("LambdaRole: " + getLambdaRole());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ContinueAsNewWorkflowExecutionDecisionAttributes == false)
return false;
ContinueAsNewWorkflowExecutionDecisionAttributes other = (ContinueAsNewWorkflowExecutionDecisionAttributes) obj;
if (other.getInput() == null ^ this.getInput() == null)
return false;
if (other.getInput() != null
&& other.getInput().equals(this.getInput()) == false)
return false;
if (other.getExecutionStartToCloseTimeout() == null
^ this.getExecutionStartToCloseTimeout() == null)
return false;
if (other.getExecutionStartToCloseTimeout() != null
&& other.getExecutionStartToCloseTimeout().equals(
this.getExecutionStartToCloseTimeout()) == 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.getTaskPriority() == null ^ this.getTaskPriority() == null)
return false;
if (other.getTaskPriority() != null
&& other.getTaskPriority().equals(this.getTaskPriority()) == false)
return false;
if (other.getTaskStartToCloseTimeout() == null
^ this.getTaskStartToCloseTimeout() == null)
return false;
if (other.getTaskStartToCloseTimeout() != null
&& other.getTaskStartToCloseTimeout().equals(
this.getTaskStartToCloseTimeout()) == false)
return false;
if (other.getChildPolicy() == null ^ this.getChildPolicy() == null)
return false;
if (other.getChildPolicy() != null
&& other.getChildPolicy().equals(this.getChildPolicy()) == false)
return false;
if (other.getTagList() == null ^ this.getTagList() == null)
return false;
if (other.getTagList() != null
&& other.getTagList().equals(this.getTagList()) == false)
return false;
if (other.getWorkflowTypeVersion() == null
^ this.getWorkflowTypeVersion() == null)
return false;
if (other.getWorkflowTypeVersion() != null
&& other.getWorkflowTypeVersion().equals(
this.getWorkflowTypeVersion()) == false)
return false;
if (other.getLambdaRole() == null ^ this.getLambdaRole() == null)
return false;
if (other.getLambdaRole() != null
&& other.getLambdaRole().equals(this.getLambdaRole()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getInput() == null) ? 0 : getInput().hashCode());
hashCode = prime
* hashCode
+ ((getExecutionStartToCloseTimeout() == null) ? 0
: getExecutionStartToCloseTimeout().hashCode());
hashCode = prime * hashCode
+ ((getTaskList() == null) ? 0 : getTaskList().hashCode());
hashCode = prime
* hashCode
+ ((getTaskPriority() == null) ? 0 : getTaskPriority()
.hashCode());
hashCode = prime
* hashCode
+ ((getTaskStartToCloseTimeout() == null) ? 0
: getTaskStartToCloseTimeout().hashCode());
hashCode = prime
* hashCode
+ ((getChildPolicy() == null) ? 0 : getChildPolicy().hashCode());
hashCode = prime * hashCode
+ ((getTagList() == null) ? 0 : getTagList().hashCode());
hashCode = prime
* hashCode
+ ((getWorkflowTypeVersion() == null) ? 0
: getWorkflowTypeVersion().hashCode());
hashCode = prime * hashCode
+ ((getLambdaRole() == null) ? 0 : getLambdaRole().hashCode());
return hashCode;
}
@Override
public ContinueAsNewWorkflowExecutionDecisionAttributes clone() {
try {
return (ContinueAsNewWorkflowExecutionDecisionAttributes) super
.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
}