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

namespace RoadRunner\Centrifugal\API\DTO\V1;

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

/**
 * Generated from protobuf message <code>centrifugal.centrifugo.api.Device</code>
 */
class Device extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Generated from protobuf field <code>string platform = 2;</code>
     */
    protected $platform = '';
    /**
     * Generated from protobuf field <code>string provider = 3;</code>
     */
    protected $provider = '';
    /**
     * Generated from protobuf field <code>string token = 4;</code>
     */
    protected $token = '';
    /**
     * Generated from protobuf field <code>string user = 5;</code>
     */
    protected $user = '';
    /**
     * Generated from protobuf field <code>int64 created_at = 6;</code>
     */
    protected $created_at = 0;
    /**
     * Generated from protobuf field <code>int64 updated_at = 7;</code>
     */
    protected $updated_at = 0;
    /**
     * Generated from protobuf field <code>map<string, string> meta = 10;</code>
     */
    private $meta;
    /**
     *map<string, string> labels = 12;
     *map<string, int64> scores = 13;
     *
     * Generated from protobuf field <code>repeated string topics = 11;</code>
     */
    private $topics;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *     @type string $platform
     *     @type string $provider
     *     @type string $token
     *     @type string $user
     *     @type int|string $created_at
     *     @type int|string $updated_at
     *     @type array|\Google\Protobuf\Internal\MapField $meta
     *     @type string[] $topics
     *          map<string, string> labels = 12;
     *          map<string, int64> scores = 13;
     * }
     */
    public function __construct($data = NULL) {
        \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string token = 4;</code>
     * @return string
     */
    public function getToken()
    {
        return $this->token;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string user = 5;</code>
     * @return string
     */
    public function getUser()
    {
        return $this->user;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 created_at = 6;</code>
     * @return int|string
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    /**
     * Generated from protobuf field <code>int64 created_at = 6;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCreatedAt($var)
    {
        GPBUtil::checkInt64($var);
        $this->created_at = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 updated_at = 7;</code>
     * @return int|string
     */
    public function getUpdatedAt()
    {
        return $this->updated_at;
    }

    /**
     * Generated from protobuf field <code>int64 updated_at = 7;</code>
     * @param int|string $var
     * @return $this
     */
    public function setUpdatedAt($var)
    {
        GPBUtil::checkInt64($var);
        $this->updated_at = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, string> meta = 10;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getMeta()
    {
        return $this->meta;
    }

    /**
     * Generated from protobuf field <code>map<string, string> meta = 10;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setMeta($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->meta = $arr;

        return $this;
    }

    /**
     *map<string, string> labels = 12;
     *map<string, int64> scores = 13;
     *
     * Generated from protobuf field <code>repeated string topics = 11;</code>
     * @return RepeatedField<string>
     */
    public function getTopics()
    {
        return $this->topics;
    }

    /**
     *map<string, string> labels = 12;
     *map<string, int64> scores = 13;
     *
     * Generated from protobuf field <code>repeated string topics = 11;</code>
     * @param string[] $var
     * @return $this
     */
    public function setTopics($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->topics = $arr;

        return $this;
    }

}

