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

namespace PhpWA\Protocol\Proto\ClientPayload;

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

/**
 * Generated from protobuf message <code>proto.ClientPayload.WebInfo</code>
 */
class WebInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string refToken = 1;</code>
     */
    protected $refToken = null;
    /**
     * Generated from protobuf field <code>optional string version = 2;</code>
     */
    protected $version = null;
    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.WebInfo.WebdPayload webdPayload = 3;</code>
     */
    protected $webdPayload = null;
    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.WebInfo.WebSubPlatform webSubPlatform = 4;</code>
     */
    protected $webSubPlatform = null;

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

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

    public function hasRefToken()
    {
        return isset($this->refToken);
    }

    public function clearRefToken()
    {
        unset($this->refToken);
    }

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

        return $this;
    }

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

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.WebInfo.WebdPayload webdPayload = 3;</code>
     * @return \PhpWA\Protocol\Proto\ClientPayload\WebInfo\WebdPayload|null
     */
    public function getWebdPayload()
    {
        return $this->webdPayload;
    }

    public function hasWebdPayload()
    {
        return isset($this->webdPayload);
    }

    public function clearWebdPayload()
    {
        unset($this->webdPayload);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.WebInfo.WebdPayload webdPayload = 3;</code>
     * @param \PhpWA\Protocol\Proto\ClientPayload\WebInfo\WebdPayload $var
     * @return $this
     */
    public function setWebdPayload($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ClientPayload\WebInfo\WebdPayload::class);
        $this->webdPayload = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.WebInfo.WebSubPlatform webSubPlatform = 4;</code>
     * @return int
     */
    public function getWebSubPlatform()
    {
        return isset($this->webSubPlatform) ? $this->webSubPlatform : 0;
    }

    public function hasWebSubPlatform()
    {
        return isset($this->webSubPlatform);
    }

    public function clearWebSubPlatform()
    {
        unset($this->webSubPlatform);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.WebInfo.WebSubPlatform webSubPlatform = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setWebSubPlatform($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\ClientPayload\WebInfo\WebSubPlatform::class);
        $this->webSubPlatform = $var;

        return $this;
    }

}

