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

software.amazon.awssdk.services.sagemaker.model.StudioLifecycleConfigDetails 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.28.4
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.io.Serializable;
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;

/**
 * 

* Details of the Amazon SageMaker Studio Lifecycle Configuration. *

*/ @Generated("software.amazon.awssdk:codegen") public final class StudioLifecycleConfigDetails implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField STUDIO_LIFECYCLE_CONFIG_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StudioLifecycleConfigArn").getter(getter(StudioLifecycleConfigDetails::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(StudioLifecycleConfigDetails::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(StudioLifecycleConfigDetails::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(StudioLifecycleConfigDetails::lastModifiedTime)) .setter(setter(Builder::lastModifiedTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedTime").build()).build(); private static final SdkField STUDIO_LIFECYCLE_CONFIG_APP_TYPE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("StudioLifecycleConfigAppType") .getter(getter(StudioLifecycleConfigDetails::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_APP_TYPE_FIELD)); private static final long serialVersionUID = 1L; private final String studioLifecycleConfigArn; private final String studioLifecycleConfigName; private final Instant creationTime; private final Instant lastModifiedTime; private final String studioLifecycleConfigAppType; private StudioLifecycleConfigDetails(BuilderImpl builder) { this.studioLifecycleConfigArn = builder.studioLifecycleConfigArn; this.studioLifecycleConfigName = builder.studioLifecycleConfigName; this.creationTime = builder.creationTime; this.lastModifiedTime = builder.lastModifiedTime; this.studioLifecycleConfigAppType = builder.studioLifecycleConfigAppType; } /** *

* The Amazon Resource Name (ARN) of the Lifecycle Configuration. *

* * @return The Amazon Resource Name (ARN) of the Lifecycle Configuration. */ public final String studioLifecycleConfigArn() { return studioLifecycleConfigArn; } /** *

* The name of the Amazon SageMaker Studio Lifecycle Configuration. *

* * @return The name of the Amazon SageMaker Studio Lifecycle Configuration. */ public final String studioLifecycleConfigName() { return studioLifecycleConfigName; } /** *

* The creation time of the Amazon SageMaker Studio Lifecycle Configuration. *

* * @return The creation time of the Amazon SageMaker Studio Lifecycle Configuration. */ public final Instant creationTime() { return creationTime; } /** *

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

* * @return This value is equivalent to CreationTime because Amazon SageMaker Studio Lifecycle Configurations are * immutable. */ public final Instant lastModifiedTime() { return lastModifiedTime; } /** *

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

*

* 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 to which the Lifecycle Configuration is attached. * @see StudioLifecycleConfigAppType */ public final StudioLifecycleConfigAppType studioLifecycleConfigAppType() { return StudioLifecycleConfigAppType.fromValue(studioLifecycleConfigAppType); } /** *

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

*

* 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 to which the Lifecycle Configuration is attached. * @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 + 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(studioLifecycleConfigAppTypeAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof StudioLifecycleConfigDetails)) { return false; } StudioLifecycleConfigDetails other = (StudioLifecycleConfigDetails) obj; return Objects.equals(studioLifecycleConfigArn(), other.studioLifecycleConfigArn()) && Objects.equals(studioLifecycleConfigName(), other.studioLifecycleConfigName()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(lastModifiedTime(), other.lastModifiedTime()) && 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("StudioLifecycleConfigDetails").add("StudioLifecycleConfigArn", studioLifecycleConfigArn()) .add("StudioLifecycleConfigName", studioLifecycleConfigName()).add("CreationTime", creationTime()) .add("LastModifiedTime", lastModifiedTime()) .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 "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((StudioLifecycleConfigDetails) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The Amazon Resource Name (ARN) of the Lifecycle Configuration. *

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

* The name of the Amazon SageMaker Studio Lifecycle Configuration. *

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

* The creation time of the Amazon SageMaker Studio Lifecycle Configuration. *

* * @param creationTime * The creation time of the Amazon SageMaker 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 Amazon SageMaker Studio Lifecycle Configurations are * immutable. *

* * @param lastModifiedTime * This value is equivalent to CreationTime because Amazon SageMaker 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 App type to which the Lifecycle Configuration is attached. *

* * @param studioLifecycleConfigAppType * The App type to which the Lifecycle Configuration is attached. * @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 to which the Lifecycle Configuration is attached. *

* * @param studioLifecycleConfigAppType * The App type to which the Lifecycle Configuration is attached. * @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 implements Builder { private String studioLifecycleConfigArn; private String studioLifecycleConfigName; private Instant creationTime; private Instant lastModifiedTime; private String studioLifecycleConfigAppType; private BuilderImpl() { } private BuilderImpl(StudioLifecycleConfigDetails model) { studioLifecycleConfigArn(model.studioLifecycleConfigArn); studioLifecycleConfigName(model.studioLifecycleConfigName); creationTime(model.creationTime); lastModifiedTime(model.lastModifiedTime); studioLifecycleConfigAppType(model.studioLifecycleConfigAppType); } public final String getStudioLifecycleConfigArn() { return studioLifecycleConfigArn; } public final void setStudioLifecycleConfigArn(String studioLifecycleConfigArn) { this.studioLifecycleConfigArn = studioLifecycleConfigArn; } @Override 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 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 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 public final Builder lastModifiedTime(Instant lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; return this; } public final String getStudioLifecycleConfigAppType() { return studioLifecycleConfigAppType; } public final void setStudioLifecycleConfigAppType(String studioLifecycleConfigAppType) { this.studioLifecycleConfigAppType = studioLifecycleConfigAppType; } @Override public final Builder studioLifecycleConfigAppType(String studioLifecycleConfigAppType) { this.studioLifecycleConfigAppType = studioLifecycleConfigAppType; return this; } @Override public final Builder studioLifecycleConfigAppType(StudioLifecycleConfigAppType studioLifecycleConfigAppType) { this.studioLifecycleConfigAppType(studioLifecycleConfigAppType == null ? null : studioLifecycleConfigAppType .toString()); return this; } @Override public StudioLifecycleConfigDetails build() { return new StudioLifecycleConfigDetails(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy