123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712(********************************************************)(* AUTOGENERATED FILE - DO NOT EDIT! *)(********************************************************)(* Generated by: ocaml-protoc-plugin *)(* https://github.com/andersfugmann/ocaml-protoc-plugin *)(********************************************************)(*
Source: google/protobuf/struct.proto
Syntax: proto3
Parameters:
debug=false
annot=''
opens=[]
int64_as_int=true
int32_as_int=true
fixed_as_int=false
singleton_record=false
prefix_output_with_package=false
*)[@@@ocaml.alert"-protobuf"](* Disable deprecation warnings for protobuf*)(**/**)moduleRuntime'=Ocaml_protoc_plugin[@@warning"-33"]moduleImported'modules=structend(**/**)modulerecGoogle:sigmodulerecProtobuf:sig(**
{%html:
<p><code>NullValue</code> is a singleton enumeration to represent the null value for the
<code>Value</code> type union.</p>
<p>The JSON representation for <code>NullValue</code> is JSON <code>null</code>.</p>
%}
*)modulerecNullValue:sigtypet=|NULL_VALUE(**
{%html:
<p>Null value.</p>
%}
*)valname:unit->string(** Fully qualified protobuf name of this enum *)(**/**)valto_int:t->intvalfrom_int:int->tRuntime'.Result.tvalfrom_int_exn:int->tvalto_string:t->stringvalfrom_string_exn:string->t(**/**)end(**
{%html:
<p><code>Struct</code> represents a structured data value, consisting of fields
which map to dynamically typed values. In some languages, <code>Struct</code>
might be supported by a native representation. For example, in
scripting languages like JS a struct is represented as an
object. The details of that representation are described together
with the proto support for the language.</p>
<p>The JSON representation for <code>Struct</code> is JSON object.</p>
%}
*)andStruct:sigtypet=((string*Value.toption)list)(**
{%html:
<p>Unordered map of dynamically typed values.</p>
%}
*)valmake:?fields:(string*Value.toption)list->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?fields:(string*Value.toption)list->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end(**
{%html:
<p><code>Value</code> 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.</p>
<p>The JSON representation for <code>Value</code> is JSON value.</p>
%}
*)andValue:sigtypet=([`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t])(**
{%html:
<p>The kind of value.</p>
%}
[`Null_value]
{%html:
<p>Represents a null value.</p>
%}
[`Number_value]
{%html:
<p>Represents a double value.</p>
%}
[`String_value]
{%html:
<p>Represents a string value.</p>
%}
[`Bool_value]
{%html:
<p>Represents a boolean value.</p>
%}
[`Struct_value]
{%html:
<p>Represents a structured value.</p>
%}
[`List_value]
{%html:
<p>Represents a repeated <code>Value</code>.</p>
%}
*)valmake:?kind:[`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t]->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?kind:[`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t]->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end(**
{%html:
<p><code>ListValue</code> is a wrapper around a repeated field of values.</p>
<p>The JSON representation for <code>ListValue</code> is JSON array.</p>
%}
*)andListValue:sigtypet=(Value.tlist)(**
{%html:
<p>Repeated field of dynamically typed values.</p>
%}
*)valmake:?values:Value.tlist->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?values:Value.tlist->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)endendend=structmodulerecProtobuf:sig(**
{%html:
<p><code>NullValue</code> is a singleton enumeration to represent the null value for the
<code>Value</code> type union.</p>
<p>The JSON representation for <code>NullValue</code> is JSON <code>null</code>.</p>
%}
*)modulerecNullValue:sigtypet=|NULL_VALUE(**
{%html:
<p>Null value.</p>
%}
*)valname:unit->string(** Fully qualified protobuf name of this enum *)(**/**)valto_int:t->intvalfrom_int:int->tRuntime'.Result.tvalfrom_int_exn:int->tvalto_string:t->stringvalfrom_string_exn:string->t(**/**)end(**
{%html:
<p><code>Struct</code> represents a structured data value, consisting of fields
which map to dynamically typed values. In some languages, <code>Struct</code>
might be supported by a native representation. For example, in
scripting languages like JS a struct is represented as an
object. The details of that representation are described together
with the proto support for the language.</p>
<p>The JSON representation for <code>Struct</code> is JSON object.</p>
%}
*)andStruct:sigtypet=((string*Value.toption)list)(**
{%html:
<p>Unordered map of dynamically typed values.</p>
%}
*)valmake:?fields:(string*Value.toption)list->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?fields:(string*Value.toption)list->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end(**
{%html:
<p><code>Value</code> 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.</p>
<p>The JSON representation for <code>Value</code> is JSON value.</p>
%}
*)andValue:sigtypet=([`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t])(**
{%html:
<p>The kind of value.</p>
%}
[`Null_value]
{%html:
<p>Represents a null value.</p>
%}
[`Number_value]
{%html:
<p>Represents a double value.</p>
%}
[`String_value]
{%html:
<p>Represents a string value.</p>
%}
[`Bool_value]
{%html:
<p>Represents a boolean value.</p>
%}
[`Struct_value]
{%html:
<p>Represents a structured value.</p>
%}
[`List_value]
{%html:
<p>Represents a repeated <code>Value</code>.</p>
%}
*)valmake:?kind:[`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t]->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?kind:[`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t]->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end(**
{%html:
<p><code>ListValue</code> is a wrapper around a repeated field of values.</p>
<p>The JSON representation for <code>ListValue</code> is JSON array.</p>
%}
*)andListValue:sigtypet=(Value.tlist)(**
{%html:
<p>Repeated field of dynamically typed values.</p>
%}
*)valmake:?values:Value.tlist->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?values:Value.tlist->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)endend=structmodulerecNullValue:sigtypet=|NULL_VALUE(**
{%html:
<p>Null value.</p>
%}
*)valname:unit->string(** Fully qualified protobuf name of this enum *)(**/**)valto_int:t->intvalfrom_int:int->tRuntime'.Result.tvalfrom_int_exn:int->tvalto_string:t->stringvalfrom_string_exn:string->t(**/**)end=structmoduleThis'_=NullValuetypet=|NULL_VALUE(**
{%html:
<p>Null value.</p>
%}
*)letname()=".google.protobuf.NullValue"letto_int=function|NULL_VALUE->0letfrom_int_exn=function|0->NULL_VALUE|n->Runtime'.Result.raise(`Unknown_enum_valuen)letfrom_inte=Runtime'.Result.catch(fun()->from_int_exne)letto_string=function|NULL_VALUE->"NULL_VALUE"letfrom_string_exn=function|"NULL_VALUE"->NULL_VALUE|s->Runtime'.Result.raise(`Unknown_enum_names)endandStruct:sigtypet=((string*Value.toption)list)(**
{%html:
<p>Unordered map of dynamically typed values.</p>
%}
*)valmake:?fields:(string*Value.toption)list->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?fields:(string*Value.toption)list->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end=structmoduleThis'_=Structletname()=".google.protobuf.Struct"typet=((string*Value.toption)list)typemake_t=?fields:(string*Value.toption)list->unit->tletmake?(fields=[])()=(fields)letmerge=letmerge_fields=Runtime'.Merge.mergeRuntime'.Spec.(map((1,"fields","fields"),(string,basic_opt((2,"value","value"),(message(moduleValue))))))infun(t1_fields)(t2_fields)->merge_fieldst1_fieldst2_fieldsletspec()=Runtime'.Spec.(map((1,"fields","fields"),(string,basic_opt((2,"value","value"),(message(moduleValue)))))^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter(fields)->serializewriterfieldsletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructorfields=(fields)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize.deserialize(spec())constructor)letfrom_protowriter=Runtime'.Result.catch(fun()->from_proto_exnwriter)letto_jsonoptions=letserialize=Runtime'.Serialize_json.serialize~message_name:(name())(spec())optionsinfun(fields)->serializefieldsletfrom_json_exn=letconstructorfields=(fields)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endandValue:sigtypet=([`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t])(**
{%html:
<p>The kind of value.</p>
%}
[`Null_value]
{%html:
<p>Represents a null value.</p>
%}
[`Number_value]
{%html:
<p>Represents a double value.</p>
%}
[`String_value]
{%html:
<p>Represents a string value.</p>
%}
[`Bool_value]
{%html:
<p>Represents a boolean value.</p>
%}
[`Struct_value]
{%html:
<p>Represents a structured value.</p>
%}
[`List_value]
{%html:
<p>Represents a repeated <code>Value</code>.</p>
%}
*)valmake:?kind:[`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t]->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?kind:[`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t]->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end=structmoduleThis'_=Valueletname()=".google.protobuf.Value"typet=([`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t])typemake_t=?kind:[`not_set|`Null_valueofNullValue.t|`Number_valueoffloat|`String_valueofstring|`Bool_valueofbool|`Struct_valueofStruct.t|`List_valueofListValue.t]->unit->tletmake?(kind=`not_set)()=(kind)letmerge=letmerge_oneof_kind__Null_value=Runtime'.Merge.mergeRuntime'.Spec.(basic_req((0,"",""),(enum(moduleNullValue))))inletmerge_oneof_kind__Number_value=Runtime'.Merge.mergeRuntime'.Spec.(basic_req((0,"",""),double))inletmerge_oneof_kind__String_value=Runtime'.Merge.mergeRuntime'.Spec.(basic_req((0,"",""),string))inletmerge_oneof_kind__Bool_value=Runtime'.Merge.mergeRuntime'.Spec.(basic_req((0,"",""),bool))inletmerge_oneof_kind__Struct_value=Runtime'.Merge.mergeRuntime'.Spec.(basic_req((0,"",""),(message(moduleStruct))))inletmerge_oneof_kind__List_value=Runtime'.Merge.mergeRuntime'.Spec.(basic_req((0,"",""),(message(moduleListValue))))infun(t1_kind)(t2_kind)->match(t1_kind,t2_kind)with|(`Null_valuev1,`Null_valuev2)->`Null_value(merge_oneof_kind__Null_valuev1v2)|(`Number_valuev1,`Number_valuev2)->`Number_value(merge_oneof_kind__Number_valuev1v2)|(`String_valuev1,`String_valuev2)->`String_value(merge_oneof_kind__String_valuev1v2)|(`Bool_valuev1,`Bool_valuev2)->`Bool_value(merge_oneof_kind__Bool_valuev1v2)|(`Struct_valuev1,`Struct_valuev2)->`Struct_value(merge_oneof_kind__Struct_valuev1v2)|(`List_valuev1,`List_valuev2)->`List_value(merge_oneof_kind__List_valuev1v2)|(v1,`not_set)->v1|(_,v2)->v2letspec()=Runtime'.Spec.(oneof(([oneof_elem((1,"null_value","nullValue"),(enum(moduleNullValue)),((funv->`Null_valuev),(function`Null_valuev->v|_->raise(Invalid_argument"Cannot destruct given oneof"))));oneof_elem((2,"number_value","numberValue"),double,((funv->`Number_valuev),(function`Number_valuev->v|_->raise(Invalid_argument"Cannot destruct given oneof"))));oneof_elem((3,"string_value","stringValue"),string,((funv->`String_valuev),(function`String_valuev->v|_->raise(Invalid_argument"Cannot destruct given oneof"))));oneof_elem((4,"bool_value","boolValue"),bool,((funv->`Bool_valuev),(function`Bool_valuev->v|_->raise(Invalid_argument"Cannot destruct given oneof"))));oneof_elem((5,"struct_value","structValue"),(message(moduleStruct)),((funv->`Struct_valuev),(function`Struct_valuev->v|_->raise(Invalid_argument"Cannot destruct given oneof"))));oneof_elem((6,"list_value","listValue"),(message(moduleListValue)),((funv->`List_valuev),(function`List_valuev->v|_->raise(Invalid_argument"Cannot destruct given oneof"))))],(function|`not_set->failwith"Impossible case"|`Null_value_->0|`Number_value_->1|`String_value_->2|`Bool_value_->3|`Struct_value_->4|`List_value_->5)))^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter(kind)->serializewriterkindletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructorkind=(kind)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize.deserialize(spec())constructor)letfrom_protowriter=Runtime'.Result.catch(fun()->from_proto_exnwriter)letto_jsonoptions=letserialize=Runtime'.Serialize_json.serialize~message_name:(name())(spec())optionsinfun(kind)->serializekindletfrom_json_exn=letconstructorkind=(kind)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endandListValue:sigtypet=(Value.tlist)(**
{%html:
<p>Repeated field of dynamically typed values.</p>
%}
*)valmake:?values:Value.tlist->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?values:Value.tlist->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end=structmoduleThis'_=ListValueletname()=".google.protobuf.ListValue"typet=(Value.tlist)typemake_t=?values:Value.tlist->unit->tletmake?(values=[])()=(values)letmerge=letmerge_values=Runtime'.Merge.mergeRuntime'.Spec.(repeated((1,"values","values"),(message(moduleValue)),not_packed))infun(t1_values)(t2_values)->merge_valuest1_valuest2_valuesletspec()=Runtime'.Spec.(repeated((1,"values","values"),(message(moduleValue)),not_packed)^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter(values)->serializewritervaluesletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructorvalues=(values)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize.deserialize(spec())constructor)letfrom_protowriter=Runtime'.Result.catch(fun()->from_proto_exnwriter)letto_jsonoptions=letserialize=Runtime'.Serialize_json.serialize~message_name:(name())(spec())optionsinfun(values)->serializevaluesletfrom_json_exn=letconstructorvalues=(values)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endendend