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

software.amazon.awssdk.services.sagemaker.model.CreateAutoMlJobRequest 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.30.1
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.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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 CreateAutoMlJobRequest extends SageMakerRequest implements
        ToCopyableBuilder {
    private static final SdkField AUTO_ML_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("AutoMLJobName").getter(getter(CreateAutoMlJobRequest::autoMLJobName))
            .setter(setter(Builder::autoMLJobName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMLJobName").build()).build();

    private static final SdkField> INPUT_DATA_CONFIG_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("InputDataConfig")
            .getter(getter(CreateAutoMlJobRequest::inputDataConfig))
            .setter(setter(Builder::inputDataConfig))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InputDataConfig").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(AutoMLChannel::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(CreateAutoMlJobRequest::outputDataConfig)).setter(setter(Builder::outputDataConfig))
            .constructor(AutoMLOutputDataConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputDataConfig").build()).build();

    private static final SdkField PROBLEM_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ProblemType").getter(getter(CreateAutoMlJobRequest::problemTypeAsString))
            .setter(setter(Builder::problemType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProblemType").build()).build();

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

    private static final SdkField AUTO_ML_JOB_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("AutoMLJobConfig")
            .getter(getter(CreateAutoMlJobRequest::autoMLJobConfig)).setter(setter(Builder::autoMLJobConfig))
            .constructor(AutoMLJobConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMLJobConfig").build()).build();

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

    private static final SdkField GENERATE_CANDIDATE_DEFINITIONS_ONLY_FIELD = SdkField
            . builder(MarshallingType.BOOLEAN)
            .memberName("GenerateCandidateDefinitionsOnly")
            .getter(getter(CreateAutoMlJobRequest::generateCandidateDefinitionsOnly))
            .setter(setter(Builder::generateCandidateDefinitionsOnly))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GenerateCandidateDefinitionsOnly")
                    .build()).build();

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

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AUTO_ML_JOB_NAME_FIELD,
            INPUT_DATA_CONFIG_FIELD, OUTPUT_DATA_CONFIG_FIELD, PROBLEM_TYPE_FIELD, AUTO_ML_JOB_OBJECTIVE_FIELD,
            AUTO_ML_JOB_CONFIG_FIELD, ROLE_ARN_FIELD, GENERATE_CANDIDATE_DEFINITIONS_ONLY_FIELD, TAGS_FIELD,
            MODEL_DEPLOY_CONFIG_FIELD));

    private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();

    private final String autoMLJobName;

    private final List inputDataConfig;

    private final AutoMLOutputDataConfig outputDataConfig;

    private final String problemType;

    private final AutoMLJobObjective autoMLJobObjective;

    private final AutoMLJobConfig autoMLJobConfig;

    private final String roleArn;

    private final Boolean generateCandidateDefinitionsOnly;

    private final List tags;

    private final ModelDeployConfig modelDeployConfig;

    private CreateAutoMlJobRequest(BuilderImpl builder) {
        super(builder);
        this.autoMLJobName = builder.autoMLJobName;
        this.inputDataConfig = builder.inputDataConfig;
        this.outputDataConfig = builder.outputDataConfig;
        this.problemType = builder.problemType;
        this.autoMLJobObjective = builder.autoMLJobObjective;
        this.autoMLJobConfig = builder.autoMLJobConfig;
        this.roleArn = builder.roleArn;
        this.generateCandidateDefinitionsOnly = builder.generateCandidateDefinitionsOnly;
        this.tags = builder.tags;
        this.modelDeployConfig = builder.modelDeployConfig;
    }

    /**
     * 

* 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 InputDataConfig 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 hasInputDataConfig() { return inputDataConfig != null && !(inputDataConfig instanceof SdkAutoConstructList); } /** *

* An array of channel objects that describes the input data and its location. Each channel is a named input source. * Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is required * for the training dataset. There is not a minimum number of rows required for the validation dataset. *

*

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

* * @return An array of channel objects that describes the input data and its location. Each channel is a named input * source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is * required for the training dataset. There is not a minimum number of rows required for the validation * dataset. */ public final List inputDataConfig() { return inputDataConfig; } /** *

* Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. * Format(s) supported: CSV. *

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

* Defines the type of supervised learning problem available for the candidates. For more information, see * SageMaker Autopilot problem types. *

*

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

* * @return Defines the type of supervised learning problem available for the candidates. For more information, see * SageMaker Autopilot problem types. * @see ProblemType */ public final ProblemType problemType() { return ProblemType.fromValue(problemType); } /** *

* Defines the type of supervised learning problem available for the candidates. For more information, see * SageMaker Autopilot problem types. *

*

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

* * @return Defines the type of supervised learning problem available for the candidates. For more information, see * SageMaker Autopilot problem types. * @see ProblemType */ public final String problemTypeAsString() { return problemType; } /** *

* 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. See AutoMLJobObjective for the default values. *

* * @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. See AutoMLJobObjective for the default values. */ public final AutoMLJobObjective autoMLJobObjective() { return autoMLJobObjective; } /** *

* A collection of settings used to configure an AutoML job. *

* * @return A collection of settings used to configure an AutoML job. */ public final AutoMLJobConfig autoMLJobConfig() { return autoMLJobConfig; } /** *

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

* Generates possible candidates without training the models. A candidate is a combination of data preprocessors, * algorithms, and algorithm parameter settings. *

* * @return Generates possible candidates without training the models. A candidate is a combination of data * preprocessors, algorithms, and algorithm parameter settings. */ public final Boolean generateCandidateDefinitionsOnly() { return generateCandidateDefinitionsOnly; } /** * 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, * for example, 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, for example, 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; } /** *

* 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; } @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(hasInputDataConfig() ? inputDataConfig() : null); hashCode = 31 * hashCode + Objects.hashCode(outputDataConfig()); hashCode = 31 * hashCode + Objects.hashCode(problemTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(autoMLJobObjective()); hashCode = 31 * hashCode + Objects.hashCode(autoMLJobConfig()); hashCode = 31 * hashCode + Objects.hashCode(roleArn()); hashCode = 31 * hashCode + Objects.hashCode(generateCandidateDefinitionsOnly()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(modelDeployConfig()); 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 CreateAutoMlJobRequest)) { return false; } CreateAutoMlJobRequest other = (CreateAutoMlJobRequest) obj; return Objects.equals(autoMLJobName(), other.autoMLJobName()) && hasInputDataConfig() == other.hasInputDataConfig() && Objects.equals(inputDataConfig(), other.inputDataConfig()) && Objects.equals(outputDataConfig(), other.outputDataConfig()) && Objects.equals(problemTypeAsString(), other.problemTypeAsString()) && Objects.equals(autoMLJobObjective(), other.autoMLJobObjective()) && Objects.equals(autoMLJobConfig(), other.autoMLJobConfig()) && Objects.equals(roleArn(), other.roleArn()) && Objects.equals(generateCandidateDefinitionsOnly(), other.generateCandidateDefinitionsOnly()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(modelDeployConfig(), other.modelDeployConfig()); } /** * 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("CreateAutoMlJobRequest").add("AutoMLJobName", autoMLJobName()) .add("InputDataConfig", hasInputDataConfig() ? inputDataConfig() : null) .add("OutputDataConfig", outputDataConfig()).add("ProblemType", problemTypeAsString()) .add("AutoMLJobObjective", autoMLJobObjective()).add("AutoMLJobConfig", autoMLJobConfig()) .add("RoleArn", roleArn()).add("GenerateCandidateDefinitionsOnly", generateCandidateDefinitionsOnly()) .add("Tags", hasTags() ? tags() : null).add("ModelDeployConfig", modelDeployConfig()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AutoMLJobName": return Optional.ofNullable(clazz.cast(autoMLJobName())); case "InputDataConfig": return Optional.ofNullable(clazz.cast(inputDataConfig())); case "OutputDataConfig": return Optional.ofNullable(clazz.cast(outputDataConfig())); case "ProblemType": return Optional.ofNullable(clazz.cast(problemTypeAsString())); case "AutoMLJobObjective": return Optional.ofNullable(clazz.cast(autoMLJobObjective())); case "AutoMLJobConfig": return Optional.ofNullable(clazz.cast(autoMLJobConfig())); case "RoleArn": return Optional.ofNullable(clazz.cast(roleArn())); case "GenerateCandidateDefinitionsOnly": return Optional.ofNullable(clazz.cast(generateCandidateDefinitionsOnly())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "ModelDeployConfig": return Optional.ofNullable(clazz.cast(modelDeployConfig())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("AutoMLJobName", AUTO_ML_JOB_NAME_FIELD); map.put("InputDataConfig", INPUT_DATA_CONFIG_FIELD); map.put("OutputDataConfig", OUTPUT_DATA_CONFIG_FIELD); map.put("ProblemType", PROBLEM_TYPE_FIELD); map.put("AutoMLJobObjective", AUTO_ML_JOB_OBJECTIVE_FIELD); map.put("AutoMLJobConfig", AUTO_ML_JOB_CONFIG_FIELD); map.put("RoleArn", ROLE_ARN_FIELD); map.put("GenerateCandidateDefinitionsOnly", GENERATE_CANDIDATE_DEFINITIONS_ONLY_FIELD); map.put("Tags", TAGS_FIELD); map.put("ModelDeployConfig", MODEL_DEPLOY_CONFIG_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((CreateAutoMlJobRequest) 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 that describes the input data and its location. Each channel is a named input * source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is * required for the training dataset. There is not a minimum number of rows required for the validation dataset. *

* * @param inputDataConfig * An array of channel objects that describes the input data and its location. Each channel is a named * input source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is * required for the training dataset. There is not a minimum number of rows required for the validation * dataset. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inputDataConfig(Collection inputDataConfig); /** *

* An array of channel objects that describes the input data and its location. Each channel is a named input * source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is * required for the training dataset. There is not a minimum number of rows required for the validation dataset. *

* * @param inputDataConfig * An array of channel objects that describes the input data and its location. Each channel is a named * input source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is * required for the training dataset. There is not a minimum number of rows required for the validation * dataset. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inputDataConfig(AutoMLChannel... inputDataConfig); /** *

* An array of channel objects that describes the input data and its location. Each channel is a named input * source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is * required for the training dataset. There is not a minimum number of rows required for the validation dataset. *

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

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

* Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML * job. Format(s) supported: CSV. *

* * @param outputDataConfig * Provides information about encryption and the Amazon S3 output path needed to store artifacts from an * AutoML job. Format(s) supported: CSV. * @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. Format(s) supported: CSV. *

* 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 type of supervised learning problem available for the candidates. For more information, see SageMaker Autopilot problem types. *

* * @param problemType * Defines the type of supervised learning problem available for the candidates. For more information, * see SageMaker Autopilot problem types. * @see ProblemType * @return Returns a reference to this object so that method calls can be chained together. * @see ProblemType */ Builder problemType(String problemType); /** *

* Defines the type of supervised learning problem available for the candidates. For more information, see SageMaker Autopilot problem types. *

* * @param problemType * Defines the type of supervised learning problem available for the candidates. For more information, * see SageMaker Autopilot problem types. * @see ProblemType * @return Returns a reference to this object so that method calls can be chained together. * @see ProblemType */ Builder problemType(ProblemType problemType); /** *

* 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. See AutoMLJobObjective for the default values. *

* * @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. See AutoMLJobObjective for the default values. * @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. See AutoMLJobObjective for the default values. *

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

* A collection of settings used to configure an AutoML job. *

* * @param autoMLJobConfig * A collection of settings used to configure an AutoML job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMLJobConfig(AutoMLJobConfig autoMLJobConfig); /** *

* A collection of settings used to configure an AutoML job. *

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

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

* Generates possible candidates without training the models. A candidate is a combination of data * preprocessors, algorithms, and algorithm parameter settings. *

* * @param generateCandidateDefinitionsOnly * Generates possible candidates without training the models. A candidate is a combination of data * preprocessors, algorithms, and algorithm parameter settings. * @return Returns a reference to this object so that method calls can be chained together. */ Builder generateCandidateDefinitionsOnly(Boolean generateCandidateDefinitionsOnly); /** *

* An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different * ways, for example, 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, for example, 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, for example, 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, for example, 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, for example, 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); /** *

* 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()); } @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends SageMakerRequest.BuilderImpl implements Builder { private String autoMLJobName; private List inputDataConfig = DefaultSdkAutoConstructList.getInstance(); private AutoMLOutputDataConfig outputDataConfig; private String problemType; private AutoMLJobObjective autoMLJobObjective; private AutoMLJobConfig autoMLJobConfig; private String roleArn; private Boolean generateCandidateDefinitionsOnly; private List tags = DefaultSdkAutoConstructList.getInstance(); private ModelDeployConfig modelDeployConfig; private BuilderImpl() { } private BuilderImpl(CreateAutoMlJobRequest model) { super(model); autoMLJobName(model.autoMLJobName); inputDataConfig(model.inputDataConfig); outputDataConfig(model.outputDataConfig); problemType(model.problemType); autoMLJobObjective(model.autoMLJobObjective); autoMLJobConfig(model.autoMLJobConfig); roleArn(model.roleArn); generateCandidateDefinitionsOnly(model.generateCandidateDefinitionsOnly); tags(model.tags); modelDeployConfig(model.modelDeployConfig); } 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 getInputDataConfig() { List result = AutoMLInputDataConfigCopier.copyToBuilder(this.inputDataConfig); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setInputDataConfig(Collection inputDataConfig) { this.inputDataConfig = AutoMLInputDataConfigCopier.copyFromBuilder(inputDataConfig); } @Override public final Builder inputDataConfig(Collection inputDataConfig) { this.inputDataConfig = AutoMLInputDataConfigCopier.copy(inputDataConfig); return this; } @Override @SafeVarargs public final Builder inputDataConfig(AutoMLChannel... inputDataConfig) { inputDataConfig(Arrays.asList(inputDataConfig)); return this; } @Override @SafeVarargs public final Builder inputDataConfig(Consumer... inputDataConfig) { inputDataConfig(Stream.of(inputDataConfig).map(c -> AutoMLChannel.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 String getProblemType() { return problemType; } public final void setProblemType(String problemType) { this.problemType = problemType; } @Override public final Builder problemType(String problemType) { this.problemType = problemType; return this; } @Override public final Builder problemType(ProblemType problemType) { this.problemType(problemType == null ? null : problemType.toString()); 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 AutoMLJobConfig.Builder getAutoMLJobConfig() { return autoMLJobConfig != null ? autoMLJobConfig.toBuilder() : null; } public final void setAutoMLJobConfig(AutoMLJobConfig.BuilderImpl autoMLJobConfig) { this.autoMLJobConfig = autoMLJobConfig != null ? autoMLJobConfig.build() : null; } @Override public final Builder autoMLJobConfig(AutoMLJobConfig autoMLJobConfig) { this.autoMLJobConfig = autoMLJobConfig; 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 Boolean getGenerateCandidateDefinitionsOnly() { return generateCandidateDefinitionsOnly; } public final void setGenerateCandidateDefinitionsOnly(Boolean generateCandidateDefinitionsOnly) { this.generateCandidateDefinitionsOnly = generateCandidateDefinitionsOnly; } @Override public final Builder generateCandidateDefinitionsOnly(Boolean generateCandidateDefinitionsOnly) { this.generateCandidateDefinitionsOnly = generateCandidateDefinitionsOnly; 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 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; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateAutoMlJobRequest build() { return new CreateAutoMlJobRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy