All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.swf.model.WorkflowExecutionStartedEventAttributes Maven / Gradle / Ivy

/*
 * Copyright 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 software.amazon.awssdk.services.swf.model;

import java.beans.Transient;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Provides details of WorkflowExecutionStarted event. *

*/ @Generated("software.amazon.awssdk:codegen") public final class WorkflowExecutionStartedEventAttributes implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField INPUT_FIELD = SdkField. builder(MarshallingType.STRING).memberName("input") .getter(getter(WorkflowExecutionStartedEventAttributes::input)).setter(setter(Builder::input)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("input").build()).build(); private static final SdkField EXECUTION_START_TO_CLOSE_TIMEOUT_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("executionStartToCloseTimeout") .getter(getter(WorkflowExecutionStartedEventAttributes::executionStartToCloseTimeout)) .setter(setter(Builder::executionStartToCloseTimeout)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("executionStartToCloseTimeout") .build()).build(); private static final SdkField TASK_START_TO_CLOSE_TIMEOUT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("taskStartToCloseTimeout") .getter(getter(WorkflowExecutionStartedEventAttributes::taskStartToCloseTimeout)) .setter(setter(Builder::taskStartToCloseTimeout)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskStartToCloseTimeout").build()) .build(); private static final SdkField CHILD_POLICY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("childPolicy").getter(getter(WorkflowExecutionStartedEventAttributes::childPolicyAsString)) .setter(setter(Builder::childPolicy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("childPolicy").build()).build(); private static final SdkField TASK_LIST_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("taskList").getter(getter(WorkflowExecutionStartedEventAttributes::taskList)) .setter(setter(Builder::taskList)).constructor(TaskList::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskList").build()).build(); private static final SdkField TASK_PRIORITY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("taskPriority").getter(getter(WorkflowExecutionStartedEventAttributes::taskPriority)) .setter(setter(Builder::taskPriority)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("taskPriority").build()).build(); private static final SdkField WORKFLOW_TYPE_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("workflowType").getter(getter(WorkflowExecutionStartedEventAttributes::workflowType)) .setter(setter(Builder::workflowType)).constructor(WorkflowType::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("workflowType").build()).build(); private static final SdkField> TAG_LIST_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("tagList") .getter(getter(WorkflowExecutionStartedEventAttributes::tagList)) .setter(setter(Builder::tagList)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tagList").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CONTINUED_EXECUTION_RUN_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("continuedExecutionRunId") .getter(getter(WorkflowExecutionStartedEventAttributes::continuedExecutionRunId)) .setter(setter(Builder::continuedExecutionRunId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("continuedExecutionRunId").build()) .build(); private static final SdkField PARENT_WORKFLOW_EXECUTION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("parentWorkflowExecution") .getter(getter(WorkflowExecutionStartedEventAttributes::parentWorkflowExecution)) .setter(setter(Builder::parentWorkflowExecution)).constructor(WorkflowExecution::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parentWorkflowExecution").build()) .build(); private static final SdkField PARENT_INITIATED_EVENT_ID_FIELD = SdkField. builder(MarshallingType.LONG) .memberName("parentInitiatedEventId").getter(getter(WorkflowExecutionStartedEventAttributes::parentInitiatedEventId)) .setter(setter(Builder::parentInitiatedEventId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parentInitiatedEventId").build()) .build(); private static final SdkField LAMBDA_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("lambdaRole").getter(getter(WorkflowExecutionStartedEventAttributes::lambdaRole)) .setter(setter(Builder::lambdaRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lambdaRole").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(INPUT_FIELD, EXECUTION_START_TO_CLOSE_TIMEOUT_FIELD, TASK_START_TO_CLOSE_TIMEOUT_FIELD, CHILD_POLICY_FIELD, TASK_LIST_FIELD, TASK_PRIORITY_FIELD, WORKFLOW_TYPE_FIELD, TAG_LIST_FIELD, CONTINUED_EXECUTION_RUN_ID_FIELD, PARENT_WORKFLOW_EXECUTION_FIELD, PARENT_INITIATED_EVENT_ID_FIELD, LAMBDA_ROLE_FIELD)); private static final long serialVersionUID = 1L; private final String input; private final String executionStartToCloseTimeout; private final String taskStartToCloseTimeout; private final String childPolicy; private final TaskList taskList; private final String taskPriority; private final WorkflowType workflowType; private final List tagList; private final String continuedExecutionRunId; private final WorkflowExecution parentWorkflowExecution; private final Long parentInitiatedEventId; private final String lambdaRole; private WorkflowExecutionStartedEventAttributes(BuilderImpl builder) { this.input = builder.input; this.executionStartToCloseTimeout = builder.executionStartToCloseTimeout; this.taskStartToCloseTimeout = builder.taskStartToCloseTimeout; this.childPolicy = builder.childPolicy; this.taskList = builder.taskList; this.taskPriority = builder.taskPriority; this.workflowType = builder.workflowType; this.tagList = builder.tagList; this.continuedExecutionRunId = builder.continuedExecutionRunId; this.parentWorkflowExecution = builder.parentWorkflowExecution; this.parentInitiatedEventId = builder.parentInitiatedEventId; this.lambdaRole = builder.lambdaRole; } /** *

* The input provided to the workflow execution. *

* * @return The input provided to the workflow execution. */ public final String input() { return input; } /** *

* The maximum duration for this workflow execution. *

*

* The duration is specified in seconds, an integer greater than or equal to 0. You can use * NONE to specify unlimited duration. *

* * @return The maximum duration for this workflow execution.

*

* The duration is specified in seconds, an integer greater than or equal to 0. You can use * NONE to specify unlimited duration. */ public final String executionStartToCloseTimeout() { return executionStartToCloseTimeout; } /** *

* The maximum duration of decision tasks for this workflow type. *

*

* The duration is specified in seconds, an integer greater than or equal to 0. You can use * NONE to specify unlimited duration. *

* * @return The maximum duration of decision tasks for this workflow type.

*

* The duration is specified in seconds, an integer greater than or equal to 0. You can use * NONE to specify unlimited duration. */ public final String taskStartToCloseTimeout() { return taskStartToCloseTimeout; } /** *

* The policy to use for the child workflow executions if this workflow execution is terminated, by calling the * TerminateWorkflowExecution action explicitly or due to an expired timeout. *

*

* 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. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #childPolicy} will * return {@link ChildPolicy#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #childPolicyAsString}. *

* * @return The policy to use for the child workflow executions if this workflow execution is terminated, by calling * the TerminateWorkflowExecution action explicitly or due to an expired timeout.

*

* 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. *

    *
  • * @see ChildPolicy */ public final ChildPolicy childPolicy() { return ChildPolicy.fromValue(childPolicy); } /** *

    * The policy to use for the child workflow executions if this workflow execution is terminated, by calling the * TerminateWorkflowExecution action explicitly or due to an expired timeout. *

    *

    * 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. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #childPolicy} will * return {@link ChildPolicy#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #childPolicyAsString}. *

    * * @return The policy to use for the child workflow executions if this workflow execution is terminated, by calling * the TerminateWorkflowExecution action explicitly or due to an expired timeout.

    *

    * 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. *

      *
    • * @see ChildPolicy */ public final String childPolicyAsString() { return childPolicy; } /** *

      * The name of the task list for scheduling the decision tasks for this workflow execution. *

      * * @return The name of the task list for scheduling the decision tasks for this workflow execution. */ public final TaskList taskList() { return taskList; } /** *

      * The priority of the decision tasks in the workflow execution. *

      * * @return The priority of the decision tasks in the workflow execution. */ public final String taskPriority() { return taskPriority; } /** *

      * The workflow type of this execution. *

      * * @return The workflow type of this execution. */ public final WorkflowType workflowType() { return workflowType; } /** * For responses, this returns true if the service returned a value for the TagList property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasTagList() { return tagList != null && !(tagList instanceof SdkAutoConstructList); } /** *

      * The list of tags associated with this workflow execution. An execution can have up to 5 tags. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTagList} method. *

      * * @return The list of tags associated with this workflow execution. An execution can have up to 5 tags. */ public final List tagList() { return tagList; } /** *

      * If this workflow execution was started due to a ContinueAsNewWorkflowExecution decision, then it * contains the runId of the previous workflow execution that was closed and continued as this * execution. *

      * * @return If this workflow execution was started due to a ContinueAsNewWorkflowExecution decision, * then it contains the runId of the previous workflow execution that was closed and continued * as this execution. */ public final String continuedExecutionRunId() { return continuedExecutionRunId; } /** *

      * The source workflow execution that started this workflow execution. The member isn't set if the workflow * execution was not started by a workflow. *

      * * @return The source workflow execution that started this workflow execution. The member isn't set if the workflow * execution was not started by a workflow. */ public final WorkflowExecution parentWorkflowExecution() { return parentWorkflowExecution; } /** *

      * The ID of the StartChildWorkflowExecutionInitiated event corresponding to the * StartChildWorkflowExecution Decision to start this workflow execution. The source event with * this ID can be found in the history of the source workflow execution. This information can be useful for * diagnosing problems by tracing back the chain of events leading up to this event. *

      * * @return The ID of the StartChildWorkflowExecutionInitiated event corresponding to the * StartChildWorkflowExecution Decision to start this workflow execution. The source * event with this ID can be found in the history of the source workflow execution. This information can be * useful for diagnosing problems by tracing back the chain of events leading up to this event. */ public final Long parentInitiatedEventId() { return parentInitiatedEventId; } /** *

      * The IAM role attached to the workflow execution. *

      * * @return The IAM role attached to the workflow execution. */ public final String lambdaRole() { return lambdaRole; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(input()); hashCode = 31 * hashCode + Objects.hashCode(executionStartToCloseTimeout()); hashCode = 31 * hashCode + Objects.hashCode(taskStartToCloseTimeout()); hashCode = 31 * hashCode + Objects.hashCode(childPolicyAsString()); hashCode = 31 * hashCode + Objects.hashCode(taskList()); hashCode = 31 * hashCode + Objects.hashCode(taskPriority()); hashCode = 31 * hashCode + Objects.hashCode(workflowType()); hashCode = 31 * hashCode + Objects.hashCode(hasTagList() ? tagList() : null); hashCode = 31 * hashCode + Objects.hashCode(continuedExecutionRunId()); hashCode = 31 * hashCode + Objects.hashCode(parentWorkflowExecution()); hashCode = 31 * hashCode + Objects.hashCode(parentInitiatedEventId()); hashCode = 31 * hashCode + Objects.hashCode(lambdaRole()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof WorkflowExecutionStartedEventAttributes)) { return false; } WorkflowExecutionStartedEventAttributes other = (WorkflowExecutionStartedEventAttributes) obj; return Objects.equals(input(), other.input()) && Objects.equals(executionStartToCloseTimeout(), other.executionStartToCloseTimeout()) && Objects.equals(taskStartToCloseTimeout(), other.taskStartToCloseTimeout()) && Objects.equals(childPolicyAsString(), other.childPolicyAsString()) && Objects.equals(taskList(), other.taskList()) && Objects.equals(taskPriority(), other.taskPriority()) && Objects.equals(workflowType(), other.workflowType()) && hasTagList() == other.hasTagList() && Objects.equals(tagList(), other.tagList()) && Objects.equals(continuedExecutionRunId(), other.continuedExecutionRunId()) && Objects.equals(parentWorkflowExecution(), other.parentWorkflowExecution()) && Objects.equals(parentInitiatedEventId(), other.parentInitiatedEventId()) && Objects.equals(lambdaRole(), other.lambdaRole()); } /** * 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. */ @Override public final String toString() { return ToString.builder("WorkflowExecutionStartedEventAttributes").add("Input", input()) .add("ExecutionStartToCloseTimeout", executionStartToCloseTimeout()) .add("TaskStartToCloseTimeout", taskStartToCloseTimeout()).add("ChildPolicy", childPolicyAsString()) .add("TaskList", taskList()).add("TaskPriority", taskPriority()).add("WorkflowType", workflowType()) .add("TagList", hasTagList() ? tagList() : null).add("ContinuedExecutionRunId", continuedExecutionRunId()) .add("ParentWorkflowExecution", parentWorkflowExecution()) .add("ParentInitiatedEventId", parentInitiatedEventId()).add("LambdaRole", lambdaRole()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "input": return Optional.ofNullable(clazz.cast(input())); case "executionStartToCloseTimeout": return Optional.ofNullable(clazz.cast(executionStartToCloseTimeout())); case "taskStartToCloseTimeout": return Optional.ofNullable(clazz.cast(taskStartToCloseTimeout())); case "childPolicy": return Optional.ofNullable(clazz.cast(childPolicyAsString())); case "taskList": return Optional.ofNullable(clazz.cast(taskList())); case "taskPriority": return Optional.ofNullable(clazz.cast(taskPriority())); case "workflowType": return Optional.ofNullable(clazz.cast(workflowType())); case "tagList": return Optional.ofNullable(clazz.cast(tagList())); case "continuedExecutionRunId": return Optional.ofNullable(clazz.cast(continuedExecutionRunId())); case "parentWorkflowExecution": return Optional.ofNullable(clazz.cast(parentWorkflowExecution())); case "parentInitiatedEventId": return Optional.ofNullable(clazz.cast(parentInitiatedEventId())); case "lambdaRole": return Optional.ofNullable(clazz.cast(lambdaRole())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((WorkflowExecutionStartedEventAttributes) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The input provided to the workflow execution. *

      * * @param input * The input provided to the workflow execution. * @return Returns a reference to this object so that method calls can be chained together. */ Builder input(String input); /** *

      * The maximum duration for this workflow execution. *

      *

      * The duration is specified in seconds, an integer greater than or equal to 0. You can use * NONE to specify unlimited duration. *

      * * @param executionStartToCloseTimeout * The maximum duration for this workflow execution.

      *

      * The duration is specified in seconds, an integer greater than or equal to 0. You can use * NONE to specify unlimited duration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder executionStartToCloseTimeout(String executionStartToCloseTimeout); /** *

      * The maximum duration of decision tasks for this workflow type. *

      *

      * The duration is specified in seconds, an integer greater than or equal to 0. You can use * NONE to specify unlimited duration. *

      * * @param taskStartToCloseTimeout * The maximum duration of decision tasks for this workflow type.

      *

      * The duration is specified in seconds, an integer greater than or equal to 0. You can use * NONE to specify unlimited duration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder taskStartToCloseTimeout(String taskStartToCloseTimeout); /** *

      * The policy to use for the child workflow executions if this workflow execution is terminated, by calling the * TerminateWorkflowExecution action explicitly or due to an expired timeout. *

      *

      * 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. *

        *
      • *
      * * @param childPolicy * The policy to use for the child workflow executions if this workflow execution is terminated, by * calling the TerminateWorkflowExecution action explicitly or due to an expired timeout.

      *

      * 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. *

        *
      • * @see ChildPolicy * @return Returns a reference to this object so that method calls can be chained together. * @see ChildPolicy */ Builder childPolicy(String childPolicy); /** *

        * The policy to use for the child workflow executions if this workflow execution is terminated, by calling the * TerminateWorkflowExecution action explicitly or due to an expired timeout. *

        *

        * 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. *

          *
        • *
        * * @param childPolicy * The policy to use for the child workflow executions if this workflow execution is terminated, by * calling the TerminateWorkflowExecution action explicitly or due to an expired timeout.

        *

        * 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. *

          *
        • * @see ChildPolicy * @return Returns a reference to this object so that method calls can be chained together. * @see ChildPolicy */ Builder childPolicy(ChildPolicy childPolicy); /** *

          * The name of the task list for scheduling the decision tasks for this workflow execution. *

          * * @param taskList * The name of the task list for scheduling the decision tasks for this workflow execution. * @return Returns a reference to this object so that method calls can be chained together. */ Builder taskList(TaskList taskList); /** *

          * The name of the task list for scheduling the decision tasks for this workflow execution. *

          * This is a convenience that creates an instance of the {@link TaskList.Builder} avoiding the need to create * one manually via {@link TaskList#builder()}. * * When the {@link Consumer} completes, {@link TaskList.Builder#build()} is called immediately and its result is * passed to {@link #taskList(TaskList)}. * * @param taskList * a consumer that will call methods on {@link TaskList.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #taskList(TaskList) */ default Builder taskList(Consumer taskList) { return taskList(TaskList.builder().applyMutation(taskList).build()); } /** *

          * The priority of the decision tasks in the workflow execution. *

          * * @param taskPriority * The priority of the decision tasks in the workflow execution. * @return Returns a reference to this object so that method calls can be chained together. */ Builder taskPriority(String taskPriority); /** *

          * The workflow type of this execution. *

          * * @param workflowType * The workflow type of this execution. * @return Returns a reference to this object so that method calls can be chained together. */ Builder workflowType(WorkflowType workflowType); /** *

          * The workflow type of this execution. *

          * This is a convenience that creates an instance of the {@link WorkflowType.Builder} avoiding the need to * create one manually via {@link WorkflowType#builder()}. * * When the {@link Consumer} completes, {@link WorkflowType.Builder#build()} is called immediately and its * result is passed to {@link #workflowType(WorkflowType)}. * * @param workflowType * a consumer that will call methods on {@link WorkflowType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #workflowType(WorkflowType) */ default Builder workflowType(Consumer workflowType) { return workflowType(WorkflowType.builder().applyMutation(workflowType).build()); } /** *

          * The list of tags associated with this workflow execution. An execution can have up to 5 tags. *

          * * @param tagList * The list of tags associated with this workflow execution. An execution can have up to 5 tags. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tagList(Collection tagList); /** *

          * The list of tags associated with this workflow execution. An execution can have up to 5 tags. *

          * * @param tagList * The list of tags associated with this workflow execution. An execution can have up to 5 tags. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tagList(String... tagList); /** *

          * If this workflow execution was started due to a ContinueAsNewWorkflowExecution decision, then it * contains the runId of the previous workflow execution that was closed and continued as this * execution. *

          * * @param continuedExecutionRunId * If this workflow execution was started due to a ContinueAsNewWorkflowExecution decision, * then it contains the runId of the previous workflow execution that was closed and * continued as this execution. * @return Returns a reference to this object so that method calls can be chained together. */ Builder continuedExecutionRunId(String continuedExecutionRunId); /** *

          * The source workflow execution that started this workflow execution. The member isn't set if the workflow * execution was not started by a workflow. *

          * * @param parentWorkflowExecution * The source workflow execution that started this workflow execution. The member isn't set if the * workflow execution was not started by a workflow. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parentWorkflowExecution(WorkflowExecution parentWorkflowExecution); /** *

          * The source workflow execution that started this workflow execution. The member isn't set if the workflow * execution was not started by a workflow. *

          * This is a convenience that creates an instance of the {@link WorkflowExecution.Builder} avoiding the need to * create one manually via {@link WorkflowExecution#builder()}. * * When the {@link Consumer} completes, {@link WorkflowExecution.Builder#build()} is called immediately and its * result is passed to {@link #parentWorkflowExecution(WorkflowExecution)}. * * @param parentWorkflowExecution * a consumer that will call methods on {@link WorkflowExecution.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #parentWorkflowExecution(WorkflowExecution) */ default Builder parentWorkflowExecution(Consumer parentWorkflowExecution) { return parentWorkflowExecution(WorkflowExecution.builder().applyMutation(parentWorkflowExecution).build()); } /** *

          * The ID of the StartChildWorkflowExecutionInitiated event corresponding to the * StartChildWorkflowExecution Decision to start this workflow execution. The source event * with this ID can be found in the history of the source workflow execution. This information can be useful for * diagnosing problems by tracing back the chain of events leading up to this event. *

          * * @param parentInitiatedEventId * The ID of the StartChildWorkflowExecutionInitiated event corresponding to the * StartChildWorkflowExecution Decision to start this workflow execution. The source * event with this ID can be found in the history of the source workflow execution. This information can * be useful for diagnosing problems by tracing back the chain of events leading up to this event. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parentInitiatedEventId(Long parentInitiatedEventId); /** *

          * The IAM role attached to the workflow execution. *

          * * @param lambdaRole * The IAM role attached to the workflow execution. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lambdaRole(String lambdaRole); } static final class BuilderImpl implements Builder { private String input; private String executionStartToCloseTimeout; private String taskStartToCloseTimeout; private String childPolicy; private TaskList taskList; private String taskPriority; private WorkflowType workflowType; private List tagList = DefaultSdkAutoConstructList.getInstance(); private String continuedExecutionRunId; private WorkflowExecution parentWorkflowExecution; private Long parentInitiatedEventId; private String lambdaRole; private BuilderImpl() { } private BuilderImpl(WorkflowExecutionStartedEventAttributes model) { input(model.input); executionStartToCloseTimeout(model.executionStartToCloseTimeout); taskStartToCloseTimeout(model.taskStartToCloseTimeout); childPolicy(model.childPolicy); taskList(model.taskList); taskPriority(model.taskPriority); workflowType(model.workflowType); tagList(model.tagList); continuedExecutionRunId(model.continuedExecutionRunId); parentWorkflowExecution(model.parentWorkflowExecution); parentInitiatedEventId(model.parentInitiatedEventId); lambdaRole(model.lambdaRole); } public final String getInput() { return input; } public final void setInput(String input) { this.input = input; } @Override @Transient public final Builder input(String input) { this.input = input; return this; } public final String getExecutionStartToCloseTimeout() { return executionStartToCloseTimeout; } public final void setExecutionStartToCloseTimeout(String executionStartToCloseTimeout) { this.executionStartToCloseTimeout = executionStartToCloseTimeout; } @Override @Transient public final Builder executionStartToCloseTimeout(String executionStartToCloseTimeout) { this.executionStartToCloseTimeout = executionStartToCloseTimeout; return this; } public final String getTaskStartToCloseTimeout() { return taskStartToCloseTimeout; } public final void setTaskStartToCloseTimeout(String taskStartToCloseTimeout) { this.taskStartToCloseTimeout = taskStartToCloseTimeout; } @Override @Transient public final Builder taskStartToCloseTimeout(String taskStartToCloseTimeout) { this.taskStartToCloseTimeout = taskStartToCloseTimeout; return this; } public final String getChildPolicy() { return childPolicy; } public final void setChildPolicy(String childPolicy) { this.childPolicy = childPolicy; } @Override @Transient public final Builder childPolicy(String childPolicy) { this.childPolicy = childPolicy; return this; } @Override @Transient public final Builder childPolicy(ChildPolicy childPolicy) { this.childPolicy(childPolicy == null ? null : childPolicy.toString()); return this; } public final TaskList.Builder getTaskList() { return taskList != null ? taskList.toBuilder() : null; } public final void setTaskList(TaskList.BuilderImpl taskList) { this.taskList = taskList != null ? taskList.build() : null; } @Override @Transient public final Builder taskList(TaskList taskList) { this.taskList = taskList; return this; } public final String getTaskPriority() { return taskPriority; } public final void setTaskPriority(String taskPriority) { this.taskPriority = taskPriority; } @Override @Transient public final Builder taskPriority(String taskPriority) { this.taskPriority = taskPriority; return this; } public final WorkflowType.Builder getWorkflowType() { return workflowType != null ? workflowType.toBuilder() : null; } public final void setWorkflowType(WorkflowType.BuilderImpl workflowType) { this.workflowType = workflowType != null ? workflowType.build() : null; } @Override @Transient public final Builder workflowType(WorkflowType workflowType) { this.workflowType = workflowType; return this; } public final Collection getTagList() { if (tagList instanceof SdkAutoConstructList) { return null; } return tagList; } public final void setTagList(Collection tagList) { this.tagList = TagListCopier.copy(tagList); } @Override @Transient public final Builder tagList(Collection tagList) { this.tagList = TagListCopier.copy(tagList); return this; } @Override @Transient @SafeVarargs public final Builder tagList(String... tagList) { tagList(Arrays.asList(tagList)); return this; } public final String getContinuedExecutionRunId() { return continuedExecutionRunId; } public final void setContinuedExecutionRunId(String continuedExecutionRunId) { this.continuedExecutionRunId = continuedExecutionRunId; } @Override @Transient public final Builder continuedExecutionRunId(String continuedExecutionRunId) { this.continuedExecutionRunId = continuedExecutionRunId; return this; } public final WorkflowExecution.Builder getParentWorkflowExecution() { return parentWorkflowExecution != null ? parentWorkflowExecution.toBuilder() : null; } public final void setParentWorkflowExecution(WorkflowExecution.BuilderImpl parentWorkflowExecution) { this.parentWorkflowExecution = parentWorkflowExecution != null ? parentWorkflowExecution.build() : null; } @Override @Transient public final Builder parentWorkflowExecution(WorkflowExecution parentWorkflowExecution) { this.parentWorkflowExecution = parentWorkflowExecution; return this; } public final Long getParentInitiatedEventId() { return parentInitiatedEventId; } public final void setParentInitiatedEventId(Long parentInitiatedEventId) { this.parentInitiatedEventId = parentInitiatedEventId; } @Override @Transient public final Builder parentInitiatedEventId(Long parentInitiatedEventId) { this.parentInitiatedEventId = parentInitiatedEventId; return this; } public final String getLambdaRole() { return lambdaRole; } public final void setLambdaRole(String lambdaRole) { this.lambdaRole = lambdaRole; } @Override @Transient public final Builder lambdaRole(String lambdaRole) { this.lambdaRole = lambdaRole; return this; } @Override public WorkflowExecutionStartedEventAttributes build() { return new WorkflowExecutionStartedEventAttributes(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy