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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.AnalyticsClientMeta</code>
 */
class AnalyticsClientMeta extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string region = 1;</code>
     */
    protected $region = '';
    /**
     * Generated from protobuf field <code>string node = 2;</code>
     */
    protected $node = '';
    /**
     * Generated from protobuf field <code>string client_addr = 3;</code>
     */
    protected $client_addr = '';
    /**
     * Generated from protobuf field <code>uint32 client_connect_time = 4;</code>
     */
    protected $client_connect_time = 0;
    /**
     * udp, tcp, turn
     *
     * Generated from protobuf field <code>string connection_type = 5;</code>
     */
    protected $connection_type = '';
    /**
     * Generated from protobuf field <code>.livekit.ReconnectReason reconnect_reason = 6;</code>
     */
    protected $reconnect_reason = 0;
    /**
     * Generated from protobuf field <code>optional string geo_hash = 7;</code>
     */
    protected $geo_hash = null;
    /**
     * Generated from protobuf field <code>optional string country = 8;</code>
     */
    protected $country = null;
    /**
     * Generated from protobuf field <code>optional uint32 isp_asn = 9;</code>
     */
    protected $isp_asn = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $region
     *     @type string $node
     *     @type string $client_addr
     *     @type int $client_connect_time
     *     @type string $connection_type
     *           udp, tcp, turn
     *     @type int $reconnect_reason
     *     @type string $geo_hash
     *     @type string $country
     *     @type int $isp_asn
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitAnalytics::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string node = 2;</code>
     * @return string
     */
    public function getNode()
    {
        return $this->node;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 client_connect_time = 4;</code>
     * @return int
     */
    public function getClientConnectTime()
    {
        return $this->client_connect_time;
    }

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

        return $this;
    }

    /**
     * udp, tcp, turn
     *
     * Generated from protobuf field <code>string connection_type = 5;</code>
     * @return string
     */
    public function getConnectionType()
    {
        return $this->connection_type;
    }

    /**
     * udp, tcp, turn
     *
     * Generated from protobuf field <code>string connection_type = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setConnectionType($var)
    {
        GPBUtil::checkString($var, True);
        $this->connection_type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.ReconnectReason reconnect_reason = 6;</code>
     * @return int
     */
    public function getReconnectReason()
    {
        return $this->reconnect_reason;
    }

    /**
     * Generated from protobuf field <code>.livekit.ReconnectReason reconnect_reason = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setReconnectReason($var)
    {
        GPBUtil::checkEnum($var, \Livekit\ReconnectReason::class);
        $this->reconnect_reason = $var;

        return $this;
    }

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

    public function hasGeoHash()
    {
        return isset($this->geo_hash);
    }

    public function clearGeoHash()
    {
        unset($this->geo_hash);
    }

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

        return $this;
    }

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

    public function hasCountry()
    {
        return isset($this->country);
    }

    public function clearCountry()
    {
        unset($this->country);
    }

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

        return $this;
    }

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

    public function hasIspAsn()
    {
        return isset($this->isp_asn);
    }

    public function clearIspAsn()
    {
        unset($this->isp_asn);
    }

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

        return $this;
    }

}

