
software.amazon.awssdk.services.sagemaker.model.DescribeStudioLifecycleConfigResponse 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.beans.Transient;
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.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 DescribeStudioLifecycleConfigResponse extends SageMakerResponse implements
ToCopyableBuilder {
private static final SdkField STUDIO_LIFECYCLE_CONFIG_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StudioLifecycleConfigArn")
.getter(getter(DescribeStudioLifecycleConfigResponse::studioLifecycleConfigArn))
.setter(setter(Builder::studioLifecycleConfigArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StudioLifecycleConfigArn").build())
.build();
private static final SdkField STUDIO_LIFECYCLE_CONFIG_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StudioLifecycleConfigName")
.getter(getter(DescribeStudioLifecycleConfigResponse::studioLifecycleConfigName))
.setter(setter(Builder::studioLifecycleConfigName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StudioLifecycleConfigName").build())
.build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationTime").getter(getter(DescribeStudioLifecycleConfigResponse::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(DescribeStudioLifecycleConfigResponse::lastModifiedTime))
.setter(setter(Builder::lastModifiedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedTime").build()).build();
private static final SdkField STUDIO_LIFECYCLE_CONFIG_CONTENT_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("StudioLifecycleConfigContent")
.getter(getter(DescribeStudioLifecycleConfigResponse::studioLifecycleConfigContent))
.setter(setter(Builder::studioLifecycleConfigContent))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StudioLifecycleConfigContent")
.build()).build();
private static final SdkField STUDIO_LIFECYCLE_CONFIG_APP_TYPE_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("StudioLifecycleConfigAppType")
.getter(getter(DescribeStudioLifecycleConfigResponse::studioLifecycleConfigAppTypeAsString))
.setter(setter(Builder::studioLifecycleConfigAppType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StudioLifecycleConfigAppType")
.build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
STUDIO_LIFECYCLE_CONFIG_ARN_FIELD, STUDIO_LIFECYCLE_CONFIG_NAME_FIELD, CREATION_TIME_FIELD, LAST_MODIFIED_TIME_FIELD,
STUDIO_LIFECYCLE_CONFIG_CONTENT_FIELD, STUDIO_LIFECYCLE_CONFIG_APP_TYPE_FIELD));
private final String studioLifecycleConfigArn;
private final String studioLifecycleConfigName;
private final Instant creationTime;
private final Instant lastModifiedTime;
private final String studioLifecycleConfigContent;
private final String studioLifecycleConfigAppType;
private DescribeStudioLifecycleConfigResponse(BuilderImpl builder) {
super(builder);
this.studioLifecycleConfigArn = builder.studioLifecycleConfigArn;
this.studioLifecycleConfigName = builder.studioLifecycleConfigName;
this.creationTime = builder.creationTime;
this.lastModifiedTime = builder.lastModifiedTime;
this.studioLifecycleConfigContent = builder.studioLifecycleConfigContent;
this.studioLifecycleConfigAppType = builder.studioLifecycleConfigAppType;
}
/**
*
* The ARN of the Lifecycle Configuration to describe.
*
*
* @return The ARN of the Lifecycle Configuration to describe.
*/
public final String studioLifecycleConfigArn() {
return studioLifecycleConfigArn;
}
/**
*
* The name of the Studio Lifecycle Configuration that is described.
*
*
* @return The name of the Studio Lifecycle Configuration that is described.
*/
public final String studioLifecycleConfigName() {
return studioLifecycleConfigName;
}
/**
*
* The creation time of the Studio Lifecycle Configuration.
*
*
* @return The creation time of the Studio Lifecycle Configuration.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* This value is equivalent to CreationTime because Studio Lifecycle Configurations are immutable.
*
*
* @return This value is equivalent to CreationTime because Studio Lifecycle Configurations are immutable.
*/
public final Instant lastModifiedTime() {
return lastModifiedTime;
}
/**
*
* The content of your Studio Lifecycle Configuration script.
*
*
* @return The content of your Studio Lifecycle Configuration script.
*/
public final String studioLifecycleConfigContent() {
return studioLifecycleConfigContent;
}
/**
*
* The App type that the Lifecycle Configuration is attached to.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #studioLifecycleConfigAppType} will return {@link StudioLifecycleConfigAppType#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #studioLifecycleConfigAppTypeAsString}.
*
*
* @return The App type that the Lifecycle Configuration is attached to.
* @see StudioLifecycleConfigAppType
*/
public final StudioLifecycleConfigAppType studioLifecycleConfigAppType() {
return StudioLifecycleConfigAppType.fromValue(studioLifecycleConfigAppType);
}
/**
*
* The App type that the Lifecycle Configuration is attached to.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #studioLifecycleConfigAppType} will return {@link StudioLifecycleConfigAppType#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #studioLifecycleConfigAppTypeAsString}.
*
*
* @return The App type that the Lifecycle Configuration is attached to.
* @see StudioLifecycleConfigAppType
*/
public final String studioLifecycleConfigAppTypeAsString() {
return studioLifecycleConfigAppType;
}
@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(studioLifecycleConfigArn());
hashCode = 31 * hashCode + Objects.hashCode(studioLifecycleConfigName());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(lastModifiedTime());
hashCode = 31 * hashCode + Objects.hashCode(studioLifecycleConfigContent());
hashCode = 31 * hashCode + Objects.hashCode(studioLifecycleConfigAppTypeAsString());
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 DescribeStudioLifecycleConfigResponse)) {
return false;
}
DescribeStudioLifecycleConfigResponse other = (DescribeStudioLifecycleConfigResponse) obj;
return Objects.equals(studioLifecycleConfigArn(), other.studioLifecycleConfigArn())
&& Objects.equals(studioLifecycleConfigName(), other.studioLifecycleConfigName())
&& Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(lastModifiedTime(), other.lastModifiedTime())
&& Objects.equals(studioLifecycleConfigContent(), other.studioLifecycleConfigContent())
&& Objects.equals(studioLifecycleConfigAppTypeAsString(), other.studioLifecycleConfigAppTypeAsString());
}
/**
* 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("DescribeStudioLifecycleConfigResponse")
.add("StudioLifecycleConfigArn", studioLifecycleConfigArn())
.add("StudioLifecycleConfigName", studioLifecycleConfigName()).add("CreationTime", creationTime())
.add("LastModifiedTime", lastModifiedTime()).add("StudioLifecycleConfigContent", studioLifecycleConfigContent())
.add("StudioLifecycleConfigAppType", studioLifecycleConfigAppTypeAsString()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "StudioLifecycleConfigArn":
return Optional.ofNullable(clazz.cast(studioLifecycleConfigArn()));
case "StudioLifecycleConfigName":
return Optional.ofNullable(clazz.cast(studioLifecycleConfigName()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "LastModifiedTime":
return Optional.ofNullable(clazz.cast(lastModifiedTime()));
case "StudioLifecycleConfigContent":
return Optional.ofNullable(clazz.cast(studioLifecycleConfigContent()));
case "StudioLifecycleConfigAppType":
return Optional.ofNullable(clazz.cast(studioLifecycleConfigAppTypeAsString()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function