package ocaml-protoc-plugin

  1. Overview
  2. Docs

A message representing a option the parser does not recognize. This only appears in options protos created by the compiler::Parser class. DescriptorPool resolves these when building Descriptor objects. Therefore, options protos in descriptor objects (e.g. returned by Descriptor::options(), or produced by Descriptor::CopyTo()) will never have UninterpretedOptions in them.

module NamePart : sig ... end

The name of the uninterpreted option. Each string represents a segment in a dot-separated name. is_extension is true iff a segment represents an extension (denoted with parentheses in options specs in .proto files). E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents "foo.(bar.baz).moo".

type t = {
  1. name : NamePart.t list;
  2. identifier_value : string option;
    (*

    The value of the uninterpreted option, in whatever type the tokenizer identified it as during parsing. Exactly one of these should be set.

    *)
  3. positive_int_value : int option;
  4. negative_int_value : int option;
  5. double_value : float option;
  6. string_value : bytes option;
  7. aggregate_value : string option;
}
val make : ?name:NamePart.t list -> ?identifier_value:string -> ?positive_int_value:int -> ?negative_int_value:int -> ?double_value:float -> ?string_value:bytes -> ?aggregate_value:string -> 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