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

software.amazon.awssdk.services.sagemaker.model.FeatureGroup 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.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
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 java.util.stream.Collectors;
import java.util.stream.Stream;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Amazon SageMaker Feature Store stores features in a collection called Feature Group. A Feature Group can be * visualized as a table which has rows, with a unique identifier for each row where each column in the table is a * feature. In principle, a Feature Group is composed of features and values per features. *

*/ @Generated("software.amazon.awssdk:codegen") public final class FeatureGroup implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField FEATURE_GROUP_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FeatureGroupArn").getter(getter(FeatureGroup::featureGroupArn)).setter(setter(Builder::featureGroupArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FeatureGroupArn").build()).build(); private static final SdkField FEATURE_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FeatureGroupName").getter(getter(FeatureGroup::featureGroupName)) .setter(setter(Builder::featureGroupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FeatureGroupName").build()).build(); private static final SdkField RECORD_IDENTIFIER_FEATURE_NAME_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("RecordIdentifierFeatureName") .getter(getter(FeatureGroup::recordIdentifierFeatureName)) .setter(setter(Builder::recordIdentifierFeatureName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecordIdentifierFeatureName") .build()).build(); private static final SdkField EVENT_TIME_FEATURE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EventTimeFeatureName").getter(getter(FeatureGroup::eventTimeFeatureName)) .setter(setter(Builder::eventTimeFeatureName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EventTimeFeatureName").build()) .build(); private static final SdkField> FEATURE_DEFINITIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("FeatureDefinitions") .getter(getter(FeatureGroup::featureDefinitions)) .setter(setter(Builder::featureDefinitions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FeatureDefinitions").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(FeatureDefinition::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreationTime").getter(getter(FeatureGroup::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(FeatureGroup::lastModifiedTime)) .setter(setter(Builder::lastModifiedTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedTime").build()).build(); private static final SdkField ONLINE_STORE_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("OnlineStoreConfig") .getter(getter(FeatureGroup::onlineStoreConfig)).setter(setter(Builder::onlineStoreConfig)) .constructor(OnlineStoreConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OnlineStoreConfig").build()).build(); private static final SdkField OFFLINE_STORE_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("OfflineStoreConfig") .getter(getter(FeatureGroup::offlineStoreConfig)).setter(setter(Builder::offlineStoreConfig)) .constructor(OfflineStoreConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OfflineStoreConfig").build()) .build(); private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RoleArn").getter(getter(FeatureGroup::roleArn)).setter(setter(Builder::roleArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleArn").build()).build(); private static final SdkField FEATURE_GROUP_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FeatureGroupStatus").getter(getter(FeatureGroup::featureGroupStatusAsString)) .setter(setter(Builder::featureGroupStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FeatureGroupStatus").build()) .build(); private static final SdkField OFFLINE_STORE_STATUS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("OfflineStoreStatus") .getter(getter(FeatureGroup::offlineStoreStatus)).setter(setter(Builder::offlineStoreStatus)) .constructor(OfflineStoreStatus::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OfflineStoreStatus").build()) .build(); private static final SdkField LAST_UPDATE_STATUS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("LastUpdateStatus") .getter(getter(FeatureGroup::lastUpdateStatus)).setter(setter(Builder::lastUpdateStatus)) .constructor(LastUpdateStatus::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastUpdateStatus").build()).build(); private static final SdkField FAILURE_REASON_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FailureReason").getter(getter(FeatureGroup::failureReason)).setter(setter(Builder::failureReason)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureReason").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Description").getter(getter(FeatureGroup::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(FeatureGroup::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Tag::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FEATURE_GROUP_ARN_FIELD, FEATURE_GROUP_NAME_FIELD, RECORD_IDENTIFIER_FEATURE_NAME_FIELD, EVENT_TIME_FEATURE_NAME_FIELD, FEATURE_DEFINITIONS_FIELD, CREATION_TIME_FIELD, LAST_MODIFIED_TIME_FIELD, ONLINE_STORE_CONFIG_FIELD, OFFLINE_STORE_CONFIG_FIELD, ROLE_ARN_FIELD, FEATURE_GROUP_STATUS_FIELD, OFFLINE_STORE_STATUS_FIELD, LAST_UPDATE_STATUS_FIELD, FAILURE_REASON_FIELD, DESCRIPTION_FIELD, TAGS_FIELD)); private static final long serialVersionUID = 1L; private final String featureGroupArn; private final String featureGroupName; private final String recordIdentifierFeatureName; private final String eventTimeFeatureName; private final List featureDefinitions; private final Instant creationTime; private final Instant lastModifiedTime; private final OnlineStoreConfig onlineStoreConfig; private final OfflineStoreConfig offlineStoreConfig; private final String roleArn; private final String featureGroupStatus; private final OfflineStoreStatus offlineStoreStatus; private final LastUpdateStatus lastUpdateStatus; private final String failureReason; private final String description; private final List tags; private FeatureGroup(BuilderImpl builder) { this.featureGroupArn = builder.featureGroupArn; this.featureGroupName = builder.featureGroupName; this.recordIdentifierFeatureName = builder.recordIdentifierFeatureName; this.eventTimeFeatureName = builder.eventTimeFeatureName; this.featureDefinitions = builder.featureDefinitions; this.creationTime = builder.creationTime; this.lastModifiedTime = builder.lastModifiedTime; this.onlineStoreConfig = builder.onlineStoreConfig; this.offlineStoreConfig = builder.offlineStoreConfig; this.roleArn = builder.roleArn; this.featureGroupStatus = builder.featureGroupStatus; this.offlineStoreStatus = builder.offlineStoreStatus; this.lastUpdateStatus = builder.lastUpdateStatus; this.failureReason = builder.failureReason; this.description = builder.description; this.tags = builder.tags; } /** *

* The Amazon Resource Name (ARN) of a FeatureGroup. *

* * @return The Amazon Resource Name (ARN) of a FeatureGroup. */ public final String featureGroupArn() { return featureGroupArn; } /** *

* The name of the FeatureGroup. *

* * @return The name of the FeatureGroup. */ public final String featureGroupName() { return featureGroupName; } /** *

* The name of the Feature whose value uniquely identifies a Record defined in the * FeatureGroup FeatureDefinitions. *

* * @return The name of the Feature whose value uniquely identifies a Record defined in the * FeatureGroup FeatureDefinitions. */ public final String recordIdentifierFeatureName() { return recordIdentifierFeatureName; } /** *

* The name of the feature that stores the EventTime of a Record in a FeatureGroup. *

*

* A EventTime is point in time when a new event occurs that corresponds to the creation or update of a * Record in FeatureGroup. All Records in the FeatureGroup must * have a corresponding EventTime. *

* * @return The name of the feature that stores the EventTime of a Record in a FeatureGroup * .

*

* A EventTime is point in time when a new event occurs that corresponds to the creation or * update of a Record in FeatureGroup. All Records in the * FeatureGroup must have a corresponding EventTime. */ public final String eventTimeFeatureName() { return eventTimeFeatureName; } /** * For responses, this returns true if the service returned a value for the FeatureDefinitions property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasFeatureDefinitions() { return featureDefinitions != null && !(featureDefinitions instanceof SdkAutoConstructList); } /** *

* A list of Features. Each Feature must include a FeatureName and a * FeatureType. *

*

* Valid FeatureTypes are Integral, Fractional and String. *

*

* FeatureNames cannot be any of the following: is_deleted, write_time, * api_invocation_time. *

*

* You can create up to 2,500 FeatureDefinitions per FeatureGroup. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasFeatureDefinitions} method. *

* * @return A list of Features. Each Feature must include a FeatureName and a * FeatureType.

*

* Valid FeatureTypes are Integral, Fractional and * String. *

*

* FeatureNames cannot be any of the following: is_deleted, * write_time, api_invocation_time. *

*

* You can create up to 2,500 FeatureDefinitions per FeatureGroup. */ public final List featureDefinitions() { return featureDefinitions; } /** *

* The time a FeatureGroup was created. *

* * @return The time a FeatureGroup was created. */ public final Instant creationTime() { return creationTime; } /** *

* A timestamp indicating the last time you updated the feature group. *

* * @return A timestamp indicating the last time you updated the feature group. */ public final Instant lastModifiedTime() { return lastModifiedTime; } /** * Returns the value of the OnlineStoreConfig property for this object. * * @return The value of the OnlineStoreConfig property for this object. */ public final OnlineStoreConfig onlineStoreConfig() { return onlineStoreConfig; } /** * Returns the value of the OfflineStoreConfig property for this object. * * @return The value of the OfflineStoreConfig property for this object. */ public final OfflineStoreConfig offlineStoreConfig() { return offlineStoreConfig; } /** *

* The Amazon Resource Name (ARN) of the IAM execution role used to create the feature group. *

* * @return The Amazon Resource Name (ARN) of the IAM execution role used to create the feature group. */ public final String roleArn() { return roleArn; } /** *

* A FeatureGroup status. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #featureGroupStatus} will return {@link FeatureGroupStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #featureGroupStatusAsString}. *

* * @return A FeatureGroup status. * @see FeatureGroupStatus */ public final FeatureGroupStatus featureGroupStatus() { return FeatureGroupStatus.fromValue(featureGroupStatus); } /** *

* A FeatureGroup status. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #featureGroupStatus} will return {@link FeatureGroupStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #featureGroupStatusAsString}. *

* * @return A FeatureGroup status. * @see FeatureGroupStatus */ public final String featureGroupStatusAsString() { return featureGroupStatus; } /** * Returns the value of the OfflineStoreStatus property for this object. * * @return The value of the OfflineStoreStatus property for this object. */ public final OfflineStoreStatus offlineStoreStatus() { return offlineStoreStatus; } /** *

* A value that indicates whether the feature group was updated successfully. *

* * @return A value that indicates whether the feature group was updated successfully. */ public final LastUpdateStatus lastUpdateStatus() { return lastUpdateStatus; } /** *

* The reason that the FeatureGroup failed to be replicated in the OfflineStore. This is * failure may be due to a failure to create a FeatureGroup in or delete a FeatureGroup * from the OfflineStore. *

* * @return The reason that the FeatureGroup failed to be replicated in the OfflineStore. * This is failure may be due to a failure to create a FeatureGroup in or delete a * FeatureGroup from the OfflineStore. */ public final String failureReason() { return failureReason; } /** *

* A free form description of a FeatureGroup. *

* * @return A free form description of a FeatureGroup. */ public final String description() { return description; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* Tags used to define a FeatureGroup. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

* * @return Tags used to define a FeatureGroup. */ public final List tags() { return tags; } @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(featureGroupArn()); hashCode = 31 * hashCode + Objects.hashCode(featureGroupName()); hashCode = 31 * hashCode + Objects.hashCode(recordIdentifierFeatureName()); hashCode = 31 * hashCode + Objects.hashCode(eventTimeFeatureName()); hashCode = 31 * hashCode + Objects.hashCode(hasFeatureDefinitions() ? featureDefinitions() : null); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedTime()); hashCode = 31 * hashCode + Objects.hashCode(onlineStoreConfig()); hashCode = 31 * hashCode + Objects.hashCode(offlineStoreConfig()); hashCode = 31 * hashCode + Objects.hashCode(roleArn()); hashCode = 31 * hashCode + Objects.hashCode(featureGroupStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(offlineStoreStatus()); hashCode = 31 * hashCode + Objects.hashCode(lastUpdateStatus()); hashCode = 31 * hashCode + Objects.hashCode(failureReason()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); 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 FeatureGroup)) { return false; } FeatureGroup other = (FeatureGroup) obj; return Objects.equals(featureGroupArn(), other.featureGroupArn()) && Objects.equals(featureGroupName(), other.featureGroupName()) && Objects.equals(recordIdentifierFeatureName(), other.recordIdentifierFeatureName()) && Objects.equals(eventTimeFeatureName(), other.eventTimeFeatureName()) && hasFeatureDefinitions() == other.hasFeatureDefinitions() && Objects.equals(featureDefinitions(), other.featureDefinitions()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(lastModifiedTime(), other.lastModifiedTime()) && Objects.equals(onlineStoreConfig(), other.onlineStoreConfig()) && Objects.equals(offlineStoreConfig(), other.offlineStoreConfig()) && Objects.equals(roleArn(), other.roleArn()) && Objects.equals(featureGroupStatusAsString(), other.featureGroupStatusAsString()) && Objects.equals(offlineStoreStatus(), other.offlineStoreStatus()) && Objects.equals(lastUpdateStatus(), other.lastUpdateStatus()) && Objects.equals(failureReason(), other.failureReason()) && Objects.equals(description(), other.description()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()); } /** * 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("FeatureGroup").add("FeatureGroupArn", featureGroupArn()) .add("FeatureGroupName", featureGroupName()).add("RecordIdentifierFeatureName", recordIdentifierFeatureName()) .add("EventTimeFeatureName", eventTimeFeatureName()) .add("FeatureDefinitions", hasFeatureDefinitions() ? featureDefinitions() : null) .add("CreationTime", creationTime()).add("LastModifiedTime", lastModifiedTime()) .add("OnlineStoreConfig", onlineStoreConfig()).add("OfflineStoreConfig", offlineStoreConfig()) .add("RoleArn", roleArn()).add("FeatureGroupStatus", featureGroupStatusAsString()) .add("OfflineStoreStatus", offlineStoreStatus()).add("LastUpdateStatus", lastUpdateStatus()) .add("FailureReason", failureReason()).add("Description", description()).add("Tags", hasTags() ? tags() : null) .build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "FeatureGroupArn": return Optional.ofNullable(clazz.cast(featureGroupArn())); case "FeatureGroupName": return Optional.ofNullable(clazz.cast(featureGroupName())); case "RecordIdentifierFeatureName": return Optional.ofNullable(clazz.cast(recordIdentifierFeatureName())); case "EventTimeFeatureName": return Optional.ofNullable(clazz.cast(eventTimeFeatureName())); case "FeatureDefinitions": return Optional.ofNullable(clazz.cast(featureDefinitions())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "LastModifiedTime": return Optional.ofNullable(clazz.cast(lastModifiedTime())); case "OnlineStoreConfig": return Optional.ofNullable(clazz.cast(onlineStoreConfig())); case "OfflineStoreConfig": return Optional.ofNullable(clazz.cast(offlineStoreConfig())); case "RoleArn": return Optional.ofNullable(clazz.cast(roleArn())); case "FeatureGroupStatus": return Optional.ofNullable(clazz.cast(featureGroupStatusAsString())); case "OfflineStoreStatus": return Optional.ofNullable(clazz.cast(offlineStoreStatus())); case "LastUpdateStatus": return Optional.ofNullable(clazz.cast(lastUpdateStatus())); case "FailureReason": return Optional.ofNullable(clazz.cast(failureReason())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((FeatureGroup) 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 a FeatureGroup. *

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

* The name of the FeatureGroup. *

* * @param featureGroupName * The name of the FeatureGroup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder featureGroupName(String featureGroupName); /** *

* The name of the Feature whose value uniquely identifies a Record defined in the * FeatureGroup FeatureDefinitions. *

* * @param recordIdentifierFeatureName * The name of the Feature whose value uniquely identifies a Record defined in * the FeatureGroup FeatureDefinitions. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recordIdentifierFeatureName(String recordIdentifierFeatureName); /** *

* The name of the feature that stores the EventTime of a Record in a FeatureGroup. *

*

* A EventTime is point in time when a new event occurs that corresponds to the creation or update * of a Record in FeatureGroup. All Records in the * FeatureGroup must have a corresponding EventTime. *

* * @param eventTimeFeatureName * The name of the feature that stores the EventTime of a Record in a * FeatureGroup.

*

* A EventTime is point in time when a new event occurs that corresponds to the creation or * update of a Record in FeatureGroup. All Records in the * FeatureGroup must have a corresponding EventTime. * @return Returns a reference to this object so that method calls can be chained together. */ Builder eventTimeFeatureName(String eventTimeFeatureName); /** *

* A list of Features. Each Feature must include a FeatureName and a * FeatureType. *

*

* Valid FeatureTypes are Integral, Fractional and String. *

*

* FeatureNames cannot be any of the following: is_deleted, write_time, * api_invocation_time. *

*

* You can create up to 2,500 FeatureDefinitions per FeatureGroup. *

* * @param featureDefinitions * A list of Features. Each Feature must include a FeatureName and * a FeatureType.

*

* Valid FeatureTypes are Integral, Fractional and * String. *

*

* FeatureNames cannot be any of the following: is_deleted, * write_time, api_invocation_time. *

*

* You can create up to 2,500 FeatureDefinitions per FeatureGroup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder featureDefinitions(Collection featureDefinitions); /** *

* A list of Features. Each Feature must include a FeatureName and a * FeatureType. *

*

* Valid FeatureTypes are Integral, Fractional and String. *

*

* FeatureNames cannot be any of the following: is_deleted, write_time, * api_invocation_time. *

*

* You can create up to 2,500 FeatureDefinitions per FeatureGroup. *

* * @param featureDefinitions * A list of Features. Each Feature must include a FeatureName and * a FeatureType.

*

* Valid FeatureTypes are Integral, Fractional and * String. *

*

* FeatureNames cannot be any of the following: is_deleted, * write_time, api_invocation_time. *

*

* You can create up to 2,500 FeatureDefinitions per FeatureGroup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder featureDefinitions(FeatureDefinition... featureDefinitions); /** *

* A list of Features. Each Feature must include a FeatureName and a * FeatureType. *

*

* Valid FeatureTypes are Integral, Fractional and String. *

*

* FeatureNames cannot be any of the following: is_deleted, write_time, * api_invocation_time. *

*

* You can create up to 2,500 FeatureDefinitions per FeatureGroup. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.sagemaker.model.FeatureDefinition.Builder} avoiding the need to create * one manually via {@link software.amazon.awssdk.services.sagemaker.model.FeatureDefinition#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.sagemaker.model.FeatureDefinition.Builder#build()} is called * immediately and its result is passed to {@link #featureDefinitions(List)}. * * @param featureDefinitions * a consumer that will call methods on * {@link software.amazon.awssdk.services.sagemaker.model.FeatureDefinition.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #featureDefinitions(java.util.Collection) */ Builder featureDefinitions(Consumer... featureDefinitions); /** *

* The time a FeatureGroup was created. *

* * @param creationTime * The time a FeatureGroup was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTime(Instant creationTime); /** *

* A timestamp indicating the last time you updated the feature group. *

* * @param lastModifiedTime * A timestamp indicating the last time you updated the feature group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedTime(Instant lastModifiedTime); /** * Sets the value of the OnlineStoreConfig property for this object. * * @param onlineStoreConfig * The new value for the OnlineStoreConfig property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder onlineStoreConfig(OnlineStoreConfig onlineStoreConfig); /** * Sets the value of the OnlineStoreConfig property for this object. * * This is a convenience method that creates an instance of the {@link OnlineStoreConfig.Builder} avoiding the * need to create one manually via {@link OnlineStoreConfig#builder()}. * *

* When the {@link Consumer} completes, {@link OnlineStoreConfig.Builder#build()} is called immediately and its * result is passed to {@link #onlineStoreConfig(OnlineStoreConfig)}. * * @param onlineStoreConfig * a consumer that will call methods on {@link OnlineStoreConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #onlineStoreConfig(OnlineStoreConfig) */ default Builder onlineStoreConfig(Consumer onlineStoreConfig) { return onlineStoreConfig(OnlineStoreConfig.builder().applyMutation(onlineStoreConfig).build()); } /** * Sets the value of the OfflineStoreConfig property for this object. * * @param offlineStoreConfig * The new value for the OfflineStoreConfig property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder offlineStoreConfig(OfflineStoreConfig offlineStoreConfig); /** * Sets the value of the OfflineStoreConfig property for this object. * * This is a convenience method that creates an instance of the {@link OfflineStoreConfig.Builder} avoiding the * need to create one manually via {@link OfflineStoreConfig#builder()}. * *

* When the {@link Consumer} completes, {@link OfflineStoreConfig.Builder#build()} is called immediately and its * result is passed to {@link #offlineStoreConfig(OfflineStoreConfig)}. * * @param offlineStoreConfig * a consumer that will call methods on {@link OfflineStoreConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #offlineStoreConfig(OfflineStoreConfig) */ default Builder offlineStoreConfig(Consumer offlineStoreConfig) { return offlineStoreConfig(OfflineStoreConfig.builder().applyMutation(offlineStoreConfig).build()); } /** *

* The Amazon Resource Name (ARN) of the IAM execution role used to create the feature group. *

* * @param roleArn * The Amazon Resource Name (ARN) of the IAM execution role used to create the feature group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleArn(String roleArn); /** *

* A FeatureGroup status. *

* * @param featureGroupStatus * A FeatureGroup status. * @see FeatureGroupStatus * @return Returns a reference to this object so that method calls can be chained together. * @see FeatureGroupStatus */ Builder featureGroupStatus(String featureGroupStatus); /** *

* A FeatureGroup status. *

* * @param featureGroupStatus * A FeatureGroup status. * @see FeatureGroupStatus * @return Returns a reference to this object so that method calls can be chained together. * @see FeatureGroupStatus */ Builder featureGroupStatus(FeatureGroupStatus featureGroupStatus); /** * Sets the value of the OfflineStoreStatus property for this object. * * @param offlineStoreStatus * The new value for the OfflineStoreStatus property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder offlineStoreStatus(OfflineStoreStatus offlineStoreStatus); /** * Sets the value of the OfflineStoreStatus property for this object. * * This is a convenience method that creates an instance of the {@link OfflineStoreStatus.Builder} avoiding the * need to create one manually via {@link OfflineStoreStatus#builder()}. * *

* When the {@link Consumer} completes, {@link OfflineStoreStatus.Builder#build()} is called immediately and its * result is passed to {@link #offlineStoreStatus(OfflineStoreStatus)}. * * @param offlineStoreStatus * a consumer that will call methods on {@link OfflineStoreStatus.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #offlineStoreStatus(OfflineStoreStatus) */ default Builder offlineStoreStatus(Consumer offlineStoreStatus) { return offlineStoreStatus(OfflineStoreStatus.builder().applyMutation(offlineStoreStatus).build()); } /** *

* A value that indicates whether the feature group was updated successfully. *

* * @param lastUpdateStatus * A value that indicates whether the feature group was updated successfully. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastUpdateStatus(LastUpdateStatus lastUpdateStatus); /** *

* A value that indicates whether the feature group was updated successfully. *

* This is a convenience method that creates an instance of the {@link LastUpdateStatus.Builder} avoiding the * need to create one manually via {@link LastUpdateStatus#builder()}. * *

* When the {@link Consumer} completes, {@link LastUpdateStatus.Builder#build()} is called immediately and its * result is passed to {@link #lastUpdateStatus(LastUpdateStatus)}. * * @param lastUpdateStatus * a consumer that will call methods on {@link LastUpdateStatus.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #lastUpdateStatus(LastUpdateStatus) */ default Builder lastUpdateStatus(Consumer lastUpdateStatus) { return lastUpdateStatus(LastUpdateStatus.builder().applyMutation(lastUpdateStatus).build()); } /** *

* The reason that the FeatureGroup failed to be replicated in the OfflineStore. This * is failure may be due to a failure to create a FeatureGroup in or delete a * FeatureGroup from the OfflineStore. *

* * @param failureReason * The reason that the FeatureGroup failed to be replicated in the OfflineStore * . This is failure may be due to a failure to create a FeatureGroup in or delete a * FeatureGroup from the OfflineStore. * @return Returns a reference to this object so that method calls can be chained together. */ Builder failureReason(String failureReason); /** *

* A free form description of a FeatureGroup. *

* * @param description * A free form description of a FeatureGroup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* Tags used to define a FeatureGroup. *

* * @param tags * Tags used to define a FeatureGroup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* Tags used to define a FeatureGroup. *

* * @param tags * Tags used to define a FeatureGroup. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* Tags used to define a FeatureGroup. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.sagemaker.model.Tag.Builder} avoiding the need to create one manually * via {@link software.amazon.awssdk.services.sagemaker.model.Tag#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.sagemaker.model.Tag.Builder#build()} is called immediately and its * result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on * {@link software.amazon.awssdk.services.sagemaker.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); } static final class BuilderImpl implements Builder { private String featureGroupArn; private String featureGroupName; private String recordIdentifierFeatureName; private String eventTimeFeatureName; private List featureDefinitions = DefaultSdkAutoConstructList.getInstance(); private Instant creationTime; private Instant lastModifiedTime; private OnlineStoreConfig onlineStoreConfig; private OfflineStoreConfig offlineStoreConfig; private String roleArn; private String featureGroupStatus; private OfflineStoreStatus offlineStoreStatus; private LastUpdateStatus lastUpdateStatus; private String failureReason; private String description; private List tags = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(FeatureGroup model) { featureGroupArn(model.featureGroupArn); featureGroupName(model.featureGroupName); recordIdentifierFeatureName(model.recordIdentifierFeatureName); eventTimeFeatureName(model.eventTimeFeatureName); featureDefinitions(model.featureDefinitions); creationTime(model.creationTime); lastModifiedTime(model.lastModifiedTime); onlineStoreConfig(model.onlineStoreConfig); offlineStoreConfig(model.offlineStoreConfig); roleArn(model.roleArn); featureGroupStatus(model.featureGroupStatus); offlineStoreStatus(model.offlineStoreStatus); lastUpdateStatus(model.lastUpdateStatus); failureReason(model.failureReason); description(model.description); tags(model.tags); } public final String getFeatureGroupArn() { return featureGroupArn; } public final void setFeatureGroupArn(String featureGroupArn) { this.featureGroupArn = featureGroupArn; } @Override public final Builder featureGroupArn(String featureGroupArn) { this.featureGroupArn = featureGroupArn; return this; } public final String getFeatureGroupName() { return featureGroupName; } public final void setFeatureGroupName(String featureGroupName) { this.featureGroupName = featureGroupName; } @Override public final Builder featureGroupName(String featureGroupName) { this.featureGroupName = featureGroupName; return this; } public final String getRecordIdentifierFeatureName() { return recordIdentifierFeatureName; } public final void setRecordIdentifierFeatureName(String recordIdentifierFeatureName) { this.recordIdentifierFeatureName = recordIdentifierFeatureName; } @Override public final Builder recordIdentifierFeatureName(String recordIdentifierFeatureName) { this.recordIdentifierFeatureName = recordIdentifierFeatureName; return this; } public final String getEventTimeFeatureName() { return eventTimeFeatureName; } public final void setEventTimeFeatureName(String eventTimeFeatureName) { this.eventTimeFeatureName = eventTimeFeatureName; } @Override public final Builder eventTimeFeatureName(String eventTimeFeatureName) { this.eventTimeFeatureName = eventTimeFeatureName; return this; } public final List getFeatureDefinitions() { List result = FeatureDefinitionsCopier.copyToBuilder(this.featureDefinitions); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setFeatureDefinitions(Collection featureDefinitions) { this.featureDefinitions = FeatureDefinitionsCopier.copyFromBuilder(featureDefinitions); } @Override public final Builder featureDefinitions(Collection featureDefinitions) { this.featureDefinitions = FeatureDefinitionsCopier.copy(featureDefinitions); return this; } @Override @SafeVarargs public final Builder featureDefinitions(FeatureDefinition... featureDefinitions) { featureDefinitions(Arrays.asList(featureDefinitions)); return this; } @Override @SafeVarargs public final Builder featureDefinitions(Consumer... featureDefinitions) { featureDefinitions(Stream.of(featureDefinitions).map(c -> FeatureDefinition.builder().applyMutation(c).build()) .collect(Collectors.toList())); 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 OnlineStoreConfig.Builder getOnlineStoreConfig() { return onlineStoreConfig != null ? onlineStoreConfig.toBuilder() : null; } public final void setOnlineStoreConfig(OnlineStoreConfig.BuilderImpl onlineStoreConfig) { this.onlineStoreConfig = onlineStoreConfig != null ? onlineStoreConfig.build() : null; } @Override public final Builder onlineStoreConfig(OnlineStoreConfig onlineStoreConfig) { this.onlineStoreConfig = onlineStoreConfig; return this; } public final OfflineStoreConfig.Builder getOfflineStoreConfig() { return offlineStoreConfig != null ? offlineStoreConfig.toBuilder() : null; } public final void setOfflineStoreConfig(OfflineStoreConfig.BuilderImpl offlineStoreConfig) { this.offlineStoreConfig = offlineStoreConfig != null ? offlineStoreConfig.build() : null; } @Override public final Builder offlineStoreConfig(OfflineStoreConfig offlineStoreConfig) { this.offlineStoreConfig = offlineStoreConfig; return this; } public final String getRoleArn() { return roleArn; } public final void setRoleArn(String roleArn) { this.roleArn = roleArn; } @Override public final Builder roleArn(String roleArn) { this.roleArn = roleArn; return this; } public final String getFeatureGroupStatus() { return featureGroupStatus; } public final void setFeatureGroupStatus(String featureGroupStatus) { this.featureGroupStatus = featureGroupStatus; } @Override public final Builder featureGroupStatus(String featureGroupStatus) { this.featureGroupStatus = featureGroupStatus; return this; } @Override public final Builder featureGroupStatus(FeatureGroupStatus featureGroupStatus) { this.featureGroupStatus(featureGroupStatus == null ? null : featureGroupStatus.toString()); return this; } public final OfflineStoreStatus.Builder getOfflineStoreStatus() { return offlineStoreStatus != null ? offlineStoreStatus.toBuilder() : null; } public final void setOfflineStoreStatus(OfflineStoreStatus.BuilderImpl offlineStoreStatus) { this.offlineStoreStatus = offlineStoreStatus != null ? offlineStoreStatus.build() : null; } @Override public final Builder offlineStoreStatus(OfflineStoreStatus offlineStoreStatus) { this.offlineStoreStatus = offlineStoreStatus; return this; } public final LastUpdateStatus.Builder getLastUpdateStatus() { return lastUpdateStatus != null ? lastUpdateStatus.toBuilder() : null; } public final void setLastUpdateStatus(LastUpdateStatus.BuilderImpl lastUpdateStatus) { this.lastUpdateStatus = lastUpdateStatus != null ? lastUpdateStatus.build() : null; } @Override public final Builder lastUpdateStatus(LastUpdateStatus lastUpdateStatus) { this.lastUpdateStatus = lastUpdateStatus; return this; } public final String getFailureReason() { return failureReason; } public final void setFailureReason(String failureReason) { this.failureReason = failureReason; } @Override public final Builder failureReason(String failureReason) { this.failureReason = failureReason; return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } @Override public FeatureGroup build() { return new FeatureGroup(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy