
software.amazon.awssdk.services.sagemaker.model.DescribeAppImageConfigResponse Maven / Gradle / Ivy
/*
* 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 DescribeAppImageConfigResponse extends SageMakerResponse implements
ToCopyableBuilder {
private static final SdkField APP_IMAGE_CONFIG_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AppImageConfigArn").getter(getter(DescribeAppImageConfigResponse::appImageConfigArn))
.setter(setter(Builder::appImageConfigArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AppImageConfigArn").build()).build();
private static final SdkField APP_IMAGE_CONFIG_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AppImageConfigName").getter(getter(DescribeAppImageConfigResponse::appImageConfigName))
.setter(setter(Builder::appImageConfigName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AppImageConfigName").build())
.build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationTime").getter(getter(DescribeAppImageConfigResponse::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(DescribeAppImageConfigResponse::lastModifiedTime))
.setter(setter(Builder::lastModifiedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedTime").build()).build();
private static final SdkField KERNEL_GATEWAY_IMAGE_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("KernelGatewayImageConfig")
.getter(getter(DescribeAppImageConfigResponse::kernelGatewayImageConfig))
.setter(setter(Builder::kernelGatewayImageConfig)).constructor(KernelGatewayImageConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KernelGatewayImageConfig").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(APP_IMAGE_CONFIG_ARN_FIELD,
APP_IMAGE_CONFIG_NAME_FIELD, CREATION_TIME_FIELD, LAST_MODIFIED_TIME_FIELD, KERNEL_GATEWAY_IMAGE_CONFIG_FIELD));
private final String appImageConfigArn;
private final String appImageConfigName;
private final Instant creationTime;
private final Instant lastModifiedTime;
private final KernelGatewayImageConfig kernelGatewayImageConfig;
private DescribeAppImageConfigResponse(BuilderImpl builder) {
super(builder);
this.appImageConfigArn = builder.appImageConfigArn;
this.appImageConfigName = builder.appImageConfigName;
this.creationTime = builder.creationTime;
this.lastModifiedTime = builder.lastModifiedTime;
this.kernelGatewayImageConfig = builder.kernelGatewayImageConfig;
}
/**
*
* The Amazon Resource Name (ARN) of the AppImageConfig.
*
*
* @return The Amazon Resource Name (ARN) of the AppImageConfig.
*/
public String appImageConfigArn() {
return appImageConfigArn;
}
/**
*
* The name of the AppImageConfig.
*
*
* @return The name of the AppImageConfig.
*/
public String appImageConfigName() {
return appImageConfigName;
}
/**
*
* When the AppImageConfig was created.
*
*
* @return When the AppImageConfig was created.
*/
public Instant creationTime() {
return creationTime;
}
/**
*
* When the AppImageConfig was last modified.
*
*
* @return When the AppImageConfig was last modified.
*/
public Instant lastModifiedTime() {
return lastModifiedTime;
}
/**
*
* The configuration of a KernelGateway app.
*
*
* @return The configuration of a KernelGateway app.
*/
public KernelGatewayImageConfig kernelGatewayImageConfig() {
return kernelGatewayImageConfig;
}
@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 int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(appImageConfigArn());
hashCode = 31 * hashCode + Objects.hashCode(appImageConfigName());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(lastModifiedTime());
hashCode = 31 * hashCode + Objects.hashCode(kernelGatewayImageConfig());
return hashCode;
}
@Override
public boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof DescribeAppImageConfigResponse)) {
return false;
}
DescribeAppImageConfigResponse other = (DescribeAppImageConfigResponse) obj;
return Objects.equals(appImageConfigArn(), other.appImageConfigArn())
&& Objects.equals(appImageConfigName(), other.appImageConfigName())
&& Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(lastModifiedTime(), other.lastModifiedTime())
&& Objects.equals(kernelGatewayImageConfig(), other.kernelGatewayImageConfig());
}
/**
* 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 String toString() {
return ToString.builder("DescribeAppImageConfigResponse").add("AppImageConfigArn", appImageConfigArn())
.add("AppImageConfigName", appImageConfigName()).add("CreationTime", creationTime())
.add("LastModifiedTime", lastModifiedTime()).add("KernelGatewayImageConfig", kernelGatewayImageConfig()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AppImageConfigArn":
return Optional.ofNullable(clazz.cast(appImageConfigArn()));
case "AppImageConfigName":
return Optional.ofNullable(clazz.cast(appImageConfigName()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "LastModifiedTime":
return Optional.ofNullable(clazz.cast(lastModifiedTime()));
case "KernelGatewayImageConfig":
return Optional.ofNullable(clazz.cast(kernelGatewayImageConfig()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy