
software.amazon.awssdk.services.medialive.model.AudioCodecSettings 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.medialive.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.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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* Audio Codec Settings
*/
@Generated("software.amazon.awssdk:codegen")
public final class AudioCodecSettings implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField AAC_SETTINGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("AacSettings").getter(getter(AudioCodecSettings::aacSettings)).setter(setter(Builder::aacSettings))
.constructor(AacSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("aacSettings").build()).build();
private static final SdkField AC3_SETTINGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Ac3Settings").getter(getter(AudioCodecSettings::ac3Settings)).setter(setter(Builder::ac3Settings))
.constructor(Ac3Settings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ac3Settings").build()).build();
private static final SdkField EAC3_ATMOS_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("Eac3AtmosSettings")
.getter(getter(AudioCodecSettings::eac3AtmosSettings)).setter(setter(Builder::eac3AtmosSettings))
.constructor(Eac3AtmosSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("eac3AtmosSettings").build()).build();
private static final SdkField EAC3_SETTINGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Eac3Settings").getter(getter(AudioCodecSettings::eac3Settings)).setter(setter(Builder::eac3Settings))
.constructor(Eac3Settings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("eac3Settings").build()).build();
private static final SdkField MP2_SETTINGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Mp2Settings").getter(getter(AudioCodecSettings::mp2Settings)).setter(setter(Builder::mp2Settings))
.constructor(Mp2Settings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("mp2Settings").build()).build();
private static final SdkField PASS_THROUGH_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("PassThroughSettings")
.getter(getter(AudioCodecSettings::passThroughSettings)).setter(setter(Builder::passThroughSettings))
.constructor(PassThroughSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("passThroughSettings").build())
.build();
private static final SdkField WAV_SETTINGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("WavSettings").getter(getter(AudioCodecSettings::wavSettings)).setter(setter(Builder::wavSettings))
.constructor(WavSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("wavSettings").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AAC_SETTINGS_FIELD,
AC3_SETTINGS_FIELD, EAC3_ATMOS_SETTINGS_FIELD, EAC3_SETTINGS_FIELD, MP2_SETTINGS_FIELD, PASS_THROUGH_SETTINGS_FIELD,
WAV_SETTINGS_FIELD));
private static final long serialVersionUID = 1L;
private final AacSettings aacSettings;
private final Ac3Settings ac3Settings;
private final Eac3AtmosSettings eac3AtmosSettings;
private final Eac3Settings eac3Settings;
private final Mp2Settings mp2Settings;
private final PassThroughSettings passThroughSettings;
private final WavSettings wavSettings;
private AudioCodecSettings(BuilderImpl builder) {
this.aacSettings = builder.aacSettings;
this.ac3Settings = builder.ac3Settings;
this.eac3AtmosSettings = builder.eac3AtmosSettings;
this.eac3Settings = builder.eac3Settings;
this.mp2Settings = builder.mp2Settings;
this.passThroughSettings = builder.passThroughSettings;
this.wavSettings = builder.wavSettings;
}
/**
* Returns the value of the AacSettings property for this object.
*
* @return The value of the AacSettings property for this object.
*/
public final AacSettings aacSettings() {
return aacSettings;
}
/**
* Returns the value of the Ac3Settings property for this object.
*
* @return The value of the Ac3Settings property for this object.
*/
public final Ac3Settings ac3Settings() {
return ac3Settings;
}
/**
* Returns the value of the Eac3AtmosSettings property for this object.
*
* @return The value of the Eac3AtmosSettings property for this object.
*/
public final Eac3AtmosSettings eac3AtmosSettings() {
return eac3AtmosSettings;
}
/**
* Returns the value of the Eac3Settings property for this object.
*
* @return The value of the Eac3Settings property for this object.
*/
public final Eac3Settings eac3Settings() {
return eac3Settings;
}
/**
* Returns the value of the Mp2Settings property for this object.
*
* @return The value of the Mp2Settings property for this object.
*/
public final Mp2Settings mp2Settings() {
return mp2Settings;
}
/**
* Returns the value of the PassThroughSettings property for this object.
*
* @return The value of the PassThroughSettings property for this object.
*/
public final PassThroughSettings passThroughSettings() {
return passThroughSettings;
}
/**
* Returns the value of the WavSettings property for this object.
*
* @return The value of the WavSettings property for this object.
*/
public final WavSettings wavSettings() {
return wavSettings;
}
@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(aacSettings());
hashCode = 31 * hashCode + Objects.hashCode(ac3Settings());
hashCode = 31 * hashCode + Objects.hashCode(eac3AtmosSettings());
hashCode = 31 * hashCode + Objects.hashCode(eac3Settings());
hashCode = 31 * hashCode + Objects.hashCode(mp2Settings());
hashCode = 31 * hashCode + Objects.hashCode(passThroughSettings());
hashCode = 31 * hashCode + Objects.hashCode(wavSettings());
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 AudioCodecSettings)) {
return false;
}
AudioCodecSettings other = (AudioCodecSettings) obj;
return Objects.equals(aacSettings(), other.aacSettings()) && Objects.equals(ac3Settings(), other.ac3Settings())
&& Objects.equals(eac3AtmosSettings(), other.eac3AtmosSettings())
&& Objects.equals(eac3Settings(), other.eac3Settings()) && Objects.equals(mp2Settings(), other.mp2Settings())
&& Objects.equals(passThroughSettings(), other.passThroughSettings())
&& Objects.equals(wavSettings(), other.wavSettings());
}
/**
* 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("AudioCodecSettings").add("AacSettings", aacSettings()).add("Ac3Settings", ac3Settings())
.add("Eac3AtmosSettings", eac3AtmosSettings()).add("Eac3Settings", eac3Settings())
.add("Mp2Settings", mp2Settings()).add("PassThroughSettings", passThroughSettings())
.add("WavSettings", wavSettings()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AacSettings":
return Optional.ofNullable(clazz.cast(aacSettings()));
case "Ac3Settings":
return Optional.ofNullable(clazz.cast(ac3Settings()));
case "Eac3AtmosSettings":
return Optional.ofNullable(clazz.cast(eac3AtmosSettings()));
case "Eac3Settings":
return Optional.ofNullable(clazz.cast(eac3Settings()));
case "Mp2Settings":
return Optional.ofNullable(clazz.cast(mp2Settings()));
case "PassThroughSettings":
return Optional.ofNullable(clazz.cast(passThroughSettings()));
case "WavSettings":
return Optional.ofNullable(clazz.cast(wavSettings()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy