software.amazon.awssdk.services.m2.model.JobStepRestartMarker 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.List;
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 restart step information for the most recent restart operation.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class JobStepRestartMarker implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField FROM_PROC_STEP_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("fromProcStep").getter(getter(JobStepRestartMarker::fromProcStep)).setter(setter(Builder::fromProcStep))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fromProcStep").build()).build();
private static final SdkField FROM_STEP_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("fromStep").getter(getter(JobStepRestartMarker::fromStep)).setter(setter(Builder::fromStep))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fromStep").build()).build();
private static final SdkField TO_PROC_STEP_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("toProcStep").getter(getter(JobStepRestartMarker::toProcStep)).setter(setter(Builder::toProcStep))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("toProcStep").build()).build();
private static final SdkField TO_STEP_FIELD = SdkField. builder(MarshallingType.STRING).memberName("toStep")
.getter(getter(JobStepRestartMarker::toStep)).setter(setter(Builder::toStep))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("toStep").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FROM_PROC_STEP_FIELD,
FROM_STEP_FIELD, TO_PROC_STEP_FIELD, TO_STEP_FIELD));
private static final long serialVersionUID = 1L;
private final String fromProcStep;
private final String fromStep;
private final String toProcStep;
private final String toStep;
private JobStepRestartMarker(BuilderImpl builder) {
this.fromProcStep = builder.fromProcStep;
this.fromStep = builder.fromStep;
this.toProcStep = builder.toProcStep;
this.toStep = builder.toStep;
}
/**
*
* The procedure step name that a job was restarted from.
*
*
* @return The procedure step name that a job was restarted from.
*/
public final String fromProcStep() {
return fromProcStep;
}
/**
*
* The step name that a batch job restart was from.
*
*
* @return The step name that a batch job restart was from.
*/
public final String fromStep() {
return fromStep;
}
/**
*
* The procedure step name that a batch job was restarted to.
*
*
* @return The procedure step name that a batch job was restarted to.
*/
public final String toProcStep() {
return toProcStep;
}
/**
*
* The step name that a job was restarted to.
*
*
* @return The step name that a job was restarted to.
*/
public final String toStep() {
return toStep;
}
@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(fromProcStep());
hashCode = 31 * hashCode + Objects.hashCode(fromStep());
hashCode = 31 * hashCode + Objects.hashCode(toProcStep());
hashCode = 31 * hashCode + Objects.hashCode(toStep());
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 JobStepRestartMarker)) {
return false;
}
JobStepRestartMarker other = (JobStepRestartMarker) obj;
return Objects.equals(fromProcStep(), other.fromProcStep()) && Objects.equals(fromStep(), other.fromStep())
&& Objects.equals(toProcStep(), other.toProcStep()) && Objects.equals(toStep(), other.toStep());
}
/**
* 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("JobStepRestartMarker").add("FromProcStep", fromProcStep()).add("FromStep", fromStep())
.add("ToProcStep", toProcStep()).add("ToStep", toStep()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "fromProcStep":
return Optional.ofNullable(clazz.cast(fromProcStep()));
case "fromStep":
return Optional.ofNullable(clazz.cast(fromStep()));
case "toProcStep":
return Optional.ofNullable(clazz.cast(toProcStep()));
case "toStep":
return Optional.ofNullable(clazz.cast(toStep()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy