Copied!

Describes a method of a service.

Generated from protobuf message google.protobuf.MethodDescriptorProto

CloneableInstantiable
Methods
public __construct( $data = NULL)
 

Constructor.

  • param array $data { Optional. Data for populating the Message object.
    @type string $name
    @type string $input_type
          Input and output type names.  These are resolved in the same way as
          FieldDescriptorProto.type_name, but must refer to a message type.
    @type string $output_type
    @type \Google\Protobuf\Internal\MethodOptions $options
    @type bool $client_streaming
          Identifies if client streams multiple client messages
    @type bool $server_streaming
          Identifies if server streams multiple server messages
    
    }
public Google\Protobuf\Internal\Message::__debugInfo()
public Google\Protobuf\Internal\Message::byteSize()
 
  • ignore
public Google\Protobuf\Internal\Message::clear()
 

Clear all containing fields.

  • return null
public clearClientStreaming()
public clearInputType()
public clearName()
public clearOptions()
public clearOutputType()
public clearServerStreaming()
public Google\Protobuf\Internal\Message::discardUnknownFields()
 

Clear all unknown fields previously parsed.

  • return null
public getClientStreaming()
 

Identifies if client streams multiple client messages

Generated from protobuf field optional bool client_streaming = 5 [default = false];

  • return bool
public getInputType()
 

Input and output type names. These are resolved in the same way as FieldDescriptorProto.type_name, but must refer to a message type.

Generated from protobuf field optional string input_type = 2;

  • return string
public getName()
 

Generated from protobuf field optional string name = 1;

  • return string
public getOptions()
 

Generated from protobuf field optional .google.protobuf.MethodOptions options = 4;

  • return \Google\Protobuf\Internal\MethodOptions|null
public getOutputType()
 

Generated from protobuf field optional string output_type = 3;

  • return string
public getServerStreaming()
 

Identifies if server streams multiple server messages

Generated from protobuf field optional bool server_streaming = 6 [default = false];

  • return bool
public hasClientStreaming()
public hasInputType()
public hasName()
public hasOptions()
public hasOutputType()
public hasServerStreaming()
public Google\Protobuf\Internal\Message::jsonByteSize( $options = 0)
 
  • ignore
public Google\Protobuf\Internal\Message::mergeFrom( $msg)
 

Merges the contents of the specified message into current message.

This method merges the contents of the specified message into the current message. Singular fields that are set in the specified message overwrite the corresponding fields in the current message. Repeated fields are appended. Map fields key-value pairs are overwritten. Singular/Oneof sub-messages are recursively merged. All overwritten sub-messages are deep-copied.

  • param object $msg Protobuf message to be merged from.
  • return null
public Google\Protobuf\Internal\Message::mergeFromJsonString( $data, $ignore_unknown = false)
 

Parses a json string to protobuf message.

This function takes a string in the json wire format, matching the encoding output by serializeToJsonString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Json protobuf data.
  • param bool $ignore_unknown
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::mergeFromString( $data)
 

Parses a protocol buffer contained in a string.

This function takes a string in the (non-human-readable) binary wire format, matching the encoding output by serializeToString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Binary protobuf data.
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::parseFromJsonStream( $input, $ignore_unknown)
 
  • ignore
public Google\Protobuf\Internal\Message::parseFromStream( $input)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonString( $options = 0)
 

Serialize the message to json string.

  • return string Serialized json protobuf data.
public Google\Protobuf\Internal\Message::serializeToStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToString()
 

Serialize the message to string.

  • return string Serialized binary protobuf data.
public setClientStreaming(bool $var)
 

Identifies if client streams multiple client messages

Generated from protobuf field optional bool client_streaming = 5 [default = false];

  • param bool $var
  • return $this
public setInputType(string $var)
 

Input and output type names. These are resolved in the same way as FieldDescriptorProto.type_name, but must refer to a message type.

Generated from protobuf field optional string input_type = 2;

  • param string $var
  • return $this
public setName(string $var)
 

Generated from protobuf field optional string name = 1;

  • param string $var
  • return $this
public setOptions(?Google\Protobuf\Internal\MethodOptions $var)
 

Generated from protobuf field optional .google.protobuf.MethodOptions options = 4;

  • param \Google\Protobuf\Internal\MethodOptions $var
  • return $this
public setOutputType(string $var)
 

Generated from protobuf field optional string output_type = 3;

  • param string $var
  • return $this
public setServerStreaming(bool $var)
 

Identifies if server streams multiple server messages

Generated from protobuf field optional bool server_streaming = 6 [default = false];

  • param bool $var
  • return $this
Properties
protected $client_streaming = NULL
 

Identifies if client streams multiple client messages

Generated from protobuf field optional bool client_streaming = 5 [default = false];

protected $input_type = NULL
 

Input and output type names. These are resolved in the same way as FieldDescriptorProto.type_name, but must refer to a message type.

Generated from protobuf field optional string input_type = 2;

protected $name = NULL
 

Generated from protobuf field optional string name = 1;

protected $options = NULL
 

Generated from protobuf field optional .google.protobuf.MethodOptions options = 4;

protected $output_type = NULL
 

Generated from protobuf field optional string output_type = 3;

protected $server_streaming = NULL
 

Identifies if server streams multiple server messages

Generated from protobuf field optional bool server_streaming = 6 [default = false];

Methods
protected Google\Protobuf\Internal\Message::hasOneof( $number)
protected Google\Protobuf\Internal\Message::mergeFromArray(array $array)
 

Populates the message from a user-supplied PHP array. Array keys correspond to Message properties and nested message properties.

Example:

$message->mergeFromArray([
    'name' => 'This is a message name',
    'interval' => [
         'startTime' => time() - 60,
         'endTime' => time(),
    ]
]);

This method will trigger an error if it is passed data that cannot be converted to the correct type. For example, a StringValue field must receive data that is either a string or a StringValue object.

  • param array $array An array containing message properties and values.
  • return null
protected Google\Protobuf\Internal\Message::mergeFromJsonArray( $array, $ignore_unknown)
protected Google\Protobuf\Internal\Message::readOneof( $number)
protected Google\Protobuf\Internal\Message::readWrapperValue( $member)
protected Google\Protobuf\Internal\Message::whichOneof( $oneof_name)
protected Google\Protobuf\Internal\Message::writeOneof( $number, $value)
protected Google\Protobuf\Internal\Message::writeWrapperValue( $member, $value)
© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration