package ocaml-protoc-plugin
Module Protobuf.Value
Value represents a dynamically typed value which can be either
null, a number, a string, a boolean, a recursive struct value, or a
list of values. A producer of value is expected to set one of these
variants. Absence of any variant indicates an error.
The JSON representation for Value is JSON value.
type t = [ | `not_set| `Null_value of NullValue.t| `Number_value of float| `String_value of string| `Bool_value of bool| `Struct_value of Struct.t| `List_value of ListValue.t
]The kind of value.
`Null_value
Represents a null value.
`Number_value
Represents a double value.
`String_value
Represents a string value.
`Bool_value
Represents a boolean value.
`Struct_value
Represents a structured value.
`List_value
Represents a repeated Value.
val make :
?kind:
[ `not_set
| `Null_value of NullValue.t
| `Number_value of float
| `String_value of string
| `Bool_value of bool
| `Struct_value of Struct.t
| `List_value of ListValue.t ] ->
unit ->
tHelper function to generate a message using default values
Serialize the message to binary format
val from_proto :
Ocaml_protoc_plugin.Reader.t ->
(t, [> Ocaml_protoc_plugin.Result.error ]) resultDeserialize from binary format
Serialize to Json (compatible with Yojson.Basic.t)
val from_json :
Ocaml_protoc_plugin.Json.t ->
(t, [> Ocaml_protoc_plugin.Result.error ]) resultDeserialize from Json (compatible with Yojson.Basic.t)
Fully qualified protobuf name of this message