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

namespace RoadRunner\Centrifugal\Proxy\DTO\V1;

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

/**
 * Generated from protobuf message <code>centrifugal.centrifugo.proxy.ChannelEvent</code>
 */
class ChannelEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int64 time_ms = 1;</code>
     */
    protected $time_ms = 0;
    /**
     * Generated from protobuf field <code>string channel = 2;</code>
     */
    protected $channel = '';
    /**
     * "occupied" | "vacated" | could be more in the future. Not using enums for better JSON interop.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     */
    protected $type = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $time_ms
     *     @type string $channel
     *     @type string $type
     *           "occupied" | "vacated" | could be more in the future. Not using enums for better JSON interop.
     * }
     */
    public function __construct($data = NULL) {
        \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * "occupied" | "vacated" | could be more in the future. Not using enums for better JSON interop.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * "occupied" | "vacated" | could be more in the future. Not using enums for better JSON interop.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

}

