<?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.AnalyticsDataMsg</code>
 */
class AnalyticsDataMsg extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.plugnmeet.AnalyticsEventType event_type = 1;</code>
     */
    protected $event_type = 0;
    /**
     * Generated from protobuf field <code>.plugnmeet.AnalyticsEvents event_name = 2;</code>
     */
    protected $event_name = 0;
    /**
     * Generated from protobuf field <code>string room_id = 3;</code>
     */
    protected $room_id = '';
    /**
     * should be unix milliseconds
     *
     * Generated from protobuf field <code>int64 time = 4;</code>
     */
    protected $time = 0;
    /**
     * if we pass value here then it will use redis SET to set the value for the key
     *
     * Generated from protobuf field <code>optional string event_value_string = 5;</code>
     */
    protected $event_value_string = null;
    /**
     * if we pass value here then it will use redis INCRBY to increment value for the key
     *
     * Generated from protobuf field <code>optional int64 event_value_integer = 6;</code>
     */
    protected $event_value_integer = null;
    /**
     * if we pass value here then it will use redis HSET to set hash field value for the key
     * hash field will be unix milliseconds, so it will remain unique as always
     *
     * Generated from protobuf field <code>optional string hset_value = 7;</code>
     */
    protected $hset_value = null;
    /**
     * Generated from protobuf field <code>optional string room_sid = 8;</code>
     */
    protected $room_sid = null;
    /**
     * Generated from protobuf field <code>optional string user_id = 9;</code>
     */
    protected $user_id = null;
    /**
     * Generated from protobuf field <code>optional string user_name = 10;</code>
     */
    protected $user_name = null;
    /**
     * this extra_data can be use for various purposes like, room or user metadata
     *
     * Generated from protobuf field <code>optional string extra_data = 11;</code>
     */
    protected $extra_data = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $event_type
     *     @type int $event_name
     *     @type string $room_id
     *     @type int|string $time
     *           should be unix milliseconds
     *     @type string $event_value_string
     *           if we pass value here then it will use redis SET to set the value for the key
     *     @type int|string $event_value_integer
     *           if we pass value here then it will use redis INCRBY to increment value for the key
     *     @type string $hset_value
     *           if we pass value here then it will use redis HSET to set hash field value for the key
     *           hash field will be unix milliseconds, so it will remain unique as always
     *     @type string $room_sid
     *     @type string $user_id
     *     @type string $user_name
     *     @type string $extra_data
     *           this extra_data can be use for various purposes like, room or user metadata
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\PlugnmeetAnalytics::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.AnalyticsEventType event_type = 1;</code>
     * @return int
     */
    public function getEventType()
    {
        return $this->event_type;
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.AnalyticsEventType event_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setEventType($var)
    {
        GPBUtil::checkEnum($var, \Mynaparrot\PlugnmeetProto\AnalyticsEventType::class);
        $this->event_type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.AnalyticsEvents event_name = 2;</code>
     * @return int
     */
    public function getEventName()
    {
        return $this->event_name;
    }

    /**
     * Generated from protobuf field <code>.plugnmeet.AnalyticsEvents event_name = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setEventName($var)
    {
        GPBUtil::checkEnum($var, \Mynaparrot\PlugnmeetProto\AnalyticsEvents::class);
        $this->event_name = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string room_id = 3;</code>
     * @return string
     */
    public function getRoomId()
    {
        return $this->room_id;
    }

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

        return $this;
    }

    /**
     * should be unix milliseconds
     *
     * Generated from protobuf field <code>int64 time = 4;</code>
     * @return int|string
     */
    public function getTime()
    {
        return $this->time;
    }

    /**
     * should be unix milliseconds
     *
     * Generated from protobuf field <code>int64 time = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->time = $var;

        return $this;
    }

    /**
     * if we pass value here then it will use redis SET to set the value for the key
     *
     * Generated from protobuf field <code>optional string event_value_string = 5;</code>
     * @return string
     */
    public function getEventValueString()
    {
        return isset($this->event_value_string) ? $this->event_value_string : '';
    }

    public function hasEventValueString()
    {
        return isset($this->event_value_string);
    }

    public function clearEventValueString()
    {
        unset($this->event_value_string);
    }

    /**
     * if we pass value here then it will use redis SET to set the value for the key
     *
     * Generated from protobuf field <code>optional string event_value_string = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setEventValueString($var)
    {
        GPBUtil::checkString($var, True);
        $this->event_value_string = $var;

        return $this;
    }

    /**
     * if we pass value here then it will use redis INCRBY to increment value for the key
     *
     * Generated from protobuf field <code>optional int64 event_value_integer = 6;</code>
     * @return int|string
     */
    public function getEventValueInteger()
    {
        return isset($this->event_value_integer) ? $this->event_value_integer : 0;
    }

    public function hasEventValueInteger()
    {
        return isset($this->event_value_integer);
    }

    public function clearEventValueInteger()
    {
        unset($this->event_value_integer);
    }

    /**
     * if we pass value here then it will use redis INCRBY to increment value for the key
     *
     * Generated from protobuf field <code>optional int64 event_value_integer = 6;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEventValueInteger($var)
    {
        GPBUtil::checkInt64($var);
        $this->event_value_integer = $var;

        return $this;
    }

    /**
     * if we pass value here then it will use redis HSET to set hash field value for the key
     * hash field will be unix milliseconds, so it will remain unique as always
     *
     * Generated from protobuf field <code>optional string hset_value = 7;</code>
     * @return string
     */
    public function getHsetValue()
    {
        return isset($this->hset_value) ? $this->hset_value : '';
    }

    public function hasHsetValue()
    {
        return isset($this->hset_value);
    }

    public function clearHsetValue()
    {
        unset($this->hset_value);
    }

    /**
     * if we pass value here then it will use redis HSET to set hash field value for the key
     * hash field will be unix milliseconds, so it will remain unique as always
     *
     * Generated from protobuf field <code>optional string hset_value = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setHsetValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->hset_value = $var;

        return $this;
    }

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

    public function hasRoomSid()
    {
        return isset($this->room_sid);
    }

    public function clearRoomSid()
    {
        unset($this->room_sid);
    }

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

        return $this;
    }

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

    public function hasUserId()
    {
        return isset($this->user_id);
    }

    public function clearUserId()
    {
        unset($this->user_id);
    }

    /**
     * Generated from protobuf field <code>optional string user_id = 9;</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>optional string user_name = 10;</code>
     * @return string
     */
    public function getUserName()
    {
        return isset($this->user_name) ? $this->user_name : '';
    }

    public function hasUserName()
    {
        return isset($this->user_name);
    }

    public function clearUserName()
    {
        unset($this->user_name);
    }

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

        return $this;
    }

    /**
     * this extra_data can be use for various purposes like, room or user metadata
     *
     * Generated from protobuf field <code>optional string extra_data = 11;</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);
    }

    /**
     * this extra_data can be use for various purposes like, room or user metadata
     *
     * Generated from protobuf field <code>optional string extra_data = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setExtraData($var)
    {
        GPBUtil::checkString($var, True);
        $this->extra_data = $var;

        return $this;
    }

}

