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

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

Go to download

The AWS Java SDK for Amazon SWF module holds the client classes that are used for communicating with Amazon Simple Workflow Service

There is a newer version: 2.30.1
Show newest version
/*
 * 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.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Provides the details of the SignalExternalWorkflowExecution 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. *

    *
  • *
  • *

    * You cannot use an IAM policy to constrain this action's parameters. *

    *
  • *
*

* If the caller doesn't 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 is set to * OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to * Amazon SWF Workflows in the Amazon SWF Developer Guide. *

*/ @Generated("software.amazon.awssdk:codegen") public final class SignalExternalWorkflowExecutionDecisionAttributes implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField WORKFLOW_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("workflowId").getter(getter(SignalExternalWorkflowExecutionDecisionAttributes::workflowId)) .setter(setter(Builder::workflowId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("workflowId").build()).build(); private static final SdkField RUN_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("runId") .getter(getter(SignalExternalWorkflowExecutionDecisionAttributes::runId)).setter(setter(Builder::runId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("runId").build()).build(); private static final SdkField SIGNAL_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("signalName").getter(getter(SignalExternalWorkflowExecutionDecisionAttributes::signalName)) .setter(setter(Builder::signalName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("signalName").build()).build(); private static final SdkField INPUT_FIELD = SdkField. builder(MarshallingType.STRING).memberName("input") .getter(getter(SignalExternalWorkflowExecutionDecisionAttributes::input)).setter(setter(Builder::input)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("input").build()).build(); private static final SdkField CONTROL_FIELD = SdkField. builder(MarshallingType.STRING).memberName("control") .getter(getter(SignalExternalWorkflowExecutionDecisionAttributes::control)).setter(setter(Builder::control)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("control").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(WORKFLOW_ID_FIELD, RUN_ID_FIELD, SIGNAL_NAME_FIELD, INPUT_FIELD, CONTROL_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("workflowId", WORKFLOW_ID_FIELD); put("runId", RUN_ID_FIELD); put("signalName", SIGNAL_NAME_FIELD); put("input", INPUT_FIELD); put("control", CONTROL_FIELD); } }); private static final long serialVersionUID = 1L; private final String workflowId; private final String runId; private final String signalName; private final String input; private final String control; private SignalExternalWorkflowExecutionDecisionAttributes(BuilderImpl builder) { this.workflowId = builder.workflowId; this.runId = builder.runId; this.signalName = builder.signalName; this.input = builder.input; this.control = builder.control; } /** *

* The workflowId of the workflow execution to be signaled. *

* * @return The workflowId of the workflow execution to be signaled. */ public final String workflowId() { return workflowId; } /** *

* The runId of the workflow execution to be signaled. *

* * @return The runId of the workflow execution to be signaled. */ public final String runId() { return runId; } /** *

* The name of the signal.The target workflow execution uses the signal name and input to process the signal. *

* * @return The name of the signal.The target workflow execution uses the signal name and input to process the * signal. */ public final String signalName() { return signalName; } /** *

* The input data to be provided with the signal. The target workflow execution uses the signal name and input data * to process the signal. *

* * @return The input data to be provided with the signal. The target workflow execution uses the signal name and * input data to process the signal. */ public final String input() { return input; } /** *

* The data attached to the event that can be used by the decider in subsequent decision tasks. *

* * @return The data attached to the event that can be used by the decider in subsequent decision tasks. */ public final String control() { return control; } @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(workflowId()); hashCode = 31 * hashCode + Objects.hashCode(runId()); hashCode = 31 * hashCode + Objects.hashCode(signalName()); hashCode = 31 * hashCode + Objects.hashCode(input()); hashCode = 31 * hashCode + Objects.hashCode(control()); 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 SignalExternalWorkflowExecutionDecisionAttributes)) { return false; } SignalExternalWorkflowExecutionDecisionAttributes other = (SignalExternalWorkflowExecutionDecisionAttributes) obj; return Objects.equals(workflowId(), other.workflowId()) && Objects.equals(runId(), other.runId()) && Objects.equals(signalName(), other.signalName()) && Objects.equals(input(), other.input()) && Objects.equals(control(), other.control()); } /** * 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("SignalExternalWorkflowExecutionDecisionAttributes").add("WorkflowId", workflowId()) .add("RunId", runId()).add("SignalName", signalName()).add("Input", input()).add("Control", control()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "workflowId": return Optional.ofNullable(clazz.cast(workflowId())); case "runId": return Optional.ofNullable(clazz.cast(runId())); case "signalName": return Optional.ofNullable(clazz.cast(signalName())); case "input": return Optional.ofNullable(clazz.cast(input())); case "control": return Optional.ofNullable(clazz.cast(control())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((SignalExternalWorkflowExecutionDecisionAttributes) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The workflowId of the workflow execution to be signaled. *

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

* The runId of the workflow execution to be signaled. *

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

* The name of the signal.The target workflow execution uses the signal name and input to process the signal. *

* * @param signalName * The name of the signal.The target workflow execution uses the signal name and input to process the * signal. * @return Returns a reference to this object so that method calls can be chained together. */ Builder signalName(String signalName); /** *

* The input data to be provided with the signal. The target workflow execution uses the signal name and input * data to process the signal. *

* * @param input * The input data to be provided with the signal. The target workflow execution uses the signal name and * input data to process the signal. * @return Returns a reference to this object so that method calls can be chained together. */ Builder input(String input); /** *

* The data attached to the event that can be used by the decider in subsequent decision tasks. *

* * @param control * The data attached to the event that can be used by the decider in subsequent decision tasks. * @return Returns a reference to this object so that method calls can be chained together. */ Builder control(String control); } static final class BuilderImpl implements Builder { private String workflowId; private String runId; private String signalName; private String input; private String control; private BuilderImpl() { } private BuilderImpl(SignalExternalWorkflowExecutionDecisionAttributes model) { workflowId(model.workflowId); runId(model.runId); signalName(model.signalName); input(model.input); control(model.control); } public final String getWorkflowId() { return workflowId; } public final void setWorkflowId(String workflowId) { this.workflowId = workflowId; } @Override public final Builder workflowId(String workflowId) { this.workflowId = workflowId; return this; } public final String getRunId() { return runId; } public final void setRunId(String runId) { this.runId = runId; } @Override public final Builder runId(String runId) { this.runId = runId; return this; } public final String getSignalName() { return signalName; } public final void setSignalName(String signalName) { this.signalName = signalName; } @Override public final Builder signalName(String signalName) { this.signalName = signalName; return this; } public final String getInput() { return input; } public final void setInput(String input) { this.input = input; } @Override public final Builder input(String input) { this.input = input; return this; } public final String getControl() { return control; } public final void setControl(String control) { this.control = control; } @Override public final Builder control(String control) { this.control = control; return this; } @Override public SignalExternalWorkflowExecutionDecisionAttributes build() { return new SignalExternalWorkflowExecutionDecisionAttributes(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy