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

software.amazon.awssdk.services.elastictranscoder.model.Job Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Elastic Transcoder module holds the client classes that are used for communicating with Amazon Elastic Transcoder Service

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

import java.io.Serializable;
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;

/**
 * 

* A section of the response body that provides information about the job that is created. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Job implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Id") .getter(getter(Job::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Id").build()).build(); private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Arn") .getter(getter(Job::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Arn").build()).build(); private static final SdkField PIPELINE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("PipelineId").getter(getter(Job::pipelineId)).setter(setter(Builder::pipelineId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PipelineId").build()).build(); private static final SdkField INPUT_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Input").getter(getter(Job::input)).setter(setter(Builder::input)).constructor(JobInput::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Input").build()).build(); private static final SdkField> INPUTS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Inputs") .getter(getter(Job::inputs)) .setter(setter(Builder::inputs)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Inputs").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(JobInput::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField OUTPUT_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Output").getter(getter(Job::output)).setter(setter(Builder::output)).constructor(JobOutput::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Output").build()).build(); private static final SdkField> OUTPUTS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Outputs") .getter(getter(Job::outputs)) .setter(setter(Builder::outputs)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Outputs").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(JobOutput::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField OUTPUT_KEY_PREFIX_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("OutputKeyPrefix").getter(getter(Job::outputKeyPrefix)).setter(setter(Builder::outputKeyPrefix)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputKeyPrefix").build()).build(); private static final SdkField> PLAYLISTS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Playlists") .getter(getter(Job::playlists)) .setter(setter(Builder::playlists)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Playlists").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Playlist::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status") .getter(getter(Job::status)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField> USER_METADATA_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("UserMetadata") .getter(getter(Job::userMetadata)) .setter(setter(Builder::userMetadata)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UserMetadata").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 TIMING_FIELD = SdkField. builder(MarshallingType.SDK_POJO).memberName("Timing") .getter(getter(Job::timing)).setter(setter(Builder::timing)).constructor(Timing::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Timing").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ID_FIELD, ARN_FIELD, PIPELINE_ID_FIELD, INPUT_FIELD, INPUTS_FIELD, OUTPUT_FIELD, OUTPUTS_FIELD, OUTPUT_KEY_PREFIX_FIELD, PLAYLISTS_FIELD, STATUS_FIELD, USER_METADATA_FIELD, TIMING_FIELD)); private static final long serialVersionUID = 1L; private final String id; private final String arn; private final String pipelineId; private final JobInput input; private final List inputs; private final JobOutput output; private final List outputs; private final String outputKeyPrefix; private final List playlists; private final String status; private final Map userMetadata; private final Timing timing; private Job(BuilderImpl builder) { this.id = builder.id; this.arn = builder.arn; this.pipelineId = builder.pipelineId; this.input = builder.input; this.inputs = builder.inputs; this.output = builder.output; this.outputs = builder.outputs; this.outputKeyPrefix = builder.outputKeyPrefix; this.playlists = builder.playlists; this.status = builder.status; this.userMetadata = builder.userMetadata; this.timing = builder.timing; } /** *

* The identifier that Elastic Transcoder assigned to the job. You use this value to get settings for the job or to * delete the job. *

* * @return The identifier that Elastic Transcoder assigned to the job. You use this value to get settings for the * job or to delete the job. */ public final String id() { return id; } /** *

* The Amazon Resource Name (ARN) for the job. *

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

* The Id of the pipeline that you want Elastic Transcoder to use for transcoding. The pipeline * determines several settings, including the Amazon S3 bucket from which Elastic Transcoder gets the files to * transcode and the bucket into which Elastic Transcoder puts the transcoded files. *

* * @return The Id of the pipeline that you want Elastic Transcoder to use for transcoding. The pipeline * determines several settings, including the Amazon S3 bucket from which Elastic Transcoder gets the files * to transcode and the bucket into which Elastic Transcoder puts the transcoded files. */ public final String pipelineId() { return pipelineId; } /** *

* A section of the request or response body that provides information about the file that is being transcoded. *

* * @return A section of the request or response body that provides information about the file that is being * transcoded. */ public final JobInput input() { return input; } /** * For responses, this returns true if the service returned a value for the Inputs 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 hasInputs() { return inputs != null && !(inputs instanceof SdkAutoConstructList); } /** *

* Information about the files that you're transcoding. If you specified multiple files for this job, Elastic * Transcoder stitches the files together to make one output. *

*

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

* * @return Information about the files that you're transcoding. If you specified multiple files for this job, * Elastic Transcoder stitches the files together to make one output. */ public final List inputs() { return inputs; } /** *

* If you specified one output for a job, information about that output. If you specified multiple outputs for a * job, the Output object lists information about the first output. This duplicates the information that is listed * for the first output in the Outputs object. *

* *

* Outputs recommended instead. *

*
*

* A section of the request or response body that provides information about the transcoded (target) file. *

* * @return If you specified one output for a job, information about that output. If you specified multiple outputs * for a job, the Output object lists information about the first output. This duplicates the information * that is listed for the first output in the Outputs object.

*

* Outputs recommended instead. *

*
*

* A section of the request or response body that provides information about the transcoded (target) file. */ public final JobOutput output() { return output; } /** * For responses, this returns true if the service returned a value for the Outputs 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 hasOutputs() { return outputs != null && !(outputs instanceof SdkAutoConstructList); } /** *

* Information about the output files. We recommend that you use the Outputs syntax for all jobs, even * when you want Elastic Transcoder to transcode a file into only one format. Do not use both the * Outputs and Output syntaxes in the same request. You can create a maximum of 30 outputs * per job. *

*

* If you specify more than one output for a job, Elastic Transcoder creates the files for each output in the order * in which you specify them in the 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 #hasOutputs} method. *

* * @return Information about the output files. We recommend that you use the Outputs syntax for all * jobs, even when you want Elastic Transcoder to transcode a file into only one format. Do not use both the * Outputs and Output syntaxes in the same request. You can create a maximum of 30 * outputs per job.

*

* If you specify more than one output for a job, Elastic Transcoder creates the files for each output in * the order in which you specify them in the job. */ public final List outputs() { return outputs; } /** *

* The value, if any, that you want Elastic Transcoder to prepend to the names of all files that this job creates, * including output files, thumbnails, and playlists. We recommend that you add a / or some other delimiter to the * end of the OutputKeyPrefix. *

* * @return The value, if any, that you want Elastic Transcoder to prepend to the names of all files that this job * creates, including output files, thumbnails, and playlists. We recommend that you add a / or some other * delimiter to the end of the OutputKeyPrefix. */ public final String outputKeyPrefix() { return outputKeyPrefix; } /** * For responses, this returns true if the service returned a value for the Playlists 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 hasPlaylists() { return playlists != null && !(playlists instanceof SdkAutoConstructList); } /** * *

* Outputs in Fragmented MP4 or MPEG-TS format only. *

*
*

* If you specify a preset in PresetId for which the value of Container is fmp4 * (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the master playlists that you * want Elastic Transcoder to create. *

*

* The maximum number of master playlists in a job is 30. *

*

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

* * @return

* Outputs in Fragmented MP4 or MPEG-TS format only. *

* *

* If you specify a preset in PresetId for which the value of Container is fmp4 * (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the master playlists * that you want Elastic Transcoder to create. *

*

* The maximum number of master playlists in a job is 30. */ public final List playlists() { return playlists; } /** *

* The status of the job: Submitted, Progressing, Complete, * Canceled, or Error. *

* * @return The status of the job: Submitted, Progressing, Complete, * Canceled, or Error. */ public final String status() { return status; } /** * For responses, this returns true if the service returned a value for the UserMetadata 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 hasUserMetadata() { return userMetadata != null && !(userMetadata instanceof SdkAutoConstructMap); } /** *

* User-defined metadata that you want to associate with an Elastic Transcoder job. You specify metadata in * key/value pairs, and you can add up to 10 key/value pairs per job. Elastic Transcoder * does not guarantee that key/value pairs are returned in the same order in which you specify them. *

*

* Metadata keys and values must use characters from the following list: *

*
    *
  • *

    * 0-9 *

    *
  • *
  • *

    * A-Z and a-z *

    *
  • *
  • *

    * Space *

    *
  • *
  • *

    * The following symbols: _.:/=+-%@ *

    *
  • *
*

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

* * @return User-defined metadata that you want to associate with an Elastic Transcoder job. You specify metadata in * key/value pairs, and you can add up to 10 key/value pairs per job. Elastic * Transcoder does not guarantee that key/value pairs are returned in the same order in which * you specify them.

*

* Metadata keys and values must use characters from the following list: *

*
    *
  • *

    * 0-9 *

    *
  • *
  • *

    * A-Z and a-z *

    *
  • *
  • *

    * Space *

    *
  • *
  • *

    * The following symbols: _.:/=+-%@ *

    *
  • */ public final Map userMetadata() { return userMetadata; } /** *

    * Details about the timing of a job. *

    * * @return Details about the timing of a job. */ public final Timing timing() { return timing; } @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(id()); hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(pipelineId()); hashCode = 31 * hashCode + Objects.hashCode(input()); hashCode = 31 * hashCode + Objects.hashCode(hasInputs() ? inputs() : null); hashCode = 31 * hashCode + Objects.hashCode(output()); hashCode = 31 * hashCode + Objects.hashCode(hasOutputs() ? outputs() : null); hashCode = 31 * hashCode + Objects.hashCode(outputKeyPrefix()); hashCode = 31 * hashCode + Objects.hashCode(hasPlaylists() ? playlists() : null); hashCode = 31 * hashCode + Objects.hashCode(status()); hashCode = 31 * hashCode + Objects.hashCode(hasUserMetadata() ? userMetadata() : null); hashCode = 31 * hashCode + Objects.hashCode(timing()); 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 Job)) { return false; } Job other = (Job) obj; return Objects.equals(id(), other.id()) && Objects.equals(arn(), other.arn()) && Objects.equals(pipelineId(), other.pipelineId()) && Objects.equals(input(), other.input()) && hasInputs() == other.hasInputs() && Objects.equals(inputs(), other.inputs()) && Objects.equals(output(), other.output()) && hasOutputs() == other.hasOutputs() && Objects.equals(outputs(), other.outputs()) && Objects.equals(outputKeyPrefix(), other.outputKeyPrefix()) && hasPlaylists() == other.hasPlaylists() && Objects.equals(playlists(), other.playlists()) && Objects.equals(status(), other.status()) && hasUserMetadata() == other.hasUserMetadata() && Objects.equals(userMetadata(), other.userMetadata()) && Objects.equals(timing(), other.timing()); } /** * 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("Job").add("Id", id()).add("Arn", arn()).add("PipelineId", pipelineId()).add("Input", input()) .add("Inputs", hasInputs() ? inputs() : null).add("Output", output()) .add("Outputs", hasOutputs() ? outputs() : null).add("OutputKeyPrefix", outputKeyPrefix()) .add("Playlists", hasPlaylists() ? playlists() : null).add("Status", status()) .add("UserMetadata", hasUserMetadata() ? userMetadata() : null).add("Timing", timing()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Id": return Optional.ofNullable(clazz.cast(id())); case "Arn": return Optional.ofNullable(clazz.cast(arn())); case "PipelineId": return Optional.ofNullable(clazz.cast(pipelineId())); case "Input": return Optional.ofNullable(clazz.cast(input())); case "Inputs": return Optional.ofNullable(clazz.cast(inputs())); case "Output": return Optional.ofNullable(clazz.cast(output())); case "Outputs": return Optional.ofNullable(clazz.cast(outputs())); case "OutputKeyPrefix": return Optional.ofNullable(clazz.cast(outputKeyPrefix())); case "Playlists": return Optional.ofNullable(clazz.cast(playlists())); case "Status": return Optional.ofNullable(clazz.cast(status())); case "UserMetadata": return Optional.ofNullable(clazz.cast(userMetadata())); case "Timing": return Optional.ofNullable(clazz.cast(timing())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Job) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * The identifier that Elastic Transcoder assigned to the job. You use this value to get settings for the job or * to delete the job. *

    * * @param id * The identifier that Elastic Transcoder assigned to the job. You use this value to get settings for the * job or to delete the job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder id(String id); /** *

    * The Amazon Resource Name (ARN) for the job. *

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

    * The Id of the pipeline that you want Elastic Transcoder to use for transcoding. The pipeline * determines several settings, including the Amazon S3 bucket from which Elastic Transcoder gets the files to * transcode and the bucket into which Elastic Transcoder puts the transcoded files. *

    * * @param pipelineId * The Id of the pipeline that you want Elastic Transcoder to use for transcoding. The * pipeline determines several settings, including the Amazon S3 bucket from which Elastic Transcoder * gets the files to transcode and the bucket into which Elastic Transcoder puts the transcoded files. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pipelineId(String pipelineId); /** *

    * A section of the request or response body that provides information about the file that is being transcoded. *

    * * @param input * A section of the request or response body that provides information about the file that is being * transcoded. * @return Returns a reference to this object so that method calls can be chained together. */ Builder input(JobInput input); /** *

    * A section of the request or response body that provides information about the file that is being transcoded. *

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

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

    * Information about the files that you're transcoding. If you specified multiple files for this job, Elastic * Transcoder stitches the files together to make one output. *

    * * @param inputs * Information about the files that you're transcoding. If you specified multiple files for this job, * Elastic Transcoder stitches the files together to make one output. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inputs(Collection inputs); /** *

    * Information about the files that you're transcoding. If you specified multiple files for this job, Elastic * Transcoder stitches the files together to make one output. *

    * * @param inputs * Information about the files that you're transcoding. If you specified multiple files for this job, * Elastic Transcoder stitches the files together to make one output. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inputs(JobInput... inputs); /** *

    * Information about the files that you're transcoding. If you specified multiple files for this job, Elastic * Transcoder stitches the files together to make one output. *

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

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

    * If you specified one output for a job, information about that output. If you specified multiple outputs for a * job, the Output object lists information about the first output. This duplicates the information that is * listed for the first output in the Outputs object. *

    * *

    * Outputs recommended instead. *

    *
    *

    * A section of the request or response body that provides information about the transcoded (target) file. *

    * * @param output * If you specified one output for a job, information about that output. If you specified multiple * outputs for a job, the Output object lists information about the first output. This duplicates the * information that is listed for the first output in the Outputs object.

    *

    * Outputs recommended instead. *

    *
    *

    * A section of the request or response body that provides information about the transcoded (target) * file. * @return Returns a reference to this object so that method calls can be chained together. */ Builder output(JobOutput output); /** *

    * If you specified one output for a job, information about that output. If you specified multiple outputs for a * job, the Output object lists information about the first output. This duplicates the information that is * listed for the first output in the Outputs object. *

    * *

    * Outputs recommended instead. *

    *
    *

    * A section of the request or response body that provides information about the transcoded (target) file. *

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

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

    * Information about the output files. We recommend that you use the Outputs syntax for all jobs, * even when you want Elastic Transcoder to transcode a file into only one format. Do not use both the * Outputs and Output syntaxes in the same request. You can create a maximum of 30 * outputs per job. *

    *

    * If you specify more than one output for a job, Elastic Transcoder creates the files for each output in the * order in which you specify them in the job. *

    * * @param outputs * Information about the output files. We recommend that you use the Outputs syntax for all * jobs, even when you want Elastic Transcoder to transcode a file into only one format. Do not use both * the Outputs and Output syntaxes in the same request. You can create a * maximum of 30 outputs per job.

    *

    * If you specify more than one output for a job, Elastic Transcoder creates the files for each output in * the order in which you specify them in the job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder outputs(Collection outputs); /** *

    * Information about the output files. We recommend that you use the Outputs syntax for all jobs, * even when you want Elastic Transcoder to transcode a file into only one format. Do not use both the * Outputs and Output syntaxes in the same request. You can create a maximum of 30 * outputs per job. *

    *

    * If you specify more than one output for a job, Elastic Transcoder creates the files for each output in the * order in which you specify them in the job. *

    * * @param outputs * Information about the output files. We recommend that you use the Outputs syntax for all * jobs, even when you want Elastic Transcoder to transcode a file into only one format. Do not use both * the Outputs and Output syntaxes in the same request. You can create a * maximum of 30 outputs per job.

    *

    * If you specify more than one output for a job, Elastic Transcoder creates the files for each output in * the order in which you specify them in the job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder outputs(JobOutput... outputs); /** *

    * Information about the output files. We recommend that you use the Outputs syntax for all jobs, * even when you want Elastic Transcoder to transcode a file into only one format. Do not use both the * Outputs and Output syntaxes in the same request. You can create a maximum of 30 * outputs per job. *

    *

    * If you specify more than one output for a job, Elastic Transcoder creates the files for each output in the * order in which you specify them in the job. *

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

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

    * The value, if any, that you want Elastic Transcoder to prepend to the names of all files that this job * creates, including output files, thumbnails, and playlists. We recommend that you add a / or some other * delimiter to the end of the OutputKeyPrefix. *

    * * @param outputKeyPrefix * The value, if any, that you want Elastic Transcoder to prepend to the names of all files that this job * creates, including output files, thumbnails, and playlists. We recommend that you add a / or some * other delimiter to the end of the OutputKeyPrefix. * @return Returns a reference to this object so that method calls can be chained together. */ Builder outputKeyPrefix(String outputKeyPrefix); /** * *

    * Outputs in Fragmented MP4 or MPEG-TS format only. *

    *
    *

    * If you specify a preset in PresetId for which the value of Container is fmp4 * (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the master playlists that * you want Elastic Transcoder to create. *

    *

    * The maximum number of master playlists in a job is 30. *

    * * @param playlists *

    * Outputs in Fragmented MP4 or MPEG-TS format only. *

    * *

    * If you specify a preset in PresetId for which the value of Container is fmp4 * (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the master * playlists that you want Elastic Transcoder to create. *

    *

    * The maximum number of master playlists in a job is 30. * @return Returns a reference to this object so that method calls can be chained together. */ Builder playlists(Collection playlists); /** * *

    * Outputs in Fragmented MP4 or MPEG-TS format only. *

    * *

    * If you specify a preset in PresetId for which the value of Container is fmp4 * (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the master playlists that * you want Elastic Transcoder to create. *

    *

    * The maximum number of master playlists in a job is 30. *

    * * @param playlists *

    * Outputs in Fragmented MP4 or MPEG-TS format only. *

    * *

    * If you specify a preset in PresetId for which the value of Container is fmp4 * (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the master * playlists that you want Elastic Transcoder to create. *

    *

    * The maximum number of master playlists in a job is 30. * @return Returns a reference to this object so that method calls can be chained together. */ Builder playlists(Playlist... playlists); /** * *

    * Outputs in Fragmented MP4 or MPEG-TS format only. *

    * *

    * If you specify a preset in PresetId for which the value of Container is fmp4 * (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the master playlists that * you want Elastic Transcoder to create. *

    *

    * The maximum number of master playlists in a job is 30. *

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

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

    * The status of the job: Submitted, Progressing, Complete, * Canceled, or Error. *

    * * @param status * The status of the job: Submitted, Progressing, Complete, * Canceled, or Error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder status(String status); /** *

    * User-defined metadata that you want to associate with an Elastic Transcoder job. You specify metadata in * key/value pairs, and you can add up to 10 key/value pairs per job. Elastic * Transcoder does not guarantee that key/value pairs are returned in the same order in which you * specify them. *

    *

    * Metadata keys and values must use characters from the following list: *

    *
      *
    • *

      * 0-9 *

      *
    • *
    • *

      * A-Z and a-z *

      *
    • *
    • *

      * Space *

      *
    • *
    • *

      * The following symbols: _.:/=+-%@ *

      *
    • *
    * * @param userMetadata * User-defined metadata that you want to associate with an Elastic Transcoder job. You specify metadata * in key/value pairs, and you can add up to 10 key/value pairs per job. * Elastic Transcoder does not guarantee that key/value pairs are returned in the same order * in which you specify them.

    *

    * Metadata keys and values must use characters from the following list: *

    *
      *
    • *

      * 0-9 *

      *
    • *
    • *

      * A-Z and a-z *

      *
    • *
    • *

      * Space *

      *
    • *
    • *

      * The following symbols: _.:/=+-%@ *

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

      * Details about the timing of a job. *

      * * @param timing * Details about the timing of a job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder timing(Timing timing); /** *

      * Details about the timing of a job. *

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

      * When the {@link Consumer} completes, {@link Timing.Builder#build()} is called immediately and its result is * passed to {@link #timing(Timing)}. * * @param timing * a consumer that will call methods on {@link Timing.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #timing(Timing) */ default Builder timing(Consumer timing) { return timing(Timing.builder().applyMutation(timing).build()); } } static final class BuilderImpl implements Builder { private String id; private String arn; private String pipelineId; private JobInput input; private List inputs = DefaultSdkAutoConstructList.getInstance(); private JobOutput output; private List outputs = DefaultSdkAutoConstructList.getInstance(); private String outputKeyPrefix; private List playlists = DefaultSdkAutoConstructList.getInstance(); private String status; private Map userMetadata = DefaultSdkAutoConstructMap.getInstance(); private Timing timing; private BuilderImpl() { } private BuilderImpl(Job model) { id(model.id); arn(model.arn); pipelineId(model.pipelineId); input(model.input); inputs(model.inputs); output(model.output); outputs(model.outputs); outputKeyPrefix(model.outputKeyPrefix); playlists(model.playlists); status(model.status); userMetadata(model.userMetadata); timing(model.timing); } public final String getId() { return id; } public final void setId(String id) { this.id = id; } @Override public final Builder id(String id) { this.id = id; 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 getPipelineId() { return pipelineId; } public final void setPipelineId(String pipelineId) { this.pipelineId = pipelineId; } @Override public final Builder pipelineId(String pipelineId) { this.pipelineId = pipelineId; return this; } public final JobInput.Builder getInput() { return input != null ? input.toBuilder() : null; } public final void setInput(JobInput.BuilderImpl input) { this.input = input != null ? input.build() : null; } @Override public final Builder input(JobInput input) { this.input = input; return this; } public final List getInputs() { List result = JobInputsCopier.copyToBuilder(this.inputs); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setInputs(Collection inputs) { this.inputs = JobInputsCopier.copyFromBuilder(inputs); } @Override public final Builder inputs(Collection inputs) { this.inputs = JobInputsCopier.copy(inputs); return this; } @Override @SafeVarargs public final Builder inputs(JobInput... inputs) { inputs(Arrays.asList(inputs)); return this; } @Override @SafeVarargs public final Builder inputs(Consumer... inputs) { inputs(Stream.of(inputs).map(c -> JobInput.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final JobOutput.Builder getOutput() { return output != null ? output.toBuilder() : null; } public final void setOutput(JobOutput.BuilderImpl output) { this.output = output != null ? output.build() : null; } @Override public final Builder output(JobOutput output) { this.output = output; return this; } public final List getOutputs() { List result = JobOutputsCopier.copyToBuilder(this.outputs); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setOutputs(Collection outputs) { this.outputs = JobOutputsCopier.copyFromBuilder(outputs); } @Override public final Builder outputs(Collection outputs) { this.outputs = JobOutputsCopier.copy(outputs); return this; } @Override @SafeVarargs public final Builder outputs(JobOutput... outputs) { outputs(Arrays.asList(outputs)); return this; } @Override @SafeVarargs public final Builder outputs(Consumer... outputs) { outputs(Stream.of(outputs).map(c -> JobOutput.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getOutputKeyPrefix() { return outputKeyPrefix; } public final void setOutputKeyPrefix(String outputKeyPrefix) { this.outputKeyPrefix = outputKeyPrefix; } @Override public final Builder outputKeyPrefix(String outputKeyPrefix) { this.outputKeyPrefix = outputKeyPrefix; return this; } public final List getPlaylists() { List result = PlaylistsCopier.copyToBuilder(this.playlists); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setPlaylists(Collection playlists) { this.playlists = PlaylistsCopier.copyFromBuilder(playlists); } @Override public final Builder playlists(Collection playlists) { this.playlists = PlaylistsCopier.copy(playlists); return this; } @Override @SafeVarargs public final Builder playlists(Playlist... playlists) { playlists(Arrays.asList(playlists)); return this; } @Override @SafeVarargs public final Builder playlists(Consumer... playlists) { playlists(Stream.of(playlists).map(c -> Playlist.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } public final Map getUserMetadata() { if (userMetadata instanceof SdkAutoConstructMap) { return null; } return userMetadata; } public final void setUserMetadata(Map userMetadata) { this.userMetadata = UserMetadataCopier.copy(userMetadata); } @Override public final Builder userMetadata(Map userMetadata) { this.userMetadata = UserMetadataCopier.copy(userMetadata); return this; } public final Timing.Builder getTiming() { return timing != null ? timing.toBuilder() : null; } public final void setTiming(Timing.BuilderImpl timing) { this.timing = timing != null ? timing.build() : null; } @Override public final Builder timing(Timing timing) { this.timing = timing; return this; } @Override public Job build() { return new Job(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy