1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
3 // source: google/protobuf/type.proto
4 // Protobuf C++ Version: 5.29.4
5
6 #include "google/protobuf/type.pb.h"
7
8 #include <algorithm>
9 #include <type_traits>
10 #include "google/protobuf/io/coded_stream.h"
11 #include "google/protobuf/generated_message_tctable_impl.h"
12 #include "google/protobuf/extension_set.h"
13 #include "google/protobuf/generated_message_util.h"
14 #include "google/protobuf/wire_format_lite.h"
15 #include "google/protobuf/descriptor.h"
16 #include "google/protobuf/generated_message_reflection.h"
17 #include "google/protobuf/reflection_ops.h"
18 #include "google/protobuf/wire_format.h"
19 // @@protoc_insertion_point(includes)
20
21 // Must be included last.
22 #include "google/protobuf/port_def.inc"
23 PROTOBUF_PRAGMA_INIT_SEG
24 namespace _pb = ::google::protobuf;
25 namespace _pbi = ::google::protobuf::internal;
26 namespace _fl = ::google::protobuf::internal::field_layout;
27 namespace google {
28 namespace protobuf {
29
Impl_(::_pbi::ConstantInitialized)30 inline constexpr Option::Impl_::Impl_(
31 ::_pbi::ConstantInitialized) noexcept
32 : _cached_size_{0},
33 name_(
34 &::google::protobuf::internal::fixed_address_empty_string,
35 ::_pbi::ConstantInitialized()),
36 value_{nullptr} {}
37
38 template <typename>
Option(::_pbi::ConstantInitialized)39 PROTOBUF_CONSTEXPR Option::Option(::_pbi::ConstantInitialized)
40 #if defined(PROTOBUF_CUSTOM_VTABLE)
41 : ::google::protobuf::Message(_class_data_.base()),
42 #else // PROTOBUF_CUSTOM_VTABLE
43 : ::google::protobuf::Message(),
44 #endif // PROTOBUF_CUSTOM_VTABLE
45 _impl_(::_pbi::ConstantInitialized()) {
46 }
47 struct OptionDefaultTypeInternal {
OptionDefaultTypeInternalgoogle::protobuf::OptionDefaultTypeInternal48 PROTOBUF_CONSTEXPR OptionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~OptionDefaultTypeInternalgoogle::protobuf::OptionDefaultTypeInternal49 ~OptionDefaultTypeInternal() {}
50 union {
51 Option _instance;
52 };
53 };
54
55 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT
56 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OptionDefaultTypeInternal _Option_default_instance_;
57
Impl_(::_pbi::ConstantInitialized)58 inline constexpr Field::Impl_::Impl_(
59 ::_pbi::ConstantInitialized) noexcept
60 : options_{},
61 name_(
62 &::google::protobuf::internal::fixed_address_empty_string,
63 ::_pbi::ConstantInitialized()),
64 type_url_(
65 &::google::protobuf::internal::fixed_address_empty_string,
66 ::_pbi::ConstantInitialized()),
67 json_name_(
68 &::google::protobuf::internal::fixed_address_empty_string,
69 ::_pbi::ConstantInitialized()),
70 default_value_(
71 &::google::protobuf::internal::fixed_address_empty_string,
72 ::_pbi::ConstantInitialized()),
73 kind_{static_cast< ::google::protobuf::Field_Kind >(0)},
74 cardinality_{static_cast< ::google::protobuf::Field_Cardinality >(0)},
75 number_{0},
76 oneof_index_{0},
77 packed_{false},
78 _cached_size_{0} {}
79
80 template <typename>
Field(::_pbi::ConstantInitialized)81 PROTOBUF_CONSTEXPR Field::Field(::_pbi::ConstantInitialized)
82 #if defined(PROTOBUF_CUSTOM_VTABLE)
83 : ::google::protobuf::Message(_class_data_.base()),
84 #else // PROTOBUF_CUSTOM_VTABLE
85 : ::google::protobuf::Message(),
86 #endif // PROTOBUF_CUSTOM_VTABLE
87 _impl_(::_pbi::ConstantInitialized()) {
88 }
89 struct FieldDefaultTypeInternal {
FieldDefaultTypeInternalgoogle::protobuf::FieldDefaultTypeInternal90 PROTOBUF_CONSTEXPR FieldDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~FieldDefaultTypeInternalgoogle::protobuf::FieldDefaultTypeInternal91 ~FieldDefaultTypeInternal() {}
92 union {
93 Field _instance;
94 };
95 };
96
97 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT
98 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldDefaultTypeInternal _Field_default_instance_;
99
Impl_(::_pbi::ConstantInitialized)100 inline constexpr EnumValue::Impl_::Impl_(
101 ::_pbi::ConstantInitialized) noexcept
102 : options_{},
103 name_(
104 &::google::protobuf::internal::fixed_address_empty_string,
105 ::_pbi::ConstantInitialized()),
106 number_{0},
107 _cached_size_{0} {}
108
109 template <typename>
EnumValue(::_pbi::ConstantInitialized)110 PROTOBUF_CONSTEXPR EnumValue::EnumValue(::_pbi::ConstantInitialized)
111 #if defined(PROTOBUF_CUSTOM_VTABLE)
112 : ::google::protobuf::Message(_class_data_.base()),
113 #else // PROTOBUF_CUSTOM_VTABLE
114 : ::google::protobuf::Message(),
115 #endif // PROTOBUF_CUSTOM_VTABLE
116 _impl_(::_pbi::ConstantInitialized()) {
117 }
118 struct EnumValueDefaultTypeInternal {
EnumValueDefaultTypeInternalgoogle::protobuf::EnumValueDefaultTypeInternal119 PROTOBUF_CONSTEXPR EnumValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~EnumValueDefaultTypeInternalgoogle::protobuf::EnumValueDefaultTypeInternal120 ~EnumValueDefaultTypeInternal() {}
121 union {
122 EnumValue _instance;
123 };
124 };
125
126 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT
127 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDefaultTypeInternal _EnumValue_default_instance_;
128
Impl_(::_pbi::ConstantInitialized)129 inline constexpr Type::Impl_::Impl_(
130 ::_pbi::ConstantInitialized) noexcept
131 : _cached_size_{0},
132 fields_{},
133 oneofs_{},
134 options_{},
135 name_(
136 &::google::protobuf::internal::fixed_address_empty_string,
137 ::_pbi::ConstantInitialized()),
138 edition_(
139 &::google::protobuf::internal::fixed_address_empty_string,
140 ::_pbi::ConstantInitialized()),
141 source_context_{nullptr},
142 syntax_{static_cast< ::google::protobuf::Syntax >(0)} {}
143
144 template <typename>
Type(::_pbi::ConstantInitialized)145 PROTOBUF_CONSTEXPR Type::Type(::_pbi::ConstantInitialized)
146 #if defined(PROTOBUF_CUSTOM_VTABLE)
147 : ::google::protobuf::Message(_class_data_.base()),
148 #else // PROTOBUF_CUSTOM_VTABLE
149 : ::google::protobuf::Message(),
150 #endif // PROTOBUF_CUSTOM_VTABLE
151 _impl_(::_pbi::ConstantInitialized()) {
152 }
153 struct TypeDefaultTypeInternal {
TypeDefaultTypeInternalgoogle::protobuf::TypeDefaultTypeInternal154 PROTOBUF_CONSTEXPR TypeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~TypeDefaultTypeInternalgoogle::protobuf::TypeDefaultTypeInternal155 ~TypeDefaultTypeInternal() {}
156 union {
157 Type _instance;
158 };
159 };
160
161 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT
162 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDefaultTypeInternal _Type_default_instance_;
163
Impl_(::_pbi::ConstantInitialized)164 inline constexpr Enum::Impl_::Impl_(
165 ::_pbi::ConstantInitialized) noexcept
166 : _cached_size_{0},
167 enumvalue_{},
168 options_{},
169 name_(
170 &::google::protobuf::internal::fixed_address_empty_string,
171 ::_pbi::ConstantInitialized()),
172 edition_(
173 &::google::protobuf::internal::fixed_address_empty_string,
174 ::_pbi::ConstantInitialized()),
175 source_context_{nullptr},
176 syntax_{static_cast< ::google::protobuf::Syntax >(0)} {}
177
178 template <typename>
Enum(::_pbi::ConstantInitialized)179 PROTOBUF_CONSTEXPR Enum::Enum(::_pbi::ConstantInitialized)
180 #if defined(PROTOBUF_CUSTOM_VTABLE)
181 : ::google::protobuf::Message(_class_data_.base()),
182 #else // PROTOBUF_CUSTOM_VTABLE
183 : ::google::protobuf::Message(),
184 #endif // PROTOBUF_CUSTOM_VTABLE
185 _impl_(::_pbi::ConstantInitialized()) {
186 }
187 struct EnumDefaultTypeInternal {
EnumDefaultTypeInternalgoogle::protobuf::EnumDefaultTypeInternal188 PROTOBUF_CONSTEXPR EnumDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~EnumDefaultTypeInternalgoogle::protobuf::EnumDefaultTypeInternal189 ~EnumDefaultTypeInternal() {}
190 union {
191 Enum _instance;
192 };
193 };
194
195 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT
196 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDefaultTypeInternal _Enum_default_instance_;
197 } // namespace protobuf
198 } // namespace google
199 static const ::_pb::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[3];
200 static constexpr const ::_pb::ServiceDescriptor**
201 file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto = nullptr;
202 const ::uint32_t
203 TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
204 protodesc_cold) = {
205 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _impl_._has_bits_),
206 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _internal_metadata_),
207 ~0u, // no _extensions_
208 ~0u, // no _oneof_case_
209 ~0u, // no _weak_field_map_
210 ~0u, // no _inlined_string_donated_
211 ~0u, // no _split_
212 ~0u, // no sizeof(Split)
213 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _impl_.name_),
214 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _impl_.fields_),
215 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _impl_.oneofs_),
216 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _impl_.options_),
217 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _impl_.source_context_),
218 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _impl_.syntax_),
219 PROTOBUF_FIELD_OFFSET(::google::protobuf::Type, _impl_.edition_),
220 ~0u,
221 ~0u,
222 ~0u,
223 ~0u,
224 0,
225 ~0u,
226 ~0u,
227 ~0u, // no _has_bits_
228 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _internal_metadata_),
229 ~0u, // no _extensions_
230 ~0u, // no _oneof_case_
231 ~0u, // no _weak_field_map_
232 ~0u, // no _inlined_string_donated_
233 ~0u, // no _split_
234 ~0u, // no sizeof(Split)
235 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.kind_),
236 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.cardinality_),
237 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.number_),
238 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.name_),
239 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.type_url_),
240 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.oneof_index_),
241 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.packed_),
242 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.options_),
243 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.json_name_),
244 PROTOBUF_FIELD_OFFSET(::google::protobuf::Field, _impl_.default_value_),
245 PROTOBUF_FIELD_OFFSET(::google::protobuf::Enum, _impl_._has_bits_),
246 PROTOBUF_FIELD_OFFSET(::google::protobuf::Enum, _internal_metadata_),
247 ~0u, // no _extensions_
248 ~0u, // no _oneof_case_
249 ~0u, // no _weak_field_map_
250 ~0u, // no _inlined_string_donated_
251 ~0u, // no _split_
252 ~0u, // no sizeof(Split)
253 PROTOBUF_FIELD_OFFSET(::google::protobuf::Enum, _impl_.name_),
254 PROTOBUF_FIELD_OFFSET(::google::protobuf::Enum, _impl_.enumvalue_),
255 PROTOBUF_FIELD_OFFSET(::google::protobuf::Enum, _impl_.options_),
256 PROTOBUF_FIELD_OFFSET(::google::protobuf::Enum, _impl_.source_context_),
257 PROTOBUF_FIELD_OFFSET(::google::protobuf::Enum, _impl_.syntax_),
258 PROTOBUF_FIELD_OFFSET(::google::protobuf::Enum, _impl_.edition_),
259 ~0u,
260 ~0u,
261 ~0u,
262 0,
263 ~0u,
264 ~0u,
265 ~0u, // no _has_bits_
266 PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValue, _internal_metadata_),
267 ~0u, // no _extensions_
268 ~0u, // no _oneof_case_
269 ~0u, // no _weak_field_map_
270 ~0u, // no _inlined_string_donated_
271 ~0u, // no _split_
272 ~0u, // no sizeof(Split)
273 PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValue, _impl_.name_),
274 PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValue, _impl_.number_),
275 PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValue, _impl_.options_),
276 PROTOBUF_FIELD_OFFSET(::google::protobuf::Option, _impl_._has_bits_),
277 PROTOBUF_FIELD_OFFSET(::google::protobuf::Option, _internal_metadata_),
278 ~0u, // no _extensions_
279 ~0u, // no _oneof_case_
280 ~0u, // no _weak_field_map_
281 ~0u, // no _inlined_string_donated_
282 ~0u, // no _split_
283 ~0u, // no sizeof(Split)
284 PROTOBUF_FIELD_OFFSET(::google::protobuf::Option, _impl_.name_),
285 PROTOBUF_FIELD_OFFSET(::google::protobuf::Option, _impl_.value_),
286 ~0u,
287 0,
288 };
289
290 static const ::_pbi::MigrationSchema
291 schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
292 {0, 15, -1, sizeof(::google::protobuf::Type)},
293 {22, -1, -1, sizeof(::google::protobuf::Field)},
294 {40, 54, -1, sizeof(::google::protobuf::Enum)},
295 {60, -1, -1, sizeof(::google::protobuf::EnumValue)},
296 {71, 81, -1, sizeof(::google::protobuf::Option)},
297 };
298 static const ::_pb::Message* const file_default_instances[] = {
299 &::google::protobuf::_Type_default_instance_._instance,
300 &::google::protobuf::_Field_default_instance_._instance,
301 &::google::protobuf::_Enum_default_instance_._instance,
302 &::google::protobuf::_EnumValue_default_instance_._instance,
303 &::google::protobuf::_Option_default_instance_._instance,
304 };
305 const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
306 protodesc_cold) = {
307 "\n\032google/protobuf/type.proto\022\017google.pro"
308 "tobuf\032\031google/protobuf/any.proto\032$google"
309 "/protobuf/source_context.proto\"\350\001\n\004Type\022"
310 "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.google.p"
311 "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options"
312 "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc"
313 "e_context\030\005 \001(\0132\036.google.protobuf.Source"
314 "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu"
315 "f.Syntax\022\017\n\007edition\030\007 \001(\t\"\325\005\n\005Field\022)\n\004k"
316 "ind\030\001 \001(\0162\033.google.protobuf.Field.Kind\0227"
317 "\n\013cardinality\030\002 \001(\0162\".google.protobuf.Fi"
318 "eld.Cardinality\022\016\n\006number\030\003 \001(\005\022\014\n\004name\030"
319 "\004 \001(\t\022\020\n\010type_url\030\006 \001(\t\022\023\n\013oneof_index\030\007"
320 " \001(\005\022\016\n\006packed\030\010 \001(\010\022(\n\007options\030\t \003(\0132\027."
321 "google.protobuf.Option\022\021\n\tjson_name\030\n \001("
322 "\t\022\025\n\rdefault_value\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYP"
323 "E_UNKNOWN\020\000\022\017\n\013TYPE_DOUBLE\020\001\022\016\n\nTYPE_FLO"
324 "AT\020\002\022\016\n\nTYPE_INT64\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n"
325 "\nTYPE_INT32\020\005\022\020\n\014TYPE_FIXED64\020\006\022\020\n\014TYPE_"
326 "FIXED32\020\007\022\r\n\tTYPE_BOOL\020\010\022\017\n\013TYPE_STRING\020"
327 "\t\022\016\n\nTYPE_GROUP\020\n\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nT"
328 "YPE_BYTES\020\014\022\017\n\013TYPE_UINT32\020\r\022\r\n\tTYPE_ENU"
329 "M\020\016\022\021\n\rTYPE_SFIXED32\020\017\022\021\n\rTYPE_SFIXED64\020"
330 "\020\022\017\n\013TYPE_SINT32\020\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013C"
331 "ardinality\022\027\n\023CARDINALITY_UNKNOWN\020\000\022\030\n\024C"
332 "ARDINALITY_OPTIONAL\020\001\022\030\n\024CARDINALITY_REQ"
333 "UIRED\020\002\022\030\n\024CARDINALITY_REPEATED\020\003\"\337\001\n\004En"
334 "um\022\014\n\004name\030\001 \001(\t\022-\n\tenumvalue\030\002 \003(\0132\032.go"
335 "ogle.protobuf.EnumValue\022(\n\007options\030\003 \003(\013"
336 "2\027.google.protobuf.Option\0226\n\016source_cont"
337 "ext\030\004 \001(\0132\036.google.protobuf.SourceContex"
338 "t\022\'\n\006syntax\030\005 \001(\0162\027.google.protobuf.Synt"
339 "ax\022\017\n\007edition\030\006 \001(\t\"S\n\tEnumValue\022\014\n\004name"
340 "\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030\003 \003(\0132"
341 "\027.google.protobuf.Option\";\n\006Option\022\014\n\004na"
342 "me\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.protobu"
343 "f.Any*C\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000\022\021\n\rSY"
344 "NTAX_PROTO3\020\001\022\023\n\017SYNTAX_EDITIONS\020\002B{\n\023co"
345 "m.google.protobufB\tTypeProtoP\001Z-google.g"
346 "olang.org/protobuf/types/known/typepb\370\001\001"
347 "\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypesb"
348 "\006proto3"
349 };
350 static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2ftype_2eproto_deps[2] =
351 {
352 &::descriptor_table_google_2fprotobuf_2fany_2eproto,
353 &::descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto,
354 };
355 static ::absl::once_flag descriptor_table_google_2fprotobuf_2ftype_2eproto_once;
356 PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ftype_2eproto = {
357 false,
358 false,
359 1647,
360 descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto,
361 "google/protobuf/type.proto",
362 &descriptor_table_google_2fprotobuf_2ftype_2eproto_once,
363 descriptor_table_google_2fprotobuf_2ftype_2eproto_deps,
364 2,
365 5,
366 schemas,
367 file_default_instances,
368 TableStruct_google_2fprotobuf_2ftype_2eproto::offsets,
369 file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto,
370 file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto,
371 };
372 namespace google {
373 namespace protobuf {
Field_Kind_descriptor()374 const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor() {
375 ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
376 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[0];
377 }
378 PROTOBUF_CONSTINIT const uint32_t Field_Kind_internal_data_[] = {
379 1245184u, 0u, };
Field_Kind_IsValid(int value)380 bool Field_Kind_IsValid(int value) {
381 return 0 <= value && value <= 18;
382 }
383 #if (__cplusplus < 201703) && \
384 (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
385
386 constexpr Field_Kind Field::TYPE_UNKNOWN;
387 constexpr Field_Kind Field::TYPE_DOUBLE;
388 constexpr Field_Kind Field::TYPE_FLOAT;
389 constexpr Field_Kind Field::TYPE_INT64;
390 constexpr Field_Kind Field::TYPE_UINT64;
391 constexpr Field_Kind Field::TYPE_INT32;
392 constexpr Field_Kind Field::TYPE_FIXED64;
393 constexpr Field_Kind Field::TYPE_FIXED32;
394 constexpr Field_Kind Field::TYPE_BOOL;
395 constexpr Field_Kind Field::TYPE_STRING;
396 constexpr Field_Kind Field::TYPE_GROUP;
397 constexpr Field_Kind Field::TYPE_MESSAGE;
398 constexpr Field_Kind Field::TYPE_BYTES;
399 constexpr Field_Kind Field::TYPE_UINT32;
400 constexpr Field_Kind Field::TYPE_ENUM;
401 constexpr Field_Kind Field::TYPE_SFIXED32;
402 constexpr Field_Kind Field::TYPE_SFIXED64;
403 constexpr Field_Kind Field::TYPE_SINT32;
404 constexpr Field_Kind Field::TYPE_SINT64;
405 constexpr Field_Kind Field::Kind_MIN;
406 constexpr Field_Kind Field::Kind_MAX;
407 constexpr int Field::Kind_ARRAYSIZE;
408
409 #endif // (__cplusplus < 201703) &&
410 // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
Field_Cardinality_descriptor()411 const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor() {
412 ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
413 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[1];
414 }
415 PROTOBUF_CONSTINIT const uint32_t Field_Cardinality_internal_data_[] = {
416 262144u, 0u, };
Field_Cardinality_IsValid(int value)417 bool Field_Cardinality_IsValid(int value) {
418 return 0 <= value && value <= 3;
419 }
420 #if (__cplusplus < 201703) && \
421 (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
422
423 constexpr Field_Cardinality Field::CARDINALITY_UNKNOWN;
424 constexpr Field_Cardinality Field::CARDINALITY_OPTIONAL;
425 constexpr Field_Cardinality Field::CARDINALITY_REQUIRED;
426 constexpr Field_Cardinality Field::CARDINALITY_REPEATED;
427 constexpr Field_Cardinality Field::Cardinality_MIN;
428 constexpr Field_Cardinality Field::Cardinality_MAX;
429 constexpr int Field::Cardinality_ARRAYSIZE;
430
431 #endif // (__cplusplus < 201703) &&
432 // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
Syntax_descriptor()433 const ::google::protobuf::EnumDescriptor* Syntax_descriptor() {
434 ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
435 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[2];
436 }
437 PROTOBUF_CONSTINIT const uint32_t Syntax_internal_data_[] = {
438 196608u, 0u, };
Syntax_IsValid(int value)439 bool Syntax_IsValid(int value) {
440 return 0 <= value && value <= 2;
441 }
442 // ===================================================================
443
444 class Type::_Internal {
445 public:
446 using HasBits =
447 decltype(std::declval<Type>()._impl_._has_bits_);
448 static constexpr ::int32_t kHasBitsOffset =
449 8 * PROTOBUF_FIELD_OFFSET(Type, _impl_._has_bits_);
450 };
451
clear_source_context()452 void Type::clear_source_context() {
453 ::google::protobuf::internal::TSanWrite(&_impl_);
454 if (_impl_.source_context_ != nullptr) _impl_.source_context_->Clear();
455 _impl_._has_bits_[0] &= ~0x00000001u;
456 }
Type(::google::protobuf::Arena * arena)457 Type::Type(::google::protobuf::Arena* arena)
458 #if defined(PROTOBUF_CUSTOM_VTABLE)
459 : ::google::protobuf::Message(arena, _class_data_.base()) {
460 #else // PROTOBUF_CUSTOM_VTABLE
461 : ::google::protobuf::Message(arena) {
462 #endif // PROTOBUF_CUSTOM_VTABLE
463 SharedCtor(arena);
464 // @@protoc_insertion_point(arena_constructor:google.protobuf.Type)
465 }
466 inline PROTOBUF_NDEBUG_INLINE Type::Impl_::Impl_(
467 ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
468 const Impl_& from, const ::google::protobuf::Type& from_msg)
469 : _has_bits_{from._has_bits_},
470 _cached_size_{0},
471 fields_{visibility, arena, from.fields_},
472 oneofs_{visibility, arena, from.oneofs_},
473 options_{visibility, arena, from.options_},
474 name_(arena, from.name_),
475 edition_(arena, from.edition_) {}
476
477 Type::Type(
478 ::google::protobuf::Arena* arena,
479 const Type& from)
480 #if defined(PROTOBUF_CUSTOM_VTABLE)
481 : ::google::protobuf::Message(arena, _class_data_.base()) {
482 #else // PROTOBUF_CUSTOM_VTABLE
483 : ::google::protobuf::Message(arena) {
484 #endif // PROTOBUF_CUSTOM_VTABLE
485 Type* const _this = this;
486 (void)_this;
487 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
488 from._internal_metadata_);
489 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
490 ::uint32_t cached_has_bits = _impl_._has_bits_[0];
491 _impl_.source_context_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::google::protobuf::SourceContext>(
492 arena, *from._impl_.source_context_)
493 : nullptr;
494 _impl_.syntax_ = from._impl_.syntax_;
495
496 // @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
497 }
498 inline PROTOBUF_NDEBUG_INLINE Type::Impl_::Impl_(
499 ::google::protobuf::internal::InternalVisibility visibility,
500 ::google::protobuf::Arena* arena)
501 : _cached_size_{0},
502 fields_{visibility, arena},
503 oneofs_{visibility, arena},
504 options_{visibility, arena},
505 name_(arena),
506 edition_(arena) {}
507
508 inline void Type::SharedCtor(::_pb::Arena* arena) {
509 new (&_impl_) Impl_(internal_visibility(), arena);
510 ::memset(reinterpret_cast<char *>(&_impl_) +
511 offsetof(Impl_, source_context_),
512 0,
513 offsetof(Impl_, syntax_) -
514 offsetof(Impl_, source_context_) +
515 sizeof(Impl_::syntax_));
516 }
517 Type::~Type() {
518 // @@protoc_insertion_point(destructor:google.protobuf.Type)
519 SharedDtor(*this);
520 }
521 inline void Type::SharedDtor(MessageLite& self) {
522 Type& this_ = static_cast<Type&>(self);
523 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
524 ABSL_DCHECK(this_.GetArena() == nullptr);
525 this_._impl_.name_.Destroy();
526 this_._impl_.edition_.Destroy();
527 delete this_._impl_.source_context_;
528 this_._impl_.~Impl_();
529 }
530
531 inline void* Type::PlacementNew_(const void*, void* mem,
532 ::google::protobuf::Arena* arena) {
533 return ::new (mem) Type(arena);
534 }
535 constexpr auto Type::InternalNewImpl_() {
536 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
537 PROTOBUF_FIELD_OFFSET(Type, _impl_.fields_) +
538 decltype(Type::_impl_.fields_)::
539 InternalGetArenaOffset(
540 ::google::protobuf::Message::internal_visibility()),
541 PROTOBUF_FIELD_OFFSET(Type, _impl_.oneofs_) +
542 decltype(Type::_impl_.oneofs_)::
543 InternalGetArenaOffset(
544 ::google::protobuf::Message::internal_visibility()),
545 PROTOBUF_FIELD_OFFSET(Type, _impl_.options_) +
546 decltype(Type::_impl_.options_)::
547 InternalGetArenaOffset(
548 ::google::protobuf::Message::internal_visibility()),
549 });
550 if (arena_bits.has_value()) {
551 return ::google::protobuf::internal::MessageCreator::CopyInit(
552 sizeof(Type), alignof(Type), *arena_bits);
553 } else {
554 return ::google::protobuf::internal::MessageCreator(&Type::PlacementNew_,
555 sizeof(Type),
556 alignof(Type));
557 }
558 }
559 PROTOBUF_CONSTINIT
560 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
561 const ::google::protobuf::internal::ClassDataFull Type::_class_data_ = {
562 ::google::protobuf::internal::ClassData{
563 &_Type_default_instance_._instance,
564 &_table_.header,
565 nullptr, // OnDemandRegisterArenaDtor
566 nullptr, // IsInitialized
567 &Type::MergeImpl,
568 ::google::protobuf::Message::GetNewImpl<Type>(),
569 #if defined(PROTOBUF_CUSTOM_VTABLE)
570 &Type::SharedDtor,
571 ::google::protobuf::Message::GetClearImpl<Type>(), &Type::ByteSizeLong,
572 &Type::_InternalSerialize,
573 #endif // PROTOBUF_CUSTOM_VTABLE
574 PROTOBUF_FIELD_OFFSET(Type, _impl_._cached_size_),
575 false,
576 },
577 &Type::kDescriptorMethods,
578 &descriptor_table_google_2fprotobuf_2ftype_2eproto,
579 nullptr, // tracker
580 };
581 const ::google::protobuf::internal::ClassData* Type::GetClassData() const {
582 ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
583 ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
584 return _class_data_.base();
585 }
586 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
587 const ::_pbi::TcParseTable<3, 7, 3, 46, 2> Type::_table_ = {
588 {
589 PROTOBUF_FIELD_OFFSET(Type, _impl_._has_bits_),
590 0, // no _extensions_
591 7, 56, // max_field_number, fast_idx_mask
592 offsetof(decltype(_table_), field_lookup_table),
593 4294967168, // skipmap
594 offsetof(decltype(_table_), field_entries),
595 7, // num_field_entries
596 3, // num_aux_entries
597 offsetof(decltype(_table_), aux_entries),
598 _class_data_.base(),
599 nullptr, // post_loop_handler
600 ::_pbi::TcParser::GenericFallback, // fallback
601 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
602 ::_pbi::TcParser::GetTable<::google::protobuf::Type>(), // to_prefetch
603 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
604 }, {{
605 {::_pbi::TcParser::MiniParse, {}},
606 // string name = 1;
607 {::_pbi::TcParser::FastUS1,
608 {10, 63, 0, PROTOBUF_FIELD_OFFSET(Type, _impl_.name_)}},
609 // repeated .google.protobuf.Field fields = 2;
610 {::_pbi::TcParser::FastMtR1,
611 {18, 63, 0, PROTOBUF_FIELD_OFFSET(Type, _impl_.fields_)}},
612 // repeated string oneofs = 3;
613 {::_pbi::TcParser::FastUR1,
614 {26, 63, 0, PROTOBUF_FIELD_OFFSET(Type, _impl_.oneofs_)}},
615 // repeated .google.protobuf.Option options = 4;
616 {::_pbi::TcParser::FastMtR1,
617 {34, 63, 1, PROTOBUF_FIELD_OFFSET(Type, _impl_.options_)}},
618 // .google.protobuf.SourceContext source_context = 5;
619 {::_pbi::TcParser::FastMtS1,
620 {42, 0, 2, PROTOBUF_FIELD_OFFSET(Type, _impl_.source_context_)}},
621 // .google.protobuf.Syntax syntax = 6;
622 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Type, _impl_.syntax_), 63>(),
623 {48, 63, 0, PROTOBUF_FIELD_OFFSET(Type, _impl_.syntax_)}},
624 // string edition = 7;
625 {::_pbi::TcParser::FastUS1,
626 {58, 63, 0, PROTOBUF_FIELD_OFFSET(Type, _impl_.edition_)}},
627 }}, {{
628 65535, 65535
629 }}, {{
630 // string name = 1;
631 {PROTOBUF_FIELD_OFFSET(Type, _impl_.name_), -1, 0,
632 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
633 // repeated .google.protobuf.Field fields = 2;
634 {PROTOBUF_FIELD_OFFSET(Type, _impl_.fields_), -1, 0,
635 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
636 // repeated string oneofs = 3;
637 {PROTOBUF_FIELD_OFFSET(Type, _impl_.oneofs_), -1, 0,
638 (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
639 // repeated .google.protobuf.Option options = 4;
640 {PROTOBUF_FIELD_OFFSET(Type, _impl_.options_), -1, 1,
641 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
642 // .google.protobuf.SourceContext source_context = 5;
643 {PROTOBUF_FIELD_OFFSET(Type, _impl_.source_context_), _Internal::kHasBitsOffset + 0, 2,
644 (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
645 // .google.protobuf.Syntax syntax = 6;
646 {PROTOBUF_FIELD_OFFSET(Type, _impl_.syntax_), -1, 0,
647 (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)},
648 // string edition = 7;
649 {PROTOBUF_FIELD_OFFSET(Type, _impl_.edition_), -1, 0,
650 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
651 }}, {{
652 {::_pbi::TcParser::GetTable<::google::protobuf::Field>()},
653 {::_pbi::TcParser::GetTable<::google::protobuf::Option>()},
654 {::_pbi::TcParser::GetTable<::google::protobuf::SourceContext>()},
655 }}, {{
656 "\24\4\0\6\0\0\0\7"
657 "google.protobuf.Type"
658 "name"
659 "oneofs"
660 "edition"
661 }},
662 };
663
664 PROTOBUF_NOINLINE void Type::Clear() {
665 // @@protoc_insertion_point(message_clear_start:google.protobuf.Type)
666 ::google::protobuf::internal::TSanWrite(&_impl_);
667 ::uint32_t cached_has_bits = 0;
668 // Prevent compiler warnings about cached_has_bits being unused
669 (void) cached_has_bits;
670
671 _impl_.fields_.Clear();
672 _impl_.oneofs_.Clear();
673 _impl_.options_.Clear();
674 _impl_.name_.ClearToEmpty();
675 _impl_.edition_.ClearToEmpty();
676 cached_has_bits = _impl_._has_bits_[0];
677 if (cached_has_bits & 0x00000001u) {
678 ABSL_DCHECK(_impl_.source_context_ != nullptr);
679 _impl_.source_context_->Clear();
680 }
681 _impl_.syntax_ = 0;
682 _impl_._has_bits_.Clear();
683 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
684 }
685
686 #if defined(PROTOBUF_CUSTOM_VTABLE)
687 ::uint8_t* Type::_InternalSerialize(
688 const MessageLite& base, ::uint8_t* target,
689 ::google::protobuf::io::EpsCopyOutputStream* stream) {
690 const Type& this_ = static_cast<const Type&>(base);
691 #else // PROTOBUF_CUSTOM_VTABLE
692 ::uint8_t* Type::_InternalSerialize(
693 ::uint8_t* target,
694 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
695 const Type& this_ = *this;
696 #endif // PROTOBUF_CUSTOM_VTABLE
697 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
698 ::uint32_t cached_has_bits = 0;
699 (void)cached_has_bits;
700
701 // string name = 1;
702 if (!this_._internal_name().empty()) {
703 const std::string& _s = this_._internal_name();
704 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
705 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.name");
706 target = stream->WriteStringMaybeAliased(1, _s, target);
707 }
708
709 // repeated .google.protobuf.Field fields = 2;
710 for (unsigned i = 0, n = static_cast<unsigned>(
711 this_._internal_fields_size());
712 i < n; i++) {
713 const auto& repfield = this_._internal_fields().Get(i);
714 target =
715 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
716 2, repfield, repfield.GetCachedSize(),
717 target, stream);
718 }
719
720 // repeated string oneofs = 3;
721 for (int i = 0, n = this_._internal_oneofs_size(); i < n; ++i) {
722 const auto& s = this_._internal_oneofs().Get(i);
723 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
724 s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.oneofs");
725 target = stream->WriteString(3, s, target);
726 }
727
728 // repeated .google.protobuf.Option options = 4;
729 for (unsigned i = 0, n = static_cast<unsigned>(
730 this_._internal_options_size());
731 i < n; i++) {
732 const auto& repfield = this_._internal_options().Get(i);
733 target =
734 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
735 4, repfield, repfield.GetCachedSize(),
736 target, stream);
737 }
738
739 cached_has_bits = this_._impl_._has_bits_[0];
740 // .google.protobuf.SourceContext source_context = 5;
741 if (cached_has_bits & 0x00000001u) {
742 target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
743 5, *this_._impl_.source_context_, this_._impl_.source_context_->GetCachedSize(), target,
744 stream);
745 }
746
747 // .google.protobuf.Syntax syntax = 6;
748 if (this_._internal_syntax() != 0) {
749 target = stream->EnsureSpace(target);
750 target = ::_pbi::WireFormatLite::WriteEnumToArray(
751 6, this_._internal_syntax(), target);
752 }
753
754 // string edition = 7;
755 if (!this_._internal_edition().empty()) {
756 const std::string& _s = this_._internal_edition();
757 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
758 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.edition");
759 target = stream->WriteStringMaybeAliased(7, _s, target);
760 }
761
762 if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
763 target =
764 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
765 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
766 }
767 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type)
768 return target;
769 }
770
771 #if defined(PROTOBUF_CUSTOM_VTABLE)
772 ::size_t Type::ByteSizeLong(const MessageLite& base) {
773 const Type& this_ = static_cast<const Type&>(base);
774 #else // PROTOBUF_CUSTOM_VTABLE
775 ::size_t Type::ByteSizeLong() const {
776 const Type& this_ = *this;
777 #endif // PROTOBUF_CUSTOM_VTABLE
778 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type)
779 ::size_t total_size = 0;
780
781 ::uint32_t cached_has_bits = 0;
782 // Prevent compiler warnings about cached_has_bits being unused
783 (void)cached_has_bits;
784
785 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
786 {
787 // repeated .google.protobuf.Field fields = 2;
788 {
789 total_size += 1UL * this_._internal_fields_size();
790 for (const auto& msg : this_._internal_fields()) {
791 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
792 }
793 }
794 // repeated string oneofs = 3;
795 {
796 total_size +=
797 1 * ::google::protobuf::internal::FromIntSize(this_._internal_oneofs().size());
798 for (int i = 0, n = this_._internal_oneofs().size(); i < n; ++i) {
799 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
800 this_._internal_oneofs().Get(i));
801 }
802 }
803 // repeated .google.protobuf.Option options = 4;
804 {
805 total_size += 1UL * this_._internal_options_size();
806 for (const auto& msg : this_._internal_options()) {
807 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
808 }
809 }
810 }
811 {
812 // string name = 1;
813 if (!this_._internal_name().empty()) {
814 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
815 this_._internal_name());
816 }
817 // string edition = 7;
818 if (!this_._internal_edition().empty()) {
819 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
820 this_._internal_edition());
821 }
822 }
823 {
824 // .google.protobuf.SourceContext source_context = 5;
825 cached_has_bits = this_._impl_._has_bits_[0];
826 if (cached_has_bits & 0x00000001u) {
827 total_size += 1 +
828 ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.source_context_);
829 }
830 }
831 {
832 // .google.protobuf.Syntax syntax = 6;
833 if (this_._internal_syntax() != 0) {
834 total_size += 1 +
835 ::_pbi::WireFormatLite::EnumSize(this_._internal_syntax());
836 }
837 }
838 return this_.MaybeComputeUnknownFieldsSize(total_size,
839 &this_._impl_._cached_size_);
840 }
841
842 void Type::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
843 auto* const _this = static_cast<Type*>(&to_msg);
844 auto& from = static_cast<const Type&>(from_msg);
845 ::google::protobuf::Arena* arena = _this->GetArena();
846 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
847 ABSL_DCHECK_NE(&from, _this);
848 ::uint32_t cached_has_bits = 0;
849 (void) cached_has_bits;
850
851 _this->_internal_mutable_fields()->MergeFrom(
852 from._internal_fields());
853 _this->_internal_mutable_oneofs()->MergeFrom(from._internal_oneofs());
854 _this->_internal_mutable_options()->MergeFrom(
855 from._internal_options());
856 if (!from._internal_name().empty()) {
857 _this->_internal_set_name(from._internal_name());
858 }
859 if (!from._internal_edition().empty()) {
860 _this->_internal_set_edition(from._internal_edition());
861 }
862 cached_has_bits = from._impl_._has_bits_[0];
863 if (cached_has_bits & 0x00000001u) {
864 ABSL_DCHECK(from._impl_.source_context_ != nullptr);
865 if (_this->_impl_.source_context_ == nullptr) {
866 _this->_impl_.source_context_ =
867 ::google::protobuf::Message::CopyConstruct<::google::protobuf::SourceContext>(arena, *from._impl_.source_context_);
868 } else {
869 _this->_impl_.source_context_->MergeFrom(*from._impl_.source_context_);
870 }
871 }
872 if (from._internal_syntax() != 0) {
873 _this->_impl_.syntax_ = from._impl_.syntax_;
874 }
875 _this->_impl_._has_bits_[0] |= cached_has_bits;
876 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
877 }
878
879 void Type::CopyFrom(const Type& from) {
880 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Type)
881 if (&from == this) return;
882 Clear();
883 MergeFrom(from);
884 }
885
886
887 void Type::InternalSwap(Type* PROTOBUF_RESTRICT other) {
888 using std::swap;
889 auto* arena = GetArena();
890 ABSL_DCHECK_EQ(arena, other->GetArena());
891 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
892 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
893 _impl_.fields_.InternalSwap(&other->_impl_.fields_);
894 _impl_.oneofs_.InternalSwap(&other->_impl_.oneofs_);
895 _impl_.options_.InternalSwap(&other->_impl_.options_);
896 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
897 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.edition_, &other->_impl_.edition_, arena);
898 ::google::protobuf::internal::memswap<
899 PROTOBUF_FIELD_OFFSET(Type, _impl_.syntax_)
900 + sizeof(Type::_impl_.syntax_)
901 - PROTOBUF_FIELD_OFFSET(Type, _impl_.source_context_)>(
902 reinterpret_cast<char*>(&_impl_.source_context_),
903 reinterpret_cast<char*>(&other->_impl_.source_context_));
904 }
905
906 ::google::protobuf::Metadata Type::GetMetadata() const {
907 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
908 }
909 // ===================================================================
910
911 class Field::_Internal {
912 public:
913 };
914
915 Field::Field(::google::protobuf::Arena* arena)
916 #if defined(PROTOBUF_CUSTOM_VTABLE)
917 : ::google::protobuf::Message(arena, _class_data_.base()) {
918 #else // PROTOBUF_CUSTOM_VTABLE
919 : ::google::protobuf::Message(arena) {
920 #endif // PROTOBUF_CUSTOM_VTABLE
921 SharedCtor(arena);
922 // @@protoc_insertion_point(arena_constructor:google.protobuf.Field)
923 }
924 inline PROTOBUF_NDEBUG_INLINE Field::Impl_::Impl_(
925 ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
926 const Impl_& from, const ::google::protobuf::Field& from_msg)
927 : options_{visibility, arena, from.options_},
928 name_(arena, from.name_),
929 type_url_(arena, from.type_url_),
930 json_name_(arena, from.json_name_),
931 default_value_(arena, from.default_value_),
932 _cached_size_{0} {}
933
934 Field::Field(
935 ::google::protobuf::Arena* arena,
936 const Field& from)
937 #if defined(PROTOBUF_CUSTOM_VTABLE)
938 : ::google::protobuf::Message(arena, _class_data_.base()) {
939 #else // PROTOBUF_CUSTOM_VTABLE
940 : ::google::protobuf::Message(arena) {
941 #endif // PROTOBUF_CUSTOM_VTABLE
942 Field* const _this = this;
943 (void)_this;
944 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
945 from._internal_metadata_);
946 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
947 ::memcpy(reinterpret_cast<char *>(&_impl_) +
948 offsetof(Impl_, kind_),
949 reinterpret_cast<const char *>(&from._impl_) +
950 offsetof(Impl_, kind_),
951 offsetof(Impl_, packed_) -
952 offsetof(Impl_, kind_) +
953 sizeof(Impl_::packed_));
954
955 // @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
956 }
957 inline PROTOBUF_NDEBUG_INLINE Field::Impl_::Impl_(
958 ::google::protobuf::internal::InternalVisibility visibility,
959 ::google::protobuf::Arena* arena)
960 : options_{visibility, arena},
961 name_(arena),
962 type_url_(arena),
963 json_name_(arena),
964 default_value_(arena),
965 _cached_size_{0} {}
966
967 inline void Field::SharedCtor(::_pb::Arena* arena) {
968 new (&_impl_) Impl_(internal_visibility(), arena);
969 ::memset(reinterpret_cast<char *>(&_impl_) +
970 offsetof(Impl_, kind_),
971 0,
972 offsetof(Impl_, packed_) -
973 offsetof(Impl_, kind_) +
974 sizeof(Impl_::packed_));
975 }
976 Field::~Field() {
977 // @@protoc_insertion_point(destructor:google.protobuf.Field)
978 SharedDtor(*this);
979 }
980 inline void Field::SharedDtor(MessageLite& self) {
981 Field& this_ = static_cast<Field&>(self);
982 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
983 ABSL_DCHECK(this_.GetArena() == nullptr);
984 this_._impl_.name_.Destroy();
985 this_._impl_.type_url_.Destroy();
986 this_._impl_.json_name_.Destroy();
987 this_._impl_.default_value_.Destroy();
988 this_._impl_.~Impl_();
989 }
990
991 inline void* Field::PlacementNew_(const void*, void* mem,
992 ::google::protobuf::Arena* arena) {
993 return ::new (mem) Field(arena);
994 }
995 constexpr auto Field::InternalNewImpl_() {
996 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
997 PROTOBUF_FIELD_OFFSET(Field, _impl_.options_) +
998 decltype(Field::_impl_.options_)::
999 InternalGetArenaOffset(
1000 ::google::protobuf::Message::internal_visibility()),
1001 });
1002 if (arena_bits.has_value()) {
1003 return ::google::protobuf::internal::MessageCreator::CopyInit(
1004 sizeof(Field), alignof(Field), *arena_bits);
1005 } else {
1006 return ::google::protobuf::internal::MessageCreator(&Field::PlacementNew_,
1007 sizeof(Field),
1008 alignof(Field));
1009 }
1010 }
1011 PROTOBUF_CONSTINIT
1012 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1013 const ::google::protobuf::internal::ClassDataFull Field::_class_data_ = {
1014 ::google::protobuf::internal::ClassData{
1015 &_Field_default_instance_._instance,
1016 &_table_.header,
1017 nullptr, // OnDemandRegisterArenaDtor
1018 nullptr, // IsInitialized
1019 &Field::MergeImpl,
1020 ::google::protobuf::Message::GetNewImpl<Field>(),
1021 #if defined(PROTOBUF_CUSTOM_VTABLE)
1022 &Field::SharedDtor,
1023 ::google::protobuf::Message::GetClearImpl<Field>(), &Field::ByteSizeLong,
1024 &Field::_InternalSerialize,
1025 #endif // PROTOBUF_CUSTOM_VTABLE
1026 PROTOBUF_FIELD_OFFSET(Field, _impl_._cached_size_),
1027 false,
1028 },
1029 &Field::kDescriptorMethods,
1030 &descriptor_table_google_2fprotobuf_2ftype_2eproto,
1031 nullptr, // tracker
1032 };
1033 const ::google::protobuf::internal::ClassData* Field::GetClassData() const {
1034 ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
1035 ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
1036 return _class_data_.base();
1037 }
1038 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1039 const ::_pbi::TcParseTable<4, 10, 1, 72, 2> Field::_table_ = {
1040 {
1041 0, // no _has_bits_
1042 0, // no _extensions_
1043 11, 120, // max_field_number, fast_idx_mask
1044 offsetof(decltype(_table_), field_lookup_table),
1045 4294965264, // skipmap
1046 offsetof(decltype(_table_), field_entries),
1047 10, // num_field_entries
1048 1, // num_aux_entries
1049 offsetof(decltype(_table_), aux_entries),
1050 _class_data_.base(),
1051 nullptr, // post_loop_handler
1052 ::_pbi::TcParser::GenericFallback, // fallback
1053 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1054 ::_pbi::TcParser::GetTable<::google::protobuf::Field>(), // to_prefetch
1055 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
1056 }, {{
1057 {::_pbi::TcParser::MiniParse, {}},
1058 // .google.protobuf.Field.Kind kind = 1;
1059 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Field, _impl_.kind_), 63>(),
1060 {8, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.kind_)}},
1061 // .google.protobuf.Field.Cardinality cardinality = 2;
1062 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Field, _impl_.cardinality_), 63>(),
1063 {16, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.cardinality_)}},
1064 // int32 number = 3;
1065 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Field, _impl_.number_), 63>(),
1066 {24, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.number_)}},
1067 // string name = 4;
1068 {::_pbi::TcParser::FastUS1,
1069 {34, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.name_)}},
1070 {::_pbi::TcParser::MiniParse, {}},
1071 // string type_url = 6;
1072 {::_pbi::TcParser::FastUS1,
1073 {50, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.type_url_)}},
1074 // int32 oneof_index = 7;
1075 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Field, _impl_.oneof_index_), 63>(),
1076 {56, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.oneof_index_)}},
1077 // bool packed = 8;
1078 {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(Field, _impl_.packed_), 63>(),
1079 {64, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.packed_)}},
1080 // repeated .google.protobuf.Option options = 9;
1081 {::_pbi::TcParser::FastMtR1,
1082 {74, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.options_)}},
1083 // string json_name = 10;
1084 {::_pbi::TcParser::FastUS1,
1085 {82, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.json_name_)}},
1086 // string default_value = 11;
1087 {::_pbi::TcParser::FastUS1,
1088 {90, 63, 0, PROTOBUF_FIELD_OFFSET(Field, _impl_.default_value_)}},
1089 {::_pbi::TcParser::MiniParse, {}},
1090 {::_pbi::TcParser::MiniParse, {}},
1091 {::_pbi::TcParser::MiniParse, {}},
1092 {::_pbi::TcParser::MiniParse, {}},
1093 }}, {{
1094 65535, 65535
1095 }}, {{
1096 // .google.protobuf.Field.Kind kind = 1;
1097 {PROTOBUF_FIELD_OFFSET(Field, _impl_.kind_), 0, 0,
1098 (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)},
1099 // .google.protobuf.Field.Cardinality cardinality = 2;
1100 {PROTOBUF_FIELD_OFFSET(Field, _impl_.cardinality_), 0, 0,
1101 (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)},
1102 // int32 number = 3;
1103 {PROTOBUF_FIELD_OFFSET(Field, _impl_.number_), 0, 0,
1104 (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
1105 // string name = 4;
1106 {PROTOBUF_FIELD_OFFSET(Field, _impl_.name_), 0, 0,
1107 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
1108 // string type_url = 6;
1109 {PROTOBUF_FIELD_OFFSET(Field, _impl_.type_url_), 0, 0,
1110 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
1111 // int32 oneof_index = 7;
1112 {PROTOBUF_FIELD_OFFSET(Field, _impl_.oneof_index_), 0, 0,
1113 (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
1114 // bool packed = 8;
1115 {PROTOBUF_FIELD_OFFSET(Field, _impl_.packed_), 0, 0,
1116 (0 | ::_fl::kFcSingular | ::_fl::kBool)},
1117 // repeated .google.protobuf.Option options = 9;
1118 {PROTOBUF_FIELD_OFFSET(Field, _impl_.options_), 0, 0,
1119 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
1120 // string json_name = 10;
1121 {PROTOBUF_FIELD_OFFSET(Field, _impl_.json_name_), 0, 0,
1122 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
1123 // string default_value = 11;
1124 {PROTOBUF_FIELD_OFFSET(Field, _impl_.default_value_), 0, 0,
1125 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
1126 }}, {{
1127 {::_pbi::TcParser::GetTable<::google::protobuf::Option>()},
1128 }}, {{
1129 "\25\0\0\0\4\10\0\0\0\11\15\0\0\0\0\0"
1130 "google.protobuf.Field"
1131 "name"
1132 "type_url"
1133 "json_name"
1134 "default_value"
1135 }},
1136 };
1137
1138 PROTOBUF_NOINLINE void Field::Clear() {
1139 // @@protoc_insertion_point(message_clear_start:google.protobuf.Field)
1140 ::google::protobuf::internal::TSanWrite(&_impl_);
1141 ::uint32_t cached_has_bits = 0;
1142 // Prevent compiler warnings about cached_has_bits being unused
1143 (void) cached_has_bits;
1144
1145 _impl_.options_.Clear();
1146 _impl_.name_.ClearToEmpty();
1147 _impl_.type_url_.ClearToEmpty();
1148 _impl_.json_name_.ClearToEmpty();
1149 _impl_.default_value_.ClearToEmpty();
1150 ::memset(&_impl_.kind_, 0, static_cast<::size_t>(
1151 reinterpret_cast<char*>(&_impl_.packed_) -
1152 reinterpret_cast<char*>(&_impl_.kind_)) + sizeof(_impl_.packed_));
1153 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1154 }
1155
1156 #if defined(PROTOBUF_CUSTOM_VTABLE)
1157 ::uint8_t* Field::_InternalSerialize(
1158 const MessageLite& base, ::uint8_t* target,
1159 ::google::protobuf::io::EpsCopyOutputStream* stream) {
1160 const Field& this_ = static_cast<const Field&>(base);
1161 #else // PROTOBUF_CUSTOM_VTABLE
1162 ::uint8_t* Field::_InternalSerialize(
1163 ::uint8_t* target,
1164 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
1165 const Field& this_ = *this;
1166 #endif // PROTOBUF_CUSTOM_VTABLE
1167 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field)
1168 ::uint32_t cached_has_bits = 0;
1169 (void)cached_has_bits;
1170
1171 // .google.protobuf.Field.Kind kind = 1;
1172 if (this_._internal_kind() != 0) {
1173 target = stream->EnsureSpace(target);
1174 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1175 1, this_._internal_kind(), target);
1176 }
1177
1178 // .google.protobuf.Field.Cardinality cardinality = 2;
1179 if (this_._internal_cardinality() != 0) {
1180 target = stream->EnsureSpace(target);
1181 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1182 2, this_._internal_cardinality(), target);
1183 }
1184
1185 // int32 number = 3;
1186 if (this_._internal_number() != 0) {
1187 target = ::google::protobuf::internal::WireFormatLite::
1188 WriteInt32ToArrayWithField<3>(
1189 stream, this_._internal_number(), target);
1190 }
1191
1192 // string name = 4;
1193 if (!this_._internal_name().empty()) {
1194 const std::string& _s = this_._internal_name();
1195 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1196 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.name");
1197 target = stream->WriteStringMaybeAliased(4, _s, target);
1198 }
1199
1200 // string type_url = 6;
1201 if (!this_._internal_type_url().empty()) {
1202 const std::string& _s = this_._internal_type_url();
1203 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1204 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.type_url");
1205 target = stream->WriteStringMaybeAliased(6, _s, target);
1206 }
1207
1208 // int32 oneof_index = 7;
1209 if (this_._internal_oneof_index() != 0) {
1210 target = ::google::protobuf::internal::WireFormatLite::
1211 WriteInt32ToArrayWithField<7>(
1212 stream, this_._internal_oneof_index(), target);
1213 }
1214
1215 // bool packed = 8;
1216 if (this_._internal_packed() != 0) {
1217 target = stream->EnsureSpace(target);
1218 target = ::_pbi::WireFormatLite::WriteBoolToArray(
1219 8, this_._internal_packed(), target);
1220 }
1221
1222 // repeated .google.protobuf.Option options = 9;
1223 for (unsigned i = 0, n = static_cast<unsigned>(
1224 this_._internal_options_size());
1225 i < n; i++) {
1226 const auto& repfield = this_._internal_options().Get(i);
1227 target =
1228 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1229 9, repfield, repfield.GetCachedSize(),
1230 target, stream);
1231 }
1232
1233 // string json_name = 10;
1234 if (!this_._internal_json_name().empty()) {
1235 const std::string& _s = this_._internal_json_name();
1236 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1237 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.json_name");
1238 target = stream->WriteStringMaybeAliased(10, _s, target);
1239 }
1240
1241 // string default_value = 11;
1242 if (!this_._internal_default_value().empty()) {
1243 const std::string& _s = this_._internal_default_value();
1244 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1245 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.default_value");
1246 target = stream->WriteStringMaybeAliased(11, _s, target);
1247 }
1248
1249 if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1250 target =
1251 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1252 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1253 }
1254 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field)
1255 return target;
1256 }
1257
1258 #if defined(PROTOBUF_CUSTOM_VTABLE)
1259 ::size_t Field::ByteSizeLong(const MessageLite& base) {
1260 const Field& this_ = static_cast<const Field&>(base);
1261 #else // PROTOBUF_CUSTOM_VTABLE
1262 ::size_t Field::ByteSizeLong() const {
1263 const Field& this_ = *this;
1264 #endif // PROTOBUF_CUSTOM_VTABLE
1265 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field)
1266 ::size_t total_size = 0;
1267
1268 ::uint32_t cached_has_bits = 0;
1269 // Prevent compiler warnings about cached_has_bits being unused
1270 (void)cached_has_bits;
1271
1272 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1273 {
1274 // repeated .google.protobuf.Option options = 9;
1275 {
1276 total_size += 1UL * this_._internal_options_size();
1277 for (const auto& msg : this_._internal_options()) {
1278 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1279 }
1280 }
1281 }
1282 {
1283 // string name = 4;
1284 if (!this_._internal_name().empty()) {
1285 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1286 this_._internal_name());
1287 }
1288 // string type_url = 6;
1289 if (!this_._internal_type_url().empty()) {
1290 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1291 this_._internal_type_url());
1292 }
1293 // string json_name = 10;
1294 if (!this_._internal_json_name().empty()) {
1295 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1296 this_._internal_json_name());
1297 }
1298 // string default_value = 11;
1299 if (!this_._internal_default_value().empty()) {
1300 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1301 this_._internal_default_value());
1302 }
1303 // .google.protobuf.Field.Kind kind = 1;
1304 if (this_._internal_kind() != 0) {
1305 total_size += 1 +
1306 ::_pbi::WireFormatLite::EnumSize(this_._internal_kind());
1307 }
1308 // .google.protobuf.Field.Cardinality cardinality = 2;
1309 if (this_._internal_cardinality() != 0) {
1310 total_size += 1 +
1311 ::_pbi::WireFormatLite::EnumSize(this_._internal_cardinality());
1312 }
1313 // int32 number = 3;
1314 if (this_._internal_number() != 0) {
1315 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
1316 this_._internal_number());
1317 }
1318 // int32 oneof_index = 7;
1319 if (this_._internal_oneof_index() != 0) {
1320 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
1321 this_._internal_oneof_index());
1322 }
1323 // bool packed = 8;
1324 if (this_._internal_packed() != 0) {
1325 total_size += 2;
1326 }
1327 }
1328 return this_.MaybeComputeUnknownFieldsSize(total_size,
1329 &this_._impl_._cached_size_);
1330 }
1331
1332 void Field::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1333 auto* const _this = static_cast<Field*>(&to_msg);
1334 auto& from = static_cast<const Field&>(from_msg);
1335 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
1336 ABSL_DCHECK_NE(&from, _this);
1337 ::uint32_t cached_has_bits = 0;
1338 (void) cached_has_bits;
1339
1340 _this->_internal_mutable_options()->MergeFrom(
1341 from._internal_options());
1342 if (!from._internal_name().empty()) {
1343 _this->_internal_set_name(from._internal_name());
1344 }
1345 if (!from._internal_type_url().empty()) {
1346 _this->_internal_set_type_url(from._internal_type_url());
1347 }
1348 if (!from._internal_json_name().empty()) {
1349 _this->_internal_set_json_name(from._internal_json_name());
1350 }
1351 if (!from._internal_default_value().empty()) {
1352 _this->_internal_set_default_value(from._internal_default_value());
1353 }
1354 if (from._internal_kind() != 0) {
1355 _this->_impl_.kind_ = from._impl_.kind_;
1356 }
1357 if (from._internal_cardinality() != 0) {
1358 _this->_impl_.cardinality_ = from._impl_.cardinality_;
1359 }
1360 if (from._internal_number() != 0) {
1361 _this->_impl_.number_ = from._impl_.number_;
1362 }
1363 if (from._internal_oneof_index() != 0) {
1364 _this->_impl_.oneof_index_ = from._impl_.oneof_index_;
1365 }
1366 if (from._internal_packed() != 0) {
1367 _this->_impl_.packed_ = from._impl_.packed_;
1368 }
1369 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1370 }
1371
1372 void Field::CopyFrom(const Field& from) {
1373 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Field)
1374 if (&from == this) return;
1375 Clear();
1376 MergeFrom(from);
1377 }
1378
1379
1380 void Field::InternalSwap(Field* PROTOBUF_RESTRICT other) {
1381 using std::swap;
1382 auto* arena = GetArena();
1383 ABSL_DCHECK_EQ(arena, other->GetArena());
1384 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1385 _impl_.options_.InternalSwap(&other->_impl_.options_);
1386 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
1387 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.type_url_, &other->_impl_.type_url_, arena);
1388 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.json_name_, &other->_impl_.json_name_, arena);
1389 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.default_value_, &other->_impl_.default_value_, arena);
1390 ::google::protobuf::internal::memswap<
1391 PROTOBUF_FIELD_OFFSET(Field, _impl_.packed_)
1392 + sizeof(Field::_impl_.packed_)
1393 - PROTOBUF_FIELD_OFFSET(Field, _impl_.kind_)>(
1394 reinterpret_cast<char*>(&_impl_.kind_),
1395 reinterpret_cast<char*>(&other->_impl_.kind_));
1396 }
1397
1398 ::google::protobuf::Metadata Field::GetMetadata() const {
1399 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1400 }
1401 // ===================================================================
1402
1403 class Enum::_Internal {
1404 public:
1405 using HasBits =
1406 decltype(std::declval<Enum>()._impl_._has_bits_);
1407 static constexpr ::int32_t kHasBitsOffset =
1408 8 * PROTOBUF_FIELD_OFFSET(Enum, _impl_._has_bits_);
1409 };
1410
1411 void Enum::clear_source_context() {
1412 ::google::protobuf::internal::TSanWrite(&_impl_);
1413 if (_impl_.source_context_ != nullptr) _impl_.source_context_->Clear();
1414 _impl_._has_bits_[0] &= ~0x00000001u;
1415 }
1416 Enum::Enum(::google::protobuf::Arena* arena)
1417 #if defined(PROTOBUF_CUSTOM_VTABLE)
1418 : ::google::protobuf::Message(arena, _class_data_.base()) {
1419 #else // PROTOBUF_CUSTOM_VTABLE
1420 : ::google::protobuf::Message(arena) {
1421 #endif // PROTOBUF_CUSTOM_VTABLE
1422 SharedCtor(arena);
1423 // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum)
1424 }
1425 inline PROTOBUF_NDEBUG_INLINE Enum::Impl_::Impl_(
1426 ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
1427 const Impl_& from, const ::google::protobuf::Enum& from_msg)
1428 : _has_bits_{from._has_bits_},
1429 _cached_size_{0},
1430 enumvalue_{visibility, arena, from.enumvalue_},
1431 options_{visibility, arena, from.options_},
1432 name_(arena, from.name_),
1433 edition_(arena, from.edition_) {}
1434
1435 Enum::Enum(
1436 ::google::protobuf::Arena* arena,
1437 const Enum& from)
1438 #if defined(PROTOBUF_CUSTOM_VTABLE)
1439 : ::google::protobuf::Message(arena, _class_data_.base()) {
1440 #else // PROTOBUF_CUSTOM_VTABLE
1441 : ::google::protobuf::Message(arena) {
1442 #endif // PROTOBUF_CUSTOM_VTABLE
1443 Enum* const _this = this;
1444 (void)_this;
1445 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1446 from._internal_metadata_);
1447 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
1448 ::uint32_t cached_has_bits = _impl_._has_bits_[0];
1449 _impl_.source_context_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::google::protobuf::SourceContext>(
1450 arena, *from._impl_.source_context_)
1451 : nullptr;
1452 _impl_.syntax_ = from._impl_.syntax_;
1453
1454 // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
1455 }
1456 inline PROTOBUF_NDEBUG_INLINE Enum::Impl_::Impl_(
1457 ::google::protobuf::internal::InternalVisibility visibility,
1458 ::google::protobuf::Arena* arena)
1459 : _cached_size_{0},
1460 enumvalue_{visibility, arena},
1461 options_{visibility, arena},
1462 name_(arena),
1463 edition_(arena) {}
1464
1465 inline void Enum::SharedCtor(::_pb::Arena* arena) {
1466 new (&_impl_) Impl_(internal_visibility(), arena);
1467 ::memset(reinterpret_cast<char *>(&_impl_) +
1468 offsetof(Impl_, source_context_),
1469 0,
1470 offsetof(Impl_, syntax_) -
1471 offsetof(Impl_, source_context_) +
1472 sizeof(Impl_::syntax_));
1473 }
1474 Enum::~Enum() {
1475 // @@protoc_insertion_point(destructor:google.protobuf.Enum)
1476 SharedDtor(*this);
1477 }
1478 inline void Enum::SharedDtor(MessageLite& self) {
1479 Enum& this_ = static_cast<Enum&>(self);
1480 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
1481 ABSL_DCHECK(this_.GetArena() == nullptr);
1482 this_._impl_.name_.Destroy();
1483 this_._impl_.edition_.Destroy();
1484 delete this_._impl_.source_context_;
1485 this_._impl_.~Impl_();
1486 }
1487
1488 inline void* Enum::PlacementNew_(const void*, void* mem,
1489 ::google::protobuf::Arena* arena) {
1490 return ::new (mem) Enum(arena);
1491 }
1492 constexpr auto Enum::InternalNewImpl_() {
1493 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
1494 PROTOBUF_FIELD_OFFSET(Enum, _impl_.enumvalue_) +
1495 decltype(Enum::_impl_.enumvalue_)::
1496 InternalGetArenaOffset(
1497 ::google::protobuf::Message::internal_visibility()),
1498 PROTOBUF_FIELD_OFFSET(Enum, _impl_.options_) +
1499 decltype(Enum::_impl_.options_)::
1500 InternalGetArenaOffset(
1501 ::google::protobuf::Message::internal_visibility()),
1502 });
1503 if (arena_bits.has_value()) {
1504 return ::google::protobuf::internal::MessageCreator::CopyInit(
1505 sizeof(Enum), alignof(Enum), *arena_bits);
1506 } else {
1507 return ::google::protobuf::internal::MessageCreator(&Enum::PlacementNew_,
1508 sizeof(Enum),
1509 alignof(Enum));
1510 }
1511 }
1512 PROTOBUF_CONSTINIT
1513 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1514 const ::google::protobuf::internal::ClassDataFull Enum::_class_data_ = {
1515 ::google::protobuf::internal::ClassData{
1516 &_Enum_default_instance_._instance,
1517 &_table_.header,
1518 nullptr, // OnDemandRegisterArenaDtor
1519 nullptr, // IsInitialized
1520 &Enum::MergeImpl,
1521 ::google::protobuf::Message::GetNewImpl<Enum>(),
1522 #if defined(PROTOBUF_CUSTOM_VTABLE)
1523 &Enum::SharedDtor,
1524 ::google::protobuf::Message::GetClearImpl<Enum>(), &Enum::ByteSizeLong,
1525 &Enum::_InternalSerialize,
1526 #endif // PROTOBUF_CUSTOM_VTABLE
1527 PROTOBUF_FIELD_OFFSET(Enum, _impl_._cached_size_),
1528 false,
1529 },
1530 &Enum::kDescriptorMethods,
1531 &descriptor_table_google_2fprotobuf_2ftype_2eproto,
1532 nullptr, // tracker
1533 };
1534 const ::google::protobuf::internal::ClassData* Enum::GetClassData() const {
1535 ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
1536 ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
1537 return _class_data_.base();
1538 }
1539 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1540 const ::_pbi::TcParseTable<3, 6, 3, 40, 2> Enum::_table_ = {
1541 {
1542 PROTOBUF_FIELD_OFFSET(Enum, _impl_._has_bits_),
1543 0, // no _extensions_
1544 6, 56, // max_field_number, fast_idx_mask
1545 offsetof(decltype(_table_), field_lookup_table),
1546 4294967232, // skipmap
1547 offsetof(decltype(_table_), field_entries),
1548 6, // num_field_entries
1549 3, // num_aux_entries
1550 offsetof(decltype(_table_), aux_entries),
1551 _class_data_.base(),
1552 nullptr, // post_loop_handler
1553 ::_pbi::TcParser::GenericFallback, // fallback
1554 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1555 ::_pbi::TcParser::GetTable<::google::protobuf::Enum>(), // to_prefetch
1556 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
1557 }, {{
1558 {::_pbi::TcParser::MiniParse, {}},
1559 // string name = 1;
1560 {::_pbi::TcParser::FastUS1,
1561 {10, 63, 0, PROTOBUF_FIELD_OFFSET(Enum, _impl_.name_)}},
1562 // repeated .google.protobuf.EnumValue enumvalue = 2;
1563 {::_pbi::TcParser::FastMtR1,
1564 {18, 63, 0, PROTOBUF_FIELD_OFFSET(Enum, _impl_.enumvalue_)}},
1565 // repeated .google.protobuf.Option options = 3;
1566 {::_pbi::TcParser::FastMtR1,
1567 {26, 63, 1, PROTOBUF_FIELD_OFFSET(Enum, _impl_.options_)}},
1568 // .google.protobuf.SourceContext source_context = 4;
1569 {::_pbi::TcParser::FastMtS1,
1570 {34, 0, 2, PROTOBUF_FIELD_OFFSET(Enum, _impl_.source_context_)}},
1571 // .google.protobuf.Syntax syntax = 5;
1572 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Enum, _impl_.syntax_), 63>(),
1573 {40, 63, 0, PROTOBUF_FIELD_OFFSET(Enum, _impl_.syntax_)}},
1574 // string edition = 6;
1575 {::_pbi::TcParser::FastUS1,
1576 {50, 63, 0, PROTOBUF_FIELD_OFFSET(Enum, _impl_.edition_)}},
1577 {::_pbi::TcParser::MiniParse, {}},
1578 }}, {{
1579 65535, 65535
1580 }}, {{
1581 // string name = 1;
1582 {PROTOBUF_FIELD_OFFSET(Enum, _impl_.name_), -1, 0,
1583 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
1584 // repeated .google.protobuf.EnumValue enumvalue = 2;
1585 {PROTOBUF_FIELD_OFFSET(Enum, _impl_.enumvalue_), -1, 0,
1586 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
1587 // repeated .google.protobuf.Option options = 3;
1588 {PROTOBUF_FIELD_OFFSET(Enum, _impl_.options_), -1, 1,
1589 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
1590 // .google.protobuf.SourceContext source_context = 4;
1591 {PROTOBUF_FIELD_OFFSET(Enum, _impl_.source_context_), _Internal::kHasBitsOffset + 0, 2,
1592 (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
1593 // .google.protobuf.Syntax syntax = 5;
1594 {PROTOBUF_FIELD_OFFSET(Enum, _impl_.syntax_), -1, 0,
1595 (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)},
1596 // string edition = 6;
1597 {PROTOBUF_FIELD_OFFSET(Enum, _impl_.edition_), -1, 0,
1598 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
1599 }}, {{
1600 {::_pbi::TcParser::GetTable<::google::protobuf::EnumValue>()},
1601 {::_pbi::TcParser::GetTable<::google::protobuf::Option>()},
1602 {::_pbi::TcParser::GetTable<::google::protobuf::SourceContext>()},
1603 }}, {{
1604 "\24\4\0\0\0\0\7\0"
1605 "google.protobuf.Enum"
1606 "name"
1607 "edition"
1608 }},
1609 };
1610
1611 PROTOBUF_NOINLINE void Enum::Clear() {
1612 // @@protoc_insertion_point(message_clear_start:google.protobuf.Enum)
1613 ::google::protobuf::internal::TSanWrite(&_impl_);
1614 ::uint32_t cached_has_bits = 0;
1615 // Prevent compiler warnings about cached_has_bits being unused
1616 (void) cached_has_bits;
1617
1618 _impl_.enumvalue_.Clear();
1619 _impl_.options_.Clear();
1620 _impl_.name_.ClearToEmpty();
1621 _impl_.edition_.ClearToEmpty();
1622 cached_has_bits = _impl_._has_bits_[0];
1623 if (cached_has_bits & 0x00000001u) {
1624 ABSL_DCHECK(_impl_.source_context_ != nullptr);
1625 _impl_.source_context_->Clear();
1626 }
1627 _impl_.syntax_ = 0;
1628 _impl_._has_bits_.Clear();
1629 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1630 }
1631
1632 #if defined(PROTOBUF_CUSTOM_VTABLE)
1633 ::uint8_t* Enum::_InternalSerialize(
1634 const MessageLite& base, ::uint8_t* target,
1635 ::google::protobuf::io::EpsCopyOutputStream* stream) {
1636 const Enum& this_ = static_cast<const Enum&>(base);
1637 #else // PROTOBUF_CUSTOM_VTABLE
1638 ::uint8_t* Enum::_InternalSerialize(
1639 ::uint8_t* target,
1640 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
1641 const Enum& this_ = *this;
1642 #endif // PROTOBUF_CUSTOM_VTABLE
1643 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
1644 ::uint32_t cached_has_bits = 0;
1645 (void)cached_has_bits;
1646
1647 // string name = 1;
1648 if (!this_._internal_name().empty()) {
1649 const std::string& _s = this_._internal_name();
1650 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1651 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.name");
1652 target = stream->WriteStringMaybeAliased(1, _s, target);
1653 }
1654
1655 // repeated .google.protobuf.EnumValue enumvalue = 2;
1656 for (unsigned i = 0, n = static_cast<unsigned>(
1657 this_._internal_enumvalue_size());
1658 i < n; i++) {
1659 const auto& repfield = this_._internal_enumvalue().Get(i);
1660 target =
1661 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1662 2, repfield, repfield.GetCachedSize(),
1663 target, stream);
1664 }
1665
1666 // repeated .google.protobuf.Option options = 3;
1667 for (unsigned i = 0, n = static_cast<unsigned>(
1668 this_._internal_options_size());
1669 i < n; i++) {
1670 const auto& repfield = this_._internal_options().Get(i);
1671 target =
1672 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1673 3, repfield, repfield.GetCachedSize(),
1674 target, stream);
1675 }
1676
1677 cached_has_bits = this_._impl_._has_bits_[0];
1678 // .google.protobuf.SourceContext source_context = 4;
1679 if (cached_has_bits & 0x00000001u) {
1680 target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1681 4, *this_._impl_.source_context_, this_._impl_.source_context_->GetCachedSize(), target,
1682 stream);
1683 }
1684
1685 // .google.protobuf.Syntax syntax = 5;
1686 if (this_._internal_syntax() != 0) {
1687 target = stream->EnsureSpace(target);
1688 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1689 5, this_._internal_syntax(), target);
1690 }
1691
1692 // string edition = 6;
1693 if (!this_._internal_edition().empty()) {
1694 const std::string& _s = this_._internal_edition();
1695 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1696 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.edition");
1697 target = stream->WriteStringMaybeAliased(6, _s, target);
1698 }
1699
1700 if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1701 target =
1702 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1703 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1704 }
1705 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum)
1706 return target;
1707 }
1708
1709 #if defined(PROTOBUF_CUSTOM_VTABLE)
1710 ::size_t Enum::ByteSizeLong(const MessageLite& base) {
1711 const Enum& this_ = static_cast<const Enum&>(base);
1712 #else // PROTOBUF_CUSTOM_VTABLE
1713 ::size_t Enum::ByteSizeLong() const {
1714 const Enum& this_ = *this;
1715 #endif // PROTOBUF_CUSTOM_VTABLE
1716 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum)
1717 ::size_t total_size = 0;
1718
1719 ::uint32_t cached_has_bits = 0;
1720 // Prevent compiler warnings about cached_has_bits being unused
1721 (void)cached_has_bits;
1722
1723 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1724 {
1725 // repeated .google.protobuf.EnumValue enumvalue = 2;
1726 {
1727 total_size += 1UL * this_._internal_enumvalue_size();
1728 for (const auto& msg : this_._internal_enumvalue()) {
1729 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1730 }
1731 }
1732 // repeated .google.protobuf.Option options = 3;
1733 {
1734 total_size += 1UL * this_._internal_options_size();
1735 for (const auto& msg : this_._internal_options()) {
1736 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1737 }
1738 }
1739 }
1740 {
1741 // string name = 1;
1742 if (!this_._internal_name().empty()) {
1743 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1744 this_._internal_name());
1745 }
1746 // string edition = 6;
1747 if (!this_._internal_edition().empty()) {
1748 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1749 this_._internal_edition());
1750 }
1751 }
1752 {
1753 // .google.protobuf.SourceContext source_context = 4;
1754 cached_has_bits = this_._impl_._has_bits_[0];
1755 if (cached_has_bits & 0x00000001u) {
1756 total_size += 1 +
1757 ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.source_context_);
1758 }
1759 }
1760 {
1761 // .google.protobuf.Syntax syntax = 5;
1762 if (this_._internal_syntax() != 0) {
1763 total_size += 1 +
1764 ::_pbi::WireFormatLite::EnumSize(this_._internal_syntax());
1765 }
1766 }
1767 return this_.MaybeComputeUnknownFieldsSize(total_size,
1768 &this_._impl_._cached_size_);
1769 }
1770
1771 void Enum::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1772 auto* const _this = static_cast<Enum*>(&to_msg);
1773 auto& from = static_cast<const Enum&>(from_msg);
1774 ::google::protobuf::Arena* arena = _this->GetArena();
1775 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
1776 ABSL_DCHECK_NE(&from, _this);
1777 ::uint32_t cached_has_bits = 0;
1778 (void) cached_has_bits;
1779
1780 _this->_internal_mutable_enumvalue()->MergeFrom(
1781 from._internal_enumvalue());
1782 _this->_internal_mutable_options()->MergeFrom(
1783 from._internal_options());
1784 if (!from._internal_name().empty()) {
1785 _this->_internal_set_name(from._internal_name());
1786 }
1787 if (!from._internal_edition().empty()) {
1788 _this->_internal_set_edition(from._internal_edition());
1789 }
1790 cached_has_bits = from._impl_._has_bits_[0];
1791 if (cached_has_bits & 0x00000001u) {
1792 ABSL_DCHECK(from._impl_.source_context_ != nullptr);
1793 if (_this->_impl_.source_context_ == nullptr) {
1794 _this->_impl_.source_context_ =
1795 ::google::protobuf::Message::CopyConstruct<::google::protobuf::SourceContext>(arena, *from._impl_.source_context_);
1796 } else {
1797 _this->_impl_.source_context_->MergeFrom(*from._impl_.source_context_);
1798 }
1799 }
1800 if (from._internal_syntax() != 0) {
1801 _this->_impl_.syntax_ = from._impl_.syntax_;
1802 }
1803 _this->_impl_._has_bits_[0] |= cached_has_bits;
1804 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1805 }
1806
1807 void Enum::CopyFrom(const Enum& from) {
1808 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Enum)
1809 if (&from == this) return;
1810 Clear();
1811 MergeFrom(from);
1812 }
1813
1814
1815 void Enum::InternalSwap(Enum* PROTOBUF_RESTRICT other) {
1816 using std::swap;
1817 auto* arena = GetArena();
1818 ABSL_DCHECK_EQ(arena, other->GetArena());
1819 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1820 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1821 _impl_.enumvalue_.InternalSwap(&other->_impl_.enumvalue_);
1822 _impl_.options_.InternalSwap(&other->_impl_.options_);
1823 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
1824 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.edition_, &other->_impl_.edition_, arena);
1825 ::google::protobuf::internal::memswap<
1826 PROTOBUF_FIELD_OFFSET(Enum, _impl_.syntax_)
1827 + sizeof(Enum::_impl_.syntax_)
1828 - PROTOBUF_FIELD_OFFSET(Enum, _impl_.source_context_)>(
1829 reinterpret_cast<char*>(&_impl_.source_context_),
1830 reinterpret_cast<char*>(&other->_impl_.source_context_));
1831 }
1832
1833 ::google::protobuf::Metadata Enum::GetMetadata() const {
1834 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1835 }
1836 // ===================================================================
1837
1838 class EnumValue::_Internal {
1839 public:
1840 };
1841
1842 EnumValue::EnumValue(::google::protobuf::Arena* arena)
1843 #if defined(PROTOBUF_CUSTOM_VTABLE)
1844 : ::google::protobuf::Message(arena, _class_data_.base()) {
1845 #else // PROTOBUF_CUSTOM_VTABLE
1846 : ::google::protobuf::Message(arena) {
1847 #endif // PROTOBUF_CUSTOM_VTABLE
1848 SharedCtor(arena);
1849 // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue)
1850 }
1851 inline PROTOBUF_NDEBUG_INLINE EnumValue::Impl_::Impl_(
1852 ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
1853 const Impl_& from, const ::google::protobuf::EnumValue& from_msg)
1854 : options_{visibility, arena, from.options_},
1855 name_(arena, from.name_),
1856 _cached_size_{0} {}
1857
1858 EnumValue::EnumValue(
1859 ::google::protobuf::Arena* arena,
1860 const EnumValue& from)
1861 #if defined(PROTOBUF_CUSTOM_VTABLE)
1862 : ::google::protobuf::Message(arena, _class_data_.base()) {
1863 #else // PROTOBUF_CUSTOM_VTABLE
1864 : ::google::protobuf::Message(arena) {
1865 #endif // PROTOBUF_CUSTOM_VTABLE
1866 EnumValue* const _this = this;
1867 (void)_this;
1868 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1869 from._internal_metadata_);
1870 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
1871 _impl_.number_ = from._impl_.number_;
1872
1873 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
1874 }
1875 inline PROTOBUF_NDEBUG_INLINE EnumValue::Impl_::Impl_(
1876 ::google::protobuf::internal::InternalVisibility visibility,
1877 ::google::protobuf::Arena* arena)
1878 : options_{visibility, arena},
1879 name_(arena),
1880 _cached_size_{0} {}
1881
1882 inline void EnumValue::SharedCtor(::_pb::Arena* arena) {
1883 new (&_impl_) Impl_(internal_visibility(), arena);
1884 _impl_.number_ = {};
1885 }
1886 EnumValue::~EnumValue() {
1887 // @@protoc_insertion_point(destructor:google.protobuf.EnumValue)
1888 SharedDtor(*this);
1889 }
1890 inline void EnumValue::SharedDtor(MessageLite& self) {
1891 EnumValue& this_ = static_cast<EnumValue&>(self);
1892 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
1893 ABSL_DCHECK(this_.GetArena() == nullptr);
1894 this_._impl_.name_.Destroy();
1895 this_._impl_.~Impl_();
1896 }
1897
1898 inline void* EnumValue::PlacementNew_(const void*, void* mem,
1899 ::google::protobuf::Arena* arena) {
1900 return ::new (mem) EnumValue(arena);
1901 }
1902 constexpr auto EnumValue::InternalNewImpl_() {
1903 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
1904 PROTOBUF_FIELD_OFFSET(EnumValue, _impl_.options_) +
1905 decltype(EnumValue::_impl_.options_)::
1906 InternalGetArenaOffset(
1907 ::google::protobuf::Message::internal_visibility()),
1908 });
1909 if (arena_bits.has_value()) {
1910 return ::google::protobuf::internal::MessageCreator::CopyInit(
1911 sizeof(EnumValue), alignof(EnumValue), *arena_bits);
1912 } else {
1913 return ::google::protobuf::internal::MessageCreator(&EnumValue::PlacementNew_,
1914 sizeof(EnumValue),
1915 alignof(EnumValue));
1916 }
1917 }
1918 PROTOBUF_CONSTINIT
1919 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1920 const ::google::protobuf::internal::ClassDataFull EnumValue::_class_data_ = {
1921 ::google::protobuf::internal::ClassData{
1922 &_EnumValue_default_instance_._instance,
1923 &_table_.header,
1924 nullptr, // OnDemandRegisterArenaDtor
1925 nullptr, // IsInitialized
1926 &EnumValue::MergeImpl,
1927 ::google::protobuf::Message::GetNewImpl<EnumValue>(),
1928 #if defined(PROTOBUF_CUSTOM_VTABLE)
1929 &EnumValue::SharedDtor,
1930 ::google::protobuf::Message::GetClearImpl<EnumValue>(), &EnumValue::ByteSizeLong,
1931 &EnumValue::_InternalSerialize,
1932 #endif // PROTOBUF_CUSTOM_VTABLE
1933 PROTOBUF_FIELD_OFFSET(EnumValue, _impl_._cached_size_),
1934 false,
1935 },
1936 &EnumValue::kDescriptorMethods,
1937 &descriptor_table_google_2fprotobuf_2ftype_2eproto,
1938 nullptr, // tracker
1939 };
1940 const ::google::protobuf::internal::ClassData* EnumValue::GetClassData() const {
1941 ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
1942 ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
1943 return _class_data_.base();
1944 }
1945 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1946 const ::_pbi::TcParseTable<2, 3, 1, 38, 2> EnumValue::_table_ = {
1947 {
1948 0, // no _has_bits_
1949 0, // no _extensions_
1950 3, 24, // max_field_number, fast_idx_mask
1951 offsetof(decltype(_table_), field_lookup_table),
1952 4294967288, // skipmap
1953 offsetof(decltype(_table_), field_entries),
1954 3, // num_field_entries
1955 1, // num_aux_entries
1956 offsetof(decltype(_table_), aux_entries),
1957 _class_data_.base(),
1958 nullptr, // post_loop_handler
1959 ::_pbi::TcParser::GenericFallback, // fallback
1960 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1961 ::_pbi::TcParser::GetTable<::google::protobuf::EnumValue>(), // to_prefetch
1962 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
1963 }, {{
1964 {::_pbi::TcParser::MiniParse, {}},
1965 // string name = 1;
1966 {::_pbi::TcParser::FastUS1,
1967 {10, 63, 0, PROTOBUF_FIELD_OFFSET(EnumValue, _impl_.name_)}},
1968 // int32 number = 2;
1969 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(EnumValue, _impl_.number_), 63>(),
1970 {16, 63, 0, PROTOBUF_FIELD_OFFSET(EnumValue, _impl_.number_)}},
1971 // repeated .google.protobuf.Option options = 3;
1972 {::_pbi::TcParser::FastMtR1,
1973 {26, 63, 0, PROTOBUF_FIELD_OFFSET(EnumValue, _impl_.options_)}},
1974 }}, {{
1975 65535, 65535
1976 }}, {{
1977 // string name = 1;
1978 {PROTOBUF_FIELD_OFFSET(EnumValue, _impl_.name_), 0, 0,
1979 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
1980 // int32 number = 2;
1981 {PROTOBUF_FIELD_OFFSET(EnumValue, _impl_.number_), 0, 0,
1982 (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
1983 // repeated .google.protobuf.Option options = 3;
1984 {PROTOBUF_FIELD_OFFSET(EnumValue, _impl_.options_), 0, 0,
1985 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
1986 }}, {{
1987 {::_pbi::TcParser::GetTable<::google::protobuf::Option>()},
1988 }}, {{
1989 "\31\4\0\0\0\0\0\0"
1990 "google.protobuf.EnumValue"
1991 "name"
1992 }},
1993 };
1994
1995 PROTOBUF_NOINLINE void EnumValue::Clear() {
1996 // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue)
1997 ::google::protobuf::internal::TSanWrite(&_impl_);
1998 ::uint32_t cached_has_bits = 0;
1999 // Prevent compiler warnings about cached_has_bits being unused
2000 (void) cached_has_bits;
2001
2002 _impl_.options_.Clear();
2003 _impl_.name_.ClearToEmpty();
2004 _impl_.number_ = 0;
2005 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
2006 }
2007
2008 #if defined(PROTOBUF_CUSTOM_VTABLE)
2009 ::uint8_t* EnumValue::_InternalSerialize(
2010 const MessageLite& base, ::uint8_t* target,
2011 ::google::protobuf::io::EpsCopyOutputStream* stream) {
2012 const EnumValue& this_ = static_cast<const EnumValue&>(base);
2013 #else // PROTOBUF_CUSTOM_VTABLE
2014 ::uint8_t* EnumValue::_InternalSerialize(
2015 ::uint8_t* target,
2016 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
2017 const EnumValue& this_ = *this;
2018 #endif // PROTOBUF_CUSTOM_VTABLE
2019 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
2020 ::uint32_t cached_has_bits = 0;
2021 (void)cached_has_bits;
2022
2023 // string name = 1;
2024 if (!this_._internal_name().empty()) {
2025 const std::string& _s = this_._internal_name();
2026 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2027 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.EnumValue.name");
2028 target = stream->WriteStringMaybeAliased(1, _s, target);
2029 }
2030
2031 // int32 number = 2;
2032 if (this_._internal_number() != 0) {
2033 target = ::google::protobuf::internal::WireFormatLite::
2034 WriteInt32ToArrayWithField<2>(
2035 stream, this_._internal_number(), target);
2036 }
2037
2038 // repeated .google.protobuf.Option options = 3;
2039 for (unsigned i = 0, n = static_cast<unsigned>(
2040 this_._internal_options_size());
2041 i < n; i++) {
2042 const auto& repfield = this_._internal_options().Get(i);
2043 target =
2044 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
2045 3, repfield, repfield.GetCachedSize(),
2046 target, stream);
2047 }
2048
2049 if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
2050 target =
2051 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
2052 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
2053 }
2054 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue)
2055 return target;
2056 }
2057
2058 #if defined(PROTOBUF_CUSTOM_VTABLE)
2059 ::size_t EnumValue::ByteSizeLong(const MessageLite& base) {
2060 const EnumValue& this_ = static_cast<const EnumValue&>(base);
2061 #else // PROTOBUF_CUSTOM_VTABLE
2062 ::size_t EnumValue::ByteSizeLong() const {
2063 const EnumValue& this_ = *this;
2064 #endif // PROTOBUF_CUSTOM_VTABLE
2065 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue)
2066 ::size_t total_size = 0;
2067
2068 ::uint32_t cached_has_bits = 0;
2069 // Prevent compiler warnings about cached_has_bits being unused
2070 (void)cached_has_bits;
2071
2072 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
2073 {
2074 // repeated .google.protobuf.Option options = 3;
2075 {
2076 total_size += 1UL * this_._internal_options_size();
2077 for (const auto& msg : this_._internal_options()) {
2078 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
2079 }
2080 }
2081 }
2082 {
2083 // string name = 1;
2084 if (!this_._internal_name().empty()) {
2085 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
2086 this_._internal_name());
2087 }
2088 // int32 number = 2;
2089 if (this_._internal_number() != 0) {
2090 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
2091 this_._internal_number());
2092 }
2093 }
2094 return this_.MaybeComputeUnknownFieldsSize(total_size,
2095 &this_._impl_._cached_size_);
2096 }
2097
2098 void EnumValue::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
2099 auto* const _this = static_cast<EnumValue*>(&to_msg);
2100 auto& from = static_cast<const EnumValue&>(from_msg);
2101 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
2102 ABSL_DCHECK_NE(&from, _this);
2103 ::uint32_t cached_has_bits = 0;
2104 (void) cached_has_bits;
2105
2106 _this->_internal_mutable_options()->MergeFrom(
2107 from._internal_options());
2108 if (!from._internal_name().empty()) {
2109 _this->_internal_set_name(from._internal_name());
2110 }
2111 if (from._internal_number() != 0) {
2112 _this->_impl_.number_ = from._impl_.number_;
2113 }
2114 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
2115 }
2116
2117 void EnumValue::CopyFrom(const EnumValue& from) {
2118 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumValue)
2119 if (&from == this) return;
2120 Clear();
2121 MergeFrom(from);
2122 }
2123
2124
2125 void EnumValue::InternalSwap(EnumValue* PROTOBUF_RESTRICT other) {
2126 using std::swap;
2127 auto* arena = GetArena();
2128 ABSL_DCHECK_EQ(arena, other->GetArena());
2129 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2130 _impl_.options_.InternalSwap(&other->_impl_.options_);
2131 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
2132 swap(_impl_.number_, other->_impl_.number_);
2133 }
2134
2135 ::google::protobuf::Metadata EnumValue::GetMetadata() const {
2136 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
2137 }
2138 // ===================================================================
2139
2140 class Option::_Internal {
2141 public:
2142 using HasBits =
2143 decltype(std::declval<Option>()._impl_._has_bits_);
2144 static constexpr ::int32_t kHasBitsOffset =
2145 8 * PROTOBUF_FIELD_OFFSET(Option, _impl_._has_bits_);
2146 };
2147
2148 void Option::clear_value() {
2149 ::google::protobuf::internal::TSanWrite(&_impl_);
2150 if (_impl_.value_ != nullptr) _impl_.value_->Clear();
2151 _impl_._has_bits_[0] &= ~0x00000001u;
2152 }
2153 Option::Option(::google::protobuf::Arena* arena)
2154 #if defined(PROTOBUF_CUSTOM_VTABLE)
2155 : ::google::protobuf::Message(arena, _class_data_.base()) {
2156 #else // PROTOBUF_CUSTOM_VTABLE
2157 : ::google::protobuf::Message(arena) {
2158 #endif // PROTOBUF_CUSTOM_VTABLE
2159 SharedCtor(arena);
2160 // @@protoc_insertion_point(arena_constructor:google.protobuf.Option)
2161 }
2162 inline PROTOBUF_NDEBUG_INLINE Option::Impl_::Impl_(
2163 ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
2164 const Impl_& from, const ::google::protobuf::Option& from_msg)
2165 : _has_bits_{from._has_bits_},
2166 _cached_size_{0},
2167 name_(arena, from.name_) {}
2168
2169 Option::Option(
2170 ::google::protobuf::Arena* arena,
2171 const Option& from)
2172 #if defined(PROTOBUF_CUSTOM_VTABLE)
2173 : ::google::protobuf::Message(arena, _class_data_.base()) {
2174 #else // PROTOBUF_CUSTOM_VTABLE
2175 : ::google::protobuf::Message(arena) {
2176 #endif // PROTOBUF_CUSTOM_VTABLE
2177 Option* const _this = this;
2178 (void)_this;
2179 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
2180 from._internal_metadata_);
2181 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
2182 ::uint32_t cached_has_bits = _impl_._has_bits_[0];
2183 _impl_.value_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::google::protobuf::Any>(
2184 arena, *from._impl_.value_)
2185 : nullptr;
2186
2187 // @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
2188 }
2189 inline PROTOBUF_NDEBUG_INLINE Option::Impl_::Impl_(
2190 ::google::protobuf::internal::InternalVisibility visibility,
2191 ::google::protobuf::Arena* arena)
2192 : _cached_size_{0},
2193 name_(arena) {}
2194
2195 inline void Option::SharedCtor(::_pb::Arena* arena) {
2196 new (&_impl_) Impl_(internal_visibility(), arena);
2197 _impl_.value_ = {};
2198 }
2199 Option::~Option() {
2200 // @@protoc_insertion_point(destructor:google.protobuf.Option)
2201 SharedDtor(*this);
2202 }
2203 inline void Option::SharedDtor(MessageLite& self) {
2204 Option& this_ = static_cast<Option&>(self);
2205 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
2206 ABSL_DCHECK(this_.GetArena() == nullptr);
2207 this_._impl_.name_.Destroy();
2208 delete this_._impl_.value_;
2209 this_._impl_.~Impl_();
2210 }
2211
2212 inline void* Option::PlacementNew_(const void*, void* mem,
2213 ::google::protobuf::Arena* arena) {
2214 return ::new (mem) Option(arena);
2215 }
2216 constexpr auto Option::InternalNewImpl_() {
2217 return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Option),
2218 alignof(Option));
2219 }
2220 PROTOBUF_CONSTINIT
2221 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
2222 const ::google::protobuf::internal::ClassDataFull Option::_class_data_ = {
2223 ::google::protobuf::internal::ClassData{
2224 &_Option_default_instance_._instance,
2225 &_table_.header,
2226 nullptr, // OnDemandRegisterArenaDtor
2227 nullptr, // IsInitialized
2228 &Option::MergeImpl,
2229 ::google::protobuf::Message::GetNewImpl<Option>(),
2230 #if defined(PROTOBUF_CUSTOM_VTABLE)
2231 &Option::SharedDtor,
2232 ::google::protobuf::Message::GetClearImpl<Option>(), &Option::ByteSizeLong,
2233 &Option::_InternalSerialize,
2234 #endif // PROTOBUF_CUSTOM_VTABLE
2235 PROTOBUF_FIELD_OFFSET(Option, _impl_._cached_size_),
2236 false,
2237 },
2238 &Option::kDescriptorMethods,
2239 &descriptor_table_google_2fprotobuf_2ftype_2eproto,
2240 nullptr, // tracker
2241 };
2242 const ::google::protobuf::internal::ClassData* Option::GetClassData() const {
2243 ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
2244 ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
2245 return _class_data_.base();
2246 }
2247 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
2248 const ::_pbi::TcParseTable<1, 2, 1, 35, 2> Option::_table_ = {
2249 {
2250 PROTOBUF_FIELD_OFFSET(Option, _impl_._has_bits_),
2251 0, // no _extensions_
2252 2, 8, // max_field_number, fast_idx_mask
2253 offsetof(decltype(_table_), field_lookup_table),
2254 4294967292, // skipmap
2255 offsetof(decltype(_table_), field_entries),
2256 2, // num_field_entries
2257 1, // num_aux_entries
2258 offsetof(decltype(_table_), aux_entries),
2259 _class_data_.base(),
2260 nullptr, // post_loop_handler
2261 ::_pbi::TcParser::GenericFallback, // fallback
2262 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
2263 ::_pbi::TcParser::GetTable<::google::protobuf::Option>(), // to_prefetch
2264 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
2265 }, {{
2266 // .google.protobuf.Any value = 2;
2267 {::_pbi::TcParser::FastMtS1,
2268 {18, 0, 0, PROTOBUF_FIELD_OFFSET(Option, _impl_.value_)}},
2269 // string name = 1;
2270 {::_pbi::TcParser::FastUS1,
2271 {10, 63, 0, PROTOBUF_FIELD_OFFSET(Option, _impl_.name_)}},
2272 }}, {{
2273 65535, 65535
2274 }}, {{
2275 // string name = 1;
2276 {PROTOBUF_FIELD_OFFSET(Option, _impl_.name_), -1, 0,
2277 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
2278 // .google.protobuf.Any value = 2;
2279 {PROTOBUF_FIELD_OFFSET(Option, _impl_.value_), _Internal::kHasBitsOffset + 0, 0,
2280 (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
2281 }}, {{
2282 {::_pbi::TcParser::GetTable<::google::protobuf::Any>()},
2283 }}, {{
2284 "\26\4\0\0\0\0\0\0"
2285 "google.protobuf.Option"
2286 "name"
2287 }},
2288 };
2289
2290 PROTOBUF_NOINLINE void Option::Clear() {
2291 // @@protoc_insertion_point(message_clear_start:google.protobuf.Option)
2292 ::google::protobuf::internal::TSanWrite(&_impl_);
2293 ::uint32_t cached_has_bits = 0;
2294 // Prevent compiler warnings about cached_has_bits being unused
2295 (void) cached_has_bits;
2296
2297 _impl_.name_.ClearToEmpty();
2298 cached_has_bits = _impl_._has_bits_[0];
2299 if (cached_has_bits & 0x00000001u) {
2300 ABSL_DCHECK(_impl_.value_ != nullptr);
2301 _impl_.value_->Clear();
2302 }
2303 _impl_._has_bits_.Clear();
2304 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
2305 }
2306
2307 #if defined(PROTOBUF_CUSTOM_VTABLE)
2308 ::uint8_t* Option::_InternalSerialize(
2309 const MessageLite& base, ::uint8_t* target,
2310 ::google::protobuf::io::EpsCopyOutputStream* stream) {
2311 const Option& this_ = static_cast<const Option&>(base);
2312 #else // PROTOBUF_CUSTOM_VTABLE
2313 ::uint8_t* Option::_InternalSerialize(
2314 ::uint8_t* target,
2315 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
2316 const Option& this_ = *this;
2317 #endif // PROTOBUF_CUSTOM_VTABLE
2318 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
2319 ::uint32_t cached_has_bits = 0;
2320 (void)cached_has_bits;
2321
2322 // string name = 1;
2323 if (!this_._internal_name().empty()) {
2324 const std::string& _s = this_._internal_name();
2325 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2326 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Option.name");
2327 target = stream->WriteStringMaybeAliased(1, _s, target);
2328 }
2329
2330 cached_has_bits = this_._impl_._has_bits_[0];
2331 // .google.protobuf.Any value = 2;
2332 if (cached_has_bits & 0x00000001u) {
2333 target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
2334 2, *this_._impl_.value_, this_._impl_.value_->GetCachedSize(), target,
2335 stream);
2336 }
2337
2338 if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
2339 target =
2340 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
2341 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
2342 }
2343 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option)
2344 return target;
2345 }
2346
2347 #if defined(PROTOBUF_CUSTOM_VTABLE)
2348 ::size_t Option::ByteSizeLong(const MessageLite& base) {
2349 const Option& this_ = static_cast<const Option&>(base);
2350 #else // PROTOBUF_CUSTOM_VTABLE
2351 ::size_t Option::ByteSizeLong() const {
2352 const Option& this_ = *this;
2353 #endif // PROTOBUF_CUSTOM_VTABLE
2354 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option)
2355 ::size_t total_size = 0;
2356
2357 ::uint32_t cached_has_bits = 0;
2358 // Prevent compiler warnings about cached_has_bits being unused
2359 (void)cached_has_bits;
2360
2361 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
2362 {
2363 // string name = 1;
2364 if (!this_._internal_name().empty()) {
2365 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
2366 this_._internal_name());
2367 }
2368 }
2369 {
2370 // .google.protobuf.Any value = 2;
2371 cached_has_bits = this_._impl_._has_bits_[0];
2372 if (cached_has_bits & 0x00000001u) {
2373 total_size += 1 +
2374 ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.value_);
2375 }
2376 }
2377 return this_.MaybeComputeUnknownFieldsSize(total_size,
2378 &this_._impl_._cached_size_);
2379 }
2380
2381 void Option::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
2382 auto* const _this = static_cast<Option*>(&to_msg);
2383 auto& from = static_cast<const Option&>(from_msg);
2384 ::google::protobuf::Arena* arena = _this->GetArena();
2385 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
2386 ABSL_DCHECK_NE(&from, _this);
2387 ::uint32_t cached_has_bits = 0;
2388 (void) cached_has_bits;
2389
2390 if (!from._internal_name().empty()) {
2391 _this->_internal_set_name(from._internal_name());
2392 }
2393 cached_has_bits = from._impl_._has_bits_[0];
2394 if (cached_has_bits & 0x00000001u) {
2395 ABSL_DCHECK(from._impl_.value_ != nullptr);
2396 if (_this->_impl_.value_ == nullptr) {
2397 _this->_impl_.value_ =
2398 ::google::protobuf::Message::CopyConstruct<::google::protobuf::Any>(arena, *from._impl_.value_);
2399 } else {
2400 _this->_impl_.value_->MergeFrom(*from._impl_.value_);
2401 }
2402 }
2403 _this->_impl_._has_bits_[0] |= cached_has_bits;
2404 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
2405 }
2406
2407 void Option::CopyFrom(const Option& from) {
2408 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Option)
2409 if (&from == this) return;
2410 Clear();
2411 MergeFrom(from);
2412 }
2413
2414
2415 void Option::InternalSwap(Option* PROTOBUF_RESTRICT other) {
2416 using std::swap;
2417 auto* arena = GetArena();
2418 ABSL_DCHECK_EQ(arena, other->GetArena());
2419 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2420 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2421 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
2422 swap(_impl_.value_, other->_impl_.value_);
2423 }
2424
2425 ::google::protobuf::Metadata Option::GetMetadata() const {
2426 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
2427 }
2428 // @@protoc_insertion_point(namespace_scope)
2429 } // namespace protobuf
2430 } // namespace google
2431 namespace google {
2432 namespace protobuf {
2433 } // namespace protobuf
2434 } // namespace google
2435 // @@protoc_insertion_point(global_scope)
2436 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
2437 _static_init2_ PROTOBUF_UNUSED =
2438 (::_pbi::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto),
2439 ::std::false_type{});
2440 #include "google/protobuf/port_undef.inc"
2441