<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: advertisementGroup.proto

namespace Rv\Data;

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

/**
 * Generated from protobuf message <code>rv.data.AdvertisementGroup</code>
 */
class AdvertisementGroup extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.data.UUID id = 1;</code>
     */
    protected $id = null;
    /**
     * Generated from protobuf field <code>string name = 2;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>.rv.data.URL url = 3;</code>
     */
    protected $url = null;
    /**
     * Generated from protobuf field <code>int32 start_index = 4;</code>
     */
    protected $start_index = 0;
    /**
     * Generated from protobuf field <code>double duration = 5;</code>
     */
    protected $duration = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\UUID $id
     *     @type string $name
     *     @type \Rv\Data\URL $url
     *     @type int $start_index
     *     @type float $duration
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\AdvertisementGroup::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.UUID id = 1;</code>
     * @return \Rv\Data\UUID|null
     */
    public function getId()
    {
        return $this->id;
    }

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

    /**
     * Generated from protobuf field <code>.rv.data.UUID id = 1;</code>
     * @param \Rv\Data\UUID $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\UUID::class);
        $this->id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string name = 2;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Generated from protobuf field <code>string name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.URL url = 3;</code>
     * @return \Rv\Data\URL|null
     */
    public function getUrl()
    {
        return $this->url;
    }

    public function hasUrl()
    {
        return isset($this->url);
    }

    public function clearUrl()
    {
        unset($this->url);
    }

    /**
     * Generated from protobuf field <code>.rv.data.URL url = 3;</code>
     * @param \Rv\Data\URL $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\URL::class);
        $this->url = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int32 start_index = 4;</code>
     * @return int
     */
    public function getStartIndex()
    {
        return $this->start_index;
    }

    /**
     * Generated from protobuf field <code>int32 start_index = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setStartIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->start_index = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>double duration = 5;</code>
     * @return float
     */
    public function getDuration()
    {
        return $this->duration;
    }

    /**
     * Generated from protobuf field <code>double duration = 5;</code>
     * @param float $var
     * @return $this
     */
    public function setDuration($var)
    {
        GPBUtil::checkDouble($var);
        $this->duration = $var;

        return $this;
    }

}

