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

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

/**
 * 

* The configuration properties for the task run. *

*/ @Generated("software.amazon.awssdk:codegen") public final class TaskRunProperties implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField TASK_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("TaskType").getter(getter(TaskRunProperties::taskTypeAsString)).setter(setter(Builder::taskType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TaskType").build()).build(); private static final SdkField IMPORT_LABELS_TASK_RUN_PROPERTIES_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("ImportLabelsTaskRunProperties") .getter(getter(TaskRunProperties::importLabelsTaskRunProperties)) .setter(setter(Builder::importLabelsTaskRunProperties)) .constructor(ImportLabelsTaskRunProperties::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImportLabelsTaskRunProperties") .build()).build(); private static final SdkField EXPORT_LABELS_TASK_RUN_PROPERTIES_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("ExportLabelsTaskRunProperties") .getter(getter(TaskRunProperties::exportLabelsTaskRunProperties)) .setter(setter(Builder::exportLabelsTaskRunProperties)) .constructor(ExportLabelsTaskRunProperties::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExportLabelsTaskRunProperties") .build()).build(); private static final SdkField LABELING_SET_GENERATION_TASK_RUN_PROPERTIES_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("LabelingSetGenerationTaskRunProperties") .getter(getter(TaskRunProperties::labelingSetGenerationTaskRunProperties)) .setter(setter(Builder::labelingSetGenerationTaskRunProperties)) .constructor(LabelingSetGenerationTaskRunProperties::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("LabelingSetGenerationTaskRunProperties").build()).build(); private static final SdkField FIND_MATCHES_TASK_RUN_PROPERTIES_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("FindMatchesTaskRunProperties") .getter(getter(TaskRunProperties::findMatchesTaskRunProperties)) .setter(setter(Builder::findMatchesTaskRunProperties)) .constructor(FindMatchesTaskRunProperties::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FindMatchesTaskRunProperties") .build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TASK_TYPE_FIELD, IMPORT_LABELS_TASK_RUN_PROPERTIES_FIELD, EXPORT_LABELS_TASK_RUN_PROPERTIES_FIELD, LABELING_SET_GENERATION_TASK_RUN_PROPERTIES_FIELD, FIND_MATCHES_TASK_RUN_PROPERTIES_FIELD)); private static final long serialVersionUID = 1L; private final String taskType; private final ImportLabelsTaskRunProperties importLabelsTaskRunProperties; private final ExportLabelsTaskRunProperties exportLabelsTaskRunProperties; private final LabelingSetGenerationTaskRunProperties labelingSetGenerationTaskRunProperties; private final FindMatchesTaskRunProperties findMatchesTaskRunProperties; private TaskRunProperties(BuilderImpl builder) { this.taskType = builder.taskType; this.importLabelsTaskRunProperties = builder.importLabelsTaskRunProperties; this.exportLabelsTaskRunProperties = builder.exportLabelsTaskRunProperties; this.labelingSetGenerationTaskRunProperties = builder.labelingSetGenerationTaskRunProperties; this.findMatchesTaskRunProperties = builder.findMatchesTaskRunProperties; } /** *

* The type of task run. *

*

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

* * @return The type of task run. * @see TaskType */ public final TaskType taskType() { return TaskType.fromValue(taskType); } /** *

* The type of task run. *

*

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

* * @return The type of task run. * @see TaskType */ public final String taskTypeAsString() { return taskType; } /** *

* The configuration properties for an importing labels task run. *

* * @return The configuration properties for an importing labels task run. */ public final ImportLabelsTaskRunProperties importLabelsTaskRunProperties() { return importLabelsTaskRunProperties; } /** *

* The configuration properties for an exporting labels task run. *

* * @return The configuration properties for an exporting labels task run. */ public final ExportLabelsTaskRunProperties exportLabelsTaskRunProperties() { return exportLabelsTaskRunProperties; } /** *

* The configuration properties for a labeling set generation task run. *

* * @return The configuration properties for a labeling set generation task run. */ public final LabelingSetGenerationTaskRunProperties labelingSetGenerationTaskRunProperties() { return labelingSetGenerationTaskRunProperties; } /** *

* The configuration properties for a find matches task run. *

* * @return The configuration properties for a find matches task run. */ public final FindMatchesTaskRunProperties findMatchesTaskRunProperties() { return findMatchesTaskRunProperties; } @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(taskTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(importLabelsTaskRunProperties()); hashCode = 31 * hashCode + Objects.hashCode(exportLabelsTaskRunProperties()); hashCode = 31 * hashCode + Objects.hashCode(labelingSetGenerationTaskRunProperties()); hashCode = 31 * hashCode + Objects.hashCode(findMatchesTaskRunProperties()); 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 TaskRunProperties)) { return false; } TaskRunProperties other = (TaskRunProperties) obj; return Objects.equals(taskTypeAsString(), other.taskTypeAsString()) && Objects.equals(importLabelsTaskRunProperties(), other.importLabelsTaskRunProperties()) && Objects.equals(exportLabelsTaskRunProperties(), other.exportLabelsTaskRunProperties()) && Objects.equals(labelingSetGenerationTaskRunProperties(), other.labelingSetGenerationTaskRunProperties()) && Objects.equals(findMatchesTaskRunProperties(), other.findMatchesTaskRunProperties()); } /** * 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("TaskRunProperties").add("TaskType", taskTypeAsString()) .add("ImportLabelsTaskRunProperties", importLabelsTaskRunProperties()) .add("ExportLabelsTaskRunProperties", exportLabelsTaskRunProperties()) .add("LabelingSetGenerationTaskRunProperties", labelingSetGenerationTaskRunProperties()) .add("FindMatchesTaskRunProperties", findMatchesTaskRunProperties()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "TaskType": return Optional.ofNullable(clazz.cast(taskTypeAsString())); case "ImportLabelsTaskRunProperties": return Optional.ofNullable(clazz.cast(importLabelsTaskRunProperties())); case "ExportLabelsTaskRunProperties": return Optional.ofNullable(clazz.cast(exportLabelsTaskRunProperties())); case "LabelingSetGenerationTaskRunProperties": return Optional.ofNullable(clazz.cast(labelingSetGenerationTaskRunProperties())); case "FindMatchesTaskRunProperties": return Optional.ofNullable(clazz.cast(findMatchesTaskRunProperties())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((TaskRunProperties) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The type of task run. *

* * @param taskType * The type of task run. * @see TaskType * @return Returns a reference to this object so that method calls can be chained together. * @see TaskType */ Builder taskType(String taskType); /** *

* The type of task run. *

* * @param taskType * The type of task run. * @see TaskType * @return Returns a reference to this object so that method calls can be chained together. * @see TaskType */ Builder taskType(TaskType taskType); /** *

* The configuration properties for an importing labels task run. *

* * @param importLabelsTaskRunProperties * The configuration properties for an importing labels task run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder importLabelsTaskRunProperties(ImportLabelsTaskRunProperties importLabelsTaskRunProperties); /** *

* The configuration properties for an importing labels task run. *

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

* The configuration properties for an exporting labels task run. *

* * @param exportLabelsTaskRunProperties * The configuration properties for an exporting labels task run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder exportLabelsTaskRunProperties(ExportLabelsTaskRunProperties exportLabelsTaskRunProperties); /** *

* The configuration properties for an exporting labels task run. *

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

* The configuration properties for a labeling set generation task run. *

* * @param labelingSetGenerationTaskRunProperties * The configuration properties for a labeling set generation task run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder labelingSetGenerationTaskRunProperties( LabelingSetGenerationTaskRunProperties labelingSetGenerationTaskRunProperties); /** *

* The configuration properties for a labeling set generation task run. *

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

* The configuration properties for a find matches task run. *

* * @param findMatchesTaskRunProperties * The configuration properties for a find matches task run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder findMatchesTaskRunProperties(FindMatchesTaskRunProperties findMatchesTaskRunProperties); /** *

* The configuration properties for a find matches task run. *

* This is a convenience that creates an instance of the {@link FindMatchesTaskRunProperties.Builder} avoiding * the need to create one manually via {@link FindMatchesTaskRunProperties#builder()}. * * When the {@link Consumer} completes, {@link FindMatchesTaskRunProperties.Builder#build()} is called * immediately and its result is passed to {@link #findMatchesTaskRunProperties(FindMatchesTaskRunProperties)}. * * @param findMatchesTaskRunProperties * a consumer that will call methods on {@link FindMatchesTaskRunProperties.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #findMatchesTaskRunProperties(FindMatchesTaskRunProperties) */ default Builder findMatchesTaskRunProperties(Consumer findMatchesTaskRunProperties) { return findMatchesTaskRunProperties(FindMatchesTaskRunProperties.builder() .applyMutation(findMatchesTaskRunProperties).build()); } } static final class BuilderImpl implements Builder { private String taskType; private ImportLabelsTaskRunProperties importLabelsTaskRunProperties; private ExportLabelsTaskRunProperties exportLabelsTaskRunProperties; private LabelingSetGenerationTaskRunProperties labelingSetGenerationTaskRunProperties; private FindMatchesTaskRunProperties findMatchesTaskRunProperties; private BuilderImpl() { } private BuilderImpl(TaskRunProperties model) { taskType(model.taskType); importLabelsTaskRunProperties(model.importLabelsTaskRunProperties); exportLabelsTaskRunProperties(model.exportLabelsTaskRunProperties); labelingSetGenerationTaskRunProperties(model.labelingSetGenerationTaskRunProperties); findMatchesTaskRunProperties(model.findMatchesTaskRunProperties); } public final String getTaskType() { return taskType; } @Override public final Builder taskType(String taskType) { this.taskType = taskType; return this; } @Override public final Builder taskType(TaskType taskType) { this.taskType(taskType == null ? null : taskType.toString()); return this; } public final void setTaskType(String taskType) { this.taskType = taskType; } public final ImportLabelsTaskRunProperties.Builder getImportLabelsTaskRunProperties() { return importLabelsTaskRunProperties != null ? importLabelsTaskRunProperties.toBuilder() : null; } @Override public final Builder importLabelsTaskRunProperties(ImportLabelsTaskRunProperties importLabelsTaskRunProperties) { this.importLabelsTaskRunProperties = importLabelsTaskRunProperties; return this; } public final void setImportLabelsTaskRunProperties(ImportLabelsTaskRunProperties.BuilderImpl importLabelsTaskRunProperties) { this.importLabelsTaskRunProperties = importLabelsTaskRunProperties != null ? importLabelsTaskRunProperties.build() : null; } public final ExportLabelsTaskRunProperties.Builder getExportLabelsTaskRunProperties() { return exportLabelsTaskRunProperties != null ? exportLabelsTaskRunProperties.toBuilder() : null; } @Override public final Builder exportLabelsTaskRunProperties(ExportLabelsTaskRunProperties exportLabelsTaskRunProperties) { this.exportLabelsTaskRunProperties = exportLabelsTaskRunProperties; return this; } public final void setExportLabelsTaskRunProperties(ExportLabelsTaskRunProperties.BuilderImpl exportLabelsTaskRunProperties) { this.exportLabelsTaskRunProperties = exportLabelsTaskRunProperties != null ? exportLabelsTaskRunProperties.build() : null; } public final LabelingSetGenerationTaskRunProperties.Builder getLabelingSetGenerationTaskRunProperties() { return labelingSetGenerationTaskRunProperties != null ? labelingSetGenerationTaskRunProperties.toBuilder() : null; } @Override public final Builder labelingSetGenerationTaskRunProperties( LabelingSetGenerationTaskRunProperties labelingSetGenerationTaskRunProperties) { this.labelingSetGenerationTaskRunProperties = labelingSetGenerationTaskRunProperties; return this; } public final void setLabelingSetGenerationTaskRunProperties( LabelingSetGenerationTaskRunProperties.BuilderImpl labelingSetGenerationTaskRunProperties) { this.labelingSetGenerationTaskRunProperties = labelingSetGenerationTaskRunProperties != null ? labelingSetGenerationTaskRunProperties .build() : null; } public final FindMatchesTaskRunProperties.Builder getFindMatchesTaskRunProperties() { return findMatchesTaskRunProperties != null ? findMatchesTaskRunProperties.toBuilder() : null; } @Override public final Builder findMatchesTaskRunProperties(FindMatchesTaskRunProperties findMatchesTaskRunProperties) { this.findMatchesTaskRunProperties = findMatchesTaskRunProperties; return this; } public final void setFindMatchesTaskRunProperties(FindMatchesTaskRunProperties.BuilderImpl findMatchesTaskRunProperties) { this.findMatchesTaskRunProperties = findMatchesTaskRunProperties != null ? findMatchesTaskRunProperties.build() : null; } @Override public TaskRunProperties build() { return new TaskRunProperties(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy