All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.sagemaker.model.DescribeStudioLifecycleConfigResponse Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon SageMaker module holds the client classes that are used for communicating with Amazon SageMaker Service

There is a newer version: 2.31.2
Show newest version
/*
 * 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 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 getter(Function g) { return obj -> g.apply((DescribeStudioLifecycleConfigResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SageMakerResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The ARN of the Lifecycle Configuration to describe. *

* * @param studioLifecycleConfigArn * The ARN of the Lifecycle Configuration to describe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder studioLifecycleConfigArn(String studioLifecycleConfigArn); /** *

* The name of the Studio Lifecycle Configuration that is described. *

* * @param studioLifecycleConfigName * The name of the Studio Lifecycle Configuration that is described. * @return Returns a reference to this object so that method calls can be chained together. */ Builder studioLifecycleConfigName(String studioLifecycleConfigName); /** *

* The creation time of the Studio Lifecycle Configuration. *

* * @param creationTime * The creation time of the Studio Lifecycle Configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTime(Instant creationTime); /** *

* This value is equivalent to CreationTime because Studio Lifecycle Configurations are immutable. *

* * @param lastModifiedTime * This value is equivalent to CreationTime because Studio Lifecycle Configurations are immutable. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedTime(Instant lastModifiedTime); /** *

* The content of your Studio Lifecycle Configuration script. *

* * @param studioLifecycleConfigContent * The content of your Studio Lifecycle Configuration script. * @return Returns a reference to this object so that method calls can be chained together. */ Builder studioLifecycleConfigContent(String studioLifecycleConfigContent); /** *

* The App type that the Lifecycle Configuration is attached to. *

* * @param studioLifecycleConfigAppType * The App type that the Lifecycle Configuration is attached to. * @see StudioLifecycleConfigAppType * @return Returns a reference to this object so that method calls can be chained together. * @see StudioLifecycleConfigAppType */ Builder studioLifecycleConfigAppType(String studioLifecycleConfigAppType); /** *

* The App type that the Lifecycle Configuration is attached to. *

* * @param studioLifecycleConfigAppType * The App type that the Lifecycle Configuration is attached to. * @see StudioLifecycleConfigAppType * @return Returns a reference to this object so that method calls can be chained together. * @see StudioLifecycleConfigAppType */ Builder studioLifecycleConfigAppType(StudioLifecycleConfigAppType studioLifecycleConfigAppType); } static final class BuilderImpl extends SageMakerResponse.BuilderImpl implements Builder { private String studioLifecycleConfigArn; private String studioLifecycleConfigName; private Instant creationTime; private Instant lastModifiedTime; private String studioLifecycleConfigContent; private String studioLifecycleConfigAppType; private BuilderImpl() { } private BuilderImpl(DescribeStudioLifecycleConfigResponse model) { super(model); studioLifecycleConfigArn(model.studioLifecycleConfigArn); studioLifecycleConfigName(model.studioLifecycleConfigName); creationTime(model.creationTime); lastModifiedTime(model.lastModifiedTime); studioLifecycleConfigContent(model.studioLifecycleConfigContent); studioLifecycleConfigAppType(model.studioLifecycleConfigAppType); } public final String getStudioLifecycleConfigArn() { return studioLifecycleConfigArn; } public final void setStudioLifecycleConfigArn(String studioLifecycleConfigArn) { this.studioLifecycleConfigArn = studioLifecycleConfigArn; } @Override @Transient public final Builder studioLifecycleConfigArn(String studioLifecycleConfigArn) { this.studioLifecycleConfigArn = studioLifecycleConfigArn; return this; } public final String getStudioLifecycleConfigName() { return studioLifecycleConfigName; } public final void setStudioLifecycleConfigName(String studioLifecycleConfigName) { this.studioLifecycleConfigName = studioLifecycleConfigName; } @Override @Transient public final Builder studioLifecycleConfigName(String studioLifecycleConfigName) { this.studioLifecycleConfigName = studioLifecycleConfigName; return this; } public final Instant getCreationTime() { return creationTime; } public final void setCreationTime(Instant creationTime) { this.creationTime = creationTime; } @Override @Transient public final Builder creationTime(Instant creationTime) { this.creationTime = creationTime; return this; } public final Instant getLastModifiedTime() { return lastModifiedTime; } public final void setLastModifiedTime(Instant lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } @Override @Transient public final Builder lastModifiedTime(Instant lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; return this; } public final String getStudioLifecycleConfigContent() { return studioLifecycleConfigContent; } public final void setStudioLifecycleConfigContent(String studioLifecycleConfigContent) { this.studioLifecycleConfigContent = studioLifecycleConfigContent; } @Override @Transient public final Builder studioLifecycleConfigContent(String studioLifecycleConfigContent) { this.studioLifecycleConfigContent = studioLifecycleConfigContent; return this; } public final String getStudioLifecycleConfigAppType() { return studioLifecycleConfigAppType; } public final void setStudioLifecycleConfigAppType(String studioLifecycleConfigAppType) { this.studioLifecycleConfigAppType = studioLifecycleConfigAppType; } @Override @Transient public final Builder studioLifecycleConfigAppType(String studioLifecycleConfigAppType) { this.studioLifecycleConfigAppType = studioLifecycleConfigAppType; return this; } @Override @Transient public final Builder studioLifecycleConfigAppType(StudioLifecycleConfigAppType studioLifecycleConfigAppType) { this.studioLifecycleConfigAppType(studioLifecycleConfigAppType == null ? null : studioLifecycleConfigAppType .toString()); return this; } @Override public DescribeStudioLifecycleConfigResponse build() { return new DescribeStudioLifecycleConfigResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy