software.amazon.awssdk.services.sagemaker.model.ProcessingOutput Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sagemaker Show documentation
Show all versions of sagemaker Show documentation
The AWS Java SDK for Amazon SageMaker module holds the client classes that are used for communicating
with Amazon SageMaker Service
/*
* 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.sagemaker.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.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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* Describes the results of a processing job. The processing output must specify exactly one of either
* S3Output
or FeatureStoreOutput
types.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class ProcessingOutput implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField OUTPUT_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("OutputName").getter(getter(ProcessingOutput::outputName)).setter(setter(Builder::outputName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputName").build()).build();
private static final SdkField S3_OUTPUT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("S3Output")
.getter(getter(ProcessingOutput::s3Output)).setter(setter(Builder::s3Output))
.constructor(ProcessingS3Output::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3Output").build()).build();
private static final SdkField FEATURE_STORE_OUTPUT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("FeatureStoreOutput")
.getter(getter(ProcessingOutput::featureStoreOutput)).setter(setter(Builder::featureStoreOutput))
.constructor(ProcessingFeatureStoreOutput::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FeatureStoreOutput").build())
.build();
private static final SdkField APP_MANAGED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("AppManaged").getter(getter(ProcessingOutput::appManaged)).setter(setter(Builder::appManaged))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AppManaged").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(OUTPUT_NAME_FIELD,
S3_OUTPUT_FIELD, FEATURE_STORE_OUTPUT_FIELD, APP_MANAGED_FIELD));
private static final long serialVersionUID = 1L;
private final String outputName;
private final ProcessingS3Output s3Output;
private final ProcessingFeatureStoreOutput featureStoreOutput;
private final Boolean appManaged;
private ProcessingOutput(BuilderImpl builder) {
this.outputName = builder.outputName;
this.s3Output = builder.s3Output;
this.featureStoreOutput = builder.featureStoreOutput;
this.appManaged = builder.appManaged;
}
/**
*
* The name for the processing job output.
*
*
* @return The name for the processing job output.
*/
public final String outputName() {
return outputName;
}
/**
*
* Configuration for processing job outputs in Amazon S3.
*
*
* @return Configuration for processing job outputs in Amazon S3.
*/
public final ProcessingS3Output s3Output() {
return s3Output;
}
/**
*
* Configuration for processing job outputs in Amazon SageMaker Feature Store. This processing output type is only
* supported when AppManaged
is specified.
*
*
* @return Configuration for processing job outputs in Amazon SageMaker Feature Store. This processing output type
* is only supported when AppManaged
is specified.
*/
public final ProcessingFeatureStoreOutput featureStoreOutput() {
return featureStoreOutput;
}
/**
*
* When True
, output operations such as data upload are managed natively by the processing job
* application. When False
(default), output operations are managed by Amazon SageMaker.
*
*
* @return When True
, output operations such as data upload are managed natively by the processing job
* application. When False
(default), output operations are managed by Amazon SageMaker.
*/
public final Boolean appManaged() {
return appManaged;
}
@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(outputName());
hashCode = 31 * hashCode + Objects.hashCode(s3Output());
hashCode = 31 * hashCode + Objects.hashCode(featureStoreOutput());
hashCode = 31 * hashCode + Objects.hashCode(appManaged());
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 ProcessingOutput)) {
return false;
}
ProcessingOutput other = (ProcessingOutput) obj;
return Objects.equals(outputName(), other.outputName()) && Objects.equals(s3Output(), other.s3Output())
&& Objects.equals(featureStoreOutput(), other.featureStoreOutput())
&& Objects.equals(appManaged(), other.appManaged());
}
/**
* 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("ProcessingOutput").add("OutputName", outputName()).add("S3Output", s3Output())
.add("FeatureStoreOutput", featureStoreOutput()).add("AppManaged", appManaged()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "OutputName":
return Optional.ofNullable(clazz.cast(outputName()));
case "S3Output":
return Optional.ofNullable(clazz.cast(s3Output()));
case "FeatureStoreOutput":
return Optional.ofNullable(clazz.cast(featureStoreOutput()));
case "AppManaged":
return Optional.ofNullable(clazz.cast(appManaged()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function