package ocaml-protoc-plugin

  1. Overview
  2. Docs

A protocol buffer message type.

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

    The fully qualified message name.

    *)
  2. fields : Field.t list;
    (*

    The list of fields.

    *)
  3. oneofs : string list;
    (*

    The list of types appearing in `oneof` definitions in this type.

    *)
  4. options : Option.t list;
    (*

    The protocol buffer options.

    *)
  5. source_context : Source_context.Google.Protobuf.SourceContext.t option;
    (*

    The source context.

    *)
  6. syntax : Syntax.t;
    (*

    The source syntax.

    *)
}
val make : ?name:string -> ?fields:Field.t list -> ?oneofs:string list -> ?options:Option.t list -> ?source_context:Source_context.Google.Protobuf.SourceContext.t -> ?syntax: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