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

software.amazon.awssdk.services.emrserverless.model.JobRun Maven / Gradle / Ivy

Go to download

The AWS Java SDK for EMR Serverless module holds the client classes that are used for communicating with EMR Serverless.

There is a newer version: 2.29.15
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.emrserverless.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
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 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.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
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;

/**
 * 

* Information about a job run. A job run is a unit of work, such as a Spark JAR, Hive query, or SparkSQL query, that * you submit to an Amazon EMR Serverless application. *

*/ @Generated("software.amazon.awssdk:codegen") public final class JobRun implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField APPLICATION_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("applicationId").getter(getter(JobRun::applicationId)).setter(setter(Builder::applicationId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("applicationId").build()).build(); private static final SdkField JOB_RUN_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("jobRunId").getter(getter(JobRun::jobRunId)).setter(setter(Builder::jobRunId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("jobRunId").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name") .getter(getter(JobRun::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build(); private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn") .getter(getter(JobRun::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build(); private static final SdkField CREATED_BY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("createdBy").getter(getter(JobRun::createdBy)).setter(setter(Builder::createdBy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdBy").build()).build(); private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("createdAt").getter(getter(JobRun::createdAt)).setter(setter(Builder::createdAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdAt").build()).build(); private static final SdkField UPDATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("updatedAt").getter(getter(JobRun::updatedAt)).setter(setter(Builder::updatedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updatedAt").build()).build(); private static final SdkField EXECUTION_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("executionRole").getter(getter(JobRun::executionRole)).setter(setter(Builder::executionRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("executionRole").build()).build(); private static final SdkField STATE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("state") .getter(getter(JobRun::stateAsString)).setter(setter(Builder::state)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("state").build()).build(); private static final SdkField STATE_DETAILS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("stateDetails").getter(getter(JobRun::stateDetails)).setter(setter(Builder::stateDetails)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("stateDetails").build()).build(); private static final SdkField RELEASE_LABEL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("releaseLabel").getter(getter(JobRun::releaseLabel)).setter(setter(Builder::releaseLabel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("releaseLabel").build()).build(); private static final SdkField CONFIGURATION_OVERRIDES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("configurationOverrides") .getter(getter(JobRun::configurationOverrides)).setter(setter(Builder::configurationOverrides)) .constructor(ConfigurationOverrides::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("configurationOverrides").build()) .build(); private static final SdkField JOB_DRIVER_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("jobDriver").getter(getter(JobRun::jobDriver)).setter(setter(Builder::jobDriver)) .constructor(JobDriver::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("jobDriver").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("tags") .getter(getter(JobRun::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").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 TOTAL_RESOURCE_UTILIZATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("totalResourceUtilization") .getter(getter(JobRun::totalResourceUtilization)).setter(setter(Builder::totalResourceUtilization)) .constructor(TotalResourceUtilization::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("totalResourceUtilization").build()) .build(); private static final SdkField NETWORK_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("networkConfiguration") .getter(getter(JobRun::networkConfiguration)).setter(setter(Builder::networkConfiguration)) .constructor(NetworkConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("networkConfiguration").build()) .build(); private static final SdkField TOTAL_EXECUTION_DURATION_SECONDS_FIELD = SdkField . builder(MarshallingType.INTEGER) .memberName("totalExecutionDurationSeconds") .getter(getter(JobRun::totalExecutionDurationSeconds)) .setter(setter(Builder::totalExecutionDurationSeconds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("totalExecutionDurationSeconds") .build()).build(); private static final SdkField EXECUTION_TIMEOUT_MINUTES_FIELD = SdkField. builder(MarshallingType.LONG) .memberName("executionTimeoutMinutes").getter(getter(JobRun::executionTimeoutMinutes)) .setter(setter(Builder::executionTimeoutMinutes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("executionTimeoutMinutes").build()) .build(); private static final SdkField BILLED_RESOURCE_UTILIZATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("billedResourceUtilization") .getter(getter(JobRun::billedResourceUtilization)).setter(setter(Builder::billedResourceUtilization)) .constructor(ResourceUtilization::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("billedResourceUtilization").build()) .build(); private static final SdkField MODE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("mode") .getter(getter(JobRun::modeAsString)).setter(setter(Builder::mode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("mode").build()).build(); private static final SdkField RETRY_POLICY_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("retryPolicy").getter(getter(JobRun::retryPolicy)).setter(setter(Builder::retryPolicy)) .constructor(RetryPolicy::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("retryPolicy").build()).build(); private static final SdkField ATTEMPT_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("attempt").getter(getter(JobRun::attempt)).setter(setter(Builder::attempt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("attempt").build()).build(); private static final SdkField ATTEMPT_CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("attemptCreatedAt").getter(getter(JobRun::attemptCreatedAt)).setter(setter(Builder::attemptCreatedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("attemptCreatedAt").build()).build(); private static final SdkField ATTEMPT_UPDATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("attemptUpdatedAt").getter(getter(JobRun::attemptUpdatedAt)).setter(setter(Builder::attemptUpdatedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("attemptUpdatedAt").build()).build(); private static final SdkField STARTED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("startedAt").getter(getter(JobRun::startedAt)).setter(setter(Builder::startedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("startedAt").build()).build(); private static final SdkField ENDED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("endedAt").getter(getter(JobRun::endedAt)).setter(setter(Builder::endedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("endedAt").build()).build(); private static final SdkField QUEUED_DURATION_MILLISECONDS_FIELD = SdkField . builder(MarshallingType.LONG) .memberName("queuedDurationMilliseconds") .getter(getter(JobRun::queuedDurationMilliseconds)) .setter(setter(Builder::queuedDurationMilliseconds)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("queuedDurationMilliseconds").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(APPLICATION_ID_FIELD, JOB_RUN_ID_FIELD, NAME_FIELD, ARN_FIELD, CREATED_BY_FIELD, CREATED_AT_FIELD, UPDATED_AT_FIELD, EXECUTION_ROLE_FIELD, STATE_FIELD, STATE_DETAILS_FIELD, RELEASE_LABEL_FIELD, CONFIGURATION_OVERRIDES_FIELD, JOB_DRIVER_FIELD, TAGS_FIELD, TOTAL_RESOURCE_UTILIZATION_FIELD, NETWORK_CONFIGURATION_FIELD, TOTAL_EXECUTION_DURATION_SECONDS_FIELD, EXECUTION_TIMEOUT_MINUTES_FIELD, BILLED_RESOURCE_UTILIZATION_FIELD, MODE_FIELD, RETRY_POLICY_FIELD, ATTEMPT_FIELD, ATTEMPT_CREATED_AT_FIELD, ATTEMPT_UPDATED_AT_FIELD, STARTED_AT_FIELD, ENDED_AT_FIELD, QUEUED_DURATION_MILLISECONDS_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("applicationId", APPLICATION_ID_FIELD); put("jobRunId", JOB_RUN_ID_FIELD); put("name", NAME_FIELD); put("arn", ARN_FIELD); put("createdBy", CREATED_BY_FIELD); put("createdAt", CREATED_AT_FIELD); put("updatedAt", UPDATED_AT_FIELD); put("executionRole", EXECUTION_ROLE_FIELD); put("state", STATE_FIELD); put("stateDetails", STATE_DETAILS_FIELD); put("releaseLabel", RELEASE_LABEL_FIELD); put("configurationOverrides", CONFIGURATION_OVERRIDES_FIELD); put("jobDriver", JOB_DRIVER_FIELD); put("tags", TAGS_FIELD); put("totalResourceUtilization", TOTAL_RESOURCE_UTILIZATION_FIELD); put("networkConfiguration", NETWORK_CONFIGURATION_FIELD); put("totalExecutionDurationSeconds", TOTAL_EXECUTION_DURATION_SECONDS_FIELD); put("executionTimeoutMinutes", EXECUTION_TIMEOUT_MINUTES_FIELD); put("billedResourceUtilization", BILLED_RESOURCE_UTILIZATION_FIELD); put("mode", MODE_FIELD); put("retryPolicy", RETRY_POLICY_FIELD); put("attempt", ATTEMPT_FIELD); put("attemptCreatedAt", ATTEMPT_CREATED_AT_FIELD); put("attemptUpdatedAt", ATTEMPT_UPDATED_AT_FIELD); put("startedAt", STARTED_AT_FIELD); put("endedAt", ENDED_AT_FIELD); put("queuedDurationMilliseconds", QUEUED_DURATION_MILLISECONDS_FIELD); } }); private static final long serialVersionUID = 1L; private final String applicationId; private final String jobRunId; private final String name; private final String arn; private final String createdBy; private final Instant createdAt; private final Instant updatedAt; private final String executionRole; private final String state; private final String stateDetails; private final String releaseLabel; private final ConfigurationOverrides configurationOverrides; private final JobDriver jobDriver; private final Map tags; private final TotalResourceUtilization totalResourceUtilization; private final NetworkConfiguration networkConfiguration; private final Integer totalExecutionDurationSeconds; private final Long executionTimeoutMinutes; private final ResourceUtilization billedResourceUtilization; private final String mode; private final RetryPolicy retryPolicy; private final Integer attempt; private final Instant attemptCreatedAt; private final Instant attemptUpdatedAt; private final Instant startedAt; private final Instant endedAt; private final Long queuedDurationMilliseconds; private JobRun(BuilderImpl builder) { this.applicationId = builder.applicationId; this.jobRunId = builder.jobRunId; this.name = builder.name; this.arn = builder.arn; this.createdBy = builder.createdBy; this.createdAt = builder.createdAt; this.updatedAt = builder.updatedAt; this.executionRole = builder.executionRole; this.state = builder.state; this.stateDetails = builder.stateDetails; this.releaseLabel = builder.releaseLabel; this.configurationOverrides = builder.configurationOverrides; this.jobDriver = builder.jobDriver; this.tags = builder.tags; this.totalResourceUtilization = builder.totalResourceUtilization; this.networkConfiguration = builder.networkConfiguration; this.totalExecutionDurationSeconds = builder.totalExecutionDurationSeconds; this.executionTimeoutMinutes = builder.executionTimeoutMinutes; this.billedResourceUtilization = builder.billedResourceUtilization; this.mode = builder.mode; this.retryPolicy = builder.retryPolicy; this.attempt = builder.attempt; this.attemptCreatedAt = builder.attemptCreatedAt; this.attemptUpdatedAt = builder.attemptUpdatedAt; this.startedAt = builder.startedAt; this.endedAt = builder.endedAt; this.queuedDurationMilliseconds = builder.queuedDurationMilliseconds; } /** *

* The ID of the application the job is running on. *

* * @return The ID of the application the job is running on. */ public final String applicationId() { return applicationId; } /** *

* The ID of the job run. *

* * @return The ID of the job run. */ public final String jobRunId() { return jobRunId; } /** *

* The optional job run name. This doesn't have to be unique. *

* * @return The optional job run name. This doesn't have to be unique. */ public final String name() { return name; } /** *

* The execution role ARN of the job run. *

* * @return The execution role ARN of the job run. */ public final String arn() { return arn; } /** *

* The user who created the job run. *

* * @return The user who created the job run. */ public final String createdBy() { return createdBy; } /** *

* The date and time when the job run was created. *

* * @return The date and time when the job run was created. */ public final Instant createdAt() { return createdAt; } /** *

* The date and time when the job run was updated. *

* * @return The date and time when the job run was updated. */ public final Instant updatedAt() { return updatedAt; } /** *

* The execution role ARN of the job run. *

* * @return The execution role ARN of the job run. */ public final String executionRole() { return executionRole; } /** *

* The state of the job run. *

*

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

* * @return The state of the job run. * @see JobRunState */ public final JobRunState state() { return JobRunState.fromValue(state); } /** *

* The state of the job run. *

*

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

* * @return The state of the job run. * @see JobRunState */ public final String stateAsString() { return state; } /** *

* The state details of the job run. *

* * @return The state details of the job run. */ public final String stateDetails() { return stateDetails; } /** *

* The Amazon EMR release associated with the application your job is running on. *

* * @return The Amazon EMR release associated with the application your job is running on. */ public final String releaseLabel() { return releaseLabel; } /** *

* The configuration settings that are used to override default configuration. *

* * @return The configuration settings that are used to override default configuration. */ public final ConfigurationOverrides configurationOverrides() { return configurationOverrides; } /** *

* The job driver for the job run. *

* * @return The job driver for the job run. */ public final JobDriver jobDriver() { return jobDriver; } /** * For responses, this returns true if the service returned a value for the Tags 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 hasTags() { return tags != null && !(tags instanceof SdkAutoConstructMap); } /** *

* The tags assigned to the job run. *

*

* 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 #hasTags} method. *

* * @return The tags assigned to the job run. */ public final Map tags() { return tags; } /** *

* The aggregate vCPU, memory, and storage resources used from the time the job starts to execute, until the time * the job terminates, rounded up to the nearest second. *

* * @return The aggregate vCPU, memory, and storage resources used from the time the job starts to execute, until the * time the job terminates, rounded up to the nearest second. */ public final TotalResourceUtilization totalResourceUtilization() { return totalResourceUtilization; } /** * Returns the value of the NetworkConfiguration property for this object. * * @return The value of the NetworkConfiguration property for this object. */ public final NetworkConfiguration networkConfiguration() { return networkConfiguration; } /** *

* The job run total execution duration in seconds. This field is only available for job runs in a * COMPLETED, FAILED, or CANCELLED state. *

* * @return The job run total execution duration in seconds. This field is only available for job runs in a * COMPLETED, FAILED, or CANCELLED state. */ public final Integer totalExecutionDurationSeconds() { return totalExecutionDurationSeconds; } /** *

* Returns the job run timeout value from the StartJobRun call. If no timeout was specified, then it * returns the default timeout of 720 minutes. *

* * @return Returns the job run timeout value from the StartJobRun call. If no timeout was specified, * then it returns the default timeout of 720 minutes. */ public final Long executionTimeoutMinutes() { return executionTimeoutMinutes; } /** *

* The aggregate vCPU, memory, and storage that Amazon Web Services has billed for the job run. The billed resources * include a 1-minute minimum usage for workers, plus additional storage over 20 GB per worker. Note that billed * resources do not include usage for idle pre-initialized workers. *

* * @return The aggregate vCPU, memory, and storage that Amazon Web Services has billed for the job run. The billed * resources include a 1-minute minimum usage for workers, plus additional storage over 20 GB per worker. * Note that billed resources do not include usage for idle pre-initialized workers. */ public final ResourceUtilization billedResourceUtilization() { return billedResourceUtilization; } /** *

* The mode of the job run. *

*

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

* * @return The mode of the job run. * @see JobRunMode */ public final JobRunMode mode() { return JobRunMode.fromValue(mode); } /** *

* The mode of the job run. *

*

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

* * @return The mode of the job run. * @see JobRunMode */ public final String modeAsString() { return mode; } /** *

* The retry policy of the job run. *

* * @return The retry policy of the job run. */ public final RetryPolicy retryPolicy() { return retryPolicy; } /** *

* The attempt of the job run. *

* * @return The attempt of the job run. */ public final Integer attempt() { return attempt; } /** *

* The date and time of when the job run attempt was created. *

* * @return The date and time of when the job run attempt was created. */ public final Instant attemptCreatedAt() { return attemptCreatedAt; } /** *

* The date and time of when the job run attempt was last updated. *

* * @return The date and time of when the job run attempt was last updated. */ public final Instant attemptUpdatedAt() { return attemptUpdatedAt; } /** *

* The date and time when the job moved to the RUNNING state. *

* * @return The date and time when the job moved to the RUNNING state. */ public final Instant startedAt() { return startedAt; } /** *

* The date and time when the job was terminated. *

* * @return The date and time when the job was terminated. */ public final Instant endedAt() { return endedAt; } /** *

* The total time for a job in the QUEUED state in milliseconds. *

* * @return The total time for a job in the QUEUED state in milliseconds. */ public final Long queuedDurationMilliseconds() { return queuedDurationMilliseconds; } @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(applicationId()); hashCode = 31 * hashCode + Objects.hashCode(jobRunId()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(createdBy()); hashCode = 31 * hashCode + Objects.hashCode(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(updatedAt()); hashCode = 31 * hashCode + Objects.hashCode(executionRole()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(stateDetails()); hashCode = 31 * hashCode + Objects.hashCode(releaseLabel()); hashCode = 31 * hashCode + Objects.hashCode(configurationOverrides()); hashCode = 31 * hashCode + Objects.hashCode(jobDriver()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(totalResourceUtilization()); hashCode = 31 * hashCode + Objects.hashCode(networkConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(totalExecutionDurationSeconds()); hashCode = 31 * hashCode + Objects.hashCode(executionTimeoutMinutes()); hashCode = 31 * hashCode + Objects.hashCode(billedResourceUtilization()); hashCode = 31 * hashCode + Objects.hashCode(modeAsString()); hashCode = 31 * hashCode + Objects.hashCode(retryPolicy()); hashCode = 31 * hashCode + Objects.hashCode(attempt()); hashCode = 31 * hashCode + Objects.hashCode(attemptCreatedAt()); hashCode = 31 * hashCode + Objects.hashCode(attemptUpdatedAt()); hashCode = 31 * hashCode + Objects.hashCode(startedAt()); hashCode = 31 * hashCode + Objects.hashCode(endedAt()); hashCode = 31 * hashCode + Objects.hashCode(queuedDurationMilliseconds()); 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 JobRun)) { return false; } JobRun other = (JobRun) obj; return Objects.equals(applicationId(), other.applicationId()) && Objects.equals(jobRunId(), other.jobRunId()) && Objects.equals(name(), other.name()) && Objects.equals(arn(), other.arn()) && Objects.equals(createdBy(), other.createdBy()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(updatedAt(), other.updatedAt()) && Objects.equals(executionRole(), other.executionRole()) && Objects.equals(stateAsString(), other.stateAsString()) && Objects.equals(stateDetails(), other.stateDetails()) && Objects.equals(releaseLabel(), other.releaseLabel()) && Objects.equals(configurationOverrides(), other.configurationOverrides()) && Objects.equals(jobDriver(), other.jobDriver()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(totalResourceUtilization(), other.totalResourceUtilization()) && Objects.equals(networkConfiguration(), other.networkConfiguration()) && Objects.equals(totalExecutionDurationSeconds(), other.totalExecutionDurationSeconds()) && Objects.equals(executionTimeoutMinutes(), other.executionTimeoutMinutes()) && Objects.equals(billedResourceUtilization(), other.billedResourceUtilization()) && Objects.equals(modeAsString(), other.modeAsString()) && Objects.equals(retryPolicy(), other.retryPolicy()) && Objects.equals(attempt(), other.attempt()) && Objects.equals(attemptCreatedAt(), other.attemptCreatedAt()) && Objects.equals(attemptUpdatedAt(), other.attemptUpdatedAt()) && Objects.equals(startedAt(), other.startedAt()) && Objects.equals(endedAt(), other.endedAt()) && Objects.equals(queuedDurationMilliseconds(), other.queuedDurationMilliseconds()); } /** * 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("JobRun").add("ApplicationId", applicationId()).add("JobRunId", jobRunId()).add("Name", name()) .add("Arn", arn()).add("CreatedBy", createdBy()).add("CreatedAt", createdAt()).add("UpdatedAt", updatedAt()) .add("ExecutionRole", executionRole()).add("State", stateAsString()).add("StateDetails", stateDetails()) .add("ReleaseLabel", releaseLabel()).add("ConfigurationOverrides", configurationOverrides()) .add("JobDriver", jobDriver()).add("Tags", hasTags() ? tags() : null) .add("TotalResourceUtilization", totalResourceUtilization()).add("NetworkConfiguration", networkConfiguration()) .add("TotalExecutionDurationSeconds", totalExecutionDurationSeconds()) .add("ExecutionTimeoutMinutes", executionTimeoutMinutes()) .add("BilledResourceUtilization", billedResourceUtilization()).add("Mode", modeAsString()) .add("RetryPolicy", retryPolicy()).add("Attempt", attempt()).add("AttemptCreatedAt", attemptCreatedAt()) .add("AttemptUpdatedAt", attemptUpdatedAt()).add("StartedAt", startedAt()).add("EndedAt", endedAt()) .add("QueuedDurationMilliseconds", queuedDurationMilliseconds()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "applicationId": return Optional.ofNullable(clazz.cast(applicationId())); case "jobRunId": return Optional.ofNullable(clazz.cast(jobRunId())); case "name": return Optional.ofNullable(clazz.cast(name())); case "arn": return Optional.ofNullable(clazz.cast(arn())); case "createdBy": return Optional.ofNullable(clazz.cast(createdBy())); case "createdAt": return Optional.ofNullable(clazz.cast(createdAt())); case "updatedAt": return Optional.ofNullable(clazz.cast(updatedAt())); case "executionRole": return Optional.ofNullable(clazz.cast(executionRole())); case "state": return Optional.ofNullable(clazz.cast(stateAsString())); case "stateDetails": return Optional.ofNullable(clazz.cast(stateDetails())); case "releaseLabel": return Optional.ofNullable(clazz.cast(releaseLabel())); case "configurationOverrides": return Optional.ofNullable(clazz.cast(configurationOverrides())); case "jobDriver": return Optional.ofNullable(clazz.cast(jobDriver())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "totalResourceUtilization": return Optional.ofNullable(clazz.cast(totalResourceUtilization())); case "networkConfiguration": return Optional.ofNullable(clazz.cast(networkConfiguration())); case "totalExecutionDurationSeconds": return Optional.ofNullable(clazz.cast(totalExecutionDurationSeconds())); case "executionTimeoutMinutes": return Optional.ofNullable(clazz.cast(executionTimeoutMinutes())); case "billedResourceUtilization": return Optional.ofNullable(clazz.cast(billedResourceUtilization())); case "mode": return Optional.ofNullable(clazz.cast(modeAsString())); case "retryPolicy": return Optional.ofNullable(clazz.cast(retryPolicy())); case "attempt": return Optional.ofNullable(clazz.cast(attempt())); case "attemptCreatedAt": return Optional.ofNullable(clazz.cast(attemptCreatedAt())); case "attemptUpdatedAt": return Optional.ofNullable(clazz.cast(attemptUpdatedAt())); case "startedAt": return Optional.ofNullable(clazz.cast(startedAt())); case "endedAt": return Optional.ofNullable(clazz.cast(endedAt())); case "queuedDurationMilliseconds": return Optional.ofNullable(clazz.cast(queuedDurationMilliseconds())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((JobRun) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The ID of the application the job is running on. *

* * @param applicationId * The ID of the application the job is running on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applicationId(String applicationId); /** *

* The ID of the job run. *

* * @param jobRunId * The ID of the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jobRunId(String jobRunId); /** *

* The optional job run name. This doesn't have to be unique. *

* * @param name * The optional job run name. This doesn't have to be unique. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

* The execution role ARN of the job run. *

* * @param arn * The execution role ARN of the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** *

* The user who created the job run. *

* * @param createdBy * The user who created the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdBy(String createdBy); /** *

* The date and time when the job run was created. *

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

* The date and time when the job run was updated. *

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

* The execution role ARN of the job run. *

* * @param executionRole * The execution role ARN of the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder executionRole(String executionRole); /** *

* The state of the job run. *

* * @param state * The state of the job run. * @see JobRunState * @return Returns a reference to this object so that method calls can be chained together. * @see JobRunState */ Builder state(String state); /** *

* The state of the job run. *

* * @param state * The state of the job run. * @see JobRunState * @return Returns a reference to this object so that method calls can be chained together. * @see JobRunState */ Builder state(JobRunState state); /** *

* The state details of the job run. *

* * @param stateDetails * The state details of the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stateDetails(String stateDetails); /** *

* The Amazon EMR release associated with the application your job is running on. *

* * @param releaseLabel * The Amazon EMR release associated with the application your job is running on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder releaseLabel(String releaseLabel); /** *

* The configuration settings that are used to override default configuration. *

* * @param configurationOverrides * The configuration settings that are used to override default configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configurationOverrides(ConfigurationOverrides configurationOverrides); /** *

* The configuration settings that are used to override default configuration. *

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

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

* The job driver for the job run. *

* * @param jobDriver * The job driver for the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jobDriver(JobDriver jobDriver); /** *

* The job driver for the job run. *

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

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

* The tags assigned to the job run. *

* * @param tags * The tags assigned to the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); /** *

* The aggregate vCPU, memory, and storage resources used from the time the job starts to execute, until the * time the job terminates, rounded up to the nearest second. *

* * @param totalResourceUtilization * The aggregate vCPU, memory, and storage resources used from the time the job starts to execute, until * the time the job terminates, rounded up to the nearest second. * @return Returns a reference to this object so that method calls can be chained together. */ Builder totalResourceUtilization(TotalResourceUtilization totalResourceUtilization); /** *

* The aggregate vCPU, memory, and storage resources used from the time the job starts to execute, until the * time the job terminates, rounded up to the nearest second. *

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

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

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

* The job run total execution duration in seconds. This field is only available for job runs in a * COMPLETED, FAILED, or CANCELLED state. *

* * @param totalExecutionDurationSeconds * The job run total execution duration in seconds. This field is only available for job runs in a * COMPLETED, FAILED, or CANCELLED state. * @return Returns a reference to this object so that method calls can be chained together. */ Builder totalExecutionDurationSeconds(Integer totalExecutionDurationSeconds); /** *

* Returns the job run timeout value from the StartJobRun call. If no timeout was specified, then * it returns the default timeout of 720 minutes. *

* * @param executionTimeoutMinutes * Returns the job run timeout value from the StartJobRun call. If no timeout was specified, * then it returns the default timeout of 720 minutes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder executionTimeoutMinutes(Long executionTimeoutMinutes); /** *

* The aggregate vCPU, memory, and storage that Amazon Web Services has billed for the job run. The billed * resources include a 1-minute minimum usage for workers, plus additional storage over 20 GB per worker. Note * that billed resources do not include usage for idle pre-initialized workers. *

* * @param billedResourceUtilization * The aggregate vCPU, memory, and storage that Amazon Web Services has billed for the job run. The * billed resources include a 1-minute minimum usage for workers, plus additional storage over 20 GB per * worker. Note that billed resources do not include usage for idle pre-initialized workers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder billedResourceUtilization(ResourceUtilization billedResourceUtilization); /** *

* The aggregate vCPU, memory, and storage that Amazon Web Services has billed for the job run. The billed * resources include a 1-minute minimum usage for workers, plus additional storage over 20 GB per worker. Note * that billed resources do not include usage for idle pre-initialized workers. *

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

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

* The mode of the job run. *

* * @param mode * The mode of the job run. * @see JobRunMode * @return Returns a reference to this object so that method calls can be chained together. * @see JobRunMode */ Builder mode(String mode); /** *

* The mode of the job run. *

* * @param mode * The mode of the job run. * @see JobRunMode * @return Returns a reference to this object so that method calls can be chained together. * @see JobRunMode */ Builder mode(JobRunMode mode); /** *

* The retry policy of the job run. *

* * @param retryPolicy * The retry policy of the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder retryPolicy(RetryPolicy retryPolicy); /** *

* The retry policy of the job run. *

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

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

* The attempt of the job run. *

* * @param attempt * The attempt of the job run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder attempt(Integer attempt); /** *

* The date and time of when the job run attempt was created. *

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

* The date and time of when the job run attempt was last updated. *

* * @param attemptUpdatedAt * The date and time of when the job run attempt was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder attemptUpdatedAt(Instant attemptUpdatedAt); /** *

* The date and time when the job moved to the RUNNING state. *

* * @param startedAt * The date and time when the job moved to the RUNNING state. * @return Returns a reference to this object so that method calls can be chained together. */ Builder startedAt(Instant startedAt); /** *

* The date and time when the job was terminated. *

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

* The total time for a job in the QUEUED state in milliseconds. *

* * @param queuedDurationMilliseconds * The total time for a job in the QUEUED state in milliseconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder queuedDurationMilliseconds(Long queuedDurationMilliseconds); } static final class BuilderImpl implements Builder { private String applicationId; private String jobRunId; private String name; private String arn; private String createdBy; private Instant createdAt; private Instant updatedAt; private String executionRole; private String state; private String stateDetails; private String releaseLabel; private ConfigurationOverrides configurationOverrides; private JobDriver jobDriver; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private TotalResourceUtilization totalResourceUtilization; private NetworkConfiguration networkConfiguration; private Integer totalExecutionDurationSeconds; private Long executionTimeoutMinutes; private ResourceUtilization billedResourceUtilization; private String mode; private RetryPolicy retryPolicy; private Integer attempt; private Instant attemptCreatedAt; private Instant attemptUpdatedAt; private Instant startedAt; private Instant endedAt; private Long queuedDurationMilliseconds; private BuilderImpl() { } private BuilderImpl(JobRun model) { applicationId(model.applicationId); jobRunId(model.jobRunId); name(model.name); arn(model.arn); createdBy(model.createdBy); createdAt(model.createdAt); updatedAt(model.updatedAt); executionRole(model.executionRole); state(model.state); stateDetails(model.stateDetails); releaseLabel(model.releaseLabel); configurationOverrides(model.configurationOverrides); jobDriver(model.jobDriver); tags(model.tags); totalResourceUtilization(model.totalResourceUtilization); networkConfiguration(model.networkConfiguration); totalExecutionDurationSeconds(model.totalExecutionDurationSeconds); executionTimeoutMinutes(model.executionTimeoutMinutes); billedResourceUtilization(model.billedResourceUtilization); mode(model.mode); retryPolicy(model.retryPolicy); attempt(model.attempt); attemptCreatedAt(model.attemptCreatedAt); attemptUpdatedAt(model.attemptUpdatedAt); startedAt(model.startedAt); endedAt(model.endedAt); queuedDurationMilliseconds(model.queuedDurationMilliseconds); } public final String getApplicationId() { return applicationId; } public final void setApplicationId(String applicationId) { this.applicationId = applicationId; } @Override public final Builder applicationId(String applicationId) { this.applicationId = applicationId; return this; } public final String getJobRunId() { return jobRunId; } public final void setJobRunId(String jobRunId) { this.jobRunId = jobRunId; } @Override public final Builder jobRunId(String jobRunId) { this.jobRunId = jobRunId; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final String getCreatedBy() { return createdBy; } public final void setCreatedBy(String createdBy) { this.createdBy = createdBy; } @Override public final Builder createdBy(String createdBy) { this.createdBy = createdBy; return this; } public final Instant getCreatedAt() { return createdAt; } public final void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; } @Override public final Builder createdAt(Instant createdAt) { this.createdAt = createdAt; return this; } public final Instant getUpdatedAt() { return updatedAt; } public final void setUpdatedAt(Instant updatedAt) { this.updatedAt = updatedAt; } @Override public final Builder updatedAt(Instant updatedAt) { this.updatedAt = updatedAt; return this; } public final String getExecutionRole() { return executionRole; } public final void setExecutionRole(String executionRole) { this.executionRole = executionRole; } @Override public final Builder executionRole(String executionRole) { this.executionRole = executionRole; return this; } public final String getState() { return state; } public final void setState(String state) { this.state = state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(JobRunState state) { this.state(state == null ? null : state.toString()); return this; } public final String getStateDetails() { return stateDetails; } public final void setStateDetails(String stateDetails) { this.stateDetails = stateDetails; } @Override public final Builder stateDetails(String stateDetails) { this.stateDetails = stateDetails; return this; } public final String getReleaseLabel() { return releaseLabel; } public final void setReleaseLabel(String releaseLabel) { this.releaseLabel = releaseLabel; } @Override public final Builder releaseLabel(String releaseLabel) { this.releaseLabel = releaseLabel; return this; } public final ConfigurationOverrides.Builder getConfigurationOverrides() { return configurationOverrides != null ? configurationOverrides.toBuilder() : null; } public final void setConfigurationOverrides(ConfigurationOverrides.BuilderImpl configurationOverrides) { this.configurationOverrides = configurationOverrides != null ? configurationOverrides.build() : null; } @Override public final Builder configurationOverrides(ConfigurationOverrides configurationOverrides) { this.configurationOverrides = configurationOverrides; return this; } public final JobDriver.Builder getJobDriver() { return jobDriver != null ? jobDriver.toBuilder() : null; } public final void setJobDriver(JobDriver.BuilderImpl jobDriver) { this.jobDriver = jobDriver != null ? jobDriver.build() : null; } @Override public final Builder jobDriver(JobDriver jobDriver) { this.jobDriver = jobDriver; return this; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } public final void setTags(Map tags) { this.tags = TagMapCopier.copy(tags); } @Override public final Builder tags(Map tags) { this.tags = TagMapCopier.copy(tags); return this; } public final TotalResourceUtilization.Builder getTotalResourceUtilization() { return totalResourceUtilization != null ? totalResourceUtilization.toBuilder() : null; } public final void setTotalResourceUtilization(TotalResourceUtilization.BuilderImpl totalResourceUtilization) { this.totalResourceUtilization = totalResourceUtilization != null ? totalResourceUtilization.build() : null; } @Override public final Builder totalResourceUtilization(TotalResourceUtilization totalResourceUtilization) { this.totalResourceUtilization = totalResourceUtilization; return this; } public final NetworkConfiguration.Builder getNetworkConfiguration() { return networkConfiguration != null ? networkConfiguration.toBuilder() : null; } public final void setNetworkConfiguration(NetworkConfiguration.BuilderImpl networkConfiguration) { this.networkConfiguration = networkConfiguration != null ? networkConfiguration.build() : null; } @Override public final Builder networkConfiguration(NetworkConfiguration networkConfiguration) { this.networkConfiguration = networkConfiguration; return this; } public final Integer getTotalExecutionDurationSeconds() { return totalExecutionDurationSeconds; } public final void setTotalExecutionDurationSeconds(Integer totalExecutionDurationSeconds) { this.totalExecutionDurationSeconds = totalExecutionDurationSeconds; } @Override public final Builder totalExecutionDurationSeconds(Integer totalExecutionDurationSeconds) { this.totalExecutionDurationSeconds = totalExecutionDurationSeconds; return this; } public final Long getExecutionTimeoutMinutes() { return executionTimeoutMinutes; } public final void setExecutionTimeoutMinutes(Long executionTimeoutMinutes) { this.executionTimeoutMinutes = executionTimeoutMinutes; } @Override public final Builder executionTimeoutMinutes(Long executionTimeoutMinutes) { this.executionTimeoutMinutes = executionTimeoutMinutes; return this; } public final ResourceUtilization.Builder getBilledResourceUtilization() { return billedResourceUtilization != null ? billedResourceUtilization.toBuilder() : null; } public final void setBilledResourceUtilization(ResourceUtilization.BuilderImpl billedResourceUtilization) { this.billedResourceUtilization = billedResourceUtilization != null ? billedResourceUtilization.build() : null; } @Override public final Builder billedResourceUtilization(ResourceUtilization billedResourceUtilization) { this.billedResourceUtilization = billedResourceUtilization; return this; } public final String getMode() { return mode; } public final void setMode(String mode) { this.mode = mode; } @Override public final Builder mode(String mode) { this.mode = mode; return this; } @Override public final Builder mode(JobRunMode mode) { this.mode(mode == null ? null : mode.toString()); return this; } public final RetryPolicy.Builder getRetryPolicy() { return retryPolicy != null ? retryPolicy.toBuilder() : null; } public final void setRetryPolicy(RetryPolicy.BuilderImpl retryPolicy) { this.retryPolicy = retryPolicy != null ? retryPolicy.build() : null; } @Override public final Builder retryPolicy(RetryPolicy retryPolicy) { this.retryPolicy = retryPolicy; return this; } public final Integer getAttempt() { return attempt; } public final void setAttempt(Integer attempt) { this.attempt = attempt; } @Override public final Builder attempt(Integer attempt) { this.attempt = attempt; return this; } public final Instant getAttemptCreatedAt() { return attemptCreatedAt; } public final void setAttemptCreatedAt(Instant attemptCreatedAt) { this.attemptCreatedAt = attemptCreatedAt; } @Override public final Builder attemptCreatedAt(Instant attemptCreatedAt) { this.attemptCreatedAt = attemptCreatedAt; return this; } public final Instant getAttemptUpdatedAt() { return attemptUpdatedAt; } public final void setAttemptUpdatedAt(Instant attemptUpdatedAt) { this.attemptUpdatedAt = attemptUpdatedAt; } @Override public final Builder attemptUpdatedAt(Instant attemptUpdatedAt) { this.attemptUpdatedAt = attemptUpdatedAt; return this; } public final Instant getStartedAt() { return startedAt; } public final void setStartedAt(Instant startedAt) { this.startedAt = startedAt; } @Override public final Builder startedAt(Instant startedAt) { this.startedAt = startedAt; return this; } public final Instant getEndedAt() { return endedAt; } public final void setEndedAt(Instant endedAt) { this.endedAt = endedAt; } @Override public final Builder endedAt(Instant endedAt) { this.endedAt = endedAt; return this; } public final Long getQueuedDurationMilliseconds() { return queuedDurationMilliseconds; } public final void setQueuedDurationMilliseconds(Long queuedDurationMilliseconds) { this.queuedDurationMilliseconds = queuedDurationMilliseconds; } @Override public final Builder queuedDurationMilliseconds(Long queuedDurationMilliseconds) { this.queuedDurationMilliseconds = queuedDurationMilliseconds; return this; } @Override public JobRun build() { return new JobRun(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy