Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.sagemakergeospatial.model.GetEarthObservationJobResponse Maven / Gradle / Ivy
Go to download
The AWS Java SDK for Sage Maker Geospatial module holds the client classes that are used for
communicating with Sage Maker Geospatial.
/*
* 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.sagemakergeospatial.model;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
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.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
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.traits.MapTrait;
import software.amazon.awssdk.core.traits.TimestampFormatTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class GetEarthObservationJobResponse extends SageMakerGeospatialResponse implements
ToCopyableBuilder {
private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Arn")
.getter(getter(GetEarthObservationJobResponse::arn)).setter(setter(Builder::arn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Arn").build()).build();
private static final SdkField CREATION_TIME_FIELD = SdkField
. builder(MarshallingType.INSTANT)
.memberName("CreationTime")
.getter(getter(GetEarthObservationJobResponse::creationTime))
.setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build(),
TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build();
private static final SdkField DURATION_IN_SECONDS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("DurationInSeconds").getter(getter(GetEarthObservationJobResponse::durationInSeconds))
.setter(setter(Builder::durationInSeconds))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DurationInSeconds").build()).build();
private static final SdkField ERROR_DETAILS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ErrorDetails")
.getter(getter(GetEarthObservationJobResponse::errorDetails)).setter(setter(Builder::errorDetails))
.constructor(EarthObservationJobErrorDetails::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ErrorDetails").build()).build();
private static final SdkField EXECUTION_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ExecutionRoleArn").getter(getter(GetEarthObservationJobResponse::executionRoleArn))
.setter(setter(Builder::executionRoleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExecutionRoleArn").build()).build();
private static final SdkField EXPORT_ERROR_DETAILS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ExportErrorDetails")
.getter(getter(GetEarthObservationJobResponse::exportErrorDetails)).setter(setter(Builder::exportErrorDetails))
.constructor(ExportErrorDetails::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExportErrorDetails").build())
.build();
private static final SdkField EXPORT_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ExportStatus").getter(getter(GetEarthObservationJobResponse::exportStatusAsString))
.setter(setter(Builder::exportStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExportStatus").build()).build();
private static final SdkField INPUT_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("InputConfig")
.getter(getter(GetEarthObservationJobResponse::inputConfig)).setter(setter(Builder::inputConfig))
.constructor(InputConfigOutput::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InputConfig").build()).build();
private static final SdkField JOB_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("JobConfig").getter(getter(GetEarthObservationJobResponse::jobConfig)).setter(setter(Builder::jobConfig))
.constructor(JobConfigInput::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JobConfig").build()).build();
private static final SdkField KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("KmsKeyId").getter(getter(GetEarthObservationJobResponse::kmsKeyId)).setter(setter(Builder::kmsKeyId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KmsKeyId").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
.getter(getter(GetEarthObservationJobResponse::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build();
private static final SdkField> OUTPUT_BANDS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("OutputBands")
.getter(getter(GetEarthObservationJobResponse::outputBands))
.setter(setter(Builder::outputBands))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputBands").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(OutputBand::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status")
.getter(getter(GetEarthObservationJobResponse::statusAsString)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("Tags")
.getter(getter(GetEarthObservationJobResponse::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD,
CREATION_TIME_FIELD, DURATION_IN_SECONDS_FIELD, ERROR_DETAILS_FIELD, EXECUTION_ROLE_ARN_FIELD,
EXPORT_ERROR_DETAILS_FIELD, EXPORT_STATUS_FIELD, INPUT_CONFIG_FIELD, JOB_CONFIG_FIELD, KMS_KEY_ID_FIELD, NAME_FIELD,
OUTPUT_BANDS_FIELD, STATUS_FIELD, TAGS_FIELD));
private final String arn;
private final Instant creationTime;
private final Integer durationInSeconds;
private final EarthObservationJobErrorDetails errorDetails;
private final String executionRoleArn;
private final ExportErrorDetails exportErrorDetails;
private final String exportStatus;
private final InputConfigOutput inputConfig;
private final JobConfigInput jobConfig;
private final String kmsKeyId;
private final String name;
private final List outputBands;
private final String status;
private final Map tags;
private GetEarthObservationJobResponse(BuilderImpl builder) {
super(builder);
this.arn = builder.arn;
this.creationTime = builder.creationTime;
this.durationInSeconds = builder.durationInSeconds;
this.errorDetails = builder.errorDetails;
this.executionRoleArn = builder.executionRoleArn;
this.exportErrorDetails = builder.exportErrorDetails;
this.exportStatus = builder.exportStatus;
this.inputConfig = builder.inputConfig;
this.jobConfig = builder.jobConfig;
this.kmsKeyId = builder.kmsKeyId;
this.name = builder.name;
this.outputBands = builder.outputBands;
this.status = builder.status;
this.tags = builder.tags;
}
/**
*
* The Amazon Resource Name (ARN) of the Earth Observation job.
*
*
* @return The Amazon Resource Name (ARN) of the Earth Observation job.
*/
public final String arn() {
return arn;
}
/**
*
* The creation time of the initiated Earth Observation job.
*
*
* @return The creation time of the initiated Earth Observation job.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* The duration of Earth Observation job, in seconds.
*
*
* @return The duration of Earth Observation job, in seconds.
*/
public final Integer durationInSeconds() {
return durationInSeconds;
}
/**
*
* Details about the errors generated during the Earth Observation job.
*
*
* @return Details about the errors generated during the Earth Observation job.
*/
public final EarthObservationJobErrorDetails errorDetails() {
return errorDetails;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that you specified for the job.
*
*
* @return The Amazon Resource Name (ARN) of the IAM role that you specified for the job.
*/
public final String executionRoleArn() {
return executionRoleArn;
}
/**
*
* Details about the errors generated during ExportEarthObservationJob.
*
*
* @return Details about the errors generated during ExportEarthObservationJob.
*/
public final ExportErrorDetails exportErrorDetails() {
return exportErrorDetails;
}
/**
*
* The status of the Earth Observation job.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #exportStatus} will
* return {@link EarthObservationJobExportStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #exportStatusAsString}.
*
*
* @return The status of the Earth Observation job.
* @see EarthObservationJobExportStatus
*/
public final EarthObservationJobExportStatus exportStatus() {
return EarthObservationJobExportStatus.fromValue(exportStatus);
}
/**
*
* The status of the Earth Observation job.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #exportStatus} will
* return {@link EarthObservationJobExportStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #exportStatusAsString}.
*
*
* @return The status of the Earth Observation job.
* @see EarthObservationJobExportStatus
*/
public final String exportStatusAsString() {
return exportStatus;
}
/**
*
* Input data for the Earth Observation job.
*
*
* @return Input data for the Earth Observation job.
*/
public final InputConfigOutput inputConfig() {
return inputConfig;
}
/**
*
* An object containing information about the job configuration.
*
*
* @return An object containing information about the job configuration.
*/
public final JobConfigInput jobConfig() {
return jobConfig;
}
/**
*
* The Key Management Service key ID for server-side encryption.
*
*
* @return The Key Management Service key ID for server-side encryption.
*/
public final String kmsKeyId() {
return kmsKeyId;
}
/**
*
* The name of the Earth Observation job.
*
*
* @return The name of the Earth Observation job.
*/
public final String name() {
return name;
}
/**
* For responses, this returns true if the service returned a value for the OutputBands 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 hasOutputBands() {
return outputBands != null && !(outputBands instanceof SdkAutoConstructList);
}
/**
*
* Bands available in the output of an operation.
*
*
* 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 #hasOutputBands} method.
*
*
* @return Bands available in the output of an operation.
*/
public final List outputBands() {
return outputBands;
}
/**
*
* The status of a previously initiated Earth Observation job.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link EarthObservationJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #statusAsString}.
*
*
* @return The status of a previously initiated Earth Observation job.
* @see EarthObservationJobStatus
*/
public final EarthObservationJobStatus status() {
return EarthObservationJobStatus.fromValue(status);
}
/**
*
* The status of a previously initiated Earth Observation job.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link EarthObservationJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #statusAsString}.
*
*
* @return The status of a previously initiated Earth Observation job.
* @see EarthObservationJobStatus
*/
public final String statusAsString() {
return status;
}
/**
* For responses, this returns true if the service returned a value for the Tags 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 hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructMap);
}
/**
*
* Each tag consists of a key and a value.
*
*
* 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 #hasTags} method.
*
*
* @return Each tag consists of a key and a value.
*/
public final Map tags() {
return tags;
}
@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 + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(arn());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(durationInSeconds());
hashCode = 31 * hashCode + Objects.hashCode(errorDetails());
hashCode = 31 * hashCode + Objects.hashCode(executionRoleArn());
hashCode = 31 * hashCode + Objects.hashCode(exportErrorDetails());
hashCode = 31 * hashCode + Objects.hashCode(exportStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(inputConfig());
hashCode = 31 * hashCode + Objects.hashCode(jobConfig());
hashCode = 31 * hashCode + Objects.hashCode(kmsKeyId());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(hasOutputBands() ? outputBands() : null);
hashCode = 31 * hashCode + Objects.hashCode(statusAsString());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof GetEarthObservationJobResponse)) {
return false;
}
GetEarthObservationJobResponse other = (GetEarthObservationJobResponse) obj;
return Objects.equals(arn(), other.arn()) && Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(durationInSeconds(), other.durationInSeconds())
&& Objects.equals(errorDetails(), other.errorDetails())
&& Objects.equals(executionRoleArn(), other.executionRoleArn())
&& Objects.equals(exportErrorDetails(), other.exportErrorDetails())
&& Objects.equals(exportStatusAsString(), other.exportStatusAsString())
&& Objects.equals(inputConfig(), other.inputConfig()) && Objects.equals(jobConfig(), other.jobConfig())
&& Objects.equals(kmsKeyId(), other.kmsKeyId()) && Objects.equals(name(), other.name())
&& hasOutputBands() == other.hasOutputBands() && Objects.equals(outputBands(), other.outputBands())
&& Objects.equals(statusAsString(), other.statusAsString()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags());
}
/**
* 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("GetEarthObservationJobResponse").add("Arn", arn()).add("CreationTime", creationTime())
.add("DurationInSeconds", durationInSeconds()).add("ErrorDetails", errorDetails())
.add("ExecutionRoleArn", executionRoleArn()).add("ExportErrorDetails", exportErrorDetails())
.add("ExportStatus", exportStatusAsString()).add("InputConfig", inputConfig()).add("JobConfig", jobConfig())
.add("KmsKeyId", kmsKeyId()).add("Name", name()).add("OutputBands", hasOutputBands() ? outputBands() : null)
.add("Status", statusAsString()).add("Tags", hasTags() ? tags() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Arn":
return Optional.ofNullable(clazz.cast(arn()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "DurationInSeconds":
return Optional.ofNullable(clazz.cast(durationInSeconds()));
case "ErrorDetails":
return Optional.ofNullable(clazz.cast(errorDetails()));
case "ExecutionRoleArn":
return Optional.ofNullable(clazz.cast(executionRoleArn()));
case "ExportErrorDetails":
return Optional.ofNullable(clazz.cast(exportErrorDetails()));
case "ExportStatus":
return Optional.ofNullable(clazz.cast(exportStatusAsString()));
case "InputConfig":
return Optional.ofNullable(clazz.cast(inputConfig()));
case "JobConfig":
return Optional.ofNullable(clazz.cast(jobConfig()));
case "KmsKeyId":
return Optional.ofNullable(clazz.cast(kmsKeyId()));
case "Name":
return Optional.ofNullable(clazz.cast(name()));
case "OutputBands":
return Optional.ofNullable(clazz.cast(outputBands()));
case "Status":
return Optional.ofNullable(clazz.cast(statusAsString()));
case "Tags":
return Optional.ofNullable(clazz.cast(tags()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((GetEarthObservationJobResponse) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SageMakerGeospatialResponse.Builder, SdkPojo,
CopyableBuilder {
/**
*
* The Amazon Resource Name (ARN) of the Earth Observation job.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the Earth Observation job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder arn(String arn);
/**
*
* The creation time of the initiated Earth Observation job.
*
*
* @param creationTime
* The creation time of the initiated Earth Observation job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder creationTime(Instant creationTime);
/**
*
* The duration of Earth Observation job, in seconds.
*
*
* @param durationInSeconds
* The duration of Earth Observation job, in seconds.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder durationInSeconds(Integer durationInSeconds);
/**
*
* Details about the errors generated during the Earth Observation job.
*
*
* @param errorDetails
* Details about the errors generated during the Earth Observation job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder errorDetails(EarthObservationJobErrorDetails errorDetails);
/**
*
* Details about the errors generated during the Earth Observation job.
*
* This is a convenience method that creates an instance of the {@link EarthObservationJobErrorDetails.Builder}
* avoiding the need to create one manually via {@link EarthObservationJobErrorDetails#builder()}.
*
*
* When the {@link Consumer} completes, {@link EarthObservationJobErrorDetails.Builder#build()} is called
* immediately and its result is passed to {@link #errorDetails(EarthObservationJobErrorDetails)}.
*
* @param errorDetails
* a consumer that will call methods on {@link EarthObservationJobErrorDetails.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #errorDetails(EarthObservationJobErrorDetails)
*/
default Builder errorDetails(Consumer errorDetails) {
return errorDetails(EarthObservationJobErrorDetails.builder().applyMutation(errorDetails).build());
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that you specified for the job.
*
*
* @param executionRoleArn
* The Amazon Resource Name (ARN) of the IAM role that you specified for the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder executionRoleArn(String executionRoleArn);
/**
*
* Details about the errors generated during ExportEarthObservationJob.
*
*
* @param exportErrorDetails
* Details about the errors generated during ExportEarthObservationJob.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder exportErrorDetails(ExportErrorDetails exportErrorDetails);
/**
*
* Details about the errors generated during ExportEarthObservationJob.
*
* This is a convenience method that creates an instance of the {@link ExportErrorDetails.Builder} avoiding the
* need to create one manually via {@link ExportErrorDetails#builder()}.
*
*
* When the {@link Consumer} completes, {@link ExportErrorDetails.Builder#build()} is called immediately and its
* result is passed to {@link #exportErrorDetails(ExportErrorDetails)}.
*
* @param exportErrorDetails
* a consumer that will call methods on {@link ExportErrorDetails.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #exportErrorDetails(ExportErrorDetails)
*/
default Builder exportErrorDetails(Consumer exportErrorDetails) {
return exportErrorDetails(ExportErrorDetails.builder().applyMutation(exportErrorDetails).build());
}
/**
*
* The status of the Earth Observation job.
*
*
* @param exportStatus
* The status of the Earth Observation job.
* @see EarthObservationJobExportStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see EarthObservationJobExportStatus
*/
Builder exportStatus(String exportStatus);
/**
*
* The status of the Earth Observation job.
*
*
* @param exportStatus
* The status of the Earth Observation job.
* @see EarthObservationJobExportStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see EarthObservationJobExportStatus
*/
Builder exportStatus(EarthObservationJobExportStatus exportStatus);
/**
*
* Input data for the Earth Observation job.
*
*
* @param inputConfig
* Input data for the Earth Observation job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder inputConfig(InputConfigOutput inputConfig);
/**
*
* Input data for the Earth Observation job.
*
* This is a convenience method that creates an instance of the {@link InputConfigOutput.Builder} avoiding the
* need to create one manually via {@link InputConfigOutput#builder()}.
*
*
* When the {@link Consumer} completes, {@link InputConfigOutput.Builder#build()} is called immediately and its
* result is passed to {@link #inputConfig(InputConfigOutput)}.
*
* @param inputConfig
* a consumer that will call methods on {@link InputConfigOutput.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #inputConfig(InputConfigOutput)
*/
default Builder inputConfig(Consumer inputConfig) {
return inputConfig(InputConfigOutput.builder().applyMutation(inputConfig).build());
}
/**
*
* An object containing information about the job configuration.
*
*
* @param jobConfig
* An object containing information about the job configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder jobConfig(JobConfigInput jobConfig);
/**
*
* An object containing information about the job configuration.
*
* This is a convenience method that creates an instance of the {@link JobConfigInput.Builder} avoiding the need
* to create one manually via {@link JobConfigInput#builder()}.
*
*
* When the {@link Consumer} completes, {@link JobConfigInput.Builder#build()} is called immediately and its
* result is passed to {@link #jobConfig(JobConfigInput)}.
*
* @param jobConfig
* a consumer that will call methods on {@link JobConfigInput.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #jobConfig(JobConfigInput)
*/
default Builder jobConfig(Consumer jobConfig) {
return jobConfig(JobConfigInput.builder().applyMutation(jobConfig).build());
}
/**
*
* The Key Management Service key ID for server-side encryption.
*
*
* @param kmsKeyId
* The Key Management Service key ID for server-side encryption.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder kmsKeyId(String kmsKeyId);
/**
*
* The name of the Earth Observation job.
*
*
* @param name
* The name of the Earth Observation job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* Bands available in the output of an operation.
*
*
* @param outputBands
* Bands available in the output of an operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputBands(Collection outputBands);
/**
*
* Bands available in the output of an operation.
*
*
* @param outputBands
* Bands available in the output of an operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputBands(OutputBand... outputBands);
/**
*
* Bands available in the output of an operation.
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.sagemakergeospatial.model.OutputBand.Builder} avoiding the need to
* create one manually via
* {@link software.amazon.awssdk.services.sagemakergeospatial.model.OutputBand#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.sagemakergeospatial.model.OutputBand.Builder#build()} is called
* immediately and its result is passed to {@link #outputBands(List)}.
*
* @param outputBands
* a consumer that will call methods on
* {@link software.amazon.awssdk.services.sagemakergeospatial.model.OutputBand.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #outputBands(java.util.Collection)
*/
Builder outputBands(Consumer... outputBands);
/**
*
* The status of a previously initiated Earth Observation job.
*
*
* @param status
* The status of a previously initiated Earth Observation job.
* @see EarthObservationJobStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see EarthObservationJobStatus
*/
Builder status(String status);
/**
*
* The status of a previously initiated Earth Observation job.
*
*
* @param status
* The status of a previously initiated Earth Observation job.
* @see EarthObservationJobStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see EarthObservationJobStatus
*/
Builder status(EarthObservationJobStatus status);
/**
*
* Each tag consists of a key and a value.
*
*
* @param tags
* Each tag consists of a key and a value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
}
static final class BuilderImpl extends SageMakerGeospatialResponse.BuilderImpl implements Builder {
private String arn;
private Instant creationTime;
private Integer durationInSeconds;
private EarthObservationJobErrorDetails errorDetails;
private String executionRoleArn;
private ExportErrorDetails exportErrorDetails;
private String exportStatus;
private InputConfigOutput inputConfig;
private JobConfigInput jobConfig;
private String kmsKeyId;
private String name;
private List outputBands = DefaultSdkAutoConstructList.getInstance();
private String status;
private Map tags = DefaultSdkAutoConstructMap.getInstance();
private BuilderImpl() {
}
private BuilderImpl(GetEarthObservationJobResponse model) {
super(model);
arn(model.arn);
creationTime(model.creationTime);
durationInSeconds(model.durationInSeconds);
errorDetails(model.errorDetails);
executionRoleArn(model.executionRoleArn);
exportErrorDetails(model.exportErrorDetails);
exportStatus(model.exportStatus);
inputConfig(model.inputConfig);
jobConfig(model.jobConfig);
kmsKeyId(model.kmsKeyId);
name(model.name);
outputBands(model.outputBands);
status(model.status);
tags(model.tags);
}
public final String getArn() {
return arn;
}
public final void setArn(String arn) {
this.arn = arn;
}
@Override
public final Builder arn(String arn) {
this.arn = arn;
return this;
}
public final Instant getCreationTime() {
return creationTime;
}
public final void setCreationTime(Instant creationTime) {
this.creationTime = creationTime;
}
@Override
public final Builder creationTime(Instant creationTime) {
this.creationTime = creationTime;
return this;
}
public final Integer getDurationInSeconds() {
return durationInSeconds;
}
public final void setDurationInSeconds(Integer durationInSeconds) {
this.durationInSeconds = durationInSeconds;
}
@Override
public final Builder durationInSeconds(Integer durationInSeconds) {
this.durationInSeconds = durationInSeconds;
return this;
}
public final EarthObservationJobErrorDetails.Builder getErrorDetails() {
return errorDetails != null ? errorDetails.toBuilder() : null;
}
public final void setErrorDetails(EarthObservationJobErrorDetails.BuilderImpl errorDetails) {
this.errorDetails = errorDetails != null ? errorDetails.build() : null;
}
@Override
public final Builder errorDetails(EarthObservationJobErrorDetails errorDetails) {
this.errorDetails = errorDetails;
return this;
}
public final String getExecutionRoleArn() {
return executionRoleArn;
}
public final void setExecutionRoleArn(String executionRoleArn) {
this.executionRoleArn = executionRoleArn;
}
@Override
public final Builder executionRoleArn(String executionRoleArn) {
this.executionRoleArn = executionRoleArn;
return this;
}
public final ExportErrorDetails.Builder getExportErrorDetails() {
return exportErrorDetails != null ? exportErrorDetails.toBuilder() : null;
}
public final void setExportErrorDetails(ExportErrorDetails.BuilderImpl exportErrorDetails) {
this.exportErrorDetails = exportErrorDetails != null ? exportErrorDetails.build() : null;
}
@Override
public final Builder exportErrorDetails(ExportErrorDetails exportErrorDetails) {
this.exportErrorDetails = exportErrorDetails;
return this;
}
public final String getExportStatus() {
return exportStatus;
}
public final void setExportStatus(String exportStatus) {
this.exportStatus = exportStatus;
}
@Override
public final Builder exportStatus(String exportStatus) {
this.exportStatus = exportStatus;
return this;
}
@Override
public final Builder exportStatus(EarthObservationJobExportStatus exportStatus) {
this.exportStatus(exportStatus == null ? null : exportStatus.toString());
return this;
}
public final InputConfigOutput.Builder getInputConfig() {
return inputConfig != null ? inputConfig.toBuilder() : null;
}
public final void setInputConfig(InputConfigOutput.BuilderImpl inputConfig) {
this.inputConfig = inputConfig != null ? inputConfig.build() : null;
}
@Override
public final Builder inputConfig(InputConfigOutput inputConfig) {
this.inputConfig = inputConfig;
return this;
}
public final JobConfigInput.Builder getJobConfig() {
return jobConfig != null ? jobConfig.toBuilder() : null;
}
public final void setJobConfig(JobConfigInput.BuilderImpl jobConfig) {
this.jobConfig = jobConfig != null ? jobConfig.build() : null;
}
@Override
public final Builder jobConfig(JobConfigInput jobConfig) {
this.jobConfig = jobConfig;
return this;
}
public final String getKmsKeyId() {
return kmsKeyId;
}
public final void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
@Override
public final Builder kmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
return this;
}
public final String getName() {
return name;
}
public final void setName(String name) {
this.name = name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final List getOutputBands() {
List result = EarthObservationJobOutputBandsCopier.copyToBuilder(this.outputBands);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setOutputBands(Collection outputBands) {
this.outputBands = EarthObservationJobOutputBandsCopier.copyFromBuilder(outputBands);
}
@Override
public final Builder outputBands(Collection outputBands) {
this.outputBands = EarthObservationJobOutputBandsCopier.copy(outputBands);
return this;
}
@Override
@SafeVarargs
public final Builder outputBands(OutputBand... outputBands) {
outputBands(Arrays.asList(outputBands));
return this;
}
@Override
@SafeVarargs
public final Builder outputBands(Consumer... outputBands) {
outputBands(Stream.of(outputBands).map(c -> OutputBand.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final String getStatus() {
return status;
}
public final void setStatus(String status) {
this.status = status;
}
@Override
public final Builder status(String status) {
this.status = status;
return this;
}
@Override
public final Builder status(EarthObservationJobStatus status) {
this.status(status == null ? null : status.toString());
return this;
}
public final Map getTags() {
if (tags instanceof SdkAutoConstructMap) {
return null;
}
return tags;
}
public final void setTags(Map tags) {
this.tags = TagsCopier.copy(tags);
}
@Override
public final Builder tags(Map tags) {
this.tags = TagsCopier.copy(tags);
return this;
}
@Override
public GetEarthObservationJobResponse build() {
return new GetEarthObservationJobResponse(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}