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

software.amazon.awssdk.services.sagemaker.model.LabelingJobAlgorithmsConfig Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.sagemaker.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Provides configuration information for auto-labeling of your data objects. A LabelingJobAlgorithmsConfig * object must be supplied in order to use auto-labeling. *

*/ @Generated("software.amazon.awssdk:codegen") public final class LabelingJobAlgorithmsConfig implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField LABELING_JOB_ALGORITHM_SPECIFICATION_ARN_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("LabelingJobAlgorithmSpecificationArn") .getter(getter(LabelingJobAlgorithmsConfig::labelingJobAlgorithmSpecificationArn)) .setter(setter(Builder::labelingJobAlgorithmSpecificationArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("LabelingJobAlgorithmSpecificationArn").build()).build(); private static final SdkField INITIAL_ACTIVE_LEARNING_MODEL_ARN_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("InitialActiveLearningModelArn") .getter(getter(LabelingJobAlgorithmsConfig::initialActiveLearningModelArn)) .setter(setter(Builder::initialActiveLearningModelArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InitialActiveLearningModelArn") .build()).build(); private static final SdkField LABELING_JOB_RESOURCE_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("LabelingJobResourceConfig") .getter(getter(LabelingJobAlgorithmsConfig::labelingJobResourceConfig)) .setter(setter(Builder::labelingJobResourceConfig)).constructor(LabelingJobResourceConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LabelingJobResourceConfig").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList( LABELING_JOB_ALGORITHM_SPECIFICATION_ARN_FIELD, INITIAL_ACTIVE_LEARNING_MODEL_ARN_FIELD, LABELING_JOB_RESOURCE_CONFIG_FIELD)); private static final long serialVersionUID = 1L; private final String labelingJobAlgorithmSpecificationArn; private final String initialActiveLearningModelArn; private final LabelingJobResourceConfig labelingJobResourceConfig; private LabelingJobAlgorithmsConfig(BuilderImpl builder) { this.labelingJobAlgorithmSpecificationArn = builder.labelingJobAlgorithmSpecificationArn; this.initialActiveLearningModelArn = builder.initialActiveLearningModelArn; this.labelingJobResourceConfig = builder.labelingJobResourceConfig; } /** *

* Specifies the Amazon Resource Name (ARN) of the algorithm used for auto-labeling. You must select one of the * following ARNs: *

*
    *
  • *

    * Image classification *

    *

    * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/image-classification *

    *
  • *
  • *

    * Text classification *

    *

    * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/text-classification *

    *
  • *
  • *

    * Object detection *

    *

    * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/object-detection *

    *
  • *
  • *

    * Semantic Segmentation *

    *

    * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/semantic-segmentation *

    *
  • *
* * @return Specifies the Amazon Resource Name (ARN) of the algorithm used for auto-labeling. You must select one of * the following ARNs:

*
    *
  • *

    * Image classification *

    *

    * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/image-classification *

    *
  • *
  • *

    * Text classification *

    *

    * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/text-classification *

    *
  • *
  • *

    * Object detection *

    *

    * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/object-detection *

    *
  • *
  • *

    * Semantic Segmentation *

    *

    * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/semantic-segmentation *

    *
  • */ public final String labelingJobAlgorithmSpecificationArn() { return labelingJobAlgorithmSpecificationArn; } /** *

    * At the end of an auto-label job Ground Truth sends the Amazon Resource Name (ARN) of the final model used for * auto-labeling. You can use this model as the starting point for subsequent similar jobs by providing the ARN of * the model here. *

    * * @return At the end of an auto-label job Ground Truth sends the Amazon Resource Name (ARN) of the final model used * for auto-labeling. You can use this model as the starting point for subsequent similar jobs by providing * the ARN of the model here. */ public final String initialActiveLearningModelArn() { return initialActiveLearningModelArn; } /** *

    * Provides configuration information for a labeling job. *

    * * @return Provides configuration information for a labeling job. */ public final LabelingJobResourceConfig labelingJobResourceConfig() { return labelingJobResourceConfig; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(labelingJobAlgorithmSpecificationArn()); hashCode = 31 * hashCode + Objects.hashCode(initialActiveLearningModelArn()); hashCode = 31 * hashCode + Objects.hashCode(labelingJobResourceConfig()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof LabelingJobAlgorithmsConfig)) { return false; } LabelingJobAlgorithmsConfig other = (LabelingJobAlgorithmsConfig) obj; return Objects.equals(labelingJobAlgorithmSpecificationArn(), other.labelingJobAlgorithmSpecificationArn()) && Objects.equals(initialActiveLearningModelArn(), other.initialActiveLearningModelArn()) && Objects.equals(labelingJobResourceConfig(), other.labelingJobResourceConfig()); } /** * 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("LabelingJobAlgorithmsConfig") .add("LabelingJobAlgorithmSpecificationArn", labelingJobAlgorithmSpecificationArn()) .add("InitialActiveLearningModelArn", initialActiveLearningModelArn()) .add("LabelingJobResourceConfig", labelingJobResourceConfig()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "LabelingJobAlgorithmSpecificationArn": return Optional.ofNullable(clazz.cast(labelingJobAlgorithmSpecificationArn())); case "InitialActiveLearningModelArn": return Optional.ofNullable(clazz.cast(initialActiveLearningModelArn())); case "LabelingJobResourceConfig": return Optional.ofNullable(clazz.cast(labelingJobResourceConfig())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((LabelingJobAlgorithmsConfig) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * Specifies the Amazon Resource Name (ARN) of the algorithm used for auto-labeling. You must select one of the * following ARNs: *

    *
      *
    • *

      * Image classification *

      *

      * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/image-classification *

      *
    • *
    • *

      * Text classification *

      *

      * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/text-classification *

      *
    • *
    • *

      * Object detection *

      *

      * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/object-detection *

      *
    • *
    • *

      * Semantic Segmentation *

      *

      * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/semantic-segmentation *

      *
    • *
    * * @param labelingJobAlgorithmSpecificationArn * Specifies the Amazon Resource Name (ARN) of the algorithm used for auto-labeling. You must select one * of the following ARNs:

    *
      *
    • *

      * Image classification *

      *

      * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/image-classification *

      *
    • *
    • *

      * Text classification *

      *

      * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/text-classification *

      *
    • *
    • *

      * Object detection *

      *

      * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/object-detection *

      *
    • *
    • *

      * Semantic Segmentation *

      *

      * arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/semantic-segmentation *

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

      * At the end of an auto-label job Ground Truth sends the Amazon Resource Name (ARN) of the final model used for * auto-labeling. You can use this model as the starting point for subsequent similar jobs by providing the ARN * of the model here. *

      * * @param initialActiveLearningModelArn * At the end of an auto-label job Ground Truth sends the Amazon Resource Name (ARN) of the final model * used for auto-labeling. You can use this model as the starting point for subsequent similar jobs by * providing the ARN of the model here. * @return Returns a reference to this object so that method calls can be chained together. */ Builder initialActiveLearningModelArn(String initialActiveLearningModelArn); /** *

      * Provides configuration information for a labeling job. *

      * * @param labelingJobResourceConfig * Provides configuration information for a labeling job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder labelingJobResourceConfig(LabelingJobResourceConfig labelingJobResourceConfig); /** *

      * Provides configuration information for a labeling job. *

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

      * When the {@link Consumer} completes, {@link LabelingJobResourceConfig.Builder#build()} is called immediately * and its result is passed to {@link #labelingJobResourceConfig(LabelingJobResourceConfig)}. * * @param labelingJobResourceConfig * a consumer that will call methods on {@link LabelingJobResourceConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #labelingJobResourceConfig(LabelingJobResourceConfig) */ default Builder labelingJobResourceConfig(Consumer labelingJobResourceConfig) { return labelingJobResourceConfig(LabelingJobResourceConfig.builder().applyMutation(labelingJobResourceConfig).build()); } } static final class BuilderImpl implements Builder { private String labelingJobAlgorithmSpecificationArn; private String initialActiveLearningModelArn; private LabelingJobResourceConfig labelingJobResourceConfig; private BuilderImpl() { } private BuilderImpl(LabelingJobAlgorithmsConfig model) { labelingJobAlgorithmSpecificationArn(model.labelingJobAlgorithmSpecificationArn); initialActiveLearningModelArn(model.initialActiveLearningModelArn); labelingJobResourceConfig(model.labelingJobResourceConfig); } public final String getLabelingJobAlgorithmSpecificationArn() { return labelingJobAlgorithmSpecificationArn; } public final void setLabelingJobAlgorithmSpecificationArn(String labelingJobAlgorithmSpecificationArn) { this.labelingJobAlgorithmSpecificationArn = labelingJobAlgorithmSpecificationArn; } @Override public final Builder labelingJobAlgorithmSpecificationArn(String labelingJobAlgorithmSpecificationArn) { this.labelingJobAlgorithmSpecificationArn = labelingJobAlgorithmSpecificationArn; return this; } public final String getInitialActiveLearningModelArn() { return initialActiveLearningModelArn; } public final void setInitialActiveLearningModelArn(String initialActiveLearningModelArn) { this.initialActiveLearningModelArn = initialActiveLearningModelArn; } @Override public final Builder initialActiveLearningModelArn(String initialActiveLearningModelArn) { this.initialActiveLearningModelArn = initialActiveLearningModelArn; return this; } public final LabelingJobResourceConfig.Builder getLabelingJobResourceConfig() { return labelingJobResourceConfig != null ? labelingJobResourceConfig.toBuilder() : null; } public final void setLabelingJobResourceConfig(LabelingJobResourceConfig.BuilderImpl labelingJobResourceConfig) { this.labelingJobResourceConfig = labelingJobResourceConfig != null ? labelingJobResourceConfig.build() : null; } @Override public final Builder labelingJobResourceConfig(LabelingJobResourceConfig labelingJobResourceConfig) { this.labelingJobResourceConfig = labelingJobResourceConfig; return this; } @Override public LabelingJobAlgorithmsConfig build() { return new LabelingJobAlgorithmsConfig(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy