package ocaml-protoc-plugin

  1. Overview
  2. Docs

Method represents a method of an API interface.

type t = {
  1. name : string;
    (*

    The simple name of this method.

    *)
  2. request_type_url : string;
    (*

    A URL of the input message type.

    *)
  3. request_streaming : bool;
    (*

    If true, the request is streamed.

    *)
  4. response_type_url : string;
    (*

    The URL of the output message type.

    *)
  5. response_streaming : bool;
    (*

    If true, the response is streamed.

    *)
  6. options : Type.Google.Protobuf.Option.t list;
    (*

    Any metadata attached to the method.

    *)
  7. syntax : Type.Google.Protobuf.Syntax.t;
    (*

    The source syntax of this method.

    *)
}
val make : ?name:string -> ?request_type_url:string -> ?request_streaming:bool -> ?response_type_url:string -> ?response_streaming:bool -> ?options:Type.Google.Protobuf.Option.t list -> ?syntax:Type.Google.Protobuf.Syntax.t -> unit -> t

Helper function to generate a message using default values

Serialize the message to binary format

Deserialize from binary format

Serialize to Json (compatible with Yojson.Basic.t)

Deserialize from Json (compatible with Yojson.Basic.t)

val name : unit -> string

Fully qualified protobuf name of this message