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

namespace Google\Cloud\Video\LiveStream\V1;

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

/**
 * Video stream resource.
 *
 * Generated from protobuf message <code>google.cloud.video.livestream.v1.VideoStream</code>
 */
class VideoStream extends \Google\Protobuf\Internal\Message
{
    protected $codec_settings;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $h264
     *           H264 codec settings.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce();
        parent::__construct($data);
    }

    /**
     * H264 codec settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20;</code>
     * @return \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings|null
     */
    public function getH264()
    {
        return $this->readOneof(20);
    }

    public function hasH264()
    {
        return $this->hasOneof(20);
    }

    /**
     * H264 codec settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20;</code>
     * @param \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $var
     * @return $this
     */
    public function setH264($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings::class);
        $this->writeOneof(20, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getCodecSettings()
    {
        return $this->whichOneof("codec_settings");
    }

}

