Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
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
/*
* 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:
*
*
*
* 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:
*
*