google.protobuf.Method
*/
class Method extends \Google\Protobuf\Internal\Message
{
/**
* The simple name of this method.
*
* Generated from protobuf field string name = 1;
*/
private $name = '';
/**
* A URL of the input message type.
*
* Generated from protobuf field string request_type_url = 2;
*/
private $request_type_url = '';
/**
* If true, the request is streamed.
*
* Generated from protobuf field bool request_streaming = 3;
*/
private $request_streaming = false;
/**
* The URL of the output message type.
*
* Generated from protobuf field string response_type_url = 4;
*/
private $response_type_url = '';
/**
* If true, the response is streamed.
*
* Generated from protobuf field bool response_streaming = 5;
*/
private $response_streaming = false;
/**
* Any metadata attached to the method.
*
* Generated from protobuf field repeated .google.protobuf.Option options = 6;
*/
private $options;
/**
* The source syntax of this method.
*
* Generated from protobuf field .google.protobuf.Syntax syntax = 7;
*/
private $syntax = 0;
public function __construct() {
\GPBMetadata\Google\Protobuf\Api::initOnce();
parent::__construct();
}
/**
* The simple name of this method.
*
* Generated from protobuf field string name = 1;
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The simple name of this method.
*
* Generated from protobuf field string name = 1;
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* A URL of the input message type.
*
* Generated from protobuf field string request_type_url = 2;
* @return string
*/
public function getRequestTypeUrl()
{
return $this->request_type_url;
}
/**
* A URL of the input message type.
*
* Generated from protobuf field string request_type_url = 2;
* @param string $var
* @return $this
*/
public function setRequestTypeUrl($var)
{
GPBUtil::checkString($var, True);
$this->request_type_url = $var;
return $this;
}
/**
* If true, the request is streamed.
*
* Generated from protobuf field bool request_streaming = 3;
* @return bool
*/
public function getRequestStreaming()
{
return $this->request_streaming;
}
/**
* If true, the request is streamed.
*
* Generated from protobuf field bool request_streaming = 3;
* @param bool $var
* @return $this
*/
public function setRequestStreaming($var)
{
GPBUtil::checkBool($var);
$this->request_streaming = $var;
return $this;
}
/**
* The URL of the output message type.
*
* Generated from protobuf field string response_type_url = 4;
* @return string
*/
public function getResponseTypeUrl()
{
return $this->response_type_url;
}
/**
* The URL of the output message type.
*
* Generated from protobuf field string response_type_url = 4;
* @param string $var
* @return $this
*/
public function setResponseTypeUrl($var)
{
GPBUtil::checkString($var, True);
$this->response_type_url = $var;
return $this;
}
/**
* If true, the response is streamed.
*
* Generated from protobuf field bool response_streaming = 5;
* @return bool
*/
public function getResponseStreaming()
{
return $this->response_streaming;
}
/**
* If true, the response is streamed.
*
* Generated from protobuf field bool response_streaming = 5;
* @param bool $var
* @return $this
*/
public function setResponseStreaming($var)
{
GPBUtil::checkBool($var);
$this->response_streaming = $var;
return $this;
}
/**
* Any metadata attached to the method.
*
* Generated from protobuf field repeated .google.protobuf.Option options = 6;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOptions()
{
return $this->options;
}
/**
* Any metadata attached to the method.
*
* Generated from protobuf field repeated .google.protobuf.Option options = 6;
* @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
$this->options = $arr;
return $this;
}
/**
* The source syntax of this method.
*
* Generated from protobuf field .google.protobuf.Syntax syntax = 7;
* @return int
*/
public function getSyntax()
{
return $this->syntax;
}
/**
* The source syntax of this method.
*
* Generated from protobuf field .google.protobuf.Syntax syntax = 7;
* @param int $var
* @return $this
*/
public function setSyntax($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
$this->syntax = $var;
return $this;
}
}