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

namespace Google\Cloud\Video\LiveStream\V1;

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

/**
 * Properties of the audio format.
 *
 * Generated from protobuf message <code>google.cloud.video.livestream.v1.AudioFormat</code>
 */
class AudioFormat extends \Google\Protobuf\Internal\Message
{
    /**
     * Audio codec used in this audio stream.
     *
     * Generated from protobuf field <code>string codec = 1;</code>
     */
    private $codec = '';
    /**
     * The number of audio channels.
     *
     * Generated from protobuf field <code>int32 channel_count = 2;</code>
     */
    private $channel_count = 0;
    /**
     * A list of channel names specifying the layout of the audio channels.
     *
     * Generated from protobuf field <code>repeated string channel_layout = 3;</code>
     */
    private $channel_layout;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $codec
     *           Audio codec used in this audio stream.
     *     @type int $channel_count
     *           The number of audio channels.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $channel_layout
     *           A list of channel names specifying the layout of the audio channels.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Audio codec used in this audio stream.
     *
     * Generated from protobuf field <code>string codec = 1;</code>
     * @return string
     */
    public function getCodec()
    {
        return $this->codec;
    }

    /**
     * Audio codec used in this audio stream.
     *
     * Generated from protobuf field <code>string codec = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCodec($var)
    {
        GPBUtil::checkString($var, True);
        $this->codec = $var;

        return $this;
    }

    /**
     * The number of audio channels.
     *
     * Generated from protobuf field <code>int32 channel_count = 2;</code>
     * @return int
     */
    public function getChannelCount()
    {
        return $this->channel_count;
    }

    /**
     * The number of audio channels.
     *
     * Generated from protobuf field <code>int32 channel_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setChannelCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->channel_count = $var;

        return $this;
    }

    /**
     * A list of channel names specifying the layout of the audio channels.
     *
     * Generated from protobuf field <code>repeated string channel_layout = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getChannelLayout()
    {
        return $this->channel_layout;
    }

    /**
     * A list of channel names specifying the layout of the audio channels.
     *
     * Generated from protobuf field <code>repeated string channel_layout = 3;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setChannelLayout($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->channel_layout = $arr;

        return $this;
    }

}

