software.amazon.awssdk.services.sagemaker.model.DescribeAppImageConfigResponse 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.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 SdkField JUPYTER_LAB_APP_IMAGE_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("JupyterLabAppImageConfig")
.getter(getter(DescribeAppImageConfigResponse::jupyterLabAppImageConfig))
.setter(setter(Builder::jupyterLabAppImageConfig)).constructor(JupyterLabAppImageConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JupyterLabAppImageConfig").build())
.build();
private static final SdkField CODE_EDITOR_APP_IMAGE_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CodeEditorAppImageConfig")
.getter(getter(DescribeAppImageConfigResponse::codeEditorAppImageConfig))
.setter(setter(Builder::codeEditorAppImageConfig)).constructor(CodeEditorAppImageConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CodeEditorAppImageConfig").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,
JUPYTER_LAB_APP_IMAGE_CONFIG_FIELD, CODE_EDITOR_APP_IMAGE_CONFIG_FIELD));
private final String appImageConfigArn;
private final String appImageConfigName;
private final Instant creationTime;
private final Instant lastModifiedTime;
private final KernelGatewayImageConfig kernelGatewayImageConfig;
private final JupyterLabAppImageConfig jupyterLabAppImageConfig;
private final CodeEditorAppImageConfig codeEditorAppImageConfig;
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;
this.jupyterLabAppImageConfig = builder.jupyterLabAppImageConfig;
this.codeEditorAppImageConfig = builder.codeEditorAppImageConfig;
}
/**
*
* The ARN of the AppImageConfig.
*
*
* @return The ARN of the AppImageConfig.
*/
public final String appImageConfigArn() {
return appImageConfigArn;
}
/**
*
* The name of the AppImageConfig.
*
*
* @return The name of the AppImageConfig.
*/
public final String appImageConfigName() {
return appImageConfigName;
}
/**
*
* When the AppImageConfig was created.
*
*
* @return When the AppImageConfig was created.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* When the AppImageConfig was last modified.
*
*
* @return When the AppImageConfig was last modified.
*/
public final Instant lastModifiedTime() {
return lastModifiedTime;
}
/**
*
* The configuration of a KernelGateway app.
*
*
* @return The configuration of a KernelGateway app.
*/
public final KernelGatewayImageConfig kernelGatewayImageConfig() {
return kernelGatewayImageConfig;
}
/**
*
* The configuration of the JupyterLab app.
*
*
* @return The configuration of the JupyterLab app.
*/
public final JupyterLabAppImageConfig jupyterLabAppImageConfig() {
return jupyterLabAppImageConfig;
}
/**
*
* The configuration of the Code Editor app.
*
*
* @return The configuration of the Code Editor app.
*/
public final CodeEditorAppImageConfig codeEditorAppImageConfig() {
return codeEditorAppImageConfig;
}
@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(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());
hashCode = 31 * hashCode + Objects.hashCode(jupyterLabAppImageConfig());
hashCode = 31 * hashCode + Objects.hashCode(codeEditorAppImageConfig());
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 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())
&& Objects.equals(jupyterLabAppImageConfig(), other.jupyterLabAppImageConfig())
&& Objects.equals(codeEditorAppImageConfig(), other.codeEditorAppImageConfig());
}
/**
* 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("DescribeAppImageConfigResponse").add("AppImageConfigArn", appImageConfigArn())
.add("AppImageConfigName", appImageConfigName()).add("CreationTime", creationTime())
.add("LastModifiedTime", lastModifiedTime()).add("KernelGatewayImageConfig", kernelGatewayImageConfig())
.add("JupyterLabAppImageConfig", jupyterLabAppImageConfig())
.add("CodeEditorAppImageConfig", codeEditorAppImageConfig()).build();
}
public final 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()));
case "JupyterLabAppImageConfig":
return Optional.ofNullable(clazz.cast(jupyterLabAppImageConfig()));
case "CodeEditorAppImageConfig":
return Optional.ofNullable(clazz.cast(codeEditorAppImageConfig()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function