<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: SystemPacket.proto

namespace Framework\Protobuf;

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

/**
 * 服务注册消息 string key->json {server_id}-info
 *
 * Generated from protobuf message <code>Framework.Protobuf.ServerRegister</code>
 */
class ServerRegister extends \Google\Protobuf\Internal\Message
{
    /**
     * 注册服务id
     *
     * Generated from protobuf field <code>string server_id = 1;</code>
     */
    protected $server_id = '';
    /**
     * 创建时间
     *
     * Generated from protobuf field <code>int32 create_time = 2;</code>
     */
    protected $create_time = 0;
    /**
     * 服务类型
     *
     * Generated from protobuf field <code>int32 type = 3;</code>
     */
    protected $type = 0;
    /**
     * 服务状态
     *
     * Generated from protobuf field <code>int32 status = 4;</code>
     */
    protected $status = 0;
    /**
     * 说明
     *
     * Generated from protobuf field <code>string explain = 5;</code>
     */
    protected $explain = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $server_id
     *           注册服务id
     *     @type int $create_time
     *           创建时间
     *     @type int $type
     *           服务类型
     *     @type int $status
     *           服务状态
     *     @type string $explain
     *           说明
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\SystemPacket::initOnce();
        parent::__construct($data);
    }

    /**
     * 注册服务id
     *
     * Generated from protobuf field <code>string server_id = 1;</code>
     * @return string
     */
    public function getServerId()
    {
        return $this->server_id;
    }

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

        return $this;
    }

    /**
     * 创建时间
     *
     * Generated from protobuf field <code>int32 create_time = 2;</code>
     * @return int
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    /**
     * 创建时间
     *
     * Generated from protobuf field <code>int32 create_time = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkInt32($var);
        $this->create_time = $var;

        return $this;
    }

    /**
     * 服务类型
     *
     * Generated from protobuf field <code>int32 type = 3;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * 服务类型
     *
     * Generated from protobuf field <code>int32 type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkInt32($var);
        $this->type = $var;

        return $this;
    }

    /**
     * 服务状态
     *
     * Generated from protobuf field <code>int32 status = 4;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * 服务状态
     *
     * Generated from protobuf field <code>int32 status = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkInt32($var);
        $this->status = $var;

        return $this;
    }

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

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

        return $this;
    }

}

