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

software.amazon.awssdk.services.sagemaker.model.CreateAutoMlJobV2Request 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.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.awscore.AwsRequestOverrideConfiguration;
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;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class CreateAutoMlJobV2Request extends SageMakerRequest implements
        ToCopyableBuilder {
    private static final SdkField AUTO_ML_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("AutoMLJobName").getter(getter(CreateAutoMlJobV2Request::autoMLJobName))
            .setter(setter(Builder::autoMLJobName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMLJobName").build()).build();

    private static final SdkField> AUTO_ML_JOB_INPUT_DATA_CONFIG_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("AutoMLJobInputDataConfig")
            .getter(getter(CreateAutoMlJobV2Request::autoMLJobInputDataConfig))
            .setter(setter(Builder::autoMLJobInputDataConfig))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMLJobInputDataConfig").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(AutoMLJobChannel::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField OUTPUT_DATA_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("OutputDataConfig")
            .getter(getter(CreateAutoMlJobV2Request::outputDataConfig)).setter(setter(Builder::outputDataConfig))
            .constructor(AutoMLOutputDataConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputDataConfig").build()).build();

    private static final SdkField AUTO_ML_PROBLEM_TYPE_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("AutoMLProblemTypeConfig")
            .getter(getter(CreateAutoMlJobV2Request::autoMLProblemTypeConfig)).setter(setter(Builder::autoMLProblemTypeConfig))
            .constructor(AutoMLProblemTypeConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMLProblemTypeConfig").build())
            .build();

    private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("RoleArn").getter(getter(CreateAutoMlJobV2Request::roleArn)).setter(setter(Builder::roleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RoleArn").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Tags")
            .getter(getter(CreateAutoMlJobV2Request::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 SdkField SECURITY_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("SecurityConfig")
            .getter(getter(CreateAutoMlJobV2Request::securityConfig)).setter(setter(Builder::securityConfig))
            .constructor(AutoMLSecurityConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecurityConfig").build()).build();

    private static final SdkField AUTO_ML_JOB_OBJECTIVE_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("AutoMLJobObjective")
            .getter(getter(CreateAutoMlJobV2Request::autoMLJobObjective)).setter(setter(Builder::autoMLJobObjective))
            .constructor(AutoMLJobObjective::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMLJobObjective").build())
            .build();

    private static final SdkField MODEL_DEPLOY_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("ModelDeployConfig")
            .getter(getter(CreateAutoMlJobV2Request::modelDeployConfig)).setter(setter(Builder::modelDeployConfig))
            .constructor(ModelDeployConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ModelDeployConfig").build()).build();

    private static final SdkField DATA_SPLIT_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("DataSplitConfig")
            .getter(getter(CreateAutoMlJobV2Request::dataSplitConfig)).setter(setter(Builder::dataSplitConfig))
            .constructor(AutoMLDataSplitConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataSplitConfig").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AUTO_ML_JOB_NAME_FIELD,
            AUTO_ML_JOB_INPUT_DATA_CONFIG_FIELD, OUTPUT_DATA_CONFIG_FIELD, AUTO_ML_PROBLEM_TYPE_CONFIG_FIELD, ROLE_ARN_FIELD,
            TAGS_FIELD, SECURITY_CONFIG_FIELD, AUTO_ML_JOB_OBJECTIVE_FIELD, MODEL_DEPLOY_CONFIG_FIELD, DATA_SPLIT_CONFIG_FIELD));

    private final String autoMLJobName;

    private final List autoMLJobInputDataConfig;

    private final AutoMLOutputDataConfig outputDataConfig;

    private final AutoMLProblemTypeConfig autoMLProblemTypeConfig;

    private final String roleArn;

    private final List tags;

    private final AutoMLSecurityConfig securityConfig;

    private final AutoMLJobObjective autoMLJobObjective;

    private final ModelDeployConfig modelDeployConfig;

    private final AutoMLDataSplitConfig dataSplitConfig;

    private CreateAutoMlJobV2Request(BuilderImpl builder) {
        super(builder);
        this.autoMLJobName = builder.autoMLJobName;
        this.autoMLJobInputDataConfig = builder.autoMLJobInputDataConfig;
        this.outputDataConfig = builder.outputDataConfig;
        this.autoMLProblemTypeConfig = builder.autoMLProblemTypeConfig;
        this.roleArn = builder.roleArn;
        this.tags = builder.tags;
        this.securityConfig = builder.securityConfig;
        this.autoMLJobObjective = builder.autoMLJobObjective;
        this.modelDeployConfig = builder.modelDeployConfig;
        this.dataSplitConfig = builder.dataSplitConfig;
    }

    /**
     * 

* Identifies an Autopilot job. The name must be unique to your account and is case insensitive. *

* * @return Identifies an Autopilot job. The name must be unique to your account and is case insensitive. */ public final String autoMLJobName() { return autoMLJobName; } /** * For responses, this returns true if the service returned a value for the AutoMLJobInputDataConfig 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 hasAutoMLJobInputDataConfig() { return autoMLJobInputDataConfig != null && !(autoMLJobInputDataConfig instanceof SdkAutoConstructList); } /** *

* An array of channel objects describing the input data and their location. Each channel is a named input source. * Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported formats depend * on the problem type: *

*
    *
  • *

    * For tabular problem types: S3Prefix, ManifestFile. *

    *
  • *
  • *

    * For image classification: S3Prefix, ManifestFile, AugmentedManifestFile. *

    *
  • *
  • *

    * For text classification: S3Prefix. *

    *
  • *
  • *

    * For time-series forecasting: S3Prefix. *

    *
  • *
*

* 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 #hasAutoMLJobInputDataConfig} method. *

* * @return An array of channel objects describing the input data and their location. Each channel is a named input * source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported * formats depend on the problem type:

*
    *
  • *

    * For tabular problem types: S3Prefix, ManifestFile. *

    *
  • *
  • *

    * For image classification: S3Prefix, ManifestFile, * AugmentedManifestFile. *

    *
  • *
  • *

    * For text classification: S3Prefix. *

    *
  • *
  • *

    * For time-series forecasting: S3Prefix. *

    *
  • */ public final List autoMLJobInputDataConfig() { return autoMLJobInputDataConfig; } /** *

    * Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. *

    * * @return Provides information about encryption and the Amazon S3 output path needed to store artifacts from an * AutoML job. */ public final AutoMLOutputDataConfig outputDataConfig() { return outputDataConfig; } /** *

    * Defines the configuration settings of one of the supported problem types. *

    * * @return Defines the configuration settings of one of the supported problem types. */ public final AutoMLProblemTypeConfig autoMLProblemTypeConfig() { return autoMLProblemTypeConfig; } /** *

    * The ARN of the role that is used to access the data. *

    * * @return The ARN of the role that is used to access the data. */ public final String roleArn() { return roleArn; } /** * 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); } /** *

    * An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, * such as by purpose, owner, or environment. For more information, see Tagging Amazon Web ServicesResources. * Tag keys must be unique per resource. *

    *

    * 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 An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in * different ways, such as by purpose, owner, or environment. For more information, see Tagging Amazon Web * ServicesResources. Tag keys must be unique per resource. */ public final List tags() { return tags; } /** *

    * The security configuration for traffic encryption or Amazon VPC settings. *

    * * @return The security configuration for traffic encryption or Amazon VPC settings. */ public final AutoMLSecurityConfig securityConfig() { return securityConfig; } /** *

    * Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective * metric depends on the problem type. For the list of default values per problem type, see AutoMLJobObjective. *

    * *

    * For tabular problem types, you must either provide both the AutoMLJobObjective and indicate the type * of supervised learning problem in AutoMLProblemTypeConfig (TabularJobConfig.ProblemType * ), or none at all. *

    *
    * * @return Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default * objective metric depends on the problem type. For the list of default values per problem type, see * AutoMLJobObjective.

    *

    * For tabular problem types, you must either provide both the AutoMLJobObjective and indicate * the type of supervised learning problem in AutoMLProblemTypeConfig ( * TabularJobConfig.ProblemType), or none at all. *

    */ public final AutoMLJobObjective autoMLJobObjective() { return autoMLJobObjective; } /** *

    * Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. *

    * * @return Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. */ public final ModelDeployConfig modelDeployConfig() { return modelDeployConfig; } /** *

    * This structure specifies how to split the data into train and validation datasets. *

    *

    * The validation and training datasets must contain the same headers. For jobs created by calling * CreateAutoMLJob, the validation dataset must be less than 2 GB in size. *

    * *

    * This attribute must not be set for the time-series forecasting problem type, as Autopilot automatically splits * the input dataset into training and validation sets. *

    *
    * * @return This structure specifies how to split the data into train and validation datasets.

    *

    * The validation and training datasets must contain the same headers. For jobs created by calling * CreateAutoMLJob, the validation dataset must be less than 2 GB in size. *

    * *

    * This attribute must not be set for the time-series forecasting problem type, as Autopilot automatically * splits the input dataset into training and validation sets. *

    */ public final AutoMLDataSplitConfig dataSplitConfig() { return dataSplitConfig; } @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(autoMLJobName()); hashCode = 31 * hashCode + Objects.hashCode(hasAutoMLJobInputDataConfig() ? autoMLJobInputDataConfig() : null); hashCode = 31 * hashCode + Objects.hashCode(outputDataConfig()); hashCode = 31 * hashCode + Objects.hashCode(autoMLProblemTypeConfig()); hashCode = 31 * hashCode + Objects.hashCode(roleArn()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(securityConfig()); hashCode = 31 * hashCode + Objects.hashCode(autoMLJobObjective()); hashCode = 31 * hashCode + Objects.hashCode(modelDeployConfig()); hashCode = 31 * hashCode + Objects.hashCode(dataSplitConfig()); 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 CreateAutoMlJobV2Request)) { return false; } CreateAutoMlJobV2Request other = (CreateAutoMlJobV2Request) obj; return Objects.equals(autoMLJobName(), other.autoMLJobName()) && hasAutoMLJobInputDataConfig() == other.hasAutoMLJobInputDataConfig() && Objects.equals(autoMLJobInputDataConfig(), other.autoMLJobInputDataConfig()) && Objects.equals(outputDataConfig(), other.outputDataConfig()) && Objects.equals(autoMLProblemTypeConfig(), other.autoMLProblemTypeConfig()) && Objects.equals(roleArn(), other.roleArn()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(securityConfig(), other.securityConfig()) && Objects.equals(autoMLJobObjective(), other.autoMLJobObjective()) && Objects.equals(modelDeployConfig(), other.modelDeployConfig()) && Objects.equals(dataSplitConfig(), other.dataSplitConfig()); } /** * 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("CreateAutoMlJobV2Request").add("AutoMLJobName", autoMLJobName()) .add("AutoMLJobInputDataConfig", hasAutoMLJobInputDataConfig() ? autoMLJobInputDataConfig() : null) .add("OutputDataConfig", outputDataConfig()).add("AutoMLProblemTypeConfig", autoMLProblemTypeConfig()) .add("RoleArn", roleArn()).add("Tags", hasTags() ? tags() : null).add("SecurityConfig", securityConfig()) .add("AutoMLJobObjective", autoMLJobObjective()).add("ModelDeployConfig", modelDeployConfig()) .add("DataSplitConfig", dataSplitConfig()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AutoMLJobName": return Optional.ofNullable(clazz.cast(autoMLJobName())); case "AutoMLJobInputDataConfig": return Optional.ofNullable(clazz.cast(autoMLJobInputDataConfig())); case "OutputDataConfig": return Optional.ofNullable(clazz.cast(outputDataConfig())); case "AutoMLProblemTypeConfig": return Optional.ofNullable(clazz.cast(autoMLProblemTypeConfig())); case "RoleArn": return Optional.ofNullable(clazz.cast(roleArn())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "SecurityConfig": return Optional.ofNullable(clazz.cast(securityConfig())); case "AutoMLJobObjective": return Optional.ofNullable(clazz.cast(autoMLJobObjective())); case "ModelDeployConfig": return Optional.ofNullable(clazz.cast(modelDeployConfig())); case "DataSplitConfig": return Optional.ofNullable(clazz.cast(dataSplitConfig())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateAutoMlJobV2Request) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SageMakerRequest.Builder, SdkPojo, CopyableBuilder { /** *

    * Identifies an Autopilot job. The name must be unique to your account and is case insensitive. *

    * * @param autoMLJobName * Identifies an Autopilot job. The name must be unique to your account and is case insensitive. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMLJobName(String autoMLJobName); /** *

    * An array of channel objects describing the input data and their location. Each channel is a named input * source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported formats * depend on the problem type: *

    *
      *
    • *

      * For tabular problem types: S3Prefix, ManifestFile. *

      *
    • *
    • *

      * For image classification: S3Prefix, ManifestFile, * AugmentedManifestFile. *

      *
    • *
    • *

      * For text classification: S3Prefix. *

      *
    • *
    • *

      * For time-series forecasting: S3Prefix. *

      *
    • *
    * * @param autoMLJobInputDataConfig * An array of channel objects describing the input data and their location. Each channel is a named * input source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported * formats depend on the problem type:

    *
      *
    • *

      * For tabular problem types: S3Prefix, ManifestFile. *

      *
    • *
    • *

      * For image classification: S3Prefix, ManifestFile, * AugmentedManifestFile. *

      *
    • *
    • *

      * For text classification: S3Prefix. *

      *
    • *
    • *

      * For time-series forecasting: S3Prefix. *

      *
    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMLJobInputDataConfig(Collection autoMLJobInputDataConfig); /** *

      * An array of channel objects describing the input data and their location. Each channel is a named input * source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported formats * depend on the problem type: *

      *
        *
      • *

        * For tabular problem types: S3Prefix, ManifestFile. *

        *
      • *
      • *

        * For image classification: S3Prefix, ManifestFile, * AugmentedManifestFile. *

        *
      • *
      • *

        * For text classification: S3Prefix. *

        *
      • *
      • *

        * For time-series forecasting: S3Prefix. *

        *
      • *
      * * @param autoMLJobInputDataConfig * An array of channel objects describing the input data and their location. Each channel is a named * input source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported * formats depend on the problem type:

      *
        *
      • *

        * For tabular problem types: S3Prefix, ManifestFile. *

        *
      • *
      • *

        * For image classification: S3Prefix, ManifestFile, * AugmentedManifestFile. *

        *
      • *
      • *

        * For text classification: S3Prefix. *

        *
      • *
      • *

        * For time-series forecasting: S3Prefix. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMLJobInputDataConfig(AutoMLJobChannel... autoMLJobInputDataConfig); /** *

        * An array of channel objects describing the input data and their location. Each channel is a named input * source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported formats * depend on the problem type: *

        *
          *
        • *

          * For tabular problem types: S3Prefix, ManifestFile. *

          *
        • *
        • *

          * For image classification: S3Prefix, ManifestFile, * AugmentedManifestFile. *

          *
        • *
        • *

          * For text classification: S3Prefix. *

          *
        • *
        • *

          * For time-series forecasting: S3Prefix. *

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

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

        * Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML * job. *

        * * @param outputDataConfig * Provides information about encryption and the Amazon S3 output path needed to store artifacts from an * AutoML job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder outputDataConfig(AutoMLOutputDataConfig outputDataConfig); /** *

        * Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML * job. *

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

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

        * Defines the configuration settings of one of the supported problem types. *

        * * @param autoMLProblemTypeConfig * Defines the configuration settings of one of the supported problem types. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMLProblemTypeConfig(AutoMLProblemTypeConfig autoMLProblemTypeConfig); /** *

        * Defines the configuration settings of one of the supported problem types. *

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

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

        * The ARN of the role that is used to access the data. *

        * * @param roleArn * The ARN of the role that is used to access the data. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleArn(String roleArn); /** *

        * An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different * ways, such as by purpose, owner, or environment. For more information, see Tagging Amazon Web * ServicesResources. Tag keys must be unique per resource. *

        * * @param tags * An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in * different ways, such as by purpose, owner, or environment. For more information, see Tagging Amazon Web * ServicesResources. Tag keys must be unique per resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

        * An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different * ways, such as by purpose, owner, or environment. For more information, see Tagging Amazon Web * ServicesResources. Tag keys must be unique per resource. *

        * * @param tags * An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in * different ways, such as by purpose, owner, or environment. For more information, see Tagging Amazon Web * ServicesResources. Tag keys must be unique per resource. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

        * An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different * ways, such as by purpose, owner, or environment. For more information, see Tagging Amazon Web * ServicesResources. Tag keys must be unique per resource. *

        * 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); /** *

        * The security configuration for traffic encryption or Amazon VPC settings. *

        * * @param securityConfig * The security configuration for traffic encryption or Amazon VPC settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityConfig(AutoMLSecurityConfig securityConfig); /** *

        * The security configuration for traffic encryption or Amazon VPC settings. *

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

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

        * Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective * metric depends on the problem type. For the list of default values per problem type, see AutoMLJobObjective. *

        * *

        * For tabular problem types, you must either provide both the AutoMLJobObjective and indicate the * type of supervised learning problem in AutoMLProblemTypeConfig ( * TabularJobConfig.ProblemType), or none at all. *

        *
        * * @param autoMLJobObjective * Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default * objective metric depends on the problem type. For the list of default values per problem type, see * AutoMLJobObjective.

        *

        * For tabular problem types, you must either provide both the AutoMLJobObjective and * indicate the type of supervised learning problem in AutoMLProblemTypeConfig ( * TabularJobConfig.ProblemType), or none at all. *

        * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMLJobObjective(AutoMLJobObjective autoMLJobObjective); /** *

        * Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective * metric depends on the problem type. For the list of default values per problem type, see AutoMLJobObjective. *

        * *

        * For tabular problem types, you must either provide both the AutoMLJobObjective and indicate the * type of supervised learning problem in AutoMLProblemTypeConfig ( * TabularJobConfig.ProblemType), or none at all. *

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

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

        * Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. *

        * * @param modelDeployConfig * Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modelDeployConfig(ModelDeployConfig modelDeployConfig); /** *

        * Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. *

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

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

        * This structure specifies how to split the data into train and validation datasets. *

        *

        * The validation and training datasets must contain the same headers. For jobs created by calling * CreateAutoMLJob, the validation dataset must be less than 2 GB in size. *

        * *

        * This attribute must not be set for the time-series forecasting problem type, as Autopilot automatically * splits the input dataset into training and validation sets. *

        *
        * * @param dataSplitConfig * This structure specifies how to split the data into train and validation datasets.

        *

        * The validation and training datasets must contain the same headers. For jobs created by calling * CreateAutoMLJob, the validation dataset must be less than 2 GB in size. *

        * *

        * This attribute must not be set for the time-series forecasting problem type, as Autopilot * automatically splits the input dataset into training and validation sets. *

        * @return Returns a reference to this object so that method calls can be chained together. */ Builder dataSplitConfig(AutoMLDataSplitConfig dataSplitConfig); /** *

        * This structure specifies how to split the data into train and validation datasets. *

        *

        * The validation and training datasets must contain the same headers. For jobs created by calling * CreateAutoMLJob, the validation dataset must be less than 2 GB in size. *

        * *

        * This attribute must not be set for the time-series forecasting problem type, as Autopilot automatically * splits the input dataset into training and validation sets. *

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

        * When the {@link Consumer} completes, {@link AutoMLDataSplitConfig.Builder#build()} is called immediately and * its result is passed to {@link #dataSplitConfig(AutoMLDataSplitConfig)}. * * @param dataSplitConfig * a consumer that will call methods on {@link AutoMLDataSplitConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #dataSplitConfig(AutoMLDataSplitConfig) */ default Builder dataSplitConfig(Consumer dataSplitConfig) { return dataSplitConfig(AutoMLDataSplitConfig.builder().applyMutation(dataSplitConfig).build()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends SageMakerRequest.BuilderImpl implements Builder { private String autoMLJobName; private List autoMLJobInputDataConfig = DefaultSdkAutoConstructList.getInstance(); private AutoMLOutputDataConfig outputDataConfig; private AutoMLProblemTypeConfig autoMLProblemTypeConfig; private String roleArn; private List tags = DefaultSdkAutoConstructList.getInstance(); private AutoMLSecurityConfig securityConfig; private AutoMLJobObjective autoMLJobObjective; private ModelDeployConfig modelDeployConfig; private AutoMLDataSplitConfig dataSplitConfig; private BuilderImpl() { } private BuilderImpl(CreateAutoMlJobV2Request model) { super(model); autoMLJobName(model.autoMLJobName); autoMLJobInputDataConfig(model.autoMLJobInputDataConfig); outputDataConfig(model.outputDataConfig); autoMLProblemTypeConfig(model.autoMLProblemTypeConfig); roleArn(model.roleArn); tags(model.tags); securityConfig(model.securityConfig); autoMLJobObjective(model.autoMLJobObjective); modelDeployConfig(model.modelDeployConfig); dataSplitConfig(model.dataSplitConfig); } public final String getAutoMLJobName() { return autoMLJobName; } public final void setAutoMLJobName(String autoMLJobName) { this.autoMLJobName = autoMLJobName; } @Override public final Builder autoMLJobName(String autoMLJobName) { this.autoMLJobName = autoMLJobName; return this; } public final List getAutoMLJobInputDataConfig() { List result = AutoMLJobInputDataConfigCopier.copyToBuilder(this.autoMLJobInputDataConfig); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setAutoMLJobInputDataConfig(Collection autoMLJobInputDataConfig) { this.autoMLJobInputDataConfig = AutoMLJobInputDataConfigCopier.copyFromBuilder(autoMLJobInputDataConfig); } @Override public final Builder autoMLJobInputDataConfig(Collection autoMLJobInputDataConfig) { this.autoMLJobInputDataConfig = AutoMLJobInputDataConfigCopier.copy(autoMLJobInputDataConfig); return this; } @Override @SafeVarargs public final Builder autoMLJobInputDataConfig(AutoMLJobChannel... autoMLJobInputDataConfig) { autoMLJobInputDataConfig(Arrays.asList(autoMLJobInputDataConfig)); return this; } @Override @SafeVarargs public final Builder autoMLJobInputDataConfig(Consumer... autoMLJobInputDataConfig) { autoMLJobInputDataConfig(Stream.of(autoMLJobInputDataConfig) .map(c -> AutoMLJobChannel.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final AutoMLOutputDataConfig.Builder getOutputDataConfig() { return outputDataConfig != null ? outputDataConfig.toBuilder() : null; } public final void setOutputDataConfig(AutoMLOutputDataConfig.BuilderImpl outputDataConfig) { this.outputDataConfig = outputDataConfig != null ? outputDataConfig.build() : null; } @Override public final Builder outputDataConfig(AutoMLOutputDataConfig outputDataConfig) { this.outputDataConfig = outputDataConfig; return this; } public final AutoMLProblemTypeConfig.Builder getAutoMLProblemTypeConfig() { return autoMLProblemTypeConfig != null ? autoMLProblemTypeConfig.toBuilder() : null; } public final void setAutoMLProblemTypeConfig(AutoMLProblemTypeConfig.BuilderImpl autoMLProblemTypeConfig) { this.autoMLProblemTypeConfig = autoMLProblemTypeConfig != null ? autoMLProblemTypeConfig.build() : null; } @Override public final Builder autoMLProblemTypeConfig(AutoMLProblemTypeConfig autoMLProblemTypeConfig) { this.autoMLProblemTypeConfig = autoMLProblemTypeConfig; 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 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; } public final AutoMLSecurityConfig.Builder getSecurityConfig() { return securityConfig != null ? securityConfig.toBuilder() : null; } public final void setSecurityConfig(AutoMLSecurityConfig.BuilderImpl securityConfig) { this.securityConfig = securityConfig != null ? securityConfig.build() : null; } @Override public final Builder securityConfig(AutoMLSecurityConfig securityConfig) { this.securityConfig = securityConfig; return this; } public final AutoMLJobObjective.Builder getAutoMLJobObjective() { return autoMLJobObjective != null ? autoMLJobObjective.toBuilder() : null; } public final void setAutoMLJobObjective(AutoMLJobObjective.BuilderImpl autoMLJobObjective) { this.autoMLJobObjective = autoMLJobObjective != null ? autoMLJobObjective.build() : null; } @Override public final Builder autoMLJobObjective(AutoMLJobObjective autoMLJobObjective) { this.autoMLJobObjective = autoMLJobObjective; return this; } public final ModelDeployConfig.Builder getModelDeployConfig() { return modelDeployConfig != null ? modelDeployConfig.toBuilder() : null; } public final void setModelDeployConfig(ModelDeployConfig.BuilderImpl modelDeployConfig) { this.modelDeployConfig = modelDeployConfig != null ? modelDeployConfig.build() : null; } @Override public final Builder modelDeployConfig(ModelDeployConfig modelDeployConfig) { this.modelDeployConfig = modelDeployConfig; return this; } public final AutoMLDataSplitConfig.Builder getDataSplitConfig() { return dataSplitConfig != null ? dataSplitConfig.toBuilder() : null; } public final void setDataSplitConfig(AutoMLDataSplitConfig.BuilderImpl dataSplitConfig) { this.dataSplitConfig = dataSplitConfig != null ? dataSplitConfig.build() : null; } @Override public final Builder dataSplitConfig(AutoMLDataSplitConfig dataSplitConfig) { this.dataSplitConfig = dataSplitConfig; return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateAutoMlJobV2Request build() { return new CreateAutoMlJobV2Request(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy