<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/video/livestream/v1/outputs.proto

namespace Google\Cloud\Video\LiveStream\V1\AudioStream;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The mapping for the input streams and audio channels.
 *
 * Generated from protobuf message <code>google.cloud.video.livestream.v1.AudioStream.AudioMapping</code>
 */
class AudioMapping extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The `Channel` [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] that identifies the input that this
     * audio mapping applies to. If an active input doesn't have an audio
     * mapping, the primary audio track in the input stream will be selected.
     *
     * Generated from protobuf field <code>string input_key = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $input_key = '';
    /**
     * Required. The zero-based index of the track in the input stream.
     * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in the same [AudioStream][google.cloud.video.livestream.v1.AudioStream]
     * must have the same input track.
     *
     * Generated from protobuf field <code>int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $input_track = 0;
    /**
     * Required. The zero-based index of the channel in the input stream.
     *
     * Generated from protobuf field <code>int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $input_channel = 0;
    /**
     * Required. The zero-based index of the channel in the output audio stream.
     * Must be consistent with the [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel].
     *
     * Generated from protobuf field <code>int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $output_channel = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $input_key
     *           Required. The `Channel` [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] that identifies the input that this
     *           audio mapping applies to. If an active input doesn't have an audio
     *           mapping, the primary audio track in the input stream will be selected.
     *     @type int $input_track
     *           Required. The zero-based index of the track in the input stream.
     *           All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in the same [AudioStream][google.cloud.video.livestream.v1.AudioStream]
     *           must have the same input track.
     *     @type int $input_channel
     *           Required. The zero-based index of the channel in the input stream.
     *     @type int $output_channel
     *           Required. The zero-based index of the channel in the output audio stream.
     *           Must be consistent with the [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The `Channel` [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] that identifies the input that this
     * audio mapping applies to. If an active input doesn't have an audio
     * mapping, the primary audio track in the input stream will be selected.
     *
     * Generated from protobuf field <code>string input_key = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getInputKey()
    {
        return $this->input_key;
    }

    /**
     * Required. The `Channel` [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] that identifies the input that this
     * audio mapping applies to. If an active input doesn't have an audio
     * mapping, the primary audio track in the input stream will be selected.
     *
     * Generated from protobuf field <code>string input_key = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setInputKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->input_key = $var;

        return $this;
    }

    /**
     * Required. The zero-based index of the track in the input stream.
     * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in the same [AudioStream][google.cloud.video.livestream.v1.AudioStream]
     * must have the same input track.
     *
     * Generated from protobuf field <code>int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getInputTrack()
    {
        return $this->input_track;
    }

    /**
     * Required. The zero-based index of the track in the input stream.
     * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in the same [AudioStream][google.cloud.video.livestream.v1.AudioStream]
     * must have the same input track.
     *
     * Generated from protobuf field <code>int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setInputTrack($var)
    {
        GPBUtil::checkInt32($var);
        $this->input_track = $var;

        return $this;
    }

    /**
     * Required. The zero-based index of the channel in the input stream.
     *
     * Generated from protobuf field <code>int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getInputChannel()
    {
        return $this->input_channel;
    }

    /**
     * Required. The zero-based index of the channel in the input stream.
     *
     * Generated from protobuf field <code>int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setInputChannel($var)
    {
        GPBUtil::checkInt32($var);
        $this->input_channel = $var;

        return $this;
    }

    /**
     * Required. The zero-based index of the channel in the output audio stream.
     * Must be consistent with the [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel].
     *
     * Generated from protobuf field <code>int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getOutputChannel()
    {
        return $this->output_channel;
    }

    /**
     * Required. The zero-based index of the channel in the output audio stream.
     * Must be consistent with the [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel].
     *
     * Generated from protobuf field <code>int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setOutputChannel($var)
    {
        GPBUtil::checkInt32($var);
        $this->output_channel = $var;

        return $this;
    }

}


