/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.transcoder.v1beta1.model;

/**
 * Audio stream resource.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Transcoder API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class AudioStream extends com.google.api.client.json.GenericJson {

  /**
   * Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer bitrateBps;

  /**
   * Number of audio channels. Must be between 1 and 6. The default is 2.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer channelCount;

  /**
   * A list of channel names specifying layout of the audio channels. This only affects the metadata
   * embedded in the container headers, if supported by the specified format. The default is `["fl",
   * "fr"]`. Supported channel names: - 'fl' - Front left channel - 'fr' - Front right channel -
   * 'sl' - Side left channel - 'sr' - Side right channel - 'fc' - Front center channel - 'lfe' -
   * Low frequency
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> channelLayout;

  /**
   * The codec for this audio stream. The default is `"aac"`. Supported audio codecs: - 'aac' -
   * 'aac-he' - 'aac-he-v2' - 'mp3' - 'ac3' - 'eac3'
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String codec;

  /**
   * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<AudioAtom> mapping;

  static {
    // hack to force ProGuard to consider AudioAtom used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(AudioAtom.class);
  }

  /**
   * The audio sample rate in Hertz. The default is 48000 Hertz.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer sampleRateHertz;

  /**
   * Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getBitrateBps() {
    return bitrateBps;
  }

  /**
   * Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000.
   * @param bitrateBps bitrateBps or {@code null} for none
   */
  public AudioStream setBitrateBps(java.lang.Integer bitrateBps) {
    this.bitrateBps = bitrateBps;
    return this;
  }

  /**
   * Number of audio channels. Must be between 1 and 6. The default is 2.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getChannelCount() {
    return channelCount;
  }

  /**
   * Number of audio channels. Must be between 1 and 6. The default is 2.
   * @param channelCount channelCount or {@code null} for none
   */
  public AudioStream setChannelCount(java.lang.Integer channelCount) {
    this.channelCount = channelCount;
    return this;
  }

  /**
   * A list of channel names specifying layout of the audio channels. This only affects the metadata
   * embedded in the container headers, if supported by the specified format. The default is `["fl",
   * "fr"]`. Supported channel names: - 'fl' - Front left channel - 'fr' - Front right channel -
   * 'sl' - Side left channel - 'sr' - Side right channel - 'fc' - Front center channel - 'lfe' -
   * Low frequency
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getChannelLayout() {
    return channelLayout;
  }

  /**
   * A list of channel names specifying layout of the audio channels. This only affects the metadata
   * embedded in the container headers, if supported by the specified format. The default is `["fl",
   * "fr"]`. Supported channel names: - 'fl' - Front left channel - 'fr' - Front right channel -
   * 'sl' - Side left channel - 'sr' - Side right channel - 'fc' - Front center channel - 'lfe' -
   * Low frequency
   * @param channelLayout channelLayout or {@code null} for none
   */
  public AudioStream setChannelLayout(java.util.List<java.lang.String> channelLayout) {
    this.channelLayout = channelLayout;
    return this;
  }

  /**
   * The codec for this audio stream. The default is `"aac"`. Supported audio codecs: - 'aac' -
   * 'aac-he' - 'aac-he-v2' - 'mp3' - 'ac3' - 'eac3'
   * @return value or {@code null} for none
   */
  public java.lang.String getCodec() {
    return codec;
  }

  /**
   * The codec for this audio stream. The default is `"aac"`. Supported audio codecs: - 'aac' -
   * 'aac-he' - 'aac-he-v2' - 'mp3' - 'ac3' - 'eac3'
   * @param codec codec or {@code null} for none
   */
  public AudioStream setCodec(java.lang.String codec) {
    this.codec = codec;
    return this;
  }

  /**
   * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.
   * @return value or {@code null} for none
   */
  public java.util.List<AudioAtom> getMapping() {
    return mapping;
  }

  /**
   * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.
   * @param mapping mapping or {@code null} for none
   */
  public AudioStream setMapping(java.util.List<AudioAtom> mapping) {
    this.mapping = mapping;
    return this;
  }

  /**
   * The audio sample rate in Hertz. The default is 48000 Hertz.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getSampleRateHertz() {
    return sampleRateHertz;
  }

  /**
   * The audio sample rate in Hertz. The default is 48000 Hertz.
   * @param sampleRateHertz sampleRateHertz or {@code null} for none
   */
  public AudioStream setSampleRateHertz(java.lang.Integer sampleRateHertz) {
    this.sampleRateHertz = sampleRateHertz;
    return this;
  }

  @Override
  public AudioStream set(String fieldName, Object value) {
    return (AudioStream) super.set(fieldName, value);
  }

  @Override
  public AudioStream clone() {
    return (AudioStream) super.clone();
  }

}
