1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662(********************************************************)(* AUTOGENERATED FILE - DO NOT EDIT! *)(********************************************************)(* Generated by: ocaml-protoc-plugin *)(* https://github.com/andersfugmann/ocaml-protoc-plugin *)(********************************************************)(*
Source: google/protobuf/type.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=structmoduleAny=AnymoduleSource_context=Source_contextend(**/**)modulerecGoogle:sigmodulerecProtobuf:sig(**
{%html:
<p>The syntax in which a protocol buffer element is defined.</p>
%}
*)modulerecSyntax:sigtypet=|SYNTAX_PROTO2(**
{%html:
<p>Syntax <code>proto2</code>.</p>
%}
*)|SYNTAX_PROTO3(**
{%html:
<p>Syntax <code>proto3</code>.</p>
%}
*)|SYNTAX_EDITIONS(**
{%html:
<p>Syntax <code>editions</code>.</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>A protocol buffer message type.</p>
<p>New usages of this message as an alternative to DescriptorProto are strongly
discouraged. This message does not reliability preserve all information
necessary to model the schema and preserve semantics. Instead make use of
FileDescriptorSet which preserves the necessary information.</p>
%}
*)andType:sigtypet={name:string;(**
{%html:
<p>The fully qualified message name.</p>
%}
*)fields:Field.tlist;(**
{%html:
<p>The list of fields.</p>
%}
*)oneofs:stringlist;(**
{%html:
<p>The list of types appearing in <code>oneof</code> definitions in this type.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>The protocol buffer options.</p>
%}
*)source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.toption;(**
{%html:
<p>The source context.</p>
%}
*)syntax:Syntax.t;(**
{%html:
<p>The source syntax.</p>
%}
*)edition:string;(**
{%html:
<p>The source edition string, only valid when syntax is SYNTAX_EDITIONS.</p>
%}
*)}valmake:?name:string->?fields:Field.tlist->?oneofs:stringlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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=?name:string->?fields:Field.tlist->?oneofs:stringlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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>A single field of a message type.</p>
<p>New usages of this message as an alternative to FieldDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.</p>
%}
*)andField:sig(**
{%html:
<p>Basic field types.</p>
%}
*)modulerecKind:sigtypet=|TYPE_UNKNOWN(**
{%html:
<p>Field type unknown.</p>
%}
*)|TYPE_DOUBLE(**
{%html:
<p>Field type double.</p>
%}
*)|TYPE_FLOAT(**
{%html:
<p>Field type float.</p>
%}
*)|TYPE_INT64(**
{%html:
<p>Field type int64.</p>
%}
*)|TYPE_UINT64(**
{%html:
<p>Field type uint64.</p>
%}
*)|TYPE_INT32(**
{%html:
<p>Field type int32.</p>
%}
*)|TYPE_FIXED64(**
{%html:
<p>Field type fixed64.</p>
%}
*)|TYPE_FIXED32(**
{%html:
<p>Field type fixed32.</p>
%}
*)|TYPE_BOOL(**
{%html:
<p>Field type bool.</p>
%}
*)|TYPE_STRING(**
{%html:
<p>Field type string.</p>
%}
*)|TYPE_GROUP(**
{%html:
<p>Field type group. Proto2 syntax only, and deprecated.</p>
%}
*)|TYPE_MESSAGE(**
{%html:
<p>Field type message.</p>
%}
*)|TYPE_BYTES(**
{%html:
<p>Field type bytes.</p>
%}
*)|TYPE_UINT32(**
{%html:
<p>Field type uint32.</p>
%}
*)|TYPE_ENUM(**
{%html:
<p>Field type enum.</p>
%}
*)|TYPE_SFIXED32(**
{%html:
<p>Field type sfixed32.</p>
%}
*)|TYPE_SFIXED64(**
{%html:
<p>Field type sfixed64.</p>
%}
*)|TYPE_SINT32(**
{%html:
<p>Field type sint32.</p>
%}
*)|TYPE_SINT64(**
{%html:
<p>Field type sint64.</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>Whether a field is optional, required, or repeated.</p>
%}
*)andCardinality:sigtypet=|CARDINALITY_UNKNOWN(**
{%html:
<p>For fields with unknown cardinality.</p>
%}
*)|CARDINALITY_OPTIONAL(**
{%html:
<p>For optional fields.</p>
%}
*)|CARDINALITY_REQUIRED(**
{%html:
<p>For required fields. Proto2 syntax only.</p>
%}
*)|CARDINALITY_REPEATED(**
{%html:
<p>For repeated fields.</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(**/**)endtypet={kind:Kind.t;(**
{%html:
<p>The field type.</p>
%}
*)cardinality:Cardinality.t;(**
{%html:
<p>The field cardinality.</p>
%}
*)number:int;(**
{%html:
<p>The field number.</p>
%}
*)name:string;(**
{%html:
<p>The field name.</p>
%}
*)type_url:string;(**
{%html:
<p>The field type URL, without the scheme, for message or enumeration
types. Example: <code>"type.googleapis.com/google.protobuf.Timestamp"</code>.</p>
%}
*)oneof_index:int;(**
{%html:
<p>The index of the field type in <code>Type.oneofs</code>, for message or enumeration
types. The first type has index 1; zero means the type is not in the list.</p>
%}
*)packed:bool;(**
{%html:
<p>Whether to use alternative packed wire representation.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>The protocol buffer options.</p>
%}
*)json_name:string;(**
{%html:
<p>The field JSON name.</p>
%}
*)default_value:string;(**
{%html:
<p>The string value of the default value of this field. Proto2 syntax only.</p>
%}
*)}valmake:?kind:Kind.t->?cardinality:Cardinality.t->?number:int->?name:string->?type_url:string->?oneof_index:int->?packed:bool->?options:Option.tlist->?json_name:string->?default_value:string->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:Kind.t->?cardinality:Cardinality.t->?number:int->?name:string->?type_url:string->?oneof_index:int->?packed:bool->?options:Option.tlist->?json_name:string->?default_value:string->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>Enum type definition.</p>
<p>New usages of this message as an alternative to EnumDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.</p>
%}
*)andEnum:sigtypet={name:string;(**
{%html:
<p>Enum type name.</p>
%}
*)enumvalue:EnumValue.tlist;(**
{%html:
<p>Enum value definitions.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>Protocol buffer options.</p>
%}
*)source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.toption;(**
{%html:
<p>The source context.</p>
%}
*)syntax:Syntax.t;(**
{%html:
<p>The source syntax.</p>
%}
*)edition:string;(**
{%html:
<p>The source edition string, only valid when syntax is SYNTAX_EDITIONS.</p>
%}
*)}valmake:?name:string->?enumvalue:EnumValue.tlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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=?name:string->?enumvalue:EnumValue.tlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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>Enum value definition.</p>
<p>New usages of this message as an alternative to EnumValueDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.</p>
%}
*)andEnumValue:sigtypet={name:string;(**
{%html:
<p>Enum value name.</p>
%}
*)number:int;(**
{%html:
<p>Enum value number.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>Protocol buffer options.</p>
%}
*)}valmake:?name:string->?number:int->?options:Option.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=?name:string->?number:int->?options:Option.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(**
{%html:
<p>A protocol buffer option, which can be attached to a message, field,
enumeration, etc.</p>
<p>New usages of this message as an alternative to FileOptions, MessageOptions,
FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
are strongly discouraged.</p>
%}
*)andOption:sigtypet={name:string;(**
{%html:
<p>The option's name. For protobuf built-in options (options defined in
descriptor.proto), this is the short name. For example, <code>"map_entry"</code>.
For custom options, it should be the fully-qualified name. For example,
<code>"google.api.http"</code>.</p>
%}
*)value:Imported'modules.Any.Google.Protobuf.Any.toption;(**
{%html:
<p>The option's value packed in an Any message. If the value is a primitive,
the corresponding wrapper type defined in google/protobuf/wrappers.proto
should be used. If the value is an enum, it should be stored as an int32
value using the google.protobuf.Int32Value type.</p>
%}
*)}valmake:?name:string->?value:Imported'modules.Any.Google.Protobuf.Any.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=?name:string->?value:Imported'modules.Any.Google.Protobuf.Any.t->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>The syntax in which a protocol buffer element is defined.</p>
%}
*)modulerecSyntax:sigtypet=|SYNTAX_PROTO2(**
{%html:
<p>Syntax <code>proto2</code>.</p>
%}
*)|SYNTAX_PROTO3(**
{%html:
<p>Syntax <code>proto3</code>.</p>
%}
*)|SYNTAX_EDITIONS(**
{%html:
<p>Syntax <code>editions</code>.</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>A protocol buffer message type.</p>
<p>New usages of this message as an alternative to DescriptorProto are strongly
discouraged. This message does not reliability preserve all information
necessary to model the schema and preserve semantics. Instead make use of
FileDescriptorSet which preserves the necessary information.</p>
%}
*)andType:sigtypet={name:string;(**
{%html:
<p>The fully qualified message name.</p>
%}
*)fields:Field.tlist;(**
{%html:
<p>The list of fields.</p>
%}
*)oneofs:stringlist;(**
{%html:
<p>The list of types appearing in <code>oneof</code> definitions in this type.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>The protocol buffer options.</p>
%}
*)source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.toption;(**
{%html:
<p>The source context.</p>
%}
*)syntax:Syntax.t;(**
{%html:
<p>The source syntax.</p>
%}
*)edition:string;(**
{%html:
<p>The source edition string, only valid when syntax is SYNTAX_EDITIONS.</p>
%}
*)}valmake:?name:string->?fields:Field.tlist->?oneofs:stringlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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=?name:string->?fields:Field.tlist->?oneofs:stringlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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>A single field of a message type.</p>
<p>New usages of this message as an alternative to FieldDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.</p>
%}
*)andField:sig(**
{%html:
<p>Basic field types.</p>
%}
*)modulerecKind:sigtypet=|TYPE_UNKNOWN(**
{%html:
<p>Field type unknown.</p>
%}
*)|TYPE_DOUBLE(**
{%html:
<p>Field type double.</p>
%}
*)|TYPE_FLOAT(**
{%html:
<p>Field type float.</p>
%}
*)|TYPE_INT64(**
{%html:
<p>Field type int64.</p>
%}
*)|TYPE_UINT64(**
{%html:
<p>Field type uint64.</p>
%}
*)|TYPE_INT32(**
{%html:
<p>Field type int32.</p>
%}
*)|TYPE_FIXED64(**
{%html:
<p>Field type fixed64.</p>
%}
*)|TYPE_FIXED32(**
{%html:
<p>Field type fixed32.</p>
%}
*)|TYPE_BOOL(**
{%html:
<p>Field type bool.</p>
%}
*)|TYPE_STRING(**
{%html:
<p>Field type string.</p>
%}
*)|TYPE_GROUP(**
{%html:
<p>Field type group. Proto2 syntax only, and deprecated.</p>
%}
*)|TYPE_MESSAGE(**
{%html:
<p>Field type message.</p>
%}
*)|TYPE_BYTES(**
{%html:
<p>Field type bytes.</p>
%}
*)|TYPE_UINT32(**
{%html:
<p>Field type uint32.</p>
%}
*)|TYPE_ENUM(**
{%html:
<p>Field type enum.</p>
%}
*)|TYPE_SFIXED32(**
{%html:
<p>Field type sfixed32.</p>
%}
*)|TYPE_SFIXED64(**
{%html:
<p>Field type sfixed64.</p>
%}
*)|TYPE_SINT32(**
{%html:
<p>Field type sint32.</p>
%}
*)|TYPE_SINT64(**
{%html:
<p>Field type sint64.</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>Whether a field is optional, required, or repeated.</p>
%}
*)andCardinality:sigtypet=|CARDINALITY_UNKNOWN(**
{%html:
<p>For fields with unknown cardinality.</p>
%}
*)|CARDINALITY_OPTIONAL(**
{%html:
<p>For optional fields.</p>
%}
*)|CARDINALITY_REQUIRED(**
{%html:
<p>For required fields. Proto2 syntax only.</p>
%}
*)|CARDINALITY_REPEATED(**
{%html:
<p>For repeated fields.</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(**/**)endtypet={kind:Kind.t;(**
{%html:
<p>The field type.</p>
%}
*)cardinality:Cardinality.t;(**
{%html:
<p>The field cardinality.</p>
%}
*)number:int;(**
{%html:
<p>The field number.</p>
%}
*)name:string;(**
{%html:
<p>The field name.</p>
%}
*)type_url:string;(**
{%html:
<p>The field type URL, without the scheme, for message or enumeration
types. Example: <code>"type.googleapis.com/google.protobuf.Timestamp"</code>.</p>
%}
*)oneof_index:int;(**
{%html:
<p>The index of the field type in <code>Type.oneofs</code>, for message or enumeration
types. The first type has index 1; zero means the type is not in the list.</p>
%}
*)packed:bool;(**
{%html:
<p>Whether to use alternative packed wire representation.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>The protocol buffer options.</p>
%}
*)json_name:string;(**
{%html:
<p>The field JSON name.</p>
%}
*)default_value:string;(**
{%html:
<p>The string value of the default value of this field. Proto2 syntax only.</p>
%}
*)}valmake:?kind:Kind.t->?cardinality:Cardinality.t->?number:int->?name:string->?type_url:string->?oneof_index:int->?packed:bool->?options:Option.tlist->?json_name:string->?default_value:string->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:Kind.t->?cardinality:Cardinality.t->?number:int->?name:string->?type_url:string->?oneof_index:int->?packed:bool->?options:Option.tlist->?json_name:string->?default_value:string->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>Enum type definition.</p>
<p>New usages of this message as an alternative to EnumDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.</p>
%}
*)andEnum:sigtypet={name:string;(**
{%html:
<p>Enum type name.</p>
%}
*)enumvalue:EnumValue.tlist;(**
{%html:
<p>Enum value definitions.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>Protocol buffer options.</p>
%}
*)source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.toption;(**
{%html:
<p>The source context.</p>
%}
*)syntax:Syntax.t;(**
{%html:
<p>The source syntax.</p>
%}
*)edition:string;(**
{%html:
<p>The source edition string, only valid when syntax is SYNTAX_EDITIONS.</p>
%}
*)}valmake:?name:string->?enumvalue:EnumValue.tlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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=?name:string->?enumvalue:EnumValue.tlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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>Enum value definition.</p>
<p>New usages of this message as an alternative to EnumValueDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.</p>
%}
*)andEnumValue:sigtypet={name:string;(**
{%html:
<p>Enum value name.</p>
%}
*)number:int;(**
{%html:
<p>Enum value number.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>Protocol buffer options.</p>
%}
*)}valmake:?name:string->?number:int->?options:Option.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=?name:string->?number:int->?options:Option.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(**
{%html:
<p>A protocol buffer option, which can be attached to a message, field,
enumeration, etc.</p>
<p>New usages of this message as an alternative to FileOptions, MessageOptions,
FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
are strongly discouraged.</p>
%}
*)andOption:sigtypet={name:string;(**
{%html:
<p>The option's name. For protobuf built-in options (options defined in
descriptor.proto), this is the short name. For example, <code>"map_entry"</code>.
For custom options, it should be the fully-qualified name. For example,
<code>"google.api.http"</code>.</p>
%}
*)value:Imported'modules.Any.Google.Protobuf.Any.toption;(**
{%html:
<p>The option's value packed in an Any message. If the value is a primitive,
the corresponding wrapper type defined in google/protobuf/wrappers.proto
should be used. If the value is an enum, it should be stored as an int32
value using the google.protobuf.Int32Value type.</p>
%}
*)}valmake:?name:string->?value:Imported'modules.Any.Google.Protobuf.Any.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=?name:string->?value:Imported'modules.Any.Google.Protobuf.Any.t->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)endend=structmodulerecSyntax:sigtypet=|SYNTAX_PROTO2(**
{%html:
<p>Syntax <code>proto2</code>.</p>
%}
*)|SYNTAX_PROTO3(**
{%html:
<p>Syntax <code>proto3</code>.</p>
%}
*)|SYNTAX_EDITIONS(**
{%html:
<p>Syntax <code>editions</code>.</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'_=Syntaxtypet=|SYNTAX_PROTO2(**
{%html:
<p>Syntax <code>proto2</code>.</p>
%}
*)|SYNTAX_PROTO3(**
{%html:
<p>Syntax <code>proto3</code>.</p>
%}
*)|SYNTAX_EDITIONS(**
{%html:
<p>Syntax <code>editions</code>.</p>
%}
*)letname()=".google.protobuf.Syntax"letto_int=function|SYNTAX_PROTO2->0|SYNTAX_PROTO3->1|SYNTAX_EDITIONS->2letfrom_int_exn=function|0->SYNTAX_PROTO2|1->SYNTAX_PROTO3|2->SYNTAX_EDITIONS|n->Runtime'.Result.raise(`Unknown_enum_valuen)letfrom_inte=Runtime'.Result.catch(fun()->from_int_exne)letto_string=function|SYNTAX_PROTO2->"SYNTAX_PROTO2"|SYNTAX_PROTO3->"SYNTAX_PROTO3"|SYNTAX_EDITIONS->"SYNTAX_EDITIONS"letfrom_string_exn=function|"SYNTAX_PROTO2"->SYNTAX_PROTO2|"SYNTAX_PROTO3"->SYNTAX_PROTO3|"SYNTAX_EDITIONS"->SYNTAX_EDITIONS|s->Runtime'.Result.raise(`Unknown_enum_names)endandType:sigtypet={name:string;(**
{%html:
<p>The fully qualified message name.</p>
%}
*)fields:Field.tlist;(**
{%html:
<p>The list of fields.</p>
%}
*)oneofs:stringlist;(**
{%html:
<p>The list of types appearing in <code>oneof</code> definitions in this type.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>The protocol buffer options.</p>
%}
*)source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.toption;(**
{%html:
<p>The source context.</p>
%}
*)syntax:Syntax.t;(**
{%html:
<p>The source syntax.</p>
%}
*)edition:string;(**
{%html:
<p>The source edition string, only valid when syntax is SYNTAX_EDITIONS.</p>
%}
*)}valmake:?name:string->?fields:Field.tlist->?oneofs:stringlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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=?name:string->?fields:Field.tlist->?oneofs:stringlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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'_=Typeletname()=".google.protobuf.Type"typet={name:string;fields:Field.tlist;oneofs:stringlist;options:Option.tlist;source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.toption;syntax:Syntax.t;edition:string;}typemake_t=?name:string->?fields:Field.tlist->?oneofs:stringlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->unit->tletmake?(name={||})?(fields=[])?(oneofs=[])?(options=[])?source_context?(syntax=Syntax.from_int_exn0)?(edition={||})()={name;fields;oneofs;options;source_context;syntax;edition}letmerge=letmerge_name=Runtime'.Merge.mergeRuntime'.Spec.(basic((1,"name","name"),string,({||})))inletmerge_fields=Runtime'.Merge.mergeRuntime'.Spec.(repeated((2,"fields","fields"),(message(moduleField)),not_packed))inletmerge_oneofs=Runtime'.Merge.mergeRuntime'.Spec.(repeated((3,"oneofs","oneofs"),string,not_packed))inletmerge_options=Runtime'.Merge.mergeRuntime'.Spec.(repeated((4,"options","options"),(message(moduleOption)),not_packed))inletmerge_source_context=Runtime'.Merge.mergeRuntime'.Spec.(basic_opt((5,"source_context","sourceContext"),(message(moduleImported'modules.Source_context.Google.Protobuf.SourceContext))))inletmerge_syntax=Runtime'.Merge.mergeRuntime'.Spec.(basic((6,"syntax","syntax"),(enum(moduleSyntax)),(Syntax.from_int_exn0)))inletmerge_edition=Runtime'.Merge.mergeRuntime'.Spec.(basic((7,"edition","edition"),string,({||})))infunt1t2->{name=(merge_namet1.namet2.name);fields=(merge_fieldst1.fieldst2.fields);oneofs=(merge_oneofst1.oneofst2.oneofs);options=(merge_optionst1.optionst2.options);source_context=(merge_source_contextt1.source_contextt2.source_context);syntax=(merge_syntaxt1.syntaxt2.syntax);edition=(merge_editiont1.editiont2.edition);}letspec()=Runtime'.Spec.(basic((1,"name","name"),string,({||}))^::repeated((2,"fields","fields"),(message(moduleField)),not_packed)^::repeated((3,"oneofs","oneofs"),string,not_packed)^::repeated((4,"options","options"),(message(moduleOption)),not_packed)^::basic_opt((5,"source_context","sourceContext"),(message(moduleImported'modules.Source_context.Google.Protobuf.SourceContext)))^::basic((6,"syntax","syntax"),(enum(moduleSyntax)),(Syntax.from_int_exn0))^::basic((7,"edition","edition"),string,({||}))^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter{name;fields;oneofs;options;source_context;syntax;edition}->serializewriternamefieldsoneofsoptionssource_contextsyntaxeditionletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructornamefieldsoneofsoptionssource_contextsyntaxedition={name;fields;oneofs;options;source_context;syntax;edition}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{name;fields;oneofs;options;source_context;syntax;edition}->serializenamefieldsoneofsoptionssource_contextsyntaxeditionletfrom_json_exn=letconstructornamefieldsoneofsoptionssource_contextsyntaxedition={name;fields;oneofs;options;source_context;syntax;edition}inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endandField:sig(**
{%html:
<p>Basic field types.</p>
%}
*)modulerecKind:sigtypet=|TYPE_UNKNOWN(**
{%html:
<p>Field type unknown.</p>
%}
*)|TYPE_DOUBLE(**
{%html:
<p>Field type double.</p>
%}
*)|TYPE_FLOAT(**
{%html:
<p>Field type float.</p>
%}
*)|TYPE_INT64(**
{%html:
<p>Field type int64.</p>
%}
*)|TYPE_UINT64(**
{%html:
<p>Field type uint64.</p>
%}
*)|TYPE_INT32(**
{%html:
<p>Field type int32.</p>
%}
*)|TYPE_FIXED64(**
{%html:
<p>Field type fixed64.</p>
%}
*)|TYPE_FIXED32(**
{%html:
<p>Field type fixed32.</p>
%}
*)|TYPE_BOOL(**
{%html:
<p>Field type bool.</p>
%}
*)|TYPE_STRING(**
{%html:
<p>Field type string.</p>
%}
*)|TYPE_GROUP(**
{%html:
<p>Field type group. Proto2 syntax only, and deprecated.</p>
%}
*)|TYPE_MESSAGE(**
{%html:
<p>Field type message.</p>
%}
*)|TYPE_BYTES(**
{%html:
<p>Field type bytes.</p>
%}
*)|TYPE_UINT32(**
{%html:
<p>Field type uint32.</p>
%}
*)|TYPE_ENUM(**
{%html:
<p>Field type enum.</p>
%}
*)|TYPE_SFIXED32(**
{%html:
<p>Field type sfixed32.</p>
%}
*)|TYPE_SFIXED64(**
{%html:
<p>Field type sfixed64.</p>
%}
*)|TYPE_SINT32(**
{%html:
<p>Field type sint32.</p>
%}
*)|TYPE_SINT64(**
{%html:
<p>Field type sint64.</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>Whether a field is optional, required, or repeated.</p>
%}
*)andCardinality:sigtypet=|CARDINALITY_UNKNOWN(**
{%html:
<p>For fields with unknown cardinality.</p>
%}
*)|CARDINALITY_OPTIONAL(**
{%html:
<p>For optional fields.</p>
%}
*)|CARDINALITY_REQUIRED(**
{%html:
<p>For required fields. Proto2 syntax only.</p>
%}
*)|CARDINALITY_REPEATED(**
{%html:
<p>For repeated fields.</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(**/**)endtypet={kind:Kind.t;(**
{%html:
<p>The field type.</p>
%}
*)cardinality:Cardinality.t;(**
{%html:
<p>The field cardinality.</p>
%}
*)number:int;(**
{%html:
<p>The field number.</p>
%}
*)name:string;(**
{%html:
<p>The field name.</p>
%}
*)type_url:string;(**
{%html:
<p>The field type URL, without the scheme, for message or enumeration
types. Example: <code>"type.googleapis.com/google.protobuf.Timestamp"</code>.</p>
%}
*)oneof_index:int;(**
{%html:
<p>The index of the field type in <code>Type.oneofs</code>, for message or enumeration
types. The first type has index 1; zero means the type is not in the list.</p>
%}
*)packed:bool;(**
{%html:
<p>Whether to use alternative packed wire representation.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>The protocol buffer options.</p>
%}
*)json_name:string;(**
{%html:
<p>The field JSON name.</p>
%}
*)default_value:string;(**
{%html:
<p>The string value of the default value of this field. Proto2 syntax only.</p>
%}
*)}valmake:?kind:Kind.t->?cardinality:Cardinality.t->?number:int->?name:string->?type_url:string->?oneof_index:int->?packed:bool->?options:Option.tlist->?json_name:string->?default_value:string->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:Kind.t->?cardinality:Cardinality.t->?number:int->?name:string->?type_url:string->?oneof_index:int->?packed:bool->?options:Option.tlist->?json_name:string->?default_value:string->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'_=FieldmodulerecKind:sigtypet=|TYPE_UNKNOWN(**
{%html:
<p>Field type unknown.</p>
%}
*)|TYPE_DOUBLE(**
{%html:
<p>Field type double.</p>
%}
*)|TYPE_FLOAT(**
{%html:
<p>Field type float.</p>
%}
*)|TYPE_INT64(**
{%html:
<p>Field type int64.</p>
%}
*)|TYPE_UINT64(**
{%html:
<p>Field type uint64.</p>
%}
*)|TYPE_INT32(**
{%html:
<p>Field type int32.</p>
%}
*)|TYPE_FIXED64(**
{%html:
<p>Field type fixed64.</p>
%}
*)|TYPE_FIXED32(**
{%html:
<p>Field type fixed32.</p>
%}
*)|TYPE_BOOL(**
{%html:
<p>Field type bool.</p>
%}
*)|TYPE_STRING(**
{%html:
<p>Field type string.</p>
%}
*)|TYPE_GROUP(**
{%html:
<p>Field type group. Proto2 syntax only, and deprecated.</p>
%}
*)|TYPE_MESSAGE(**
{%html:
<p>Field type message.</p>
%}
*)|TYPE_BYTES(**
{%html:
<p>Field type bytes.</p>
%}
*)|TYPE_UINT32(**
{%html:
<p>Field type uint32.</p>
%}
*)|TYPE_ENUM(**
{%html:
<p>Field type enum.</p>
%}
*)|TYPE_SFIXED32(**
{%html:
<p>Field type sfixed32.</p>
%}
*)|TYPE_SFIXED64(**
{%html:
<p>Field type sfixed64.</p>
%}
*)|TYPE_SINT32(**
{%html:
<p>Field type sint32.</p>
%}
*)|TYPE_SINT64(**
{%html:
<p>Field type sint64.</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'_=Kindtypet=|TYPE_UNKNOWN(**
{%html:
<p>Field type unknown.</p>
%}
*)|TYPE_DOUBLE(**
{%html:
<p>Field type double.</p>
%}
*)|TYPE_FLOAT(**
{%html:
<p>Field type float.</p>
%}
*)|TYPE_INT64(**
{%html:
<p>Field type int64.</p>
%}
*)|TYPE_UINT64(**
{%html:
<p>Field type uint64.</p>
%}
*)|TYPE_INT32(**
{%html:
<p>Field type int32.</p>
%}
*)|TYPE_FIXED64(**
{%html:
<p>Field type fixed64.</p>
%}
*)|TYPE_FIXED32(**
{%html:
<p>Field type fixed32.</p>
%}
*)|TYPE_BOOL(**
{%html:
<p>Field type bool.</p>
%}
*)|TYPE_STRING(**
{%html:
<p>Field type string.</p>
%}
*)|TYPE_GROUP(**
{%html:
<p>Field type group. Proto2 syntax only, and deprecated.</p>
%}
*)|TYPE_MESSAGE(**
{%html:
<p>Field type message.</p>
%}
*)|TYPE_BYTES(**
{%html:
<p>Field type bytes.</p>
%}
*)|TYPE_UINT32(**
{%html:
<p>Field type uint32.</p>
%}
*)|TYPE_ENUM(**
{%html:
<p>Field type enum.</p>
%}
*)|TYPE_SFIXED32(**
{%html:
<p>Field type sfixed32.</p>
%}
*)|TYPE_SFIXED64(**
{%html:
<p>Field type sfixed64.</p>
%}
*)|TYPE_SINT32(**
{%html:
<p>Field type sint32.</p>
%}
*)|TYPE_SINT64(**
{%html:
<p>Field type sint64.</p>
%}
*)letname()=".google.protobuf.Field.Kind"letto_int=function|TYPE_UNKNOWN->0|TYPE_DOUBLE->1|TYPE_FLOAT->2|TYPE_INT64->3|TYPE_UINT64->4|TYPE_INT32->5|TYPE_FIXED64->6|TYPE_FIXED32->7|TYPE_BOOL->8|TYPE_STRING->9|TYPE_GROUP->10|TYPE_MESSAGE->11|TYPE_BYTES->12|TYPE_UINT32->13|TYPE_ENUM->14|TYPE_SFIXED32->15|TYPE_SFIXED64->16|TYPE_SINT32->17|TYPE_SINT64->18letfrom_int_exn=function|0->TYPE_UNKNOWN|1->TYPE_DOUBLE|2->TYPE_FLOAT|3->TYPE_INT64|4->TYPE_UINT64|5->TYPE_INT32|6->TYPE_FIXED64|7->TYPE_FIXED32|8->TYPE_BOOL|9->TYPE_STRING|10->TYPE_GROUP|11->TYPE_MESSAGE|12->TYPE_BYTES|13->TYPE_UINT32|14->TYPE_ENUM|15->TYPE_SFIXED32|16->TYPE_SFIXED64|17->TYPE_SINT32|18->TYPE_SINT64|n->Runtime'.Result.raise(`Unknown_enum_valuen)letfrom_inte=Runtime'.Result.catch(fun()->from_int_exne)letto_string=function|TYPE_UNKNOWN->"TYPE_UNKNOWN"|TYPE_DOUBLE->"TYPE_DOUBLE"|TYPE_FLOAT->"TYPE_FLOAT"|TYPE_INT64->"TYPE_INT64"|TYPE_UINT64->"TYPE_UINT64"|TYPE_INT32->"TYPE_INT32"|TYPE_FIXED64->"TYPE_FIXED64"|TYPE_FIXED32->"TYPE_FIXED32"|TYPE_BOOL->"TYPE_BOOL"|TYPE_STRING->"TYPE_STRING"|TYPE_GROUP->"TYPE_GROUP"|TYPE_MESSAGE->"TYPE_MESSAGE"|TYPE_BYTES->"TYPE_BYTES"|TYPE_UINT32->"TYPE_UINT32"|TYPE_ENUM->"TYPE_ENUM"|TYPE_SFIXED32->"TYPE_SFIXED32"|TYPE_SFIXED64->"TYPE_SFIXED64"|TYPE_SINT32->"TYPE_SINT32"|TYPE_SINT64->"TYPE_SINT64"letfrom_string_exn=function|"TYPE_UNKNOWN"->TYPE_UNKNOWN|"TYPE_DOUBLE"->TYPE_DOUBLE|"TYPE_FLOAT"->TYPE_FLOAT|"TYPE_INT64"->TYPE_INT64|"TYPE_UINT64"->TYPE_UINT64|"TYPE_INT32"->TYPE_INT32|"TYPE_FIXED64"->TYPE_FIXED64|"TYPE_FIXED32"->TYPE_FIXED32|"TYPE_BOOL"->TYPE_BOOL|"TYPE_STRING"->TYPE_STRING|"TYPE_GROUP"->TYPE_GROUP|"TYPE_MESSAGE"->TYPE_MESSAGE|"TYPE_BYTES"->TYPE_BYTES|"TYPE_UINT32"->TYPE_UINT32|"TYPE_ENUM"->TYPE_ENUM|"TYPE_SFIXED32"->TYPE_SFIXED32|"TYPE_SFIXED64"->TYPE_SFIXED64|"TYPE_SINT32"->TYPE_SINT32|"TYPE_SINT64"->TYPE_SINT64|s->Runtime'.Result.raise(`Unknown_enum_names)endandCardinality:sigtypet=|CARDINALITY_UNKNOWN(**
{%html:
<p>For fields with unknown cardinality.</p>
%}
*)|CARDINALITY_OPTIONAL(**
{%html:
<p>For optional fields.</p>
%}
*)|CARDINALITY_REQUIRED(**
{%html:
<p>For required fields. Proto2 syntax only.</p>
%}
*)|CARDINALITY_REPEATED(**
{%html:
<p>For repeated fields.</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'_=Cardinalitytypet=|CARDINALITY_UNKNOWN(**
{%html:
<p>For fields with unknown cardinality.</p>
%}
*)|CARDINALITY_OPTIONAL(**
{%html:
<p>For optional fields.</p>
%}
*)|CARDINALITY_REQUIRED(**
{%html:
<p>For required fields. Proto2 syntax only.</p>
%}
*)|CARDINALITY_REPEATED(**
{%html:
<p>For repeated fields.</p>
%}
*)letname()=".google.protobuf.Field.Cardinality"letto_int=function|CARDINALITY_UNKNOWN->0|CARDINALITY_OPTIONAL->1|CARDINALITY_REQUIRED->2|CARDINALITY_REPEATED->3letfrom_int_exn=function|0->CARDINALITY_UNKNOWN|1->CARDINALITY_OPTIONAL|2->CARDINALITY_REQUIRED|3->CARDINALITY_REPEATED|n->Runtime'.Result.raise(`Unknown_enum_valuen)letfrom_inte=Runtime'.Result.catch(fun()->from_int_exne)letto_string=function|CARDINALITY_UNKNOWN->"CARDINALITY_UNKNOWN"|CARDINALITY_OPTIONAL->"CARDINALITY_OPTIONAL"|CARDINALITY_REQUIRED->"CARDINALITY_REQUIRED"|CARDINALITY_REPEATED->"CARDINALITY_REPEATED"letfrom_string_exn=function|"CARDINALITY_UNKNOWN"->CARDINALITY_UNKNOWN|"CARDINALITY_OPTIONAL"->CARDINALITY_OPTIONAL|"CARDINALITY_REQUIRED"->CARDINALITY_REQUIRED|"CARDINALITY_REPEATED"->CARDINALITY_REPEATED|s->Runtime'.Result.raise(`Unknown_enum_names)endletname()=".google.protobuf.Field"typet={kind:Kind.t;cardinality:Cardinality.t;number:int;name:string;type_url:string;oneof_index:int;packed:bool;options:Option.tlist;json_name:string;default_value:string;}typemake_t=?kind:Kind.t->?cardinality:Cardinality.t->?number:int->?name:string->?type_url:string->?oneof_index:int->?packed:bool->?options:Option.tlist->?json_name:string->?default_value:string->unit->tletmake?(kind=Kind.from_int_exn0)?(cardinality=Cardinality.from_int_exn0)?(number=0)?(name={||})?(type_url={||})?(oneof_index=0)?(packed=false)?(options=[])?(json_name={||})?(default_value={||})()={kind;cardinality;number;name;type_url;oneof_index;packed;options;json_name;default_value}letmerge=letmerge_kind=Runtime'.Merge.mergeRuntime'.Spec.(basic((1,"kind","kind"),(enum(moduleKind)),(Kind.from_int_exn0)))inletmerge_cardinality=Runtime'.Merge.mergeRuntime'.Spec.(basic((2,"cardinality","cardinality"),(enum(moduleCardinality)),(Cardinality.from_int_exn0)))inletmerge_number=Runtime'.Merge.mergeRuntime'.Spec.(basic((3,"number","number"),int32_int,(0)))inletmerge_name=Runtime'.Merge.mergeRuntime'.Spec.(basic((4,"name","name"),string,({||})))inletmerge_type_url=Runtime'.Merge.mergeRuntime'.Spec.(basic((6,"type_url","typeUrl"),string,({||})))inletmerge_oneof_index=Runtime'.Merge.mergeRuntime'.Spec.(basic((7,"oneof_index","oneofIndex"),int32_int,(0)))inletmerge_packed=Runtime'.Merge.mergeRuntime'.Spec.(basic((8,"packed","packed"),bool,(false)))inletmerge_options=Runtime'.Merge.mergeRuntime'.Spec.(repeated((9,"options","options"),(message(moduleOption)),not_packed))inletmerge_json_name=Runtime'.Merge.mergeRuntime'.Spec.(basic((10,"json_name","jsonName"),string,({||})))inletmerge_default_value=Runtime'.Merge.mergeRuntime'.Spec.(basic((11,"default_value","defaultValue"),string,({||})))infunt1t2->{kind=(merge_kindt1.kindt2.kind);cardinality=(merge_cardinalityt1.cardinalityt2.cardinality);number=(merge_numbert1.numbert2.number);name=(merge_namet1.namet2.name);type_url=(merge_type_urlt1.type_urlt2.type_url);oneof_index=(merge_oneof_indext1.oneof_indext2.oneof_index);packed=(merge_packedt1.packedt2.packed);options=(merge_optionst1.optionst2.options);json_name=(merge_json_namet1.json_namet2.json_name);default_value=(merge_default_valuet1.default_valuet2.default_value);}letspec()=Runtime'.Spec.(basic((1,"kind","kind"),(enum(moduleKind)),(Kind.from_int_exn0))^::basic((2,"cardinality","cardinality"),(enum(moduleCardinality)),(Cardinality.from_int_exn0))^::basic((3,"number","number"),int32_int,(0))^::basic((4,"name","name"),string,({||}))^::basic((6,"type_url","typeUrl"),string,({||}))^::basic((7,"oneof_index","oneofIndex"),int32_int,(0))^::basic((8,"packed","packed"),bool,(false))^::repeated((9,"options","options"),(message(moduleOption)),not_packed)^::basic((10,"json_name","jsonName"),string,({||}))^::basic((11,"default_value","defaultValue"),string,({||}))^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter{kind;cardinality;number;name;type_url;oneof_index;packed;options;json_name;default_value}->serializewriterkindcardinalitynumbernametype_urloneof_indexpackedoptionsjson_namedefault_valueletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructorkindcardinalitynumbernametype_urloneof_indexpackedoptionsjson_namedefault_value={kind;cardinality;number;name;type_url;oneof_index;packed;options;json_name;default_value}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;cardinality;number;name;type_url;oneof_index;packed;options;json_name;default_value}->serializekindcardinalitynumbernametype_urloneof_indexpackedoptionsjson_namedefault_valueletfrom_json_exn=letconstructorkindcardinalitynumbernametype_urloneof_indexpackedoptionsjson_namedefault_value={kind;cardinality;number;name;type_url;oneof_index;packed;options;json_name;default_value}inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endandEnum:sigtypet={name:string;(**
{%html:
<p>Enum type name.</p>
%}
*)enumvalue:EnumValue.tlist;(**
{%html:
<p>Enum value definitions.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>Protocol buffer options.</p>
%}
*)source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.toption;(**
{%html:
<p>The source context.</p>
%}
*)syntax:Syntax.t;(**
{%html:
<p>The source syntax.</p>
%}
*)edition:string;(**
{%html:
<p>The source edition string, only valid when syntax is SYNTAX_EDITIONS.</p>
%}
*)}valmake:?name:string->?enumvalue:EnumValue.tlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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=?name:string->?enumvalue:EnumValue.tlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->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'_=Enumletname()=".google.protobuf.Enum"typet={name:string;enumvalue:EnumValue.tlist;options:Option.tlist;source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.toption;syntax:Syntax.t;edition:string;}typemake_t=?name:string->?enumvalue:EnumValue.tlist->?options:Option.tlist->?source_context:Imported'modules.Source_context.Google.Protobuf.SourceContext.t->?syntax:Syntax.t->?edition:string->unit->tletmake?(name={||})?(enumvalue=[])?(options=[])?source_context?(syntax=Syntax.from_int_exn0)?(edition={||})()={name;enumvalue;options;source_context;syntax;edition}letmerge=letmerge_name=Runtime'.Merge.mergeRuntime'.Spec.(basic((1,"name","name"),string,({||})))inletmerge_enumvalue=Runtime'.Merge.mergeRuntime'.Spec.(repeated((2,"enumvalue","enumvalue"),(message(moduleEnumValue)),not_packed))inletmerge_options=Runtime'.Merge.mergeRuntime'.Spec.(repeated((3,"options","options"),(message(moduleOption)),not_packed))inletmerge_source_context=Runtime'.Merge.mergeRuntime'.Spec.(basic_opt((4,"source_context","sourceContext"),(message(moduleImported'modules.Source_context.Google.Protobuf.SourceContext))))inletmerge_syntax=Runtime'.Merge.mergeRuntime'.Spec.(basic((5,"syntax","syntax"),(enum(moduleSyntax)),(Syntax.from_int_exn0)))inletmerge_edition=Runtime'.Merge.mergeRuntime'.Spec.(basic((6,"edition","edition"),string,({||})))infunt1t2->{name=(merge_namet1.namet2.name);enumvalue=(merge_enumvaluet1.enumvaluet2.enumvalue);options=(merge_optionst1.optionst2.options);source_context=(merge_source_contextt1.source_contextt2.source_context);syntax=(merge_syntaxt1.syntaxt2.syntax);edition=(merge_editiont1.editiont2.edition);}letspec()=Runtime'.Spec.(basic((1,"name","name"),string,({||}))^::repeated((2,"enumvalue","enumvalue"),(message(moduleEnumValue)),not_packed)^::repeated((3,"options","options"),(message(moduleOption)),not_packed)^::basic_opt((4,"source_context","sourceContext"),(message(moduleImported'modules.Source_context.Google.Protobuf.SourceContext)))^::basic((5,"syntax","syntax"),(enum(moduleSyntax)),(Syntax.from_int_exn0))^::basic((6,"edition","edition"),string,({||}))^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter{name;enumvalue;options;source_context;syntax;edition}->serializewriternameenumvalueoptionssource_contextsyntaxeditionletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructornameenumvalueoptionssource_contextsyntaxedition={name;enumvalue;options;source_context;syntax;edition}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{name;enumvalue;options;source_context;syntax;edition}->serializenameenumvalueoptionssource_contextsyntaxeditionletfrom_json_exn=letconstructornameenumvalueoptionssource_contextsyntaxedition={name;enumvalue;options;source_context;syntax;edition}inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endandEnumValue:sigtypet={name:string;(**
{%html:
<p>Enum value name.</p>
%}
*)number:int;(**
{%html:
<p>Enum value number.</p>
%}
*)options:Option.tlist;(**
{%html:
<p>Protocol buffer options.</p>
%}
*)}valmake:?name:string->?number:int->?options:Option.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=?name:string->?number:int->?options:Option.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'_=EnumValueletname()=".google.protobuf.EnumValue"typet={name:string;number:int;options:Option.tlist;}typemake_t=?name:string->?number:int->?options:Option.tlist->unit->tletmake?(name={||})?(number=0)?(options=[])()={name;number;options}letmerge=letmerge_name=Runtime'.Merge.mergeRuntime'.Spec.(basic((1,"name","name"),string,({||})))inletmerge_number=Runtime'.Merge.mergeRuntime'.Spec.(basic((2,"number","number"),int32_int,(0)))inletmerge_options=Runtime'.Merge.mergeRuntime'.Spec.(repeated((3,"options","options"),(message(moduleOption)),not_packed))infunt1t2->{name=(merge_namet1.namet2.name);number=(merge_numbert1.numbert2.number);options=(merge_optionst1.optionst2.options);}letspec()=Runtime'.Spec.(basic((1,"name","name"),string,({||}))^::basic((2,"number","number"),int32_int,(0))^::repeated((3,"options","options"),(message(moduleOption)),not_packed)^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter{name;number;options}->serializewriternamenumberoptionsletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructornamenumberoptions={name;number;options}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{name;number;options}->serializenamenumberoptionsletfrom_json_exn=letconstructornamenumberoptions={name;number;options}inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endandOption:sigtypet={name:string;(**
{%html:
<p>The option's name. For protobuf built-in options (options defined in
descriptor.proto), this is the short name. For example, <code>"map_entry"</code>.
For custom options, it should be the fully-qualified name. For example,
<code>"google.api.http"</code>.</p>
%}
*)value:Imported'modules.Any.Google.Protobuf.Any.toption;(**
{%html:
<p>The option's value packed in an Any message. If the value is a primitive,
the corresponding wrapper type defined in google/protobuf/wrappers.proto
should be used. If the value is an enum, it should be stored as an int32
value using the google.protobuf.Int32Value type.</p>
%}
*)}valmake:?name:string->?value:Imported'modules.Any.Google.Protobuf.Any.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=?name:string->?value:Imported'modules.Any.Google.Protobuf.Any.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'_=Optionletname()=".google.protobuf.Option"typet={name:string;value:Imported'modules.Any.Google.Protobuf.Any.toption;}typemake_t=?name:string->?value:Imported'modules.Any.Google.Protobuf.Any.t->unit->tletmake?(name={||})?value()={name;value}letmerge=letmerge_name=Runtime'.Merge.mergeRuntime'.Spec.(basic((1,"name","name"),string,({||})))inletmerge_value=Runtime'.Merge.mergeRuntime'.Spec.(basic_opt((2,"value","value"),(message(moduleImported'modules.Any.Google.Protobuf.Any))))infunt1t2->{name=(merge_namet1.namet2.name);value=(merge_valuet1.valuet2.value);}letspec()=Runtime'.Spec.(basic((1,"name","name"),string,({||}))^::basic_opt((2,"value","value"),(message(moduleImported'modules.Any.Google.Protobuf.Any)))^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter{name;value}->serializewriternamevalueletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructornamevalue={name;value}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{name;value}->serializenamevalueletfrom_json_exn=letconstructornamevalue={name;value}inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endendend