<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: websitelog.proto

namespace Gateway\Data\Rawlog;

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

/**
 * Generated from protobuf message <code>gateway.data.rawlog.UID</code>
 */
class UID extends \Google\Protobuf\Internal\Message
{
    /**
     * 用户ID
     *
     * Generated from protobuf field <code>int64 user_id = 1;</code>
     */
    private $user_id = 0;
    /**
     * 如果是MD5,此时device_id和mac_id都是MD5过的
     *
     * Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
     */
    private $type = 0;
    /**
     * based imei on android or idfa on ios
     *
     * Generated from protobuf field <code>string device_id = 3;</code>
     */
    private $device_id = '';
    /**
     * Web user id, 只有Web用户才有
     *
     * Generated from protobuf field <code>string wuid = 5;</code>
     */
    private $wuid = '';
    /**
     * web user, 来源的uid
     *
     * Generated from protobuf field <code>string refer_uid = 7;</code>
     */
    private $refer_uid = '';
    /**
     * 用户名
     *
     * Generated from protobuf field <code>string user_name = 8;</code>
     */
    private $user_name = '';
    /**
     * 是否登录(游客)
     *
     * Generated from protobuf field <code>string user_type = 9;</code>
     */
    private $user_type = '';
    /**
     * 用户bucket id
     *
     * Generated from protobuf field <code>int64 bucket_id = 10;</code>
     */
    private $bucket_id = 0;
    /**
     * 是否超级公共账号
     *
     * Generated from protobuf field <code>bool is_super_account = 11;</code>
     */
    private $is_super_account = false;
    /**
     *微信相关的MD5ID
     *
     * Generated from protobuf field <code>string wid = 12;</code>
     */
    private $wid = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $user_id
     *           用户ID
     *     @type int $type
     *           如果是MD5,此时device_id和mac_id都是MD5过的
     *     @type string $device_id
     *           based imei on android or idfa on ios
     *     @type string $wuid
     *           Web user id, 只有Web用户才有
     *     @type string $refer_uid
     *           web user, 来源的uid
     *     @type string $user_name
     *           用户名
     *     @type string $user_type
     *           是否登录(游客)
     *     @type int|string $bucket_id
     *           用户bucket id
     *     @type bool $is_super_account
     *           是否超级公共账号
     *     @type string $wid
     *          微信相关的MD5ID
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Websitelog::initOnce();
        parent::__construct($data);
    }

    /**
     * 用户ID
     *
     * Generated from protobuf field <code>int64 user_id = 1;</code>
     * @return int|string
     */
    public function getUserId()
    {
        return $this->user_id;
    }

    /**
     * 用户ID
     *
     * Generated from protobuf field <code>int64 user_id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setUserId($var)
    {
        GPBUtil::checkInt64($var);
        $this->user_id = $var;

        return $this;
    }

    /**
     * 如果是MD5,此时device_id和mac_id都是MD5过的
     *
     * Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * 如果是MD5,此时device_id和mac_id都是MD5过的
     *
     * Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Gateway\Data\Rawlog\UID_Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * based imei on android or idfa on ios
     *
     * Generated from protobuf field <code>string device_id = 3;</code>
     * @return string
     */
    public function getDeviceId()
    {
        return $this->device_id;
    }

    /**
     * based imei on android or idfa on ios
     *
     * Generated from protobuf field <code>string device_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDeviceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->device_id = $var;

        return $this;
    }

    /**
     * Web user id, 只有Web用户才有
     *
     * Generated from protobuf field <code>string wuid = 5;</code>
     * @return string
     */
    public function getWuid()
    {
        return $this->wuid;
    }

    /**
     * Web user id, 只有Web用户才有
     *
     * Generated from protobuf field <code>string wuid = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setWuid($var)
    {
        GPBUtil::checkString($var, True);
        $this->wuid = $var;

        return $this;
    }

    /**
     * web user, 来源的uid
     *
     * Generated from protobuf field <code>string refer_uid = 7;</code>
     * @return string
     */
    public function getReferUid()
    {
        return $this->refer_uid;
    }

    /**
     * web user, 来源的uid
     *
     * Generated from protobuf field <code>string refer_uid = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setReferUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->refer_uid = $var;

        return $this;
    }

    /**
     * 用户名
     *
     * Generated from protobuf field <code>string user_name = 8;</code>
     * @return string
     */
    public function getUserName()
    {
        return $this->user_name;
    }

    /**
     * 用户名
     *
     * Generated from protobuf field <code>string user_name = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setUserName($var)
    {
        GPBUtil::checkString($var, True);
        $this->user_name = $var;

        return $this;
    }

    /**
     * 是否登录(游客)
     *
     * Generated from protobuf field <code>string user_type = 9;</code>
     * @return string
     */
    public function getUserType()
    {
        return $this->user_type;
    }

    /**
     * 是否登录(游客)
     *
     * Generated from protobuf field <code>string user_type = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setUserType($var)
    {
        GPBUtil::checkString($var, True);
        $this->user_type = $var;

        return $this;
    }

    /**
     * 用户bucket id
     *
     * Generated from protobuf field <code>int64 bucket_id = 10;</code>
     * @return int|string
     */
    public function getBucketId()
    {
        return $this->bucket_id;
    }

    /**
     * 用户bucket id
     *
     * Generated from protobuf field <code>int64 bucket_id = 10;</code>
     * @param int|string $var
     * @return $this
     */
    public function setBucketId($var)
    {
        GPBUtil::checkInt64($var);
        $this->bucket_id = $var;

        return $this;
    }

    /**
     * 是否超级公共账号
     *
     * Generated from protobuf field <code>bool is_super_account = 11;</code>
     * @return bool
     */
    public function getIsSuperAccount()
    {
        return $this->is_super_account;
    }

    /**
     * 是否超级公共账号
     *
     * Generated from protobuf field <code>bool is_super_account = 11;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsSuperAccount($var)
    {
        GPBUtil::checkBool($var);
        $this->is_super_account = $var;

        return $this;
    }

    /**
     *微信相关的MD5ID
     *
     * Generated from protobuf field <code>string wid = 12;</code>
     * @return string
     */
    public function getWid()
    {
        return $this->wid;
    }

    /**
     *微信相关的MD5ID
     *
     * Generated from protobuf field <code>string wid = 12;</code>
     * @param string $var
     * @return $this
     */
    public function setWid($var)
    {
        GPBUtil::checkString($var, True);
        $this->wid = $var;

        return $this;
    }

}

