descriptor.upb.h 156 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373
  1. /* This file was generated by upbc (the upb compiler) from the input
  2. * file:
  3. *
  4. * google/protobuf/descriptor.proto
  5. *
  6. * Do not edit -- your changes will be discarded when the file is
  7. * regenerated. */
  8. #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
  9. #define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
  10. #include "upb/msg_internal.h"
  11. #include "upb/decode.h"
  12. #include "upb/decode_fast.h"
  13. #include "upb/encode.h"
  14. #include "upb/port_def.inc"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. struct google_protobuf_FileDescriptorSet;
  19. struct google_protobuf_FileDescriptorProto;
  20. struct google_protobuf_DescriptorProto;
  21. struct google_protobuf_DescriptorProto_ExtensionRange;
  22. struct google_protobuf_DescriptorProto_ReservedRange;
  23. struct google_protobuf_ExtensionRangeOptions;
  24. struct google_protobuf_FieldDescriptorProto;
  25. struct google_protobuf_OneofDescriptorProto;
  26. struct google_protobuf_EnumDescriptorProto;
  27. struct google_protobuf_EnumDescriptorProto_EnumReservedRange;
  28. struct google_protobuf_EnumValueDescriptorProto;
  29. struct google_protobuf_ServiceDescriptorProto;
  30. struct google_protobuf_MethodDescriptorProto;
  31. struct google_protobuf_FileOptions;
  32. struct google_protobuf_MessageOptions;
  33. struct google_protobuf_FieldOptions;
  34. struct google_protobuf_OneofOptions;
  35. struct google_protobuf_EnumOptions;
  36. struct google_protobuf_EnumValueOptions;
  37. struct google_protobuf_ServiceOptions;
  38. struct google_protobuf_MethodOptions;
  39. struct google_protobuf_UninterpretedOption;
  40. struct google_protobuf_UninterpretedOption_NamePart;
  41. struct google_protobuf_SourceCodeInfo;
  42. struct google_protobuf_SourceCodeInfo_Location;
  43. struct google_protobuf_GeneratedCodeInfo;
  44. struct google_protobuf_GeneratedCodeInfo_Annotation;
  45. typedef struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet;
  46. typedef struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto;
  47. typedef struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto;
  48. typedef struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange;
  49. typedef struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange;
  50. typedef struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions;
  51. typedef struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto;
  52. typedef struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto;
  53. typedef struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto;
  54. typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange;
  55. typedef struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto;
  56. typedef struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto;
  57. typedef struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto;
  58. typedef struct google_protobuf_FileOptions google_protobuf_FileOptions;
  59. typedef struct google_protobuf_MessageOptions google_protobuf_MessageOptions;
  60. typedef struct google_protobuf_FieldOptions google_protobuf_FieldOptions;
  61. typedef struct google_protobuf_OneofOptions google_protobuf_OneofOptions;
  62. typedef struct google_protobuf_EnumOptions google_protobuf_EnumOptions;
  63. typedef struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions;
  64. typedef struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions;
  65. typedef struct google_protobuf_MethodOptions google_protobuf_MethodOptions;
  66. typedef struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption;
  67. typedef struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart;
  68. typedef struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo;
  69. typedef struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location;
  70. typedef struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo;
  71. typedef struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation;
  72. extern const upb_MiniTable google_protobuf_FileDescriptorSet_msginit;
  73. extern const upb_MiniTable google_protobuf_FileDescriptorProto_msginit;
  74. extern const upb_MiniTable google_protobuf_DescriptorProto_msginit;
  75. extern const upb_MiniTable google_protobuf_DescriptorProto_ExtensionRange_msginit;
  76. extern const upb_MiniTable google_protobuf_DescriptorProto_ReservedRange_msginit;
  77. extern const upb_MiniTable google_protobuf_ExtensionRangeOptions_msginit;
  78. extern const upb_MiniTable google_protobuf_FieldDescriptorProto_msginit;
  79. extern const upb_MiniTable google_protobuf_OneofDescriptorProto_msginit;
  80. extern const upb_MiniTable google_protobuf_EnumDescriptorProto_msginit;
  81. extern const upb_MiniTable google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit;
  82. extern const upb_MiniTable google_protobuf_EnumValueDescriptorProto_msginit;
  83. extern const upb_MiniTable google_protobuf_ServiceDescriptorProto_msginit;
  84. extern const upb_MiniTable google_protobuf_MethodDescriptorProto_msginit;
  85. extern const upb_MiniTable google_protobuf_FileOptions_msginit;
  86. extern const upb_MiniTable google_protobuf_MessageOptions_msginit;
  87. extern const upb_MiniTable google_protobuf_FieldOptions_msginit;
  88. extern const upb_MiniTable google_protobuf_OneofOptions_msginit;
  89. extern const upb_MiniTable google_protobuf_EnumOptions_msginit;
  90. extern const upb_MiniTable google_protobuf_EnumValueOptions_msginit;
  91. extern const upb_MiniTable google_protobuf_ServiceOptions_msginit;
  92. extern const upb_MiniTable google_protobuf_MethodOptions_msginit;
  93. extern const upb_MiniTable google_protobuf_UninterpretedOption_msginit;
  94. extern const upb_MiniTable google_protobuf_UninterpretedOption_NamePart_msginit;
  95. extern const upb_MiniTable google_protobuf_SourceCodeInfo_msginit;
  96. extern const upb_MiniTable google_protobuf_SourceCodeInfo_Location_msginit;
  97. extern const upb_MiniTable google_protobuf_GeneratedCodeInfo_msginit;
  98. extern const upb_MiniTable google_protobuf_GeneratedCodeInfo_Annotation_msginit;
  99. typedef enum {
  100. google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1,
  101. google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2,
  102. google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3
  103. } google_protobuf_FieldDescriptorProto_Label;
  104. typedef enum {
  105. google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1,
  106. google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2,
  107. google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3,
  108. google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4,
  109. google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5,
  110. google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6,
  111. google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7,
  112. google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8,
  113. google_protobuf_FieldDescriptorProto_TYPE_STRING = 9,
  114. google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10,
  115. google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11,
  116. google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12,
  117. google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13,
  118. google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14,
  119. google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15,
  120. google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16,
  121. google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17,
  122. google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18
  123. } google_protobuf_FieldDescriptorProto_Type;
  124. typedef enum {
  125. google_protobuf_FieldOptions_STRING = 0,
  126. google_protobuf_FieldOptions_CORD = 1,
  127. google_protobuf_FieldOptions_STRING_PIECE = 2
  128. } google_protobuf_FieldOptions_CType;
  129. typedef enum {
  130. google_protobuf_FieldOptions_JS_NORMAL = 0,
  131. google_protobuf_FieldOptions_JS_STRING = 1,
  132. google_protobuf_FieldOptions_JS_NUMBER = 2
  133. } google_protobuf_FieldOptions_JSType;
  134. typedef enum {
  135. google_protobuf_FileOptions_SPEED = 1,
  136. google_protobuf_FileOptions_CODE_SIZE = 2,
  137. google_protobuf_FileOptions_LITE_RUNTIME = 3
  138. } google_protobuf_FileOptions_OptimizeMode;
  139. typedef enum {
  140. google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN = 0,
  141. google_protobuf_MethodOptions_NO_SIDE_EFFECTS = 1,
  142. google_protobuf_MethodOptions_IDEMPOTENT = 2
  143. } google_protobuf_MethodOptions_IdempotencyLevel;
  144. extern const upb_MiniTable_Enum google_protobuf_FieldDescriptorProto_Label_enuminit;
  145. extern const upb_MiniTable_Enum google_protobuf_FieldDescriptorProto_Type_enuminit;
  146. extern const upb_MiniTable_Enum google_protobuf_FieldOptions_CType_enuminit;
  147. extern const upb_MiniTable_Enum google_protobuf_FieldOptions_JSType_enuminit;
  148. extern const upb_MiniTable_Enum google_protobuf_FileOptions_OptimizeMode_enuminit;
  149. extern const upb_MiniTable_Enum google_protobuf_MethodOptions_IdempotencyLevel_enuminit;
  150. /* google.protobuf.FileDescriptorSet */
  151. UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_new(upb_Arena* arena) {
  152. return (google_protobuf_FileDescriptorSet*)_upb_Message_New(&google_protobuf_FileDescriptorSet_msginit, arena);
  153. }
  154. UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse(const char* buf, size_t size, upb_Arena* arena) {
  155. google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena);
  156. if (!ret) return NULL;
  157. if (upb_Decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  158. return NULL;
  159. }
  160. return ret;
  161. }
  162. UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse_ex(const char* buf, size_t size,
  163. const upb_ExtensionRegistry* extreg,
  164. int options, upb_Arena* arena) {
  165. google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena);
  166. if (!ret) return NULL;
  167. if (upb_Decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, extreg, options, arena) !=
  168. kUpb_DecodeStatus_Ok) {
  169. return NULL;
  170. }
  171. return ret;
  172. }
  173. UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet* msg, upb_Arena* arena, size_t* len) {
  174. return upb_Encode(msg, &google_protobuf_FileDescriptorSet_msginit, 0, arena, len);
  175. }
  176. UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize_ex(const google_protobuf_FileDescriptorSet* msg, int options,
  177. upb_Arena* arena, size_t* len) {
  178. return upb_Encode(msg, &google_protobuf_FileDescriptorSet_msginit, options, arena, len);
  179. }
  180. UPB_INLINE bool google_protobuf_FileDescriptorSet_has_file(const google_protobuf_FileDescriptorSet *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
  181. UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg, size_t *len) { return (const google_protobuf_FileDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
  182. UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet *msg, size_t *len) {
  183. return (google_protobuf_FileDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
  184. }
  185. UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet *msg, size_t len, upb_Arena *arena) {
  186. return (google_protobuf_FileDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
  187. }
  188. UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet *msg, upb_Arena *arena) {
  189. struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_Message_New(&google_protobuf_FileDescriptorProto_msginit, arena);
  190. bool ok = _upb_Array_Append_accessor2(
  191. msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
  192. if (!ok) return NULL;
  193. return sub;
  194. }
  195. /* google.protobuf.FileDescriptorProto */
  196. UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_new(upb_Arena* arena) {
  197. return (google_protobuf_FileDescriptorProto*)_upb_Message_New(&google_protobuf_FileDescriptorProto_msginit, arena);
  198. }
  199. UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  200. google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena);
  201. if (!ret) return NULL;
  202. if (upb_Decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  203. return NULL;
  204. }
  205. return ret;
  206. }
  207. UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse_ex(const char* buf, size_t size,
  208. const upb_ExtensionRegistry* extreg,
  209. int options, upb_Arena* arena) {
  210. google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena);
  211. if (!ret) return NULL;
  212. if (upb_Decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, extreg, options, arena) !=
  213. kUpb_DecodeStatus_Ok) {
  214. return NULL;
  215. }
  216. return ret;
  217. }
  218. UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  219. return upb_Encode(msg, &google_protobuf_FileDescriptorProto_msginit, 0, arena, len);
  220. }
  221. UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize_ex(const google_protobuf_FileDescriptorProto* msg, int options,
  222. upb_Arena* arena, size_t* len) {
  223. return upb_Encode(msg, &google_protobuf_FileDescriptorProto_msginit, options, arena, len);
  224. }
  225. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
  226. UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto* msg) {
  227. return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
  228. }
  229. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
  230. UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto* msg) {
  231. return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView);
  232. }
  233. UPB_INLINE upb_StringView const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
  234. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
  235. UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
  236. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); }
  237. UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
  238. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); }
  239. UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); }
  240. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); }
  241. UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); }
  242. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
  243. UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto* msg) {
  244. return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_FileOptions*);
  245. }
  246. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
  247. UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto* msg) {
  248. return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_protobuf_SourceCodeInfo*);
  249. }
  250. UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(56, 112), len); }
  251. UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(60, 120), len); }
  252. UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
  253. UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto* msg) {
  254. return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView);
  255. }
  256. UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_StringView value) {
  257. _upb_sethas(msg, 1);
  258. *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
  259. }
  260. UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_StringView value) {
  261. _upb_sethas(msg, 2);
  262. *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value;
  263. }
  264. UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) {
  265. return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
  266. }
  267. UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_Arena *arena) {
  268. return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(3, 4), arena);
  269. }
  270. UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto *msg, upb_StringView val, upb_Arena *arena) {
  271. return _upb_Array_Append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(3, 4), &val,
  272. arena);
  273. }
  274. UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto *msg, size_t *len) {
  275. return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
  276. }
  277. UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_Arena *arena) {
  278. return (google_protobuf_DescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(2, 3), arena);
  279. }
  280. UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto *msg, upb_Arena *arena) {
  281. struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google_protobuf_DescriptorProto_msginit, arena);
  282. bool ok = _upb_Array_Append_accessor2(
  283. msg, UPB_SIZE(40, 80), UPB_SIZE(2, 3), &sub, arena);
  284. if (!ok) return NULL;
  285. return sub;
  286. }
  287. UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_mutable_enum_type(google_protobuf_FileDescriptorProto *msg, size_t *len) {
  288. return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
  289. }
  290. UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_Arena *arena) {
  291. return (google_protobuf_EnumDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(2, 3), arena);
  292. }
  293. UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto *msg, upb_Arena *arena) {
  294. struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_msginit, arena);
  295. bool ok = _upb_Array_Append_accessor2(
  296. msg, UPB_SIZE(44, 88), UPB_SIZE(2, 3), &sub, arena);
  297. if (!ok) return NULL;
  298. return sub;
  299. }
  300. UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_mutable_service(google_protobuf_FileDescriptorProto *msg, size_t *len) {
  301. return (google_protobuf_ServiceDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len);
  302. }
  303. UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto *msg, size_t len, upb_Arena *arena) {
  304. return (google_protobuf_ServiceDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(48, 96), len, UPB_SIZE(2, 3), arena);
  305. }
  306. UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto *msg, upb_Arena *arena) {
  307. struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google_protobuf_ServiceDescriptorProto_msginit, arena);
  308. bool ok = _upb_Array_Append_accessor2(
  309. msg, UPB_SIZE(48, 96), UPB_SIZE(2, 3), &sub, arena);
  310. if (!ok) return NULL;
  311. return sub;
  312. }
  313. UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_mutable_extension(google_protobuf_FileDescriptorProto *msg, size_t *len) {
  314. return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 104), len);
  315. }
  316. UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto *msg, size_t len, upb_Arena *arena) {
  317. return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(52, 104), len, UPB_SIZE(2, 3), arena);
  318. }
  319. UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto *msg, upb_Arena *arena) {
  320. struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msginit, arena);
  321. bool ok = _upb_Array_Append_accessor2(
  322. msg, UPB_SIZE(52, 104), UPB_SIZE(2, 3), &sub, arena);
  323. if (!ok) return NULL;
  324. return sub;
  325. }
  326. UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) {
  327. _upb_sethas(msg, 3);
  328. *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_FileOptions*) = value;
  329. }
  330. UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_Arena *arena) {
  331. struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg);
  332. if (sub == NULL) {
  333. sub = (struct google_protobuf_FileOptions*)_upb_Message_New(&google_protobuf_FileOptions_msginit, arena);
  334. if (!sub) return NULL;
  335. google_protobuf_FileDescriptorProto_set_options(msg, sub);
  336. }
  337. return sub;
  338. }
  339. UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) {
  340. _upb_sethas(msg, 4);
  341. *UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_protobuf_SourceCodeInfo*) = value;
  342. }
  343. UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_Arena *arena) {
  344. struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg);
  345. if (sub == NULL) {
  346. sub = (struct google_protobuf_SourceCodeInfo*)_upb_Message_New(&google_protobuf_SourceCodeInfo_msginit, arena);
  347. if (!sub) return NULL;
  348. google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub);
  349. }
  350. return sub;
  351. }
  352. UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) {
  353. return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 112), len);
  354. }
  355. UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_Arena *arena) {
  356. return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(56, 112), len, 2, arena);
  357. }
  358. UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_Arena *arena) {
  359. return _upb_Array_Append_accessor2(msg, UPB_SIZE(56, 112), 2, &val,
  360. arena);
  361. }
  362. UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) {
  363. return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 120), len);
  364. }
  365. UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_Arena *arena) {
  366. return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(60, 120), len, 2, arena);
  367. }
  368. UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_Arena *arena) {
  369. return _upb_Array_Append_accessor2(msg, UPB_SIZE(60, 120), 2, &val,
  370. arena);
  371. }
  372. UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_StringView value) {
  373. _upb_sethas(msg, 5);
  374. *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = value;
  375. }
  376. /* google.protobuf.DescriptorProto */
  377. UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_new(upb_Arena* arena) {
  378. return (google_protobuf_DescriptorProto*)_upb_Message_New(&google_protobuf_DescriptorProto_msginit, arena);
  379. }
  380. UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  381. google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena);
  382. if (!ret) return NULL;
  383. if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  384. return NULL;
  385. }
  386. return ret;
  387. }
  388. UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse_ex(const char* buf, size_t size,
  389. const upb_ExtensionRegistry* extreg,
  390. int options, upb_Arena* arena) {
  391. google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena);
  392. if (!ret) return NULL;
  393. if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, extreg, options, arena) !=
  394. kUpb_DecodeStatus_Ok) {
  395. return NULL;
  396. }
  397. return ret;
  398. }
  399. UPB_INLINE char* google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto* msg, upb_Arena* arena, size_t* len) {
  400. return upb_Encode(msg, &google_protobuf_DescriptorProto_msginit, 0, arena, len);
  401. }
  402. UPB_INLINE char* google_protobuf_DescriptorProto_serialize_ex(const google_protobuf_DescriptorProto* msg, int options,
  403. upb_Arena* arena, size_t* len) {
  404. return upb_Encode(msg, &google_protobuf_DescriptorProto_msginit, options, arena, len);
  405. }
  406. UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_hasbit(msg, 1); }
  407. UPB_INLINE upb_StringView google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto* msg) {
  408. return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
  409. }
  410. UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
  411. UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
  412. UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
  413. UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
  414. UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
  415. UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
  416. UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
  417. UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
  418. UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
  419. UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
  420. UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_hasbit(msg, 2); }
  421. UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto* msg) {
  422. return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_MessageOptions*);
  423. }
  424. UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
  425. UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
  426. UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
  427. UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
  428. UPB_INLINE upb_StringView const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
  429. UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_StringView value) {
  430. _upb_sethas(msg, 1);
  431. *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
  432. }
  433. UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto *msg, size_t *len) {
  434. return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
  435. }
  436. UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto *msg, size_t len, upb_Arena *arena) {
  437. return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
  438. }
  439. UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto *msg, upb_Arena *arena) {
  440. struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msginit, arena);
  441. bool ok = _upb_Array_Append_accessor2(
  442. msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
  443. if (!ok) return NULL;
  444. return sub;
  445. }
  446. UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mutable_nested_type(google_protobuf_DescriptorProto *msg, size_t *len) {
  447. return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
  448. }
  449. UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto *msg, size_t len, upb_Arena *arena) {
  450. return (google_protobuf_DescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
  451. }
  452. UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto *msg, upb_Arena *arena) {
  453. struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google_protobuf_DescriptorProto_msginit, arena);
  454. bool ok = _upb_Array_Append_accessor2(
  455. msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
  456. if (!ok) return NULL;
  457. return sub;
  458. }
  459. UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_mutable_enum_type(google_protobuf_DescriptorProto *msg, size_t *len) {
  460. return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
  461. }
  462. UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto *msg, size_t len, upb_Arena *arena) {
  463. return (google_protobuf_EnumDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
  464. }
  465. UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto *msg, upb_Arena *arena) {
  466. struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_msginit, arena);
  467. bool ok = _upb_Array_Append_accessor2(
  468. msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
  469. if (!ok) return NULL;
  470. return sub;
  471. }
  472. UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_mutable_extension_range(google_protobuf_DescriptorProto *msg, size_t *len) {
  473. return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
  474. }
  475. UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto *msg, size_t len, upb_Arena *arena) {
  476. return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena);
  477. }
  478. UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto *msg, upb_Arena *arena) {
  479. struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
  480. bool ok = _upb_Array_Append_accessor2(
  481. msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena);
  482. if (!ok) return NULL;
  483. return sub;
  484. }
  485. UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_extension(google_protobuf_DescriptorProto *msg, size_t *len) {
  486. return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
  487. }
  488. UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto *msg, size_t len, upb_Arena *arena) {
  489. return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena);
  490. }
  491. UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto *msg, upb_Arena *arena) {
  492. struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msginit, arena);
  493. bool ok = _upb_Array_Append_accessor2(
  494. msg, UPB_SIZE(32, 64), UPB_SIZE(2, 3), &sub, arena);
  495. if (!ok) return NULL;
  496. return sub;
  497. }
  498. UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) {
  499. _upb_sethas(msg, 2);
  500. *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_MessageOptions*) = value;
  501. }
  502. UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto *msg, upb_Arena *arena) {
  503. struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg);
  504. if (sub == NULL) {
  505. sub = (struct google_protobuf_MessageOptions*)_upb_Message_New(&google_protobuf_MessageOptions_msginit, arena);
  506. if (!sub) return NULL;
  507. google_protobuf_DescriptorProto_set_options(msg, sub);
  508. }
  509. return sub;
  510. }
  511. UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_mutable_oneof_decl(google_protobuf_DescriptorProto *msg, size_t *len) {
  512. return (google_protobuf_OneofDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
  513. }
  514. UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto *msg, size_t len, upb_Arena *arena) {
  515. return (google_protobuf_OneofDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena);
  516. }
  517. UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto *msg, upb_Arena *arena) {
  518. struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google_protobuf_OneofDescriptorProto_msginit, arena);
  519. bool ok = _upb_Array_Append_accessor2(
  520. msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena);
  521. if (!ok) return NULL;
  522. return sub;
  523. }
  524. UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_mutable_reserved_range(google_protobuf_DescriptorProto *msg, size_t *len) {
  525. return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
  526. }
  527. UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto *msg, size_t len, upb_Arena *arena) {
  528. return (google_protobuf_DescriptorProto_ReservedRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(2, 3), arena);
  529. }
  530. UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto *msg, upb_Arena *arena) {
  531. struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
  532. bool ok = _upb_Array_Append_accessor2(
  533. msg, UPB_SIZE(40, 80), UPB_SIZE(2, 3), &sub, arena);
  534. if (!ok) return NULL;
  535. return sub;
  536. }
  537. UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto *msg, size_t *len) {
  538. return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
  539. }
  540. UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto *msg, size_t len, upb_Arena *arena) {
  541. return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(3, 4), arena);
  542. }
  543. UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto *msg, upb_StringView val, upb_Arena *arena) {
  544. return _upb_Array_Append_accessor2(msg, UPB_SIZE(44, 88), UPB_SIZE(3, 4), &val,
  545. arena);
  546. }
  547. /* google.protobuf.DescriptorProto.ExtensionRange */
  548. UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_new(upb_Arena* arena) {
  549. return (google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
  550. }
  551. UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse(const char* buf, size_t size, upb_Arena* arena) {
  552. google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
  553. if (!ret) return NULL;
  554. if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  555. return NULL;
  556. }
  557. return ret;
  558. }
  559. UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char* buf, size_t size,
  560. const upb_ExtensionRegistry* extreg,
  561. int options, upb_Arena* arena) {
  562. google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
  563. if (!ret) return NULL;
  564. if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, extreg, options, arena) !=
  565. kUpb_DecodeStatus_Ok) {
  566. return NULL;
  567. }
  568. return ret;
  569. }
  570. UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena, size_t* len) {
  571. return upb_Encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, 0, arena, len);
  572. }
  573. UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize_ex(const google_protobuf_DescriptorProto_ExtensionRange* msg, int options,
  574. upb_Arena* arena, size_t* len) {
  575. return upb_Encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, options, arena, len);
  576. }
  577. UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 1); }
  578. UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  579. return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
  580. }
  581. UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 2); }
  582. UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  583. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t);
  584. }
  585. UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 3); }
  586. UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  587. return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const google_protobuf_ExtensionRangeOptions*);
  588. }
  589. UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
  590. _upb_sethas(msg, 1);
  591. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  592. }
  593. UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
  594. _upb_sethas(msg, 2);
  595. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
  596. }
  597. UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) {
  598. _upb_sethas(msg, 3);
  599. *UPB_PTR_AT(msg, UPB_SIZE(12, 16), google_protobuf_ExtensionRangeOptions*) = value;
  600. }
  601. UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_Arena *arena) {
  602. struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg);
  603. if (sub == NULL) {
  604. sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google_protobuf_ExtensionRangeOptions_msginit, arena);
  605. if (!sub) return NULL;
  606. google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub);
  607. }
  608. return sub;
  609. }
  610. /* google.protobuf.DescriptorProto.ReservedRange */
  611. UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_new(upb_Arena* arena) {
  612. return (google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
  613. }
  614. UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) {
  615. google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
  616. if (!ret) return NULL;
  617. if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  618. return NULL;
  619. }
  620. return ret;
  621. }
  622. UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char* buf, size_t size,
  623. const upb_ExtensionRegistry* extreg,
  624. int options, upb_Arena* arena) {
  625. google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
  626. if (!ret) return NULL;
  627. if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, extreg, options, arena) !=
  628. kUpb_DecodeStatus_Ok) {
  629. return NULL;
  630. }
  631. return ret;
  632. }
  633. UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange* msg, upb_Arena* arena, size_t* len) {
  634. return upb_Encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, 0, arena, len);
  635. }
  636. UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize_ex(const google_protobuf_DescriptorProto_ReservedRange* msg, int options,
  637. upb_Arena* arena, size_t* len) {
  638. return upb_Encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, options, arena, len);
  639. }
  640. UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_hasbit(msg, 1); }
  641. UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange* msg) {
  642. return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
  643. }
  644. UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_hasbit(msg, 2); }
  645. UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange* msg) {
  646. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t);
  647. }
  648. UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
  649. _upb_sethas(msg, 1);
  650. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  651. }
  652. UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
  653. _upb_sethas(msg, 2);
  654. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
  655. }
  656. /* google.protobuf.ExtensionRangeOptions */
  657. UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_new(upb_Arena* arena) {
  658. return (google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google_protobuf_ExtensionRangeOptions_msginit, arena);
  659. }
  660. UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  661. google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena);
  662. if (!ret) return NULL;
  663. if (upb_Decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  664. return NULL;
  665. }
  666. return ret;
  667. }
  668. UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse_ex(const char* buf, size_t size,
  669. const upb_ExtensionRegistry* extreg,
  670. int options, upb_Arena* arena) {
  671. google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena);
  672. if (!ret) return NULL;
  673. if (upb_Decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, extreg, options, arena) !=
  674. kUpb_DecodeStatus_Ok) {
  675. return NULL;
  676. }
  677. return ret;
  678. }
  679. UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena, size_t* len) {
  680. return upb_Encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, 0, arena, len);
  681. }
  682. UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize_ex(const google_protobuf_ExtensionRangeOptions* msg, int options,
  683. upb_Arena* arena, size_t* len) {
  684. return upb_Encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, options, arena, len);
  685. }
  686. UPB_INLINE bool google_protobuf_ExtensionRangeOptions_has_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
  687. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
  688. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t *len) {
  689. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
  690. }
  691. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t len, upb_Arena *arena) {
  692. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
  693. }
  694. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_Arena *arena) {
  695. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  696. bool ok = _upb_Array_Append_accessor2(
  697. msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
  698. if (!ok) return NULL;
  699. return sub;
  700. }
  701. /* google.protobuf.FieldDescriptorProto */
  702. UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_new(upb_Arena* arena) {
  703. return (google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msginit, arena);
  704. }
  705. UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  706. google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena);
  707. if (!ret) return NULL;
  708. if (upb_Decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  709. return NULL;
  710. }
  711. return ret;
  712. }
  713. UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse_ex(const char* buf, size_t size,
  714. const upb_ExtensionRegistry* extreg,
  715. int options, upb_Arena* arena) {
  716. google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena);
  717. if (!ret) return NULL;
  718. if (upb_Decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, extreg, options, arena) !=
  719. kUpb_DecodeStatus_Ok) {
  720. return NULL;
  721. }
  722. return ret;
  723. }
  724. UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  725. return upb_Encode(msg, &google_protobuf_FieldDescriptorProto_msginit, 0, arena, len);
  726. }
  727. UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize_ex(const google_protobuf_FieldDescriptorProto* msg, int options,
  728. upb_Arena* arena, size_t* len) {
  729. return upb_Encode(msg, &google_protobuf_FieldDescriptorProto_msginit, options, arena, len);
  730. }
  731. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
  732. UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto* msg) {
  733. return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView);
  734. }
  735. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
  736. UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto* msg) {
  737. return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView);
  738. }
  739. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
  740. UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto* msg) {
  741. return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t);
  742. }
  743. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
  744. UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto* msg) {
  745. return google_protobuf_FieldDescriptorProto_has_label(msg) ? *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) : 1;
  746. }
  747. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
  748. UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto* msg) {
  749. return google_protobuf_FieldDescriptorProto_has_type(msg) ? *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) : 1;
  750. }
  751. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 6); }
  752. UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto* msg) {
  753. return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView);
  754. }
  755. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 7); }
  756. UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto* msg) {
  757. return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView);
  758. }
  759. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 8); }
  760. UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto* msg) {
  761. return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), const google_protobuf_FieldOptions*);
  762. }
  763. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 9); }
  764. UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto* msg) {
  765. return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t);
  766. }
  767. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 10); }
  768. UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto* msg) {
  769. return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_StringView);
  770. }
  771. UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 11); }
  772. UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) {
  773. return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool);
  774. }
  775. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  776. _upb_sethas(msg, 1);
  777. *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView) = value;
  778. }
  779. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  780. _upb_sethas(msg, 2);
  781. *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView) = value;
  782. }
  783. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
  784. _upb_sethas(msg, 3);
  785. *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value;
  786. }
  787. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
  788. _upb_sethas(msg, 4);
  789. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  790. }
  791. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
  792. _upb_sethas(msg, 5);
  793. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
  794. }
  795. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  796. _upb_sethas(msg, 6);
  797. *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = value;
  798. }
  799. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  800. _upb_sethas(msg, 7);
  801. *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = value;
  802. }
  803. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) {
  804. _upb_sethas(msg, 8);
  805. *UPB_PTR_AT(msg, UPB_SIZE(64, 104), google_protobuf_FieldOptions*) = value;
  806. }
  807. UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_Arena *arena) {
  808. struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg);
  809. if (sub == NULL) {
  810. sub = (struct google_protobuf_FieldOptions*)_upb_Message_New(&google_protobuf_FieldOptions_msginit, arena);
  811. if (!sub) return NULL;
  812. google_protobuf_FieldDescriptorProto_set_options(msg, sub);
  813. }
  814. return sub;
  815. }
  816. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
  817. _upb_sethas(msg, 9);
  818. *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
  819. }
  820. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  821. _upb_sethas(msg, 10);
  822. *UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_StringView) = value;
  823. }
  824. UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) {
  825. _upb_sethas(msg, 11);
  826. *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value;
  827. }
  828. /* google.protobuf.OneofDescriptorProto */
  829. UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_new(upb_Arena* arena) {
  830. return (google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google_protobuf_OneofDescriptorProto_msginit, arena);
  831. }
  832. UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  833. google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena);
  834. if (!ret) return NULL;
  835. if (upb_Decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  836. return NULL;
  837. }
  838. return ret;
  839. }
  840. UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse_ex(const char* buf, size_t size,
  841. const upb_ExtensionRegistry* extreg,
  842. int options, upb_Arena* arena) {
  843. google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena);
  844. if (!ret) return NULL;
  845. if (upb_Decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, extreg, options, arena) !=
  846. kUpb_DecodeStatus_Ok) {
  847. return NULL;
  848. }
  849. return ret;
  850. }
  851. UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  852. return upb_Encode(msg, &google_protobuf_OneofDescriptorProto_msginit, 0, arena, len);
  853. }
  854. UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize_ex(const google_protobuf_OneofDescriptorProto* msg, int options,
  855. upb_Arena* arena, size_t* len) {
  856. return upb_Encode(msg, &google_protobuf_OneofDescriptorProto_msginit, options, arena, len);
  857. }
  858. UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
  859. UPB_INLINE upb_StringView google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto* msg) {
  860. return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
  861. }
  862. UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
  863. UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto* msg) {
  864. return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_OneofOptions*);
  865. }
  866. UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_StringView value) {
  867. _upb_sethas(msg, 1);
  868. *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
  869. }
  870. UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) {
  871. _upb_sethas(msg, 2);
  872. *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_OneofOptions*) = value;
  873. }
  874. UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto *msg, upb_Arena *arena) {
  875. struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg);
  876. if (sub == NULL) {
  877. sub = (struct google_protobuf_OneofOptions*)_upb_Message_New(&google_protobuf_OneofOptions_msginit, arena);
  878. if (!sub) return NULL;
  879. google_protobuf_OneofDescriptorProto_set_options(msg, sub);
  880. }
  881. return sub;
  882. }
  883. /* google.protobuf.EnumDescriptorProto */
  884. UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_new(upb_Arena* arena) {
  885. return (google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_msginit, arena);
  886. }
  887. UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  888. google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena);
  889. if (!ret) return NULL;
  890. if (upb_Decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  891. return NULL;
  892. }
  893. return ret;
  894. }
  895. UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse_ex(const char* buf, size_t size,
  896. const upb_ExtensionRegistry* extreg,
  897. int options, upb_Arena* arena) {
  898. google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena);
  899. if (!ret) return NULL;
  900. if (upb_Decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, extreg, options, arena) !=
  901. kUpb_DecodeStatus_Ok) {
  902. return NULL;
  903. }
  904. return ret;
  905. }
  906. UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  907. return upb_Encode(msg, &google_protobuf_EnumDescriptorProto_msginit, 0, arena, len);
  908. }
  909. UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize_ex(const google_protobuf_EnumDescriptorProto* msg, int options,
  910. upb_Arena* arena, size_t* len) {
  911. return upb_Encode(msg, &google_protobuf_EnumDescriptorProto_msginit, options, arena, len);
  912. }
  913. UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
  914. UPB_INLINE upb_StringView google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto* msg) {
  915. return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
  916. }
  917. UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
  918. UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
  919. UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
  920. UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto* msg) {
  921. return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_EnumOptions*);
  922. }
  923. UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
  924. UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
  925. UPB_INLINE upb_StringView const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
  926. UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_StringView value) {
  927. _upb_sethas(msg, 1);
  928. *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
  929. }
  930. UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto *msg, size_t *len) {
  931. return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
  932. }
  933. UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_Arena *arena) {
  934. return (google_protobuf_EnumValueDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
  935. }
  936. UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto *msg, upb_Arena *arena) {
  937. struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
  938. bool ok = _upb_Array_Append_accessor2(
  939. msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
  940. if (!ok) return NULL;
  941. return sub;
  942. }
  943. UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) {
  944. _upb_sethas(msg, 2);
  945. *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_EnumOptions*) = value;
  946. }
  947. UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto *msg, upb_Arena *arena) {
  948. struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg);
  949. if (sub == NULL) {
  950. sub = (struct google_protobuf_EnumOptions*)_upb_Message_New(&google_protobuf_EnumOptions_msginit, arena);
  951. if (!sub) return NULL;
  952. google_protobuf_EnumDescriptorProto_set_options(msg, sub);
  953. }
  954. return sub;
  955. }
  956. UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_mutable_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t *len) {
  957. return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
  958. }
  959. UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_Arena *arena) {
  960. return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
  961. }
  962. UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_Arena *arena) {
  963. struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
  964. bool ok = _upb_Array_Append_accessor2(
  965. msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
  966. if (!ok) return NULL;
  967. return sub;
  968. }
  969. UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t *len) {
  970. return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
  971. }
  972. UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_Arena *arena) {
  973. return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(3, 4), arena);
  974. }
  975. UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_StringView val, upb_Arena *arena) {
  976. return _upb_Array_Append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(3, 4), &val,
  977. arena);
  978. }
  979. /* google.protobuf.EnumDescriptorProto.EnumReservedRange */
  980. UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_Arena* arena) {
  981. return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
  982. }
  983. UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) {
  984. google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
  985. if (!ret) return NULL;
  986. if (upb_Decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  987. return NULL;
  988. }
  989. return ret;
  990. }
  991. UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char* buf, size_t size,
  992. const upb_ExtensionRegistry* extreg,
  993. int options, upb_Arena* arena) {
  994. google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
  995. if (!ret) return NULL;
  996. if (upb_Decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, extreg, options, arena) !=
  997. kUpb_DecodeStatus_Ok) {
  998. return NULL;
  999. }
  1000. return ret;
  1001. }
  1002. UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, upb_Arena* arena, size_t* len) {
  1003. return upb_Encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, 0, arena, len);
  1004. }
  1005. UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize_ex(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, int options,
  1006. upb_Arena* arena, size_t* len) {
  1007. return upb_Encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, options, arena, len);
  1008. }
  1009. UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_hasbit(msg, 1); }
  1010. UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) {
  1011. return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
  1012. }
  1013. UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_hasbit(msg, 2); }
  1014. UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) {
  1015. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t);
  1016. }
  1017. UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
  1018. _upb_sethas(msg, 1);
  1019. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  1020. }
  1021. UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
  1022. _upb_sethas(msg, 2);
  1023. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
  1024. }
  1025. /* google.protobuf.EnumValueDescriptorProto */
  1026. UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_new(upb_Arena* arena) {
  1027. return (google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
  1028. }
  1029. UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  1030. google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena);
  1031. if (!ret) return NULL;
  1032. if (upb_Decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1033. return NULL;
  1034. }
  1035. return ret;
  1036. }
  1037. UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse_ex(const char* buf, size_t size,
  1038. const upb_ExtensionRegistry* extreg,
  1039. int options, upb_Arena* arena) {
  1040. google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena);
  1041. if (!ret) return NULL;
  1042. if (upb_Decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, extreg, options, arena) !=
  1043. kUpb_DecodeStatus_Ok) {
  1044. return NULL;
  1045. }
  1046. return ret;
  1047. }
  1048. UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  1049. return upb_Encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, 0, arena, len);
  1050. }
  1051. UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize_ex(const google_protobuf_EnumValueDescriptorProto* msg, int options,
  1052. upb_Arena* arena, size_t* len) {
  1053. return upb_Encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, options, arena, len);
  1054. }
  1055. UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
  1056. UPB_INLINE upb_StringView google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto* msg) {
  1057. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView);
  1058. }
  1059. UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
  1060. UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto* msg) {
  1061. return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
  1062. }
  1063. UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
  1064. UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto* msg) {
  1065. return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_protobuf_EnumValueOptions*);
  1066. }
  1067. UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_StringView value) {
  1068. _upb_sethas(msg, 1);
  1069. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = value;
  1070. }
  1071. UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) {
  1072. _upb_sethas(msg, 2);
  1073. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  1074. }
  1075. UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) {
  1076. _upb_sethas(msg, 3);
  1077. *UPB_PTR_AT(msg, UPB_SIZE(16, 24), google_protobuf_EnumValueOptions*) = value;
  1078. }
  1079. UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto *msg, upb_Arena *arena) {
  1080. struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg);
  1081. if (sub == NULL) {
  1082. sub = (struct google_protobuf_EnumValueOptions*)_upb_Message_New(&google_protobuf_EnumValueOptions_msginit, arena);
  1083. if (!sub) return NULL;
  1084. google_protobuf_EnumValueDescriptorProto_set_options(msg, sub);
  1085. }
  1086. return sub;
  1087. }
  1088. /* google.protobuf.ServiceDescriptorProto */
  1089. UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_new(upb_Arena* arena) {
  1090. return (google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google_protobuf_ServiceDescriptorProto_msginit, arena);
  1091. }
  1092. UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  1093. google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena);
  1094. if (!ret) return NULL;
  1095. if (upb_Decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1096. return NULL;
  1097. }
  1098. return ret;
  1099. }
  1100. UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse_ex(const char* buf, size_t size,
  1101. const upb_ExtensionRegistry* extreg,
  1102. int options, upb_Arena* arena) {
  1103. google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena);
  1104. if (!ret) return NULL;
  1105. if (upb_Decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, extreg, options, arena) !=
  1106. kUpb_DecodeStatus_Ok) {
  1107. return NULL;
  1108. }
  1109. return ret;
  1110. }
  1111. UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  1112. return upb_Encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, 0, arena, len);
  1113. }
  1114. UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize_ex(const google_protobuf_ServiceDescriptorProto* msg, int options,
  1115. upb_Arena* arena, size_t* len) {
  1116. return upb_Encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, options, arena, len);
  1117. }
  1118. UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
  1119. UPB_INLINE upb_StringView google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto* msg) {
  1120. return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
  1121. }
  1122. UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
  1123. UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len) { return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
  1124. UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
  1125. UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto* msg) {
  1126. return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_ServiceOptions*);
  1127. }
  1128. UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_StringView value) {
  1129. _upb_sethas(msg, 1);
  1130. *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
  1131. }
  1132. UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto *msg, size_t *len) {
  1133. return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
  1134. }
  1135. UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto *msg, size_t len, upb_Arena *arena) {
  1136. return (google_protobuf_MethodDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
  1137. }
  1138. UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto *msg, upb_Arena *arena) {
  1139. struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google_protobuf_MethodDescriptorProto_msginit, arena);
  1140. bool ok = _upb_Array_Append_accessor2(
  1141. msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
  1142. if (!ok) return NULL;
  1143. return sub;
  1144. }
  1145. UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) {
  1146. _upb_sethas(msg, 2);
  1147. *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_ServiceOptions*) = value;
  1148. }
  1149. UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto *msg, upb_Arena *arena) {
  1150. struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg);
  1151. if (sub == NULL) {
  1152. sub = (struct google_protobuf_ServiceOptions*)_upb_Message_New(&google_protobuf_ServiceOptions_msginit, arena);
  1153. if (!sub) return NULL;
  1154. google_protobuf_ServiceDescriptorProto_set_options(msg, sub);
  1155. }
  1156. return sub;
  1157. }
  1158. /* google.protobuf.MethodDescriptorProto */
  1159. UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_new(upb_Arena* arena) {
  1160. return (google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google_protobuf_MethodDescriptorProto_msginit, arena);
  1161. }
  1162. UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  1163. google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena);
  1164. if (!ret) return NULL;
  1165. if (upb_Decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1166. return NULL;
  1167. }
  1168. return ret;
  1169. }
  1170. UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse_ex(const char* buf, size_t size,
  1171. const upb_ExtensionRegistry* extreg,
  1172. int options, upb_Arena* arena) {
  1173. google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena);
  1174. if (!ret) return NULL;
  1175. if (upb_Decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, extreg, options, arena) !=
  1176. kUpb_DecodeStatus_Ok) {
  1177. return NULL;
  1178. }
  1179. return ret;
  1180. }
  1181. UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  1182. return upb_Encode(msg, &google_protobuf_MethodDescriptorProto_msginit, 0, arena, len);
  1183. }
  1184. UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize_ex(const google_protobuf_MethodDescriptorProto* msg, int options,
  1185. upb_Arena* arena, size_t* len) {
  1186. return upb_Encode(msg, &google_protobuf_MethodDescriptorProto_msginit, options, arena, len);
  1187. }
  1188. UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
  1189. UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto* msg) {
  1190. return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
  1191. }
  1192. UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
  1193. UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto* msg) {
  1194. return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView);
  1195. }
  1196. UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
  1197. UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto* msg) {
  1198. return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView);
  1199. }
  1200. UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
  1201. UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto* msg) {
  1202. return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_MethodOptions*);
  1203. }
  1204. UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
  1205. UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto* msg) {
  1206. return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
  1207. }
  1208. UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 6); }
  1209. UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto* msg) {
  1210. return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool);
  1211. }
  1212. UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) {
  1213. _upb_sethas(msg, 1);
  1214. *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
  1215. }
  1216. UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) {
  1217. _upb_sethas(msg, 2);
  1218. *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value;
  1219. }
  1220. UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) {
  1221. _upb_sethas(msg, 3);
  1222. *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = value;
  1223. }
  1224. UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) {
  1225. _upb_sethas(msg, 4);
  1226. *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_MethodOptions*) = value;
  1227. }
  1228. UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_Arena *arena) {
  1229. struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg);
  1230. if (sub == NULL) {
  1231. sub = (struct google_protobuf_MethodOptions*)_upb_Message_New(&google_protobuf_MethodOptions_msginit, arena);
  1232. if (!sub) return NULL;
  1233. google_protobuf_MethodDescriptorProto_set_options(msg, sub);
  1234. }
  1235. return sub;
  1236. }
  1237. UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
  1238. _upb_sethas(msg, 5);
  1239. *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
  1240. }
  1241. UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
  1242. _upb_sethas(msg, 6);
  1243. *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
  1244. }
  1245. /* google.protobuf.FileOptions */
  1246. UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_new(upb_Arena* arena) {
  1247. return (google_protobuf_FileOptions*)_upb_Message_New(&google_protobuf_FileOptions_msginit, arena);
  1248. }
  1249. UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  1250. google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena);
  1251. if (!ret) return NULL;
  1252. if (upb_Decode(buf, size, ret, &google_protobuf_FileOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1253. return NULL;
  1254. }
  1255. return ret;
  1256. }
  1257. UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse_ex(const char* buf, size_t size,
  1258. const upb_ExtensionRegistry* extreg,
  1259. int options, upb_Arena* arena) {
  1260. google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena);
  1261. if (!ret) return NULL;
  1262. if (upb_Decode(buf, size, ret, &google_protobuf_FileOptions_msginit, extreg, options, arena) !=
  1263. kUpb_DecodeStatus_Ok) {
  1264. return NULL;
  1265. }
  1266. return ret;
  1267. }
  1268. UPB_INLINE char* google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions* msg, upb_Arena* arena, size_t* len) {
  1269. return upb_Encode(msg, &google_protobuf_FileOptions_msginit, 0, arena, len);
  1270. }
  1271. UPB_INLINE char* google_protobuf_FileOptions_serialize_ex(const google_protobuf_FileOptions* msg, int options,
  1272. upb_Arena* arena, size_t* len) {
  1273. return upb_Encode(msg, &google_protobuf_FileOptions_msginit, options, arena, len);
  1274. }
  1275. UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 1); }
  1276. UPB_INLINE upb_StringView google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions* msg) {
  1277. return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView);
  1278. }
  1279. UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 2); }
  1280. UPB_INLINE upb_StringView google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions* msg) {
  1281. return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView);
  1282. }
  1283. UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 3); }
  1284. UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions* msg) {
  1285. return google_protobuf_FileOptions_has_optimize_for(msg) ? *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) : 1;
  1286. }
  1287. UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 4); }
  1288. UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions* msg) {
  1289. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool);
  1290. }
  1291. UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 5); }
  1292. UPB_INLINE upb_StringView google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions* msg) {
  1293. return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_StringView);
  1294. }
  1295. UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 6); }
  1296. UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions* msg) {
  1297. return *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool);
  1298. }
  1299. UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 7); }
  1300. UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions* msg) {
  1301. return *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool);
  1302. }
  1303. UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 8); }
  1304. UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions* msg) {
  1305. return *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool);
  1306. }
  1307. UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 9); }
  1308. UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) {
  1309. return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool);
  1310. }
  1311. UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 10); }
  1312. UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions* msg) {
  1313. return *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool);
  1314. }
  1315. UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 11); }
  1316. UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions* msg) {
  1317. return *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool);
  1318. }
  1319. UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 12); }
  1320. UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions* msg) {
  1321. return google_protobuf_FileOptions_has_cc_enable_arenas(msg) ? *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) : true;
  1322. }
  1323. UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 13); }
  1324. UPB_INLINE upb_StringView google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions* msg) {
  1325. return *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_StringView);
  1326. }
  1327. UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 14); }
  1328. UPB_INLINE upb_StringView google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions* msg) {
  1329. return *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_StringView);
  1330. }
  1331. UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 15); }
  1332. UPB_INLINE upb_StringView google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions* msg) {
  1333. return *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_StringView);
  1334. }
  1335. UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 16); }
  1336. UPB_INLINE upb_StringView google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions* msg) {
  1337. return *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_StringView);
  1338. }
  1339. UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 17); }
  1340. UPB_INLINE upb_StringView google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions* msg) {
  1341. return *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_StringView);
  1342. }
  1343. UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 18); }
  1344. UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions* msg) {
  1345. return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool);
  1346. }
  1347. UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 19); }
  1348. UPB_INLINE upb_StringView google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions* msg) {
  1349. return *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_StringView);
  1350. }
  1351. UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 20); }
  1352. UPB_INLINE upb_StringView google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions* msg) {
  1353. return *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_StringView);
  1354. }
  1355. UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 184)); }
  1356. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(100, 184), len); }
  1357. UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_StringView value) {
  1358. _upb_sethas(msg, 1);
  1359. *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView) = value;
  1360. }
  1361. UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_StringView value) {
  1362. _upb_sethas(msg, 2);
  1363. *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView) = value;
  1364. }
  1365. UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) {
  1366. _upb_sethas(msg, 3);
  1367. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  1368. }
  1369. UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) {
  1370. _upb_sethas(msg, 4);
  1371. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
  1372. }
  1373. UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_StringView value) {
  1374. _upb_sethas(msg, 5);
  1375. *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_StringView) = value;
  1376. }
  1377. UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) {
  1378. _upb_sethas(msg, 6);
  1379. *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = value;
  1380. }
  1381. UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) {
  1382. _upb_sethas(msg, 7);
  1383. *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool) = value;
  1384. }
  1385. UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) {
  1386. _upb_sethas(msg, 8);
  1387. *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool) = value;
  1388. }
  1389. UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) {
  1390. _upb_sethas(msg, 9);
  1391. *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
  1392. }
  1393. UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) {
  1394. _upb_sethas(msg, 10);
  1395. *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = value;
  1396. }
  1397. UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) {
  1398. _upb_sethas(msg, 11);
  1399. *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool) = value;
  1400. }
  1401. UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) {
  1402. _upb_sethas(msg, 12);
  1403. *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) = value;
  1404. }
  1405. UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) {
  1406. _upb_sethas(msg, 13);
  1407. *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_StringView) = value;
  1408. }
  1409. UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_StringView value) {
  1410. _upb_sethas(msg, 14);
  1411. *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_StringView) = value;
  1412. }
  1413. UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_StringView value) {
  1414. _upb_sethas(msg, 15);
  1415. *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_StringView) = value;
  1416. }
  1417. UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) {
  1418. _upb_sethas(msg, 16);
  1419. *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_StringView) = value;
  1420. }
  1421. UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_StringView value) {
  1422. _upb_sethas(msg, 17);
  1423. *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_StringView) = value;
  1424. }
  1425. UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) {
  1426. _upb_sethas(msg, 18);
  1427. *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
  1428. }
  1429. UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_StringView value) {
  1430. _upb_sethas(msg, 19);
  1431. *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_StringView) = value;
  1432. }
  1433. UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_StringView value) {
  1434. _upb_sethas(msg, 20);
  1435. *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_StringView) = value;
  1436. }
  1437. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions *msg, size_t *len) {
  1438. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 184), len);
  1439. }
  1440. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions *msg, size_t len, upb_Arena *arena) {
  1441. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(100, 184), len, UPB_SIZE(2, 3), arena);
  1442. }
  1443. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions *msg, upb_Arena *arena) {
  1444. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1445. bool ok = _upb_Array_Append_accessor2(
  1446. msg, UPB_SIZE(100, 184), UPB_SIZE(2, 3), &sub, arena);
  1447. if (!ok) return NULL;
  1448. return sub;
  1449. }
  1450. /* google.protobuf.MessageOptions */
  1451. UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_new(upb_Arena* arena) {
  1452. return (google_protobuf_MessageOptions*)_upb_Message_New(&google_protobuf_MessageOptions_msginit, arena);
  1453. }
  1454. UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  1455. google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena);
  1456. if (!ret) return NULL;
  1457. if (upb_Decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1458. return NULL;
  1459. }
  1460. return ret;
  1461. }
  1462. UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse_ex(const char* buf, size_t size,
  1463. const upb_ExtensionRegistry* extreg,
  1464. int options, upb_Arena* arena) {
  1465. google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena);
  1466. if (!ret) return NULL;
  1467. if (upb_Decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, extreg, options, arena) !=
  1468. kUpb_DecodeStatus_Ok) {
  1469. return NULL;
  1470. }
  1471. return ret;
  1472. }
  1473. UPB_INLINE char* google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions* msg, upb_Arena* arena, size_t* len) {
  1474. return upb_Encode(msg, &google_protobuf_MessageOptions_msginit, 0, arena, len);
  1475. }
  1476. UPB_INLINE char* google_protobuf_MessageOptions_serialize_ex(const google_protobuf_MessageOptions* msg, int options,
  1477. upb_Arena* arena, size_t* len) {
  1478. return upb_Encode(msg, &google_protobuf_MessageOptions_msginit, options, arena, len);
  1479. }
  1480. UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 1); }
  1481. UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions* msg) {
  1482. return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
  1483. }
  1484. UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 2); }
  1485. UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) {
  1486. return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool);
  1487. }
  1488. UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 3); }
  1489. UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions* msg) {
  1490. return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool);
  1491. }
  1492. UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 4); }
  1493. UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions* msg) {
  1494. return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool);
  1495. }
  1496. UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const google_protobuf_MessageOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
  1497. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); }
  1498. UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) {
  1499. _upb_sethas(msg, 1);
  1500. *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
  1501. }
  1502. UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) {
  1503. _upb_sethas(msg, 2);
  1504. *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
  1505. }
  1506. UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) {
  1507. _upb_sethas(msg, 3);
  1508. *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
  1509. }
  1510. UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) {
  1511. _upb_sethas(msg, 4);
  1512. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
  1513. }
  1514. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t *len) {
  1515. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len);
  1516. }
  1517. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t len, upb_Arena *arena) {
  1518. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 8), len, UPB_SIZE(2, 3), arena);
  1519. }
  1520. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_Arena *arena) {
  1521. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1522. bool ok = _upb_Array_Append_accessor2(
  1523. msg, UPB_SIZE(8, 8), UPB_SIZE(2, 3), &sub, arena);
  1524. if (!ok) return NULL;
  1525. return sub;
  1526. }
  1527. /* google.protobuf.FieldOptions */
  1528. UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_new(upb_Arena* arena) {
  1529. return (google_protobuf_FieldOptions*)_upb_Message_New(&google_protobuf_FieldOptions_msginit, arena);
  1530. }
  1531. UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  1532. google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena);
  1533. if (!ret) return NULL;
  1534. if (upb_Decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1535. return NULL;
  1536. }
  1537. return ret;
  1538. }
  1539. UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse_ex(const char* buf, size_t size,
  1540. const upb_ExtensionRegistry* extreg,
  1541. int options, upb_Arena* arena) {
  1542. google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena);
  1543. if (!ret) return NULL;
  1544. if (upb_Decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, extreg, options, arena) !=
  1545. kUpb_DecodeStatus_Ok) {
  1546. return NULL;
  1547. }
  1548. return ret;
  1549. }
  1550. UPB_INLINE char* google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions* msg, upb_Arena* arena, size_t* len) {
  1551. return upb_Encode(msg, &google_protobuf_FieldOptions_msginit, 0, arena, len);
  1552. }
  1553. UPB_INLINE char* google_protobuf_FieldOptions_serialize_ex(const google_protobuf_FieldOptions* msg, int options,
  1554. upb_Arena* arena, size_t* len) {
  1555. return upb_Encode(msg, &google_protobuf_FieldOptions_msginit, options, arena, len);
  1556. }
  1557. UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 1); }
  1558. UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions* msg) {
  1559. return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
  1560. }
  1561. UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 2); }
  1562. UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions* msg) {
  1563. return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool);
  1564. }
  1565. UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 3); }
  1566. UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions* msg) {
  1567. return *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool);
  1568. }
  1569. UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 4); }
  1570. UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions* msg) {
  1571. return *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool);
  1572. }
  1573. UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 5); }
  1574. UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions* msg) {
  1575. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t);
  1576. }
  1577. UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 6); }
  1578. UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions* msg) {
  1579. return *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool);
  1580. }
  1581. UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 16)); }
  1582. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(16, 16), len); }
  1583. UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) {
  1584. _upb_sethas(msg, 1);
  1585. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  1586. }
  1587. UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) {
  1588. _upb_sethas(msg, 2);
  1589. *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
  1590. }
  1591. UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) {
  1592. _upb_sethas(msg, 3);
  1593. *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = value;
  1594. }
  1595. UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) {
  1596. _upb_sethas(msg, 4);
  1597. *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool) = value;
  1598. }
  1599. UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) {
  1600. _upb_sethas(msg, 5);
  1601. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
  1602. }
  1603. UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) {
  1604. _upb_sethas(msg, 6);
  1605. *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) = value;
  1606. }
  1607. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t *len) {
  1608. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 16), len);
  1609. }
  1610. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t len, upb_Arena *arena) {
  1611. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 16), len, UPB_SIZE(2, 3), arena);
  1612. }
  1613. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_Arena *arena) {
  1614. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1615. bool ok = _upb_Array_Append_accessor2(
  1616. msg, UPB_SIZE(16, 16), UPB_SIZE(2, 3), &sub, arena);
  1617. if (!ok) return NULL;
  1618. return sub;
  1619. }
  1620. /* google.protobuf.OneofOptions */
  1621. UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_new(upb_Arena* arena) {
  1622. return (google_protobuf_OneofOptions*)_upb_Message_New(&google_protobuf_OneofOptions_msginit, arena);
  1623. }
  1624. UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  1625. google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena);
  1626. if (!ret) return NULL;
  1627. if (upb_Decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1628. return NULL;
  1629. }
  1630. return ret;
  1631. }
  1632. UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse_ex(const char* buf, size_t size,
  1633. const upb_ExtensionRegistry* extreg,
  1634. int options, upb_Arena* arena) {
  1635. google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena);
  1636. if (!ret) return NULL;
  1637. if (upb_Decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, extreg, options, arena) !=
  1638. kUpb_DecodeStatus_Ok) {
  1639. return NULL;
  1640. }
  1641. return ret;
  1642. }
  1643. UPB_INLINE char* google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions* msg, upb_Arena* arena, size_t* len) {
  1644. return upb_Encode(msg, &google_protobuf_OneofOptions_msginit, 0, arena, len);
  1645. }
  1646. UPB_INLINE char* google_protobuf_OneofOptions_serialize_ex(const google_protobuf_OneofOptions* msg, int options,
  1647. upb_Arena* arena, size_t* len) {
  1648. return upb_Encode(msg, &google_protobuf_OneofOptions_msginit, options, arena, len);
  1649. }
  1650. UPB_INLINE bool google_protobuf_OneofOptions_has_uninterpreted_option(const google_protobuf_OneofOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
  1651. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
  1652. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t *len) {
  1653. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
  1654. }
  1655. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t len, upb_Arena *arena) {
  1656. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
  1657. }
  1658. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_Arena *arena) {
  1659. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1660. bool ok = _upb_Array_Append_accessor2(
  1661. msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
  1662. if (!ok) return NULL;
  1663. return sub;
  1664. }
  1665. /* google.protobuf.EnumOptions */
  1666. UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_new(upb_Arena* arena) {
  1667. return (google_protobuf_EnumOptions*)_upb_Message_New(&google_protobuf_EnumOptions_msginit, arena);
  1668. }
  1669. UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  1670. google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena);
  1671. if (!ret) return NULL;
  1672. if (upb_Decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1673. return NULL;
  1674. }
  1675. return ret;
  1676. }
  1677. UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse_ex(const char* buf, size_t size,
  1678. const upb_ExtensionRegistry* extreg,
  1679. int options, upb_Arena* arena) {
  1680. google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena);
  1681. if (!ret) return NULL;
  1682. if (upb_Decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, extreg, options, arena) !=
  1683. kUpb_DecodeStatus_Ok) {
  1684. return NULL;
  1685. }
  1686. return ret;
  1687. }
  1688. UPB_INLINE char* google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions* msg, upb_Arena* arena, size_t* len) {
  1689. return upb_Encode(msg, &google_protobuf_EnumOptions_msginit, 0, arena, len);
  1690. }
  1691. UPB_INLINE char* google_protobuf_EnumOptions_serialize_ex(const google_protobuf_EnumOptions* msg, int options,
  1692. upb_Arena* arena, size_t* len) {
  1693. return upb_Encode(msg, &google_protobuf_EnumOptions_msginit, options, arena, len);
  1694. }
  1695. UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_hasbit(msg, 1); }
  1696. UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions* msg) {
  1697. return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
  1698. }
  1699. UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_hasbit(msg, 2); }
  1700. UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions* msg) {
  1701. return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool);
  1702. }
  1703. UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const google_protobuf_EnumOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
  1704. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
  1705. UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) {
  1706. _upb_sethas(msg, 1);
  1707. *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
  1708. }
  1709. UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) {
  1710. _upb_sethas(msg, 2);
  1711. *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
  1712. }
  1713. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t *len) {
  1714. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
  1715. }
  1716. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t len, upb_Arena *arena) {
  1717. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
  1718. }
  1719. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_Arena *arena) {
  1720. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1721. bool ok = _upb_Array_Append_accessor2(
  1722. msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
  1723. if (!ok) return NULL;
  1724. return sub;
  1725. }
  1726. /* google.protobuf.EnumValueOptions */
  1727. UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_new(upb_Arena* arena) {
  1728. return (google_protobuf_EnumValueOptions*)_upb_Message_New(&google_protobuf_EnumValueOptions_msginit, arena);
  1729. }
  1730. UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  1731. google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena);
  1732. if (!ret) return NULL;
  1733. if (upb_Decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1734. return NULL;
  1735. }
  1736. return ret;
  1737. }
  1738. UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse_ex(const char* buf, size_t size,
  1739. const upb_ExtensionRegistry* extreg,
  1740. int options, upb_Arena* arena) {
  1741. google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena);
  1742. if (!ret) return NULL;
  1743. if (upb_Decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, extreg, options, arena) !=
  1744. kUpb_DecodeStatus_Ok) {
  1745. return NULL;
  1746. }
  1747. return ret;
  1748. }
  1749. UPB_INLINE char* google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions* msg, upb_Arena* arena, size_t* len) {
  1750. return upb_Encode(msg, &google_protobuf_EnumValueOptions_msginit, 0, arena, len);
  1751. }
  1752. UPB_INLINE char* google_protobuf_EnumValueOptions_serialize_ex(const google_protobuf_EnumValueOptions* msg, int options,
  1753. upb_Arena* arena, size_t* len) {
  1754. return upb_Encode(msg, &google_protobuf_EnumValueOptions_msginit, options, arena, len);
  1755. }
  1756. UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_hasbit(msg, 1); }
  1757. UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions* msg) {
  1758. return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
  1759. }
  1760. UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const google_protobuf_EnumValueOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
  1761. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
  1762. UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) {
  1763. _upb_sethas(msg, 1);
  1764. *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
  1765. }
  1766. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t *len) {
  1767. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
  1768. }
  1769. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t len, upb_Arena *arena) {
  1770. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
  1771. }
  1772. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_Arena *arena) {
  1773. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1774. bool ok = _upb_Array_Append_accessor2(
  1775. msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
  1776. if (!ok) return NULL;
  1777. return sub;
  1778. }
  1779. /* google.protobuf.ServiceOptions */
  1780. UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_new(upb_Arena* arena) {
  1781. return (google_protobuf_ServiceOptions*)_upb_Message_New(&google_protobuf_ServiceOptions_msginit, arena);
  1782. }
  1783. UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  1784. google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena);
  1785. if (!ret) return NULL;
  1786. if (upb_Decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1787. return NULL;
  1788. }
  1789. return ret;
  1790. }
  1791. UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse_ex(const char* buf, size_t size,
  1792. const upb_ExtensionRegistry* extreg,
  1793. int options, upb_Arena* arena) {
  1794. google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena);
  1795. if (!ret) return NULL;
  1796. if (upb_Decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, extreg, options, arena) !=
  1797. kUpb_DecodeStatus_Ok) {
  1798. return NULL;
  1799. }
  1800. return ret;
  1801. }
  1802. UPB_INLINE char* google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions* msg, upb_Arena* arena, size_t* len) {
  1803. return upb_Encode(msg, &google_protobuf_ServiceOptions_msginit, 0, arena, len);
  1804. }
  1805. UPB_INLINE char* google_protobuf_ServiceOptions_serialize_ex(const google_protobuf_ServiceOptions* msg, int options,
  1806. upb_Arena* arena, size_t* len) {
  1807. return upb_Encode(msg, &google_protobuf_ServiceOptions_msginit, options, arena, len);
  1808. }
  1809. UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_hasbit(msg, 1); }
  1810. UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions* msg) {
  1811. return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
  1812. }
  1813. UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const google_protobuf_ServiceOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
  1814. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
  1815. UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) {
  1816. _upb_sethas(msg, 1);
  1817. *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
  1818. }
  1819. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t *len) {
  1820. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
  1821. }
  1822. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t len, upb_Arena *arena) {
  1823. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
  1824. }
  1825. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_Arena *arena) {
  1826. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1827. bool ok = _upb_Array_Append_accessor2(
  1828. msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
  1829. if (!ok) return NULL;
  1830. return sub;
  1831. }
  1832. /* google.protobuf.MethodOptions */
  1833. UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_new(upb_Arena* arena) {
  1834. return (google_protobuf_MethodOptions*)_upb_Message_New(&google_protobuf_MethodOptions_msginit, arena);
  1835. }
  1836. UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  1837. google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena);
  1838. if (!ret) return NULL;
  1839. if (upb_Decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1840. return NULL;
  1841. }
  1842. return ret;
  1843. }
  1844. UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse_ex(const char* buf, size_t size,
  1845. const upb_ExtensionRegistry* extreg,
  1846. int options, upb_Arena* arena) {
  1847. google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena);
  1848. if (!ret) return NULL;
  1849. if (upb_Decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, extreg, options, arena) !=
  1850. kUpb_DecodeStatus_Ok) {
  1851. return NULL;
  1852. }
  1853. return ret;
  1854. }
  1855. UPB_INLINE char* google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions* msg, upb_Arena* arena, size_t* len) {
  1856. return upb_Encode(msg, &google_protobuf_MethodOptions_msginit, 0, arena, len);
  1857. }
  1858. UPB_INLINE char* google_protobuf_MethodOptions_serialize_ex(const google_protobuf_MethodOptions* msg, int options,
  1859. upb_Arena* arena, size_t* len) {
  1860. return upb_Encode(msg, &google_protobuf_MethodOptions_msginit, options, arena, len);
  1861. }
  1862. UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 1); }
  1863. UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions* msg) {
  1864. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool);
  1865. }
  1866. UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 2); }
  1867. UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions* msg) {
  1868. return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
  1869. }
  1870. UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
  1871. UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
  1872. UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) {
  1873. _upb_sethas(msg, 1);
  1874. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
  1875. }
  1876. UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) {
  1877. _upb_sethas(msg, 2);
  1878. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  1879. }
  1880. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len) {
  1881. return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
  1882. }
  1883. UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t len, upb_Arena *arena) {
  1884. return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(2, 3), arena);
  1885. }
  1886. UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_Arena *arena) {
  1887. struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1888. bool ok = _upb_Array_Append_accessor2(
  1889. msg, UPB_SIZE(12, 16), UPB_SIZE(2, 3), &sub, arena);
  1890. if (!ok) return NULL;
  1891. return sub;
  1892. }
  1893. /* google.protobuf.UninterpretedOption */
  1894. UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_new(upb_Arena* arena) {
  1895. return (google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena);
  1896. }
  1897. UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse(const char* buf, size_t size, upb_Arena* arena) {
  1898. google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena);
  1899. if (!ret) return NULL;
  1900. if (upb_Decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1901. return NULL;
  1902. }
  1903. return ret;
  1904. }
  1905. UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse_ex(const char* buf, size_t size,
  1906. const upb_ExtensionRegistry* extreg,
  1907. int options, upb_Arena* arena) {
  1908. google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena);
  1909. if (!ret) return NULL;
  1910. if (upb_Decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, extreg, options, arena) !=
  1911. kUpb_DecodeStatus_Ok) {
  1912. return NULL;
  1913. }
  1914. return ret;
  1915. }
  1916. UPB_INLINE char* google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption* msg, upb_Arena* arena, size_t* len) {
  1917. return upb_Encode(msg, &google_protobuf_UninterpretedOption_msginit, 0, arena, len);
  1918. }
  1919. UPB_INLINE char* google_protobuf_UninterpretedOption_serialize_ex(const google_protobuf_UninterpretedOption* msg, int options,
  1920. upb_Arena* arena, size_t* len) {
  1921. return upb_Encode(msg, &google_protobuf_UninterpretedOption_msginit, options, arena, len);
  1922. }
  1923. UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); }
  1924. UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(56, 80), len); }
  1925. UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 1); }
  1926. UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption* msg) {
  1927. return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_StringView);
  1928. }
  1929. UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 2); }
  1930. UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption* msg) {
  1931. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t);
  1932. }
  1933. UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 3); }
  1934. UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption* msg) {
  1935. return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t);
  1936. }
  1937. UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 4); }
  1938. UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption* msg) {
  1939. return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double);
  1940. }
  1941. UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 5); }
  1942. UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption* msg) {
  1943. return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_StringView);
  1944. }
  1945. UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 6); }
  1946. UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption* msg) {
  1947. return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_StringView);
  1948. }
  1949. UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len) {
  1950. return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 80), len);
  1951. }
  1952. UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption *msg, size_t len, upb_Arena *arena) {
  1953. return (google_protobuf_UninterpretedOption_NamePart**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(56, 80), len, UPB_SIZE(2, 3), arena);
  1954. }
  1955. UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption *msg, upb_Arena *arena) {
  1956. struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
  1957. bool ok = _upb_Array_Append_accessor2(
  1958. msg, UPB_SIZE(56, 80), UPB_SIZE(2, 3), &sub, arena);
  1959. if (!ok) return NULL;
  1960. return sub;
  1961. }
  1962. UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) {
  1963. _upb_sethas(msg, 1);
  1964. *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_StringView) = value;
  1965. }
  1966. UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) {
  1967. _upb_sethas(msg, 2);
  1968. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
  1969. }
  1970. UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) {
  1971. _upb_sethas(msg, 3);
  1972. *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value;
  1973. }
  1974. UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) {
  1975. _upb_sethas(msg, 4);
  1976. *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double) = value;
  1977. }
  1978. UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) {
  1979. _upb_sethas(msg, 5);
  1980. *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_StringView) = value;
  1981. }
  1982. UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) {
  1983. _upb_sethas(msg, 6);
  1984. *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_StringView) = value;
  1985. }
  1986. /* google.protobuf.UninterpretedOption.NamePart */
  1987. UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_new(upb_Arena* arena) {
  1988. return (google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
  1989. }
  1990. UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse(const char* buf, size_t size, upb_Arena* arena) {
  1991. google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
  1992. if (!ret) return NULL;
  1993. if (upb_Decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  1994. return NULL;
  1995. }
  1996. return ret;
  1997. }
  1998. UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse_ex(const char* buf, size_t size,
  1999. const upb_ExtensionRegistry* extreg,
  2000. int options, upb_Arena* arena) {
  2001. google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
  2002. if (!ret) return NULL;
  2003. if (upb_Decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, extreg, options, arena) !=
  2004. kUpb_DecodeStatus_Ok) {
  2005. return NULL;
  2006. }
  2007. return ret;
  2008. }
  2009. UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart* msg, upb_Arena* arena, size_t* len) {
  2010. return upb_Encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, 0, arena, len);
  2011. }
  2012. UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize_ex(const google_protobuf_UninterpretedOption_NamePart* msg, int options,
  2013. upb_Arena* arena, size_t* len) {
  2014. return upb_Encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, options, arena, len);
  2015. }
  2016. UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 1); }
  2017. UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) {
  2018. return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
  2019. }
  2020. UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 2); }
  2021. UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) {
  2022. return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
  2023. }
  2024. UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_StringView value) {
  2025. _upb_sethas(msg, 1);
  2026. *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
  2027. }
  2028. UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) {
  2029. _upb_sethas(msg, 2);
  2030. *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
  2031. }
  2032. /* google.protobuf.SourceCodeInfo */
  2033. UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_new(upb_Arena* arena) {
  2034. return (google_protobuf_SourceCodeInfo*)_upb_Message_New(&google_protobuf_SourceCodeInfo_msginit, arena);
  2035. }
  2036. UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) {
  2037. google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena);
  2038. if (!ret) return NULL;
  2039. if (upb_Decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  2040. return NULL;
  2041. }
  2042. return ret;
  2043. }
  2044. UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse_ex(const char* buf, size_t size,
  2045. const upb_ExtensionRegistry* extreg,
  2046. int options, upb_Arena* arena) {
  2047. google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena);
  2048. if (!ret) return NULL;
  2049. if (upb_Decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, extreg, options, arena) !=
  2050. kUpb_DecodeStatus_Ok) {
  2051. return NULL;
  2052. }
  2053. return ret;
  2054. }
  2055. UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo* msg, upb_Arena* arena, size_t* len) {
  2056. return upb_Encode(msg, &google_protobuf_SourceCodeInfo_msginit, 0, arena, len);
  2057. }
  2058. UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize_ex(const google_protobuf_SourceCodeInfo* msg, int options,
  2059. upb_Arena* arena, size_t* len) {
  2060. return upb_Encode(msg, &google_protobuf_SourceCodeInfo_msginit, options, arena, len);
  2061. }
  2062. UPB_INLINE bool google_protobuf_SourceCodeInfo_has_location(const google_protobuf_SourceCodeInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
  2063. UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg, size_t *len) { return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
  2064. UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo *msg, size_t *len) {
  2065. return (google_protobuf_SourceCodeInfo_Location**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
  2066. }
  2067. UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo *msg, size_t len, upb_Arena *arena) {
  2068. return (google_protobuf_SourceCodeInfo_Location**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
  2069. }
  2070. UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo *msg, upb_Arena *arena) {
  2071. struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
  2072. bool ok = _upb_Array_Append_accessor2(
  2073. msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
  2074. if (!ok) return NULL;
  2075. return sub;
  2076. }
  2077. /* google.protobuf.SourceCodeInfo.Location */
  2078. UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_new(upb_Arena* arena) {
  2079. return (google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
  2080. }
  2081. UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse(const char* buf, size_t size, upb_Arena* arena) {
  2082. google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena);
  2083. if (!ret) return NULL;
  2084. if (upb_Decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  2085. return NULL;
  2086. }
  2087. return ret;
  2088. }
  2089. UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse_ex(const char* buf, size_t size,
  2090. const upb_ExtensionRegistry* extreg,
  2091. int options, upb_Arena* arena) {
  2092. google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena);
  2093. if (!ret) return NULL;
  2094. if (upb_Decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, extreg, options, arena) !=
  2095. kUpb_DecodeStatus_Ok) {
  2096. return NULL;
  2097. }
  2098. return ret;
  2099. }
  2100. UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location* msg, upb_Arena* arena, size_t* len) {
  2101. return upb_Encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, 0, arena, len);
  2102. }
  2103. UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize_ex(const google_protobuf_SourceCodeInfo_Location* msg, int options,
  2104. upb_Arena* arena, size_t* len) {
  2105. return upb_Encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, options, arena, len);
  2106. }
  2107. UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
  2108. UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
  2109. UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_hasbit(msg, 1); }
  2110. UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) {
  2111. return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
  2112. }
  2113. UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_hasbit(msg, 2); }
  2114. UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) {
  2115. return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView);
  2116. }
  2117. UPB_INLINE upb_StringView const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
  2118. UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
  2119. return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
  2120. }
  2121. UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_Arena *arena) {
  2122. return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, 2, arena);
  2123. }
  2124. UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_Arena *arena) {
  2125. return _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), 2, &val,
  2126. arena);
  2127. }
  2128. UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
  2129. return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
  2130. }
  2131. UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_Arena *arena) {
  2132. return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, 2, arena);
  2133. }
  2134. UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_Arena *arena) {
  2135. return _upb_Array_Append_accessor2(msg, UPB_SIZE(24, 48), 2, &val,
  2136. arena);
  2137. }
  2138. UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) {
  2139. _upb_sethas(msg, 1);
  2140. *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
  2141. }
  2142. UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) {
  2143. _upb_sethas(msg, 2);
  2144. *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value;
  2145. }
  2146. UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
  2147. return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
  2148. }
  2149. UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_Arena *arena) {
  2150. return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena);
  2151. }
  2152. UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView val, upb_Arena *arena) {
  2153. return _upb_Array_Append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val,
  2154. arena);
  2155. }
  2156. /* google.protobuf.GeneratedCodeInfo */
  2157. UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_new(upb_Arena* arena) {
  2158. return (google_protobuf_GeneratedCodeInfo*)_upb_Message_New(&google_protobuf_GeneratedCodeInfo_msginit, arena);
  2159. }
  2160. UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) {
  2161. google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena);
  2162. if (!ret) return NULL;
  2163. if (upb_Decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  2164. return NULL;
  2165. }
  2166. return ret;
  2167. }
  2168. UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse_ex(const char* buf, size_t size,
  2169. const upb_ExtensionRegistry* extreg,
  2170. int options, upb_Arena* arena) {
  2171. google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena);
  2172. if (!ret) return NULL;
  2173. if (upb_Decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, extreg, options, arena) !=
  2174. kUpb_DecodeStatus_Ok) {
  2175. return NULL;
  2176. }
  2177. return ret;
  2178. }
  2179. UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo* msg, upb_Arena* arena, size_t* len) {
  2180. return upb_Encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, 0, arena, len);
  2181. }
  2182. UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize_ex(const google_protobuf_GeneratedCodeInfo* msg, int options,
  2183. upb_Arena* arena, size_t* len) {
  2184. return upb_Encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, options, arena, len);
  2185. }
  2186. UPB_INLINE bool google_protobuf_GeneratedCodeInfo_has_annotation(const google_protobuf_GeneratedCodeInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
  2187. UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg, size_t *len) { return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
  2188. UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t *len) {
  2189. return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
  2190. }
  2191. UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t len, upb_Arena *arena) {
  2192. return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
  2193. }
  2194. UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_Arena *arena) {
  2195. struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
  2196. bool ok = _upb_Array_Append_accessor2(
  2197. msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
  2198. if (!ok) return NULL;
  2199. return sub;
  2200. }
  2201. /* google.protobuf.GeneratedCodeInfo.Annotation */
  2202. UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_new(upb_Arena* arena) {
  2203. return (google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
  2204. }
  2205. UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse(const char* buf, size_t size, upb_Arena* arena) {
  2206. google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
  2207. if (!ret) return NULL;
  2208. if (upb_Decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
  2209. return NULL;
  2210. }
  2211. return ret;
  2212. }
  2213. UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char* buf, size_t size,
  2214. const upb_ExtensionRegistry* extreg,
  2215. int options, upb_Arena* arena) {
  2216. google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
  2217. if (!ret) return NULL;
  2218. if (upb_Decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, extreg, options, arena) !=
  2219. kUpb_DecodeStatus_Ok) {
  2220. return NULL;
  2221. }
  2222. return ret;
  2223. }
  2224. UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation* msg, upb_Arena* arena, size_t* len) {
  2225. return upb_Encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, 0, arena, len);
  2226. }
  2227. UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize_ex(const google_protobuf_GeneratedCodeInfo_Annotation* msg, int options,
  2228. upb_Arena* arena, size_t* len) {
  2229. return upb_Encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, options, arena, len);
  2230. }
  2231. UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); }
  2232. UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 1); }
  2233. UPB_INLINE upb_StringView google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  2234. return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_StringView);
  2235. }
  2236. UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 2); }
  2237. UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  2238. return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
  2239. }
  2240. UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 3); }
  2241. UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  2242. return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t);
  2243. }
  2244. UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) {
  2245. return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len);
  2246. }
  2247. UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t len, upb_Arena *arena) {
  2248. return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 32), len, 2, arena);
  2249. }
  2250. UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t val, upb_Arena *arena) {
  2251. return _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 32), 2, &val,
  2252. arena);
  2253. }
  2254. UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_StringView value) {
  2255. _upb_sethas(msg, 1);
  2256. *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_StringView) = value;
  2257. }
  2258. UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
  2259. _upb_sethas(msg, 2);
  2260. *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
  2261. }
  2262. UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
  2263. _upb_sethas(msg, 3);
  2264. *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
  2265. }
  2266. extern const upb_MiniTable_File google_protobuf_descriptor_proto_upb_file_layout;
  2267. /* Max size 32 is google.protobuf.FileOptions */
  2268. /* Max size 64 is google.protobuf.FileOptions */
  2269. #define _UPB_MAXOPT_SIZE UPB_SIZE(104, 192)
  2270. #ifdef __cplusplus
  2271. } /* extern "C" */
  2272. #endif
  2273. #include "upb/port_undef.inc"
  2274. #endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */