270 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			270 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| # Generated by the protocol buffer compiler.  DO NOT EDIT!
 | |
| # source: proto/auth.proto
 | |
| 
 | |
| namespace GRPC\Auth;
 | |
| 
 | |
| use Google\Protobuf\Internal\GPBType;
 | |
| use Google\Protobuf\Internal\RepeatedField;
 | |
| use Google\Protobuf\Internal\GPBUtil;
 | |
| 
 | |
| /**
 | |
|  * Generated from protobuf message <code>auth.JwtClaims</code>
 | |
|  */
 | |
| class JwtClaims extends \Google\Protobuf\Internal\Message
 | |
| {
 | |
|     /**
 | |
|      * 所属应用
 | |
|      *
 | |
|      * Generated from protobuf field <code>string app = 1;</code>
 | |
|      */
 | |
|     protected $app = '';
 | |
|     /**
 | |
|      * 用户id
 | |
|      *
 | |
|      * Generated from protobuf field <code>string uid = 2;</code>
 | |
|      */
 | |
|     protected $uid = '';
 | |
|     /**
 | |
|      * 商户id
 | |
|      *
 | |
|      * Generated from protobuf field <code>string merchant_id = 3;</code>
 | |
|      */
 | |
|     protected $merchant_id = '';
 | |
|     /**
 | |
|      * 用户在商户下的角色
 | |
|      *
 | |
|      * Generated from protobuf field <code>.auth.AccountRole role = 4;</code>
 | |
|      */
 | |
|     protected $role = 0;
 | |
|     /**
 | |
|      * 过期时间戳
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 exp = 5;</code>
 | |
|      */
 | |
|     protected $exp = 0;
 | |
|     /**
 | |
|      * 可刷新时间戳
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 refresh = 6;</code>
 | |
|      */
 | |
|     protected $refresh = 0;
 | |
|     /**
 | |
|      * jwt token版本
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 ver = 7;</code>
 | |
|      */
 | |
|     protected $ver = 0;
 | |
| 
 | |
|     /**
 | |
|      * Constructor.
 | |
|      *
 | |
|      * @param array $data {
 | |
|      *     Optional. Data for populating the Message object.
 | |
|      *
 | |
|      *     @type string $app
 | |
|      *           所属应用
 | |
|      *     @type string $uid
 | |
|      *           用户id
 | |
|      *     @type string $merchant_id
 | |
|      *           商户id
 | |
|      *     @type int $role
 | |
|      *           用户在商户下的角色
 | |
|      *     @type int|string $exp
 | |
|      *           过期时间戳
 | |
|      *     @type int|string $refresh
 | |
|      *           可刷新时间戳
 | |
|      *     @type int|string $ver
 | |
|      *           jwt token版本
 | |
|      * }
 | |
|      */
 | |
|     public function __construct($data = NULL) {
 | |
|         \GRPC\GPBMetadata\Auth::initOnce();
 | |
|         parent::__construct($data);
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 所属应用
 | |
|      *
 | |
|      * Generated from protobuf field <code>string app = 1;</code>
 | |
|      * @return string
 | |
|      */
 | |
|     public function getApp()
 | |
|     {
 | |
|         return $this->app;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 所属应用
 | |
|      *
 | |
|      * Generated from protobuf field <code>string app = 1;</code>
 | |
|      * @param string $var
 | |
|      * @return $this
 | |
|      */
 | |
|     public function setApp($var)
 | |
|     {
 | |
|         GPBUtil::checkString($var, True);
 | |
|         $this->app = $var;
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 用户id
 | |
|      *
 | |
|      * Generated from protobuf field <code>string uid = 2;</code>
 | |
|      * @return string
 | |
|      */
 | |
|     public function getUid()
 | |
|     {
 | |
|         return $this->uid;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 用户id
 | |
|      *
 | |
|      * Generated from protobuf field <code>string uid = 2;</code>
 | |
|      * @param string $var
 | |
|      * @return $this
 | |
|      */
 | |
|     public function setUid($var)
 | |
|     {
 | |
|         GPBUtil::checkString($var, True);
 | |
|         $this->uid = $var;
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 商户id
 | |
|      *
 | |
|      * Generated from protobuf field <code>string merchant_id = 3;</code>
 | |
|      * @return string
 | |
|      */
 | |
|     public function getMerchantId()
 | |
|     {
 | |
|         return $this->merchant_id;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 商户id
 | |
|      *
 | |
|      * Generated from protobuf field <code>string merchant_id = 3;</code>
 | |
|      * @param string $var
 | |
|      * @return $this
 | |
|      */
 | |
|     public function setMerchantId($var)
 | |
|     {
 | |
|         GPBUtil::checkString($var, True);
 | |
|         $this->merchant_id = $var;
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 用户在商户下的角色
 | |
|      *
 | |
|      * Generated from protobuf field <code>.auth.AccountRole role = 4;</code>
 | |
|      * @return int
 | |
|      */
 | |
|     public function getRole()
 | |
|     {
 | |
|         return $this->role;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 用户在商户下的角色
 | |
|      *
 | |
|      * Generated from protobuf field <code>.auth.AccountRole role = 4;</code>
 | |
|      * @param int $var
 | |
|      * @return $this
 | |
|      */
 | |
|     public function setRole($var)
 | |
|     {
 | |
|         GPBUtil::checkEnum($var, \GRPC\Auth\AccountRole::class);
 | |
|         $this->role = $var;
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 过期时间戳
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 exp = 5;</code>
 | |
|      * @return int|string
 | |
|      */
 | |
|     public function getExp()
 | |
|     {
 | |
|         return $this->exp;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 过期时间戳
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 exp = 5;</code>
 | |
|      * @param int|string $var
 | |
|      * @return $this
 | |
|      */
 | |
|     public function setExp($var)
 | |
|     {
 | |
|         GPBUtil::checkInt64($var);
 | |
|         $this->exp = $var;
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 可刷新时间戳
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 refresh = 6;</code>
 | |
|      * @return int|string
 | |
|      */
 | |
|     public function getRefresh()
 | |
|     {
 | |
|         return $this->refresh;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * 可刷新时间戳
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 refresh = 6;</code>
 | |
|      * @param int|string $var
 | |
|      * @return $this
 | |
|      */
 | |
|     public function setRefresh($var)
 | |
|     {
 | |
|         GPBUtil::checkInt64($var);
 | |
|         $this->refresh = $var;
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * jwt token版本
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 ver = 7;</code>
 | |
|      * @return int|string
 | |
|      */
 | |
|     public function getVer()
 | |
|     {
 | |
|         return $this->ver;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * jwt token版本
 | |
|      *
 | |
|      * Generated from protobuf field <code>int64 ver = 7;</code>
 | |
|      * @param int|string $var
 | |
|      * @return $this
 | |
|      */
 | |
|     public function setVer($var)
 | |
|     {
 | |
|         GPBUtil::checkInt64($var);
 | |
|         $this->ver = $var;
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
| }
 | |
| 
 |