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

namespace Google\Cloud\Video\Transcoder\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.transcoder.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\Transcoder\V1\VideoStream\H264CodecSettings $h264
     *           H264 codec settings.
     *     @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $h265
     *           H265 codec settings.
     *     @type \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $vp9
     *           VP9 codec settings.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce();
        parent::__construct($data);
    }

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

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

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

        return $this;
    }

    /**
     * H265 codec settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2;</code>
     * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings|null
     */
    public function getH265()
    {
        return $this->readOneof(2);
    }

    public function hasH265()
    {
        return $this->hasOneof(2);
    }

    /**
     * H265 codec settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2;</code>
     * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $var
     * @return $this
     */
    public function setH265($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * VP9 codec settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3;</code>
     * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings|null
     */
    public function getVp9()
    {
        return $this->readOneof(3);
    }

    public function hasVp9()
    {
        return $this->hasOneof(3);
    }

    /**
     * VP9 codec settings.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3;</code>
     * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $var
     * @return $this
     */
    public function setVp9($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

}

