Reference documentation and code samples for the proto library Client class Method.
Method represents a method of an API interface.
New usages of this message as an alternative to MethodDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.
Generated from protobuf message google.protobuf.Method
Namespace
Google \ ProtobufMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The simple name of this method. |
↳ request_type_url |
string
A URL of the input message type. |
↳ request_streaming |
bool
If true, the request is streamed. |
↳ response_type_url |
string
The URL of the output message type. |
↳ response_streaming |
bool
If true, the response is streamed. |
↳ options |
array<Option>
Any metadata attached to the method. |
↳ syntax |
int
The source syntax of this method. This field should be ignored, instead the syntax should be inherited from Api. This is similar to Field and EnumValue. |
↳ edition |
string
The source edition string, only valid when syntax is SYNTAX_EDITIONS. This field should be ignored, instead the edition should be inherited from Api. This is similar to Field and EnumValue. |
getName
The simple name of this method.
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
The simple name of this method.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRequestTypeUrl
A URL of the input message type.
| Returns | |
|---|---|
| Type | Description |
string |
|
setRequestTypeUrl
A URL of the input message type.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRequestStreaming
If true, the request is streamed.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setRequestStreaming
If true, the request is streamed.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getResponseTypeUrl
The URL of the output message type.
| Returns | |
|---|---|
| Type | Description |
string |
|
setResponseTypeUrl
The URL of the output message type.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getResponseStreaming
If true, the response is streamed.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setResponseStreaming
If true, the response is streamed.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getOptions
Any metadata attached to the method.
| Returns | |
|---|---|
| Type | Description |
RepeatedField<Option> |
|
setOptions
Any metadata attached to the method.
| Parameter | |
|---|---|
| Name | Description |
var |
array<Option>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSyntax
The source syntax of this method.
This field should be ignored, instead the syntax should be inherited from Api. This is similar to Field and EnumValue.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type Syntax. one of the values in {@see \Google\Protobuf\Syntax} |
setSyntax
The source syntax of this method.
This field should be ignored, instead the syntax should be inherited from Api. This is similar to Field and EnumValue.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
This field should be ignored, instead the edition should be inherited from Api. This is similar to Field and EnumValue.
| Returns | |
|---|---|
| Type | Description |
string |
|
setEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
This field should be ignored, instead the edition should be inherited from Api. This is similar to Field and EnumValue.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|