1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/type.proto
3
4 #include <google/protobuf/type.pb.h>
5
6 #include <algorithm>
7
8 #include <google/protobuf/stubs/common.h>
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/descriptor.h>
13 #include <google/protobuf/generated_message_reflection.h>
14 #include <google/protobuf/reflection_ops.h>
15 #include <google/protobuf/wire_format.h>
16 // @@protoc_insertion_point(includes)
17 #include <google/protobuf/port_def.inc>
18 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto;
19 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto;
20 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Field_google_2fprotobuf_2ftype_2eproto;
21 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto;
22 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto;
23 PROTOBUF_NAMESPACE_OPEN
24 class TypeDefaultTypeInternal {
25 public:
26 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Type> _instance;
27 } _Type_default_instance_;
28 class FieldDefaultTypeInternal {
29 public:
30 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Field> _instance;
31 } _Field_default_instance_;
32 class EnumDefaultTypeInternal {
33 public:
34 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Enum> _instance;
35 } _Enum_default_instance_;
36 class EnumValueDefaultTypeInternal {
37 public:
38 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<EnumValue> _instance;
39 } _EnumValue_default_instance_;
40 class OptionDefaultTypeInternal {
41 public:
42 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Option> _instance;
43 } _Option_default_instance_;
44 PROTOBUF_NAMESPACE_CLOSE
InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto()45 static void InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto() {
46 GOOGLE_PROTOBUF_VERIFY_VERSION;
47
48 {
49 void* ptr = &PROTOBUF_NAMESPACE_ID::_Enum_default_instance_;
50 new (ptr) PROTOBUF_NAMESPACE_ID::Enum();
51 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
52 }
53 PROTOBUF_NAMESPACE_ID::Enum::InitAsDefaultInstance();
54 }
55
56 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Enum_google_2fprotobuf_2ftype_2eproto =
57 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto}, {
58 &scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base,
59 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,
60 &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base,}};
61
InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto()62 static void InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto() {
63 GOOGLE_PROTOBUF_VERIFY_VERSION;
64
65 {
66 void* ptr = &PROTOBUF_NAMESPACE_ID::_EnumValue_default_instance_;
67 new (ptr) PROTOBUF_NAMESPACE_ID::EnumValue();
68 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
69 }
70 PROTOBUF_NAMESPACE_ID::EnumValue::InitAsDefaultInstance();
71 }
72
73 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto =
74 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto}, {
75 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}};
76
InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto()77 static void InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto() {
78 GOOGLE_PROTOBUF_VERIFY_VERSION;
79
80 {
81 void* ptr = &PROTOBUF_NAMESPACE_ID::_Field_default_instance_;
82 new (ptr) PROTOBUF_NAMESPACE_ID::Field();
83 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
84 }
85 PROTOBUF_NAMESPACE_ID::Field::InitAsDefaultInstance();
86 }
87
88 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Field_google_2fprotobuf_2ftype_2eproto =
89 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto}, {
90 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}};
91
InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto()92 static void InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto() {
93 GOOGLE_PROTOBUF_VERIFY_VERSION;
94
95 {
96 void* ptr = &PROTOBUF_NAMESPACE_ID::_Option_default_instance_;
97 new (ptr) PROTOBUF_NAMESPACE_ID::Option();
98 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
99 }
100 PROTOBUF_NAMESPACE_ID::Option::InitAsDefaultInstance();
101 }
102
103 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto =
104 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto}, {
105 &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}};
106
InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto()107 static void InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto() {
108 GOOGLE_PROTOBUF_VERIFY_VERSION;
109
110 {
111 void* ptr = &PROTOBUF_NAMESPACE_ID::_Type_default_instance_;
112 new (ptr) PROTOBUF_NAMESPACE_ID::Type();
113 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
114 }
115 PROTOBUF_NAMESPACE_ID::Type::InitAsDefaultInstance();
116 }
117
118 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Type_google_2fprotobuf_2ftype_2eproto =
119 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto}, {
120 &scc_info_Field_google_2fprotobuf_2ftype_2eproto.base,
121 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,
122 &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base,}};
123
124 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ftype_2eproto[5];
125 static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[3];
126 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto = nullptr;
127
128 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
129 ~0u, // no _has_bits_
130 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, _internal_metadata_),
131 ~0u, // no _extensions_
132 ~0u, // no _oneof_case_
133 ~0u, // no _weak_field_map_
134 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, name_),
135 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, fields_),
136 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, oneofs_),
137 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, options_),
138 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, source_context_),
139 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Type, syntax_),
140 ~0u, // no _has_bits_
141 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, _internal_metadata_),
142 ~0u, // no _extensions_
143 ~0u, // no _oneof_case_
144 ~0u, // no _weak_field_map_
145 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, kind_),
146 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, cardinality_),
147 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, number_),
148 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, name_),
149 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, type_url_),
150 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, oneof_index_),
151 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, packed_),
152 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, options_),
153 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, json_name_),
154 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Field, default_value_),
155 ~0u, // no _has_bits_
156 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, _internal_metadata_),
157 ~0u, // no _extensions_
158 ~0u, // no _oneof_case_
159 ~0u, // no _weak_field_map_
160 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, name_),
161 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, enumvalue_),
162 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, options_),
163 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, source_context_),
164 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Enum, syntax_),
165 ~0u, // no _has_bits_
166 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, _internal_metadata_),
167 ~0u, // no _extensions_
168 ~0u, // no _oneof_case_
169 ~0u, // no _weak_field_map_
170 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, name_),
171 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, number_),
172 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValue, options_),
173 ~0u, // no _has_bits_
174 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, _internal_metadata_),
175 ~0u, // no _extensions_
176 ~0u, // no _oneof_case_
177 ~0u, // no _weak_field_map_
178 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, name_),
179 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Option, value_),
180 };
181 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
182 { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Type)},
183 { 11, -1, sizeof(PROTOBUF_NAMESPACE_ID::Field)},
184 { 26, -1, sizeof(PROTOBUF_NAMESPACE_ID::Enum)},
185 { 36, -1, sizeof(PROTOBUF_NAMESPACE_ID::EnumValue)},
186 { 44, -1, sizeof(PROTOBUF_NAMESPACE_ID::Option)},
187 };
188
189 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
190 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Type_default_instance_),
191 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Field_default_instance_),
192 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Enum_default_instance_),
193 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_EnumValue_default_instance_),
194 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Option_default_instance_),
195 };
196
197 const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
198 "\n\032google/protobuf/type.proto\022\017google.pro"
199 "tobuf\032\031google/protobuf/any.proto\032$google"
200 "/protobuf/source_context.proto\"\327\001\n\004Type\022"
201 "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.google.p"
202 "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options"
203 "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc"
204 "e_context\030\005 \001(\0132\036.google.protobuf.Source"
205 "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu"
206 "f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl"
207 "e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001"
208 "(\0162\".google.protobuf.Field.Cardinality\022\016"
209 "\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\n\010type_url"
210 "\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006packed\030\010 "
211 "\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O"
212 "ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu"
213 "e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\022\017\n\013TY"
214 "PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6"
215 "4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014"
216 "TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE"
217 "_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n"
218 "\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TY"
219 "PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE"
220 "D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020"
221 "\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CAR"
222 "DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION"
223 "AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN"
224 "ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001(\t\022"
225 "-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu"
226 "mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu"
227 "f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl"
228 "e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016"
229 "2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014"
230 "\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030"
231 "\003 \003(\0132\027.google.protobuf.Option\";\n\006Option"
232 "\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.p"
233 "rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000"
234 "\022\021\n\rSYNTAX_PROTO3\020\001B}\n\023com.google.protob"
235 "ufB\tTypeProtoP\001Z/google.golang.org/genpr"
236 "oto/protobuf/ptype;ptype\370\001\001\242\002\003GPB\252\002\036Goog"
237 "le.Protobuf.WellKnownTypesb\006proto3"
238 ;
239 static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2ftype_2eproto_deps[2] = {
240 &::descriptor_table_google_2fprotobuf_2fany_2eproto,
241 &::descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto,
242 };
243 static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fprotobuf_2ftype_2eproto_sccs[5] = {
244 &scc_info_Enum_google_2fprotobuf_2ftype_2eproto.base,
245 &scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base,
246 &scc_info_Field_google_2fprotobuf_2ftype_2eproto.base,
247 &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,
248 &scc_info_Type_google_2fprotobuf_2ftype_2eproto.base,
249 };
250 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ftype_2eproto_once;
251 static bool descriptor_table_google_2fprotobuf_2ftype_2eproto_initialized = false;
252 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftype_2eproto = {
253 &descriptor_table_google_2fprotobuf_2ftype_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto, "google/protobuf/type.proto", 1594,
254 &descriptor_table_google_2fprotobuf_2ftype_2eproto_once, descriptor_table_google_2fprotobuf_2ftype_2eproto_sccs, descriptor_table_google_2fprotobuf_2ftype_2eproto_deps, 5, 2,
255 schemas, file_default_instances, TableStruct_google_2fprotobuf_2ftype_2eproto::offsets,
256 file_level_metadata_google_2fprotobuf_2ftype_2eproto, 5, file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto,
257 };
258
259 // Force running AddDescriptors() at dynamic initialization time.
260 static bool dynamic_init_dummy_google_2fprotobuf_2ftype_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto), true);
261 PROTOBUF_NAMESPACE_OPEN
Field_Kind_descriptor()262 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Kind_descriptor() {
263 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
264 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[0];
265 }
Field_Kind_IsValid(int value)266 bool Field_Kind_IsValid(int value) {
267 switch (value) {
268 case 0:
269 case 1:
270 case 2:
271 case 3:
272 case 4:
273 case 5:
274 case 6:
275 case 7:
276 case 8:
277 case 9:
278 case 10:
279 case 11:
280 case 12:
281 case 13:
282 case 14:
283 case 15:
284 case 16:
285 case 17:
286 case 18:
287 return true;
288 default:
289 return false;
290 }
291 }
292
293 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
294 constexpr Field_Kind Field::TYPE_UNKNOWN;
295 constexpr Field_Kind Field::TYPE_DOUBLE;
296 constexpr Field_Kind Field::TYPE_FLOAT;
297 constexpr Field_Kind Field::TYPE_INT64;
298 constexpr Field_Kind Field::TYPE_UINT64;
299 constexpr Field_Kind Field::TYPE_INT32;
300 constexpr Field_Kind Field::TYPE_FIXED64;
301 constexpr Field_Kind Field::TYPE_FIXED32;
302 constexpr Field_Kind Field::TYPE_BOOL;
303 constexpr Field_Kind Field::TYPE_STRING;
304 constexpr Field_Kind Field::TYPE_GROUP;
305 constexpr Field_Kind Field::TYPE_MESSAGE;
306 constexpr Field_Kind Field::TYPE_BYTES;
307 constexpr Field_Kind Field::TYPE_UINT32;
308 constexpr Field_Kind Field::TYPE_ENUM;
309 constexpr Field_Kind Field::TYPE_SFIXED32;
310 constexpr Field_Kind Field::TYPE_SFIXED64;
311 constexpr Field_Kind Field::TYPE_SINT32;
312 constexpr Field_Kind Field::TYPE_SINT64;
313 constexpr Field_Kind Field::Kind_MIN;
314 constexpr Field_Kind Field::Kind_MAX;
315 constexpr int Field::Kind_ARRAYSIZE;
316 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
Field_Cardinality_descriptor()317 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Cardinality_descriptor() {
318 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
319 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[1];
320 }
Field_Cardinality_IsValid(int value)321 bool Field_Cardinality_IsValid(int value) {
322 switch (value) {
323 case 0:
324 case 1:
325 case 2:
326 case 3:
327 return true;
328 default:
329 return false;
330 }
331 }
332
333 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
334 constexpr Field_Cardinality Field::CARDINALITY_UNKNOWN;
335 constexpr Field_Cardinality Field::CARDINALITY_OPTIONAL;
336 constexpr Field_Cardinality Field::CARDINALITY_REQUIRED;
337 constexpr Field_Cardinality Field::CARDINALITY_REPEATED;
338 constexpr Field_Cardinality Field::Cardinality_MIN;
339 constexpr Field_Cardinality Field::Cardinality_MAX;
340 constexpr int Field::Cardinality_ARRAYSIZE;
341 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
Syntax_descriptor()342 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Syntax_descriptor() {
343 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto);
344 return file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto[2];
345 }
Syntax_IsValid(int value)346 bool Syntax_IsValid(int value) {
347 switch (value) {
348 case 0:
349 case 1:
350 return true;
351 default:
352 return false;
353 }
354 }
355
356
357 // ===================================================================
358
InitAsDefaultInstance()359 void Type::InitAsDefaultInstance() {
360 PROTOBUF_NAMESPACE_ID::_Type_default_instance_._instance.get_mutable()->source_context_ = const_cast< PROTOBUF_NAMESPACE_ID::SourceContext*>(
361 PROTOBUF_NAMESPACE_ID::SourceContext::internal_default_instance());
362 }
363 class Type::_Internal {
364 public:
365 static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Type* msg);
366 };
367
368 const PROTOBUF_NAMESPACE_ID::SourceContext&
source_context(const Type * msg)369 Type::_Internal::source_context(const Type* msg) {
370 return *msg->source_context_;
371 }
unsafe_arena_set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext * source_context)372 void Type::unsafe_arena_set_allocated_source_context(
373 PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
374 if (GetArenaNoVirtual() == nullptr) {
375 delete source_context_;
376 }
377 source_context_ = source_context;
378 if (source_context) {
379
380 } else {
381
382 }
383 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Type.source_context)
384 }
clear_source_context()385 void Type::clear_source_context() {
386 if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
387 delete source_context_;
388 }
389 source_context_ = nullptr;
390 }
Type()391 Type::Type()
392 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
393 SharedCtor();
394 // @@protoc_insertion_point(constructor:google.protobuf.Type)
395 }
Type(::PROTOBUF_NAMESPACE_ID::Arena * arena)396 Type::Type(::PROTOBUF_NAMESPACE_ID::Arena* arena)
397 : ::PROTOBUF_NAMESPACE_ID::Message(),
398 _internal_metadata_(arena),
399 fields_(arena),
400 oneofs_(arena),
401 options_(arena) {
402 SharedCtor();
403 RegisterArenaDtor(arena);
404 // @@protoc_insertion_point(arena_constructor:google.protobuf.Type)
405 }
Type(const Type & from)406 Type::Type(const Type& from)
407 : ::PROTOBUF_NAMESPACE_ID::Message(),
408 _internal_metadata_(nullptr),
409 fields_(from.fields_),
410 oneofs_(from.oneofs_),
411 options_(from.options_) {
412 _internal_metadata_.MergeFrom(from._internal_metadata_);
413 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
414 if (!from.name().empty()) {
415 name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(),
416 GetArenaNoVirtual());
417 }
418 if (from.has_source_context()) {
419 source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
420 } else {
421 source_context_ = nullptr;
422 }
423 syntax_ = from.syntax_;
424 // @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
425 }
426
SharedCtor()427 void Type::SharedCtor() {
428 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Type_google_2fprotobuf_2ftype_2eproto.base);
429 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
430 ::memset(&source_context_, 0, static_cast<size_t>(
431 reinterpret_cast<char*>(&syntax_) -
432 reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
433 }
434
~Type()435 Type::~Type() {
436 // @@protoc_insertion_point(destructor:google.protobuf.Type)
437 SharedDtor();
438 }
439
SharedDtor()440 void Type::SharedDtor() {
441 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
442 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
443 if (this != internal_default_instance()) delete source_context_;
444 }
445
ArenaDtor(void * object)446 void Type::ArenaDtor(void* object) {
447 Type* _this = reinterpret_cast< Type* >(object);
448 (void)_this;
449 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)450 void Type::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
451 }
SetCachedSize(int size) const452 void Type::SetCachedSize(int size) const {
453 _cached_size_.Set(size);
454 }
default_instance()455 const Type& Type::default_instance() {
456 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Type_google_2fprotobuf_2ftype_2eproto.base);
457 return *internal_default_instance();
458 }
459
460
Clear()461 void Type::Clear() {
462 // @@protoc_insertion_point(message_clear_start:google.protobuf.Type)
463 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
464 // Prevent compiler warnings about cached_has_bits being unused
465 (void) cached_has_bits;
466
467 fields_.Clear();
468 oneofs_.Clear();
469 options_.Clear();
470 name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
471 if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
472 delete source_context_;
473 }
474 source_context_ = nullptr;
475 syntax_ = 0;
476 _internal_metadata_.Clear();
477 }
478
479 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)480 const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
481 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
482 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
483 while (!ctx->Done(&ptr)) {
484 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
485 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
486 CHK_(ptr);
487 switch (tag >> 3) {
488 // string name = 1;
489 case 1:
490 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
491 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Type.name");
492 CHK_(ptr);
493 } else goto handle_unusual;
494 continue;
495 // repeated .google.protobuf.Field fields = 2;
496 case 2:
497 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
498 ptr -= 1;
499 do {
500 ptr += 1;
501 ptr = ctx->ParseMessage(add_fields(), ptr);
502 CHK_(ptr);
503 if (!ctx->DataAvailable(ptr)) break;
504 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
505 } else goto handle_unusual;
506 continue;
507 // repeated string oneofs = 3;
508 case 3:
509 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
510 ptr -= 1;
511 do {
512 ptr += 1;
513 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_oneofs(), ptr, ctx, "google.protobuf.Type.oneofs");
514 CHK_(ptr);
515 if (!ctx->DataAvailable(ptr)) break;
516 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
517 } else goto handle_unusual;
518 continue;
519 // repeated .google.protobuf.Option options = 4;
520 case 4:
521 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
522 ptr -= 1;
523 do {
524 ptr += 1;
525 ptr = ctx->ParseMessage(add_options(), ptr);
526 CHK_(ptr);
527 if (!ctx->DataAvailable(ptr)) break;
528 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34);
529 } else goto handle_unusual;
530 continue;
531 // .google.protobuf.SourceContext source_context = 5;
532 case 5:
533 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
534 ptr = ctx->ParseMessage(mutable_source_context(), ptr);
535 CHK_(ptr);
536 } else goto handle_unusual;
537 continue;
538 // .google.protobuf.Syntax syntax = 6;
539 case 6:
540 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
541 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
542 CHK_(ptr);
543 set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val));
544 } else goto handle_unusual;
545 continue;
546 default: {
547 handle_unusual:
548 if ((tag & 7) == 4 || tag == 0) {
549 ctx->SetLastTag(tag);
550 goto success;
551 }
552 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
553 CHK_(ptr != nullptr);
554 continue;
555 }
556 } // switch
557 } // while
558 success:
559 return ptr;
560 failure:
561 ptr = nullptr;
562 goto success;
563 #undef CHK_
564 }
565 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)566 bool Type::MergePartialFromCodedStream(
567 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
568 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
569 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
570 // @@protoc_insertion_point(parse_start:google.protobuf.Type)
571 for (;;) {
572 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
573 tag = p.first;
574 if (!p.second) goto handle_unusual;
575 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
576 // string name = 1;
577 case 1: {
578 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
579 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
580 input, this->mutable_name()));
581 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
582 this->name().data(), static_cast<int>(this->name().length()),
583 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
584 "google.protobuf.Type.name"));
585 } else {
586 goto handle_unusual;
587 }
588 break;
589 }
590
591 // repeated .google.protobuf.Field fields = 2;
592 case 2: {
593 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
594 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
595 input, add_fields()));
596 } else {
597 goto handle_unusual;
598 }
599 break;
600 }
601
602 // repeated string oneofs = 3;
603 case 3: {
604 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
605 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
606 input, this->add_oneofs()));
607 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
608 this->oneofs(this->oneofs_size() - 1).data(),
609 static_cast<int>(this->oneofs(this->oneofs_size() - 1).length()),
610 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
611 "google.protobuf.Type.oneofs"));
612 } else {
613 goto handle_unusual;
614 }
615 break;
616 }
617
618 // repeated .google.protobuf.Option options = 4;
619 case 4: {
620 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
621 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
622 input, add_options()));
623 } else {
624 goto handle_unusual;
625 }
626 break;
627 }
628
629 // .google.protobuf.SourceContext source_context = 5;
630 case 5: {
631 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
632 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
633 input, mutable_source_context()));
634 } else {
635 goto handle_unusual;
636 }
637 break;
638 }
639
640 // .google.protobuf.Syntax syntax = 6;
641 case 6: {
642 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) {
643 int value = 0;
644 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
645 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
646 input, &value)));
647 set_syntax(static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(value));
648 } else {
649 goto handle_unusual;
650 }
651 break;
652 }
653
654 default: {
655 handle_unusual:
656 if (tag == 0) {
657 goto success;
658 }
659 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
660 input, tag, _internal_metadata_.mutable_unknown_fields()));
661 break;
662 }
663 }
664 }
665 success:
666 // @@protoc_insertion_point(parse_success:google.protobuf.Type)
667 return true;
668 failure:
669 // @@protoc_insertion_point(parse_failure:google.protobuf.Type)
670 return false;
671 #undef DO_
672 }
673 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
674
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const675 void Type::SerializeWithCachedSizes(
676 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
677 // @@protoc_insertion_point(serialize_start:google.protobuf.Type)
678 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
679 (void) cached_has_bits;
680
681 // string name = 1;
682 if (this->name().size() > 0) {
683 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
684 this->name().data(), static_cast<int>(this->name().length()),
685 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
686 "google.protobuf.Type.name");
687 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
688 1, this->name(), output);
689 }
690
691 // repeated .google.protobuf.Field fields = 2;
692 for (unsigned int i = 0,
693 n = static_cast<unsigned int>(this->fields_size()); i < n; i++) {
694 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
695 2,
696 this->fields(static_cast<int>(i)),
697 output);
698 }
699
700 // repeated string oneofs = 3;
701 for (int i = 0, n = this->oneofs_size(); i < n; i++) {
702 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
703 this->oneofs(i).data(), static_cast<int>(this->oneofs(i).length()),
704 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
705 "google.protobuf.Type.oneofs");
706 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
707 3, this->oneofs(i), output);
708 }
709
710 // repeated .google.protobuf.Option options = 4;
711 for (unsigned int i = 0,
712 n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
713 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
714 4,
715 this->options(static_cast<int>(i)),
716 output);
717 }
718
719 // .google.protobuf.SourceContext source_context = 5;
720 if (this->has_source_context()) {
721 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
722 5, _Internal::source_context(this), output);
723 }
724
725 // .google.protobuf.Syntax syntax = 6;
726 if (this->syntax() != 0) {
727 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
728 6, this->syntax(), output);
729 }
730
731 if (_internal_metadata_.have_unknown_fields()) {
732 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
733 _internal_metadata_.unknown_fields(), output);
734 }
735 // @@protoc_insertion_point(serialize_end:google.protobuf.Type)
736 }
737
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const738 ::PROTOBUF_NAMESPACE_ID::uint8* Type::InternalSerializeWithCachedSizesToArray(
739 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
740 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
741 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
742 (void) cached_has_bits;
743
744 // string name = 1;
745 if (this->name().size() > 0) {
746 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
747 this->name().data(), static_cast<int>(this->name().length()),
748 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
749 "google.protobuf.Type.name");
750 target =
751 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
752 1, this->name(), target);
753 }
754
755 // repeated .google.protobuf.Field fields = 2;
756 for (unsigned int i = 0,
757 n = static_cast<unsigned int>(this->fields_size()); i < n; i++) {
758 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
759 InternalWriteMessageToArray(
760 2, this->fields(static_cast<int>(i)), target);
761 }
762
763 // repeated string oneofs = 3;
764 for (int i = 0, n = this->oneofs_size(); i < n; i++) {
765 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
766 this->oneofs(i).data(), static_cast<int>(this->oneofs(i).length()),
767 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
768 "google.protobuf.Type.oneofs");
769 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
770 WriteStringToArray(3, this->oneofs(i), target);
771 }
772
773 // repeated .google.protobuf.Option options = 4;
774 for (unsigned int i = 0,
775 n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
776 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
777 InternalWriteMessageToArray(
778 4, this->options(static_cast<int>(i)), target);
779 }
780
781 // .google.protobuf.SourceContext source_context = 5;
782 if (this->has_source_context()) {
783 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
784 InternalWriteMessageToArray(
785 5, _Internal::source_context(this), target);
786 }
787
788 // .google.protobuf.Syntax syntax = 6;
789 if (this->syntax() != 0) {
790 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
791 6, this->syntax(), target);
792 }
793
794 if (_internal_metadata_.have_unknown_fields()) {
795 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
796 _internal_metadata_.unknown_fields(), target);
797 }
798 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type)
799 return target;
800 }
801
ByteSizeLong() const802 size_t Type::ByteSizeLong() const {
803 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type)
804 size_t total_size = 0;
805
806 if (_internal_metadata_.have_unknown_fields()) {
807 total_size +=
808 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
809 _internal_metadata_.unknown_fields());
810 }
811 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
812 // Prevent compiler warnings about cached_has_bits being unused
813 (void) cached_has_bits;
814
815 // repeated .google.protobuf.Field fields = 2;
816 {
817 unsigned int count = static_cast<unsigned int>(this->fields_size());
818 total_size += 1UL * count;
819 for (unsigned int i = 0; i < count; i++) {
820 total_size +=
821 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
822 this->fields(static_cast<int>(i)));
823 }
824 }
825
826 // repeated string oneofs = 3;
827 total_size += 1 *
828 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->oneofs_size());
829 for (int i = 0, n = this->oneofs_size(); i < n; i++) {
830 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
831 this->oneofs(i));
832 }
833
834 // repeated .google.protobuf.Option options = 4;
835 {
836 unsigned int count = static_cast<unsigned int>(this->options_size());
837 total_size += 1UL * count;
838 for (unsigned int i = 0; i < count; i++) {
839 total_size +=
840 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
841 this->options(static_cast<int>(i)));
842 }
843 }
844
845 // string name = 1;
846 if (this->name().size() > 0) {
847 total_size += 1 +
848 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
849 this->name());
850 }
851
852 // .google.protobuf.SourceContext source_context = 5;
853 if (this->has_source_context()) {
854 total_size += 1 +
855 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
856 *source_context_);
857 }
858
859 // .google.protobuf.Syntax syntax = 6;
860 if (this->syntax() != 0) {
861 total_size += 1 +
862 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->syntax());
863 }
864
865 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
866 SetCachedSize(cached_size);
867 return total_size;
868 }
869
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)870 void Type::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
871 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Type)
872 GOOGLE_DCHECK_NE(&from, this);
873 const Type* source =
874 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Type>(
875 &from);
876 if (source == nullptr) {
877 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Type)
878 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
879 } else {
880 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Type)
881 MergeFrom(*source);
882 }
883 }
884
MergeFrom(const Type & from)885 void Type::MergeFrom(const Type& from) {
886 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
887 GOOGLE_DCHECK_NE(&from, this);
888 _internal_metadata_.MergeFrom(from._internal_metadata_);
889 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
890 (void) cached_has_bits;
891
892 fields_.MergeFrom(from.fields_);
893 oneofs_.MergeFrom(from.oneofs_);
894 options_.MergeFrom(from.options_);
895 if (from.name().size() > 0) {
896 set_name(from.name());
897 }
898 if (from.has_source_context()) {
899 mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from.source_context());
900 }
901 if (from.syntax() != 0) {
902 set_syntax(from.syntax());
903 }
904 }
905
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)906 void Type::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
907 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Type)
908 if (&from == this) return;
909 Clear();
910 MergeFrom(from);
911 }
912
CopyFrom(const Type & from)913 void Type::CopyFrom(const Type& from) {
914 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Type)
915 if (&from == this) return;
916 Clear();
917 MergeFrom(from);
918 }
919
IsInitialized() const920 bool Type::IsInitialized() const {
921 return true;
922 }
923
InternalSwap(Type * other)924 void Type::InternalSwap(Type* other) {
925 using std::swap;
926 _internal_metadata_.Swap(&other->_internal_metadata_);
927 CastToBase(&fields_)->InternalSwap(CastToBase(&other->fields_));
928 oneofs_.InternalSwap(CastToBase(&other->oneofs_));
929 CastToBase(&options_)->InternalSwap(CastToBase(&other->options_));
930 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
931 GetArenaNoVirtual());
932 swap(source_context_, other->source_context_);
933 swap(syntax_, other->syntax_);
934 }
935
GetMetadata() const936 ::PROTOBUF_NAMESPACE_ID::Metadata Type::GetMetadata() const {
937 return GetMetadataStatic();
938 }
939
940
941 // ===================================================================
942
InitAsDefaultInstance()943 void Field::InitAsDefaultInstance() {
944 }
945 class Field::_Internal {
946 public:
947 };
948
Field()949 Field::Field()
950 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
951 SharedCtor();
952 // @@protoc_insertion_point(constructor:google.protobuf.Field)
953 }
Field(::PROTOBUF_NAMESPACE_ID::Arena * arena)954 Field::Field(::PROTOBUF_NAMESPACE_ID::Arena* arena)
955 : ::PROTOBUF_NAMESPACE_ID::Message(),
956 _internal_metadata_(arena),
957 options_(arena) {
958 SharedCtor();
959 RegisterArenaDtor(arena);
960 // @@protoc_insertion_point(arena_constructor:google.protobuf.Field)
961 }
Field(const Field & from)962 Field::Field(const Field& from)
963 : ::PROTOBUF_NAMESPACE_ID::Message(),
964 _internal_metadata_(nullptr),
965 options_(from.options_) {
966 _internal_metadata_.MergeFrom(from._internal_metadata_);
967 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
968 if (!from.name().empty()) {
969 name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(),
970 GetArenaNoVirtual());
971 }
972 type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
973 if (!from.type_url().empty()) {
974 type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_url(),
975 GetArenaNoVirtual());
976 }
977 json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
978 if (!from.json_name().empty()) {
979 json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.json_name(),
980 GetArenaNoVirtual());
981 }
982 default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
983 if (!from.default_value().empty()) {
984 default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.default_value(),
985 GetArenaNoVirtual());
986 }
987 ::memcpy(&kind_, &from.kind_,
988 static_cast<size_t>(reinterpret_cast<char*>(&packed_) -
989 reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
990 // @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
991 }
992
SharedCtor()993 void Field::SharedCtor() {
994 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Field_google_2fprotobuf_2ftype_2eproto.base);
995 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
996 type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
997 json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
998 default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
999 ::memset(&kind_, 0, static_cast<size_t>(
1000 reinterpret_cast<char*>(&packed_) -
1001 reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
1002 }
1003
~Field()1004 Field::~Field() {
1005 // @@protoc_insertion_point(destructor:google.protobuf.Field)
1006 SharedDtor();
1007 }
1008
SharedDtor()1009 void Field::SharedDtor() {
1010 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
1011 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1012 type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1013 json_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1014 default_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1015 }
1016
ArenaDtor(void * object)1017 void Field::ArenaDtor(void* object) {
1018 Field* _this = reinterpret_cast< Field* >(object);
1019 (void)_this;
1020 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)1021 void Field::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1022 }
SetCachedSize(int size) const1023 void Field::SetCachedSize(int size) const {
1024 _cached_size_.Set(size);
1025 }
default_instance()1026 const Field& Field::default_instance() {
1027 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Field_google_2fprotobuf_2ftype_2eproto.base);
1028 return *internal_default_instance();
1029 }
1030
1031
Clear()1032 void Field::Clear() {
1033 // @@protoc_insertion_point(message_clear_start:google.protobuf.Field)
1034 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1035 // Prevent compiler warnings about cached_has_bits being unused
1036 (void) cached_has_bits;
1037
1038 options_.Clear();
1039 name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1040 type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1041 json_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1042 default_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1043 ::memset(&kind_, 0, static_cast<size_t>(
1044 reinterpret_cast<char*>(&packed_) -
1045 reinterpret_cast<char*>(&kind_)) + sizeof(packed_));
1046 _internal_metadata_.Clear();
1047 }
1048
1049 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)1050 const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1051 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1052 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
1053 while (!ctx->Done(&ptr)) {
1054 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1055 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1056 CHK_(ptr);
1057 switch (tag >> 3) {
1058 // .google.protobuf.Field.Kind kind = 1;
1059 case 1:
1060 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
1061 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1062 CHK_(ptr);
1063 set_kind(static_cast<PROTOBUF_NAMESPACE_ID::Field_Kind>(val));
1064 } else goto handle_unusual;
1065 continue;
1066 // .google.protobuf.Field.Cardinality cardinality = 2;
1067 case 2:
1068 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
1069 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1070 CHK_(ptr);
1071 set_cardinality(static_cast<PROTOBUF_NAMESPACE_ID::Field_Cardinality>(val));
1072 } else goto handle_unusual;
1073 continue;
1074 // int32 number = 3;
1075 case 3:
1076 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
1077 number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1078 CHK_(ptr);
1079 } else goto handle_unusual;
1080 continue;
1081 // string name = 4;
1082 case 4:
1083 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
1084 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Field.name");
1085 CHK_(ptr);
1086 } else goto handle_unusual;
1087 continue;
1088 // string type_url = 6;
1089 case 6:
1090 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
1091 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_type_url(), ptr, ctx, "google.protobuf.Field.type_url");
1092 CHK_(ptr);
1093 } else goto handle_unusual;
1094 continue;
1095 // int32 oneof_index = 7;
1096 case 7:
1097 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
1098 oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1099 CHK_(ptr);
1100 } else goto handle_unusual;
1101 continue;
1102 // bool packed = 8;
1103 case 8:
1104 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
1105 packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1106 CHK_(ptr);
1107 } else goto handle_unusual;
1108 continue;
1109 // repeated .google.protobuf.Option options = 9;
1110 case 9:
1111 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
1112 ptr -= 1;
1113 do {
1114 ptr += 1;
1115 ptr = ctx->ParseMessage(add_options(), ptr);
1116 CHK_(ptr);
1117 if (!ctx->DataAvailable(ptr)) break;
1118 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 74);
1119 } else goto handle_unusual;
1120 continue;
1121 // string json_name = 10;
1122 case 10:
1123 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
1124 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_json_name(), ptr, ctx, "google.protobuf.Field.json_name");
1125 CHK_(ptr);
1126 } else goto handle_unusual;
1127 continue;
1128 // string default_value = 11;
1129 case 11:
1130 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
1131 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_default_value(), ptr, ctx, "google.protobuf.Field.default_value");
1132 CHK_(ptr);
1133 } else goto handle_unusual;
1134 continue;
1135 default: {
1136 handle_unusual:
1137 if ((tag & 7) == 4 || tag == 0) {
1138 ctx->SetLastTag(tag);
1139 goto success;
1140 }
1141 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1142 CHK_(ptr != nullptr);
1143 continue;
1144 }
1145 } // switch
1146 } // while
1147 success:
1148 return ptr;
1149 failure:
1150 ptr = nullptr;
1151 goto success;
1152 #undef CHK_
1153 }
1154 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)1155 bool Field::MergePartialFromCodedStream(
1156 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1157 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1158 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1159 // @@protoc_insertion_point(parse_start:google.protobuf.Field)
1160 for (;;) {
1161 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1162 tag = p.first;
1163 if (!p.second) goto handle_unusual;
1164 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1165 // .google.protobuf.Field.Kind kind = 1;
1166 case 1: {
1167 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
1168 int value = 0;
1169 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1170 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
1171 input, &value)));
1172 set_kind(static_cast< PROTOBUF_NAMESPACE_ID::Field_Kind >(value));
1173 } else {
1174 goto handle_unusual;
1175 }
1176 break;
1177 }
1178
1179 // .google.protobuf.Field.Cardinality cardinality = 2;
1180 case 2: {
1181 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
1182 int value = 0;
1183 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1184 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
1185 input, &value)));
1186 set_cardinality(static_cast< PROTOBUF_NAMESPACE_ID::Field_Cardinality >(value));
1187 } else {
1188 goto handle_unusual;
1189 }
1190 break;
1191 }
1192
1193 // int32 number = 3;
1194 case 3: {
1195 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
1196
1197 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1198 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
1199 input, &number_)));
1200 } else {
1201 goto handle_unusual;
1202 }
1203 break;
1204 }
1205
1206 // string name = 4;
1207 case 4: {
1208 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
1209 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1210 input, this->mutable_name()));
1211 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1212 this->name().data(), static_cast<int>(this->name().length()),
1213 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1214 "google.protobuf.Field.name"));
1215 } else {
1216 goto handle_unusual;
1217 }
1218 break;
1219 }
1220
1221 // string type_url = 6;
1222 case 6: {
1223 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
1224 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1225 input, this->mutable_type_url()));
1226 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1227 this->type_url().data(), static_cast<int>(this->type_url().length()),
1228 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1229 "google.protobuf.Field.type_url"));
1230 } else {
1231 goto handle_unusual;
1232 }
1233 break;
1234 }
1235
1236 // int32 oneof_index = 7;
1237 case 7: {
1238 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) {
1239
1240 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1241 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
1242 input, &oneof_index_)));
1243 } else {
1244 goto handle_unusual;
1245 }
1246 break;
1247 }
1248
1249 // bool packed = 8;
1250 case 8: {
1251 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) {
1252
1253 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1254 bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
1255 input, &packed_)));
1256 } else {
1257 goto handle_unusual;
1258 }
1259 break;
1260 }
1261
1262 // repeated .google.protobuf.Option options = 9;
1263 case 9: {
1264 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) {
1265 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1266 input, add_options()));
1267 } else {
1268 goto handle_unusual;
1269 }
1270 break;
1271 }
1272
1273 // string json_name = 10;
1274 case 10: {
1275 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) {
1276 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1277 input, this->mutable_json_name()));
1278 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1279 this->json_name().data(), static_cast<int>(this->json_name().length()),
1280 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1281 "google.protobuf.Field.json_name"));
1282 } else {
1283 goto handle_unusual;
1284 }
1285 break;
1286 }
1287
1288 // string default_value = 11;
1289 case 11: {
1290 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) {
1291 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1292 input, this->mutable_default_value()));
1293 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1294 this->default_value().data(), static_cast<int>(this->default_value().length()),
1295 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1296 "google.protobuf.Field.default_value"));
1297 } else {
1298 goto handle_unusual;
1299 }
1300 break;
1301 }
1302
1303 default: {
1304 handle_unusual:
1305 if (tag == 0) {
1306 goto success;
1307 }
1308 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1309 input, tag, _internal_metadata_.mutable_unknown_fields()));
1310 break;
1311 }
1312 }
1313 }
1314 success:
1315 // @@protoc_insertion_point(parse_success:google.protobuf.Field)
1316 return true;
1317 failure:
1318 // @@protoc_insertion_point(parse_failure:google.protobuf.Field)
1319 return false;
1320 #undef DO_
1321 }
1322 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1323
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const1324 void Field::SerializeWithCachedSizes(
1325 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1326 // @@protoc_insertion_point(serialize_start:google.protobuf.Field)
1327 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1328 (void) cached_has_bits;
1329
1330 // .google.protobuf.Field.Kind kind = 1;
1331 if (this->kind() != 0) {
1332 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
1333 1, this->kind(), output);
1334 }
1335
1336 // .google.protobuf.Field.Cardinality cardinality = 2;
1337 if (this->cardinality() != 0) {
1338 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
1339 2, this->cardinality(), output);
1340 }
1341
1342 // int32 number = 3;
1343 if (this->number() != 0) {
1344 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->number(), output);
1345 }
1346
1347 // string name = 4;
1348 if (this->name().size() > 0) {
1349 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1350 this->name().data(), static_cast<int>(this->name().length()),
1351 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1352 "google.protobuf.Field.name");
1353 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1354 4, this->name(), output);
1355 }
1356
1357 // string type_url = 6;
1358 if (this->type_url().size() > 0) {
1359 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1360 this->type_url().data(), static_cast<int>(this->type_url().length()),
1361 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1362 "google.protobuf.Field.type_url");
1363 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1364 6, this->type_url(), output);
1365 }
1366
1367 // int32 oneof_index = 7;
1368 if (this->oneof_index() != 0) {
1369 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(7, this->oneof_index(), output);
1370 }
1371
1372 // bool packed = 8;
1373 if (this->packed() != 0) {
1374 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(8, this->packed(), output);
1375 }
1376
1377 // repeated .google.protobuf.Option options = 9;
1378 for (unsigned int i = 0,
1379 n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
1380 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1381 9,
1382 this->options(static_cast<int>(i)),
1383 output);
1384 }
1385
1386 // string json_name = 10;
1387 if (this->json_name().size() > 0) {
1388 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1389 this->json_name().data(), static_cast<int>(this->json_name().length()),
1390 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1391 "google.protobuf.Field.json_name");
1392 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1393 10, this->json_name(), output);
1394 }
1395
1396 // string default_value = 11;
1397 if (this->default_value().size() > 0) {
1398 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1399 this->default_value().data(), static_cast<int>(this->default_value().length()),
1400 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1401 "google.protobuf.Field.default_value");
1402 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1403 11, this->default_value(), output);
1404 }
1405
1406 if (_internal_metadata_.have_unknown_fields()) {
1407 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1408 _internal_metadata_.unknown_fields(), output);
1409 }
1410 // @@protoc_insertion_point(serialize_end:google.protobuf.Field)
1411 }
1412
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const1413 ::PROTOBUF_NAMESPACE_ID::uint8* Field::InternalSerializeWithCachedSizesToArray(
1414 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1415 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field)
1416 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1417 (void) cached_has_bits;
1418
1419 // .google.protobuf.Field.Kind kind = 1;
1420 if (this->kind() != 0) {
1421 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1422 1, this->kind(), target);
1423 }
1424
1425 // .google.protobuf.Field.Cardinality cardinality = 2;
1426 if (this->cardinality() != 0) {
1427 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1428 2, this->cardinality(), target);
1429 }
1430
1431 // int32 number = 3;
1432 if (this->number() != 0) {
1433 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target);
1434 }
1435
1436 // string name = 4;
1437 if (this->name().size() > 0) {
1438 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1439 this->name().data(), static_cast<int>(this->name().length()),
1440 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1441 "google.protobuf.Field.name");
1442 target =
1443 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1444 4, this->name(), target);
1445 }
1446
1447 // string type_url = 6;
1448 if (this->type_url().size() > 0) {
1449 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1450 this->type_url().data(), static_cast<int>(this->type_url().length()),
1451 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1452 "google.protobuf.Field.type_url");
1453 target =
1454 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1455 6, this->type_url(), target);
1456 }
1457
1458 // int32 oneof_index = 7;
1459 if (this->oneof_index() != 0) {
1460 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->oneof_index(), target);
1461 }
1462
1463 // bool packed = 8;
1464 if (this->packed() != 0) {
1465 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->packed(), target);
1466 }
1467
1468 // repeated .google.protobuf.Option options = 9;
1469 for (unsigned int i = 0,
1470 n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
1471 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1472 InternalWriteMessageToArray(
1473 9, this->options(static_cast<int>(i)), target);
1474 }
1475
1476 // string json_name = 10;
1477 if (this->json_name().size() > 0) {
1478 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1479 this->json_name().data(), static_cast<int>(this->json_name().length()),
1480 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1481 "google.protobuf.Field.json_name");
1482 target =
1483 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1484 10, this->json_name(), target);
1485 }
1486
1487 // string default_value = 11;
1488 if (this->default_value().size() > 0) {
1489 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1490 this->default_value().data(), static_cast<int>(this->default_value().length()),
1491 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1492 "google.protobuf.Field.default_value");
1493 target =
1494 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1495 11, this->default_value(), target);
1496 }
1497
1498 if (_internal_metadata_.have_unknown_fields()) {
1499 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1500 _internal_metadata_.unknown_fields(), target);
1501 }
1502 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field)
1503 return target;
1504 }
1505
ByteSizeLong() const1506 size_t Field::ByteSizeLong() const {
1507 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field)
1508 size_t total_size = 0;
1509
1510 if (_internal_metadata_.have_unknown_fields()) {
1511 total_size +=
1512 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1513 _internal_metadata_.unknown_fields());
1514 }
1515 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1516 // Prevent compiler warnings about cached_has_bits being unused
1517 (void) cached_has_bits;
1518
1519 // repeated .google.protobuf.Option options = 9;
1520 {
1521 unsigned int count = static_cast<unsigned int>(this->options_size());
1522 total_size += 1UL * count;
1523 for (unsigned int i = 0; i < count; i++) {
1524 total_size +=
1525 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1526 this->options(static_cast<int>(i)));
1527 }
1528 }
1529
1530 // string name = 4;
1531 if (this->name().size() > 0) {
1532 total_size += 1 +
1533 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1534 this->name());
1535 }
1536
1537 // string type_url = 6;
1538 if (this->type_url().size() > 0) {
1539 total_size += 1 +
1540 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1541 this->type_url());
1542 }
1543
1544 // string json_name = 10;
1545 if (this->json_name().size() > 0) {
1546 total_size += 1 +
1547 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1548 this->json_name());
1549 }
1550
1551 // string default_value = 11;
1552 if (this->default_value().size() > 0) {
1553 total_size += 1 +
1554 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1555 this->default_value());
1556 }
1557
1558 // .google.protobuf.Field.Kind kind = 1;
1559 if (this->kind() != 0) {
1560 total_size += 1 +
1561 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->kind());
1562 }
1563
1564 // .google.protobuf.Field.Cardinality cardinality = 2;
1565 if (this->cardinality() != 0) {
1566 total_size += 1 +
1567 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->cardinality());
1568 }
1569
1570 // int32 number = 3;
1571 if (this->number() != 0) {
1572 total_size += 1 +
1573 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1574 this->number());
1575 }
1576
1577 // int32 oneof_index = 7;
1578 if (this->oneof_index() != 0) {
1579 total_size += 1 +
1580 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1581 this->oneof_index());
1582 }
1583
1584 // bool packed = 8;
1585 if (this->packed() != 0) {
1586 total_size += 1 + 1;
1587 }
1588
1589 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1590 SetCachedSize(cached_size);
1591 return total_size;
1592 }
1593
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1594 void Field::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1595 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Field)
1596 GOOGLE_DCHECK_NE(&from, this);
1597 const Field* source =
1598 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Field>(
1599 &from);
1600 if (source == nullptr) {
1601 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Field)
1602 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1603 } else {
1604 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Field)
1605 MergeFrom(*source);
1606 }
1607 }
1608
MergeFrom(const Field & from)1609 void Field::MergeFrom(const Field& from) {
1610 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
1611 GOOGLE_DCHECK_NE(&from, this);
1612 _internal_metadata_.MergeFrom(from._internal_metadata_);
1613 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1614 (void) cached_has_bits;
1615
1616 options_.MergeFrom(from.options_);
1617 if (from.name().size() > 0) {
1618 set_name(from.name());
1619 }
1620 if (from.type_url().size() > 0) {
1621 set_type_url(from.type_url());
1622 }
1623 if (from.json_name().size() > 0) {
1624 set_json_name(from.json_name());
1625 }
1626 if (from.default_value().size() > 0) {
1627 set_default_value(from.default_value());
1628 }
1629 if (from.kind() != 0) {
1630 set_kind(from.kind());
1631 }
1632 if (from.cardinality() != 0) {
1633 set_cardinality(from.cardinality());
1634 }
1635 if (from.number() != 0) {
1636 set_number(from.number());
1637 }
1638 if (from.oneof_index() != 0) {
1639 set_oneof_index(from.oneof_index());
1640 }
1641 if (from.packed() != 0) {
1642 set_packed(from.packed());
1643 }
1644 }
1645
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1646 void Field::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1647 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Field)
1648 if (&from == this) return;
1649 Clear();
1650 MergeFrom(from);
1651 }
1652
CopyFrom(const Field & from)1653 void Field::CopyFrom(const Field& from) {
1654 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Field)
1655 if (&from == this) return;
1656 Clear();
1657 MergeFrom(from);
1658 }
1659
IsInitialized() const1660 bool Field::IsInitialized() const {
1661 return true;
1662 }
1663
InternalSwap(Field * other)1664 void Field::InternalSwap(Field* other) {
1665 using std::swap;
1666 _internal_metadata_.Swap(&other->_internal_metadata_);
1667 CastToBase(&options_)->InternalSwap(CastToBase(&other->options_));
1668 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1669 GetArenaNoVirtual());
1670 type_url_.Swap(&other->type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1671 GetArenaNoVirtual());
1672 json_name_.Swap(&other->json_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1673 GetArenaNoVirtual());
1674 default_value_.Swap(&other->default_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1675 GetArenaNoVirtual());
1676 swap(kind_, other->kind_);
1677 swap(cardinality_, other->cardinality_);
1678 swap(number_, other->number_);
1679 swap(oneof_index_, other->oneof_index_);
1680 swap(packed_, other->packed_);
1681 }
1682
GetMetadata() const1683 ::PROTOBUF_NAMESPACE_ID::Metadata Field::GetMetadata() const {
1684 return GetMetadataStatic();
1685 }
1686
1687
1688 // ===================================================================
1689
InitAsDefaultInstance()1690 void Enum::InitAsDefaultInstance() {
1691 PROTOBUF_NAMESPACE_ID::_Enum_default_instance_._instance.get_mutable()->source_context_ = const_cast< PROTOBUF_NAMESPACE_ID::SourceContext*>(
1692 PROTOBUF_NAMESPACE_ID::SourceContext::internal_default_instance());
1693 }
1694 class Enum::_Internal {
1695 public:
1696 static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Enum* msg);
1697 };
1698
1699 const PROTOBUF_NAMESPACE_ID::SourceContext&
source_context(const Enum * msg)1700 Enum::_Internal::source_context(const Enum* msg) {
1701 return *msg->source_context_;
1702 }
unsafe_arena_set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext * source_context)1703 void Enum::unsafe_arena_set_allocated_source_context(
1704 PROTOBUF_NAMESPACE_ID::SourceContext* source_context) {
1705 if (GetArenaNoVirtual() == nullptr) {
1706 delete source_context_;
1707 }
1708 source_context_ = source_context;
1709 if (source_context) {
1710
1711 } else {
1712
1713 }
1714 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Enum.source_context)
1715 }
clear_source_context()1716 void Enum::clear_source_context() {
1717 if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
1718 delete source_context_;
1719 }
1720 source_context_ = nullptr;
1721 }
Enum()1722 Enum::Enum()
1723 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1724 SharedCtor();
1725 // @@protoc_insertion_point(constructor:google.protobuf.Enum)
1726 }
Enum(::PROTOBUF_NAMESPACE_ID::Arena * arena)1727 Enum::Enum(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1728 : ::PROTOBUF_NAMESPACE_ID::Message(),
1729 _internal_metadata_(arena),
1730 enumvalue_(arena),
1731 options_(arena) {
1732 SharedCtor();
1733 RegisterArenaDtor(arena);
1734 // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum)
1735 }
Enum(const Enum & from)1736 Enum::Enum(const Enum& from)
1737 : ::PROTOBUF_NAMESPACE_ID::Message(),
1738 _internal_metadata_(nullptr),
1739 enumvalue_(from.enumvalue_),
1740 options_(from.options_) {
1741 _internal_metadata_.MergeFrom(from._internal_metadata_);
1742 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1743 if (!from.name().empty()) {
1744 name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(),
1745 GetArenaNoVirtual());
1746 }
1747 if (from.has_source_context()) {
1748 source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
1749 } else {
1750 source_context_ = nullptr;
1751 }
1752 syntax_ = from.syntax_;
1753 // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
1754 }
1755
SharedCtor()1756 void Enum::SharedCtor() {
1757 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Enum_google_2fprotobuf_2ftype_2eproto.base);
1758 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1759 ::memset(&source_context_, 0, static_cast<size_t>(
1760 reinterpret_cast<char*>(&syntax_) -
1761 reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
1762 }
1763
~Enum()1764 Enum::~Enum() {
1765 // @@protoc_insertion_point(destructor:google.protobuf.Enum)
1766 SharedDtor();
1767 }
1768
SharedDtor()1769 void Enum::SharedDtor() {
1770 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
1771 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1772 if (this != internal_default_instance()) delete source_context_;
1773 }
1774
ArenaDtor(void * object)1775 void Enum::ArenaDtor(void* object) {
1776 Enum* _this = reinterpret_cast< Enum* >(object);
1777 (void)_this;
1778 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)1779 void Enum::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1780 }
SetCachedSize(int size) const1781 void Enum::SetCachedSize(int size) const {
1782 _cached_size_.Set(size);
1783 }
default_instance()1784 const Enum& Enum::default_instance() {
1785 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Enum_google_2fprotobuf_2ftype_2eproto.base);
1786 return *internal_default_instance();
1787 }
1788
1789
Clear()1790 void Enum::Clear() {
1791 // @@protoc_insertion_point(message_clear_start:google.protobuf.Enum)
1792 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1793 // Prevent compiler warnings about cached_has_bits being unused
1794 (void) cached_has_bits;
1795
1796 enumvalue_.Clear();
1797 options_.Clear();
1798 name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1799 if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) {
1800 delete source_context_;
1801 }
1802 source_context_ = nullptr;
1803 syntax_ = 0;
1804 _internal_metadata_.Clear();
1805 }
1806
1807 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)1808 const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1809 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1810 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
1811 while (!ctx->Done(&ptr)) {
1812 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1813 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1814 CHK_(ptr);
1815 switch (tag >> 3) {
1816 // string name = 1;
1817 case 1:
1818 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1819 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Enum.name");
1820 CHK_(ptr);
1821 } else goto handle_unusual;
1822 continue;
1823 // repeated .google.protobuf.EnumValue enumvalue = 2;
1824 case 2:
1825 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
1826 ptr -= 1;
1827 do {
1828 ptr += 1;
1829 ptr = ctx->ParseMessage(add_enumvalue(), ptr);
1830 CHK_(ptr);
1831 if (!ctx->DataAvailable(ptr)) break;
1832 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
1833 } else goto handle_unusual;
1834 continue;
1835 // repeated .google.protobuf.Option options = 3;
1836 case 3:
1837 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
1838 ptr -= 1;
1839 do {
1840 ptr += 1;
1841 ptr = ctx->ParseMessage(add_options(), ptr);
1842 CHK_(ptr);
1843 if (!ctx->DataAvailable(ptr)) break;
1844 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
1845 } else goto handle_unusual;
1846 continue;
1847 // .google.protobuf.SourceContext source_context = 4;
1848 case 4:
1849 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
1850 ptr = ctx->ParseMessage(mutable_source_context(), ptr);
1851 CHK_(ptr);
1852 } else goto handle_unusual;
1853 continue;
1854 // .google.protobuf.Syntax syntax = 5;
1855 case 5:
1856 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
1857 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1858 CHK_(ptr);
1859 set_syntax(static_cast<PROTOBUF_NAMESPACE_ID::Syntax>(val));
1860 } else goto handle_unusual;
1861 continue;
1862 default: {
1863 handle_unusual:
1864 if ((tag & 7) == 4 || tag == 0) {
1865 ctx->SetLastTag(tag);
1866 goto success;
1867 }
1868 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1869 CHK_(ptr != nullptr);
1870 continue;
1871 }
1872 } // switch
1873 } // while
1874 success:
1875 return ptr;
1876 failure:
1877 ptr = nullptr;
1878 goto success;
1879 #undef CHK_
1880 }
1881 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)1882 bool Enum::MergePartialFromCodedStream(
1883 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1884 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1885 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1886 // @@protoc_insertion_point(parse_start:google.protobuf.Enum)
1887 for (;;) {
1888 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1889 tag = p.first;
1890 if (!p.second) goto handle_unusual;
1891 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1892 // string name = 1;
1893 case 1: {
1894 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
1895 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1896 input, this->mutable_name()));
1897 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1898 this->name().data(), static_cast<int>(this->name().length()),
1899 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1900 "google.protobuf.Enum.name"));
1901 } else {
1902 goto handle_unusual;
1903 }
1904 break;
1905 }
1906
1907 // repeated .google.protobuf.EnumValue enumvalue = 2;
1908 case 2: {
1909 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
1910 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1911 input, add_enumvalue()));
1912 } else {
1913 goto handle_unusual;
1914 }
1915 break;
1916 }
1917
1918 // repeated .google.protobuf.Option options = 3;
1919 case 3: {
1920 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
1921 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1922 input, add_options()));
1923 } else {
1924 goto handle_unusual;
1925 }
1926 break;
1927 }
1928
1929 // .google.protobuf.SourceContext source_context = 4;
1930 case 4: {
1931 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
1932 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1933 input, mutable_source_context()));
1934 } else {
1935 goto handle_unusual;
1936 }
1937 break;
1938 }
1939
1940 // .google.protobuf.Syntax syntax = 5;
1941 case 5: {
1942 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
1943 int value = 0;
1944 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1945 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
1946 input, &value)));
1947 set_syntax(static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(value));
1948 } else {
1949 goto handle_unusual;
1950 }
1951 break;
1952 }
1953
1954 default: {
1955 handle_unusual:
1956 if (tag == 0) {
1957 goto success;
1958 }
1959 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1960 input, tag, _internal_metadata_.mutable_unknown_fields()));
1961 break;
1962 }
1963 }
1964 }
1965 success:
1966 // @@protoc_insertion_point(parse_success:google.protobuf.Enum)
1967 return true;
1968 failure:
1969 // @@protoc_insertion_point(parse_failure:google.protobuf.Enum)
1970 return false;
1971 #undef DO_
1972 }
1973 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1974
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const1975 void Enum::SerializeWithCachedSizes(
1976 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1977 // @@protoc_insertion_point(serialize_start:google.protobuf.Enum)
1978 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1979 (void) cached_has_bits;
1980
1981 // string name = 1;
1982 if (this->name().size() > 0) {
1983 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1984 this->name().data(), static_cast<int>(this->name().length()),
1985 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1986 "google.protobuf.Enum.name");
1987 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1988 1, this->name(), output);
1989 }
1990
1991 // repeated .google.protobuf.EnumValue enumvalue = 2;
1992 for (unsigned int i = 0,
1993 n = static_cast<unsigned int>(this->enumvalue_size()); i < n; i++) {
1994 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1995 2,
1996 this->enumvalue(static_cast<int>(i)),
1997 output);
1998 }
1999
2000 // repeated .google.protobuf.Option options = 3;
2001 for (unsigned int i = 0,
2002 n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
2003 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2004 3,
2005 this->options(static_cast<int>(i)),
2006 output);
2007 }
2008
2009 // .google.protobuf.SourceContext source_context = 4;
2010 if (this->has_source_context()) {
2011 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2012 4, _Internal::source_context(this), output);
2013 }
2014
2015 // .google.protobuf.Syntax syntax = 5;
2016 if (this->syntax() != 0) {
2017 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
2018 5, this->syntax(), output);
2019 }
2020
2021 if (_internal_metadata_.have_unknown_fields()) {
2022 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
2023 _internal_metadata_.unknown_fields(), output);
2024 }
2025 // @@protoc_insertion_point(serialize_end:google.protobuf.Enum)
2026 }
2027
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const2028 ::PROTOBUF_NAMESPACE_ID::uint8* Enum::InternalSerializeWithCachedSizesToArray(
2029 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
2030 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
2031 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2032 (void) cached_has_bits;
2033
2034 // string name = 1;
2035 if (this->name().size() > 0) {
2036 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2037 this->name().data(), static_cast<int>(this->name().length()),
2038 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2039 "google.protobuf.Enum.name");
2040 target =
2041 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2042 1, this->name(), target);
2043 }
2044
2045 // repeated .google.protobuf.EnumValue enumvalue = 2;
2046 for (unsigned int i = 0,
2047 n = static_cast<unsigned int>(this->enumvalue_size()); i < n; i++) {
2048 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2049 InternalWriteMessageToArray(
2050 2, this->enumvalue(static_cast<int>(i)), target);
2051 }
2052
2053 // repeated .google.protobuf.Option options = 3;
2054 for (unsigned int i = 0,
2055 n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
2056 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2057 InternalWriteMessageToArray(
2058 3, this->options(static_cast<int>(i)), target);
2059 }
2060
2061 // .google.protobuf.SourceContext source_context = 4;
2062 if (this->has_source_context()) {
2063 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2064 InternalWriteMessageToArray(
2065 4, _Internal::source_context(this), target);
2066 }
2067
2068 // .google.protobuf.Syntax syntax = 5;
2069 if (this->syntax() != 0) {
2070 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
2071 5, this->syntax(), target);
2072 }
2073
2074 if (_internal_metadata_.have_unknown_fields()) {
2075 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
2076 _internal_metadata_.unknown_fields(), target);
2077 }
2078 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum)
2079 return target;
2080 }
2081
ByteSizeLong() const2082 size_t Enum::ByteSizeLong() const {
2083 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum)
2084 size_t total_size = 0;
2085
2086 if (_internal_metadata_.have_unknown_fields()) {
2087 total_size +=
2088 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
2089 _internal_metadata_.unknown_fields());
2090 }
2091 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2092 // Prevent compiler warnings about cached_has_bits being unused
2093 (void) cached_has_bits;
2094
2095 // repeated .google.protobuf.EnumValue enumvalue = 2;
2096 {
2097 unsigned int count = static_cast<unsigned int>(this->enumvalue_size());
2098 total_size += 1UL * count;
2099 for (unsigned int i = 0; i < count; i++) {
2100 total_size +=
2101 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2102 this->enumvalue(static_cast<int>(i)));
2103 }
2104 }
2105
2106 // repeated .google.protobuf.Option options = 3;
2107 {
2108 unsigned int count = static_cast<unsigned int>(this->options_size());
2109 total_size += 1UL * count;
2110 for (unsigned int i = 0; i < count; i++) {
2111 total_size +=
2112 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2113 this->options(static_cast<int>(i)));
2114 }
2115 }
2116
2117 // string name = 1;
2118 if (this->name().size() > 0) {
2119 total_size += 1 +
2120 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2121 this->name());
2122 }
2123
2124 // .google.protobuf.SourceContext source_context = 4;
2125 if (this->has_source_context()) {
2126 total_size += 1 +
2127 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2128 *source_context_);
2129 }
2130
2131 // .google.protobuf.Syntax syntax = 5;
2132 if (this->syntax() != 0) {
2133 total_size += 1 +
2134 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->syntax());
2135 }
2136
2137 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
2138 SetCachedSize(cached_size);
2139 return total_size;
2140 }
2141
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)2142 void Enum::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2143 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Enum)
2144 GOOGLE_DCHECK_NE(&from, this);
2145 const Enum* source =
2146 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Enum>(
2147 &from);
2148 if (source == nullptr) {
2149 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Enum)
2150 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
2151 } else {
2152 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Enum)
2153 MergeFrom(*source);
2154 }
2155 }
2156
MergeFrom(const Enum & from)2157 void Enum::MergeFrom(const Enum& from) {
2158 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
2159 GOOGLE_DCHECK_NE(&from, this);
2160 _internal_metadata_.MergeFrom(from._internal_metadata_);
2161 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2162 (void) cached_has_bits;
2163
2164 enumvalue_.MergeFrom(from.enumvalue_);
2165 options_.MergeFrom(from.options_);
2166 if (from.name().size() > 0) {
2167 set_name(from.name());
2168 }
2169 if (from.has_source_context()) {
2170 mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from.source_context());
2171 }
2172 if (from.syntax() != 0) {
2173 set_syntax(from.syntax());
2174 }
2175 }
2176
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)2177 void Enum::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2178 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Enum)
2179 if (&from == this) return;
2180 Clear();
2181 MergeFrom(from);
2182 }
2183
CopyFrom(const Enum & from)2184 void Enum::CopyFrom(const Enum& from) {
2185 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Enum)
2186 if (&from == this) return;
2187 Clear();
2188 MergeFrom(from);
2189 }
2190
IsInitialized() const2191 bool Enum::IsInitialized() const {
2192 return true;
2193 }
2194
InternalSwap(Enum * other)2195 void Enum::InternalSwap(Enum* other) {
2196 using std::swap;
2197 _internal_metadata_.Swap(&other->_internal_metadata_);
2198 CastToBase(&enumvalue_)->InternalSwap(CastToBase(&other->enumvalue_));
2199 CastToBase(&options_)->InternalSwap(CastToBase(&other->options_));
2200 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2201 GetArenaNoVirtual());
2202 swap(source_context_, other->source_context_);
2203 swap(syntax_, other->syntax_);
2204 }
2205
GetMetadata() const2206 ::PROTOBUF_NAMESPACE_ID::Metadata Enum::GetMetadata() const {
2207 return GetMetadataStatic();
2208 }
2209
2210
2211 // ===================================================================
2212
InitAsDefaultInstance()2213 void EnumValue::InitAsDefaultInstance() {
2214 }
2215 class EnumValue::_Internal {
2216 public:
2217 };
2218
EnumValue()2219 EnumValue::EnumValue()
2220 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
2221 SharedCtor();
2222 // @@protoc_insertion_point(constructor:google.protobuf.EnumValue)
2223 }
EnumValue(::PROTOBUF_NAMESPACE_ID::Arena * arena)2224 EnumValue::EnumValue(::PROTOBUF_NAMESPACE_ID::Arena* arena)
2225 : ::PROTOBUF_NAMESPACE_ID::Message(),
2226 _internal_metadata_(arena),
2227 options_(arena) {
2228 SharedCtor();
2229 RegisterArenaDtor(arena);
2230 // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue)
2231 }
EnumValue(const EnumValue & from)2232 EnumValue::EnumValue(const EnumValue& from)
2233 : ::PROTOBUF_NAMESPACE_ID::Message(),
2234 _internal_metadata_(nullptr),
2235 options_(from.options_) {
2236 _internal_metadata_.MergeFrom(from._internal_metadata_);
2237 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2238 if (!from.name().empty()) {
2239 name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(),
2240 GetArenaNoVirtual());
2241 }
2242 number_ = from.number_;
2243 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
2244 }
2245
SharedCtor()2246 void EnumValue::SharedCtor() {
2247 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base);
2248 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2249 number_ = 0;
2250 }
2251
~EnumValue()2252 EnumValue::~EnumValue() {
2253 // @@protoc_insertion_point(destructor:google.protobuf.EnumValue)
2254 SharedDtor();
2255 }
2256
SharedDtor()2257 void EnumValue::SharedDtor() {
2258 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
2259 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2260 }
2261
ArenaDtor(void * object)2262 void EnumValue::ArenaDtor(void* object) {
2263 EnumValue* _this = reinterpret_cast< EnumValue* >(object);
2264 (void)_this;
2265 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)2266 void EnumValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
2267 }
SetCachedSize(int size) const2268 void EnumValue::SetCachedSize(int size) const {
2269 _cached_size_.Set(size);
2270 }
default_instance()2271 const EnumValue& EnumValue::default_instance() {
2272 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base);
2273 return *internal_default_instance();
2274 }
2275
2276
Clear()2277 void EnumValue::Clear() {
2278 // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue)
2279 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2280 // Prevent compiler warnings about cached_has_bits being unused
2281 (void) cached_has_bits;
2282
2283 options_.Clear();
2284 name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
2285 number_ = 0;
2286 _internal_metadata_.Clear();
2287 }
2288
2289 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)2290 const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
2291 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2292 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
2293 while (!ctx->Done(&ptr)) {
2294 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
2295 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
2296 CHK_(ptr);
2297 switch (tag >> 3) {
2298 // string name = 1;
2299 case 1:
2300 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
2301 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.EnumValue.name");
2302 CHK_(ptr);
2303 } else goto handle_unusual;
2304 continue;
2305 // int32 number = 2;
2306 case 2:
2307 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
2308 number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
2309 CHK_(ptr);
2310 } else goto handle_unusual;
2311 continue;
2312 // repeated .google.protobuf.Option options = 3;
2313 case 3:
2314 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
2315 ptr -= 1;
2316 do {
2317 ptr += 1;
2318 ptr = ctx->ParseMessage(add_options(), ptr);
2319 CHK_(ptr);
2320 if (!ctx->DataAvailable(ptr)) break;
2321 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
2322 } else goto handle_unusual;
2323 continue;
2324 default: {
2325 handle_unusual:
2326 if ((tag & 7) == 4 || tag == 0) {
2327 ctx->SetLastTag(tag);
2328 goto success;
2329 }
2330 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
2331 CHK_(ptr != nullptr);
2332 continue;
2333 }
2334 } // switch
2335 } // while
2336 success:
2337 return ptr;
2338 failure:
2339 ptr = nullptr;
2340 goto success;
2341 #undef CHK_
2342 }
2343 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)2344 bool EnumValue::MergePartialFromCodedStream(
2345 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
2346 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
2347 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
2348 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValue)
2349 for (;;) {
2350 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
2351 tag = p.first;
2352 if (!p.second) goto handle_unusual;
2353 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2354 // string name = 1;
2355 case 1: {
2356 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
2357 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
2358 input, this->mutable_name()));
2359 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2360 this->name().data(), static_cast<int>(this->name().length()),
2361 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2362 "google.protobuf.EnumValue.name"));
2363 } else {
2364 goto handle_unusual;
2365 }
2366 break;
2367 }
2368
2369 // int32 number = 2;
2370 case 2: {
2371 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
2372
2373 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
2374 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
2375 input, &number_)));
2376 } else {
2377 goto handle_unusual;
2378 }
2379 break;
2380 }
2381
2382 // repeated .google.protobuf.Option options = 3;
2383 case 3: {
2384 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
2385 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
2386 input, add_options()));
2387 } else {
2388 goto handle_unusual;
2389 }
2390 break;
2391 }
2392
2393 default: {
2394 handle_unusual:
2395 if (tag == 0) {
2396 goto success;
2397 }
2398 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
2399 input, tag, _internal_metadata_.mutable_unknown_fields()));
2400 break;
2401 }
2402 }
2403 }
2404 success:
2405 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValue)
2406 return true;
2407 failure:
2408 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValue)
2409 return false;
2410 #undef DO_
2411 }
2412 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2413
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const2414 void EnumValue::SerializeWithCachedSizes(
2415 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
2416 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue)
2417 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2418 (void) cached_has_bits;
2419
2420 // string name = 1;
2421 if (this->name().size() > 0) {
2422 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2423 this->name().data(), static_cast<int>(this->name().length()),
2424 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2425 "google.protobuf.EnumValue.name");
2426 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2427 1, this->name(), output);
2428 }
2429
2430 // int32 number = 2;
2431 if (this->number() != 0) {
2432 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->number(), output);
2433 }
2434
2435 // repeated .google.protobuf.Option options = 3;
2436 for (unsigned int i = 0,
2437 n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
2438 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2439 3,
2440 this->options(static_cast<int>(i)),
2441 output);
2442 }
2443
2444 if (_internal_metadata_.have_unknown_fields()) {
2445 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
2446 _internal_metadata_.unknown_fields(), output);
2447 }
2448 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValue)
2449 }
2450
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const2451 ::PROTOBUF_NAMESPACE_ID::uint8* EnumValue::InternalSerializeWithCachedSizesToArray(
2452 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
2453 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
2454 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2455 (void) cached_has_bits;
2456
2457 // string name = 1;
2458 if (this->name().size() > 0) {
2459 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2460 this->name().data(), static_cast<int>(this->name().length()),
2461 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2462 "google.protobuf.EnumValue.name");
2463 target =
2464 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2465 1, this->name(), target);
2466 }
2467
2468 // int32 number = 2;
2469 if (this->number() != 0) {
2470 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target);
2471 }
2472
2473 // repeated .google.protobuf.Option options = 3;
2474 for (unsigned int i = 0,
2475 n = static_cast<unsigned int>(this->options_size()); i < n; i++) {
2476 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2477 InternalWriteMessageToArray(
2478 3, this->options(static_cast<int>(i)), target);
2479 }
2480
2481 if (_internal_metadata_.have_unknown_fields()) {
2482 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
2483 _internal_metadata_.unknown_fields(), target);
2484 }
2485 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue)
2486 return target;
2487 }
2488
ByteSizeLong() const2489 size_t EnumValue::ByteSizeLong() const {
2490 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue)
2491 size_t total_size = 0;
2492
2493 if (_internal_metadata_.have_unknown_fields()) {
2494 total_size +=
2495 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
2496 _internal_metadata_.unknown_fields());
2497 }
2498 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2499 // Prevent compiler warnings about cached_has_bits being unused
2500 (void) cached_has_bits;
2501
2502 // repeated .google.protobuf.Option options = 3;
2503 {
2504 unsigned int count = static_cast<unsigned int>(this->options_size());
2505 total_size += 1UL * count;
2506 for (unsigned int i = 0; i < count; i++) {
2507 total_size +=
2508 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2509 this->options(static_cast<int>(i)));
2510 }
2511 }
2512
2513 // string name = 1;
2514 if (this->name().size() > 0) {
2515 total_size += 1 +
2516 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2517 this->name());
2518 }
2519
2520 // int32 number = 2;
2521 if (this->number() != 0) {
2522 total_size += 1 +
2523 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
2524 this->number());
2525 }
2526
2527 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
2528 SetCachedSize(cached_size);
2529 return total_size;
2530 }
2531
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)2532 void EnumValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2533 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumValue)
2534 GOOGLE_DCHECK_NE(&from, this);
2535 const EnumValue* source =
2536 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<EnumValue>(
2537 &from);
2538 if (source == nullptr) {
2539 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumValue)
2540 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
2541 } else {
2542 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.EnumValue)
2543 MergeFrom(*source);
2544 }
2545 }
2546
MergeFrom(const EnumValue & from)2547 void EnumValue::MergeFrom(const EnumValue& from) {
2548 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
2549 GOOGLE_DCHECK_NE(&from, this);
2550 _internal_metadata_.MergeFrom(from._internal_metadata_);
2551 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2552 (void) cached_has_bits;
2553
2554 options_.MergeFrom(from.options_);
2555 if (from.name().size() > 0) {
2556 set_name(from.name());
2557 }
2558 if (from.number() != 0) {
2559 set_number(from.number());
2560 }
2561 }
2562
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)2563 void EnumValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2564 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumValue)
2565 if (&from == this) return;
2566 Clear();
2567 MergeFrom(from);
2568 }
2569
CopyFrom(const EnumValue & from)2570 void EnumValue::CopyFrom(const EnumValue& from) {
2571 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumValue)
2572 if (&from == this) return;
2573 Clear();
2574 MergeFrom(from);
2575 }
2576
IsInitialized() const2577 bool EnumValue::IsInitialized() const {
2578 return true;
2579 }
2580
InternalSwap(EnumValue * other)2581 void EnumValue::InternalSwap(EnumValue* other) {
2582 using std::swap;
2583 _internal_metadata_.Swap(&other->_internal_metadata_);
2584 CastToBase(&options_)->InternalSwap(CastToBase(&other->options_));
2585 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2586 GetArenaNoVirtual());
2587 swap(number_, other->number_);
2588 }
2589
GetMetadata() const2590 ::PROTOBUF_NAMESPACE_ID::Metadata EnumValue::GetMetadata() const {
2591 return GetMetadataStatic();
2592 }
2593
2594
2595 // ===================================================================
2596
InitAsDefaultInstance()2597 void Option::InitAsDefaultInstance() {
2598 PROTOBUF_NAMESPACE_ID::_Option_default_instance_._instance.get_mutable()->value_ = const_cast< PROTOBUF_NAMESPACE_ID::Any*>(
2599 PROTOBUF_NAMESPACE_ID::Any::internal_default_instance());
2600 }
2601 class Option::_Internal {
2602 public:
2603 static const PROTOBUF_NAMESPACE_ID::Any& value(const Option* msg);
2604 };
2605
2606 const PROTOBUF_NAMESPACE_ID::Any&
value(const Option * msg)2607 Option::_Internal::value(const Option* msg) {
2608 return *msg->value_;
2609 }
unsafe_arena_set_allocated_value(PROTOBUF_NAMESPACE_ID::Any * value)2610 void Option::unsafe_arena_set_allocated_value(
2611 PROTOBUF_NAMESPACE_ID::Any* value) {
2612 if (GetArenaNoVirtual() == nullptr) {
2613 delete value_;
2614 }
2615 value_ = value;
2616 if (value) {
2617
2618 } else {
2619
2620 }
2621 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Option.value)
2622 }
clear_value()2623 void Option::clear_value() {
2624 if (GetArenaNoVirtual() == nullptr && value_ != nullptr) {
2625 delete value_;
2626 }
2627 value_ = nullptr;
2628 }
Option()2629 Option::Option()
2630 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
2631 SharedCtor();
2632 // @@protoc_insertion_point(constructor:google.protobuf.Option)
2633 }
Option(::PROTOBUF_NAMESPACE_ID::Arena * arena)2634 Option::Option(::PROTOBUF_NAMESPACE_ID::Arena* arena)
2635 : ::PROTOBUF_NAMESPACE_ID::Message(),
2636 _internal_metadata_(arena) {
2637 SharedCtor();
2638 RegisterArenaDtor(arena);
2639 // @@protoc_insertion_point(arena_constructor:google.protobuf.Option)
2640 }
Option(const Option & from)2641 Option::Option(const Option& from)
2642 : ::PROTOBUF_NAMESPACE_ID::Message(),
2643 _internal_metadata_(nullptr) {
2644 _internal_metadata_.MergeFrom(from._internal_metadata_);
2645 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2646 if (!from.name().empty()) {
2647 name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(),
2648 GetArenaNoVirtual());
2649 }
2650 if (from.has_value()) {
2651 value_ = new PROTOBUF_NAMESPACE_ID::Any(*from.value_);
2652 } else {
2653 value_ = nullptr;
2654 }
2655 // @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
2656 }
2657
SharedCtor()2658 void Option::SharedCtor() {
2659 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Option_google_2fprotobuf_2ftype_2eproto.base);
2660 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2661 value_ = nullptr;
2662 }
2663
~Option()2664 Option::~Option() {
2665 // @@protoc_insertion_point(destructor:google.protobuf.Option)
2666 SharedDtor();
2667 }
2668
SharedDtor()2669 void Option::SharedDtor() {
2670 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
2671 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2672 if (this != internal_default_instance()) delete value_;
2673 }
2674
ArenaDtor(void * object)2675 void Option::ArenaDtor(void* object) {
2676 Option* _this = reinterpret_cast< Option* >(object);
2677 (void)_this;
2678 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)2679 void Option::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
2680 }
SetCachedSize(int size) const2681 void Option::SetCachedSize(int size) const {
2682 _cached_size_.Set(size);
2683 }
default_instance()2684 const Option& Option::default_instance() {
2685 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Option_google_2fprotobuf_2ftype_2eproto.base);
2686 return *internal_default_instance();
2687 }
2688
2689
Clear()2690 void Option::Clear() {
2691 // @@protoc_insertion_point(message_clear_start:google.protobuf.Option)
2692 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2693 // Prevent compiler warnings about cached_has_bits being unused
2694 (void) cached_has_bits;
2695
2696 name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
2697 if (GetArenaNoVirtual() == nullptr && value_ != nullptr) {
2698 delete value_;
2699 }
2700 value_ = nullptr;
2701 _internal_metadata_.Clear();
2702 }
2703
2704 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)2705 const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
2706 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2707 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
2708 while (!ctx->Done(&ptr)) {
2709 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
2710 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
2711 CHK_(ptr);
2712 switch (tag >> 3) {
2713 // string name = 1;
2714 case 1:
2715 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
2716 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Option.name");
2717 CHK_(ptr);
2718 } else goto handle_unusual;
2719 continue;
2720 // .google.protobuf.Any value = 2;
2721 case 2:
2722 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
2723 ptr = ctx->ParseMessage(mutable_value(), ptr);
2724 CHK_(ptr);
2725 } else goto handle_unusual;
2726 continue;
2727 default: {
2728 handle_unusual:
2729 if ((tag & 7) == 4 || tag == 0) {
2730 ctx->SetLastTag(tag);
2731 goto success;
2732 }
2733 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
2734 CHK_(ptr != nullptr);
2735 continue;
2736 }
2737 } // switch
2738 } // while
2739 success:
2740 return ptr;
2741 failure:
2742 ptr = nullptr;
2743 goto success;
2744 #undef CHK_
2745 }
2746 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)2747 bool Option::MergePartialFromCodedStream(
2748 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
2749 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
2750 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
2751 // @@protoc_insertion_point(parse_start:google.protobuf.Option)
2752 for (;;) {
2753 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
2754 tag = p.first;
2755 if (!p.second) goto handle_unusual;
2756 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2757 // string name = 1;
2758 case 1: {
2759 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
2760 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
2761 input, this->mutable_name()));
2762 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2763 this->name().data(), static_cast<int>(this->name().length()),
2764 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2765 "google.protobuf.Option.name"));
2766 } else {
2767 goto handle_unusual;
2768 }
2769 break;
2770 }
2771
2772 // .google.protobuf.Any value = 2;
2773 case 2: {
2774 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
2775 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
2776 input, mutable_value()));
2777 } else {
2778 goto handle_unusual;
2779 }
2780 break;
2781 }
2782
2783 default: {
2784 handle_unusual:
2785 if (tag == 0) {
2786 goto success;
2787 }
2788 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
2789 input, tag, _internal_metadata_.mutable_unknown_fields()));
2790 break;
2791 }
2792 }
2793 }
2794 success:
2795 // @@protoc_insertion_point(parse_success:google.protobuf.Option)
2796 return true;
2797 failure:
2798 // @@protoc_insertion_point(parse_failure:google.protobuf.Option)
2799 return false;
2800 #undef DO_
2801 }
2802 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2803
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const2804 void Option::SerializeWithCachedSizes(
2805 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
2806 // @@protoc_insertion_point(serialize_start:google.protobuf.Option)
2807 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2808 (void) cached_has_bits;
2809
2810 // string name = 1;
2811 if (this->name().size() > 0) {
2812 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2813 this->name().data(), static_cast<int>(this->name().length()),
2814 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2815 "google.protobuf.Option.name");
2816 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2817 1, this->name(), output);
2818 }
2819
2820 // .google.protobuf.Any value = 2;
2821 if (this->has_value()) {
2822 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2823 2, _Internal::value(this), output);
2824 }
2825
2826 if (_internal_metadata_.have_unknown_fields()) {
2827 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
2828 _internal_metadata_.unknown_fields(), output);
2829 }
2830 // @@protoc_insertion_point(serialize_end:google.protobuf.Option)
2831 }
2832
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const2833 ::PROTOBUF_NAMESPACE_ID::uint8* Option::InternalSerializeWithCachedSizesToArray(
2834 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
2835 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
2836 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2837 (void) cached_has_bits;
2838
2839 // string name = 1;
2840 if (this->name().size() > 0) {
2841 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2842 this->name().data(), static_cast<int>(this->name().length()),
2843 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2844 "google.protobuf.Option.name");
2845 target =
2846 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2847 1, this->name(), target);
2848 }
2849
2850 // .google.protobuf.Any value = 2;
2851 if (this->has_value()) {
2852 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2853 InternalWriteMessageToArray(
2854 2, _Internal::value(this), target);
2855 }
2856
2857 if (_internal_metadata_.have_unknown_fields()) {
2858 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
2859 _internal_metadata_.unknown_fields(), target);
2860 }
2861 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option)
2862 return target;
2863 }
2864
ByteSizeLong() const2865 size_t Option::ByteSizeLong() const {
2866 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option)
2867 size_t total_size = 0;
2868
2869 if (_internal_metadata_.have_unknown_fields()) {
2870 total_size +=
2871 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
2872 _internal_metadata_.unknown_fields());
2873 }
2874 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2875 // Prevent compiler warnings about cached_has_bits being unused
2876 (void) cached_has_bits;
2877
2878 // string name = 1;
2879 if (this->name().size() > 0) {
2880 total_size += 1 +
2881 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2882 this->name());
2883 }
2884
2885 // .google.protobuf.Any value = 2;
2886 if (this->has_value()) {
2887 total_size += 1 +
2888 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2889 *value_);
2890 }
2891
2892 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
2893 SetCachedSize(cached_size);
2894 return total_size;
2895 }
2896
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)2897 void Option::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2898 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Option)
2899 GOOGLE_DCHECK_NE(&from, this);
2900 const Option* source =
2901 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Option>(
2902 &from);
2903 if (source == nullptr) {
2904 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Option)
2905 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
2906 } else {
2907 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Option)
2908 MergeFrom(*source);
2909 }
2910 }
2911
MergeFrom(const Option & from)2912 void Option::MergeFrom(const Option& from) {
2913 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
2914 GOOGLE_DCHECK_NE(&from, this);
2915 _internal_metadata_.MergeFrom(from._internal_metadata_);
2916 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2917 (void) cached_has_bits;
2918
2919 if (from.name().size() > 0) {
2920 set_name(from.name());
2921 }
2922 if (from.has_value()) {
2923 mutable_value()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from.value());
2924 }
2925 }
2926
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)2927 void Option::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2928 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Option)
2929 if (&from == this) return;
2930 Clear();
2931 MergeFrom(from);
2932 }
2933
CopyFrom(const Option & from)2934 void Option::CopyFrom(const Option& from) {
2935 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Option)
2936 if (&from == this) return;
2937 Clear();
2938 MergeFrom(from);
2939 }
2940
IsInitialized() const2941 bool Option::IsInitialized() const {
2942 return true;
2943 }
2944
InternalSwap(Option * other)2945 void Option::InternalSwap(Option* other) {
2946 using std::swap;
2947 _internal_metadata_.Swap(&other->_internal_metadata_);
2948 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2949 GetArenaNoVirtual());
2950 swap(value_, other->value_);
2951 }
2952
GetMetadata() const2953 ::PROTOBUF_NAMESPACE_ID::Metadata Option::GetMetadata() const {
2954 return GetMetadataStatic();
2955 }
2956
2957
2958 // @@protoc_insertion_point(namespace_scope)
2959 PROTOBUF_NAMESPACE_CLOSE
2960 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)2961 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Type* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Type >(Arena* arena) {
2962 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Type >(arena);
2963 }
CreateMaybeMessage(Arena * arena)2964 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Field* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Field >(Arena* arena) {
2965 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Field >(arena);
2966 }
CreateMaybeMessage(Arena * arena)2967 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Enum* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Enum >(Arena* arena) {
2968 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Enum >(arena);
2969 }
CreateMaybeMessage(Arena * arena)2970 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumValue >(Arena* arena) {
2971 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumValue >(arena);
2972 }
CreateMaybeMessage(Arena * arena)2973 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Option* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Option >(Arena* arena) {
2974 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Option >(arena);
2975 }
2976 PROTOBUF_NAMESPACE_CLOSE
2977
2978 // @@protoc_insertion_point(global_scope)
2979 #include <google/protobuf/port_undef.inc>
2980