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

namespace Mynaparrot\PlugnmeetProto;

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

/**
 * Generated from protobuf message <code>plugnmeet.AnalyticsUserInfo</code>
 */
class AnalyticsUserInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string user_id = 1;</code>
     */
    protected $user_id = '';
    /**
     * Generated from protobuf field <code>string name = 2;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>bool is_admin = 3;</code>
     */
    protected $is_admin = false;
    /**
     * Generated from protobuf field <code>optional string extra_data = 4;</code>
     */
    protected $extra_data = null;
    /**
     * Generated from protobuf field <code>optional string ex_user_id = 5;</code>
     */
    protected $ex_user_id = null;
    /**
     * Generated from protobuf field <code>repeated .plugnmeet.AnalyticsEventData events = 6;</code>
     */
    private $events;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $user_id
     *     @type string $name
     *     @type bool $is_admin
     *     @type string $extra_data
     *     @type string $ex_user_id
     *     @type \Mynaparrot\PlugnmeetProto\AnalyticsEventData[] $events
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\PlugnmeetAnalytics::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Generated from protobuf field <code>string user_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setUserId($var)
    {
        GPBUtil::checkString($var, True);
        $this->user_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>bool is_admin = 3;</code>
     * @return bool
     */
    public function getIsAdmin()
    {
        return $this->is_admin;
    }

    /**
     * Generated from protobuf field <code>bool is_admin = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsAdmin($var)
    {
        GPBUtil::checkBool($var);
        $this->is_admin = $var;

        return $this;
    }

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

    public function hasExtraData()
    {
        return isset($this->extra_data);
    }

    public function clearExtraData()
    {
        unset($this->extra_data);
    }

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

        return $this;
    }

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

    public function hasExUserId()
    {
        return isset($this->ex_user_id);
    }

    public function clearExUserId()
    {
        unset($this->ex_user_id);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .plugnmeet.AnalyticsEventData events = 6;</code>
     * @return RepeatedField<\Mynaparrot\PlugnmeetProto\AnalyticsEventData>
     */
    public function getEvents()
    {
        return $this->events;
    }

    /**
     * Generated from protobuf field <code>repeated .plugnmeet.AnalyticsEventData events = 6;</code>
     * @param \Mynaparrot\PlugnmeetProto\AnalyticsEventData[] $var
     * @return $this
     */
    public function setEvents($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Mynaparrot\PlugnmeetProto\AnalyticsEventData::class);
        $this->events = $arr;

        return $this;
    }

}

