Skip to main content

Class: MethodDescriptorProto

google.protobuf.MethodDescriptorProto

Describes a method of a service.

Properties

clientStreaming

clientStreaming: boolean

Identifies if client streams multiple client messages


inputType

inputType: string

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


name

name: string

MethodDescriptorProto name.


options

Optional options: null | $Properties

MethodDescriptorProto options.


outputType

outputType: string

MethodDescriptorProto outputType.


serverStreaming

serverStreaming: boolean

Identifies if server streams multiple server messages

Methods

toJSON

toJSON(): Object

Converts this MethodDescriptorProto to JSON.

Returns

Object

JSON object


create

create(properties?): MethodDescriptorProto & $Shape

Creates a new MethodDescriptorProto instance using the specified properties.

Parameters

NameTypeDescription
properties?$ShapeProperties to set

Returns

MethodDescriptorProto & $Shape

MethodDescriptorProto instance

create(properties?): MethodDescriptorProto

Parameters

NameType
properties?$Properties

Returns

MethodDescriptorProto


decode

decode(reader, length?): MethodDescriptorProto & $Shape

Decodes a MethodDescriptorProto message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

MethodDescriptorProto & $Shape

MethodDescriptorProto

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): MethodDescriptorProto & $Shape

Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

MethodDescriptorProto & $Shape

MethodDescriptorProto

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified MethodDescriptorProto message. Does not implicitly google.protobuf.MethodDescriptorProto.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesMethodDescriptorProto message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly google.protobuf.MethodDescriptorProto.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesMethodDescriptorProto message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): MethodDescriptorProto

Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

MethodDescriptorProto

MethodDescriptorProto


toObject

toObject(message, options?): Object

Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageMethodDescriptorProtoMethodDescriptorProto
options?IConversionOptionsConversion options

Returns

Object

Plain object