| 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 |
|
| 9 |
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ |
| 10 |
#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ |
| 11 |
|
| 12 |
#include "upb/msg_internal.h" |
| 13 |
#include "upb/decode.h" |
| 14 |
#include "upb/decode_fast.h" |
| 15 |
#include "upb/encode.h" |
| 16 |
|
| 17 |
#include "upb/port_def.inc" |
| 18 |
|
| 19 |
#ifdef __cplusplus |
| 20 |
extern "C" { |
| 21 |
#endif |
| 22 |
|
| 23 |
struct google_protobuf_FileDescriptorSet; |
| 24 |
struct google_protobuf_FileDescriptorProto; |
| 25 |
struct google_protobuf_DescriptorProto; |
| 26 |
struct google_protobuf_DescriptorProto_ExtensionRange; |
| 27 |
struct google_protobuf_DescriptorProto_ReservedRange; |
| 28 |
struct google_protobuf_ExtensionRangeOptions; |
| 29 |
struct google_protobuf_FieldDescriptorProto; |
| 30 |
struct google_protobuf_OneofDescriptorProto; |
| 31 |
struct google_protobuf_EnumDescriptorProto; |
| 32 |
struct google_protobuf_EnumDescriptorProto_EnumReservedRange; |
| 33 |
struct google_protobuf_EnumValueDescriptorProto; |
| 34 |
struct google_protobuf_ServiceDescriptorProto; |
| 35 |
struct google_protobuf_MethodDescriptorProto; |
| 36 |
struct google_protobuf_FileOptions; |
| 37 |
struct google_protobuf_MessageOptions; |
| 38 |
struct google_protobuf_FieldOptions; |
| 39 |
struct google_protobuf_OneofOptions; |
| 40 |
struct google_protobuf_EnumOptions; |
| 41 |
struct google_protobuf_EnumValueOptions; |
| 42 |
struct google_protobuf_ServiceOptions; |
| 43 |
struct google_protobuf_MethodOptions; |
| 44 |
struct google_protobuf_UninterpretedOption; |
| 45 |
struct google_protobuf_UninterpretedOption_NamePart; |
| 46 |
struct google_protobuf_SourceCodeInfo; |
| 47 |
struct google_protobuf_SourceCodeInfo_Location; |
| 48 |
struct google_protobuf_GeneratedCodeInfo; |
| 49 |
struct google_protobuf_GeneratedCodeInfo_Annotation; |
| 50 |
typedef struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet; |
| 51 |
typedef struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto; |
| 52 |
typedef struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto; |
| 53 |
typedef struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange; |
| 54 |
typedef struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange; |
| 55 |
typedef struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions; |
| 56 |
typedef struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto; |
| 57 |
typedef struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto; |
| 58 |
typedef struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto; |
| 59 |
typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange; |
| 60 |
typedef struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto; |
| 61 |
typedef struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto; |
| 62 |
typedef struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto; |
| 63 |
typedef struct google_protobuf_FileOptions google_protobuf_FileOptions; |
| 64 |
typedef struct google_protobuf_MessageOptions google_protobuf_MessageOptions; |
| 65 |
typedef struct google_protobuf_FieldOptions google_protobuf_FieldOptions; |
| 66 |
typedef struct google_protobuf_OneofOptions google_protobuf_OneofOptions; |
| 67 |
typedef struct google_protobuf_EnumOptions google_protobuf_EnumOptions; |
| 68 |
typedef struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions; |
| 69 |
typedef struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions; |
| 70 |
typedef struct google_protobuf_MethodOptions google_protobuf_MethodOptions; |
| 71 |
typedef struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption; |
| 72 |
typedef struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart; |
| 73 |
typedef struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo; |
| 74 |
typedef struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location; |
| 75 |
typedef struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo; |
| 76 |
typedef struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation; |
| 77 |
extern const upb_MiniTable google_protobuf_FileDescriptorSet_msginit; |
| 78 |
extern const upb_MiniTable google_protobuf_FileDescriptorProto_msginit; |
| 79 |
extern const upb_MiniTable google_protobuf_DescriptorProto_msginit; |
| 80 |
extern const upb_MiniTable google_protobuf_DescriptorProto_ExtensionRange_msginit; |
| 81 |
extern const upb_MiniTable google_protobuf_DescriptorProto_ReservedRange_msginit; |
| 82 |
extern const upb_MiniTable google_protobuf_ExtensionRangeOptions_msginit; |
| 83 |
extern const upb_MiniTable google_protobuf_FieldDescriptorProto_msginit; |
| 84 |
extern const upb_MiniTable google_protobuf_OneofDescriptorProto_msginit; |
| 85 |
extern const upb_MiniTable google_protobuf_EnumDescriptorProto_msginit; |
| 86 |
extern const upb_MiniTable google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit; |
| 87 |
extern const upb_MiniTable google_protobuf_EnumValueDescriptorProto_msginit; |
| 88 |
extern const upb_MiniTable google_protobuf_ServiceDescriptorProto_msginit; |
| 89 |
extern const upb_MiniTable google_protobuf_MethodDescriptorProto_msginit; |
| 90 |
extern const upb_MiniTable google_protobuf_FileOptions_msginit; |
| 91 |
extern const upb_MiniTable google_protobuf_MessageOptions_msginit; |
| 92 |
extern const upb_MiniTable google_protobuf_FieldOptions_msginit; |
| 93 |
extern const upb_MiniTable google_protobuf_OneofOptions_msginit; |
| 94 |
extern const upb_MiniTable google_protobuf_EnumOptions_msginit; |
| 95 |
extern const upb_MiniTable google_protobuf_EnumValueOptions_msginit; |
| 96 |
extern const upb_MiniTable google_protobuf_ServiceOptions_msginit; |
| 97 |
extern const upb_MiniTable google_protobuf_MethodOptions_msginit; |
| 98 |
extern const upb_MiniTable google_protobuf_UninterpretedOption_msginit; |
| 99 |
extern const upb_MiniTable google_protobuf_UninterpretedOption_NamePart_msginit; |
| 100 |
extern const upb_MiniTable google_protobuf_SourceCodeInfo_msginit; |
| 101 |
extern const upb_MiniTable google_protobuf_SourceCodeInfo_Location_msginit; |
| 102 |
extern const upb_MiniTable google_protobuf_GeneratedCodeInfo_msginit; |
| 103 |
extern const upb_MiniTable google_protobuf_GeneratedCodeInfo_Annotation_msginit; |
| 104 |
|
| 105 |
typedef enum { |
| 106 |
google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1, |
| 107 |
google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2, |
| 108 |
google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3 |
| 109 |
} google_protobuf_FieldDescriptorProto_Label; |
| 110 |
|
| 111 |
typedef enum { |
| 112 |
google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1, |
| 113 |
google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2, |
| 114 |
google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3, |
| 115 |
google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4, |
| 116 |
google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5, |
| 117 |
google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6, |
| 118 |
google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7, |
| 119 |
google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8, |
| 120 |
google_protobuf_FieldDescriptorProto_TYPE_STRING = 9, |
| 121 |
google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10, |
| 122 |
google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11, |
| 123 |
google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12, |
| 124 |
google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13, |
| 125 |
google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14, |
| 126 |
google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15, |
| 127 |
google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16, |
| 128 |
google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17, |
| 129 |
google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18 |
| 130 |
} google_protobuf_FieldDescriptorProto_Type; |
| 131 |
|
| 132 |
typedef enum { |
| 133 |
google_protobuf_FieldOptions_STRING = 0, |
| 134 |
google_protobuf_FieldOptions_CORD = 1, |
| 135 |
google_protobuf_FieldOptions_STRING_PIECE = 2 |
| 136 |
} google_protobuf_FieldOptions_CType; |
| 137 |
|
| 138 |
typedef enum { |
| 139 |
google_protobuf_FieldOptions_JS_NORMAL = 0, |
| 140 |
google_protobuf_FieldOptions_JS_STRING = 1, |
| 141 |
google_protobuf_FieldOptions_JS_NUMBER = 2 |
| 142 |
} google_protobuf_FieldOptions_JSType; |
| 143 |
|
| 144 |
typedef enum { |
| 145 |
google_protobuf_FileOptions_SPEED = 1, |
| 146 |
google_protobuf_FileOptions_CODE_SIZE = 2, |
| 147 |
google_protobuf_FileOptions_LITE_RUNTIME = 3 |
| 148 |
} google_protobuf_FileOptions_OptimizeMode; |
| 149 |
|
| 150 |
typedef enum { |
| 151 |
google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN = 0, |
| 152 |
google_protobuf_MethodOptions_NO_SIDE_EFFECTS = 1, |
| 153 |
google_protobuf_MethodOptions_IDEMPOTENT = 2 |
| 154 |
} google_protobuf_MethodOptions_IdempotencyLevel; |
| 155 |
|
| 156 |
|
| 157 |
extern const upb_MiniTable_Enum google_protobuf_FieldDescriptorProto_Label_enuminit; |
| 158 |
extern const upb_MiniTable_Enum google_protobuf_FieldDescriptorProto_Type_enuminit; |
| 159 |
extern const upb_MiniTable_Enum google_protobuf_FieldOptions_CType_enuminit; |
| 160 |
extern const upb_MiniTable_Enum google_protobuf_FieldOptions_JSType_enuminit; |
| 161 |
extern const upb_MiniTable_Enum google_protobuf_FileOptions_OptimizeMode_enuminit; |
| 162 |
extern const upb_MiniTable_Enum google_protobuf_MethodOptions_IdempotencyLevel_enuminit; |
| 163 |
|
| 164 |
/* google.protobuf.FileDescriptorSet */ |
| 165 |
|
| 166 |
UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_new(upb_Arena* arena) { |
| 167 |
return (google_protobuf_FileDescriptorSet*)_upb_Message_New(&google_protobuf_FileDescriptorSet_msginit, arena); |
| 168 |
} |
| 169 |
UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 170 |
google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena); |
| 171 |
if (!ret) return NULL; |
| 172 |
if (upb_Decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 173 |
return NULL; |
| 174 |
} |
| 175 |
return ret; |
| 176 |
} |
| 177 |
UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse_ex(const char* buf, size_t size, |
| 178 |
const upb_ExtensionRegistry* extreg, |
| 179 |
int options, upb_Arena* arena) { |
| 180 |
google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena); |
| 181 |
if (!ret) return NULL; |
| 182 |
if (upb_Decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, extreg, options, arena) != |
| 183 |
kUpb_DecodeStatus_Ok) { |
| 184 |
return NULL; |
| 185 |
} |
| 186 |
return ret; |
| 187 |
} |
| 188 |
UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet* msg, upb_Arena* arena, size_t* len) { |
| 189 |
char* ptr; |
| 190 |
(void)upb_Encode(msg, &google_protobuf_FileDescriptorSet_msginit, 0, arena, &ptr, len); |
| 191 |
return ptr; |
| 192 |
} |
| 193 |
UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize_ex(const google_protobuf_FileDescriptorSet* msg, int options, |
| 194 |
upb_Arena* arena, size_t* len) { |
| 195 |
char* ptr; |
| 196 |
(void)upb_Encode(msg, &google_protobuf_FileDescriptorSet_msginit, options, arena, &ptr, len); |
| 197 |
return ptr; |
| 198 |
} |
| 199 |
UPB_INLINE bool google_protobuf_FileDescriptorSet_has_file(const google_protobuf_FileDescriptorSet* msg) { |
| 200 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); |
| 201 |
} |
| 202 |
UPB_INLINE void google_protobuf_FileDescriptorSet_clear_file(const google_protobuf_FileDescriptorSet* msg) { |
| 203 |
_upb_array_detach(msg, UPB_SIZE(0, 0)); |
| 204 |
} |
| 205 |
UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet* msg, size_t* len) { |
| 206 |
return (const google_protobuf_FileDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); |
| 207 |
} |
| 208 |
|
| 209 |
UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet* msg, size_t* len) { |
| 210 |
return (google_protobuf_FileDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
| 211 |
} |
| 212 |
UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet* msg, size_t len, upb_Arena* arena) { |
| 213 |
return (google_protobuf_FileDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena); |
| 214 |
} |
| 215 |
UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet* msg, upb_Arena* arena) { |
| 216 |
struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_Message_New(&google_protobuf_FileDescriptorProto_msginit, arena); |
| 217 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena); |
| 218 |
if (!ok) return NULL; |
| 219 |
return sub; |
| 220 |
} |
| 221 |
|
| 222 |
/* google.protobuf.FileDescriptorProto */ |
| 223 |
|
| 224 |
UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_new(upb_Arena* arena) { |
| 225 |
return (google_protobuf_FileDescriptorProto*)_upb_Message_New(&google_protobuf_FileDescriptorProto_msginit, arena); |
| 226 |
} |
| 227 |
UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 228 |
google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena); |
| 229 |
if (!ret) return NULL; |
| 230 |
if (upb_Decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 231 |
return NULL; |
| 232 |
} |
| 233 |
return ret; |
| 234 |
} |
| 235 |
UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse_ex(const char* buf, size_t size, |
| 236 |
const upb_ExtensionRegistry* extreg, |
| 237 |
int options, upb_Arena* arena) { |
| 238 |
google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena); |
| 239 |
if (!ret) return NULL; |
| 240 |
if (upb_Decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, extreg, options, arena) != |
| 241 |
kUpb_DecodeStatus_Ok) { |
| 242 |
return NULL; |
| 243 |
} |
| 244 |
return ret; |
| 245 |
} |
| 246 |
UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto* msg, upb_Arena* arena, size_t* len) { |
| 247 |
char* ptr; |
| 248 |
(void)upb_Encode(msg, &google_protobuf_FileDescriptorProto_msginit, 0, arena, &ptr, len); |
| 249 |
return ptr; |
| 250 |
} |
| 251 |
UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize_ex(const google_protobuf_FileDescriptorProto* msg, int options, |
| 252 |
upb_Arena* arena, size_t* len) { |
| 253 |
char* ptr; |
| 254 |
(void)upb_Encode(msg, &google_protobuf_FileDescriptorProto_msginit, options, arena, &ptr, len); |
| 255 |
return ptr; |
| 256 |
} |
| 257 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto* msg) { |
| 258 |
return _upb_hasbit(msg, 1); |
| 259 |
} |
| 260 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_name(const google_protobuf_FileDescriptorProto* msg) { |
| 261 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 262 |
_upb_clearhas(msg, 1); |
| 263 |
} |
| 264 |
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto* msg) { |
| 265 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 266 |
} |
| 267 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto* msg) { |
| 268 |
return _upb_hasbit(msg, 2); |
| 269 |
} |
| 270 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_package(const google_protobuf_FileDescriptorProto* msg) { |
| 271 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 272 |
_upb_clearhas(msg, 2); |
| 273 |
} |
| 274 |
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto* msg) { |
| 275 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView); |
| 276 |
} |
| 277 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_dependency(const google_protobuf_FileDescriptorProto* msg) { |
| 278 |
_upb_array_detach(msg, UPB_SIZE(20, 40)); |
| 279 |
} |
| 280 |
UPB_INLINE upb_StringView const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 281 |
return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); |
| 282 |
} |
| 283 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto* msg) { |
| 284 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); |
| 285 |
} |
| 286 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_message_type(const google_protobuf_FileDescriptorProto* msg) { |
| 287 |
_upb_array_detach(msg, UPB_SIZE(24, 48)); |
| 288 |
} |
| 289 |
UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 290 |
return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); |
| 291 |
} |
| 292 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_protobuf_FileDescriptorProto* msg) { |
| 293 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); |
| 294 |
} |
| 295 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_enum_type(const google_protobuf_FileDescriptorProto* msg) { |
| 296 |
_upb_array_detach(msg, UPB_SIZE(28, 56)); |
| 297 |
} |
| 298 |
UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 299 |
return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); |
| 300 |
} |
| 301 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_protobuf_FileDescriptorProto* msg) { |
| 302 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); |
| 303 |
} |
| 304 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_service(const google_protobuf_FileDescriptorProto* msg) { |
| 305 |
_upb_array_detach(msg, UPB_SIZE(32, 64)); |
| 306 |
} |
| 307 |
UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 308 |
return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); |
| 309 |
} |
| 310 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto* msg) { |
| 311 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); |
| 312 |
} |
| 313 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_extension(const google_protobuf_FileDescriptorProto* msg) { |
| 314 |
_upb_array_detach(msg, UPB_SIZE(36, 72)); |
| 315 |
} |
| 316 |
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 317 |
return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); |
| 318 |
} |
| 319 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto* msg) { |
| 320 |
return _upb_hasbit(msg, 3); |
| 321 |
} |
| 322 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_options(const google_protobuf_FileDescriptorProto* msg) { |
| 323 |
*UPB_PTR_AT(msg, UPB_SIZE(40, 80), const upb_Message*) = NULL; |
| 324 |
} |
| 325 |
UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto* msg) { |
| 326 |
return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const google_protobuf_FileOptions*); |
| 327 |
} |
| 328 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto* msg) { |
| 329 |
return _upb_hasbit(msg, 4); |
| 330 |
} |
| 331 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_source_code_info(const google_protobuf_FileDescriptorProto* msg) { |
| 332 |
*UPB_PTR_AT(msg, UPB_SIZE(44, 88), const upb_Message*) = NULL; |
| 333 |
} |
| 334 |
UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto* msg) { |
| 335 |
return *UPB_PTR_AT(msg, UPB_SIZE(44, 88), const google_protobuf_SourceCodeInfo*); |
| 336 |
} |
| 337 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_public_dependency(const google_protobuf_FileDescriptorProto* msg) { |
| 338 |
_upb_array_detach(msg, UPB_SIZE(48, 96)); |
| 339 |
} |
| 340 |
UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 341 |
return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); |
| 342 |
} |
| 343 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_weak_dependency(const google_protobuf_FileDescriptorProto* msg) { |
| 344 |
_upb_array_detach(msg, UPB_SIZE(52, 104)); |
| 345 |
} |
| 346 |
UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 347 |
return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); |
| 348 |
} |
| 349 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto* msg) { |
| 350 |
return _upb_hasbit(msg, 5); |
| 351 |
} |
| 352 |
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_syntax(const google_protobuf_FileDescriptorProto* msg) { |
| 353 |
*UPB_PTR_AT(msg, UPB_SIZE(56, 112), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 354 |
_upb_clearhas(msg, 5); |
| 355 |
} |
| 356 |
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto* msg) { |
| 357 |
return *UPB_PTR_AT(msg, UPB_SIZE(56, 112), upb_StringView); |
| 358 |
} |
| 359 |
|
| 360 |
UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { |
| 361 |
_upb_sethas(msg, 1); |
| 362 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 363 |
} |
| 364 |
UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { |
| 365 |
_upb_sethas(msg, 2); |
| 366 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value; |
| 367 |
} |
| 368 |
UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 369 |
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); |
| 370 |
} |
| 371 |
UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 372 |
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(3, 4), arena); |
| 373 |
} |
| 374 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto* msg, upb_StringView val, upb_Arena* arena) { |
| 375 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), UPB_SIZE(3, 4), &val, arena); |
| 376 |
} |
| 377 |
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 378 |
return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); |
| 379 |
} |
| 380 |
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 381 |
return (google_protobuf_DescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena); |
| 382 |
} |
| 383 |
UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { |
| 384 |
struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google_protobuf_DescriptorProto_msginit, arena); |
| 385 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena); |
| 386 |
if (!ok) return NULL; |
| 387 |
return sub; |
| 388 |
} |
| 389 |
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_mutable_enum_type(google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 390 |
return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); |
| 391 |
} |
| 392 |
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 393 |
return (google_protobuf_EnumDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena); |
| 394 |
} |
| 395 |
UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { |
| 396 |
struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_msginit, arena); |
| 397 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena); |
| 398 |
if (!ok) return NULL; |
| 399 |
return sub; |
| 400 |
} |
| 401 |
UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_mutable_service(google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 402 |
return (google_protobuf_ServiceDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); |
| 403 |
} |
| 404 |
UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 405 |
return (google_protobuf_ServiceDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena); |
| 406 |
} |
| 407 |
UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { |
| 408 |
struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google_protobuf_ServiceDescriptorProto_msginit, arena); |
| 409 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(32, 64), UPB_SIZE(2, 3), &sub, arena); |
| 410 |
if (!ok) return NULL; |
| 411 |
return sub; |
| 412 |
} |
| 413 |
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_mutable_extension(google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 414 |
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); |
| 415 |
} |
| 416 |
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 417 |
return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena); |
| 418 |
} |
| 419 |
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { |
| 420 |
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msginit, arena); |
| 421 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena); |
| 422 |
if (!ok) return NULL; |
| 423 |
return sub; |
| 424 |
} |
| 425 |
UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) { |
| 426 |
_upb_sethas(msg, 3); |
| 427 |
*UPB_PTR_AT(msg, UPB_SIZE(40, 80), google_protobuf_FileOptions*) = value; |
| 428 |
} |
| 429 |
UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { |
| 430 |
struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); |
| 431 |
if (sub == NULL) { |
| 432 |
sub = (struct google_protobuf_FileOptions*)_upb_Message_New(&google_protobuf_FileOptions_msginit, arena); |
| 433 |
if (!sub) return NULL; |
| 434 |
google_protobuf_FileDescriptorProto_set_options(msg, sub); |
| 435 |
} |
| 436 |
return sub; |
| 437 |
} |
| 438 |
UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) { |
| 439 |
_upb_sethas(msg, 4); |
| 440 |
*UPB_PTR_AT(msg, UPB_SIZE(44, 88), google_protobuf_SourceCodeInfo*) = value; |
| 441 |
} |
| 442 |
UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) { |
| 443 |
struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); |
| 444 |
if (sub == NULL) { |
| 445 |
sub = (struct google_protobuf_SourceCodeInfo*)_upb_Message_New(&google_protobuf_SourceCodeInfo_msginit, arena); |
| 446 |
if (!sub) return NULL; |
| 447 |
google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub); |
| 448 |
} |
| 449 |
return sub; |
| 450 |
} |
| 451 |
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependency(google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 452 |
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len); |
| 453 |
} |
| 454 |
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 455 |
return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(48, 96), len, 2, arena); |
| 456 |
} |
| 457 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto* msg, int32_t val, upb_Arena* arena) { |
| 458 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(48, 96), 2, &val, arena); |
| 459 |
} |
| 460 |
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto* msg, size_t* len) { |
| 461 |
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 104), len); |
| 462 |
} |
| 463 |
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 464 |
return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(52, 104), len, 2, arena); |
| 465 |
} |
| 466 |
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto* msg, int32_t val, upb_Arena* arena) { |
| 467 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(52, 104), 2, &val, arena); |
| 468 |
} |
| 469 |
UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_StringView value) { |
| 470 |
_upb_sethas(msg, 5); |
| 471 |
*UPB_PTR_AT(msg, UPB_SIZE(56, 112), upb_StringView) = value; |
| 472 |
} |
| 473 |
|
| 474 |
/* google.protobuf.DescriptorProto */ |
| 475 |
|
| 476 |
UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_new(upb_Arena* arena) { |
| 477 |
return (google_protobuf_DescriptorProto*)_upb_Message_New(&google_protobuf_DescriptorProto_msginit, arena); |
| 478 |
} |
| 479 |
UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 480 |
google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena); |
| 481 |
if (!ret) return NULL; |
| 482 |
if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 483 |
return NULL; |
| 484 |
} |
| 485 |
return ret; |
| 486 |
} |
| 487 |
UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse_ex(const char* buf, size_t size, |
| 488 |
const upb_ExtensionRegistry* extreg, |
| 489 |
int options, upb_Arena* arena) { |
| 490 |
google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena); |
| 491 |
if (!ret) return NULL; |
| 492 |
if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, extreg, options, arena) != |
| 493 |
kUpb_DecodeStatus_Ok) { |
| 494 |
return NULL; |
| 495 |
} |
| 496 |
return ret; |
| 497 |
} |
| 498 |
UPB_INLINE char* google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto* msg, upb_Arena* arena, size_t* len) { |
| 499 |
char* ptr; |
| 500 |
(void)upb_Encode(msg, &google_protobuf_DescriptorProto_msginit, 0, arena, &ptr, len); |
| 501 |
return ptr; |
| 502 |
} |
| 503 |
UPB_INLINE char* google_protobuf_DescriptorProto_serialize_ex(const google_protobuf_DescriptorProto* msg, int options, |
| 504 |
upb_Arena* arena, size_t* len) { |
| 505 |
char* ptr; |
| 506 |
(void)upb_Encode(msg, &google_protobuf_DescriptorProto_msginit, options, arena, &ptr, len); |
| 507 |
return ptr; |
| 508 |
} |
| 509 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto* msg) { |
| 510 |
return _upb_hasbit(msg, 1); |
| 511 |
} |
| 512 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_name(const google_protobuf_DescriptorProto* msg) { |
| 513 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 514 |
_upb_clearhas(msg, 1); |
| 515 |
} |
| 516 |
UPB_INLINE upb_StringView google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto* msg) { |
| 517 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 518 |
} |
| 519 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto* msg) { |
| 520 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); |
| 521 |
} |
| 522 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_field(const google_protobuf_DescriptorProto* msg) { |
| 523 |
_upb_array_detach(msg, UPB_SIZE(12, 24)); |
| 524 |
} |
| 525 |
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto* msg, size_t* len) { |
| 526 |
return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); |
| 527 |
} |
| 528 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_protobuf_DescriptorProto* msg) { |
| 529 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); |
| 530 |
} |
| 531 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_nested_type(const google_protobuf_DescriptorProto* msg) { |
| 532 |
_upb_array_detach(msg, UPB_SIZE(16, 32)); |
| 533 |
} |
| 534 |
UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto* msg, size_t* len) { |
| 535 |
return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); |
| 536 |
} |
| 537 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_protobuf_DescriptorProto* msg) { |
| 538 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); |
| 539 |
} |
| 540 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_enum_type(const google_protobuf_DescriptorProto* msg) { |
| 541 |
_upb_array_detach(msg, UPB_SIZE(20, 40)); |
| 542 |
} |
| 543 |
UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto* msg, size_t* len) { |
| 544 |
return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); |
| 545 |
} |
| 546 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google_protobuf_DescriptorProto* msg) { |
| 547 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); |
| 548 |
} |
| 549 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_extension_range(const google_protobuf_DescriptorProto* msg) { |
| 550 |
_upb_array_detach(msg, UPB_SIZE(24, 48)); |
| 551 |
} |
| 552 |
UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto* msg, size_t* len) { |
| 553 |
return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); |
| 554 |
} |
| 555 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto* msg) { |
| 556 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); |
| 557 |
} |
| 558 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_extension(const google_protobuf_DescriptorProto* msg) { |
| 559 |
_upb_array_detach(msg, UPB_SIZE(28, 56)); |
| 560 |
} |
| 561 |
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto* msg, size_t* len) { |
| 562 |
return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); |
| 563 |
} |
| 564 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto* msg) { |
| 565 |
return _upb_hasbit(msg, 2); |
| 566 |
} |
| 567 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_options(const google_protobuf_DescriptorProto* msg) { |
| 568 |
*UPB_PTR_AT(msg, UPB_SIZE(32, 64), const upb_Message*) = NULL; |
| 569 |
} |
| 570 |
UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto* msg) { |
| 571 |
return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_protobuf_MessageOptions*); |
| 572 |
} |
| 573 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_protobuf_DescriptorProto* msg) { |
| 574 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); |
| 575 |
} |
| 576 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_oneof_decl(const google_protobuf_DescriptorProto* msg) { |
| 577 |
_upb_array_detach(msg, UPB_SIZE(36, 72)); |
| 578 |
} |
| 579 |
UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto* msg, size_t* len) { |
| 580 |
return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); |
| 581 |
} |
| 582 |
UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_protobuf_DescriptorProto* msg) { |
| 583 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); |
| 584 |
} |
| 585 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_range(const google_protobuf_DescriptorProto* msg) { |
| 586 |
_upb_array_detach(msg, UPB_SIZE(40, 80)); |
| 587 |
} |
| 588 |
UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto* msg, size_t* len) { |
| 589 |
return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); |
| 590 |
} |
| 591 |
UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_name(const google_protobuf_DescriptorProto* msg) { |
| 592 |
_upb_array_detach(msg, UPB_SIZE(44, 88)); |
| 593 |
} |
| 594 |
UPB_INLINE upb_StringView const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto* msg, size_t* len) { |
| 595 |
return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); |
| 596 |
} |
| 597 |
|
| 598 |
UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_StringView value) { |
| 599 |
_upb_sethas(msg, 1); |
| 600 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 601 |
} |
| 602 |
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto* msg, size_t* len) { |
| 603 |
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
| 604 |
} |
| 605 |
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 606 |
return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); |
| 607 |
} |
| 608 |
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { |
| 609 |
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msginit, arena); |
| 610 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); |
| 611 |
if (!ok) return NULL; |
| 612 |
return sub; |
| 613 |
} |
| 614 |
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mutable_nested_type(google_protobuf_DescriptorProto* msg, size_t* len) { |
| 615 |
return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); |
| 616 |
} |
| 617 |
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 618 |
return (google_protobuf_DescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena); |
| 619 |
} |
| 620 |
UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { |
| 621 |
struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(&google_protobuf_DescriptorProto_msginit, arena); |
| 622 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena); |
| 623 |
if (!ok) return NULL; |
| 624 |
return sub; |
| 625 |
} |
| 626 |
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_mutable_enum_type(google_protobuf_DescriptorProto* msg, size_t* len) { |
| 627 |
return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); |
| 628 |
} |
| 629 |
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 630 |
return (google_protobuf_EnumDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena); |
| 631 |
} |
| 632 |
UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { |
| 633 |
struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_msginit, arena); |
| 634 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena); |
| 635 |
if (!ok) return NULL; |
| 636 |
return sub; |
| 637 |
} |
| 638 |
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_mutable_extension_range(google_protobuf_DescriptorProto* msg, size_t* len) { |
| 639 |
return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); |
| 640 |
} |
| 641 |
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 642 |
return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena); |
| 643 |
} |
| 644 |
UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { |
| 645 |
struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); |
| 646 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena); |
| 647 |
if (!ok) return NULL; |
| 648 |
return sub; |
| 649 |
} |
| 650 |
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_extension(google_protobuf_DescriptorProto* msg, size_t* len) { |
| 651 |
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); |
| 652 |
} |
| 653 |
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 654 |
return (google_protobuf_FieldDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena); |
| 655 |
} |
| 656 |
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { |
| 657 |
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msginit, arena); |
| 658 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena); |
| 659 |
if (!ok) return NULL; |
| 660 |
return sub; |
| 661 |
} |
| 662 |
UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) { |
| 663 |
_upb_sethas(msg, 2); |
| 664 |
*UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_protobuf_MessageOptions*) = value; |
| 665 |
} |
| 666 |
UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { |
| 667 |
struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); |
| 668 |
if (sub == NULL) { |
| 669 |
sub = (struct google_protobuf_MessageOptions*)_upb_Message_New(&google_protobuf_MessageOptions_msginit, arena); |
| 670 |
if (!sub) return NULL; |
| 671 |
google_protobuf_DescriptorProto_set_options(msg, sub); |
| 672 |
} |
| 673 |
return sub; |
| 674 |
} |
| 675 |
UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_mutable_oneof_decl(google_protobuf_DescriptorProto* msg, size_t* len) { |
| 676 |
return (google_protobuf_OneofDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); |
| 677 |
} |
| 678 |
UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 679 |
return (google_protobuf_OneofDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena); |
| 680 |
} |
| 681 |
UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { |
| 682 |
struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google_protobuf_OneofDescriptorProto_msginit, arena); |
| 683 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena); |
| 684 |
if (!ok) return NULL; |
| 685 |
return sub; |
| 686 |
} |
| 687 |
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_mutable_reserved_range(google_protobuf_DescriptorProto* msg, size_t* len) { |
| 688 |
return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); |
| 689 |
} |
| 690 |
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 691 |
return (google_protobuf_DescriptorProto_ReservedRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(2, 3), arena); |
| 692 |
} |
| 693 |
UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto* msg, upb_Arena* arena) { |
| 694 |
struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); |
| 695 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(40, 80), UPB_SIZE(2, 3), &sub, arena); |
| 696 |
if (!ok) return NULL; |
| 697 |
return sub; |
| 698 |
} |
| 699 |
UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto* msg, size_t* len) { |
| 700 |
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); |
| 701 |
} |
| 702 |
UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 703 |
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(3, 4), arena); |
| 704 |
} |
| 705 |
UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto* msg, upb_StringView val, upb_Arena* arena) { |
| 706 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(44, 88), UPB_SIZE(3, 4), &val, arena); |
| 707 |
} |
| 708 |
|
| 709 |
/* google.protobuf.DescriptorProto.ExtensionRange */ |
| 710 |
|
| 711 |
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_new(upb_Arena* arena) { |
| 712 |
return (google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); |
| 713 |
} |
| 714 |
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 715 |
google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena); |
| 716 |
if (!ret) return NULL; |
| 717 |
if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 718 |
return NULL; |
| 719 |
} |
| 720 |
return ret; |
| 721 |
} |
| 722 |
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char* buf, size_t size, |
| 723 |
const upb_ExtensionRegistry* extreg, |
| 724 |
int options, upb_Arena* arena) { |
| 725 |
google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena); |
| 726 |
if (!ret) return NULL; |
| 727 |
if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, extreg, options, arena) != |
| 728 |
kUpb_DecodeStatus_Ok) { |
| 729 |
return NULL; |
| 730 |
} |
| 731 |
return ret; |
| 732 |
} |
| 733 |
UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena, size_t* len) { |
| 734 |
char* ptr; |
| 735 |
(void)upb_Encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, 0, arena, &ptr, len); |
| 736 |
return ptr; |
| 737 |
} |
| 738 |
UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize_ex(const google_protobuf_DescriptorProto_ExtensionRange* msg, int options, |
| 739 |
upb_Arena* arena, size_t* len) { |
| 740 |
char* ptr; |
| 741 |
(void)upb_Encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, options, arena, &ptr, len); |
| 742 |
return ptr; |
| 743 |
} |
| 744 |
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 745 |
return _upb_hasbit(msg, 1); |
| 746 |
} |
| 747 |
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 748 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 749 |
_upb_clearhas(msg, 1); |
| 750 |
} |
| 751 |
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 752 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 753 |
} |
| 754 |
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 755 |
return _upb_hasbit(msg, 2); |
| 756 |
} |
| 757 |
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 758 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = 0; |
| 759 |
_upb_clearhas(msg, 2); |
| 760 |
} |
| 761 |
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 762 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); |
| 763 |
} |
| 764 |
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 765 |
return _upb_hasbit(msg, 3); |
| 766 |
} |
| 767 |
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 768 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), const upb_Message*) = NULL; |
| 769 |
} |
| 770 |
UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) { |
| 771 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const google_protobuf_ExtensionRangeOptions*); |
| 772 |
} |
| 773 |
|
| 774 |
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { |
| 775 |
_upb_sethas(msg, 1); |
| 776 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 777 |
} |
| 778 |
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { |
| 779 |
_upb_sethas(msg, 2); |
| 780 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; |
| 781 |
} |
| 782 |
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) { |
| 783 |
_upb_sethas(msg, 3); |
| 784 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), google_protobuf_ExtensionRangeOptions*) = value; |
| 785 |
} |
| 786 |
UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena) { |
| 787 |
struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); |
| 788 |
if (sub == NULL) { |
| 789 |
sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google_protobuf_ExtensionRangeOptions_msginit, arena); |
| 790 |
if (!sub) return NULL; |
| 791 |
google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub); |
| 792 |
} |
| 793 |
return sub; |
| 794 |
} |
| 795 |
|
| 796 |
/* google.protobuf.DescriptorProto.ReservedRange */ |
| 797 |
|
| 798 |
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_new(upb_Arena* arena) { |
| 799 |
return (google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); |
| 800 |
} |
| 801 |
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 802 |
google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena); |
| 803 |
if (!ret) return NULL; |
| 804 |
if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 805 |
return NULL; |
| 806 |
} |
| 807 |
return ret; |
| 808 |
} |
| 809 |
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char* buf, size_t size, |
| 810 |
const upb_ExtensionRegistry* extreg, |
| 811 |
int options, upb_Arena* arena) { |
| 812 |
google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena); |
| 813 |
if (!ret) return NULL; |
| 814 |
if (upb_Decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, extreg, options, arena) != |
| 815 |
kUpb_DecodeStatus_Ok) { |
| 816 |
return NULL; |
| 817 |
} |
| 818 |
return ret; |
| 819 |
} |
| 820 |
UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange* msg, upb_Arena* arena, size_t* len) { |
| 821 |
char* ptr; |
| 822 |
(void)upb_Encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, 0, arena, &ptr, len); |
| 823 |
return ptr; |
| 824 |
} |
| 825 |
UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize_ex(const google_protobuf_DescriptorProto_ReservedRange* msg, int options, |
| 826 |
upb_Arena* arena, size_t* len) { |
| 827 |
char* ptr; |
| 828 |
(void)upb_Encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, options, arena, &ptr, len); |
| 829 |
return ptr; |
| 830 |
} |
| 831 |
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { |
| 832 |
return _upb_hasbit(msg, 1); |
| 833 |
} |
| 834 |
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { |
| 835 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 836 |
_upb_clearhas(msg, 1); |
| 837 |
} |
| 838 |
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange* msg) { |
| 839 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 840 |
} |
| 841 |
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { |
| 842 |
return _upb_hasbit(msg, 2); |
| 843 |
} |
| 844 |
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { |
| 845 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = 0; |
| 846 |
_upb_clearhas(msg, 2); |
| 847 |
} |
| 848 |
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange* msg) { |
| 849 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); |
| 850 |
} |
| 851 |
|
| 852 |
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { |
| 853 |
_upb_sethas(msg, 1); |
| 854 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 855 |
} |
| 856 |
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { |
| 857 |
_upb_sethas(msg, 2); |
| 858 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; |
| 859 |
} |
| 860 |
|
| 861 |
/* google.protobuf.ExtensionRangeOptions */ |
| 862 |
|
| 863 |
UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_new(upb_Arena* arena) { |
| 864 |
return (google_protobuf_ExtensionRangeOptions*)_upb_Message_New(&google_protobuf_ExtensionRangeOptions_msginit, arena); |
| 865 |
} |
| 866 |
UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 867 |
google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena); |
| 868 |
if (!ret) return NULL; |
| 869 |
if (upb_Decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 870 |
return NULL; |
| 871 |
} |
| 872 |
return ret; |
| 873 |
} |
| 874 |
UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse_ex(const char* buf, size_t size, |
| 875 |
const upb_ExtensionRegistry* extreg, |
| 876 |
int options, upb_Arena* arena) { |
| 877 |
google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena); |
| 878 |
if (!ret) return NULL; |
| 879 |
if (upb_Decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, extreg, options, arena) != |
| 880 |
kUpb_DecodeStatus_Ok) { |
| 881 |
return NULL; |
| 882 |
} |
| 883 |
return ret; |
| 884 |
} |
| 885 |
UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena, size_t* len) { |
| 886 |
char* ptr; |
| 887 |
(void)upb_Encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, 0, arena, &ptr, len); |
| 888 |
return ptr; |
| 889 |
} |
| 890 |
UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize_ex(const google_protobuf_ExtensionRangeOptions* msg, int options, |
| 891 |
upb_Arena* arena, size_t* len) { |
| 892 |
char* ptr; |
| 893 |
(void)upb_Encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, options, arena, &ptr, len); |
| 894 |
return ptr; |
| 895 |
} |
| 896 |
UPB_INLINE bool google_protobuf_ExtensionRangeOptions_has_uninterpreted_option(const google_protobuf_ExtensionRangeOptions* msg) { |
| 897 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); |
| 898 |
} |
| 899 |
UPB_INLINE void google_protobuf_ExtensionRangeOptions_clear_uninterpreted_option(const google_protobuf_ExtensionRangeOptions* msg) { |
| 900 |
_upb_array_detach(msg, UPB_SIZE(0, 0)); |
| 901 |
} |
| 902 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions* msg, size_t* len) { |
| 903 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); |
| 904 |
} |
| 905 |
|
| 906 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, size_t* len) { |
| 907 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
| 908 |
} |
| 909 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, size_t len, upb_Arena* arena) { |
| 910 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena); |
| 911 |
} |
| 912 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena) { |
| 913 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 914 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena); |
| 915 |
if (!ok) return NULL; |
| 916 |
return sub; |
| 917 |
} |
| 918 |
|
| 919 |
/* google.protobuf.FieldDescriptorProto */ |
| 920 |
|
| 921 |
UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_new(upb_Arena* arena) { |
| 922 |
return (google_protobuf_FieldDescriptorProto*)_upb_Message_New(&google_protobuf_FieldDescriptorProto_msginit, arena); |
| 923 |
} |
| 924 |
UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 925 |
google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena); |
| 926 |
if (!ret) return NULL; |
| 927 |
if (upb_Decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 928 |
return NULL; |
| 929 |
} |
| 930 |
return ret; |
| 931 |
} |
| 932 |
UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse_ex(const char* buf, size_t size, |
| 933 |
const upb_ExtensionRegistry* extreg, |
| 934 |
int options, upb_Arena* arena) { |
| 935 |
google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena); |
| 936 |
if (!ret) return NULL; |
| 937 |
if (upb_Decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, extreg, options, arena) != |
| 938 |
kUpb_DecodeStatus_Ok) { |
| 939 |
return NULL; |
| 940 |
} |
| 941 |
return ret; |
| 942 |
} |
| 943 |
UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena, size_t* len) { |
| 944 |
char* ptr; |
| 945 |
(void)upb_Encode(msg, &google_protobuf_FieldDescriptorProto_msginit, 0, arena, &ptr, len); |
| 946 |
return ptr; |
| 947 |
} |
| 948 |
UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize_ex(const google_protobuf_FieldDescriptorProto* msg, int options, |
| 949 |
upb_Arena* arena, size_t* len) { |
| 950 |
char* ptr; |
| 951 |
(void)upb_Encode(msg, &google_protobuf_FieldDescriptorProto_msginit, options, arena, &ptr, len); |
| 952 |
return ptr; |
| 953 |
} |
| 954 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 955 |
return _upb_hasbit(msg, 1); |
| 956 |
} |
| 957 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 958 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 959 |
_upb_clearhas(msg, 1); |
| 960 |
} |
| 961 |
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 962 |
return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView); |
| 963 |
} |
| 964 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto* msg) { |
| 965 |
return _upb_hasbit(msg, 2); |
| 966 |
} |
| 967 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_extendee(const google_protobuf_FieldDescriptorProto* msg) { |
| 968 |
*UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 969 |
_upb_clearhas(msg, 2); |
| 970 |
} |
| 971 |
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto* msg) { |
| 972 |
return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView); |
| 973 |
} |
| 974 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto* msg) { |
| 975 |
return _upb_hasbit(msg, 3); |
| 976 |
} |
| 977 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_number(const google_protobuf_FieldDescriptorProto* msg) { |
| 978 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 979 |
_upb_clearhas(msg, 3); |
| 980 |
} |
| 981 |
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto* msg) { |
| 982 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 983 |
} |
| 984 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto* msg) { |
| 985 |
return _upb_hasbit(msg, 4); |
| 986 |
} |
| 987 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_label(const google_protobuf_FieldDescriptorProto* msg) { |
| 988 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = 0; |
| 989 |
_upb_clearhas(msg, 4); |
| 990 |
} |
| 991 |
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto* msg) { |
| 992 |
return google_protobuf_FieldDescriptorProto_has_label(msg) ? *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) : 1; |
| 993 |
} |
| 994 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto* msg) { |
| 995 |
return _upb_hasbit(msg, 5); |
| 996 |
} |
| 997 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type(const google_protobuf_FieldDescriptorProto* msg) { |
| 998 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = 0; |
| 999 |
_upb_clearhas(msg, 5); |
| 1000 |
} |
| 1001 |
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto* msg) { |
| 1002 |
return google_protobuf_FieldDescriptorProto_has_type(msg) ? *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) : 1; |
| 1003 |
} |
| 1004 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 1005 |
return _upb_hasbit(msg, 6); |
| 1006 |
} |
| 1007 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 1008 |
*UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1009 |
_upb_clearhas(msg, 6); |
| 1010 |
} |
| 1011 |
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 1012 |
return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView); |
| 1013 |
} |
| 1014 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto* msg) { |
| 1015 |
return _upb_hasbit(msg, 7); |
| 1016 |
} |
| 1017 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_default_value(const google_protobuf_FieldDescriptorProto* msg) { |
| 1018 |
*UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1019 |
_upb_clearhas(msg, 7); |
| 1020 |
} |
| 1021 |
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto* msg) { |
| 1022 |
return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView); |
| 1023 |
} |
| 1024 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto* msg) { |
| 1025 |
return _upb_hasbit(msg, 8); |
| 1026 |
} |
| 1027 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_options(const google_protobuf_FieldDescriptorProto* msg) { |
| 1028 |
*UPB_PTR_AT(msg, UPB_SIZE(56, 88), const upb_Message*) = NULL; |
| 1029 |
} |
| 1030 |
UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto* msg) { |
| 1031 |
return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), const google_protobuf_FieldOptions*); |
| 1032 |
} |
| 1033 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { |
| 1034 |
return _upb_hasbit(msg, 9); |
| 1035 |
} |
| 1036 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { |
| 1037 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = 0; |
| 1038 |
_upb_clearhas(msg, 9); |
| 1039 |
} |
| 1040 |
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto* msg) { |
| 1041 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); |
| 1042 |
} |
| 1043 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 1044 |
return _upb_hasbit(msg, 10); |
| 1045 |
} |
| 1046 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_json_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 1047 |
*UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1048 |
_upb_clearhas(msg, 10); |
| 1049 |
} |
| 1050 |
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto* msg) { |
| 1051 |
return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_StringView); |
| 1052 |
} |
| 1053 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { |
| 1054 |
return _upb_hasbit(msg, 11); |
| 1055 |
} |
| 1056 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { |
| 1057 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = 0; |
| 1058 |
_upb_clearhas(msg, 11); |
| 1059 |
} |
| 1060 |
UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) { |
| 1061 |
return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); |
| 1062 |
} |
| 1063 |
|
| 1064 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { |
| 1065 |
_upb_sethas(msg, 1); |
| 1066 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_StringView) = value; |
| 1067 |
} |
| 1068 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { |
| 1069 |
_upb_sethas(msg, 2); |
| 1070 |
*UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_StringView) = value; |
| 1071 |
} |
| 1072 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { |
| 1073 |
_upb_sethas(msg, 3); |
| 1074 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 1075 |
} |
| 1076 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) { |
| 1077 |
_upb_sethas(msg, 4); |
| 1078 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; |
| 1079 |
} |
| 1080 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) { |
| 1081 |
_upb_sethas(msg, 5); |
| 1082 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value; |
| 1083 |
} |
| 1084 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { |
| 1085 |
_upb_sethas(msg, 6); |
| 1086 |
*UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_StringView) = value; |
| 1087 |
} |
| 1088 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { |
| 1089 |
_upb_sethas(msg, 7); |
| 1090 |
*UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_StringView) = value; |
| 1091 |
} |
| 1092 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { |
| 1093 |
_upb_sethas(msg, 8); |
| 1094 |
*UPB_PTR_AT(msg, UPB_SIZE(56, 88), google_protobuf_FieldOptions*) = value; |
| 1095 |
} |
| 1096 |
UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) { |
| 1097 |
struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); |
| 1098 |
if (sub == NULL) { |
| 1099 |
sub = (struct google_protobuf_FieldOptions*)_upb_Message_New(&google_protobuf_FieldOptions_msginit, arena); |
| 1100 |
if (!sub) return NULL; |
| 1101 |
google_protobuf_FieldDescriptorProto_set_options(msg, sub); |
| 1102 |
} |
| 1103 |
return sub; |
| 1104 |
} |
| 1105 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) { |
| 1106 |
_upb_sethas(msg, 9); |
| 1107 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; |
| 1108 |
} |
| 1109 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) { |
| 1110 |
_upb_sethas(msg, 10); |
| 1111 |
*UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_StringView) = value; |
| 1112 |
} |
| 1113 |
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) { |
| 1114 |
_upb_sethas(msg, 11); |
| 1115 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value; |
| 1116 |
} |
| 1117 |
|
| 1118 |
/* google.protobuf.OneofDescriptorProto */ |
| 1119 |
|
| 1120 |
UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_new(upb_Arena* arena) { |
| 1121 |
return (google_protobuf_OneofDescriptorProto*)_upb_Message_New(&google_protobuf_OneofDescriptorProto_msginit, arena); |
| 1122 |
} |
| 1123 |
UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1124 |
google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena); |
| 1125 |
if (!ret) return NULL; |
| 1126 |
if (upb_Decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1127 |
return NULL; |
| 1128 |
} |
| 1129 |
return ret; |
| 1130 |
} |
| 1131 |
UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse_ex(const char* buf, size_t size, |
| 1132 |
const upb_ExtensionRegistry* extreg, |
| 1133 |
int options, upb_Arena* arena) { |
| 1134 |
google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena); |
| 1135 |
if (!ret) return NULL; |
| 1136 |
if (upb_Decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, extreg, options, arena) != |
| 1137 |
kUpb_DecodeStatus_Ok) { |
| 1138 |
return NULL; |
| 1139 |
} |
| 1140 |
return ret; |
| 1141 |
} |
| 1142 |
UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena, size_t* len) { |
| 1143 |
char* ptr; |
| 1144 |
(void)upb_Encode(msg, &google_protobuf_OneofDescriptorProto_msginit, 0, arena, &ptr, len); |
| 1145 |
return ptr; |
| 1146 |
} |
| 1147 |
UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize_ex(const google_protobuf_OneofDescriptorProto* msg, int options, |
| 1148 |
upb_Arena* arena, size_t* len) { |
| 1149 |
char* ptr; |
| 1150 |
(void)upb_Encode(msg, &google_protobuf_OneofDescriptorProto_msginit, options, arena, &ptr, len); |
| 1151 |
return ptr; |
| 1152 |
} |
| 1153 |
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto* msg) { |
| 1154 |
return _upb_hasbit(msg, 1); |
| 1155 |
} |
| 1156 |
UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_name(const google_protobuf_OneofDescriptorProto* msg) { |
| 1157 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1158 |
_upb_clearhas(msg, 1); |
| 1159 |
} |
| 1160 |
UPB_INLINE upb_StringView google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto* msg) { |
| 1161 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 1162 |
} |
| 1163 |
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto* msg) { |
| 1164 |
return _upb_hasbit(msg, 2); |
| 1165 |
} |
| 1166 |
UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_options(const google_protobuf_OneofDescriptorProto* msg) { |
| 1167 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL; |
| 1168 |
} |
| 1169 |
UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto* msg) { |
| 1170 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_OneofOptions*); |
| 1171 |
} |
| 1172 |
|
| 1173 |
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_StringView value) { |
| 1174 |
_upb_sethas(msg, 1); |
| 1175 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 1176 |
} |
| 1177 |
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) { |
| 1178 |
_upb_sethas(msg, 2); |
| 1179 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_OneofOptions*) = value; |
| 1180 |
} |
| 1181 |
UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) { |
| 1182 |
struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); |
| 1183 |
if (sub == NULL) { |
| 1184 |
sub = (struct google_protobuf_OneofOptions*)_upb_Message_New(&google_protobuf_OneofOptions_msginit, arena); |
| 1185 |
if (!sub) return NULL; |
| 1186 |
google_protobuf_OneofDescriptorProto_set_options(msg, sub); |
| 1187 |
} |
| 1188 |
return sub; |
| 1189 |
} |
| 1190 |
|
| 1191 |
/* google.protobuf.EnumDescriptorProto */ |
| 1192 |
|
| 1193 |
UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_new(upb_Arena* arena) { |
| 1194 |
return (google_protobuf_EnumDescriptorProto*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_msginit, arena); |
| 1195 |
} |
| 1196 |
UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1197 |
google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena); |
| 1198 |
if (!ret) return NULL; |
| 1199 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1200 |
return NULL; |
| 1201 |
} |
| 1202 |
return ret; |
| 1203 |
} |
| 1204 |
UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse_ex(const char* buf, size_t size, |
| 1205 |
const upb_ExtensionRegistry* extreg, |
| 1206 |
int options, upb_Arena* arena) { |
| 1207 |
google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena); |
| 1208 |
if (!ret) return NULL; |
| 1209 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, extreg, options, arena) != |
| 1210 |
kUpb_DecodeStatus_Ok) { |
| 1211 |
return NULL; |
| 1212 |
} |
| 1213 |
return ret; |
| 1214 |
} |
| 1215 |
UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena, size_t* len) { |
| 1216 |
char* ptr; |
| 1217 |
(void)upb_Encode(msg, &google_protobuf_EnumDescriptorProto_msginit, 0, arena, &ptr, len); |
| 1218 |
return ptr; |
| 1219 |
} |
| 1220 |
UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize_ex(const google_protobuf_EnumDescriptorProto* msg, int options, |
| 1221 |
upb_Arena* arena, size_t* len) { |
| 1222 |
char* ptr; |
| 1223 |
(void)upb_Encode(msg, &google_protobuf_EnumDescriptorProto_msginit, options, arena, &ptr, len); |
| 1224 |
return ptr; |
| 1225 |
} |
| 1226 |
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto* msg) { |
| 1227 |
return _upb_hasbit(msg, 1); |
| 1228 |
} |
| 1229 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_name(const google_protobuf_EnumDescriptorProto* msg) { |
| 1230 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1231 |
_upb_clearhas(msg, 1); |
| 1232 |
} |
| 1233 |
UPB_INLINE upb_StringView google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto* msg) { |
| 1234 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 1235 |
} |
| 1236 |
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto* msg) { |
| 1237 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); |
| 1238 |
} |
| 1239 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_value(const google_protobuf_EnumDescriptorProto* msg) { |
| 1240 |
_upb_array_detach(msg, UPB_SIZE(12, 24)); |
| 1241 |
} |
| 1242 |
UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { |
| 1243 |
return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); |
| 1244 |
} |
| 1245 |
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto* msg) { |
| 1246 |
return _upb_hasbit(msg, 2); |
| 1247 |
} |
| 1248 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_options(const google_protobuf_EnumDescriptorProto* msg) { |
| 1249 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL; |
| 1250 |
} |
| 1251 |
UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto* msg) { |
| 1252 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const google_protobuf_EnumOptions*); |
| 1253 |
} |
| 1254 |
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const google_protobuf_EnumDescriptorProto* msg) { |
| 1255 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); |
| 1256 |
} |
| 1257 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_range(const google_protobuf_EnumDescriptorProto* msg) { |
| 1258 |
_upb_array_detach(msg, UPB_SIZE(20, 40)); |
| 1259 |
} |
| 1260 |
UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { |
| 1261 |
return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); |
| 1262 |
} |
| 1263 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_name(const google_protobuf_EnumDescriptorProto* msg) { |
| 1264 |
_upb_array_detach(msg, UPB_SIZE(24, 48)); |
| 1265 |
} |
| 1266 |
UPB_INLINE upb_StringView const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto* msg, size_t* len) { |
| 1267 |
return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); |
| 1268 |
} |
| 1269 |
|
| 1270 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_StringView value) { |
| 1271 |
_upb_sethas(msg, 1); |
| 1272 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 1273 |
} |
| 1274 |
UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto* msg, size_t* len) { |
| 1275 |
return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
| 1276 |
} |
| 1277 |
UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 1278 |
return (google_protobuf_EnumValueDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); |
| 1279 |
} |
| 1280 |
UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { |
| 1281 |
struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google_protobuf_EnumValueDescriptorProto_msginit, arena); |
| 1282 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); |
| 1283 |
if (!ok) return NULL; |
| 1284 |
return sub; |
| 1285 |
} |
| 1286 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) { |
| 1287 |
_upb_sethas(msg, 2); |
| 1288 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), google_protobuf_EnumOptions*) = value; |
| 1289 |
} |
| 1290 |
UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { |
| 1291 |
struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); |
| 1292 |
if (sub == NULL) { |
| 1293 |
sub = (struct google_protobuf_EnumOptions*)_upb_Message_New(&google_protobuf_EnumOptions_msginit, arena); |
| 1294 |
if (!sub) return NULL; |
| 1295 |
google_protobuf_EnumDescriptorProto_set_options(msg, sub); |
| 1296 |
} |
| 1297 |
return sub; |
| 1298 |
} |
| 1299 |
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_mutable_reserved_range(google_protobuf_EnumDescriptorProto* msg, size_t* len) { |
| 1300 |
return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); |
| 1301 |
} |
| 1302 |
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 1303 |
return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena); |
| 1304 |
} |
| 1305 |
UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) { |
| 1306 |
struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); |
| 1307 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena); |
| 1308 |
if (!ok) return NULL; |
| 1309 |
return sub; |
| 1310 |
} |
| 1311 |
UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto* msg, size_t* len) { |
| 1312 |
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); |
| 1313 |
} |
| 1314 |
UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 1315 |
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(3, 4), arena); |
| 1316 |
} |
| 1317 |
UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto* msg, upb_StringView val, upb_Arena* arena) { |
| 1318 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(3, 4), &val, arena); |
| 1319 |
} |
| 1320 |
|
| 1321 |
/* google.protobuf.EnumDescriptorProto.EnumReservedRange */ |
| 1322 |
|
| 1323 |
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_Arena* arena) { |
| 1324 |
return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); |
| 1325 |
} |
| 1326 |
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1327 |
google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); |
| 1328 |
if (!ret) return NULL; |
| 1329 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1330 |
return NULL; |
| 1331 |
} |
| 1332 |
return ret; |
| 1333 |
} |
| 1334 |
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char* buf, size_t size, |
| 1335 |
const upb_ExtensionRegistry* extreg, |
| 1336 |
int options, upb_Arena* arena) { |
| 1337 |
google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); |
| 1338 |
if (!ret) return NULL; |
| 1339 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, extreg, options, arena) != |
| 1340 |
kUpb_DecodeStatus_Ok) { |
| 1341 |
return NULL; |
| 1342 |
} |
| 1343 |
return ret; |
| 1344 |
} |
| 1345 |
UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, upb_Arena* arena, size_t* len) { |
| 1346 |
char* ptr; |
| 1347 |
(void)upb_Encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, 0, arena, &ptr, len); |
| 1348 |
return ptr; |
| 1349 |
} |
| 1350 |
UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize_ex(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, int options, |
| 1351 |
upb_Arena* arena, size_t* len) { |
| 1352 |
char* ptr; |
| 1353 |
(void)upb_Encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, options, arena, &ptr, len); |
| 1354 |
return ptr; |
| 1355 |
} |
| 1356 |
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { |
| 1357 |
return _upb_hasbit(msg, 1); |
| 1358 |
} |
| 1359 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { |
| 1360 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 1361 |
_upb_clearhas(msg, 1); |
| 1362 |
} |
| 1363 |
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { |
| 1364 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 1365 |
} |
| 1366 |
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { |
| 1367 |
return _upb_hasbit(msg, 2); |
| 1368 |
} |
| 1369 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { |
| 1370 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = 0; |
| 1371 |
_upb_clearhas(msg, 2); |
| 1372 |
} |
| 1373 |
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { |
| 1374 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); |
| 1375 |
} |
| 1376 |
|
| 1377 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { |
| 1378 |
_upb_sethas(msg, 1); |
| 1379 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 1380 |
} |
| 1381 |
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { |
| 1382 |
_upb_sethas(msg, 2); |
| 1383 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; |
| 1384 |
} |
| 1385 |
|
| 1386 |
/* google.protobuf.EnumValueDescriptorProto */ |
| 1387 |
|
| 1388 |
UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_new(upb_Arena* arena) { |
| 1389 |
return (google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(&google_protobuf_EnumValueDescriptorProto_msginit, arena); |
| 1390 |
} |
| 1391 |
UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1392 |
google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena); |
| 1393 |
if (!ret) return NULL; |
| 1394 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1395 |
return NULL; |
| 1396 |
} |
| 1397 |
return ret; |
| 1398 |
} |
| 1399 |
UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse_ex(const char* buf, size_t size, |
| 1400 |
const upb_ExtensionRegistry* extreg, |
| 1401 |
int options, upb_Arena* arena) { |
| 1402 |
google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena); |
| 1403 |
if (!ret) return NULL; |
| 1404 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, extreg, options, arena) != |
| 1405 |
kUpb_DecodeStatus_Ok) { |
| 1406 |
return NULL; |
| 1407 |
} |
| 1408 |
return ret; |
| 1409 |
} |
| 1410 |
UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena, size_t* len) { |
| 1411 |
char* ptr; |
| 1412 |
(void)upb_Encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, 0, arena, &ptr, len); |
| 1413 |
return ptr; |
| 1414 |
} |
| 1415 |
UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize_ex(const google_protobuf_EnumValueDescriptorProto* msg, int options, |
| 1416 |
upb_Arena* arena, size_t* len) { |
| 1417 |
char* ptr; |
| 1418 |
(void)upb_Encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, options, arena, &ptr, len); |
| 1419 |
return ptr; |
| 1420 |
} |
| 1421 |
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1422 |
return _upb_hasbit(msg, 1); |
| 1423 |
} |
| 1424 |
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_name(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1425 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1426 |
_upb_clearhas(msg, 1); |
| 1427 |
} |
| 1428 |
UPB_INLINE upb_StringView google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1429 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView); |
| 1430 |
} |
| 1431 |
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1432 |
return _upb_hasbit(msg, 2); |
| 1433 |
} |
| 1434 |
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_number(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1435 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 1436 |
_upb_clearhas(msg, 2); |
| 1437 |
} |
| 1438 |
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1439 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 1440 |
} |
| 1441 |
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1442 |
return _upb_hasbit(msg, 3); |
| 1443 |
} |
| 1444 |
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_options(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1445 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), const upb_Message*) = NULL; |
| 1446 |
} |
| 1447 |
UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto* msg) { |
| 1448 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_protobuf_EnumValueOptions*); |
| 1449 |
} |
| 1450 |
|
| 1451 |
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_StringView value) { |
| 1452 |
_upb_sethas(msg, 1); |
| 1453 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = value; |
| 1454 |
} |
| 1455 |
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) { |
| 1456 |
_upb_sethas(msg, 2); |
| 1457 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 1458 |
} |
| 1459 |
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) { |
| 1460 |
_upb_sethas(msg, 3); |
| 1461 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), google_protobuf_EnumValueOptions*) = value; |
| 1462 |
} |
| 1463 |
UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) { |
| 1464 |
struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); |
| 1465 |
if (sub == NULL) { |
| 1466 |
sub = (struct google_protobuf_EnumValueOptions*)_upb_Message_New(&google_protobuf_EnumValueOptions_msginit, arena); |
| 1467 |
if (!sub) return NULL; |
| 1468 |
google_protobuf_EnumValueDescriptorProto_set_options(msg, sub); |
| 1469 |
} |
| 1470 |
return sub; |
| 1471 |
} |
| 1472 |
|
| 1473 |
/* google.protobuf.ServiceDescriptorProto */ |
| 1474 |
|
| 1475 |
UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_new(upb_Arena* arena) { |
| 1476 |
return (google_protobuf_ServiceDescriptorProto*)_upb_Message_New(&google_protobuf_ServiceDescriptorProto_msginit, arena); |
| 1477 |
} |
| 1478 |
UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1479 |
google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena); |
| 1480 |
if (!ret) return NULL; |
| 1481 |
if (upb_Decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1482 |
return NULL; |
| 1483 |
} |
| 1484 |
return ret; |
| 1485 |
} |
| 1486 |
UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse_ex(const char* buf, size_t size, |
| 1487 |
const upb_ExtensionRegistry* extreg, |
| 1488 |
int options, upb_Arena* arena) { |
| 1489 |
google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena); |
| 1490 |
if (!ret) return NULL; |
| 1491 |
if (upb_Decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, extreg, options, arena) != |
| 1492 |
kUpb_DecodeStatus_Ok) { |
| 1493 |
return NULL; |
| 1494 |
} |
| 1495 |
return ret; |
| 1496 |
} |
| 1497 |
UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena, size_t* len) { |
| 1498 |
char* ptr; |
| 1499 |
(void)upb_Encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, 0, arena, &ptr, len); |
| 1500 |
return ptr; |
| 1501 |
} |
| 1502 |
UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize_ex(const google_protobuf_ServiceDescriptorProto* msg, int options, |
| 1503 |
upb_Arena* arena, size_t* len) { |
| 1504 |
char* ptr; |
| 1505 |
(void)upb_Encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, options, arena, &ptr, len); |
| 1506 |
return ptr; |
| 1507 |
} |
| 1508 |
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto* msg) { |
| 1509 |
return _upb_hasbit(msg, 1); |
| 1510 |
} |
| 1511 |
UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_name(const google_protobuf_ServiceDescriptorProto* msg) { |
| 1512 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1513 |
_upb_clearhas(msg, 1); |
| 1514 |
} |
| 1515 |
UPB_INLINE upb_StringView google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto* msg) { |
| 1516 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 1517 |
} |
| 1518 |
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto* msg) { |
| 1519 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); |
| 1520 |
} |
| 1521 |
UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_method(const google_protobuf_ServiceDescriptorProto* msg) { |
| 1522 |
_upb_array_detach(msg, UPB_SIZE(12, 24)); |
| 1523 |
} |
| 1524 |
UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto* msg, size_t* len) { |
| 1525 |
return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); |
| 1526 |
} |
| 1527 |
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto* msg) { |
| 1528 |
return _upb_hasbit(msg, 2); |
| 1529 |
} |
| 1530 |
UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_options(const google_protobuf_ServiceDescriptorProto* msg) { |
| 1531 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL; |
| 1532 |
} |
| 1533 |
UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto* msg) { |
| 1534 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const google_protobuf_ServiceOptions*); |
| 1535 |
} |
| 1536 |
|
| 1537 |
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_StringView value) { |
| 1538 |
_upb_sethas(msg, 1); |
| 1539 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 1540 |
} |
| 1541 |
UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto* msg, size_t* len) { |
| 1542 |
return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
| 1543 |
} |
| 1544 |
UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto* msg, size_t len, upb_Arena* arena) { |
| 1545 |
return (google_protobuf_MethodDescriptorProto**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); |
| 1546 |
} |
| 1547 |
UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { |
| 1548 |
struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google_protobuf_MethodDescriptorProto_msginit, arena); |
| 1549 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); |
| 1550 |
if (!ok) return NULL; |
| 1551 |
return sub; |
| 1552 |
} |
| 1553 |
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) { |
| 1554 |
_upb_sethas(msg, 2); |
| 1555 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), google_protobuf_ServiceOptions*) = value; |
| 1556 |
} |
| 1557 |
UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) { |
| 1558 |
struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); |
| 1559 |
if (sub == NULL) { |
| 1560 |
sub = (struct google_protobuf_ServiceOptions*)_upb_Message_New(&google_protobuf_ServiceOptions_msginit, arena); |
| 1561 |
if (!sub) return NULL; |
| 1562 |
google_protobuf_ServiceDescriptorProto_set_options(msg, sub); |
| 1563 |
} |
| 1564 |
return sub; |
| 1565 |
} |
| 1566 |
|
| 1567 |
/* google.protobuf.MethodDescriptorProto */ |
| 1568 |
|
| 1569 |
UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_new(upb_Arena* arena) { |
| 1570 |
return (google_protobuf_MethodDescriptorProto*)_upb_Message_New(&google_protobuf_MethodDescriptorProto_msginit, arena); |
| 1571 |
} |
| 1572 |
UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1573 |
google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena); |
| 1574 |
if (!ret) return NULL; |
| 1575 |
if (upb_Decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1576 |
return NULL; |
| 1577 |
} |
| 1578 |
return ret; |
| 1579 |
} |
| 1580 |
UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse_ex(const char* buf, size_t size, |
| 1581 |
const upb_ExtensionRegistry* extreg, |
| 1582 |
int options, upb_Arena* arena) { |
| 1583 |
google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena); |
| 1584 |
if (!ret) return NULL; |
| 1585 |
if (upb_Decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, extreg, options, arena) != |
| 1586 |
kUpb_DecodeStatus_Ok) { |
| 1587 |
return NULL; |
| 1588 |
} |
| 1589 |
return ret; |
| 1590 |
} |
| 1591 |
UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena, size_t* len) { |
| 1592 |
char* ptr; |
| 1593 |
(void)upb_Encode(msg, &google_protobuf_MethodDescriptorProto_msginit, 0, arena, &ptr, len); |
| 1594 |
return ptr; |
| 1595 |
} |
| 1596 |
UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize_ex(const google_protobuf_MethodDescriptorProto* msg, int options, |
| 1597 |
upb_Arena* arena, size_t* len) { |
| 1598 |
char* ptr; |
| 1599 |
(void)upb_Encode(msg, &google_protobuf_MethodDescriptorProto_msginit, options, arena, &ptr, len); |
| 1600 |
return ptr; |
| 1601 |
} |
| 1602 |
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto* msg) { |
| 1603 |
return _upb_hasbit(msg, 1); |
| 1604 |
} |
| 1605 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_name(const google_protobuf_MethodDescriptorProto* msg) { |
| 1606 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1607 |
_upb_clearhas(msg, 1); |
| 1608 |
} |
| 1609 |
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto* msg) { |
| 1610 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 1611 |
} |
| 1612 |
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto* msg) { |
| 1613 |
return _upb_hasbit(msg, 2); |
| 1614 |
} |
| 1615 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_input_type(const google_protobuf_MethodDescriptorProto* msg) { |
| 1616 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1617 |
_upb_clearhas(msg, 2); |
| 1618 |
} |
| 1619 |
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto* msg) { |
| 1620 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView); |
| 1621 |
} |
| 1622 |
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto* msg) { |
| 1623 |
return _upb_hasbit(msg, 3); |
| 1624 |
} |
| 1625 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_output_type(const google_protobuf_MethodDescriptorProto* msg) { |
| 1626 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1627 |
_upb_clearhas(msg, 3); |
| 1628 |
} |
| 1629 |
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto* msg) { |
| 1630 |
return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView); |
| 1631 |
} |
| 1632 |
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto* msg) { |
| 1633 |
return _upb_hasbit(msg, 4); |
| 1634 |
} |
| 1635 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_options(const google_protobuf_MethodDescriptorProto* msg) { |
| 1636 |
*UPB_PTR_AT(msg, UPB_SIZE(28, 56), const upb_Message*) = NULL; |
| 1637 |
} |
| 1638 |
UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto* msg) { |
| 1639 |
return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_MethodOptions*); |
| 1640 |
} |
| 1641 |
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { |
| 1642 |
return _upb_hasbit(msg, 5); |
| 1643 |
} |
| 1644 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { |
| 1645 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 1646 |
_upb_clearhas(msg, 5); |
| 1647 |
} |
| 1648 |
UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto* msg) { |
| 1649 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 1650 |
} |
| 1651 |
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { |
| 1652 |
return _upb_hasbit(msg, 6); |
| 1653 |
} |
| 1654 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { |
| 1655 |
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = 0; |
| 1656 |
_upb_clearhas(msg, 6); |
| 1657 |
} |
| 1658 |
UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto* msg) { |
| 1659 |
return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); |
| 1660 |
} |
| 1661 |
|
| 1662 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { |
| 1663 |
_upb_sethas(msg, 1); |
| 1664 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 1665 |
} |
| 1666 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { |
| 1667 |
_upb_sethas(msg, 2); |
| 1668 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value; |
| 1669 |
} |
| 1670 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) { |
| 1671 |
_upb_sethas(msg, 3); |
| 1672 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = value; |
| 1673 |
} |
| 1674 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) { |
| 1675 |
_upb_sethas(msg, 4); |
| 1676 |
*UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_MethodOptions*) = value; |
| 1677 |
} |
| 1678 |
UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) { |
| 1679 |
struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); |
| 1680 |
if (sub == NULL) { |
| 1681 |
sub = (struct google_protobuf_MethodOptions*)_upb_Message_New(&google_protobuf_MethodOptions_msginit, arena); |
| 1682 |
if (!sub) return NULL; |
| 1683 |
google_protobuf_MethodDescriptorProto_set_options(msg, sub); |
| 1684 |
} |
| 1685 |
return sub; |
| 1686 |
} |
| 1687 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { |
| 1688 |
_upb_sethas(msg, 5); |
| 1689 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 1690 |
} |
| 1691 |
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { |
| 1692 |
_upb_sethas(msg, 6); |
| 1693 |
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; |
| 1694 |
} |
| 1695 |
|
| 1696 |
/* google.protobuf.FileOptions */ |
| 1697 |
|
| 1698 |
UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_new(upb_Arena* arena) { |
| 1699 |
return (google_protobuf_FileOptions*)_upb_Message_New(&google_protobuf_FileOptions_msginit, arena); |
| 1700 |
} |
| 1701 |
UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 1702 |
google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena); |
| 1703 |
if (!ret) return NULL; |
| 1704 |
if (upb_Decode(buf, size, ret, &google_protobuf_FileOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 1705 |
return NULL; |
| 1706 |
} |
| 1707 |
return ret; |
| 1708 |
} |
| 1709 |
UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse_ex(const char* buf, size_t size, |
| 1710 |
const upb_ExtensionRegistry* extreg, |
| 1711 |
int options, upb_Arena* arena) { |
| 1712 |
google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena); |
| 1713 |
if (!ret) return NULL; |
| 1714 |
if (upb_Decode(buf, size, ret, &google_protobuf_FileOptions_msginit, extreg, options, arena) != |
| 1715 |
kUpb_DecodeStatus_Ok) { |
| 1716 |
return NULL; |
| 1717 |
} |
| 1718 |
return ret; |
| 1719 |
} |
| 1720 |
UPB_INLINE char* google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions* msg, upb_Arena* arena, size_t* len) { |
| 1721 |
char* ptr; |
| 1722 |
(void)upb_Encode(msg, &google_protobuf_FileOptions_msginit, 0, arena, &ptr, len); |
| 1723 |
return ptr; |
| 1724 |
} |
| 1725 |
UPB_INLINE char* google_protobuf_FileOptions_serialize_ex(const google_protobuf_FileOptions* msg, int options, |
| 1726 |
upb_Arena* arena, size_t* len) { |
| 1727 |
char* ptr; |
| 1728 |
(void)upb_Encode(msg, &google_protobuf_FileOptions_msginit, options, arena, &ptr, len); |
| 1729 |
return ptr; |
| 1730 |
} |
| 1731 |
UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions* msg) { |
| 1732 |
return _upb_hasbit(msg, 1); |
| 1733 |
} |
| 1734 |
UPB_INLINE void google_protobuf_FileOptions_clear_java_package(const google_protobuf_FileOptions* msg) { |
| 1735 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1736 |
_upb_clearhas(msg, 1); |
| 1737 |
} |
| 1738 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions* msg) { |
| 1739 |
return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView); |
| 1740 |
} |
| 1741 |
UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions* msg) { |
| 1742 |
return _upb_hasbit(msg, 2); |
| 1743 |
} |
| 1744 |
UPB_INLINE void google_protobuf_FileOptions_clear_java_outer_classname(const google_protobuf_FileOptions* msg) { |
| 1745 |
*UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1746 |
_upb_clearhas(msg, 2); |
| 1747 |
} |
| 1748 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions* msg) { |
| 1749 |
return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView); |
| 1750 |
} |
| 1751 |
UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions* msg) { |
| 1752 |
return _upb_hasbit(msg, 3); |
| 1753 |
} |
| 1754 |
UPB_INLINE void google_protobuf_FileOptions_clear_optimize_for(const google_protobuf_FileOptions* msg) { |
| 1755 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 1756 |
_upb_clearhas(msg, 3); |
| 1757 |
} |
| 1758 |
UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions* msg) { |
| 1759 |
return google_protobuf_FileOptions_has_optimize_for(msg) ? *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) : 1; |
| 1760 |
} |
| 1761 |
UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions* msg) { |
| 1762 |
return _upb_hasbit(msg, 4); |
| 1763 |
} |
| 1764 |
UPB_INLINE void google_protobuf_FileOptions_clear_java_multiple_files(const google_protobuf_FileOptions* msg) { |
| 1765 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = 0; |
| 1766 |
_upb_clearhas(msg, 4); |
| 1767 |
} |
| 1768 |
UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions* msg) { |
| 1769 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); |
| 1770 |
} |
| 1771 |
UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions* msg) { |
| 1772 |
return _upb_hasbit(msg, 5); |
| 1773 |
} |
| 1774 |
UPB_INLINE void google_protobuf_FileOptions_clear_go_package(const google_protobuf_FileOptions* msg) { |
| 1775 |
*UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1776 |
_upb_clearhas(msg, 5); |
| 1777 |
} |
| 1778 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions* msg) { |
| 1779 |
return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_StringView); |
| 1780 |
} |
| 1781 |
UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions* msg) { |
| 1782 |
return _upb_hasbit(msg, 6); |
| 1783 |
} |
| 1784 |
UPB_INLINE void google_protobuf_FileOptions_clear_cc_generic_services(const google_protobuf_FileOptions* msg) { |
| 1785 |
*UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = 0; |
| 1786 |
_upb_clearhas(msg, 6); |
| 1787 |
} |
| 1788 |
UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions* msg) { |
| 1789 |
return *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool); |
| 1790 |
} |
| 1791 |
UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions* msg) { |
| 1792 |
return _upb_hasbit(msg, 7); |
| 1793 |
} |
| 1794 |
UPB_INLINE void google_protobuf_FileOptions_clear_java_generic_services(const google_protobuf_FileOptions* msg) { |
| 1795 |
*UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool) = 0; |
| 1796 |
_upb_clearhas(msg, 7); |
| 1797 |
} |
| 1798 |
UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions* msg) { |
| 1799 |
return *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool); |
| 1800 |
} |
| 1801 |
UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions* msg) { |
| 1802 |
return _upb_hasbit(msg, 8); |
| 1803 |
} |
| 1804 |
UPB_INLINE void google_protobuf_FileOptions_clear_py_generic_services(const google_protobuf_FileOptions* msg) { |
| 1805 |
*UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool) = 0; |
| 1806 |
_upb_clearhas(msg, 8); |
| 1807 |
} |
| 1808 |
UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions* msg) { |
| 1809 |
return *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool); |
| 1810 |
} |
| 1811 |
UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { |
| 1812 |
return _upb_hasbit(msg, 9); |
| 1813 |
} |
| 1814 |
UPB_INLINE void google_protobuf_FileOptions_clear_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { |
| 1815 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = 0; |
| 1816 |
_upb_clearhas(msg, 9); |
| 1817 |
} |
| 1818 |
UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) { |
| 1819 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); |
| 1820 |
} |
| 1821 |
UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions* msg) { |
| 1822 |
return _upb_hasbit(msg, 10); |
| 1823 |
} |
| 1824 |
UPB_INLINE void google_protobuf_FileOptions_clear_deprecated(const google_protobuf_FileOptions* msg) { |
| 1825 |
*UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = 0; |
| 1826 |
_upb_clearhas(msg, 10); |
| 1827 |
} |
| 1828 |
UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions* msg) { |
| 1829 |
return *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool); |
| 1830 |
} |
| 1831 |
UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions* msg) { |
| 1832 |
return _upb_hasbit(msg, 11); |
| 1833 |
} |
| 1834 |
UPB_INLINE void google_protobuf_FileOptions_clear_java_string_check_utf8(const google_protobuf_FileOptions* msg) { |
| 1835 |
*UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool) = 0; |
| 1836 |
_upb_clearhas(msg, 11); |
| 1837 |
} |
| 1838 |
UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions* msg) { |
| 1839 |
return *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool); |
| 1840 |
} |
| 1841 |
UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions* msg) { |
| 1842 |
return _upb_hasbit(msg, 12); |
| 1843 |
} |
| 1844 |
UPB_INLINE void google_protobuf_FileOptions_clear_cc_enable_arenas(const google_protobuf_FileOptions* msg) { |
| 1845 |
*UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) = 0; |
| 1846 |
_upb_clearhas(msg, 12); |
| 1847 |
} |
| 1848 |
UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions* msg) { |
| 1849 |
return google_protobuf_FileOptions_has_cc_enable_arenas(msg) ? *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) : true; |
| 1850 |
} |
| 1851 |
UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions* msg) { |
| 1852 |
return _upb_hasbit(msg, 13); |
| 1853 |
} |
| 1854 |
UPB_INLINE void google_protobuf_FileOptions_clear_objc_class_prefix(const google_protobuf_FileOptions* msg) { |
| 1855 |
*UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1856 |
_upb_clearhas(msg, 13); |
| 1857 |
} |
| 1858 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions* msg) { |
| 1859 |
return *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_StringView); |
| 1860 |
} |
| 1861 |
UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions* msg) { |
| 1862 |
return _upb_hasbit(msg, 14); |
| 1863 |
} |
| 1864 |
UPB_INLINE void google_protobuf_FileOptions_clear_csharp_namespace(const google_protobuf_FileOptions* msg) { |
| 1865 |
*UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1866 |
_upb_clearhas(msg, 14); |
| 1867 |
} |
| 1868 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions* msg) { |
| 1869 |
return *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_StringView); |
| 1870 |
} |
| 1871 |
UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions* msg) { |
| 1872 |
return _upb_hasbit(msg, 15); |
| 1873 |
} |
| 1874 |
UPB_INLINE void google_protobuf_FileOptions_clear_swift_prefix(const google_protobuf_FileOptions* msg) { |
| 1875 |
*UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1876 |
_upb_clearhas(msg, 15); |
| 1877 |
} |
| 1878 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions* msg) { |
| 1879 |
return *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_StringView); |
| 1880 |
} |
| 1881 |
UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions* msg) { |
| 1882 |
return _upb_hasbit(msg, 16); |
| 1883 |
} |
| 1884 |
UPB_INLINE void google_protobuf_FileOptions_clear_php_class_prefix(const google_protobuf_FileOptions* msg) { |
| 1885 |
*UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1886 |
_upb_clearhas(msg, 16); |
| 1887 |
} |
| 1888 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions* msg) { |
| 1889 |
return *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_StringView); |
| 1890 |
} |
| 1891 |
UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions* msg) { |
| 1892 |
return _upb_hasbit(msg, 17); |
| 1893 |
} |
| 1894 |
UPB_INLINE void google_protobuf_FileOptions_clear_php_namespace(const google_protobuf_FileOptions* msg) { |
| 1895 |
*UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1896 |
_upb_clearhas(msg, 17); |
| 1897 |
} |
| 1898 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions* msg) { |
| 1899 |
return *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_StringView); |
| 1900 |
} |
| 1901 |
UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions* msg) { |
| 1902 |
return _upb_hasbit(msg, 18); |
| 1903 |
} |
| 1904 |
UPB_INLINE void google_protobuf_FileOptions_clear_php_generic_services(const google_protobuf_FileOptions* msg) { |
| 1905 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = 0; |
| 1906 |
_upb_clearhas(msg, 18); |
| 1907 |
} |
| 1908 |
UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions* msg) { |
| 1909 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); |
| 1910 |
} |
| 1911 |
UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions* msg) { |
| 1912 |
return _upb_hasbit(msg, 19); |
| 1913 |
} |
| 1914 |
UPB_INLINE void google_protobuf_FileOptions_clear_php_metadata_namespace(const google_protobuf_FileOptions* msg) { |
| 1915 |
*UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1916 |
_upb_clearhas(msg, 19); |
| 1917 |
} |
| 1918 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions* msg) { |
| 1919 |
return *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_StringView); |
| 1920 |
} |
| 1921 |
UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions* msg) { |
| 1922 |
return _upb_hasbit(msg, 20); |
| 1923 |
} |
| 1924 |
UPB_INLINE void google_protobuf_FileOptions_clear_ruby_package(const google_protobuf_FileOptions* msg) { |
| 1925 |
*UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 1926 |
_upb_clearhas(msg, 20); |
| 1927 |
} |
| 1928 |
UPB_INLINE upb_StringView google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions* msg) { |
| 1929 |
return *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_StringView); |
| 1930 |
} |
| 1931 |
UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions* msg) { |
| 1932 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 184)); |
| 1933 |
} |
| 1934 |
UPB_INLINE void google_protobuf_FileOptions_clear_uninterpreted_option(const google_protobuf_FileOptions* msg) { |
| 1935 |
_upb_array_detach(msg, UPB_SIZE(100, 184)); |
| 1936 |
} |
| 1937 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions* msg, size_t* len) { |
| 1938 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(100, 184), len); |
| 1939 |
} |
| 1940 |
|
| 1941 |
UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 1942 |
_upb_sethas(msg, 1); |
| 1943 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_StringView) = value; |
| 1944 |
} |
| 1945 |
UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 1946 |
_upb_sethas(msg, 2); |
| 1947 |
*UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_StringView) = value; |
| 1948 |
} |
| 1949 |
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) { |
| 1950 |
_upb_sethas(msg, 3); |
| 1951 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 1952 |
} |
| 1953 |
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) { |
| 1954 |
_upb_sethas(msg, 4); |
| 1955 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; |
| 1956 |
} |
| 1957 |
UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 1958 |
_upb_sethas(msg, 5); |
| 1959 |
*UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_StringView) = value; |
| 1960 |
} |
| 1961 |
UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) { |
| 1962 |
_upb_sethas(msg, 6); |
| 1963 |
*UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = value; |
| 1964 |
} |
| 1965 |
UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) { |
| 1966 |
_upb_sethas(msg, 7); |
| 1967 |
*UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool) = value; |
| 1968 |
} |
| 1969 |
UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) { |
| 1970 |
_upb_sethas(msg, 8); |
| 1971 |
*UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool) = value; |
| 1972 |
} |
| 1973 |
UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) { |
| 1974 |
_upb_sethas(msg, 9); |
| 1975 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value; |
| 1976 |
} |
| 1977 |
UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) { |
| 1978 |
_upb_sethas(msg, 10); |
| 1979 |
*UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = value; |
| 1980 |
} |
| 1981 |
UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) { |
| 1982 |
_upb_sethas(msg, 11); |
| 1983 |
*UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool) = value; |
| 1984 |
} |
| 1985 |
UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) { |
| 1986 |
_upb_sethas(msg, 12); |
| 1987 |
*UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) = value; |
| 1988 |
} |
| 1989 |
UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 1990 |
_upb_sethas(msg, 13); |
| 1991 |
*UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_StringView) = value; |
| 1992 |
} |
| 1993 |
UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 1994 |
_upb_sethas(msg, 14); |
| 1995 |
*UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_StringView) = value; |
| 1996 |
} |
| 1997 |
UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 1998 |
_upb_sethas(msg, 15); |
| 1999 |
*UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_StringView) = value; |
| 2000 |
} |
| 2001 |
UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 2002 |
_upb_sethas(msg, 16); |
| 2003 |
*UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_StringView) = value; |
| 2004 |
} |
| 2005 |
UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 2006 |
_upb_sethas(msg, 17); |
| 2007 |
*UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_StringView) = value; |
| 2008 |
} |
| 2009 |
UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) { |
| 2010 |
_upb_sethas(msg, 18); |
| 2011 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value; |
| 2012 |
} |
| 2013 |
UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 2014 |
_upb_sethas(msg, 19); |
| 2015 |
*UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_StringView) = value; |
| 2016 |
} |
| 2017 |
UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_StringView value) { |
| 2018 |
_upb_sethas(msg, 20); |
| 2019 |
*UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_StringView) = value; |
| 2020 |
} |
| 2021 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions* msg, size_t* len) { |
| 2022 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 184), len); |
| 2023 |
} |
| 2024 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions* msg, size_t len, upb_Arena* arena) { |
| 2025 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(100, 184), len, UPB_SIZE(2, 3), arena); |
| 2026 |
} |
| 2027 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions* msg, upb_Arena* arena) { |
| 2028 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2029 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(100, 184), UPB_SIZE(2, 3), &sub, arena); |
| 2030 |
if (!ok) return NULL; |
| 2031 |
return sub; |
| 2032 |
} |
| 2033 |
|
| 2034 |
/* google.protobuf.MessageOptions */ |
| 2035 |
|
| 2036 |
UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_new(upb_Arena* arena) { |
| 2037 |
return (google_protobuf_MessageOptions*)_upb_Message_New(&google_protobuf_MessageOptions_msginit, arena); |
| 2038 |
} |
| 2039 |
UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2040 |
google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena); |
| 2041 |
if (!ret) return NULL; |
| 2042 |
if (upb_Decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2043 |
return NULL; |
| 2044 |
} |
| 2045 |
return ret; |
| 2046 |
} |
| 2047 |
UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse_ex(const char* buf, size_t size, |
| 2048 |
const upb_ExtensionRegistry* extreg, |
| 2049 |
int options, upb_Arena* arena) { |
| 2050 |
google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena); |
| 2051 |
if (!ret) return NULL; |
| 2052 |
if (upb_Decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, extreg, options, arena) != |
| 2053 |
kUpb_DecodeStatus_Ok) { |
| 2054 |
return NULL; |
| 2055 |
} |
| 2056 |
return ret; |
| 2057 |
} |
| 2058 |
UPB_INLINE char* google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions* msg, upb_Arena* arena, size_t* len) { |
| 2059 |
char* ptr; |
| 2060 |
(void)upb_Encode(msg, &google_protobuf_MessageOptions_msginit, 0, arena, &ptr, len); |
| 2061 |
return ptr; |
| 2062 |
} |
| 2063 |
UPB_INLINE char* google_protobuf_MessageOptions_serialize_ex(const google_protobuf_MessageOptions* msg, int options, |
| 2064 |
upb_Arena* arena, size_t* len) { |
| 2065 |
char* ptr; |
| 2066 |
(void)upb_Encode(msg, &google_protobuf_MessageOptions_msginit, options, arena, &ptr, len); |
| 2067 |
return ptr; |
| 2068 |
} |
| 2069 |
UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions* msg) { |
| 2070 |
return _upb_hasbit(msg, 1); |
| 2071 |
} |
| 2072 |
UPB_INLINE void google_protobuf_MessageOptions_clear_message_set_wire_format(const google_protobuf_MessageOptions* msg) { |
| 2073 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 2074 |
_upb_clearhas(msg, 1); |
| 2075 |
} |
| 2076 |
UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions* msg) { |
| 2077 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 2078 |
} |
| 2079 |
UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { |
| 2080 |
return _upb_hasbit(msg, 2); |
| 2081 |
} |
| 2082 |
UPB_INLINE void google_protobuf_MessageOptions_clear_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { |
| 2083 |
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = 0; |
| 2084 |
_upb_clearhas(msg, 2); |
| 2085 |
} |
| 2086 |
UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) { |
| 2087 |
return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); |
| 2088 |
} |
| 2089 |
UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions* msg) { |
| 2090 |
return _upb_hasbit(msg, 3); |
| 2091 |
} |
| 2092 |
UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated(const google_protobuf_MessageOptions* msg) { |
| 2093 |
*UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = 0; |
| 2094 |
_upb_clearhas(msg, 3); |
| 2095 |
} |
| 2096 |
UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions* msg) { |
| 2097 |
return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); |
| 2098 |
} |
| 2099 |
UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions* msg) { |
| 2100 |
return _upb_hasbit(msg, 4); |
| 2101 |
} |
| 2102 |
UPB_INLINE void google_protobuf_MessageOptions_clear_map_entry(const google_protobuf_MessageOptions* msg) { |
| 2103 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = 0; |
| 2104 |
_upb_clearhas(msg, 4); |
| 2105 |
} |
| 2106 |
UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions* msg) { |
| 2107 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); |
| 2108 |
} |
| 2109 |
UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const google_protobuf_MessageOptions* msg) { |
| 2110 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); |
| 2111 |
} |
| 2112 |
UPB_INLINE void google_protobuf_MessageOptions_clear_uninterpreted_option(const google_protobuf_MessageOptions* msg) { |
| 2113 |
_upb_array_detach(msg, UPB_SIZE(8, 8)); |
| 2114 |
} |
| 2115 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions* msg, size_t* len) { |
| 2116 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); |
| 2117 |
} |
| 2118 |
|
| 2119 |
UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) { |
| 2120 |
_upb_sethas(msg, 1); |
| 2121 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 2122 |
} |
| 2123 |
UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) { |
| 2124 |
_upb_sethas(msg, 2); |
| 2125 |
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; |
| 2126 |
} |
| 2127 |
UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) { |
| 2128 |
_upb_sethas(msg, 3); |
| 2129 |
*UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value; |
| 2130 |
} |
| 2131 |
UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) { |
| 2132 |
_upb_sethas(msg, 4); |
| 2133 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value; |
| 2134 |
} |
| 2135 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions* msg, size_t* len) { |
| 2136 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); |
| 2137 |
} |
| 2138 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions* msg, size_t len, upb_Arena* arena) { |
| 2139 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 8), len, UPB_SIZE(2, 3), arena); |
| 2140 |
} |
| 2141 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions* msg, upb_Arena* arena) { |
| 2142 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2143 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 8), UPB_SIZE(2, 3), &sub, arena); |
| 2144 |
if (!ok) return NULL; |
| 2145 |
return sub; |
| 2146 |
} |
| 2147 |
|
| 2148 |
/* google.protobuf.FieldOptions */ |
| 2149 |
|
| 2150 |
UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_new(upb_Arena* arena) { |
| 2151 |
return (google_protobuf_FieldOptions*)_upb_Message_New(&google_protobuf_FieldOptions_msginit, arena); |
| 2152 |
} |
| 2153 |
UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2154 |
google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena); |
| 2155 |
if (!ret) return NULL; |
| 2156 |
if (upb_Decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2157 |
return NULL; |
| 2158 |
} |
| 2159 |
return ret; |
| 2160 |
} |
| 2161 |
UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse_ex(const char* buf, size_t size, |
| 2162 |
const upb_ExtensionRegistry* extreg, |
| 2163 |
int options, upb_Arena* arena) { |
| 2164 |
google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena); |
| 2165 |
if (!ret) return NULL; |
| 2166 |
if (upb_Decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, extreg, options, arena) != |
| 2167 |
kUpb_DecodeStatus_Ok) { |
| 2168 |
return NULL; |
| 2169 |
} |
| 2170 |
return ret; |
| 2171 |
} |
| 2172 |
UPB_INLINE char* google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions* msg, upb_Arena* arena, size_t* len) { |
| 2173 |
char* ptr; |
| 2174 |
(void)upb_Encode(msg, &google_protobuf_FieldOptions_msginit, 0, arena, &ptr, len); |
| 2175 |
return ptr; |
| 2176 |
} |
| 2177 |
UPB_INLINE char* google_protobuf_FieldOptions_serialize_ex(const google_protobuf_FieldOptions* msg, int options, |
| 2178 |
upb_Arena* arena, size_t* len) { |
| 2179 |
char* ptr; |
| 2180 |
(void)upb_Encode(msg, &google_protobuf_FieldOptions_msginit, options, arena, &ptr, len); |
| 2181 |
return ptr; |
| 2182 |
} |
| 2183 |
UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions* msg) { |
| 2184 |
return _upb_hasbit(msg, 1); |
| 2185 |
} |
| 2186 |
UPB_INLINE void google_protobuf_FieldOptions_clear_ctype(const google_protobuf_FieldOptions* msg) { |
| 2187 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 2188 |
_upb_clearhas(msg, 1); |
| 2189 |
} |
| 2190 |
UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions* msg) { |
| 2191 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 2192 |
} |
| 2193 |
UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions* msg) { |
| 2194 |
return _upb_hasbit(msg, 2); |
| 2195 |
} |
| 2196 |
UPB_INLINE void google_protobuf_FieldOptions_clear_packed(const google_protobuf_FieldOptions* msg) { |
| 2197 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = 0; |
| 2198 |
_upb_clearhas(msg, 2); |
| 2199 |
} |
| 2200 |
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions* msg) { |
| 2201 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); |
| 2202 |
} |
| 2203 |
UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions* msg) { |
| 2204 |
return _upb_hasbit(msg, 3); |
| 2205 |
} |
| 2206 |
UPB_INLINE void google_protobuf_FieldOptions_clear_deprecated(const google_protobuf_FieldOptions* msg) { |
| 2207 |
*UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = 0; |
| 2208 |
_upb_clearhas(msg, 3); |
| 2209 |
} |
| 2210 |
UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions* msg) { |
| 2211 |
return *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool); |
| 2212 |
} |
| 2213 |
UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions* msg) { |
| 2214 |
return _upb_hasbit(msg, 4); |
| 2215 |
} |
| 2216 |
UPB_INLINE void google_protobuf_FieldOptions_clear_lazy(const google_protobuf_FieldOptions* msg) { |
| 2217 |
*UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool) = 0; |
| 2218 |
_upb_clearhas(msg, 4); |
| 2219 |
} |
| 2220 |
UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions* msg) { |
| 2221 |
return *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool); |
| 2222 |
} |
| 2223 |
UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions* msg) { |
| 2224 |
return _upb_hasbit(msg, 5); |
| 2225 |
} |
| 2226 |
UPB_INLINE void google_protobuf_FieldOptions_clear_jstype(const google_protobuf_FieldOptions* msg) { |
| 2227 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = 0; |
| 2228 |
_upb_clearhas(msg, 5); |
| 2229 |
} |
| 2230 |
UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions* msg) { |
| 2231 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); |
| 2232 |
} |
| 2233 |
UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions* msg) { |
| 2234 |
return _upb_hasbit(msg, 6); |
| 2235 |
} |
| 2236 |
UPB_INLINE void google_protobuf_FieldOptions_clear_weak(const google_protobuf_FieldOptions* msg) { |
| 2237 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = 0; |
| 2238 |
_upb_clearhas(msg, 6); |
| 2239 |
} |
| 2240 |
UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions* msg) { |
| 2241 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); |
| 2242 |
} |
| 2243 |
UPB_INLINE bool google_protobuf_FieldOptions_has_unverified_lazy(const google_protobuf_FieldOptions* msg) { |
| 2244 |
return _upb_hasbit(msg, 7); |
| 2245 |
} |
| 2246 |
UPB_INLINE void google_protobuf_FieldOptions_clear_unverified_lazy(const google_protobuf_FieldOptions* msg) { |
| 2247 |
*UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool) = 0; |
| 2248 |
_upb_clearhas(msg, 7); |
| 2249 |
} |
| 2250 |
UPB_INLINE bool google_protobuf_FieldOptions_unverified_lazy(const google_protobuf_FieldOptions* msg) { |
| 2251 |
return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); |
| 2252 |
} |
| 2253 |
UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions* msg) { |
| 2254 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); |
| 2255 |
} |
| 2256 |
UPB_INLINE void google_protobuf_FieldOptions_clear_uninterpreted_option(const google_protobuf_FieldOptions* msg) { |
| 2257 |
_upb_array_detach(msg, UPB_SIZE(20, 24)); |
| 2258 |
} |
| 2259 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions* msg, size_t* len) { |
| 2260 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); |
| 2261 |
} |
| 2262 |
|
| 2263 |
UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) { |
| 2264 |
_upb_sethas(msg, 1); |
| 2265 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 2266 |
} |
| 2267 |
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) { |
| 2268 |
_upb_sethas(msg, 2); |
| 2269 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; |
| 2270 |
} |
| 2271 |
UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) { |
| 2272 |
_upb_sethas(msg, 3); |
| 2273 |
*UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = value; |
| 2274 |
} |
| 2275 |
UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) { |
| 2276 |
_upb_sethas(msg, 4); |
| 2277 |
*UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool) = value; |
| 2278 |
} |
| 2279 |
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) { |
| 2280 |
_upb_sethas(msg, 5); |
| 2281 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value; |
| 2282 |
} |
| 2283 |
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) { |
| 2284 |
_upb_sethas(msg, 6); |
| 2285 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value; |
| 2286 |
} |
| 2287 |
UPB_INLINE void google_protobuf_FieldOptions_set_unverified_lazy(google_protobuf_FieldOptions *msg, bool value) { |
| 2288 |
_upb_sethas(msg, 7); |
| 2289 |
*UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool) = value; |
| 2290 |
} |
| 2291 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions* msg, size_t* len) { |
| 2292 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); |
| 2293 |
} |
| 2294 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions* msg, size_t len, upb_Arena* arena) { |
| 2295 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 24), len, UPB_SIZE(2, 3), arena); |
| 2296 |
} |
| 2297 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions* msg, upb_Arena* arena) { |
| 2298 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2299 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 24), UPB_SIZE(2, 3), &sub, arena); |
| 2300 |
if (!ok) return NULL; |
| 2301 |
return sub; |
| 2302 |
} |
| 2303 |
|
| 2304 |
/* google.protobuf.OneofOptions */ |
| 2305 |
|
| 2306 |
UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_new(upb_Arena* arena) { |
| 2307 |
return (google_protobuf_OneofOptions*)_upb_Message_New(&google_protobuf_OneofOptions_msginit, arena); |
| 2308 |
} |
| 2309 |
UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2310 |
google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena); |
| 2311 |
if (!ret) return NULL; |
| 2312 |
if (upb_Decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2313 |
return NULL; |
| 2314 |
} |
| 2315 |
return ret; |
| 2316 |
} |
| 2317 |
UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse_ex(const char* buf, size_t size, |
| 2318 |
const upb_ExtensionRegistry* extreg, |
| 2319 |
int options, upb_Arena* arena) { |
| 2320 |
google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena); |
| 2321 |
if (!ret) return NULL; |
| 2322 |
if (upb_Decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, extreg, options, arena) != |
| 2323 |
kUpb_DecodeStatus_Ok) { |
| 2324 |
return NULL; |
| 2325 |
} |
| 2326 |
return ret; |
| 2327 |
} |
| 2328 |
UPB_INLINE char* google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions* msg, upb_Arena* arena, size_t* len) { |
| 2329 |
char* ptr; |
| 2330 |
(void)upb_Encode(msg, &google_protobuf_OneofOptions_msginit, 0, arena, &ptr, len); |
| 2331 |
return ptr; |
| 2332 |
} |
| 2333 |
UPB_INLINE char* google_protobuf_OneofOptions_serialize_ex(const google_protobuf_OneofOptions* msg, int options, |
| 2334 |
upb_Arena* arena, size_t* len) { |
| 2335 |
char* ptr; |
| 2336 |
(void)upb_Encode(msg, &google_protobuf_OneofOptions_msginit, options, arena, &ptr, len); |
| 2337 |
return ptr; |
| 2338 |
} |
| 2339 |
UPB_INLINE bool google_protobuf_OneofOptions_has_uninterpreted_option(const google_protobuf_OneofOptions* msg) { |
| 2340 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); |
| 2341 |
} |
| 2342 |
UPB_INLINE void google_protobuf_OneofOptions_clear_uninterpreted_option(const google_protobuf_OneofOptions* msg) { |
| 2343 |
_upb_array_detach(msg, UPB_SIZE(0, 0)); |
| 2344 |
} |
| 2345 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions* msg, size_t* len) { |
| 2346 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); |
| 2347 |
} |
| 2348 |
|
| 2349 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions* msg, size_t* len) { |
| 2350 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
| 2351 |
} |
| 2352 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions* msg, size_t len, upb_Arena* arena) { |
| 2353 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena); |
| 2354 |
} |
| 2355 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions* msg, upb_Arena* arena) { |
| 2356 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2357 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena); |
| 2358 |
if (!ok) return NULL; |
| 2359 |
return sub; |
| 2360 |
} |
| 2361 |
|
| 2362 |
/* google.protobuf.EnumOptions */ |
| 2363 |
|
| 2364 |
UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_new(upb_Arena* arena) { |
| 2365 |
return (google_protobuf_EnumOptions*)_upb_Message_New(&google_protobuf_EnumOptions_msginit, arena); |
| 2366 |
} |
| 2367 |
UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2368 |
google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena); |
| 2369 |
if (!ret) return NULL; |
| 2370 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2371 |
return NULL; |
| 2372 |
} |
| 2373 |
return ret; |
| 2374 |
} |
| 2375 |
UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse_ex(const char* buf, size_t size, |
| 2376 |
const upb_ExtensionRegistry* extreg, |
| 2377 |
int options, upb_Arena* arena) { |
| 2378 |
google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena); |
| 2379 |
if (!ret) return NULL; |
| 2380 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, extreg, options, arena) != |
| 2381 |
kUpb_DecodeStatus_Ok) { |
| 2382 |
return NULL; |
| 2383 |
} |
| 2384 |
return ret; |
| 2385 |
} |
| 2386 |
UPB_INLINE char* google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions* msg, upb_Arena* arena, size_t* len) { |
| 2387 |
char* ptr; |
| 2388 |
(void)upb_Encode(msg, &google_protobuf_EnumOptions_msginit, 0, arena, &ptr, len); |
| 2389 |
return ptr; |
| 2390 |
} |
| 2391 |
UPB_INLINE char* google_protobuf_EnumOptions_serialize_ex(const google_protobuf_EnumOptions* msg, int options, |
| 2392 |
upb_Arena* arena, size_t* len) { |
| 2393 |
char* ptr; |
| 2394 |
(void)upb_Encode(msg, &google_protobuf_EnumOptions_msginit, options, arena, &ptr, len); |
| 2395 |
return ptr; |
| 2396 |
} |
| 2397 |
UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions* msg) { |
| 2398 |
return _upb_hasbit(msg, 1); |
| 2399 |
} |
| 2400 |
UPB_INLINE void google_protobuf_EnumOptions_clear_allow_alias(const google_protobuf_EnumOptions* msg) { |
| 2401 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 2402 |
_upb_clearhas(msg, 1); |
| 2403 |
} |
| 2404 |
UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions* msg) { |
| 2405 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 2406 |
} |
| 2407 |
UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions* msg) { |
| 2408 |
return _upb_hasbit(msg, 2); |
| 2409 |
} |
| 2410 |
UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated(const google_protobuf_EnumOptions* msg) { |
| 2411 |
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = 0; |
| 2412 |
_upb_clearhas(msg, 2); |
| 2413 |
} |
| 2414 |
UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions* msg) { |
| 2415 |
return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); |
| 2416 |
} |
| 2417 |
UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const google_protobuf_EnumOptions* msg) { |
| 2418 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); |
| 2419 |
} |
| 2420 |
UPB_INLINE void google_protobuf_EnumOptions_clear_uninterpreted_option(const google_protobuf_EnumOptions* msg) { |
| 2421 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 2422 |
} |
| 2423 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions* msg, size_t* len) { |
| 2424 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); |
| 2425 |
} |
| 2426 |
|
| 2427 |
UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) { |
| 2428 |
_upb_sethas(msg, 1); |
| 2429 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 2430 |
} |
| 2431 |
UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) { |
| 2432 |
_upb_sethas(msg, 2); |
| 2433 |
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; |
| 2434 |
} |
| 2435 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions* msg, size_t* len) { |
| 2436 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
| 2437 |
} |
| 2438 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions* msg, size_t len, upb_Arena* arena) { |
| 2439 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena); |
| 2440 |
} |
| 2441 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions* msg, upb_Arena* arena) { |
| 2442 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2443 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena); |
| 2444 |
if (!ok) return NULL; |
| 2445 |
return sub; |
| 2446 |
} |
| 2447 |
|
| 2448 |
/* google.protobuf.EnumValueOptions */ |
| 2449 |
|
| 2450 |
UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_new(upb_Arena* arena) { |
| 2451 |
return (google_protobuf_EnumValueOptions*)_upb_Message_New(&google_protobuf_EnumValueOptions_msginit, arena); |
| 2452 |
} |
| 2453 |
UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2454 |
google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena); |
| 2455 |
if (!ret) return NULL; |
| 2456 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2457 |
return NULL; |
| 2458 |
} |
| 2459 |
return ret; |
| 2460 |
} |
| 2461 |
UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse_ex(const char* buf, size_t size, |
| 2462 |
const upb_ExtensionRegistry* extreg, |
| 2463 |
int options, upb_Arena* arena) { |
| 2464 |
google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena); |
| 2465 |
if (!ret) return NULL; |
| 2466 |
if (upb_Decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, extreg, options, arena) != |
| 2467 |
kUpb_DecodeStatus_Ok) { |
| 2468 |
return NULL; |
| 2469 |
} |
| 2470 |
return ret; |
| 2471 |
} |
| 2472 |
UPB_INLINE char* google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions* msg, upb_Arena* arena, size_t* len) { |
| 2473 |
char* ptr; |
| 2474 |
(void)upb_Encode(msg, &google_protobuf_EnumValueOptions_msginit, 0, arena, &ptr, len); |
| 2475 |
return ptr; |
| 2476 |
} |
| 2477 |
UPB_INLINE char* google_protobuf_EnumValueOptions_serialize_ex(const google_protobuf_EnumValueOptions* msg, int options, |
| 2478 |
upb_Arena* arena, size_t* len) { |
| 2479 |
char* ptr; |
| 2480 |
(void)upb_Encode(msg, &google_protobuf_EnumValueOptions_msginit, options, arena, &ptr, len); |
| 2481 |
return ptr; |
| 2482 |
} |
| 2483 |
UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions* msg) { |
| 2484 |
return _upb_hasbit(msg, 1); |
| 2485 |
} |
| 2486 |
UPB_INLINE void google_protobuf_EnumValueOptions_clear_deprecated(const google_protobuf_EnumValueOptions* msg) { |
| 2487 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 2488 |
_upb_clearhas(msg, 1); |
| 2489 |
} |
| 2490 |
UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions* msg) { |
| 2491 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 2492 |
} |
| 2493 |
UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const google_protobuf_EnumValueOptions* msg) { |
| 2494 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); |
| 2495 |
} |
| 2496 |
UPB_INLINE void google_protobuf_EnumValueOptions_clear_uninterpreted_option(const google_protobuf_EnumValueOptions* msg) { |
| 2497 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 2498 |
} |
| 2499 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions* msg, size_t* len) { |
| 2500 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); |
| 2501 |
} |
| 2502 |
|
| 2503 |
UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) { |
| 2504 |
_upb_sethas(msg, 1); |
| 2505 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 2506 |
} |
| 2507 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions* msg, size_t* len) { |
| 2508 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
| 2509 |
} |
| 2510 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions* msg, size_t len, upb_Arena* arena) { |
| 2511 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena); |
| 2512 |
} |
| 2513 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions* msg, upb_Arena* arena) { |
| 2514 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2515 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena); |
| 2516 |
if (!ok) return NULL; |
| 2517 |
return sub; |
| 2518 |
} |
| 2519 |
|
| 2520 |
/* google.protobuf.ServiceOptions */ |
| 2521 |
|
| 2522 |
UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_new(upb_Arena* arena) { |
| 2523 |
return (google_protobuf_ServiceOptions*)_upb_Message_New(&google_protobuf_ServiceOptions_msginit, arena); |
| 2524 |
} |
| 2525 |
UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2526 |
google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena); |
| 2527 |
if (!ret) return NULL; |
| 2528 |
if (upb_Decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2529 |
return NULL; |
| 2530 |
} |
| 2531 |
return ret; |
| 2532 |
} |
| 2533 |
UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse_ex(const char* buf, size_t size, |
| 2534 |
const upb_ExtensionRegistry* extreg, |
| 2535 |
int options, upb_Arena* arena) { |
| 2536 |
google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena); |
| 2537 |
if (!ret) return NULL; |
| 2538 |
if (upb_Decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, extreg, options, arena) != |
| 2539 |
kUpb_DecodeStatus_Ok) { |
| 2540 |
return NULL; |
| 2541 |
} |
| 2542 |
return ret; |
| 2543 |
} |
| 2544 |
UPB_INLINE char* google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions* msg, upb_Arena* arena, size_t* len) { |
| 2545 |
char* ptr; |
| 2546 |
(void)upb_Encode(msg, &google_protobuf_ServiceOptions_msginit, 0, arena, &ptr, len); |
| 2547 |
return ptr; |
| 2548 |
} |
| 2549 |
UPB_INLINE char* google_protobuf_ServiceOptions_serialize_ex(const google_protobuf_ServiceOptions* msg, int options, |
| 2550 |
upb_Arena* arena, size_t* len) { |
| 2551 |
char* ptr; |
| 2552 |
(void)upb_Encode(msg, &google_protobuf_ServiceOptions_msginit, options, arena, &ptr, len); |
| 2553 |
return ptr; |
| 2554 |
} |
| 2555 |
UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions* msg) { |
| 2556 |
return _upb_hasbit(msg, 1); |
| 2557 |
} |
| 2558 |
UPB_INLINE void google_protobuf_ServiceOptions_clear_deprecated(const google_protobuf_ServiceOptions* msg) { |
| 2559 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 2560 |
_upb_clearhas(msg, 1); |
| 2561 |
} |
| 2562 |
UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions* msg) { |
| 2563 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 2564 |
} |
| 2565 |
UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const google_protobuf_ServiceOptions* msg) { |
| 2566 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); |
| 2567 |
} |
| 2568 |
UPB_INLINE void google_protobuf_ServiceOptions_clear_uninterpreted_option(const google_protobuf_ServiceOptions* msg) { |
| 2569 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 2570 |
} |
| 2571 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions* msg, size_t* len) { |
| 2572 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); |
| 2573 |
} |
| 2574 |
|
| 2575 |
UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) { |
| 2576 |
_upb_sethas(msg, 1); |
| 2577 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 2578 |
} |
| 2579 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions* msg, size_t* len) { |
| 2580 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
| 2581 |
} |
| 2582 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions* msg, size_t len, upb_Arena* arena) { |
| 2583 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena); |
| 2584 |
} |
| 2585 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions* msg, upb_Arena* arena) { |
| 2586 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2587 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena); |
| 2588 |
if (!ok) return NULL; |
| 2589 |
return sub; |
| 2590 |
} |
| 2591 |
|
| 2592 |
/* google.protobuf.MethodOptions */ |
| 2593 |
|
| 2594 |
UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_new(upb_Arena* arena) { |
| 2595 |
return (google_protobuf_MethodOptions*)_upb_Message_New(&google_protobuf_MethodOptions_msginit, arena); |
| 2596 |
} |
| 2597 |
UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2598 |
google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena); |
| 2599 |
if (!ret) return NULL; |
| 2600 |
if (upb_Decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2601 |
return NULL; |
| 2602 |
} |
| 2603 |
return ret; |
| 2604 |
} |
| 2605 |
UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse_ex(const char* buf, size_t size, |
| 2606 |
const upb_ExtensionRegistry* extreg, |
| 2607 |
int options, upb_Arena* arena) { |
| 2608 |
google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena); |
| 2609 |
if (!ret) return NULL; |
| 2610 |
if (upb_Decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, extreg, options, arena) != |
| 2611 |
kUpb_DecodeStatus_Ok) { |
| 2612 |
return NULL; |
| 2613 |
} |
| 2614 |
return ret; |
| 2615 |
} |
| 2616 |
UPB_INLINE char* google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions* msg, upb_Arena* arena, size_t* len) { |
| 2617 |
char* ptr; |
| 2618 |
(void)upb_Encode(msg, &google_protobuf_MethodOptions_msginit, 0, arena, &ptr, len); |
| 2619 |
return ptr; |
| 2620 |
} |
| 2621 |
UPB_INLINE char* google_protobuf_MethodOptions_serialize_ex(const google_protobuf_MethodOptions* msg, int options, |
| 2622 |
upb_Arena* arena, size_t* len) { |
| 2623 |
char* ptr; |
| 2624 |
(void)upb_Encode(msg, &google_protobuf_MethodOptions_msginit, options, arena, &ptr, len); |
| 2625 |
return ptr; |
| 2626 |
} |
| 2627 |
UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions* msg) { |
| 2628 |
return _upb_hasbit(msg, 1); |
| 2629 |
} |
| 2630 |
UPB_INLINE void google_protobuf_MethodOptions_clear_deprecated(const google_protobuf_MethodOptions* msg) { |
| 2631 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 2632 |
_upb_clearhas(msg, 1); |
| 2633 |
} |
| 2634 |
UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions* msg) { |
| 2635 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 2636 |
} |
| 2637 |
UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions* msg) { |
| 2638 |
return _upb_hasbit(msg, 2); |
| 2639 |
} |
| 2640 |
UPB_INLINE void google_protobuf_MethodOptions_clear_idempotency_level(const google_protobuf_MethodOptions* msg) { |
| 2641 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 2642 |
_upb_clearhas(msg, 2); |
| 2643 |
} |
| 2644 |
UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions* msg) { |
| 2645 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 2646 |
} |
| 2647 |
UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions* msg) { |
| 2648 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); |
| 2649 |
} |
| 2650 |
UPB_INLINE void google_protobuf_MethodOptions_clear_uninterpreted_option(const google_protobuf_MethodOptions* msg) { |
| 2651 |
_upb_array_detach(msg, UPB_SIZE(8, 8)); |
| 2652 |
} |
| 2653 |
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions* msg, size_t* len) { |
| 2654 |
return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); |
| 2655 |
} |
| 2656 |
|
| 2657 |
UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) { |
| 2658 |
_upb_sethas(msg, 1); |
| 2659 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 2660 |
} |
| 2661 |
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) { |
| 2662 |
_upb_sethas(msg, 2); |
| 2663 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 2664 |
} |
| 2665 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions* msg, size_t* len) { |
| 2666 |
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); |
| 2667 |
} |
| 2668 |
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions* msg, size_t len, upb_Arena* arena) { |
| 2669 |
return (google_protobuf_UninterpretedOption**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 8), len, UPB_SIZE(2, 3), arena); |
| 2670 |
} |
| 2671 |
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions* msg, upb_Arena* arena) { |
| 2672 |
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2673 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 8), UPB_SIZE(2, 3), &sub, arena); |
| 2674 |
if (!ok) return NULL; |
| 2675 |
return sub; |
| 2676 |
} |
| 2677 |
|
| 2678 |
/* google.protobuf.UninterpretedOption */ |
| 2679 |
|
| 2680 |
UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_new(upb_Arena* arena) { |
| 2681 |
return (google_protobuf_UninterpretedOption*)_upb_Message_New(&google_protobuf_UninterpretedOption_msginit, arena); |
| 2682 |
} |
| 2683 |
UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2684 |
google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena); |
| 2685 |
if (!ret) return NULL; |
| 2686 |
if (upb_Decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2687 |
return NULL; |
| 2688 |
} |
| 2689 |
return ret; |
| 2690 |
} |
| 2691 |
UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse_ex(const char* buf, size_t size, |
| 2692 |
const upb_ExtensionRegistry* extreg, |
| 2693 |
int options, upb_Arena* arena) { |
| 2694 |
google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena); |
| 2695 |
if (!ret) return NULL; |
| 2696 |
if (upb_Decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, extreg, options, arena) != |
| 2697 |
kUpb_DecodeStatus_Ok) { |
| 2698 |
return NULL; |
| 2699 |
} |
| 2700 |
return ret; |
| 2701 |
} |
| 2702 |
UPB_INLINE char* google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption* msg, upb_Arena* arena, size_t* len) { |
| 2703 |
char* ptr; |
| 2704 |
(void)upb_Encode(msg, &google_protobuf_UninterpretedOption_msginit, 0, arena, &ptr, len); |
| 2705 |
return ptr; |
| 2706 |
} |
| 2707 |
UPB_INLINE char* google_protobuf_UninterpretedOption_serialize_ex(const google_protobuf_UninterpretedOption* msg, int options, |
| 2708 |
upb_Arena* arena, size_t* len) { |
| 2709 |
char* ptr; |
| 2710 |
(void)upb_Encode(msg, &google_protobuf_UninterpretedOption_msginit, options, arena, &ptr, len); |
| 2711 |
return ptr; |
| 2712 |
} |
| 2713 |
UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption* msg) { |
| 2714 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); |
| 2715 |
} |
| 2716 |
UPB_INLINE void google_protobuf_UninterpretedOption_clear_name(const google_protobuf_UninterpretedOption* msg) { |
| 2717 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 2718 |
} |
| 2719 |
UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption* msg, size_t* len) { |
| 2720 |
return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); |
| 2721 |
} |
| 2722 |
UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption* msg) { |
| 2723 |
return _upb_hasbit(msg, 1); |
| 2724 |
} |
| 2725 |
UPB_INLINE void google_protobuf_UninterpretedOption_clear_identifier_value(const google_protobuf_UninterpretedOption* msg) { |
| 2726 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 2727 |
_upb_clearhas(msg, 1); |
| 2728 |
} |
| 2729 |
UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption* msg) { |
| 2730 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView); |
| 2731 |
} |
| 2732 |
UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption* msg) { |
| 2733 |
return _upb_hasbit(msg, 2); |
| 2734 |
} |
| 2735 |
UPB_INLINE void google_protobuf_UninterpretedOption_clear_positive_int_value(const google_protobuf_UninterpretedOption* msg) { |
| 2736 |
*UPB_PTR_AT(msg, UPB_SIZE(32, 64), uint64_t) = 0; |
| 2737 |
_upb_clearhas(msg, 2); |
| 2738 |
} |
| 2739 |
UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption* msg) { |
| 2740 |
return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), uint64_t); |
| 2741 |
} |
| 2742 |
UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption* msg) { |
| 2743 |
return _upb_hasbit(msg, 3); |
| 2744 |
} |
| 2745 |
UPB_INLINE void google_protobuf_UninterpretedOption_clear_negative_int_value(const google_protobuf_UninterpretedOption* msg) { |
| 2746 |
*UPB_PTR_AT(msg, UPB_SIZE(40, 72), int64_t) = 0; |
| 2747 |
_upb_clearhas(msg, 3); |
| 2748 |
} |
| 2749 |
UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption* msg) { |
| 2750 |
return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), int64_t); |
| 2751 |
} |
| 2752 |
UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption* msg) { |
| 2753 |
return _upb_hasbit(msg, 4); |
| 2754 |
} |
| 2755 |
UPB_INLINE void google_protobuf_UninterpretedOption_clear_double_value(const google_protobuf_UninterpretedOption* msg) { |
| 2756 |
*UPB_PTR_AT(msg, UPB_SIZE(48, 80), double) = 0; |
| 2757 |
_upb_clearhas(msg, 4); |
| 2758 |
} |
| 2759 |
UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption* msg) { |
| 2760 |
return *UPB_PTR_AT(msg, UPB_SIZE(48, 80), double); |
| 2761 |
} |
| 2762 |
UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption* msg) { |
| 2763 |
return _upb_hasbit(msg, 5); |
| 2764 |
} |
| 2765 |
UPB_INLINE void google_protobuf_UninterpretedOption_clear_string_value(const google_protobuf_UninterpretedOption* msg) { |
| 2766 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 2767 |
_upb_clearhas(msg, 5); |
| 2768 |
} |
| 2769 |
UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption* msg) { |
| 2770 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView); |
| 2771 |
} |
| 2772 |
UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption* msg) { |
| 2773 |
return _upb_hasbit(msg, 6); |
| 2774 |
} |
| 2775 |
UPB_INLINE void google_protobuf_UninterpretedOption_clear_aggregate_value(const google_protobuf_UninterpretedOption* msg) { |
| 2776 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 2777 |
_upb_clearhas(msg, 6); |
| 2778 |
} |
| 2779 |
UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption* msg) { |
| 2780 |
return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView); |
| 2781 |
} |
| 2782 |
|
| 2783 |
UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption* msg, size_t* len) { |
| 2784 |
return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
| 2785 |
} |
| 2786 |
UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption* msg, size_t len, upb_Arena* arena) { |
| 2787 |
return (google_protobuf_UninterpretedOption_NamePart**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena); |
| 2788 |
} |
| 2789 |
UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption* msg, upb_Arena* arena) { |
| 2790 |
struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); |
| 2791 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena); |
| 2792 |
if (!ok) return NULL; |
| 2793 |
return sub; |
| 2794 |
} |
| 2795 |
UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { |
| 2796 |
_upb_sethas(msg, 1); |
| 2797 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value; |
| 2798 |
} |
| 2799 |
UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) { |
| 2800 |
_upb_sethas(msg, 2); |
| 2801 |
*UPB_PTR_AT(msg, UPB_SIZE(32, 64), uint64_t) = value; |
| 2802 |
} |
| 2803 |
UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) { |
| 2804 |
_upb_sethas(msg, 3); |
| 2805 |
*UPB_PTR_AT(msg, UPB_SIZE(40, 72), int64_t) = value; |
| 2806 |
} |
| 2807 |
UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) { |
| 2808 |
_upb_sethas(msg, 4); |
| 2809 |
*UPB_PTR_AT(msg, UPB_SIZE(48, 80), double) = value; |
| 2810 |
} |
| 2811 |
UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { |
| 2812 |
_upb_sethas(msg, 5); |
| 2813 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = value; |
| 2814 |
} |
| 2815 |
UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) { |
| 2816 |
_upb_sethas(msg, 6); |
| 2817 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView) = value; |
| 2818 |
} |
| 2819 |
|
| 2820 |
/* google.protobuf.UninterpretedOption.NamePart */ |
| 2821 |
|
| 2822 |
UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_new(upb_Arena* arena) { |
| 2823 |
return (google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); |
| 2824 |
} |
| 2825 |
UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2826 |
google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena); |
| 2827 |
if (!ret) return NULL; |
| 2828 |
if (upb_Decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2829 |
return NULL; |
| 2830 |
} |
| 2831 |
return ret; |
| 2832 |
} |
| 2833 |
UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse_ex(const char* buf, size_t size, |
| 2834 |
const upb_ExtensionRegistry* extreg, |
| 2835 |
int options, upb_Arena* arena) { |
| 2836 |
google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena); |
| 2837 |
if (!ret) return NULL; |
| 2838 |
if (upb_Decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, extreg, options, arena) != |
| 2839 |
kUpb_DecodeStatus_Ok) { |
| 2840 |
return NULL; |
| 2841 |
} |
| 2842 |
return ret; |
| 2843 |
} |
| 2844 |
UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart* msg, upb_Arena* arena, size_t* len) { |
| 2845 |
char* ptr; |
| 2846 |
(void)upb_Encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, 0, arena, &ptr, len); |
| 2847 |
return ptr; |
| 2848 |
} |
| 2849 |
UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize_ex(const google_protobuf_UninterpretedOption_NamePart* msg, int options, |
| 2850 |
upb_Arena* arena, size_t* len) { |
| 2851 |
char* ptr; |
| 2852 |
(void)upb_Encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, options, arena, &ptr, len); |
| 2853 |
return ptr; |
| 2854 |
} |
| 2855 |
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { |
| 2856 |
return _upb_hasbit(msg, 1); |
| 2857 |
} |
| 2858 |
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { |
| 2859 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 2860 |
_upb_clearhas(msg, 1); |
| 2861 |
} |
| 2862 |
UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) { |
| 2863 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 2864 |
} |
| 2865 |
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { |
| 2866 |
return _upb_hasbit(msg, 2); |
| 2867 |
} |
| 2868 |
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { |
| 2869 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 2870 |
_upb_clearhas(msg, 2); |
| 2871 |
} |
| 2872 |
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) { |
| 2873 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 2874 |
} |
| 2875 |
|
| 2876 |
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_StringView value) { |
| 2877 |
_upb_sethas(msg, 1); |
| 2878 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 2879 |
} |
| 2880 |
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) { |
| 2881 |
_upb_sethas(msg, 2); |
| 2882 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 2883 |
} |
| 2884 |
|
| 2885 |
/* google.protobuf.SourceCodeInfo */ |
| 2886 |
|
| 2887 |
UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_new(upb_Arena* arena) { |
| 2888 |
return (google_protobuf_SourceCodeInfo*)_upb_Message_New(&google_protobuf_SourceCodeInfo_msginit, arena); |
| 2889 |
} |
| 2890 |
UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2891 |
google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena); |
| 2892 |
if (!ret) return NULL; |
| 2893 |
if (upb_Decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2894 |
return NULL; |
| 2895 |
} |
| 2896 |
return ret; |
| 2897 |
} |
| 2898 |
UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse_ex(const char* buf, size_t size, |
| 2899 |
const upb_ExtensionRegistry* extreg, |
| 2900 |
int options, upb_Arena* arena) { |
| 2901 |
google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena); |
| 2902 |
if (!ret) return NULL; |
| 2903 |
if (upb_Decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, extreg, options, arena) != |
| 2904 |
kUpb_DecodeStatus_Ok) { |
| 2905 |
return NULL; |
| 2906 |
} |
| 2907 |
return ret; |
| 2908 |
} |
| 2909 |
UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo* msg, upb_Arena* arena, size_t* len) { |
| 2910 |
char* ptr; |
| 2911 |
(void)upb_Encode(msg, &google_protobuf_SourceCodeInfo_msginit, 0, arena, &ptr, len); |
| 2912 |
return ptr; |
| 2913 |
} |
| 2914 |
UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize_ex(const google_protobuf_SourceCodeInfo* msg, int options, |
| 2915 |
upb_Arena* arena, size_t* len) { |
| 2916 |
char* ptr; |
| 2917 |
(void)upb_Encode(msg, &google_protobuf_SourceCodeInfo_msginit, options, arena, &ptr, len); |
| 2918 |
return ptr; |
| 2919 |
} |
| 2920 |
UPB_INLINE bool google_protobuf_SourceCodeInfo_has_location(const google_protobuf_SourceCodeInfo* msg) { |
| 2921 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); |
| 2922 |
} |
| 2923 |
UPB_INLINE void google_protobuf_SourceCodeInfo_clear_location(const google_protobuf_SourceCodeInfo* msg) { |
| 2924 |
_upb_array_detach(msg, UPB_SIZE(0, 0)); |
| 2925 |
} |
| 2926 |
UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo* msg, size_t* len) { |
| 2927 |
return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); |
| 2928 |
} |
| 2929 |
|
| 2930 |
UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo* msg, size_t* len) { |
| 2931 |
return (google_protobuf_SourceCodeInfo_Location**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
| 2932 |
} |
| 2933 |
UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo* msg, size_t len, upb_Arena* arena) { |
| 2934 |
return (google_protobuf_SourceCodeInfo_Location**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena); |
| 2935 |
} |
| 2936 |
UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo* msg, upb_Arena* arena) { |
| 2937 |
struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google_protobuf_SourceCodeInfo_Location_msginit, arena); |
| 2938 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena); |
| 2939 |
if (!ok) return NULL; |
| 2940 |
return sub; |
| 2941 |
} |
| 2942 |
|
| 2943 |
/* google.protobuf.SourceCodeInfo.Location */ |
| 2944 |
|
| 2945 |
UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_new(upb_Arena* arena) { |
| 2946 |
return (google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(&google_protobuf_SourceCodeInfo_Location_msginit, arena); |
| 2947 |
} |
| 2948 |
UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 2949 |
google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena); |
| 2950 |
if (!ret) return NULL; |
| 2951 |
if (upb_Decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 2952 |
return NULL; |
| 2953 |
} |
| 2954 |
return ret; |
| 2955 |
} |
| 2956 |
UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse_ex(const char* buf, size_t size, |
| 2957 |
const upb_ExtensionRegistry* extreg, |
| 2958 |
int options, upb_Arena* arena) { |
| 2959 |
google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena); |
| 2960 |
if (!ret) return NULL; |
| 2961 |
if (upb_Decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, extreg, options, arena) != |
| 2962 |
kUpb_DecodeStatus_Ok) { |
| 2963 |
return NULL; |
| 2964 |
} |
| 2965 |
return ret; |
| 2966 |
} |
| 2967 |
UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location* msg, upb_Arena* arena, size_t* len) { |
| 2968 |
char* ptr; |
| 2969 |
(void)upb_Encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, 0, arena, &ptr, len); |
| 2970 |
return ptr; |
| 2971 |
} |
| 2972 |
UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize_ex(const google_protobuf_SourceCodeInfo_Location* msg, int options, |
| 2973 |
upb_Arena* arena, size_t* len) { |
| 2974 |
char* ptr; |
| 2975 |
(void)upb_Encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, options, arena, &ptr, len); |
| 2976 |
return ptr; |
| 2977 |
} |
| 2978 |
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_path(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 2979 |
_upb_array_detach(msg, UPB_SIZE(4, 8)); |
| 2980 |
} |
| 2981 |
UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { |
| 2982 |
return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); |
| 2983 |
} |
| 2984 |
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_span(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 2985 |
_upb_array_detach(msg, UPB_SIZE(8, 16)); |
| 2986 |
} |
| 2987 |
UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { |
| 2988 |
return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); |
| 2989 |
} |
| 2990 |
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 2991 |
return _upb_hasbit(msg, 1); |
| 2992 |
} |
| 2993 |
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 2994 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 2995 |
_upb_clearhas(msg, 1); |
| 2996 |
} |
| 2997 |
UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 2998 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView); |
| 2999 |
} |
| 3000 |
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 3001 |
return _upb_hasbit(msg, 2); |
| 3002 |
} |
| 3003 |
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 3004 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 3005 |
_upb_clearhas(msg, 2); |
| 3006 |
} |
| 3007 |
UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 3008 |
return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView); |
| 3009 |
} |
| 3010 |
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg) { |
| 3011 |
_upb_array_detach(msg, UPB_SIZE(28, 56)); |
| 3012 |
} |
| 3013 |
UPB_INLINE upb_StringView const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { |
| 3014 |
return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); |
| 3015 |
} |
| 3016 |
|
| 3017 |
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { |
| 3018 |
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
| 3019 |
} |
| 3020 |
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location* msg, size_t len, upb_Arena* arena) { |
| 3021 |
return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, 2, arena); |
| 3022 |
} |
| 3023 |
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location* msg, int32_t val, upb_Arena* arena) { |
| 3024 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), 2, &val, arena); |
| 3025 |
} |
| 3026 |
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { |
| 3027 |
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); |
| 3028 |
} |
| 3029 |
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location* msg, size_t len, upb_Arena* arena) { |
| 3030 |
return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, 2, arena); |
| 3031 |
} |
| 3032 |
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location* msg, int32_t val, upb_Arena* arena) { |
| 3033 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 16), 2, &val, arena); |
| 3034 |
} |
| 3035 |
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { |
| 3036 |
_upb_sethas(msg, 1); |
| 3037 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value; |
| 3038 |
} |
| 3039 |
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) { |
| 3040 |
_upb_sethas(msg, 2); |
| 3041 |
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_StringView) = value; |
| 3042 |
} |
| 3043 |
UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t* len) { |
| 3044 |
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); |
| 3045 |
} |
| 3046 |
UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t len, upb_Arena* arena) { |
| 3047 |
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena); |
| 3048 |
} |
| 3049 |
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, upb_StringView val, upb_Arena* arena) { |
| 3050 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val, arena); |
| 3051 |
} |
| 3052 |
|
| 3053 |
/* google.protobuf.GeneratedCodeInfo */ |
| 3054 |
|
| 3055 |
UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_new(upb_Arena* arena) { |
| 3056 |
return (google_protobuf_GeneratedCodeInfo*)_upb_Message_New(&google_protobuf_GeneratedCodeInfo_msginit, arena); |
| 3057 |
} |
| 3058 |
UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 3059 |
google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena); |
| 3060 |
if (!ret) return NULL; |
| 3061 |
if (upb_Decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 3062 |
return NULL; |
| 3063 |
} |
| 3064 |
return ret; |
| 3065 |
} |
| 3066 |
UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse_ex(const char* buf, size_t size, |
| 3067 |
const upb_ExtensionRegistry* extreg, |
| 3068 |
int options, upb_Arena* arena) { |
| 3069 |
google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena); |
| 3070 |
if (!ret) return NULL; |
| 3071 |
if (upb_Decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, extreg, options, arena) != |
| 3072 |
kUpb_DecodeStatus_Ok) { |
| 3073 |
return NULL; |
| 3074 |
} |
| 3075 |
return ret; |
| 3076 |
} |
| 3077 |
UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo* msg, upb_Arena* arena, size_t* len) { |
| 3078 |
char* ptr; |
| 3079 |
(void)upb_Encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, 0, arena, &ptr, len); |
| 3080 |
return ptr; |
| 3081 |
} |
| 3082 |
UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize_ex(const google_protobuf_GeneratedCodeInfo* msg, int options, |
| 3083 |
upb_Arena* arena, size_t* len) { |
| 3084 |
char* ptr; |
| 3085 |
(void)upb_Encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, options, arena, &ptr, len); |
| 3086 |
return ptr; |
| 3087 |
} |
| 3088 |
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_has_annotation(const google_protobuf_GeneratedCodeInfo* msg) { |
| 3089 |
return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); |
| 3090 |
} |
| 3091 |
UPB_INLINE void google_protobuf_GeneratedCodeInfo_clear_annotation(const google_protobuf_GeneratedCodeInfo* msg) { |
| 3092 |
_upb_array_detach(msg, UPB_SIZE(0, 0)); |
| 3093 |
} |
| 3094 |
UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo* msg, size_t* len) { |
| 3095 |
return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); |
| 3096 |
} |
| 3097 |
|
| 3098 |
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo* msg, size_t* len) { |
| 3099 |
return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
| 3100 |
} |
| 3101 |
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo* msg, size_t len, upb_Arena* arena) { |
| 3102 |
return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena); |
| 3103 |
} |
| 3104 |
UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo* msg, upb_Arena* arena) { |
| 3105 |
struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); |
| 3106 |
bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena); |
| 3107 |
if (!ok) return NULL; |
| 3108 |
return sub; |
| 3109 |
} |
| 3110 |
|
| 3111 |
/* google.protobuf.GeneratedCodeInfo.Annotation */ |
| 3112 |
|
| 3113 |
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_new(upb_Arena* arena) { |
| 3114 |
return (google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); |
| 3115 |
} |
| 3116 |
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 3117 |
google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena); |
| 3118 |
if (!ret) return NULL; |
| 3119 |
if (upb_Decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 3120 |
return NULL; |
| 3121 |
} |
| 3122 |
return ret; |
| 3123 |
} |
| 3124 |
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char* buf, size_t size, |
| 3125 |
const upb_ExtensionRegistry* extreg, |
| 3126 |
int options, upb_Arena* arena) { |
| 3127 |
google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena); |
| 3128 |
if (!ret) return NULL; |
| 3129 |
if (upb_Decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, extreg, options, arena) != |
| 3130 |
kUpb_DecodeStatus_Ok) { |
| 3131 |
return NULL; |
| 3132 |
} |
| 3133 |
return ret; |
| 3134 |
} |
| 3135 |
UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation* msg, upb_Arena* arena, size_t* len) { |
| 3136 |
char* ptr; |
| 3137 |
(void)upb_Encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, 0, arena, &ptr, len); |
| 3138 |
return ptr; |
| 3139 |
} |
| 3140 |
UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize_ex(const google_protobuf_GeneratedCodeInfo_Annotation* msg, int options, |
| 3141 |
upb_Arena* arena, size_t* len) { |
| 3142 |
char* ptr; |
| 3143 |
(void)upb_Encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, options, arena, &ptr, len); |
| 3144 |
return ptr; |
| 3145 |
} |
| 3146 |
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3147 |
_upb_array_detach(msg, UPB_SIZE(12, 16)); |
| 3148 |
} |
| 3149 |
UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* len) { |
| 3150 |
return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); |
| 3151 |
} |
| 3152 |
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3153 |
return _upb_hasbit(msg, 1); |
| 3154 |
} |
| 3155 |
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3156 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 3157 |
_upb_clearhas(msg, 1); |
| 3158 |
} |
| 3159 |
UPB_INLINE upb_StringView google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3160 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView); |
| 3161 |
} |
| 3162 |
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3163 |
return _upb_hasbit(msg, 2); |
| 3164 |
} |
| 3165 |
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3166 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 3167 |
_upb_clearhas(msg, 2); |
| 3168 |
} |
| 3169 |
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3170 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 3171 |
} |
| 3172 |
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3173 |
return _upb_hasbit(msg, 3); |
| 3174 |
} |
| 3175 |
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3176 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = 0; |
| 3177 |
_upb_clearhas(msg, 3); |
| 3178 |
} |
| 3179 |
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) { |
| 3180 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); |
| 3181 |
} |
| 3182 |
|
| 3183 |
UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* len) { |
| 3184 |
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len); |
| 3185 |
} |
| 3186 |
UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t len, upb_Arena* arena) { |
| 3187 |
return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 16), len, 2, arena); |
| 3188 |
} |
| 3189 |
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, int32_t val, upb_Arena* arena) { |
| 3190 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 16), 2, &val, arena); |
| 3191 |
} |
| 3192 |
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_StringView value) { |
| 3193 |
_upb_sethas(msg, 1); |
| 3194 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView) = value; |
| 3195 |
} |
| 3196 |
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { |
| 3197 |
_upb_sethas(msg, 2); |
| 3198 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 3199 |
} |
| 3200 |
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { |
| 3201 |
_upb_sethas(msg, 3); |
| 3202 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; |
| 3203 |
} |
| 3204 |
|
| 3205 |
extern const upb_MiniTable_File google_protobuf_descriptor_proto_upb_file_layout; |
| 3206 |
|
| 3207 |
/* Max size 32 is google.protobuf.FileOptions */ |
| 3208 |
/* Max size 64 is google.protobuf.FileOptions */ |
| 3209 |
#define _UPB_MAXOPT_SIZE UPB_SIZE(104, 192) |
| 3210 |
|
| 3211 |
#ifdef __cplusplus |
| 3212 |
} /* extern "C" */ |
| 3213 |
#endif |
| 3214 |
|
| 3215 |
#include "upb/port_undef.inc" |
| 3216 |
|
| 3217 |
#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */ |