micro_service/php/Proto/LoginRequest.php

125 行
2.8 KiB
PHP

2024-09-24 16:56:54 +08:00
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: demo1/proto/user.proto
namespace Proto;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* 定义 LoginRequest 消息, 包含 username, password 两个字段
*
* Generated from protobuf message <code>proto.LoginRequest</code>
*/
class LoginRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string username = 1;</code>
*/
protected $username = '';
/**
* Generated from protobuf field <code>string password = 2;</code>
*/
protected $password = '';
/**
* Generated from protobuf field <code>.google.protobuf.Any other = 3;</code>
*/
protected $other = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $username
* @type string $password
* @type \Google\Protobuf\Any $other
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Demo1\Proto\User::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string username = 1;</code>
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* Generated from protobuf field <code>string username = 1;</code>
* @param string $var
* @return $this
*/
public function setUsername($var)
{
GPBUtil::checkString($var, True);
$this->username = $var;
return $this;
}
/**
* Generated from protobuf field <code>string password = 2;</code>
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* Generated from protobuf field <code>string password = 2;</code>
* @param string $var
* @return $this
*/
public function setPassword($var)
{
GPBUtil::checkString($var, True);
$this->password = $var;
return $this;
}
/**
* Generated from protobuf field <code>.google.protobuf.Any other = 3;</code>
* @return \Google\Protobuf\Any|null
*/
public function getOther()
{
return $this->other;
}
public function hasOther()
{
return isset($this->other);
}
public function clearOther()
{
unset($this->other);
}
/**
* Generated from protobuf field <code>.google.protobuf.Any other = 3;</code>
* @param \Google\Protobuf\Any $var
* @return $this
*/
public function setOther($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
$this->other = $var;
return $this;
}
}