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

namespace Google\Cloud\Video\Stitcher\V1\LiveSession;

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

/**
 * Defines fields related to Google Ad Manager (GAM). This should be set if
 * GAM
 * is being used for ads.
 *
 * Generated from protobuf message <code>google.cloud.video.stitcher.v1.LiveSession.GamSettings</code>
 */
class GamSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The stream ID generated by Ad Manager.
     *
     * Generated from protobuf field <code>string stream_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $stream_id = '';
    protected $manifest_fields;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings\GamHls $gam_hls
     *           Fields that are specific to HLS manifests.
     *     @type \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings\GamDash $gam_dash
     *           Fields that are specific to DASH manifests.
     *     @type string $stream_id
     *           Required. The stream ID generated by Ad Manager.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce();
        parent::__construct($data);
    }

    /**
     * Fields that are specific to HLS manifests.
     *
     * Generated from protobuf field <code>.google.cloud.video.stitcher.v1.LiveSession.GamSettings.GamHls gam_hls = 2;</code>
     * @return \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings\GamHls|null
     */
    public function getGamHls()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Fields that are specific to HLS manifests.
     *
     * Generated from protobuf field <code>.google.cloud.video.stitcher.v1.LiveSession.GamSettings.GamHls gam_hls = 2;</code>
     * @param \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings\GamHls $var
     * @return $this
     */
    public function setGamHls($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings\GamHls::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Fields that are specific to DASH manifests.
     *
     * Generated from protobuf field <code>.google.cloud.video.stitcher.v1.LiveSession.GamSettings.GamDash gam_dash = 3;</code>
     * @return \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings\GamDash|null
     */
    public function getGamDash()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Fields that are specific to DASH manifests.
     *
     * Generated from protobuf field <code>.google.cloud.video.stitcher.v1.LiveSession.GamSettings.GamDash gam_dash = 3;</code>
     * @param \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings\GamDash $var
     * @return $this
     */
    public function setGamDash($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings\GamDash::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Required. The stream ID generated by Ad Manager.
     *
     * Generated from protobuf field <code>string stream_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getStreamId()
    {
        return $this->stream_id;
    }

    /**
     * Required. The stream ID generated by Ad Manager.
     *
     * Generated from protobuf field <code>string stream_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setStreamId($var)
    {
        GPBUtil::checkString($var, True);
        $this->stream_id = $var;

        return $this;
    }

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

}


