<?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 format.
 *
 * Generated from protobuf message <code>google.cloud.video.livestream.v1.VideoFormat</code>
 */
class VideoFormat extends \Google\Protobuf\Internal\Message
{
    /**
     * Video codec used in this video stream.
     *
     * Generated from protobuf field <code>string codec = 1;</code>
     */
    private $codec = '';
    /**
     * The width of the video stream in pixels.
     *
     * Generated from protobuf field <code>int32 width_pixels = 2;</code>
     */
    private $width_pixels = 0;
    /**
     * The height of the video stream in pixels.
     *
     * Generated from protobuf field <code>int32 height_pixels = 3;</code>
     */
    private $height_pixels = 0;
    /**
     * The frame rate of the input video stream.
     *
     * Generated from protobuf field <code>double frame_rate = 4;</code>
     */
    private $frame_rate = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $codec
     *           Video codec used in this video stream.
     *     @type int $width_pixels
     *           The width of the video stream in pixels.
     *     @type int $height_pixels
     *           The height of the video stream in pixels.
     *     @type float $frame_rate
     *           The frame rate of the input video stream.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Video codec used in this video 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 width of the video stream in pixels.
     *
     * Generated from protobuf field <code>int32 width_pixels = 2;</code>
     * @return int
     */
    public function getWidthPixels()
    {
        return $this->width_pixels;
    }

    /**
     * The width of the video stream in pixels.
     *
     * Generated from protobuf field <code>int32 width_pixels = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setWidthPixels($var)
    {
        GPBUtil::checkInt32($var);
        $this->width_pixels = $var;

        return $this;
    }

    /**
     * The height of the video stream in pixels.
     *
     * Generated from protobuf field <code>int32 height_pixels = 3;</code>
     * @return int
     */
    public function getHeightPixels()
    {
        return $this->height_pixels;
    }

    /**
     * The height of the video stream in pixels.
     *
     * Generated from protobuf field <code>int32 height_pixels = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setHeightPixels($var)
    {
        GPBUtil::checkInt32($var);
        $this->height_pixels = $var;

        return $this;
    }

    /**
     * The frame rate of the input video stream.
     *
     * Generated from protobuf field <code>double frame_rate = 4;</code>
     * @return float
     */
    public function getFrameRate()
    {
        return $this->frame_rate;
    }

    /**
     * The frame rate of the input video stream.
     *
     * Generated from protobuf field <code>double frame_rate = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setFrameRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->frame_rate = $var;

        return $this;
    }

}

