
software.amazon.awssdk.services.mediaconvert.model.WebvttHlsSourceSettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mediaconvert Show documentation
Show all versions of mediaconvert Show documentation
The AWS Java SDK for AWS Elemental MediaConvert module holds the client classes that are used for
communicating
with AWS Elemental MediaConvert 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.mediaconvert.model;
import java.io.Serializable;
import java.util.Arrays;
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.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* Settings specific to WebVTT sources in HLS alternative rendition group. Specify the properties (renditionGroupId,
* renditionName or renditionLanguageCode) to identify the unique subtitle track among the alternative rendition groups
* present in the HLS manifest. If no unique track is found, or multiple tracks match the specified properties, the job
* fails. If there is only one subtitle track in the rendition group, the settings can be left empty and the default
* subtitle track will be chosen. If your caption source is a sidecar file, use FileSourceSettings instead of
* WebvttHlsSourceSettings.
*/
@Generated("software.amazon.awssdk:codegen")
public final class WebvttHlsSourceSettings implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField RENDITION_GROUP_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RenditionGroupId").getter(getter(WebvttHlsSourceSettings::renditionGroupId))
.setter(setter(Builder::renditionGroupId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("renditionGroupId").build()).build();
private static final SdkField RENDITION_LANGUAGE_CODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RenditionLanguageCode").getter(getter(WebvttHlsSourceSettings::renditionLanguageCodeAsString))
.setter(setter(Builder::renditionLanguageCode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("renditionLanguageCode").build())
.build();
private static final SdkField RENDITION_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RenditionName").getter(getter(WebvttHlsSourceSettings::renditionName))
.setter(setter(Builder::renditionName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("renditionName").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(RENDITION_GROUP_ID_FIELD,
RENDITION_LANGUAGE_CODE_FIELD, RENDITION_NAME_FIELD));
private static final long serialVersionUID = 1L;
private final String renditionGroupId;
private final String renditionLanguageCode;
private final String renditionName;
private WebvttHlsSourceSettings(BuilderImpl builder) {
this.renditionGroupId = builder.renditionGroupId;
this.renditionLanguageCode = builder.renditionLanguageCode;
this.renditionName = builder.renditionName;
}
/**
* Optional. Specify alternative group ID
*
* @return Optional. Specify alternative group ID
*/
public final String renditionGroupId() {
return renditionGroupId;
}
/**
* Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #renditionLanguageCode} will return {@link LanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by
* the service is available from {@link #renditionLanguageCodeAsString}.
*
*
* @return Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
* @see LanguageCode
*/
public final LanguageCode renditionLanguageCode() {
return LanguageCode.fromValue(renditionLanguageCode);
}
/**
* Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #renditionLanguageCode} will return {@link LanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by
* the service is available from {@link #renditionLanguageCodeAsString}.
*
*
* @return Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
* @see LanguageCode
*/
public final String renditionLanguageCodeAsString() {
return renditionLanguageCode;
}
/**
* Optional. Specify media name
*
* @return Optional. Specify media name
*/
public final String renditionName() {
return renditionName;
}
@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(renditionGroupId());
hashCode = 31 * hashCode + Objects.hashCode(renditionLanguageCodeAsString());
hashCode = 31 * hashCode + Objects.hashCode(renditionName());
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 WebvttHlsSourceSettings)) {
return false;
}
WebvttHlsSourceSettings other = (WebvttHlsSourceSettings) obj;
return Objects.equals(renditionGroupId(), other.renditionGroupId())
&& Objects.equals(renditionLanguageCodeAsString(), other.renditionLanguageCodeAsString())
&& Objects.equals(renditionName(), other.renditionName());
}
/**
* 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("WebvttHlsSourceSettings").add("RenditionGroupId", renditionGroupId())
.add("RenditionLanguageCode", renditionLanguageCodeAsString()).add("RenditionName", renditionName()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "RenditionGroupId":
return Optional.ofNullable(clazz.cast(renditionGroupId()));
case "RenditionLanguageCode":
return Optional.ofNullable(clazz.cast(renditionLanguageCodeAsString()));
case "RenditionName":
return Optional.ofNullable(clazz.cast(renditionName()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy