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

software.amazon.awssdk.services.sagemaker.model.LabelingJobForWorkteamSummary 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.28.4
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.io.Serializable;
import java.time.Instant;
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 summary information for a work team. *

*/ @Generated("software.amazon.awssdk:codegen") public final class LabelingJobForWorkteamSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField LABELING_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LabelingJobName").getter(getter(LabelingJobForWorkteamSummary::labelingJobName)) .setter(setter(Builder::labelingJobName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LabelingJobName").build()).build(); private static final SdkField JOB_REFERENCE_CODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("JobReferenceCode").getter(getter(LabelingJobForWorkteamSummary::jobReferenceCode)) .setter(setter(Builder::jobReferenceCode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JobReferenceCode").build()).build(); private static final SdkField WORK_REQUESTER_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("WorkRequesterAccountId").getter(getter(LabelingJobForWorkteamSummary::workRequesterAccountId)) .setter(setter(Builder::workRequesterAccountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WorkRequesterAccountId").build()) .build(); private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreationTime").getter(getter(LabelingJobForWorkteamSummary::creationTime)) .setter(setter(Builder::creationTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build(); private static final SdkField LABEL_COUNTERS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("LabelCounters") .getter(getter(LabelingJobForWorkteamSummary::labelCounters)).setter(setter(Builder::labelCounters)) .constructor(LabelCountersForWorkteam::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LabelCounters").build()).build(); private static final SdkField NUMBER_OF_HUMAN_WORKERS_PER_DATA_OBJECT_FIELD = SdkField . builder(MarshallingType.INTEGER) .memberName("NumberOfHumanWorkersPerDataObject") .getter(getter(LabelingJobForWorkteamSummary::numberOfHumanWorkersPerDataObject)) .setter(setter(Builder::numberOfHumanWorkersPerDataObject)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NumberOfHumanWorkersPerDataObject") .build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(LABELING_JOB_NAME_FIELD, JOB_REFERENCE_CODE_FIELD, WORK_REQUESTER_ACCOUNT_ID_FIELD, CREATION_TIME_FIELD, LABEL_COUNTERS_FIELD, NUMBER_OF_HUMAN_WORKERS_PER_DATA_OBJECT_FIELD)); private static final long serialVersionUID = 1L; private final String labelingJobName; private final String jobReferenceCode; private final String workRequesterAccountId; private final Instant creationTime; private final LabelCountersForWorkteam labelCounters; private final Integer numberOfHumanWorkersPerDataObject; private LabelingJobForWorkteamSummary(BuilderImpl builder) { this.labelingJobName = builder.labelingJobName; this.jobReferenceCode = builder.jobReferenceCode; this.workRequesterAccountId = builder.workRequesterAccountId; this.creationTime = builder.creationTime; this.labelCounters = builder.labelCounters; this.numberOfHumanWorkersPerDataObject = builder.numberOfHumanWorkersPerDataObject; } /** *

* The name of the labeling job that the work team is assigned to. *

* * @return The name of the labeling job that the work team is assigned to. */ public final String labelingJobName() { return labelingJobName; } /** *

* A unique identifier for a labeling job. You can use this to refer to a specific labeling job. *

* * @return A unique identifier for a labeling job. You can use this to refer to a specific labeling job. */ public final String jobReferenceCode() { return jobReferenceCode; } /** *

* The Amazon Web Services account ID of the account used to start the labeling job. *

* * @return The Amazon Web Services account ID of the account used to start the labeling job. */ public final String workRequesterAccountId() { return workRequesterAccountId; } /** *

* The date and time that the labeling job was created. *

* * @return The date and time that the labeling job was created. */ public final Instant creationTime() { return creationTime; } /** *

* Provides information about the progress of a labeling job. *

* * @return Provides information about the progress of a labeling job. */ public final LabelCountersForWorkteam labelCounters() { return labelCounters; } /** *

* The configured number of workers per data object. *

* * @return The configured number of workers per data object. */ public final Integer numberOfHumanWorkersPerDataObject() { return numberOfHumanWorkersPerDataObject; } @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(labelingJobName()); hashCode = 31 * hashCode + Objects.hashCode(jobReferenceCode()); hashCode = 31 * hashCode + Objects.hashCode(workRequesterAccountId()); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(labelCounters()); hashCode = 31 * hashCode + Objects.hashCode(numberOfHumanWorkersPerDataObject()); 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 LabelingJobForWorkteamSummary)) { return false; } LabelingJobForWorkteamSummary other = (LabelingJobForWorkteamSummary) obj; return Objects.equals(labelingJobName(), other.labelingJobName()) && Objects.equals(jobReferenceCode(), other.jobReferenceCode()) && Objects.equals(workRequesterAccountId(), other.workRequesterAccountId()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(labelCounters(), other.labelCounters()) && Objects.equals(numberOfHumanWorkersPerDataObject(), other.numberOfHumanWorkersPerDataObject()); } /** * 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("LabelingJobForWorkteamSummary").add("LabelingJobName", labelingJobName()) .add("JobReferenceCode", jobReferenceCode()).add("WorkRequesterAccountId", workRequesterAccountId()) .add("CreationTime", creationTime()).add("LabelCounters", labelCounters()) .add("NumberOfHumanWorkersPerDataObject", numberOfHumanWorkersPerDataObject()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "LabelingJobName": return Optional.ofNullable(clazz.cast(labelingJobName())); case "JobReferenceCode": return Optional.ofNullable(clazz.cast(jobReferenceCode())); case "WorkRequesterAccountId": return Optional.ofNullable(clazz.cast(workRequesterAccountId())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "LabelCounters": return Optional.ofNullable(clazz.cast(labelCounters())); case "NumberOfHumanWorkersPerDataObject": return Optional.ofNullable(clazz.cast(numberOfHumanWorkersPerDataObject())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((LabelingJobForWorkteamSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the labeling job that the work team is assigned to. *

* * @param labelingJobName * The name of the labeling job that the work team is assigned to. * @return Returns a reference to this object so that method calls can be chained together. */ Builder labelingJobName(String labelingJobName); /** *

* A unique identifier for a labeling job. You can use this to refer to a specific labeling job. *

* * @param jobReferenceCode * A unique identifier for a labeling job. You can use this to refer to a specific labeling job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jobReferenceCode(String jobReferenceCode); /** *

* The Amazon Web Services account ID of the account used to start the labeling job. *

* * @param workRequesterAccountId * The Amazon Web Services account ID of the account used to start the labeling job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder workRequesterAccountId(String workRequesterAccountId); /** *

* The date and time that the labeling job was created. *

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

* Provides information about the progress of a labeling job. *

* * @param labelCounters * Provides information about the progress of a labeling job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder labelCounters(LabelCountersForWorkteam labelCounters); /** *

* Provides information about the progress of a labeling job. *

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

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

* The configured number of workers per data object. *

* * @param numberOfHumanWorkersPerDataObject * The configured number of workers per data object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder numberOfHumanWorkersPerDataObject(Integer numberOfHumanWorkersPerDataObject); } static final class BuilderImpl implements Builder { private String labelingJobName; private String jobReferenceCode; private String workRequesterAccountId; private Instant creationTime; private LabelCountersForWorkteam labelCounters; private Integer numberOfHumanWorkersPerDataObject; private BuilderImpl() { } private BuilderImpl(LabelingJobForWorkteamSummary model) { labelingJobName(model.labelingJobName); jobReferenceCode(model.jobReferenceCode); workRequesterAccountId(model.workRequesterAccountId); creationTime(model.creationTime); labelCounters(model.labelCounters); numberOfHumanWorkersPerDataObject(model.numberOfHumanWorkersPerDataObject); } public final String getLabelingJobName() { return labelingJobName; } public final void setLabelingJobName(String labelingJobName) { this.labelingJobName = labelingJobName; } @Override public final Builder labelingJobName(String labelingJobName) { this.labelingJobName = labelingJobName; return this; } public final String getJobReferenceCode() { return jobReferenceCode; } public final void setJobReferenceCode(String jobReferenceCode) { this.jobReferenceCode = jobReferenceCode; } @Override public final Builder jobReferenceCode(String jobReferenceCode) { this.jobReferenceCode = jobReferenceCode; return this; } public final String getWorkRequesterAccountId() { return workRequesterAccountId; } public final void setWorkRequesterAccountId(String workRequesterAccountId) { this.workRequesterAccountId = workRequesterAccountId; } @Override public final Builder workRequesterAccountId(String workRequesterAccountId) { this.workRequesterAccountId = workRequesterAccountId; return this; } public final Instant getCreationTime() { return creationTime; } public final void setCreationTime(Instant creationTime) { this.creationTime = creationTime; } @Override public final Builder creationTime(Instant creationTime) { this.creationTime = creationTime; return this; } public final LabelCountersForWorkteam.Builder getLabelCounters() { return labelCounters != null ? labelCounters.toBuilder() : null; } public final void setLabelCounters(LabelCountersForWorkteam.BuilderImpl labelCounters) { this.labelCounters = labelCounters != null ? labelCounters.build() : null; } @Override public final Builder labelCounters(LabelCountersForWorkteam labelCounters) { this.labelCounters = labelCounters; return this; } public final Integer getNumberOfHumanWorkersPerDataObject() { return numberOfHumanWorkersPerDataObject; } public final void setNumberOfHumanWorkersPerDataObject(Integer numberOfHumanWorkersPerDataObject) { this.numberOfHumanWorkersPerDataObject = numberOfHumanWorkersPerDataObject; } @Override public final Builder numberOfHumanWorkersPerDataObject(Integer numberOfHumanWorkersPerDataObject) { this.numberOfHumanWorkersPerDataObject = numberOfHumanWorkersPerDataObject; return this; } @Override public LabelingJobForWorkteamSummary build() { return new LabelingJobForWorkteamSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy