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

software.amazon.awssdk.services.glue.model.MLTransform 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.glue.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;

/**
 * 

* A structure for a machine learning transform. *

*/ @Generated("software.amazon.awssdk:codegen") public final class MLTransform implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField TRANSFORM_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(MLTransform::transformId)).setter(setter(Builder::transformId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TransformId").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(MLTransform::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(MLTransform::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(MLTransform::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField CREATED_ON_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(MLTransform::createdOn)).setter(setter(Builder::createdOn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedOn").build()).build(); private static final SdkField LAST_MODIFIED_ON_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(MLTransform::lastModifiedOn)).setter(setter(Builder::lastModifiedOn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedOn").build()).build(); private static final SdkField> INPUT_RECORD_TABLES_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(MLTransform::inputRecordTables)) .setter(setter(Builder::inputRecordTables)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InputRecordTables").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(GlueTable::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField PARAMETERS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(MLTransform::parameters)) .setter(setter(Builder::parameters)).constructor(TransformParameters::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Parameters").build()).build(); private static final SdkField EVALUATION_METRICS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(MLTransform::evaluationMetrics)) .setter(setter(Builder::evaluationMetrics)).constructor(EvaluationMetrics::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EvaluationMetrics").build()).build(); private static final SdkField LABEL_COUNT_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(MLTransform::labelCount)).setter(setter(Builder::labelCount)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LabelCount").build()).build(); private static final SdkField> SCHEMA_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(MLTransform::schema)) .setter(setter(Builder::schema)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Schema").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(SchemaColumn::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(MLTransform::role)).setter(setter(Builder::role)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Role").build()).build(); private static final SdkField GLUE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(MLTransform::glueVersion)).setter(setter(Builder::glueVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GlueVersion").build()).build(); private static final SdkField MAX_CAPACITY_FIELD = SdkField. builder(MarshallingType.DOUBLE) .getter(getter(MLTransform::maxCapacity)).setter(setter(Builder::maxCapacity)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaxCapacity").build()).build(); private static final SdkField WORKER_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(MLTransform::workerTypeAsString)).setter(setter(Builder::workerType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WorkerType").build()).build(); private static final SdkField NUMBER_OF_WORKERS_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(MLTransform::numberOfWorkers)).setter(setter(Builder::numberOfWorkers)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NumberOfWorkers").build()).build(); private static final SdkField TIMEOUT_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(MLTransform::timeout)).setter(setter(Builder::timeout)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Timeout").build()).build(); private static final SdkField MAX_RETRIES_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(MLTransform::maxRetries)).setter(setter(Builder::maxRetries)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaxRetries").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TRANSFORM_ID_FIELD, NAME_FIELD, DESCRIPTION_FIELD, STATUS_FIELD, CREATED_ON_FIELD, LAST_MODIFIED_ON_FIELD, INPUT_RECORD_TABLES_FIELD, PARAMETERS_FIELD, EVALUATION_METRICS_FIELD, LABEL_COUNT_FIELD, SCHEMA_FIELD, ROLE_FIELD, GLUE_VERSION_FIELD, MAX_CAPACITY_FIELD, WORKER_TYPE_FIELD, NUMBER_OF_WORKERS_FIELD, TIMEOUT_FIELD, MAX_RETRIES_FIELD)); private static final long serialVersionUID = 1L; private final String transformId; private final String name; private final String description; private final String status; private final Instant createdOn; private final Instant lastModifiedOn; private final List inputRecordTables; private final TransformParameters parameters; private final EvaluationMetrics evaluationMetrics; private final Integer labelCount; private final List schema; private final String role; private final String glueVersion; private final Double maxCapacity; private final String workerType; private final Integer numberOfWorkers; private final Integer timeout; private final Integer maxRetries; private MLTransform(BuilderImpl builder) { this.transformId = builder.transformId; this.name = builder.name; this.description = builder.description; this.status = builder.status; this.createdOn = builder.createdOn; this.lastModifiedOn = builder.lastModifiedOn; this.inputRecordTables = builder.inputRecordTables; this.parameters = builder.parameters; this.evaluationMetrics = builder.evaluationMetrics; this.labelCount = builder.labelCount; this.schema = builder.schema; this.role = builder.role; this.glueVersion = builder.glueVersion; this.maxCapacity = builder.maxCapacity; this.workerType = builder.workerType; this.numberOfWorkers = builder.numberOfWorkers; this.timeout = builder.timeout; this.maxRetries = builder.maxRetries; } /** *

* The unique transform ID that is generated for the machine learning transform. The ID is guaranteed to be unique * and does not change. *

* * @return The unique transform ID that is generated for the machine learning transform. The ID is guaranteed to be * unique and does not change. */ public String transformId() { return transformId; } /** *

* A user-defined name for the machine learning transform. Names are not guaranteed unique and can be changed at any * time. *

* * @return A user-defined name for the machine learning transform. Names are not guaranteed unique and can be * changed at any time. */ public String name() { return name; } /** *

* A user-defined, long-form description text for the machine learning transform. Descriptions are not guaranteed to * be unique and can be changed at any time. *

* * @return A user-defined, long-form description text for the machine learning transform. Descriptions are not * guaranteed to be unique and can be changed at any time. */ public String description() { return description; } /** *

* The current status of the machine learning transform. *

*

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

* * @return The current status of the machine learning transform. * @see TransformStatusType */ public TransformStatusType status() { return TransformStatusType.fromValue(status); } /** *

* The current status of the machine learning transform. *

*

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

* * @return The current status of the machine learning transform. * @see TransformStatusType */ public String statusAsString() { return status; } /** *

* A timestamp. The time and date that this machine learning transform was created. *

* * @return A timestamp. The time and date that this machine learning transform was created. */ public Instant createdOn() { return createdOn; } /** *

* A timestamp. The last point in time when this machine learning transform was modified. *

* * @return A timestamp. The last point in time when this machine learning transform was modified. */ public Instant lastModifiedOn() { return lastModifiedOn; } /** * Returns true if the InputRecordTables property was specified by the sender (it may be empty), or false if the * sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS * service. */ public boolean hasInputRecordTables() { return inputRecordTables != null && !(inputRecordTables instanceof SdkAutoConstructList); } /** *

* A list of AWS Glue table definitions used by the transform. *

*

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

*

* You can use {@link #hasInputRecordTables()} to see if a value was sent in this field. *

* * @return A list of AWS Glue table definitions used by the transform. */ public List inputRecordTables() { return inputRecordTables; } /** *

* A TransformParameters object. You can use parameters to tune (customize) the behavior of the machine * learning transform by specifying what data it learns from and your preference on various tradeoffs (such as * precious vs. recall, or accuracy vs. cost). *

* * @return A TransformParameters object. You can use parameters to tune (customize) the behavior of the * machine learning transform by specifying what data it learns from and your preference on various * tradeoffs (such as precious vs. recall, or accuracy vs. cost). */ public TransformParameters parameters() { return parameters; } /** *

* An EvaluationMetrics object. Evaluation metrics provide an estimate of the quality of your machine * learning transform. *

* * @return An EvaluationMetrics object. Evaluation metrics provide an estimate of the quality of your * machine learning transform. */ public EvaluationMetrics evaluationMetrics() { return evaluationMetrics; } /** *

* A count identifier for the labeling files generated by AWS Glue for this transform. As you create a better * transform, you can iteratively download, label, and upload the labeling file. *

* * @return A count identifier for the labeling files generated by AWS Glue for this transform. As you create a * better transform, you can iteratively download, label, and upload the labeling file. */ public Integer labelCount() { return labelCount; } /** * Returns true if the Schema property was specified by the sender (it may be empty), or false if the sender did not * specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasSchema() { return schema != null && !(schema instanceof SdkAutoConstructList); } /** *

* A map of key-value pairs representing the columns and data types that this transform can run against. Has an * upper bound of 100 columns. *

*

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

*

* You can use {@link #hasSchema()} to see if a value was sent in this field. *

* * @return A map of key-value pairs representing the columns and data types that this transform can run against. Has * an upper bound of 100 columns. */ public List schema() { return schema; } /** *

* The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required permissions * include both AWS Glue service role permissions to AWS Glue resources, and Amazon S3 permissions required by the * transform. *

*
    *
  • *

    * This role needs AWS Glue service role permissions to allow access to resources in AWS Glue. See Attach a Policy to IAM Users That * Access AWS Glue. *

    *
  • *
  • *

    * This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary * directory, scripts, and any libraries used by the task run for this transform. *

    *
  • *
* * @return The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required * permissions include both AWS Glue service role permissions to AWS Glue resources, and Amazon S3 * permissions required by the transform.

*
    *
  • *

    * This role needs AWS Glue service role permissions to allow access to resources in AWS Glue. See Attach a Policy to IAM * Users That Access AWS Glue. *

    *
  • *
  • *

    * This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary * directory, scripts, and any libraries used by the task run for this transform. *

    *
  • */ public String role() { return role; } /** *

    * This value determines which version of AWS Glue this machine learning transform is compatible with. Glue 1.0 is * recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more * information, see AWS Glue Versions * in the developer guide. *

    * * @return This value determines which version of AWS Glue this machine learning transform is compatible with. Glue * 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue * 0.9. For more information, see AWS Glue * Versions in the developer guide. */ public String glueVersion() { return glueVersion; } /** *

    * The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this transform. You can * allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of * 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the AWS Glue pricing page. *

    *

    * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

    *
      *
    • *

      * If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be * set. *

      *
    • *
    • *

      * If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be * set. *

      *
    • *
    • *

      * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

      *
    • *
    • *

      * MaxCapacity and NumberOfWorkers must both be at least 1. *

      *
    • *
    *

    * When the WorkerType field is set to a value other than Standard, the * MaxCapacity field is set automatically and becomes read-only. *

    * * @return The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this transform. * You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power * that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the AWS Glue pricing page.

    *

    * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

    *
      *
    • *

      * If either NumberOfWorkers or WorkerType is set, then MaxCapacity * cannot be set. *

      *
    • *
    • *

      * If MaxCapacity is set then neither NumberOfWorkers or WorkerType * can be set. *

      *
    • *
    • *

      * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

      *
    • *
    • *

      * MaxCapacity and NumberOfWorkers must both be at least 1. *

      *
    • *
    *

    * When the WorkerType field is set to a value other than Standard, the * MaxCapacity field is set automatically and becomes read-only. */ public Double maxCapacity() { return maxCapacity; } /** *

    * The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of Standard, * G.1X, or G.2X. *

    *
      *
    • *

      * For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 * executors per worker. *

      *
    • *
    • *

      * For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 * executor per worker. *

      *
    • *
    • *

      * For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 * executor per worker. *

      *
    • *
    *

    * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

    *
      *
    • *

      * If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be * set. *

      *
    • *
    • *

      * If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be * set. *

      *
    • *
    • *

      * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

      *
    • *
    • *

      * MaxCapacity and NumberOfWorkers must both be at least 1. *

      *
    • *
    *

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

    * * @return The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of * Standard, G.1X, or G.2X.

    *
      *
    • *

      * For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, * and 2 executors per worker. *

      *
    • *
    • *

      * For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and * 1 executor per worker. *

      *
    • *
    • *

      * For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and * 1 executor per worker. *

      *
    • *
    *

    * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

    *
      *
    • *

      * If either NumberOfWorkers or WorkerType is set, then MaxCapacity * cannot be set. *

      *
    • *
    • *

      * If MaxCapacity is set then neither NumberOfWorkers or WorkerType * can be set. *

      *
    • *
    • *

      * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

      *
    • *
    • *

      * MaxCapacity and NumberOfWorkers must both be at least 1. *

      *
    • * @see WorkerType */ public WorkerType workerType() { return WorkerType.fromValue(workerType); } /** *

      * The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of Standard, * G.1X, or G.2X. *

      *
        *
      • *

        * For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 * executors per worker. *

        *
      • *
      • *

        * For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 * executor per worker. *

        *
      • *
      • *

        * For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 * executor per worker. *

        *
      • *
      *

      * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

      *
        *
      • *

        * If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be * set. *

        *
      • *
      • *

        * If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be * set. *

        *
      • *
      • *

        * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

        *
      • *
      • *

        * MaxCapacity and NumberOfWorkers must both be at least 1. *

        *
      • *
      *

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

      * * @return The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of * Standard, G.1X, or G.2X.

      *
        *
      • *

        * For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, * and 2 executors per worker. *

        *
      • *
      • *

        * For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and * 1 executor per worker. *

        *
      • *
      • *

        * For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and * 1 executor per worker. *

        *
      • *
      *

      * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

      *
        *
      • *

        * If either NumberOfWorkers or WorkerType is set, then MaxCapacity * cannot be set. *

        *
      • *
      • *

        * If MaxCapacity is set then neither NumberOfWorkers or WorkerType * can be set. *

        *
      • *
      • *

        * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

        *
      • *
      • *

        * MaxCapacity and NumberOfWorkers must both be at least 1. *

        *
      • * @see WorkerType */ public String workerTypeAsString() { return workerType; } /** *

        * The number of workers of a defined workerType that are allocated when a task of the transform runs. *

        *

        * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

        * * @return The number of workers of a defined workerType that are allocated when a task of the * transform runs.

        *

        * If WorkerType is set, then NumberOfWorkers is required (and vice versa). */ public Integer numberOfWorkers() { return numberOfWorkers; } /** *

        * The timeout in minutes of the machine learning transform. *

        * * @return The timeout in minutes of the machine learning transform. */ public Integer timeout() { return timeout; } /** *

        * The maximum number of times to retry after an MLTaskRun of the machine learning transform fails. *

        * * @return The maximum number of times to retry after an MLTaskRun of the machine learning transform * fails. */ public Integer maxRetries() { return maxRetries; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(transformId()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(createdOn()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedOn()); hashCode = 31 * hashCode + Objects.hashCode(inputRecordTables()); hashCode = 31 * hashCode + Objects.hashCode(parameters()); hashCode = 31 * hashCode + Objects.hashCode(evaluationMetrics()); hashCode = 31 * hashCode + Objects.hashCode(labelCount()); hashCode = 31 * hashCode + Objects.hashCode(schema()); hashCode = 31 * hashCode + Objects.hashCode(role()); hashCode = 31 * hashCode + Objects.hashCode(glueVersion()); hashCode = 31 * hashCode + Objects.hashCode(maxCapacity()); hashCode = 31 * hashCode + Objects.hashCode(workerTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(numberOfWorkers()); hashCode = 31 * hashCode + Objects.hashCode(timeout()); hashCode = 31 * hashCode + Objects.hashCode(maxRetries()); return hashCode; } @Override public boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof MLTransform)) { return false; } MLTransform other = (MLTransform) obj; return Objects.equals(transformId(), other.transformId()) && Objects.equals(name(), other.name()) && Objects.equals(description(), other.description()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(createdOn(), other.createdOn()) && Objects.equals(lastModifiedOn(), other.lastModifiedOn()) && Objects.equals(inputRecordTables(), other.inputRecordTables()) && Objects.equals(parameters(), other.parameters()) && Objects.equals(evaluationMetrics(), other.evaluationMetrics()) && Objects.equals(labelCount(), other.labelCount()) && Objects.equals(schema(), other.schema()) && Objects.equals(role(), other.role()) && Objects.equals(glueVersion(), other.glueVersion()) && Objects.equals(maxCapacity(), other.maxCapacity()) && Objects.equals(workerTypeAsString(), other.workerTypeAsString()) && Objects.equals(numberOfWorkers(), other.numberOfWorkers()) && Objects.equals(timeout(), other.timeout()) && Objects.equals(maxRetries(), other.maxRetries()); } /** * 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 String toString() { return ToString.builder("MLTransform").add("TransformId", transformId()).add("Name", name()) .add("Description", description()).add("Status", statusAsString()).add("CreatedOn", createdOn()) .add("LastModifiedOn", lastModifiedOn()).add("InputRecordTables", inputRecordTables()) .add("Parameters", parameters()).add("EvaluationMetrics", evaluationMetrics()).add("LabelCount", labelCount()) .add("Schema", schema()).add("Role", role()).add("GlueVersion", glueVersion()).add("MaxCapacity", maxCapacity()) .add("WorkerType", workerTypeAsString()).add("NumberOfWorkers", numberOfWorkers()).add("Timeout", timeout()) .add("MaxRetries", maxRetries()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "TransformId": return Optional.ofNullable(clazz.cast(transformId())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "Status": return Optional.ofNullable(clazz.cast(statusAsString())); case "CreatedOn": return Optional.ofNullable(clazz.cast(createdOn())); case "LastModifiedOn": return Optional.ofNullable(clazz.cast(lastModifiedOn())); case "InputRecordTables": return Optional.ofNullable(clazz.cast(inputRecordTables())); case "Parameters": return Optional.ofNullable(clazz.cast(parameters())); case "EvaluationMetrics": return Optional.ofNullable(clazz.cast(evaluationMetrics())); case "LabelCount": return Optional.ofNullable(clazz.cast(labelCount())); case "Schema": return Optional.ofNullable(clazz.cast(schema())); case "Role": return Optional.ofNullable(clazz.cast(role())); case "GlueVersion": return Optional.ofNullable(clazz.cast(glueVersion())); case "MaxCapacity": return Optional.ofNullable(clazz.cast(maxCapacity())); case "WorkerType": return Optional.ofNullable(clazz.cast(workerTypeAsString())); case "NumberOfWorkers": return Optional.ofNullable(clazz.cast(numberOfWorkers())); case "Timeout": return Optional.ofNullable(clazz.cast(timeout())); case "MaxRetries": return Optional.ofNullable(clazz.cast(maxRetries())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((MLTransform) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

        * The unique transform ID that is generated for the machine learning transform. The ID is guaranteed to be * unique and does not change. *

        * * @param transformId * The unique transform ID that is generated for the machine learning transform. The ID is guaranteed to * be unique and does not change. * @return Returns a reference to this object so that method calls can be chained together. */ Builder transformId(String transformId); /** *

        * A user-defined name for the machine learning transform. Names are not guaranteed unique and can be changed at * any time. *

        * * @param name * A user-defined name for the machine learning transform. Names are not guaranteed unique and can be * changed at any time. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

        * A user-defined, long-form description text for the machine learning transform. Descriptions are not * guaranteed to be unique and can be changed at any time. *

        * * @param description * A user-defined, long-form description text for the machine learning transform. Descriptions are not * guaranteed to be unique and can be changed at any time. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

        * The current status of the machine learning transform. *

        * * @param status * The current status of the machine learning transform. * @see TransformStatusType * @return Returns a reference to this object so that method calls can be chained together. * @see TransformStatusType */ Builder status(String status); /** *

        * The current status of the machine learning transform. *

        * * @param status * The current status of the machine learning transform. * @see TransformStatusType * @return Returns a reference to this object so that method calls can be chained together. * @see TransformStatusType */ Builder status(TransformStatusType status); /** *

        * A timestamp. The time and date that this machine learning transform was created. *

        * * @param createdOn * A timestamp. The time and date that this machine learning transform was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdOn(Instant createdOn); /** *

        * A timestamp. The last point in time when this machine learning transform was modified. *

        * * @param lastModifiedOn * A timestamp. The last point in time when this machine learning transform was modified. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedOn(Instant lastModifiedOn); /** *

        * A list of AWS Glue table definitions used by the transform. *

        * * @param inputRecordTables * A list of AWS Glue table definitions used by the transform. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inputRecordTables(Collection inputRecordTables); /** *

        * A list of AWS Glue table definitions used by the transform. *

        * * @param inputRecordTables * A list of AWS Glue table definitions used by the transform. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inputRecordTables(GlueTable... inputRecordTables); /** *

        * A list of AWS Glue table definitions used by the transform. *

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

        * A TransformParameters object. You can use parameters to tune (customize) the behavior of the * machine learning transform by specifying what data it learns from and your preference on various tradeoffs * (such as precious vs. recall, or accuracy vs. cost). *

        * * @param parameters * A TransformParameters object. You can use parameters to tune (customize) the behavior of * the machine learning transform by specifying what data it learns from and your preference on various * tradeoffs (such as precious vs. recall, or accuracy vs. cost). * @return Returns a reference to this object so that method calls can be chained together. */ Builder parameters(TransformParameters parameters); /** *

        * A TransformParameters object. You can use parameters to tune (customize) the behavior of the * machine learning transform by specifying what data it learns from and your preference on various tradeoffs * (such as precious vs. recall, or accuracy vs. cost). *

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

        * An EvaluationMetrics object. Evaluation metrics provide an estimate of the quality of your * machine learning transform. *

        * * @param evaluationMetrics * An EvaluationMetrics object. Evaluation metrics provide an estimate of the quality of * your machine learning transform. * @return Returns a reference to this object so that method calls can be chained together. */ Builder evaluationMetrics(EvaluationMetrics evaluationMetrics); /** *

        * An EvaluationMetrics object. Evaluation metrics provide an estimate of the quality of your * machine learning transform. *

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

        * A count identifier for the labeling files generated by AWS Glue for this transform. As you create a better * transform, you can iteratively download, label, and upload the labeling file. *

        * * @param labelCount * A count identifier for the labeling files generated by AWS Glue for this transform. As you create a * better transform, you can iteratively download, label, and upload the labeling file. * @return Returns a reference to this object so that method calls can be chained together. */ Builder labelCount(Integer labelCount); /** *

        * A map of key-value pairs representing the columns and data types that this transform can run against. Has an * upper bound of 100 columns. *

        * * @param schema * A map of key-value pairs representing the columns and data types that this transform can run against. * Has an upper bound of 100 columns. * @return Returns a reference to this object so that method calls can be chained together. */ Builder schema(Collection schema); /** *

        * A map of key-value pairs representing the columns and data types that this transform can run against. Has an * upper bound of 100 columns. *

        * * @param schema * A map of key-value pairs representing the columns and data types that this transform can run against. * Has an upper bound of 100 columns. * @return Returns a reference to this object so that method calls can be chained together. */ Builder schema(SchemaColumn... schema); /** *

        * A map of key-value pairs representing the columns and data types that this transform can run against. Has an * upper bound of 100 columns. *

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

        * The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required * permissions include both AWS Glue service role permissions to AWS Glue resources, and Amazon S3 permissions * required by the transform. *

        *
          *
        • *

          * This role needs AWS Glue service role permissions to allow access to resources in AWS Glue. See Attach a Policy to IAM Users * That Access AWS Glue. *

          *
        • *
        • *

          * This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary * directory, scripts, and any libraries used by the task run for this transform. *

          *
        • *
        * * @param role * The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required * permissions include both AWS Glue service role permissions to AWS Glue resources, and Amazon S3 * permissions required by the transform.

        *
          *
        • *

          * This role needs AWS Glue service role permissions to allow access to resources in AWS Glue. See Attach a Policy to IAM * Users That Access AWS Glue. *

          *
        • *
        • *

          * This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, * temporary directory, scripts, and any libraries used by the task run for this transform. *

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

          * This value determines which version of AWS Glue this machine learning transform is compatible with. Glue 1.0 * is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For * more information, see AWS Glue * Versions in the developer guide. *

          * * @param glueVersion * This value determines which version of AWS Glue this machine learning transform is compatible with. * Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults * to Glue 0.9. For more information, see AWS Glue * Versions in the developer guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder glueVersion(String glueVersion); /** *

          * The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this transform. You * can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that * consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the AWS Glue pricing page. *

          *

          * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

          *
            *
          • *

            * If either NumberOfWorkers or WorkerType is set, then MaxCapacity * cannot be set. *

            *
          • *
          • *

            * If MaxCapacity is set then neither NumberOfWorkers or WorkerType can * be set. *

            *
          • *
          • *

            * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

            *
          • *
          • *

            * MaxCapacity and NumberOfWorkers must both be at least 1. *

            *
          • *
          *

          * When the WorkerType field is set to a value other than Standard, the * MaxCapacity field is set automatically and becomes read-only. *

          * * @param maxCapacity * The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this * transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of * processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more * information, see the AWS Glue pricing page.

          *

          * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

          *
            *
          • *

            * If either NumberOfWorkers or WorkerType is set, then * MaxCapacity cannot be set. *

            *
          • *
          • *

            * If MaxCapacity is set then neither NumberOfWorkers or * WorkerType can be set. *

            *
          • *
          • *

            * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

            *
          • *
          • *

            * MaxCapacity and NumberOfWorkers must both be at least 1. *

            *
          • *
          *

          * When the WorkerType field is set to a value other than Standard, the * MaxCapacity field is set automatically and becomes read-only. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxCapacity(Double maxCapacity); /** *

          * The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of * Standard, G.1X, or G.2X. *

          *
            *
          • *

            * For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and * 2 executors per worker. *

            *
          • *
          • *

            * For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 * executor per worker. *

            *
          • *
          • *

            * For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 * executor per worker. *

            *
          • *
          *

          * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

          *
            *
          • *

            * If either NumberOfWorkers or WorkerType is set, then MaxCapacity * cannot be set. *

            *
          • *
          • *

            * If MaxCapacity is set then neither NumberOfWorkers or WorkerType can * be set. *

            *
          • *
          • *

            * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

            *
          • *
          • *

            * MaxCapacity and NumberOfWorkers must both be at least 1. *

            *
          • *
          * * @param workerType * The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of * Standard, G.1X, or G.2X.

          *
            *
          • *

            * For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB * disk, and 2 executors per worker. *

            *
          • *
          • *

            * For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, * and 1 executor per worker. *

            *
          • *
          • *

            * For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, * and 1 executor per worker. *

            *
          • *
          *

          * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

          *
            *
          • *

            * If either NumberOfWorkers or WorkerType is set, then * MaxCapacity cannot be set. *

            *
          • *
          • *

            * If MaxCapacity is set then neither NumberOfWorkers or * WorkerType can be set. *

            *
          • *
          • *

            * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

            *
          • *
          • *

            * MaxCapacity and NumberOfWorkers must both be at least 1. *

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

            * The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of * Standard, G.1X, or G.2X. *

            *
              *
            • *

              * For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and * 2 executors per worker. *

              *
            • *
            • *

              * For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 * executor per worker. *

              *
            • *
            • *

              * For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 * executor per worker. *

              *
            • *
            *

            * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

            *
              *
            • *

              * If either NumberOfWorkers or WorkerType is set, then MaxCapacity * cannot be set. *

              *
            • *
            • *

              * If MaxCapacity is set then neither NumberOfWorkers or WorkerType can * be set. *

              *
            • *
            • *

              * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

              *
            • *
            • *

              * MaxCapacity and NumberOfWorkers must both be at least 1. *

              *
            • *
            * * @param workerType * The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of * Standard, G.1X, or G.2X.

            *
              *
            • *

              * For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB * disk, and 2 executors per worker. *

              *
            • *
            • *

              * For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, * and 1 executor per worker. *

              *
            • *
            • *

              * For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, * and 1 executor per worker. *

              *
            • *
            *

            * MaxCapacity is a mutually exclusive option with NumberOfWorkers and * WorkerType. *

            *
              *
            • *

              * If either NumberOfWorkers or WorkerType is set, then * MaxCapacity cannot be set. *

              *
            • *
            • *

              * If MaxCapacity is set then neither NumberOfWorkers or * WorkerType can be set. *

              *
            • *
            • *

              * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

              *
            • *
            • *

              * MaxCapacity and NumberOfWorkers must both be at least 1. *

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

              * The number of workers of a defined workerType that are allocated when a task of the transform * runs. *

              *

              * If WorkerType is set, then NumberOfWorkers is required (and vice versa). *

              * * @param numberOfWorkers * The number of workers of a defined workerType that are allocated when a task of the * transform runs.

              *

              * If WorkerType is set, then NumberOfWorkers is required (and vice versa). * @return Returns a reference to this object so that method calls can be chained together. */ Builder numberOfWorkers(Integer numberOfWorkers); /** *

              * The timeout in minutes of the machine learning transform. *

              * * @param timeout * The timeout in minutes of the machine learning transform. * @return Returns a reference to this object so that method calls can be chained together. */ Builder timeout(Integer timeout); /** *

              * The maximum number of times to retry after an MLTaskRun of the machine learning transform fails. *

              * * @param maxRetries * The maximum number of times to retry after an MLTaskRun of the machine learning transform * fails. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxRetries(Integer maxRetries); } static final class BuilderImpl implements Builder { private String transformId; private String name; private String description; private String status; private Instant createdOn; private Instant lastModifiedOn; private List inputRecordTables = DefaultSdkAutoConstructList.getInstance(); private TransformParameters parameters; private EvaluationMetrics evaluationMetrics; private Integer labelCount; private List schema = DefaultSdkAutoConstructList.getInstance(); private String role; private String glueVersion; private Double maxCapacity; private String workerType; private Integer numberOfWorkers; private Integer timeout; private Integer maxRetries; private BuilderImpl() { } private BuilderImpl(MLTransform model) { transformId(model.transformId); name(model.name); description(model.description); status(model.status); createdOn(model.createdOn); lastModifiedOn(model.lastModifiedOn); inputRecordTables(model.inputRecordTables); parameters(model.parameters); evaluationMetrics(model.evaluationMetrics); labelCount(model.labelCount); schema(model.schema); role(model.role); glueVersion(model.glueVersion); maxCapacity(model.maxCapacity); workerType(model.workerType); numberOfWorkers(model.numberOfWorkers); timeout(model.timeout); maxRetries(model.maxRetries); } public final String getTransformId() { return transformId; } @Override public final Builder transformId(String transformId) { this.transformId = transformId; return this; } public final void setTransformId(String transformId) { this.transformId = transformId; } public final String getName() { return name; } @Override public final Builder name(String name) { this.name = name; return this; } public final void setName(String name) { this.name = name; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final String getStatusAsString() { return status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(TransformStatusType status) { this.status(status == null ? null : status.toString()); return this; } public final void setStatus(String status) { this.status = status; } public final Instant getCreatedOn() { return createdOn; } @Override public final Builder createdOn(Instant createdOn) { this.createdOn = createdOn; return this; } public final void setCreatedOn(Instant createdOn) { this.createdOn = createdOn; } public final Instant getLastModifiedOn() { return lastModifiedOn; } @Override public final Builder lastModifiedOn(Instant lastModifiedOn) { this.lastModifiedOn = lastModifiedOn; return this; } public final void setLastModifiedOn(Instant lastModifiedOn) { this.lastModifiedOn = lastModifiedOn; } public final Collection getInputRecordTables() { return inputRecordTables != null ? inputRecordTables.stream().map(GlueTable::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder inputRecordTables(Collection inputRecordTables) { this.inputRecordTables = GlueTablesCopier.copy(inputRecordTables); return this; } @Override @SafeVarargs public final Builder inputRecordTables(GlueTable... inputRecordTables) { inputRecordTables(Arrays.asList(inputRecordTables)); return this; } @Override @SafeVarargs public final Builder inputRecordTables(Consumer... inputRecordTables) { inputRecordTables(Stream.of(inputRecordTables).map(c -> GlueTable.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setInputRecordTables(Collection inputRecordTables) { this.inputRecordTables = GlueTablesCopier.copyFromBuilder(inputRecordTables); } public final TransformParameters.Builder getParameters() { return parameters != null ? parameters.toBuilder() : null; } @Override public final Builder parameters(TransformParameters parameters) { this.parameters = parameters; return this; } public final void setParameters(TransformParameters.BuilderImpl parameters) { this.parameters = parameters != null ? parameters.build() : null; } public final EvaluationMetrics.Builder getEvaluationMetrics() { return evaluationMetrics != null ? evaluationMetrics.toBuilder() : null; } @Override public final Builder evaluationMetrics(EvaluationMetrics evaluationMetrics) { this.evaluationMetrics = evaluationMetrics; return this; } public final void setEvaluationMetrics(EvaluationMetrics.BuilderImpl evaluationMetrics) { this.evaluationMetrics = evaluationMetrics != null ? evaluationMetrics.build() : null; } public final Integer getLabelCount() { return labelCount; } @Override public final Builder labelCount(Integer labelCount) { this.labelCount = labelCount; return this; } public final void setLabelCount(Integer labelCount) { this.labelCount = labelCount; } public final Collection getSchema() { return schema != null ? schema.stream().map(SchemaColumn::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder schema(Collection schema) { this.schema = TransformSchemaCopier.copy(schema); return this; } @Override @SafeVarargs public final Builder schema(SchemaColumn... schema) { schema(Arrays.asList(schema)); return this; } @Override @SafeVarargs public final Builder schema(Consumer... schema) { schema(Stream.of(schema).map(c -> SchemaColumn.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setSchema(Collection schema) { this.schema = TransformSchemaCopier.copyFromBuilder(schema); } public final String getRole() { return role; } @Override public final Builder role(String role) { this.role = role; return this; } public final void setRole(String role) { this.role = role; } public final String getGlueVersion() { return glueVersion; } @Override public final Builder glueVersion(String glueVersion) { this.glueVersion = glueVersion; return this; } public final void setGlueVersion(String glueVersion) { this.glueVersion = glueVersion; } public final Double getMaxCapacity() { return maxCapacity; } @Override public final Builder maxCapacity(Double maxCapacity) { this.maxCapacity = maxCapacity; return this; } public final void setMaxCapacity(Double maxCapacity) { this.maxCapacity = maxCapacity; } public final String getWorkerTypeAsString() { return workerType; } @Override public final Builder workerType(String workerType) { this.workerType = workerType; return this; } @Override public final Builder workerType(WorkerType workerType) { this.workerType(workerType == null ? null : workerType.toString()); return this; } public final void setWorkerType(String workerType) { this.workerType = workerType; } public final Integer getNumberOfWorkers() { return numberOfWorkers; } @Override public final Builder numberOfWorkers(Integer numberOfWorkers) { this.numberOfWorkers = numberOfWorkers; return this; } public final void setNumberOfWorkers(Integer numberOfWorkers) { this.numberOfWorkers = numberOfWorkers; } public final Integer getTimeout() { return timeout; } @Override public final Builder timeout(Integer timeout) { this.timeout = timeout; return this; } public final void setTimeout(Integer timeout) { this.timeout = timeout; } public final Integer getMaxRetries() { return maxRetries; } @Override public final Builder maxRetries(Integer maxRetries) { this.maxRetries = maxRetries; return this; } public final void setMaxRetries(Integer maxRetries) { this.maxRetries = maxRetries; } @Override public MLTransform build() { return new MLTransform(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy