software.amazon.awssdk.services.m2.model.JobStep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of m2 Show documentation
Show all versions of m2 Show documentation
The AWS Java SDK for M2 module holds the client classes that are used for
communicating with M2.
/*
* 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.m2.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 information related to a job step.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class JobStep implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField PROC_STEP_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("procStepName").getter(getter(JobStep::procStepName)).setter(setter(Builder::procStepName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("procStepName").build()).build();
private static final SdkField PROC_STEP_NUMBER_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("procStepNumber").getter(getter(JobStep::procStepNumber)).setter(setter(Builder::procStepNumber))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("procStepNumber").build()).build();
private static final SdkField STEP_COND_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("stepCondCode").getter(getter(JobStep::stepCondCode)).setter(setter(Builder::stepCondCode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("stepCondCode").build()).build();
private static final SdkField STEP_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("stepName").getter(getter(JobStep::stepName)).setter(setter(Builder::stepName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("stepName").build()).build();
private static final SdkField STEP_NUMBER_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("stepNumber").getter(getter(JobStep::stepNumber)).setter(setter(Builder::stepNumber))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("stepNumber").build()).build();
private static final SdkField STEP_RESTARTABLE_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("stepRestartable").getter(getter(JobStep::stepRestartable)).setter(setter(Builder::stepRestartable))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("stepRestartable").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(PROC_STEP_NAME_FIELD,
PROC_STEP_NUMBER_FIELD, STEP_COND_CODE_FIELD, STEP_NAME_FIELD, STEP_NUMBER_FIELD, STEP_RESTARTABLE_FIELD));
private static final Map> SDK_NAME_TO_FIELD = Collections
.unmodifiableMap(new HashMap>() {
{
put("procStepName", PROC_STEP_NAME_FIELD);
put("procStepNumber", PROC_STEP_NUMBER_FIELD);
put("stepCondCode", STEP_COND_CODE_FIELD);
put("stepName", STEP_NAME_FIELD);
put("stepNumber", STEP_NUMBER_FIELD);
put("stepRestartable", STEP_RESTARTABLE_FIELD);
}
});
private static final long serialVersionUID = 1L;
private final String procStepName;
private final Integer procStepNumber;
private final String stepCondCode;
private final String stepName;
private final Integer stepNumber;
private final Boolean stepRestartable;
private JobStep(BuilderImpl builder) {
this.procStepName = builder.procStepName;
this.procStepNumber = builder.procStepNumber;
this.stepCondCode = builder.stepCondCode;
this.stepName = builder.stepName;
this.stepNumber = builder.stepNumber;
this.stepRestartable = builder.stepRestartable;
}
/**
*
* The name of a procedure step.
*
*
* @return The name of a procedure step.
*/
public final String procStepName() {
return procStepName;
}
/**
*
* The number of a procedure step.
*
*
* @return The number of a procedure step.
*/
public final Integer procStepNumber() {
return procStepNumber;
}
/**
*
* The condition code of a step.
*
*
* @return The condition code of a step.
*/
public final String stepCondCode() {
return stepCondCode;
}
/**
*
* The name of a step.
*
*
* @return The name of a step.
*/
public final String stepName() {
return stepName;
}
/**
*
* The number of a step.
*
*
* @return The number of a step.
*/
public final Integer stepNumber() {
return stepNumber;
}
/**
*
* Specifies if a step can be restarted or not.
*
*
* @return Specifies if a step can be restarted or not.
*/
public final Boolean stepRestartable() {
return stepRestartable;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(procStepName());
hashCode = 31 * hashCode + Objects.hashCode(procStepNumber());
hashCode = 31 * hashCode + Objects.hashCode(stepCondCode());
hashCode = 31 * hashCode + Objects.hashCode(stepName());
hashCode = 31 * hashCode + Objects.hashCode(stepNumber());
hashCode = 31 * hashCode + Objects.hashCode(stepRestartable());
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 JobStep)) {
return false;
}
JobStep other = (JobStep) obj;
return Objects.equals(procStepName(), other.procStepName()) && Objects.equals(procStepNumber(), other.procStepNumber())
&& Objects.equals(stepCondCode(), other.stepCondCode()) && Objects.equals(stepName(), other.stepName())
&& Objects.equals(stepNumber(), other.stepNumber()) && Objects.equals(stepRestartable(), other.stepRestartable());
}
/**
* 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("JobStep").add("ProcStepName", procStepName()).add("ProcStepNumber", procStepNumber())
.add("StepCondCode", stepCondCode()).add("StepName", stepName()).add("StepNumber", stepNumber())
.add("StepRestartable", stepRestartable()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "procStepName":
return Optional.ofNullable(clazz.cast(procStepName()));
case "procStepNumber":
return Optional.ofNullable(clazz.cast(procStepNumber()));
case "stepCondCode":
return Optional.ofNullable(clazz.cast(stepCondCode()));
case "stepName":
return Optional.ofNullable(clazz.cast(stepName()));
case "stepNumber":
return Optional.ofNullable(clazz.cast(stepNumber()));
case "stepRestartable":
return Optional.ofNullable(clazz.cast(stepRestartable()));
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
© 2015 - 2025 Weber Informatics LLC | Privacy Policy