# Class: RPCMethod

## ProtoBuf.Reflect.Service. RPCMethod

#### new RPCMethod(buildernon-null, svcnon-null, name, request, response, request_stream, response_stream, optionsopt)

  RPC service method.

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `builder` | ProtoBuf.Builder |  | Builder reference
  `svc` | ProtoBuf.Reflect.Service |  | Service
  `name` | string |  | Method name
  `request` | string |  | Request message name
  `response` | string |  | Response message name
  `request_stream` | boolean |  | Whether requests are streamed
  `response_stream` | boolean |  | Whether responses are streamed
  `options` | Object.<string, *> | <optional> | Options

  Source:
    - ProtoBuf.js, line 4151

### Extends

- ProtoBuf.Reflect.Service.Method

### Members

#### (non-null) builder :ProtoBuf.Builder

  Builder reference.

  ##### Type:

  - ProtoBuf.Builder
  Inherited From:
    - ProtoBuf.Reflect.T#builder
  Source:
    - ProtoBuf.js, line 1382

#### className

  Source:
    - ProtoBuf.js, line 4157

#### name :string

  Object name in namespace.

  ##### Type:

  - string
  Inherited From:
    - ProtoBuf.Reflect.T#name
  Source:
    - ProtoBuf.js, line 1396

#### options :Object.<string, *>

  Options.

  ##### Type:

  - Object.<string, *>
  Inherited From:
    - ProtoBuf.Reflect.Service.Method#options
  Source:
    - ProtoBuf.js, line 4114

#### (nullable) parent :ProtoBuf.Reflect.T

  Parent object.

  ##### Type:

  - ProtoBuf.Reflect.T
  Inherited From:
    - ProtoBuf.Reflect.T#parent
  Source:
    - ProtoBuf.js, line 1389

#### requestName :string

  Request message name.

  ##### Type:

  - string
  Source:
    - ProtoBuf.js, line 4164

#### requestStream :bool

  Whether requests are streamed

  ##### Type:

  - bool
  Source:
    - ProtoBuf.js, line 4178

#### resolvedRequestType :ProtoBuf.Reflect.Message

  Resolved request message type.

  ##### Type:

  - ProtoBuf.Reflect.Message
  Source:
    - ProtoBuf.js, line 4192

#### resolvedResponseType :ProtoBuf.Reflect.Message

  Resolved response message type.

  ##### Type:

  - ProtoBuf.Reflect.Message
  Source:
    - ProtoBuf.js, line 4199

#### responseName :string

  Response message name.

  ##### Type:

  - string
  Source:
    - ProtoBuf.js, line 4171

#### responseStream :bool

  Whether responses are streamed

  ##### Type:

  - bool
  Source:
    - ProtoBuf.js, line 4185

### Methods

#### build()

  Builds this type.

  Inherited From:
    - ProtoBuf.Reflect.T#build
  Source:
    - ProtoBuf.js, line 1444

  ##### Throws:

  If this type cannot be built directly
  Type
    Error

#### buildOpt() → {Object.<string, *>}

  Builds the method's '$options' property.

  Inherited From:
    - ProtoBuf.Reflect.Service.Method#buildOpt
  Source:
    - ProtoBuf.js, line 4123

  ##### Returns:

  Type
    Object.<string, *>

#### fqn() → {string}

  Returns the fully qualified name of this object.

  Inherited From:
    - ProtoBuf.Reflect.T#fqn
  Source:
    - ProtoBuf.js, line 1417

  ##### Returns:

  Fully qualified name as of ".PATH.TO.THIS"

  Type
    string

#### toString(includeClassopt)

  Returns a string representation of this Reflect object (its fully qualified name).

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `includeClass` | boolean | <optional> | Set to true to include the class name. Defaults to false.

  Inherited From:
    - ProtoBuf.Reflect.T#toString
  Source:
    - ProtoBuf.js, line 1435

  ##### Returns:

  String representation