software.amazon.awssdk.services.sagemaker.model.DescribeEdgePackagingJobResponse Maven / Gradle / Ivy
Show all versions of sagemaker Show documentation
/*
* 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.time.Instant;
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;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class DescribeEdgePackagingJobResponse extends SageMakerResponse implements
ToCopyableBuilder {
private static final SdkField EDGE_PACKAGING_JOB_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EdgePackagingJobArn").getter(getter(DescribeEdgePackagingJobResponse::edgePackagingJobArn))
.setter(setter(Builder::edgePackagingJobArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EdgePackagingJobArn").build())
.build();
private static final SdkField EDGE_PACKAGING_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EdgePackagingJobName").getter(getter(DescribeEdgePackagingJobResponse::edgePackagingJobName))
.setter(setter(Builder::edgePackagingJobName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EdgePackagingJobName").build())
.build();
private static final SdkField COMPILATION_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CompilationJobName").getter(getter(DescribeEdgePackagingJobResponse::compilationJobName))
.setter(setter(Builder::compilationJobName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CompilationJobName").build())
.build();
private static final SdkField MODEL_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ModelName").getter(getter(DescribeEdgePackagingJobResponse::modelName))
.setter(setter(Builder::modelName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelName").build()).build();
private static final SdkField MODEL_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ModelVersion").getter(getter(DescribeEdgePackagingJobResponse::modelVersion))
.setter(setter(Builder::modelVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelVersion").build()).build();
private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RoleArn").getter(getter(DescribeEdgePackagingJobResponse::roleArn)).setter(setter(Builder::roleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleArn").build()).build();
private static final SdkField OUTPUT_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("OutputConfig")
.getter(getter(DescribeEdgePackagingJobResponse::outputConfig)).setter(setter(Builder::outputConfig))
.constructor(EdgeOutputConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputConfig").build()).build();
private static final SdkField RESOURCE_KEY_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ResourceKey").getter(getter(DescribeEdgePackagingJobResponse::resourceKey))
.setter(setter(Builder::resourceKey))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceKey").build()).build();
private static final SdkField EDGE_PACKAGING_JOB_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("EdgePackagingJobStatus")
.getter(getter(DescribeEdgePackagingJobResponse::edgePackagingJobStatusAsString))
.setter(setter(Builder::edgePackagingJobStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EdgePackagingJobStatus").build())
.build();
private static final SdkField EDGE_PACKAGING_JOB_STATUS_MESSAGE_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("EdgePackagingJobStatusMessage")
.getter(getter(DescribeEdgePackagingJobResponse::edgePackagingJobStatusMessage))
.setter(setter(Builder::edgePackagingJobStatusMessage))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EdgePackagingJobStatusMessage")
.build()).build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationTime").getter(getter(DescribeEdgePackagingJobResponse::creationTime))
.setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();
private static final SdkField LAST_MODIFIED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("LastModifiedTime").getter(getter(DescribeEdgePackagingJobResponse::lastModifiedTime))
.setter(setter(Builder::lastModifiedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedTime").build()).build();
private static final SdkField MODEL_ARTIFACT_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ModelArtifact").getter(getter(DescribeEdgePackagingJobResponse::modelArtifact))
.setter(setter(Builder::modelArtifact))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelArtifact").build()).build();
private static final SdkField MODEL_SIGNATURE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ModelSignature").getter(getter(DescribeEdgePackagingJobResponse::modelSignature))
.setter(setter(Builder::modelSignature))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelSignature").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(EDGE_PACKAGING_JOB_ARN_FIELD,
EDGE_PACKAGING_JOB_NAME_FIELD, COMPILATION_JOB_NAME_FIELD, MODEL_NAME_FIELD, MODEL_VERSION_FIELD, ROLE_ARN_FIELD,
OUTPUT_CONFIG_FIELD, RESOURCE_KEY_FIELD, EDGE_PACKAGING_JOB_STATUS_FIELD, EDGE_PACKAGING_JOB_STATUS_MESSAGE_FIELD,
CREATION_TIME_FIELD, LAST_MODIFIED_TIME_FIELD, MODEL_ARTIFACT_FIELD, MODEL_SIGNATURE_FIELD));
private final String edgePackagingJobArn;
private final String edgePackagingJobName;
private final String compilationJobName;
private final String modelName;
private final String modelVersion;
private final String roleArn;
private final EdgeOutputConfig outputConfig;
private final String resourceKey;
private final String edgePackagingJobStatus;
private final String edgePackagingJobStatusMessage;
private final Instant creationTime;
private final Instant lastModifiedTime;
private final String modelArtifact;
private final String modelSignature;
private DescribeEdgePackagingJobResponse(BuilderImpl builder) {
super(builder);
this.edgePackagingJobArn = builder.edgePackagingJobArn;
this.edgePackagingJobName = builder.edgePackagingJobName;
this.compilationJobName = builder.compilationJobName;
this.modelName = builder.modelName;
this.modelVersion = builder.modelVersion;
this.roleArn = builder.roleArn;
this.outputConfig = builder.outputConfig;
this.resourceKey = builder.resourceKey;
this.edgePackagingJobStatus = builder.edgePackagingJobStatus;
this.edgePackagingJobStatusMessage = builder.edgePackagingJobStatusMessage;
this.creationTime = builder.creationTime;
this.lastModifiedTime = builder.lastModifiedTime;
this.modelArtifact = builder.modelArtifact;
this.modelSignature = builder.modelSignature;
}
/**
*
* The Amazon Resource Name (ARN) of the edge packaging job.
*
*
* @return The Amazon Resource Name (ARN) of the edge packaging job.
*/
public final String edgePackagingJobArn() {
return edgePackagingJobArn;
}
/**
*
* The name of the edge packaging job.
*
*
* @return The name of the edge packaging job.
*/
public final String edgePackagingJobName() {
return edgePackagingJobName;
}
/**
*
* The name of the SageMaker Neo compilation job that is used to locate model artifacts that are being packaged.
*
*
* @return The name of the SageMaker Neo compilation job that is used to locate model artifacts that are being
* packaged.
*/
public final String compilationJobName() {
return compilationJobName;
}
/**
*
* The name of the model.
*
*
* @return The name of the model.
*/
public final String modelName() {
return modelName;
}
/**
*
* The version of the model.
*
*
* @return The version of the model.
*/
public final String modelVersion() {
return modelVersion;
}
/**
*
* The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to download and upload the model, and
* to contact Neo.
*
*
* @return The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to download and upload the
* model, and to contact Neo.
*/
public final String roleArn() {
return roleArn;
}
/**
*
* The output configuration for the edge packaging job.
*
*
* @return The output configuration for the edge packaging job.
*/
public final EdgeOutputConfig outputConfig() {
return outputConfig;
}
/**
*
* The CMK to use when encrypting the EBS volume the job run on.
*
*
* @return The CMK to use when encrypting the EBS volume the job run on.
*/
public final String resourceKey() {
return resourceKey;
}
/**
*
* The current status of the packaging job.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #edgePackagingJobStatus} will return {@link EdgePackagingJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #edgePackagingJobStatusAsString}.
*
*
* @return The current status of the packaging job.
* @see EdgePackagingJobStatus
*/
public final EdgePackagingJobStatus edgePackagingJobStatus() {
return EdgePackagingJobStatus.fromValue(edgePackagingJobStatus);
}
/**
*
* The current status of the packaging job.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #edgePackagingJobStatus} will return {@link EdgePackagingJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #edgePackagingJobStatusAsString}.
*
*
* @return The current status of the packaging job.
* @see EdgePackagingJobStatus
*/
public final String edgePackagingJobStatusAsString() {
return edgePackagingJobStatus;
}
/**
*
* Returns a message describing the job status and error messages.
*
*
* @return Returns a message describing the job status and error messages.
*/
public final String edgePackagingJobStatusMessage() {
return edgePackagingJobStatusMessage;
}
/**
*
* The timestamp of when the packaging job was created.
*
*
* @return The timestamp of when the packaging job was created.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* The timestamp of when the job was last updated.
*
*
* @return The timestamp of when the job was last updated.
*/
public final Instant lastModifiedTime() {
return lastModifiedTime;
}
/**
*
* The Amazon Simple Storage (S3) URI where model artifacts ares stored.
*
*
* @return The Amazon Simple Storage (S3) URI where model artifacts ares stored.
*/
public final String modelArtifact() {
return modelArtifact;
}
/**
*
* The signature document of files in the model artifact.
*
*
* @return The signature document of files in the model artifact.
*/
public final String modelSignature() {
return modelSignature;
}
@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(edgePackagingJobArn());
hashCode = 31 * hashCode + Objects.hashCode(edgePackagingJobName());
hashCode = 31 * hashCode + Objects.hashCode(compilationJobName());
hashCode = 31 * hashCode + Objects.hashCode(modelName());
hashCode = 31 * hashCode + Objects.hashCode(modelVersion());
hashCode = 31 * hashCode + Objects.hashCode(roleArn());
hashCode = 31 * hashCode + Objects.hashCode(outputConfig());
hashCode = 31 * hashCode + Objects.hashCode(resourceKey());
hashCode = 31 * hashCode + Objects.hashCode(edgePackagingJobStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(edgePackagingJobStatusMessage());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(lastModifiedTime());
hashCode = 31 * hashCode + Objects.hashCode(modelArtifact());
hashCode = 31 * hashCode + Objects.hashCode(modelSignature());
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 DescribeEdgePackagingJobResponse)) {
return false;
}
DescribeEdgePackagingJobResponse other = (DescribeEdgePackagingJobResponse) obj;
return Objects.equals(edgePackagingJobArn(), other.edgePackagingJobArn())
&& Objects.equals(edgePackagingJobName(), other.edgePackagingJobName())
&& Objects.equals(compilationJobName(), other.compilationJobName())
&& Objects.equals(modelName(), other.modelName()) && Objects.equals(modelVersion(), other.modelVersion())
&& Objects.equals(roleArn(), other.roleArn()) && Objects.equals(outputConfig(), other.outputConfig())
&& Objects.equals(resourceKey(), other.resourceKey())
&& Objects.equals(edgePackagingJobStatusAsString(), other.edgePackagingJobStatusAsString())
&& Objects.equals(edgePackagingJobStatusMessage(), other.edgePackagingJobStatusMessage())
&& Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(lastModifiedTime(), other.lastModifiedTime())
&& Objects.equals(modelArtifact(), other.modelArtifact())
&& Objects.equals(modelSignature(), other.modelSignature());
}
/**
* 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("DescribeEdgePackagingJobResponse").add("EdgePackagingJobArn", edgePackagingJobArn())
.add("EdgePackagingJobName", edgePackagingJobName()).add("CompilationJobName", compilationJobName())
.add("ModelName", modelName()).add("ModelVersion", modelVersion()).add("RoleArn", roleArn())
.add("OutputConfig", outputConfig()).add("ResourceKey", resourceKey())
.add("EdgePackagingJobStatus", edgePackagingJobStatusAsString())
.add("EdgePackagingJobStatusMessage", edgePackagingJobStatusMessage()).add("CreationTime", creationTime())
.add("LastModifiedTime", lastModifiedTime()).add("ModelArtifact", modelArtifact())
.add("ModelSignature", modelSignature()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "EdgePackagingJobArn":
return Optional.ofNullable(clazz.cast(edgePackagingJobArn()));
case "EdgePackagingJobName":
return Optional.ofNullable(clazz.cast(edgePackagingJobName()));
case "CompilationJobName":
return Optional.ofNullable(clazz.cast(compilationJobName()));
case "ModelName":
return Optional.ofNullable(clazz.cast(modelName()));
case "ModelVersion":
return Optional.ofNullable(clazz.cast(modelVersion()));
case "RoleArn":
return Optional.ofNullable(clazz.cast(roleArn()));
case "OutputConfig":
return Optional.ofNullable(clazz.cast(outputConfig()));
case "ResourceKey":
return Optional.ofNullable(clazz.cast(resourceKey()));
case "EdgePackagingJobStatus":
return Optional.ofNullable(clazz.cast(edgePackagingJobStatusAsString()));
case "EdgePackagingJobStatusMessage":
return Optional.ofNullable(clazz.cast(edgePackagingJobStatusMessage()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "LastModifiedTime":
return Optional.ofNullable(clazz.cast(lastModifiedTime()));
case "ModelArtifact":
return Optional.ofNullable(clazz.cast(modelArtifact()));
case "ModelSignature":
return Optional.ofNullable(clazz.cast(modelSignature()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function