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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.AIRichResponseDynamicMetadata</code>
 */
class AIRichResponseDynamicMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType type = 1;</code>
     */
    protected $type = null;
    /**
     * Generated from protobuf field <code>optional uint64 version = 2;</code>
     */
    protected $version = null;
    /**
     * Generated from protobuf field <code>optional string url = 3;</code>
     */
    protected $url = null;
    /**
     * Generated from protobuf field <code>optional uint32 loopCount = 4;</code>
     */
    protected $loopCount = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *     @type int|string $version
     *     @type string $url
     *     @type int $loopCount
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return isset($this->type) ? $this->type : 0;
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\AIRichResponseDynamicMetadata\AIRichResponseDynamicMetadataType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint64 version = 2;</code>
     * @return int|string
     */
    public function getVersion()
    {
        return isset($this->version) ? $this->version : 0;
    }

    public function hasVersion()
    {
        return isset($this->version);
    }

    public function clearVersion()
    {
        unset($this->version);
    }

    /**
     * Generated from protobuf field <code>optional uint64 version = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkUint64($var);
        $this->version = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string url = 3;</code>
     * @return string
     */
    public function getUrl()
    {
        return isset($this->url) ? $this->url : '';
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 loopCount = 4;</code>
     * @return int
     */
    public function getLoopCount()
    {
        return isset($this->loopCount) ? $this->loopCount : 0;
    }

    public function hasLoopCount()
    {
        return isset($this->loopCount);
    }

    public function clearLoopCount()
    {
        unset($this->loopCount);
    }

    /**
     * Generated from protobuf field <code>optional uint32 loopCount = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setLoopCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->loopCount = $var;

        return $this;
    }

}

