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.CreateJobRequest Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.elastictranscoder.model;
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.awscore.AwsRequestOverrideConfiguration;
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;
/**
*
* The CreateJobRequest
structure.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class CreateJobRequest extends ElasticTranscoderRequest implements
ToCopyableBuilder {
private static final SdkField PIPELINE_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.getter(getter(CreateJobRequest::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)
.getter(getter(CreateJobRequest::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)
.getter(getter(CreateJobRequest::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)
.getter(getter(CreateJobRequest::output)).setter(setter(Builder::output)).constructor(CreateJobOutput::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Output").build()).build();
private static final SdkField> OUTPUTS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.getter(getter(CreateJobRequest::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(CreateJobOutput::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)
.getter(getter(CreateJobRequest::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)
.getter(getter(CreateJobRequest::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(CreateJobPlaylist::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField> USER_METADATA_FIELD = SdkField
.> builder(MarshallingType.MAP)
.getter(getter(CreateJobRequest::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 List> SDK_FIELDS = Collections.unmodifiableList(Arrays
.asList(PIPELINE_ID_FIELD, INPUT_FIELD, INPUTS_FIELD, OUTPUT_FIELD, OUTPUTS_FIELD, OUTPUT_KEY_PREFIX_FIELD,
PLAYLISTS_FIELD, USER_METADATA_FIELD));
private final String pipelineId;
private final JobInput input;
private final List inputs;
private final CreateJobOutput output;
private final List outputs;
private final String outputKeyPrefix;
private final List playlists;
private final Map userMetadata;
private CreateJobRequest(BuilderImpl builder) {
super(builder);
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.userMetadata = builder.userMetadata;
}
/**
*
* 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 String pipelineId() {
return pipelineId;
}
/**
*
* A section of the request body that provides information about the file that is being transcoded.
*
*
* @return A section of the request body that provides information about the file that is being transcoded.
*/
public JobInput input() {
return input;
}
/**
* Returns true if the Inputs property was specified by the sender (it may be empty), or false if the sender did not
* specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public boolean hasInputs() {
return inputs != null && !(inputs instanceof SdkAutoConstructList);
}
/**
*
* A section of the request body that provides information about the files that are being transcoded.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasInputs()} to see if a value was sent in this field.
*
*
* @return A section of the request body that provides information about the files that are being transcoded.
*/
public List inputs() {
return inputs;
}
/**
*
* A section of the request body that provides information about the transcoded (target) file. We strongly recommend
* that you use the Outputs
syntax instead of the Output
syntax.
*
*
* @return A section of the request body that provides information about the transcoded (target) file. We strongly
* recommend that you use the Outputs
syntax instead of the Output
syntax.
*/
public CreateJobOutput output() {
return output;
}
/**
* Returns true if the Outputs property was specified by the sender (it may be empty), or false if the sender did
* not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public boolean hasOutputs() {
return outputs != null && !(outputs instanceof SdkAutoConstructList);
}
/**
*
* A section of the request body that provides information about the transcoded (target) files. We recommend that
* you use the Outputs
syntax instead of the Output
syntax.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasOutputs()} to see if a value was sent in this field.
*
*
* @return A section of the request body that provides information about the transcoded (target) files. We recommend
* that you use the Outputs
syntax instead of the Output
syntax.
*/
public 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.
*
*
* @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.
*/
public String outputKeyPrefix() {
return outputKeyPrefix;
}
/**
* Returns true if the Playlists property was specified by the sender (it may be empty), or false if the sender did
* not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public boolean hasPlaylists() {
return playlists != null && !(playlists instanceof SdkAutoConstructList);
}
/**
*
* 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.
*
*
* You can use {@link #hasPlaylists()} to see if a value was sent in this field.
*
*
* @return 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 List playlists() {
return playlists;
}
/**
* Returns true if the UserMetadata property was specified by the sender (it may be empty), or false if the sender
* did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service.
*/
public 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.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* You can use {@link #hasUserMetadata()} to see if a value was sent in this field.
*
*
* @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.
*/
public Map userMetadata() {
return userMetadata;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(pipelineId());
hashCode = 31 * hashCode + Objects.hashCode(input());
hashCode = 31 * hashCode + Objects.hashCode(inputs());
hashCode = 31 * hashCode + Objects.hashCode(output());
hashCode = 31 * hashCode + Objects.hashCode(outputs());
hashCode = 31 * hashCode + Objects.hashCode(outputKeyPrefix());
hashCode = 31 * hashCode + Objects.hashCode(playlists());
hashCode = 31 * hashCode + Objects.hashCode(userMetadata());
return hashCode;
}
@Override
public boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateJobRequest)) {
return false;
}
CreateJobRequest other = (CreateJobRequest) obj;
return Objects.equals(pipelineId(), other.pipelineId()) && Objects.equals(input(), other.input())
&& Objects.equals(inputs(), other.inputs()) && Objects.equals(output(), other.output())
&& Objects.equals(outputs(), other.outputs()) && Objects.equals(outputKeyPrefix(), other.outputKeyPrefix())
&& Objects.equals(playlists(), other.playlists()) && Objects.equals(userMetadata(), other.userMetadata());
}
/**
* 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 String toString() {
return ToString.builder("CreateJobRequest").add("PipelineId", pipelineId()).add("Input", input()).add("Inputs", inputs())
.add("Output", output()).add("Outputs", outputs()).add("OutputKeyPrefix", outputKeyPrefix())
.add("Playlists", playlists()).add("UserMetadata", userMetadata()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
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 "UserMetadata":
return Optional.ofNullable(clazz.cast(userMetadata()));
default:
return Optional.empty();
}
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((CreateJobRequest) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends ElasticTranscoderRequest.Builder, SdkPojo, CopyableBuilder {
/**
*
* 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 body that provides information about the file that is being transcoded.
*
*
* @param input
* A section of the request 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 body that provides information about the file that is being transcoded.
*
* This is a convenience 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());
}
/**
*
* A section of the request body that provides information about the files that are being transcoded.
*
*
* @param inputs
* A section of the request body that provides information about the files that are being transcoded.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder inputs(Collection inputs);
/**
*
* A section of the request body that provides information about the files that are being transcoded.
*
*
* @param inputs
* A section of the request body that provides information about the files that are being transcoded.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder inputs(JobInput... inputs);
/**
*
* A section of the request body that provides information about the files that are being transcoded.
*
* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to
* create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its
* result is passed to {@link #inputs(List)}.
*
* @param inputs
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #inputs(List)
*/
Builder inputs(Consumer... inputs);
/**
*
* A section of the request body that provides information about the transcoded (target) file. We strongly
* recommend that you use the Outputs
syntax instead of the Output
syntax.
*
*
* @param output
* A section of the request body that provides information about the transcoded (target) file. We
* strongly recommend that you use the Outputs
syntax instead of the Output
* syntax.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder output(CreateJobOutput output);
/**
*
* A section of the request body that provides information about the transcoded (target) file. We strongly
* recommend that you use the Outputs
syntax instead of the Output
syntax.
*
* This is a convenience that creates an instance of the {@link CreateJobOutput.Builder} avoiding the need to
* create one manually via {@link CreateJobOutput#builder()}.
*
* When the {@link Consumer} completes, {@link CreateJobOutput.Builder#build()} is called immediately and its
* result is passed to {@link #output(CreateJobOutput)}.
*
* @param output
* a consumer that will call methods on {@link CreateJobOutput.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #output(CreateJobOutput)
*/
default Builder output(Consumer output) {
return output(CreateJobOutput.builder().applyMutation(output).build());
}
/**
*
* A section of the request body that provides information about the transcoded (target) files. We recommend
* that you use the Outputs
syntax instead of the Output
syntax.
*
*
* @param outputs
* A section of the request body that provides information about the transcoded (target) files. We
* recommend that you use the Outputs
syntax instead of the Output
syntax.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputs(Collection outputs);
/**
*
* A section of the request body that provides information about the transcoded (target) files. We recommend
* that you use the Outputs
syntax instead of the Output
syntax.
*
*
* @param outputs
* A section of the request body that provides information about the transcoded (target) files. We
* recommend that you use the Outputs
syntax instead of the Output
syntax.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputs(CreateJobOutput... outputs);
/**
*
* A section of the request body that provides information about the transcoded (target) files. We recommend
* that you use the Outputs
syntax instead of the Output
syntax.
*
* This is a convenience that creates an instance of the {@link List.Builder} avoiding the need
* to create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and
* its result is passed to {@link #outputs(List)}.
*
* @param outputs
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #outputs(List)
*/
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.
*
*
* @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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outputKeyPrefix(String outputKeyPrefix);
/**
*
* 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
* 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);
/**
*
* 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
* 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(CreateJobPlaylist... playlists);
/**
*
* 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 that creates an instance of the {@link List.Builder} avoiding the
* need to create one manually via {@link List#builder()}.
*
* When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately
* and its result is passed to {@link #playlists(List)}.
*
* @param playlists
* a consumer that will call methods on {@link List.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #playlists(List)
*/
Builder playlists(Consumer... playlists);
/**
*
* 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.
*
*
* @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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder userMetadata(Map userMetadata);
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends ElasticTranscoderRequest.BuilderImpl implements Builder {
private String pipelineId;
private JobInput input;
private List inputs = DefaultSdkAutoConstructList.getInstance();
private CreateJobOutput output;
private List outputs = DefaultSdkAutoConstructList.getInstance();
private String outputKeyPrefix;
private List playlists = DefaultSdkAutoConstructList.getInstance();
private Map userMetadata = DefaultSdkAutoConstructMap.getInstance();
private BuilderImpl() {
}
private BuilderImpl(CreateJobRequest model) {
super(model);
pipelineId(model.pipelineId);
input(model.input);
inputs(model.inputs);
output(model.output);
outputs(model.outputs);
outputKeyPrefix(model.outputKeyPrefix);
playlists(model.playlists);
userMetadata(model.userMetadata);
}
public final String getPipelineId() {
return pipelineId;
}
@Override
public final Builder pipelineId(String pipelineId) {
this.pipelineId = pipelineId;
return this;
}
public final void setPipelineId(String pipelineId) {
this.pipelineId = pipelineId;
}
public final JobInput.Builder getInput() {
return input != null ? input.toBuilder() : null;
}
@Override
public final Builder input(JobInput input) {
this.input = input;
return this;
}
public final void setInput(JobInput.BuilderImpl input) {
this.input = input != null ? input.build() : null;
}
public final Collection getInputs() {
return inputs != null ? inputs.stream().map(JobInput::toBuilder).collect(Collectors.toList()) : null;
}
@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 void setInputs(Collection inputs) {
this.inputs = JobInputsCopier.copyFromBuilder(inputs);
}
public final CreateJobOutput.Builder getOutput() {
return output != null ? output.toBuilder() : null;
}
@Override
public final Builder output(CreateJobOutput output) {
this.output = output;
return this;
}
public final void setOutput(CreateJobOutput.BuilderImpl output) {
this.output = output != null ? output.build() : null;
}
public final Collection getOutputs() {
return outputs != null ? outputs.stream().map(CreateJobOutput::toBuilder).collect(Collectors.toList()) : null;
}
@Override
public final Builder outputs(Collection outputs) {
this.outputs = CreateJobOutputsCopier.copy(outputs);
return this;
}
@Override
@SafeVarargs
public final Builder outputs(CreateJobOutput... outputs) {
outputs(Arrays.asList(outputs));
return this;
}
@Override
@SafeVarargs
public final Builder outputs(Consumer... outputs) {
outputs(Stream.of(outputs).map(c -> CreateJobOutput.builder().applyMutation(c).build()).collect(Collectors.toList()));
return this;
}
public final void setOutputs(Collection outputs) {
this.outputs = CreateJobOutputsCopier.copyFromBuilder(outputs);
}
public final String getOutputKeyPrefix() {
return outputKeyPrefix;
}
@Override
public final Builder outputKeyPrefix(String outputKeyPrefix) {
this.outputKeyPrefix = outputKeyPrefix;
return this;
}
public final void setOutputKeyPrefix(String outputKeyPrefix) {
this.outputKeyPrefix = outputKeyPrefix;
}
public final Collection getPlaylists() {
return playlists != null ? playlists.stream().map(CreateJobPlaylist::toBuilder).collect(Collectors.toList()) : null;
}
@Override
public final Builder playlists(Collection playlists) {
this.playlists = CreateJobPlaylistsCopier.copy(playlists);
return this;
}
@Override
@SafeVarargs
public final Builder playlists(CreateJobPlaylist... playlists) {
playlists(Arrays.asList(playlists));
return this;
}
@Override
@SafeVarargs
public final Builder playlists(Consumer... playlists) {
playlists(Stream.of(playlists).map(c -> CreateJobPlaylist.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final void setPlaylists(Collection playlists) {
this.playlists = CreateJobPlaylistsCopier.copyFromBuilder(playlists);
}
public final Map getUserMetadata() {
return userMetadata;
}
@Override
public final Builder userMetadata(Map userMetadata) {
this.userMetadata = UserMetadataCopier.copy(userMetadata);
return this;
}
public final void setUserMetadata(Map userMetadata) {
this.userMetadata = UserMetadataCopier.copy(userMetadata);
}
@Override
public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public CreateJobRequest build() {
return new CreateJobRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}