software.amazon.awssdk.services.mediaconvert.model.AudioSelector Maven / Gradle / Ivy
Show all versions of mediaconvert Show documentation
/*
* 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.mediaconvert.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* Use Audio selectors to specify a track or set of tracks from the input that you will use in your outputs. You can use
* multiple Audio selectors per input.
*/
@Generated("software.amazon.awssdk:codegen")
public final class AudioSelector implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField AUDIO_DURATION_CORRECTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AudioDurationCorrection").getter(getter(AudioSelector::audioDurationCorrectionAsString))
.setter(setter(Builder::audioDurationCorrection))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("audioDurationCorrection").build())
.build();
private static final SdkField CUSTOM_LANGUAGE_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CustomLanguageCode").getter(getter(AudioSelector::customLanguageCode))
.setter(setter(Builder::customLanguageCode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("customLanguageCode").build())
.build();
private static final SdkField DEFAULT_SELECTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DefaultSelection").getter(getter(AudioSelector::defaultSelectionAsString))
.setter(setter(Builder::defaultSelection))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("defaultSelection").build()).build();
private static final SdkField EXTERNAL_AUDIO_FILE_INPUT_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ExternalAudioFileInput").getter(getter(AudioSelector::externalAudioFileInput))
.setter(setter(Builder::externalAudioFileInput))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("externalAudioFileInput").build())
.build();
private static final SdkField HLS_RENDITION_GROUP_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("HlsRenditionGroupSettings")
.getter(getter(AudioSelector::hlsRenditionGroupSettings)).setter(setter(Builder::hlsRenditionGroupSettings))
.constructor(HlsRenditionGroupSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("hlsRenditionGroupSettings").build())
.build();
private static final SdkField LANGUAGE_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("LanguageCode").getter(getter(AudioSelector::languageCodeAsString)).setter(setter(Builder::languageCode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("languageCode").build()).build();
private static final SdkField OFFSET_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("Offset").getter(getter(AudioSelector::offset)).setter(setter(Builder::offset))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("offset").build()).build();
private static final SdkField> PIDS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Pids")
.getter(getter(AudioSelector::pids))
.setter(setter(Builder::pids))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("pids").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.INTEGER)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField PROGRAM_SELECTION_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("ProgramSelection").getter(getter(AudioSelector::programSelection))
.setter(setter(Builder::programSelection))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("programSelection").build()).build();
private static final SdkField REMIX_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RemixSettings")
.getter(getter(AudioSelector::remixSettings)).setter(setter(Builder::remixSettings))
.constructor(RemixSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("remixSettings").build()).build();
private static final SdkField SELECTOR_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("SelectorType").getter(getter(AudioSelector::selectorTypeAsString)).setter(setter(Builder::selectorType))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("selectorType").build()).build();
private static final SdkField> TRACKS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Tracks")
.getter(getter(AudioSelector::tracks))
.setter(setter(Builder::tracks))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tracks").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.INTEGER)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
AUDIO_DURATION_CORRECTION_FIELD, CUSTOM_LANGUAGE_CODE_FIELD, DEFAULT_SELECTION_FIELD,
EXTERNAL_AUDIO_FILE_INPUT_FIELD, HLS_RENDITION_GROUP_SETTINGS_FIELD, LANGUAGE_CODE_FIELD, OFFSET_FIELD, PIDS_FIELD,
PROGRAM_SELECTION_FIELD, REMIX_SETTINGS_FIELD, SELECTOR_TYPE_FIELD, TRACKS_FIELD));
private static final long serialVersionUID = 1L;
private final String audioDurationCorrection;
private final String customLanguageCode;
private final String defaultSelection;
private final String externalAudioFileInput;
private final HlsRenditionGroupSettings hlsRenditionGroupSettings;
private final String languageCode;
private final Integer offset;
private final List pids;
private final Integer programSelection;
private final RemixSettings remixSettings;
private final String selectorType;
private final List tracks;
private AudioSelector(BuilderImpl builder) {
this.audioDurationCorrection = builder.audioDurationCorrection;
this.customLanguageCode = builder.customLanguageCode;
this.defaultSelection = builder.defaultSelection;
this.externalAudioFileInput = builder.externalAudioFileInput;
this.hlsRenditionGroupSettings = builder.hlsRenditionGroupSettings;
this.languageCode = builder.languageCode;
this.offset = builder.offset;
this.pids = builder.pids;
this.programSelection = builder.programSelection;
this.remixSettings = builder.remixSettings;
this.selectorType = builder.selectorType;
this.tracks = builder.tracks;
}
/**
* Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections,
* your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS)
* table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default):
* Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input
* and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a
* constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch,
* and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a
* variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames.
* Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such
* as speech or percussion. * Force: Apply audio duration correction, either Track or Frame depending on your input,
* regardless of the accuracy of your input's STTS table. Your output audio and video may not be aligned or it may
* contain audio artifacts.
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #audioDurationCorrection} will return {@link AudioDurationCorrection#UNKNOWN_TO_SDK_VERSION}. The raw
* value returned by the service is available from {@link #audioDurationCorrectionAsString}.
*
*
* @return Apply audio timing corrections to help synchronize audio and video in your output. To apply timing
* corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate
* time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction
* settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert
* analyzes the audio timing in your input and determines which correction setting to use, if needed. *
* Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with
* STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content
* such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio
* frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction
* may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or
* percussion. * Force: Apply audio duration correction, either Track or Frame depending on your input,
* regardless of the accuracy of your input's STTS table. Your output audio and video may not be aligned or
* it may contain audio artifacts.
* @see AudioDurationCorrection
*/
public final AudioDurationCorrection audioDurationCorrection() {
return AudioDurationCorrection.fromValue(audioDurationCorrection);
}
/**
* Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections,
* your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS)
* table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default):
* Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input
* and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a
* constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch,
* and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a
* variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames.
* Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such
* as speech or percussion. * Force: Apply audio duration correction, either Track or Frame depending on your input,
* regardless of the accuracy of your input's STTS table. Your output audio and video may not be aligned or it may
* contain audio artifacts.
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #audioDurationCorrection} will return {@link AudioDurationCorrection#UNKNOWN_TO_SDK_VERSION}. The raw
* value returned by the service is available from {@link #audioDurationCorrectionAsString}.
*
*
* @return Apply audio timing corrections to help synchronize audio and video in your output. To apply timing
* corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate
* time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction
* settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert
* analyzes the audio timing in your input and determines which correction setting to use, if needed. *
* Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with
* STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content
* such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio
* frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction
* may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or
* percussion. * Force: Apply audio duration correction, either Track or Frame depending on your input,
* regardless of the accuracy of your input's STTS table. Your output audio and video may not be aligned or
* it may contain audio artifacts.
* @see AudioDurationCorrection
*/
public final String audioDurationCorrectionAsString() {
return audioDurationCorrection;
}
/**
* Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter
* language code
*
* @return Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3
* three-letter language code
*/
public final String customLanguageCode() {
return customLanguageCode;
}
/**
* Enable this setting on one audio selector to set it as the default for the job. The service uses this default for
* outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #defaultSelection}
* will return {@link AudioDefaultSelection#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #defaultSelectionAsString}.
*
*
* @return Enable this setting on one audio selector to set it as the default for the job. The service uses this
* default for outputs where it can't find the specified input audio. If you don't set a default, those
* outputs have no audio.
* @see AudioDefaultSelection
*/
public final AudioDefaultSelection defaultSelection() {
return AudioDefaultSelection.fromValue(defaultSelection);
}
/**
* Enable this setting on one audio selector to set it as the default for the job. The service uses this default for
* outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #defaultSelection}
* will return {@link AudioDefaultSelection#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #defaultSelectionAsString}.
*
*
* @return Enable this setting on one audio selector to set it as the default for the job. The service uses this
* default for outputs where it can't find the specified input audio. If you don't set a default, those
* outputs have no audio.
* @see AudioDefaultSelection
*/
public final String defaultSelectionAsString() {
return defaultSelection;
}
/**
* Specifies audio data from an external file source.
*
* @return Specifies audio data from an external file source.
*/
public final String externalAudioFileInput() {
return externalAudioFileInput;
}
/**
* Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId,
* renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups
* present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the
* job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video
* segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen
* instead.
*
* @return Settings specific to audio sources in an HLS alternate rendition group. Specify the properties
* (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the
* alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks
* match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are
* specified, the default audio track within the video segment is chosen. If there is no audio within video
* segment, the alternative audio with DEFAULT=YES is chosen instead.
*/
public final HlsRenditionGroupSettings hlsRenditionGroupSettings() {
return hlsRenditionGroupSettings;
}
/**
* Selects a specific language code from within an audio source.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #languageCode} will
* return {@link LanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #languageCodeAsString}.
*
*
* @return Selects a specific language code from within an audio source.
* @see LanguageCode
*/
public final LanguageCode languageCode() {
return LanguageCode.fromValue(languageCode);
}
/**
* Selects a specific language code from within an audio source.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #languageCode} will
* return {@link LanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #languageCodeAsString}.
*
*
* @return Selects a specific language code from within an audio source.
* @see LanguageCode
*/
public final String languageCodeAsString() {
return languageCode;
}
/**
* Specifies a time delta in milliseconds to offset the audio from the input video.
*
* @return Specifies a time delta in milliseconds to offset the audio from the input video.
*/
public final Integer offset() {
return offset;
}
/**
* For responses, this returns true if the service returned a value for the Pids 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 hasPids() {
return pids != null && !(pids instanceof SdkAutoConstructList);
}
/**
* Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
*
* 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 #hasPids} method.
*
*
* @return Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
*/
public final List pids() {
return pids;
}
/**
* Use this setting for input streams that contain Dolby E, to have the service extract specific program data from
* the track. To select multiple programs, create multiple selectors with the same Track and different Program
* numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number
* from the dropdown list. If your input file has incorrect metadata, you can choose All channels instead of a
* program number to have the service ignore the program IDs and include all the programs in the track.
*
* @return Use this setting for input streams that contain Dolby E, to have the service extract specific program
* data from the track. To select multiple programs, create multiple selectors with the same Track and
* different Program numbers. In the console, this setting is visible when you set Selector type to Track.
* Choose the program number from the dropdown list. If your input file has incorrect metadata, you can
* choose All channels instead of a program number to have the service ignore the program IDs and include
* all the programs in the track.
*/
public final Integer programSelection() {
return programSelection;
}
/**
* Use these settings to reorder the audio channels of one input to match those of another input. This allows you to
* combine the two files into a single output, one after the other.
*
* @return Use these settings to reorder the audio channels of one input to match those of another input. This
* allows you to combine the two files into a single output, one after the other.
*/
public final RemixSettings remixSettings() {
return remixSettings;
}
/**
* Specifies the type of the audio selector.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #selectorType} will
* return {@link AudioSelectorType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #selectorTypeAsString}.
*
*
* @return Specifies the type of the audio selector.
* @see AudioSelectorType
*/
public final AudioSelectorType selectorType() {
return AudioSelectorType.fromValue(selectorType);
}
/**
* Specifies the type of the audio selector.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #selectorType} will
* return {@link AudioSelectorType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #selectorTypeAsString}.
*
*
* @return Specifies the type of the audio selector.
* @see AudioSelectorType
*/
public final String selectorTypeAsString() {
return selectorType;
}
/**
* For responses, this returns true if the service returned a value for the Tracks 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 hasTracks() {
return tracks != null && !(tracks instanceof SdkAutoConstructList);
}
/**
* Identify a track from the input audio to include in this selector by entering the track index number. To include
* several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a
* comma-separated list. For example, type "1,2,3" to include tracks 1 through 3.
*
* 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 #hasTracks} method.
*
*
* @return Identify a track from the input audio to include in this selector by entering the track index number. To
* include several tracks in a single audio selector, specify multiple tracks as follows. Using the console,
* enter a comma-separated list. For example, type "1,2,3" to include tracks 1 through 3.
*/
public final List tracks() {
return tracks;
}
@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 final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(audioDurationCorrectionAsString());
hashCode = 31 * hashCode + Objects.hashCode(customLanguageCode());
hashCode = 31 * hashCode + Objects.hashCode(defaultSelectionAsString());
hashCode = 31 * hashCode + Objects.hashCode(externalAudioFileInput());
hashCode = 31 * hashCode + Objects.hashCode(hlsRenditionGroupSettings());
hashCode = 31 * hashCode + Objects.hashCode(languageCodeAsString());
hashCode = 31 * hashCode + Objects.hashCode(offset());
hashCode = 31 * hashCode + Objects.hashCode(hasPids() ? pids() : null);
hashCode = 31 * hashCode + Objects.hashCode(programSelection());
hashCode = 31 * hashCode + Objects.hashCode(remixSettings());
hashCode = 31 * hashCode + Objects.hashCode(selectorTypeAsString());
hashCode = 31 * hashCode + Objects.hashCode(hasTracks() ? tracks() : null);
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 AudioSelector)) {
return false;
}
AudioSelector other = (AudioSelector) obj;
return Objects.equals(audioDurationCorrectionAsString(), other.audioDurationCorrectionAsString())
&& Objects.equals(customLanguageCode(), other.customLanguageCode())
&& Objects.equals(defaultSelectionAsString(), other.defaultSelectionAsString())
&& Objects.equals(externalAudioFileInput(), other.externalAudioFileInput())
&& Objects.equals(hlsRenditionGroupSettings(), other.hlsRenditionGroupSettings())
&& Objects.equals(languageCodeAsString(), other.languageCodeAsString())
&& Objects.equals(offset(), other.offset()) && hasPids() == other.hasPids()
&& Objects.equals(pids(), other.pids()) && Objects.equals(programSelection(), other.programSelection())
&& Objects.equals(remixSettings(), other.remixSettings())
&& Objects.equals(selectorTypeAsString(), other.selectorTypeAsString()) && hasTracks() == other.hasTracks()
&& Objects.equals(tracks(), other.tracks());
}
/**
* 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("AudioSelector").add("AudioDurationCorrection", audioDurationCorrectionAsString())
.add("CustomLanguageCode", customLanguageCode()).add("DefaultSelection", defaultSelectionAsString())
.add("ExternalAudioFileInput", externalAudioFileInput())
.add("HlsRenditionGroupSettings", hlsRenditionGroupSettings()).add("LanguageCode", languageCodeAsString())
.add("Offset", offset()).add("Pids", hasPids() ? pids() : null).add("ProgramSelection", programSelection())
.add("RemixSettings", remixSettings()).add("SelectorType", selectorTypeAsString())
.add("Tracks", hasTracks() ? tracks() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AudioDurationCorrection":
return Optional.ofNullable(clazz.cast(audioDurationCorrectionAsString()));
case "CustomLanguageCode":
return Optional.ofNullable(clazz.cast(customLanguageCode()));
case "DefaultSelection":
return Optional.ofNullable(clazz.cast(defaultSelectionAsString()));
case "ExternalAudioFileInput":
return Optional.ofNullable(clazz.cast(externalAudioFileInput()));
case "HlsRenditionGroupSettings":
return Optional.ofNullable(clazz.cast(hlsRenditionGroupSettings()));
case "LanguageCode":
return Optional.ofNullable(clazz.cast(languageCodeAsString()));
case "Offset":
return Optional.ofNullable(clazz.cast(offset()));
case "Pids":
return Optional.ofNullable(clazz.cast(pids()));
case "ProgramSelection":
return Optional.ofNullable(clazz.cast(programSelection()));
case "RemixSettings":
return Optional.ofNullable(clazz.cast(remixSettings()));
case "SelectorType":
return Optional.ofNullable(clazz.cast(selectorTypeAsString()));
case "Tracks":
return Optional.ofNullable(clazz.cast(tracks()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function