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

software.amazon.awssdk.services.sagemaker.model.DescribeProcessingJobResponse 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.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.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.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class DescribeProcessingJobResponse extends SageMakerResponse implements
        ToCopyableBuilder {
    private static final SdkField> PROCESSING_INPUTS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("ProcessingInputs")
            .getter(getter(DescribeProcessingJobResponse::processingInputs))
            .setter(setter(Builder::processingInputs))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingInputs").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(ProcessingInput::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField PROCESSING_OUTPUT_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("ProcessingOutputConfig")
            .getter(getter(DescribeProcessingJobResponse::processingOutputConfig))
            .setter(setter(Builder::processingOutputConfig)).constructor(ProcessingOutputConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingOutputConfig").build())
            .build();

    private static final SdkField PROCESSING_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ProcessingJobName").getter(getter(DescribeProcessingJobResponse::processingJobName))
            .setter(setter(Builder::processingJobName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingJobName").build()).build();

    private static final SdkField PROCESSING_RESOURCES_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("ProcessingResources")
            .getter(getter(DescribeProcessingJobResponse::processingResources)).setter(setter(Builder::processingResources))
            .constructor(ProcessingResources::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingResources").build())
            .build();

    private static final SdkField STOPPING_CONDITION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("StoppingCondition")
            .getter(getter(DescribeProcessingJobResponse::stoppingCondition)).setter(setter(Builder::stoppingCondition))
            .constructor(ProcessingStoppingCondition::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StoppingCondition").build()).build();

    private static final SdkField APP_SPECIFICATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("AppSpecification")
            .getter(getter(DescribeProcessingJobResponse::appSpecification)).setter(setter(Builder::appSpecification))
            .constructor(AppSpecification::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AppSpecification").build()).build();

    private static final SdkField> ENVIRONMENT_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("Environment")
            .getter(getter(DescribeProcessingJobResponse::environment))
            .setter(setter(Builder::environment))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Environment").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

    private static final SdkField NETWORK_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("NetworkConfig")
            .getter(getter(DescribeProcessingJobResponse::networkConfig)).setter(setter(Builder::networkConfig))
            .constructor(NetworkConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NetworkConfig").build()).build();

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

    private static final SdkField EXPERIMENT_CONFIG_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("ExperimentConfig")
            .getter(getter(DescribeProcessingJobResponse::experimentConfig)).setter(setter(Builder::experimentConfig))
            .constructor(ExperimentConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExperimentConfig").build()).build();

    private static final SdkField PROCESSING_JOB_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ProcessingJobArn").getter(getter(DescribeProcessingJobResponse::processingJobArn))
            .setter(setter(Builder::processingJobArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingJobArn").build()).build();

    private static final SdkField PROCESSING_JOB_STATUS_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ProcessingJobStatus").getter(getter(DescribeProcessingJobResponse::processingJobStatusAsString))
            .setter(setter(Builder::processingJobStatus))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingJobStatus").build())
            .build();

    private static final SdkField EXIT_MESSAGE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ExitMessage").getter(getter(DescribeProcessingJobResponse::exitMessage))
            .setter(setter(Builder::exitMessage))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExitMessage").build()).build();

    private static final SdkField FAILURE_REASON_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("FailureReason").getter(getter(DescribeProcessingJobResponse::failureReason))
            .setter(setter(Builder::failureReason))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureReason").build()).build();

    private static final SdkField PROCESSING_END_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("ProcessingEndTime").getter(getter(DescribeProcessingJobResponse::processingEndTime))
            .setter(setter(Builder::processingEndTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingEndTime").build()).build();

    private static final SdkField PROCESSING_START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("ProcessingStartTime").getter(getter(DescribeProcessingJobResponse::processingStartTime))
            .setter(setter(Builder::processingStartTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProcessingStartTime").build())
            .build();

    private static final SdkField LAST_MODIFIED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("LastModifiedTime").getter(getter(DescribeProcessingJobResponse::lastModifiedTime))
            .setter(setter(Builder::lastModifiedTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedTime").build()).build();

    private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
            .memberName("CreationTime").getter(getter(DescribeProcessingJobResponse::creationTime))
            .setter(setter(Builder::creationTime))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();

    private static final SdkField MONITORING_SCHEDULE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("MonitoringScheduleArn").getter(getter(DescribeProcessingJobResponse::monitoringScheduleArn))
            .setter(setter(Builder::monitoringScheduleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MonitoringScheduleArn").build())
            .build();

    private static final SdkField AUTO_ML_JOB_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("AutoMLJobArn").getter(getter(DescribeProcessingJobResponse::autoMLJobArn))
            .setter(setter(Builder::autoMLJobArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoMLJobArn").build()).build();

    private static final SdkField TRAINING_JOB_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("TrainingJobArn").getter(getter(DescribeProcessingJobResponse::trainingJobArn))
            .setter(setter(Builder::trainingJobArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TrainingJobArn").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(PROCESSING_INPUTS_FIELD,
            PROCESSING_OUTPUT_CONFIG_FIELD, PROCESSING_JOB_NAME_FIELD, PROCESSING_RESOURCES_FIELD, STOPPING_CONDITION_FIELD,
            APP_SPECIFICATION_FIELD, ENVIRONMENT_FIELD, NETWORK_CONFIG_FIELD, ROLE_ARN_FIELD, EXPERIMENT_CONFIG_FIELD,
            PROCESSING_JOB_ARN_FIELD, PROCESSING_JOB_STATUS_FIELD, EXIT_MESSAGE_FIELD, FAILURE_REASON_FIELD,
            PROCESSING_END_TIME_FIELD, PROCESSING_START_TIME_FIELD, LAST_MODIFIED_TIME_FIELD, CREATION_TIME_FIELD,
            MONITORING_SCHEDULE_ARN_FIELD, AUTO_ML_JOB_ARN_FIELD, TRAINING_JOB_ARN_FIELD));

    private final List processingInputs;

    private final ProcessingOutputConfig processingOutputConfig;

    private final String processingJobName;

    private final ProcessingResources processingResources;

    private final ProcessingStoppingCondition stoppingCondition;

    private final AppSpecification appSpecification;

    private final Map environment;

    private final NetworkConfig networkConfig;

    private final String roleArn;

    private final ExperimentConfig experimentConfig;

    private final String processingJobArn;

    private final String processingJobStatus;

    private final String exitMessage;

    private final String failureReason;

    private final Instant processingEndTime;

    private final Instant processingStartTime;

    private final Instant lastModifiedTime;

    private final Instant creationTime;

    private final String monitoringScheduleArn;

    private final String autoMLJobArn;

    private final String trainingJobArn;

    private DescribeProcessingJobResponse(BuilderImpl builder) {
        super(builder);
        this.processingInputs = builder.processingInputs;
        this.processingOutputConfig = builder.processingOutputConfig;
        this.processingJobName = builder.processingJobName;
        this.processingResources = builder.processingResources;
        this.stoppingCondition = builder.stoppingCondition;
        this.appSpecification = builder.appSpecification;
        this.environment = builder.environment;
        this.networkConfig = builder.networkConfig;
        this.roleArn = builder.roleArn;
        this.experimentConfig = builder.experimentConfig;
        this.processingJobArn = builder.processingJobArn;
        this.processingJobStatus = builder.processingJobStatus;
        this.exitMessage = builder.exitMessage;
        this.failureReason = builder.failureReason;
        this.processingEndTime = builder.processingEndTime;
        this.processingStartTime = builder.processingStartTime;
        this.lastModifiedTime = builder.lastModifiedTime;
        this.creationTime = builder.creationTime;
        this.monitoringScheduleArn = builder.monitoringScheduleArn;
        this.autoMLJobArn = builder.autoMLJobArn;
        this.trainingJobArn = builder.trainingJobArn;
    }

    /**
     * For responses, this returns true if the service returned a value for the ProcessingInputs property. This DOES NOT
     * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
     * This is useful because the SDK will never return a null collection or map, but you may need to differentiate
     * between the service returning nothing (or null) and the service returning an empty collection or map. For
     * requests, this returns true if a value for the property was specified in the request builder, and false if a
     * value was not specified.
     */
    public final boolean hasProcessingInputs() {
        return processingInputs != null && !(processingInputs instanceof SdkAutoConstructList);
    }

    /**
     * 

* The inputs for a processing job. *

*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasProcessingInputs} method. *

* * @return The inputs for a processing job. */ public final List processingInputs() { return processingInputs; } /** *

* Output configuration for the processing job. *

* * @return Output configuration for the processing job. */ public final ProcessingOutputConfig processingOutputConfig() { return processingOutputConfig; } /** *

* The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web * Services account. *

* * @return The name of the processing job. The name must be unique within an Amazon Web Services Region in the * Amazon Web Services account. */ public final String processingJobName() { return processingJobName; } /** *

* Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In * distributed training, you specify more than one instance. *

* * @return Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In * distributed training, you specify more than one instance. */ public final ProcessingResources processingResources() { return processingResources; } /** *

* The time limit for how long the processing job is allowed to run. *

* * @return The time limit for how long the processing job is allowed to run. */ public final ProcessingStoppingCondition stoppingCondition() { return stoppingCondition; } /** *

* Configures the processing job to run a specified container image. *

* * @return Configures the processing job to run a specified container image. */ public final AppSpecification appSpecification() { return appSpecification; } /** * For responses, this returns true if the service returned a value for the Environment property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasEnvironment() { return environment != null && !(environment instanceof SdkAutoConstructMap); } /** *

* The environment variables set in the Docker container. *

*

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

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasEnvironment} method. *

* * @return The environment variables set in the Docker container. */ public final Map environment() { return environment; } /** *

* Networking options for a processing job. *

* * @return Networking options for a processing job. */ public final NetworkConfig networkConfig() { return networkConfig; } /** *

* The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf. *

* * @return The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your * behalf. */ public final String roleArn() { return roleArn; } /** *

* The configuration information used to create an experiment. *

* * @return The configuration information used to create an experiment. */ public final ExperimentConfig experimentConfig() { return experimentConfig; } /** *

* The Amazon Resource Name (ARN) of the processing job. *

* * @return The Amazon Resource Name (ARN) of the processing job. */ public final String processingJobArn() { return processingJobArn; } /** *

* Provides the status of a processing job. *

*

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

* * @return Provides the status of a processing job. * @see ProcessingJobStatus */ public final ProcessingJobStatus processingJobStatus() { return ProcessingJobStatus.fromValue(processingJobStatus); } /** *

* Provides the status of a processing job. *

*

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

* * @return Provides the status of a processing job. * @see ProcessingJobStatus */ public final String processingJobStatusAsString() { return processingJobStatus; } /** *

* An optional string, up to one KB in size, that contains metadata from the processing container when the * processing job exits. *

* * @return An optional string, up to one KB in size, that contains metadata from the processing container when the * processing job exits. */ public final String exitMessage() { return exitMessage; } /** *

* A string, up to one KB in size, that contains the reason a processing job failed, if it failed. *

* * @return A string, up to one KB in size, that contains the reason a processing job failed, if it failed. */ public final String failureReason() { return failureReason; } /** *

* The time at which the processing job completed. *

* * @return The time at which the processing job completed. */ public final Instant processingEndTime() { return processingEndTime; } /** *

* The time at which the processing job started. *

* * @return The time at which the processing job started. */ public final Instant processingStartTime() { return processingStartTime; } /** *

* The time at which the processing job was last modified. *

* * @return The time at which the processing job was last modified. */ public final Instant lastModifiedTime() { return lastModifiedTime; } /** *

* The time at which the processing job was created. *

* * @return The time at which the processing job was created. */ public final Instant creationTime() { return creationTime; } /** *

* The ARN of a monitoring schedule for an endpoint associated with this processing job. *

* * @return The ARN of a monitoring schedule for an endpoint associated with this processing job. */ public final String monitoringScheduleArn() { return monitoringScheduleArn; } /** *

* The ARN of an AutoML job associated with this processing job. *

* * @return The ARN of an AutoML job associated with this processing job. */ public final String autoMLJobArn() { return autoMLJobArn; } /** *

* The ARN of a training job associated with this processing job. *

* * @return The ARN of a training job associated with this processing job. */ public final String trainingJobArn() { return trainingJobArn; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(hasProcessingInputs() ? processingInputs() : null); hashCode = 31 * hashCode + Objects.hashCode(processingOutputConfig()); hashCode = 31 * hashCode + Objects.hashCode(processingJobName()); hashCode = 31 * hashCode + Objects.hashCode(processingResources()); hashCode = 31 * hashCode + Objects.hashCode(stoppingCondition()); hashCode = 31 * hashCode + Objects.hashCode(appSpecification()); hashCode = 31 * hashCode + Objects.hashCode(hasEnvironment() ? environment() : null); hashCode = 31 * hashCode + Objects.hashCode(networkConfig()); hashCode = 31 * hashCode + Objects.hashCode(roleArn()); hashCode = 31 * hashCode + Objects.hashCode(experimentConfig()); hashCode = 31 * hashCode + Objects.hashCode(processingJobArn()); hashCode = 31 * hashCode + Objects.hashCode(processingJobStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(exitMessage()); hashCode = 31 * hashCode + Objects.hashCode(failureReason()); hashCode = 31 * hashCode + Objects.hashCode(processingEndTime()); hashCode = 31 * hashCode + Objects.hashCode(processingStartTime()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedTime()); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(monitoringScheduleArn()); hashCode = 31 * hashCode + Objects.hashCode(autoMLJobArn()); hashCode = 31 * hashCode + Objects.hashCode(trainingJobArn()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DescribeProcessingJobResponse)) { return false; } DescribeProcessingJobResponse other = (DescribeProcessingJobResponse) obj; return hasProcessingInputs() == other.hasProcessingInputs() && Objects.equals(processingInputs(), other.processingInputs()) && Objects.equals(processingOutputConfig(), other.processingOutputConfig()) && Objects.equals(processingJobName(), other.processingJobName()) && Objects.equals(processingResources(), other.processingResources()) && Objects.equals(stoppingCondition(), other.stoppingCondition()) && Objects.equals(appSpecification(), other.appSpecification()) && hasEnvironment() == other.hasEnvironment() && Objects.equals(environment(), other.environment()) && Objects.equals(networkConfig(), other.networkConfig()) && Objects.equals(roleArn(), other.roleArn()) && Objects.equals(experimentConfig(), other.experimentConfig()) && Objects.equals(processingJobArn(), other.processingJobArn()) && Objects.equals(processingJobStatusAsString(), other.processingJobStatusAsString()) && Objects.equals(exitMessage(), other.exitMessage()) && Objects.equals(failureReason(), other.failureReason()) && Objects.equals(processingEndTime(), other.processingEndTime()) && Objects.equals(processingStartTime(), other.processingStartTime()) && Objects.equals(lastModifiedTime(), other.lastModifiedTime()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(monitoringScheduleArn(), other.monitoringScheduleArn()) && Objects.equals(autoMLJobArn(), other.autoMLJobArn()) && Objects.equals(trainingJobArn(), other.trainingJobArn()); } /** * 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("DescribeProcessingJobResponse") .add("ProcessingInputs", hasProcessingInputs() ? processingInputs() : null) .add("ProcessingOutputConfig", processingOutputConfig()).add("ProcessingJobName", processingJobName()) .add("ProcessingResources", processingResources()).add("StoppingCondition", stoppingCondition()) .add("AppSpecification", appSpecification()).add("Environment", hasEnvironment() ? environment() : null) .add("NetworkConfig", networkConfig()).add("RoleArn", roleArn()).add("ExperimentConfig", experimentConfig()) .add("ProcessingJobArn", processingJobArn()).add("ProcessingJobStatus", processingJobStatusAsString()) .add("ExitMessage", exitMessage()).add("FailureReason", failureReason()) .add("ProcessingEndTime", processingEndTime()).add("ProcessingStartTime", processingStartTime()) .add("LastModifiedTime", lastModifiedTime()).add("CreationTime", creationTime()) .add("MonitoringScheduleArn", monitoringScheduleArn()).add("AutoMLJobArn", autoMLJobArn()) .add("TrainingJobArn", trainingJobArn()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ProcessingInputs": return Optional.ofNullable(clazz.cast(processingInputs())); case "ProcessingOutputConfig": return Optional.ofNullable(clazz.cast(processingOutputConfig())); case "ProcessingJobName": return Optional.ofNullable(clazz.cast(processingJobName())); case "ProcessingResources": return Optional.ofNullable(clazz.cast(processingResources())); case "StoppingCondition": return Optional.ofNullable(clazz.cast(stoppingCondition())); case "AppSpecification": return Optional.ofNullable(clazz.cast(appSpecification())); case "Environment": return Optional.ofNullable(clazz.cast(environment())); case "NetworkConfig": return Optional.ofNullable(clazz.cast(networkConfig())); case "RoleArn": return Optional.ofNullable(clazz.cast(roleArn())); case "ExperimentConfig": return Optional.ofNullable(clazz.cast(experimentConfig())); case "ProcessingJobArn": return Optional.ofNullable(clazz.cast(processingJobArn())); case "ProcessingJobStatus": return Optional.ofNullable(clazz.cast(processingJobStatusAsString())); case "ExitMessage": return Optional.ofNullable(clazz.cast(exitMessage())); case "FailureReason": return Optional.ofNullable(clazz.cast(failureReason())); case "ProcessingEndTime": return Optional.ofNullable(clazz.cast(processingEndTime())); case "ProcessingStartTime": return Optional.ofNullable(clazz.cast(processingStartTime())); case "LastModifiedTime": return Optional.ofNullable(clazz.cast(lastModifiedTime())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "MonitoringScheduleArn": return Optional.ofNullable(clazz.cast(monitoringScheduleArn())); case "AutoMLJobArn": return Optional.ofNullable(clazz.cast(autoMLJobArn())); case "TrainingJobArn": return Optional.ofNullable(clazz.cast(trainingJobArn())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DescribeProcessingJobResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SageMakerResponse.Builder, SdkPojo, CopyableBuilder { /** *

* The inputs for a processing job. *

* * @param processingInputs * The inputs for a processing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingInputs(Collection processingInputs); /** *

* The inputs for a processing job. *

* * @param processingInputs * The inputs for a processing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingInputs(ProcessingInput... processingInputs); /** *

* The inputs for a processing job. *

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

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

* Output configuration for the processing job. *

* * @param processingOutputConfig * Output configuration for the processing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingOutputConfig(ProcessingOutputConfig processingOutputConfig); /** *

* Output configuration for the processing job. *

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

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

* The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon * Web Services account. *

* * @param processingJobName * The name of the processing job. The name must be unique within an Amazon Web Services Region in the * Amazon Web Services account. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingJobName(String processingJobName); /** *

* Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In * distributed training, you specify more than one instance. *

* * @param processingResources * Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. * In distributed training, you specify more than one instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingResources(ProcessingResources processingResources); /** *

* Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In * distributed training, you specify more than one instance. *

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

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

* The time limit for how long the processing job is allowed to run. *

* * @param stoppingCondition * The time limit for how long the processing job is allowed to run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stoppingCondition(ProcessingStoppingCondition stoppingCondition); /** *

* The time limit for how long the processing job is allowed to run. *

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

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

* Configures the processing job to run a specified container image. *

* * @param appSpecification * Configures the processing job to run a specified container image. * @return Returns a reference to this object so that method calls can be chained together. */ Builder appSpecification(AppSpecification appSpecification); /** *

* Configures the processing job to run a specified container image. *

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

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

* The environment variables set in the Docker container. *

* * @param environment * The environment variables set in the Docker container. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environment(Map environment); /** *

* Networking options for a processing job. *

* * @param networkConfig * Networking options for a processing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder networkConfig(NetworkConfig networkConfig); /** *

* Networking options for a processing job. *

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

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

* The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your * behalf. *

* * @param roleArn * The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on * your behalf. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleArn(String roleArn); /** *

* The configuration information used to create an experiment. *

* * @param experimentConfig * The configuration information used to create an experiment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder experimentConfig(ExperimentConfig experimentConfig); /** *

* The configuration information used to create an experiment. *

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

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

* The Amazon Resource Name (ARN) of the processing job. *

* * @param processingJobArn * The Amazon Resource Name (ARN) of the processing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingJobArn(String processingJobArn); /** *

* Provides the status of a processing job. *

* * @param processingJobStatus * Provides the status of a processing job. * @see ProcessingJobStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ProcessingJobStatus */ Builder processingJobStatus(String processingJobStatus); /** *

* Provides the status of a processing job. *

* * @param processingJobStatus * Provides the status of a processing job. * @see ProcessingJobStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ProcessingJobStatus */ Builder processingJobStatus(ProcessingJobStatus processingJobStatus); /** *

* An optional string, up to one KB in size, that contains metadata from the processing container when the * processing job exits. *

* * @param exitMessage * An optional string, up to one KB in size, that contains metadata from the processing container when * the processing job exits. * @return Returns a reference to this object so that method calls can be chained together. */ Builder exitMessage(String exitMessage); /** *

* A string, up to one KB in size, that contains the reason a processing job failed, if it failed. *

* * @param failureReason * A string, up to one KB in size, that contains the reason a processing job failed, if it failed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder failureReason(String failureReason); /** *

* The time at which the processing job completed. *

* * @param processingEndTime * The time at which the processing job completed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingEndTime(Instant processingEndTime); /** *

* The time at which the processing job started. *

* * @param processingStartTime * The time at which the processing job started. * @return Returns a reference to this object so that method calls can be chained together. */ Builder processingStartTime(Instant processingStartTime); /** *

* The time at which the processing job was last modified. *

* * @param lastModifiedTime * The time at which the processing job was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedTime(Instant lastModifiedTime); /** *

* The time at which the processing job was created. *

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

* The ARN of a monitoring schedule for an endpoint associated with this processing job. *

* * @param monitoringScheduleArn * The ARN of a monitoring schedule for an endpoint associated with this processing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder monitoringScheduleArn(String monitoringScheduleArn); /** *

* The ARN of an AutoML job associated with this processing job. *

* * @param autoMLJobArn * The ARN of an AutoML job associated with this processing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoMLJobArn(String autoMLJobArn); /** *

* The ARN of a training job associated with this processing job. *

* * @param trainingJobArn * The ARN of a training job associated with this processing job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder trainingJobArn(String trainingJobArn); } static final class BuilderImpl extends SageMakerResponse.BuilderImpl implements Builder { private List processingInputs = DefaultSdkAutoConstructList.getInstance(); private ProcessingOutputConfig processingOutputConfig; private String processingJobName; private ProcessingResources processingResources; private ProcessingStoppingCondition stoppingCondition; private AppSpecification appSpecification; private Map environment = DefaultSdkAutoConstructMap.getInstance(); private NetworkConfig networkConfig; private String roleArn; private ExperimentConfig experimentConfig; private String processingJobArn; private String processingJobStatus; private String exitMessage; private String failureReason; private Instant processingEndTime; private Instant processingStartTime; private Instant lastModifiedTime; private Instant creationTime; private String monitoringScheduleArn; private String autoMLJobArn; private String trainingJobArn; private BuilderImpl() { } private BuilderImpl(DescribeProcessingJobResponse model) { super(model); processingInputs(model.processingInputs); processingOutputConfig(model.processingOutputConfig); processingJobName(model.processingJobName); processingResources(model.processingResources); stoppingCondition(model.stoppingCondition); appSpecification(model.appSpecification); environment(model.environment); networkConfig(model.networkConfig); roleArn(model.roleArn); experimentConfig(model.experimentConfig); processingJobArn(model.processingJobArn); processingJobStatus(model.processingJobStatus); exitMessage(model.exitMessage); failureReason(model.failureReason); processingEndTime(model.processingEndTime); processingStartTime(model.processingStartTime); lastModifiedTime(model.lastModifiedTime); creationTime(model.creationTime); monitoringScheduleArn(model.monitoringScheduleArn); autoMLJobArn(model.autoMLJobArn); trainingJobArn(model.trainingJobArn); } public final List getProcessingInputs() { List result = ProcessingInputsCopier.copyToBuilder(this.processingInputs); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setProcessingInputs(Collection processingInputs) { this.processingInputs = ProcessingInputsCopier.copyFromBuilder(processingInputs); } @Override public final Builder processingInputs(Collection processingInputs) { this.processingInputs = ProcessingInputsCopier.copy(processingInputs); return this; } @Override @SafeVarargs public final Builder processingInputs(ProcessingInput... processingInputs) { processingInputs(Arrays.asList(processingInputs)); return this; } @Override @SafeVarargs public final Builder processingInputs(Consumer... processingInputs) { processingInputs(Stream.of(processingInputs).map(c -> ProcessingInput.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final ProcessingOutputConfig.Builder getProcessingOutputConfig() { return processingOutputConfig != null ? processingOutputConfig.toBuilder() : null; } public final void setProcessingOutputConfig(ProcessingOutputConfig.BuilderImpl processingOutputConfig) { this.processingOutputConfig = processingOutputConfig != null ? processingOutputConfig.build() : null; } @Override public final Builder processingOutputConfig(ProcessingOutputConfig processingOutputConfig) { this.processingOutputConfig = processingOutputConfig; return this; } public final String getProcessingJobName() { return processingJobName; } public final void setProcessingJobName(String processingJobName) { this.processingJobName = processingJobName; } @Override public final Builder processingJobName(String processingJobName) { this.processingJobName = processingJobName; return this; } public final ProcessingResources.Builder getProcessingResources() { return processingResources != null ? processingResources.toBuilder() : null; } public final void setProcessingResources(ProcessingResources.BuilderImpl processingResources) { this.processingResources = processingResources != null ? processingResources.build() : null; } @Override public final Builder processingResources(ProcessingResources processingResources) { this.processingResources = processingResources; return this; } public final ProcessingStoppingCondition.Builder getStoppingCondition() { return stoppingCondition != null ? stoppingCondition.toBuilder() : null; } public final void setStoppingCondition(ProcessingStoppingCondition.BuilderImpl stoppingCondition) { this.stoppingCondition = stoppingCondition != null ? stoppingCondition.build() : null; } @Override public final Builder stoppingCondition(ProcessingStoppingCondition stoppingCondition) { this.stoppingCondition = stoppingCondition; return this; } public final AppSpecification.Builder getAppSpecification() { return appSpecification != null ? appSpecification.toBuilder() : null; } public final void setAppSpecification(AppSpecification.BuilderImpl appSpecification) { this.appSpecification = appSpecification != null ? appSpecification.build() : null; } @Override public final Builder appSpecification(AppSpecification appSpecification) { this.appSpecification = appSpecification; return this; } public final Map getEnvironment() { if (environment instanceof SdkAutoConstructMap) { return null; } return environment; } public final void setEnvironment(Map environment) { this.environment = ProcessingEnvironmentMapCopier.copy(environment); } @Override public final Builder environment(Map environment) { this.environment = ProcessingEnvironmentMapCopier.copy(environment); return this; } public final NetworkConfig.Builder getNetworkConfig() { return networkConfig != null ? networkConfig.toBuilder() : null; } public final void setNetworkConfig(NetworkConfig.BuilderImpl networkConfig) { this.networkConfig = networkConfig != null ? networkConfig.build() : null; } @Override public final Builder networkConfig(NetworkConfig networkConfig) { this.networkConfig = networkConfig; return this; } public final String getRoleArn() { return roleArn; } public final void setRoleArn(String roleArn) { this.roleArn = roleArn; } @Override public final Builder roleArn(String roleArn) { this.roleArn = roleArn; return this; } public final ExperimentConfig.Builder getExperimentConfig() { return experimentConfig != null ? experimentConfig.toBuilder() : null; } public final void setExperimentConfig(ExperimentConfig.BuilderImpl experimentConfig) { this.experimentConfig = experimentConfig != null ? experimentConfig.build() : null; } @Override public final Builder experimentConfig(ExperimentConfig experimentConfig) { this.experimentConfig = experimentConfig; return this; } public final String getProcessingJobArn() { return processingJobArn; } public final void setProcessingJobArn(String processingJobArn) { this.processingJobArn = processingJobArn; } @Override public final Builder processingJobArn(String processingJobArn) { this.processingJobArn = processingJobArn; return this; } public final String getProcessingJobStatus() { return processingJobStatus; } public final void setProcessingJobStatus(String processingJobStatus) { this.processingJobStatus = processingJobStatus; } @Override public final Builder processingJobStatus(String processingJobStatus) { this.processingJobStatus = processingJobStatus; return this; } @Override public final Builder processingJobStatus(ProcessingJobStatus processingJobStatus) { this.processingJobStatus(processingJobStatus == null ? null : processingJobStatus.toString()); return this; } public final String getExitMessage() { return exitMessage; } public final void setExitMessage(String exitMessage) { this.exitMessage = exitMessage; } @Override public final Builder exitMessage(String exitMessage) { this.exitMessage = exitMessage; return this; } public final String getFailureReason() { return failureReason; } public final void setFailureReason(String failureReason) { this.failureReason = failureReason; } @Override public final Builder failureReason(String failureReason) { this.failureReason = failureReason; return this; } public final Instant getProcessingEndTime() { return processingEndTime; } public final void setProcessingEndTime(Instant processingEndTime) { this.processingEndTime = processingEndTime; } @Override public final Builder processingEndTime(Instant processingEndTime) { this.processingEndTime = processingEndTime; return this; } public final Instant getProcessingStartTime() { return processingStartTime; } public final void setProcessingStartTime(Instant processingStartTime) { this.processingStartTime = processingStartTime; } @Override public final Builder processingStartTime(Instant processingStartTime) { this.processingStartTime = processingStartTime; return this; } public final Instant getLastModifiedTime() { return lastModifiedTime; } public final void setLastModifiedTime(Instant lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } @Override public final Builder lastModifiedTime(Instant lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; 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 String getMonitoringScheduleArn() { return monitoringScheduleArn; } public final void setMonitoringScheduleArn(String monitoringScheduleArn) { this.monitoringScheduleArn = monitoringScheduleArn; } @Override public final Builder monitoringScheduleArn(String monitoringScheduleArn) { this.monitoringScheduleArn = monitoringScheduleArn; return this; } public final String getAutoMLJobArn() { return autoMLJobArn; } public final void setAutoMLJobArn(String autoMLJobArn) { this.autoMLJobArn = autoMLJobArn; } @Override public final Builder autoMLJobArn(String autoMLJobArn) { this.autoMLJobArn = autoMLJobArn; return this; } public final String getTrainingJobArn() { return trainingJobArn; } public final void setTrainingJobArn(String trainingJobArn) { this.trainingJobArn = trainingJobArn; } @Override public final Builder trainingJobArn(String trainingJobArn) { this.trainingJobArn = trainingJobArn; return this; } @Override public DescribeProcessingJobResponse build() { return new DescribeProcessingJobResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy