<?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 video stream.
 *
 * Generated from protobuf message <code>google.cloud.video.livestream.v1.VideoStreamProperty</code>
 */
class VideoStreamProperty extends \Google\Protobuf\Internal\Message
{
    /**
     * Index of this video stream.
     *
     * Generated from protobuf field <code>int32 index = 1;</code>
     */
    private $index = 0;
    /**
     * Properties of the video format.
     *
     * Generated from protobuf field <code>.google.cloud.video.livestream.v1.VideoFormat video_format = 2;</code>
     */
    private $video_format = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $index
     *           Index of this video stream.
     *     @type \Google\Cloud\Video\LiveStream\V1\VideoFormat $video_format
     *           Properties of the video format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Index of this video stream.
     *
     * Generated from protobuf field <code>int32 index = 1;</code>
     * @return int
     */
    public function getIndex()
    {
        return $this->index;
    }

    /**
     * Index of this video stream.
     *
     * Generated from protobuf field <code>int32 index = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->index = $var;

        return $this;
    }

    /**
     * Properties of the video format.
     *
     * Generated from protobuf field <code>.google.cloud.video.livestream.v1.VideoFormat video_format = 2;</code>
     * @return \Google\Cloud\Video\LiveStream\V1\VideoFormat|null
     */
    public function getVideoFormat()
    {
        return $this->video_format;
    }

    public function hasVideoFormat()
    {
        return isset($this->video_format);
    }

    public function clearVideoFormat()
    {
        unset($this->video_format);
    }

    /**
     * Properties of the video format.
     *
     * Generated from protobuf field <code>.google.cloud.video.livestream.v1.VideoFormat video_format = 2;</code>
     * @param \Google\Cloud\Video\LiveStream\V1\VideoFormat $var
     * @return $this
     */
    public function setVideoFormat($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoFormat::class);
        $this->video_format = $var;

        return $this;
    }

}

