1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/type.proto
3
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include <google/protobuf/type.pb.h>
6
7 #include <algorithm>
8
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/port.h>
11 #include <google/protobuf/stubs/once.h>
12 #include <google/protobuf/io/coded_stream.h>
13 #include <google/protobuf/wire_format_lite_inl.h>
14 #include <google/protobuf/descriptor.h>
15 #include <google/protobuf/generated_message_reflection.h>
16 #include <google/protobuf/reflection_ops.h>
17 #include <google/protobuf/wire_format.h>
18 // @@protoc_insertion_point(includes)
19
20 namespace google {
21 namespace protobuf {
22
23 namespace {
24
25 const ::google::protobuf::Descriptor* Type_descriptor_ = NULL;
26 const ::google::protobuf::internal::GeneratedMessageReflection*
27 Type_reflection_ = NULL;
28 const ::google::protobuf::Descriptor* Field_descriptor_ = NULL;
29 const ::google::protobuf::internal::GeneratedMessageReflection*
30 Field_reflection_ = NULL;
31 const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor_ = NULL;
32 const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor_ = NULL;
33 const ::google::protobuf::Descriptor* Enum_descriptor_ = NULL;
34 const ::google::protobuf::internal::GeneratedMessageReflection*
35 Enum_reflection_ = NULL;
36 const ::google::protobuf::Descriptor* EnumValue_descriptor_ = NULL;
37 const ::google::protobuf::internal::GeneratedMessageReflection*
38 EnumValue_reflection_ = NULL;
39 const ::google::protobuf::Descriptor* Option_descriptor_ = NULL;
40 const ::google::protobuf::internal::GeneratedMessageReflection*
41 Option_reflection_ = NULL;
42 const ::google::protobuf::EnumDescriptor* Syntax_descriptor_ = NULL;
43
44 } // namespace
45
46
protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto()47 void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto() {
48 protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
49 const ::google::protobuf::FileDescriptor* file =
50 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
51 "google/protobuf/type.proto");
52 GOOGLE_CHECK(file != NULL);
53 Type_descriptor_ = file->message_type(0);
54 static const int Type_offsets_[6] = {
55 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, name_),
56 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, fields_),
57 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, oneofs_),
58 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, options_),
59 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, source_context_),
60 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, syntax_),
61 };
62 Type_reflection_ =
63 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
64 Type_descriptor_,
65 Type::default_instance_,
66 Type_offsets_,
67 -1,
68 -1,
69 -1,
70 sizeof(Type),
71 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, _internal_metadata_),
72 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, _is_default_instance_));
73 Field_descriptor_ = file->message_type(1);
74 static const int Field_offsets_[10] = {
75 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, kind_),
76 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, cardinality_),
77 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, number_),
78 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, name_),
79 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, type_url_),
80 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, oneof_index_),
81 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, packed_),
82 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, options_),
83 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, json_name_),
84 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, default_value_),
85 };
86 Field_reflection_ =
87 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
88 Field_descriptor_,
89 Field::default_instance_,
90 Field_offsets_,
91 -1,
92 -1,
93 -1,
94 sizeof(Field),
95 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _internal_metadata_),
96 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _is_default_instance_));
97 Field_Kind_descriptor_ = Field_descriptor_->enum_type(0);
98 Field_Cardinality_descriptor_ = Field_descriptor_->enum_type(1);
99 Enum_descriptor_ = file->message_type(2);
100 static const int Enum_offsets_[5] = {
101 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, name_),
102 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, enumvalue_),
103 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, options_),
104 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, source_context_),
105 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, syntax_),
106 };
107 Enum_reflection_ =
108 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
109 Enum_descriptor_,
110 Enum::default_instance_,
111 Enum_offsets_,
112 -1,
113 -1,
114 -1,
115 sizeof(Enum),
116 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, _internal_metadata_),
117 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, _is_default_instance_));
118 EnumValue_descriptor_ = file->message_type(3);
119 static const int EnumValue_offsets_[3] = {
120 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, name_),
121 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, number_),
122 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, options_),
123 };
124 EnumValue_reflection_ =
125 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
126 EnumValue_descriptor_,
127 EnumValue::default_instance_,
128 EnumValue_offsets_,
129 -1,
130 -1,
131 -1,
132 sizeof(EnumValue),
133 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, _internal_metadata_),
134 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, _is_default_instance_));
135 Option_descriptor_ = file->message_type(4);
136 static const int Option_offsets_[2] = {
137 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, name_),
138 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, value_),
139 };
140 Option_reflection_ =
141 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
142 Option_descriptor_,
143 Option::default_instance_,
144 Option_offsets_,
145 -1,
146 -1,
147 -1,
148 sizeof(Option),
149 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, _internal_metadata_),
150 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, _is_default_instance_));
151 Syntax_descriptor_ = file->enum_type(0);
152 }
153
154 namespace {
155
156 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
protobuf_AssignDescriptorsOnce()157 inline void protobuf_AssignDescriptorsOnce() {
158 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
159 &protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto);
160 }
161
protobuf_RegisterTypes(const::std::string &)162 void protobuf_RegisterTypes(const ::std::string&) {
163 protobuf_AssignDescriptorsOnce();
164 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
165 Type_descriptor_, &Type::default_instance());
166 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
167 Field_descriptor_, &Field::default_instance());
168 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
169 Enum_descriptor_, &Enum::default_instance());
170 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
171 EnumValue_descriptor_, &EnumValue::default_instance());
172 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
173 Option_descriptor_, &Option::default_instance());
174 }
175
176 } // namespace
177
protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto()178 void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto() {
179 delete Type::default_instance_;
180 delete Type_reflection_;
181 delete Field::default_instance_;
182 delete Field_reflection_;
183 delete Enum::default_instance_;
184 delete Enum_reflection_;
185 delete EnumValue::default_instance_;
186 delete EnumValue_reflection_;
187 delete Option::default_instance_;
188 delete Option_reflection_;
189 }
190
protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto()191 void protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto() {
192 static bool already_here = false;
193 if (already_here) return;
194 already_here = true;
195 GOOGLE_PROTOBUF_VERIFY_VERSION;
196
197 ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
198 ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
199 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
200 "\n\032google/protobuf/type.proto\022\017google.pro"
201 "tobuf\032\031google/protobuf/any.proto\032$google"
202 "/protobuf/source_context.proto\"\327\001\n\004Type\022"
203 "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.google.p"
204 "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options"
205 "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc"
206 "e_context\030\005 \001(\0132\036.google.protobuf.Source"
207 "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu"
208 "f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl"
209 "e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001"
210 "(\0162\".google.protobuf.Field.Cardinality\022\016"
211 "\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\n\010type_url"
212 "\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006packed\030\010 "
213 "\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O"
214 "ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu"
215 "e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\022\017\n\013TY"
216 "PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6"
217 "4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014"
218 "TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE"
219 "_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n"
220 "\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TY"
221 "PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE"
222 "D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020"
223 "\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CAR"
224 "DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION"
225 "AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN"
226 "ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001(\t\022"
227 "-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu"
228 "mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu"
229 "f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl"
230 "e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016"
231 "2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014"
232 "\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030"
233 "\003 \003(\0132\027.google.protobuf.Option\";\n\006Option"
234 "\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.p"
235 "rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000"
236 "\022\021\n\rSYNTAX_PROTO3\020\001BL\n\023com.google.protob"
237 "ufB\tTypeProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protob"
238 "uf.WellKnownTypesb\006proto3", 1545);
239 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
240 "google/protobuf/type.proto", &protobuf_RegisterTypes);
241 Type::default_instance_ = new Type();
242 Field::default_instance_ = new Field();
243 Enum::default_instance_ = new Enum();
244 EnumValue::default_instance_ = new EnumValue();
245 Option::default_instance_ = new Option();
246 Type::default_instance_->InitAsDefaultInstance();
247 Field::default_instance_->InitAsDefaultInstance();
248 Enum::default_instance_->InitAsDefaultInstance();
249 EnumValue::default_instance_->InitAsDefaultInstance();
250 Option::default_instance_->InitAsDefaultInstance();
251 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto);
252 }
253
254 // Force AddDescriptors() to be called at static initialization time.
255 struct StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto {
StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eprotogoogle::protobuf::StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto256 StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto() {
257 protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
258 }
259 } static_descriptor_initializer_google_2fprotobuf_2ftype_2eproto_;
Syntax_descriptor()260 const ::google::protobuf::EnumDescriptor* Syntax_descriptor() {
261 protobuf_AssignDescriptorsOnce();
262 return Syntax_descriptor_;
263 }
Syntax_IsValid(int value)264 bool Syntax_IsValid(int value) {
265 switch(value) {
266 case 0:
267 case 1:
268 return true;
269 default:
270 return false;
271 }
272 }
273
274
275 namespace {
276
277 static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;
MergeFromFail(int line)278 static void MergeFromFail(int line) {
279 GOOGLE_CHECK(false) << __FILE__ << ":" << line;
280 }
281
282 } // namespace
283
284
285 // ===================================================================
286
287 #if !defined(_MSC_VER) || _MSC_VER >= 1900
288 const int Type::kNameFieldNumber;
289 const int Type::kFieldsFieldNumber;
290 const int Type::kOneofsFieldNumber;
291 const int Type::kOptionsFieldNumber;
292 const int Type::kSourceContextFieldNumber;
293 const int Type::kSyntaxFieldNumber;
294 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
295
Type()296 Type::Type()
297 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
298 SharedCtor();
299 // @@protoc_insertion_point(constructor:google.protobuf.Type)
300 }
301
InitAsDefaultInstance()302 void Type::InitAsDefaultInstance() {
303 _is_default_instance_ = true;
304 source_context_ = const_cast< ::google::protobuf::SourceContext*>(&::google::protobuf::SourceContext::default_instance());
305 }
306
Type(const Type & from)307 Type::Type(const Type& from)
308 : ::google::protobuf::Message(),
309 _internal_metadata_(NULL) {
310 SharedCtor();
311 MergeFrom(from);
312 // @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
313 }
314
SharedCtor()315 void Type::SharedCtor() {
316 _is_default_instance_ = false;
317 ::google::protobuf::internal::GetEmptyString();
318 _cached_size_ = 0;
319 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
320 source_context_ = NULL;
321 syntax_ = 0;
322 }
323
~Type()324 Type::~Type() {
325 // @@protoc_insertion_point(destructor:google.protobuf.Type)
326 SharedDtor();
327 }
328
SharedDtor()329 void Type::SharedDtor() {
330 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
331 if (this != default_instance_) {
332 delete source_context_;
333 }
334 }
335
SetCachedSize(int size) const336 void Type::SetCachedSize(int size) const {
337 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
338 _cached_size_ = size;
339 GOOGLE_SAFE_CONCURRENT_WRITES_END();
340 }
descriptor()341 const ::google::protobuf::Descriptor* Type::descriptor() {
342 protobuf_AssignDescriptorsOnce();
343 return Type_descriptor_;
344 }
345
default_instance()346 const Type& Type::default_instance() {
347 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
348 return *default_instance_;
349 }
350
351 Type* Type::default_instance_ = NULL;
352
New(::google::protobuf::Arena * arena) const353 Type* Type::New(::google::protobuf::Arena* arena) const {
354 Type* n = new Type;
355 if (arena != NULL) {
356 arena->Own(n);
357 }
358 return n;
359 }
360
Clear()361 void Type::Clear() {
362 // @@protoc_insertion_point(message_clear_start:google.protobuf.Type)
363 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
364 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
365 source_context_ = NULL;
366 syntax_ = 0;
367 fields_.Clear();
368 oneofs_.Clear();
369 options_.Clear();
370 }
371
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)372 bool Type::MergePartialFromCodedStream(
373 ::google::protobuf::io::CodedInputStream* input) {
374 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
375 ::google::protobuf::uint32 tag;
376 // @@protoc_insertion_point(parse_start:google.protobuf.Type)
377 for (;;) {
378 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
379 tag = p.first;
380 if (!p.second) goto handle_unusual;
381 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
382 // optional string name = 1;
383 case 1: {
384 if (tag == 10) {
385 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
386 input, this->mutable_name()));
387 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
388 this->name().data(), this->name().length(),
389 ::google::protobuf::internal::WireFormatLite::PARSE,
390 "google.protobuf.Type.name"));
391 } else {
392 goto handle_unusual;
393 }
394 if (input->ExpectTag(18)) goto parse_fields;
395 break;
396 }
397
398 // repeated .google.protobuf.Field fields = 2;
399 case 2: {
400 if (tag == 18) {
401 parse_fields:
402 DO_(input->IncrementRecursionDepth());
403 parse_loop_fields:
404 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
405 input, add_fields()));
406 } else {
407 goto handle_unusual;
408 }
409 if (input->ExpectTag(18)) goto parse_loop_fields;
410 input->UnsafeDecrementRecursionDepth();
411 if (input->ExpectTag(26)) goto parse_oneofs;
412 break;
413 }
414
415 // repeated string oneofs = 3;
416 case 3: {
417 if (tag == 26) {
418 parse_oneofs:
419 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
420 input, this->add_oneofs()));
421 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
422 this->oneofs(this->oneofs_size() - 1).data(),
423 this->oneofs(this->oneofs_size() - 1).length(),
424 ::google::protobuf::internal::WireFormatLite::PARSE,
425 "google.protobuf.Type.oneofs"));
426 } else {
427 goto handle_unusual;
428 }
429 if (input->ExpectTag(26)) goto parse_oneofs;
430 if (input->ExpectTag(34)) goto parse_options;
431 break;
432 }
433
434 // repeated .google.protobuf.Option options = 4;
435 case 4: {
436 if (tag == 34) {
437 parse_options:
438 DO_(input->IncrementRecursionDepth());
439 parse_loop_options:
440 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
441 input, add_options()));
442 } else {
443 goto handle_unusual;
444 }
445 if (input->ExpectTag(34)) goto parse_loop_options;
446 input->UnsafeDecrementRecursionDepth();
447 if (input->ExpectTag(42)) goto parse_source_context;
448 break;
449 }
450
451 // optional .google.protobuf.SourceContext source_context = 5;
452 case 5: {
453 if (tag == 42) {
454 parse_source_context:
455 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
456 input, mutable_source_context()));
457 } else {
458 goto handle_unusual;
459 }
460 if (input->ExpectTag(48)) goto parse_syntax;
461 break;
462 }
463
464 // optional .google.protobuf.Syntax syntax = 6;
465 case 6: {
466 if (tag == 48) {
467 parse_syntax:
468 int value;
469 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
470 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
471 input, &value)));
472 set_syntax(static_cast< ::google::protobuf::Syntax >(value));
473 } else {
474 goto handle_unusual;
475 }
476 if (input->ExpectAtEnd()) goto success;
477 break;
478 }
479
480 default: {
481 handle_unusual:
482 if (tag == 0 ||
483 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
484 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
485 goto success;
486 }
487 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
488 break;
489 }
490 }
491 }
492 success:
493 // @@protoc_insertion_point(parse_success:google.protobuf.Type)
494 return true;
495 failure:
496 // @@protoc_insertion_point(parse_failure:google.protobuf.Type)
497 return false;
498 #undef DO_
499 }
500
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const501 void Type::SerializeWithCachedSizes(
502 ::google::protobuf::io::CodedOutputStream* output) const {
503 // @@protoc_insertion_point(serialize_start:google.protobuf.Type)
504 // optional string name = 1;
505 if (this->name().size() > 0) {
506 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
507 this->name().data(), this->name().length(),
508 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
509 "google.protobuf.Type.name");
510 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
511 1, this->name(), output);
512 }
513
514 // repeated .google.protobuf.Field fields = 2;
515 for (unsigned int i = 0, n = this->fields_size(); i < n; i++) {
516 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
517 2, this->fields(i), output);
518 }
519
520 // repeated string oneofs = 3;
521 for (int i = 0; i < this->oneofs_size(); i++) {
522 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
523 this->oneofs(i).data(), this->oneofs(i).length(),
524 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
525 "google.protobuf.Type.oneofs");
526 ::google::protobuf::internal::WireFormatLite::WriteString(
527 3, this->oneofs(i), output);
528 }
529
530 // repeated .google.protobuf.Option options = 4;
531 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
532 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
533 4, this->options(i), output);
534 }
535
536 // optional .google.protobuf.SourceContext source_context = 5;
537 if (this->has_source_context()) {
538 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
539 5, *this->source_context_, output);
540 }
541
542 // optional .google.protobuf.Syntax syntax = 6;
543 if (this->syntax() != 0) {
544 ::google::protobuf::internal::WireFormatLite::WriteEnum(
545 6, this->syntax(), output);
546 }
547
548 // @@protoc_insertion_point(serialize_end:google.protobuf.Type)
549 }
550
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const551 ::google::protobuf::uint8* Type::SerializeWithCachedSizesToArray(
552 ::google::protobuf::uint8* target) const {
553 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
554 // optional string name = 1;
555 if (this->name().size() > 0) {
556 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
557 this->name().data(), this->name().length(),
558 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
559 "google.protobuf.Type.name");
560 target =
561 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
562 1, this->name(), target);
563 }
564
565 // repeated .google.protobuf.Field fields = 2;
566 for (unsigned int i = 0, n = this->fields_size(); i < n; i++) {
567 target = ::google::protobuf::internal::WireFormatLite::
568 WriteMessageNoVirtualToArray(
569 2, this->fields(i), target);
570 }
571
572 // repeated string oneofs = 3;
573 for (int i = 0; i < this->oneofs_size(); i++) {
574 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
575 this->oneofs(i).data(), this->oneofs(i).length(),
576 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
577 "google.protobuf.Type.oneofs");
578 target = ::google::protobuf::internal::WireFormatLite::
579 WriteStringToArray(3, this->oneofs(i), target);
580 }
581
582 // repeated .google.protobuf.Option options = 4;
583 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
584 target = ::google::protobuf::internal::WireFormatLite::
585 WriteMessageNoVirtualToArray(
586 4, this->options(i), target);
587 }
588
589 // optional .google.protobuf.SourceContext source_context = 5;
590 if (this->has_source_context()) {
591 target = ::google::protobuf::internal::WireFormatLite::
592 WriteMessageNoVirtualToArray(
593 5, *this->source_context_, target);
594 }
595
596 // optional .google.protobuf.Syntax syntax = 6;
597 if (this->syntax() != 0) {
598 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
599 6, this->syntax(), target);
600 }
601
602 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type)
603 return target;
604 }
605
ByteSize() const606 int Type::ByteSize() const {
607 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type)
608 int total_size = 0;
609
610 // optional string name = 1;
611 if (this->name().size() > 0) {
612 total_size += 1 +
613 ::google::protobuf::internal::WireFormatLite::StringSize(
614 this->name());
615 }
616
617 // optional .google.protobuf.SourceContext source_context = 5;
618 if (this->has_source_context()) {
619 total_size += 1 +
620 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
621 *this->source_context_);
622 }
623
624 // optional .google.protobuf.Syntax syntax = 6;
625 if (this->syntax() != 0) {
626 total_size += 1 +
627 ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax());
628 }
629
630 // repeated .google.protobuf.Field fields = 2;
631 total_size += 1 * this->fields_size();
632 for (int i = 0; i < this->fields_size(); i++) {
633 total_size +=
634 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
635 this->fields(i));
636 }
637
638 // repeated string oneofs = 3;
639 total_size += 1 * this->oneofs_size();
640 for (int i = 0; i < this->oneofs_size(); i++) {
641 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
642 this->oneofs(i));
643 }
644
645 // repeated .google.protobuf.Option options = 4;
646 total_size += 1 * this->options_size();
647 for (int i = 0; i < this->options_size(); i++) {
648 total_size +=
649 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
650 this->options(i));
651 }
652
653 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
654 _cached_size_ = total_size;
655 GOOGLE_SAFE_CONCURRENT_WRITES_END();
656 return total_size;
657 }
658
MergeFrom(const::google::protobuf::Message & from)659 void Type::MergeFrom(const ::google::protobuf::Message& from) {
660 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Type)
661 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
662 const Type* source =
663 ::google::protobuf::internal::DynamicCastToGenerated<const Type>(
664 &from);
665 if (source == NULL) {
666 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Type)
667 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
668 } else {
669 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Type)
670 MergeFrom(*source);
671 }
672 }
673
MergeFrom(const Type & from)674 void Type::MergeFrom(const Type& from) {
675 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
676 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
677 fields_.MergeFrom(from.fields_);
678 oneofs_.MergeFrom(from.oneofs_);
679 options_.MergeFrom(from.options_);
680 if (from.name().size() > 0) {
681
682 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
683 }
684 if (from.has_source_context()) {
685 mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.source_context());
686 }
687 if (from.syntax() != 0) {
688 set_syntax(from.syntax());
689 }
690 }
691
CopyFrom(const::google::protobuf::Message & from)692 void Type::CopyFrom(const ::google::protobuf::Message& from) {
693 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Type)
694 if (&from == this) return;
695 Clear();
696 MergeFrom(from);
697 }
698
CopyFrom(const Type & from)699 void Type::CopyFrom(const Type& from) {
700 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Type)
701 if (&from == this) return;
702 Clear();
703 MergeFrom(from);
704 }
705
IsInitialized() const706 bool Type::IsInitialized() const {
707
708 return true;
709 }
710
Swap(Type * other)711 void Type::Swap(Type* other) {
712 if (other == this) return;
713 InternalSwap(other);
714 }
InternalSwap(Type * other)715 void Type::InternalSwap(Type* other) {
716 name_.Swap(&other->name_);
717 fields_.UnsafeArenaSwap(&other->fields_);
718 oneofs_.UnsafeArenaSwap(&other->oneofs_);
719 options_.UnsafeArenaSwap(&other->options_);
720 std::swap(source_context_, other->source_context_);
721 std::swap(syntax_, other->syntax_);
722 _internal_metadata_.Swap(&other->_internal_metadata_);
723 std::swap(_cached_size_, other->_cached_size_);
724 }
725
GetMetadata() const726 ::google::protobuf::Metadata Type::GetMetadata() const {
727 protobuf_AssignDescriptorsOnce();
728 ::google::protobuf::Metadata metadata;
729 metadata.descriptor = Type_descriptor_;
730 metadata.reflection = Type_reflection_;
731 return metadata;
732 }
733
734 #if PROTOBUF_INLINE_NOT_IN_HEADERS
735 // Type
736
737 // optional string name = 1;
clear_name()738 void Type::clear_name() {
739 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
740 }
name() const741 const ::std::string& Type::name() const {
742 // @@protoc_insertion_point(field_get:google.protobuf.Type.name)
743 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
744 }
set_name(const::std::string & value)745 void Type::set_name(const ::std::string& value) {
746
747 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
748 // @@protoc_insertion_point(field_set:google.protobuf.Type.name)
749 }
set_name(const char * value)750 void Type::set_name(const char* value) {
751
752 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
753 // @@protoc_insertion_point(field_set_char:google.protobuf.Type.name)
754 }
set_name(const char * value,size_t size)755 void Type::set_name(const char* value, size_t size) {
756
757 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
758 ::std::string(reinterpret_cast<const char*>(value), size));
759 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.name)
760 }
mutable_name()761 ::std::string* Type::mutable_name() {
762
763 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.name)
764 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
765 }
release_name()766 ::std::string* Type::release_name() {
767 // @@protoc_insertion_point(field_release:google.protobuf.Type.name)
768
769 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
770 }
set_allocated_name(::std::string * name)771 void Type::set_allocated_name(::std::string* name) {
772 if (name != NULL) {
773
774 } else {
775
776 }
777 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
778 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name)
779 }
780
781 // repeated .google.protobuf.Field fields = 2;
fields_size() const782 int Type::fields_size() const {
783 return fields_.size();
784 }
clear_fields()785 void Type::clear_fields() {
786 fields_.Clear();
787 }
fields(int index) const788 const ::google::protobuf::Field& Type::fields(int index) const {
789 // @@protoc_insertion_point(field_get:google.protobuf.Type.fields)
790 return fields_.Get(index);
791 }
mutable_fields(int index)792 ::google::protobuf::Field* Type::mutable_fields(int index) {
793 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.fields)
794 return fields_.Mutable(index);
795 }
add_fields()796 ::google::protobuf::Field* Type::add_fields() {
797 // @@protoc_insertion_point(field_add:google.protobuf.Type.fields)
798 return fields_.Add();
799 }
800 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >*
mutable_fields()801 Type::mutable_fields() {
802 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields)
803 return &fields_;
804 }
805 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Field >&
fields() const806 Type::fields() const {
807 // @@protoc_insertion_point(field_list:google.protobuf.Type.fields)
808 return fields_;
809 }
810
811 // repeated string oneofs = 3;
oneofs_size() const812 int Type::oneofs_size() const {
813 return oneofs_.size();
814 }
clear_oneofs()815 void Type::clear_oneofs() {
816 oneofs_.Clear();
817 }
oneofs(int index) const818 const ::std::string& Type::oneofs(int index) const {
819 // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs)
820 return oneofs_.Get(index);
821 }
mutable_oneofs(int index)822 ::std::string* Type::mutable_oneofs(int index) {
823 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs)
824 return oneofs_.Mutable(index);
825 }
set_oneofs(int index,const::std::string & value)826 void Type::set_oneofs(int index, const ::std::string& value) {
827 // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
828 oneofs_.Mutable(index)->assign(value);
829 }
set_oneofs(int index,const char * value)830 void Type::set_oneofs(int index, const char* value) {
831 oneofs_.Mutable(index)->assign(value);
832 // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs)
833 }
set_oneofs(int index,const char * value,size_t size)834 void Type::set_oneofs(int index, const char* value, size_t size) {
835 oneofs_.Mutable(index)->assign(
836 reinterpret_cast<const char*>(value), size);
837 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs)
838 }
add_oneofs()839 ::std::string* Type::add_oneofs() {
840 // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs)
841 return oneofs_.Add();
842 }
add_oneofs(const::std::string & value)843 void Type::add_oneofs(const ::std::string& value) {
844 oneofs_.Add()->assign(value);
845 // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
846 }
add_oneofs(const char * value)847 void Type::add_oneofs(const char* value) {
848 oneofs_.Add()->assign(value);
849 // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs)
850 }
add_oneofs(const char * value,size_t size)851 void Type::add_oneofs(const char* value, size_t size) {
852 oneofs_.Add()->assign(reinterpret_cast<const char*>(value), size);
853 // @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs)
854 }
855 const ::google::protobuf::RepeatedPtrField< ::std::string>&
oneofs() const856 Type::oneofs() const {
857 // @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs)
858 return oneofs_;
859 }
860 ::google::protobuf::RepeatedPtrField< ::std::string>*
mutable_oneofs()861 Type::mutable_oneofs() {
862 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs)
863 return &oneofs_;
864 }
865
866 // repeated .google.protobuf.Option options = 4;
options_size() const867 int Type::options_size() const {
868 return options_.size();
869 }
clear_options()870 void Type::clear_options() {
871 options_.Clear();
872 }
options(int index) const873 const ::google::protobuf::Option& Type::options(int index) const {
874 // @@protoc_insertion_point(field_get:google.protobuf.Type.options)
875 return options_.Get(index);
876 }
mutable_options(int index)877 ::google::protobuf::Option* Type::mutable_options(int index) {
878 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.options)
879 return options_.Mutable(index);
880 }
add_options()881 ::google::protobuf::Option* Type::add_options() {
882 // @@protoc_insertion_point(field_add:google.protobuf.Type.options)
883 return options_.Add();
884 }
885 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options()886 Type::mutable_options() {
887 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options)
888 return &options_;
889 }
890 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const891 Type::options() const {
892 // @@protoc_insertion_point(field_list:google.protobuf.Type.options)
893 return options_;
894 }
895
896 // optional .google.protobuf.SourceContext source_context = 5;
has_source_context() const897 bool Type::has_source_context() const {
898 return !_is_default_instance_ && source_context_ != NULL;
899 }
clear_source_context()900 void Type::clear_source_context() {
901 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
902 source_context_ = NULL;
903 }
source_context() const904 const ::google::protobuf::SourceContext& Type::source_context() const {
905 // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context)
906 return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
907 }
mutable_source_context()908 ::google::protobuf::SourceContext* Type::mutable_source_context() {
909
910 if (source_context_ == NULL) {
911 source_context_ = new ::google::protobuf::SourceContext;
912 }
913 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context)
914 return source_context_;
915 }
release_source_context()916 ::google::protobuf::SourceContext* Type::release_source_context() {
917 // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context)
918
919 ::google::protobuf::SourceContext* temp = source_context_;
920 source_context_ = NULL;
921 return temp;
922 }
set_allocated_source_context(::google::protobuf::SourceContext * source_context)923 void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
924 delete source_context_;
925 source_context_ = source_context;
926 if (source_context) {
927
928 } else {
929
930 }
931 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.source_context)
932 }
933
934 // optional .google.protobuf.Syntax syntax = 6;
clear_syntax()935 void Type::clear_syntax() {
936 syntax_ = 0;
937 }
syntax() const938 ::google::protobuf::Syntax Type::syntax() const {
939 // @@protoc_insertion_point(field_get:google.protobuf.Type.syntax)
940 return static_cast< ::google::protobuf::Syntax >(syntax_);
941 }
set_syntax(::google::protobuf::Syntax value)942 void Type::set_syntax(::google::protobuf::Syntax value) {
943
944 syntax_ = value;
945 // @@protoc_insertion_point(field_set:google.protobuf.Type.syntax)
946 }
947
948 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
949
950 // ===================================================================
951
Field_Kind_descriptor()952 const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor() {
953 protobuf_AssignDescriptorsOnce();
954 return Field_Kind_descriptor_;
955 }
Field_Kind_IsValid(int value)956 bool Field_Kind_IsValid(int value) {
957 switch(value) {
958 case 0:
959 case 1:
960 case 2:
961 case 3:
962 case 4:
963 case 5:
964 case 6:
965 case 7:
966 case 8:
967 case 9:
968 case 10:
969 case 11:
970 case 12:
971 case 13:
972 case 14:
973 case 15:
974 case 16:
975 case 17:
976 case 18:
977 return true;
978 default:
979 return false;
980 }
981 }
982
983 #if !defined(_MSC_VER) || _MSC_VER >= 1900
984 const Field_Kind Field::TYPE_UNKNOWN;
985 const Field_Kind Field::TYPE_DOUBLE;
986 const Field_Kind Field::TYPE_FLOAT;
987 const Field_Kind Field::TYPE_INT64;
988 const Field_Kind Field::TYPE_UINT64;
989 const Field_Kind Field::TYPE_INT32;
990 const Field_Kind Field::TYPE_FIXED64;
991 const Field_Kind Field::TYPE_FIXED32;
992 const Field_Kind Field::TYPE_BOOL;
993 const Field_Kind Field::TYPE_STRING;
994 const Field_Kind Field::TYPE_GROUP;
995 const Field_Kind Field::TYPE_MESSAGE;
996 const Field_Kind Field::TYPE_BYTES;
997 const Field_Kind Field::TYPE_UINT32;
998 const Field_Kind Field::TYPE_ENUM;
999 const Field_Kind Field::TYPE_SFIXED32;
1000 const Field_Kind Field::TYPE_SFIXED64;
1001 const Field_Kind Field::TYPE_SINT32;
1002 const Field_Kind Field::TYPE_SINT64;
1003 const Field_Kind Field::Kind_MIN;
1004 const Field_Kind Field::Kind_MAX;
1005 const int Field::Kind_ARRAYSIZE;
1006 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Field_Cardinality_descriptor()1007 const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor() {
1008 protobuf_AssignDescriptorsOnce();
1009 return Field_Cardinality_descriptor_;
1010 }
Field_Cardinality_IsValid(int value)1011 bool Field_Cardinality_IsValid(int value) {
1012 switch(value) {
1013 case 0:
1014 case 1:
1015 case 2:
1016 case 3:
1017 return true;
1018 default:
1019 return false;
1020 }
1021 }
1022
1023 #if !defined(_MSC_VER) || _MSC_VER >= 1900
1024 const Field_Cardinality Field::CARDINALITY_UNKNOWN;
1025 const Field_Cardinality Field::CARDINALITY_OPTIONAL;
1026 const Field_Cardinality Field::CARDINALITY_REQUIRED;
1027 const Field_Cardinality Field::CARDINALITY_REPEATED;
1028 const Field_Cardinality Field::Cardinality_MIN;
1029 const Field_Cardinality Field::Cardinality_MAX;
1030 const int Field::Cardinality_ARRAYSIZE;
1031 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1032 #if !defined(_MSC_VER) || _MSC_VER >= 1900
1033 const int Field::kKindFieldNumber;
1034 const int Field::kCardinalityFieldNumber;
1035 const int Field::kNumberFieldNumber;
1036 const int Field::kNameFieldNumber;
1037 const int Field::kTypeUrlFieldNumber;
1038 const int Field::kOneofIndexFieldNumber;
1039 const int Field::kPackedFieldNumber;
1040 const int Field::kOptionsFieldNumber;
1041 const int Field::kJsonNameFieldNumber;
1042 const int Field::kDefaultValueFieldNumber;
1043 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1044
Field()1045 Field::Field()
1046 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
1047 SharedCtor();
1048 // @@protoc_insertion_point(constructor:google.protobuf.Field)
1049 }
1050
InitAsDefaultInstance()1051 void Field::InitAsDefaultInstance() {
1052 _is_default_instance_ = true;
1053 }
1054
Field(const Field & from)1055 Field::Field(const Field& from)
1056 : ::google::protobuf::Message(),
1057 _internal_metadata_(NULL) {
1058 SharedCtor();
1059 MergeFrom(from);
1060 // @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
1061 }
1062
SharedCtor()1063 void Field::SharedCtor() {
1064 _is_default_instance_ = false;
1065 ::google::protobuf::internal::GetEmptyString();
1066 _cached_size_ = 0;
1067 kind_ = 0;
1068 cardinality_ = 0;
1069 number_ = 0;
1070 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1071 type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1072 oneof_index_ = 0;
1073 packed_ = false;
1074 json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1075 default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1076 }
1077
~Field()1078 Field::~Field() {
1079 // @@protoc_insertion_point(destructor:google.protobuf.Field)
1080 SharedDtor();
1081 }
1082
SharedDtor()1083 void Field::SharedDtor() {
1084 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1085 type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1086 json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1087 default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1088 if (this != default_instance_) {
1089 }
1090 }
1091
SetCachedSize(int size) const1092 void Field::SetCachedSize(int size) const {
1093 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1094 _cached_size_ = size;
1095 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1096 }
descriptor()1097 const ::google::protobuf::Descriptor* Field::descriptor() {
1098 protobuf_AssignDescriptorsOnce();
1099 return Field_descriptor_;
1100 }
1101
default_instance()1102 const Field& Field::default_instance() {
1103 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
1104 return *default_instance_;
1105 }
1106
1107 Field* Field::default_instance_ = NULL;
1108
New(::google::protobuf::Arena * arena) const1109 Field* Field::New(::google::protobuf::Arena* arena) const {
1110 Field* n = new Field;
1111 if (arena != NULL) {
1112 arena->Own(n);
1113 }
1114 return n;
1115 }
1116
Clear()1117 void Field::Clear() {
1118 // @@protoc_insertion_point(message_clear_start:google.protobuf.Field)
1119 #if defined(__clang__)
1120 #define ZR_HELPER_(f) \
1121 _Pragma("clang diagnostic push") \
1122 _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
1123 __builtin_offsetof(Field, f) \
1124 _Pragma("clang diagnostic pop")
1125 #else
1126 #define ZR_HELPER_(f) reinterpret_cast<char*>(\
1127 &reinterpret_cast<Field*>(16)->f)
1128 #endif
1129
1130 #define ZR_(first, last) do {\
1131 ::memset(&first, 0,\
1132 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
1133 } while (0)
1134
1135 ZR_(kind_, cardinality_);
1136 ZR_(number_, oneof_index_);
1137 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1138 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1139 packed_ = false;
1140 json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1141 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1142
1143 #undef ZR_HELPER_
1144 #undef ZR_
1145
1146 options_.Clear();
1147 }
1148
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)1149 bool Field::MergePartialFromCodedStream(
1150 ::google::protobuf::io::CodedInputStream* input) {
1151 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1152 ::google::protobuf::uint32 tag;
1153 // @@protoc_insertion_point(parse_start:google.protobuf.Field)
1154 for (;;) {
1155 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1156 tag = p.first;
1157 if (!p.second) goto handle_unusual;
1158 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1159 // optional .google.protobuf.Field.Kind kind = 1;
1160 case 1: {
1161 if (tag == 8) {
1162 int value;
1163 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1164 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
1165 input, &value)));
1166 set_kind(static_cast< ::google::protobuf::Field_Kind >(value));
1167 } else {
1168 goto handle_unusual;
1169 }
1170 if (input->ExpectTag(16)) goto parse_cardinality;
1171 break;
1172 }
1173
1174 // optional .google.protobuf.Field.Cardinality cardinality = 2;
1175 case 2: {
1176 if (tag == 16) {
1177 parse_cardinality:
1178 int value;
1179 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1180 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
1181 input, &value)));
1182 set_cardinality(static_cast< ::google::protobuf::Field_Cardinality >(value));
1183 } else {
1184 goto handle_unusual;
1185 }
1186 if (input->ExpectTag(24)) goto parse_number;
1187 break;
1188 }
1189
1190 // optional int32 number = 3;
1191 case 3: {
1192 if (tag == 24) {
1193 parse_number:
1194 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1195 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1196 input, &number_)));
1197
1198 } else {
1199 goto handle_unusual;
1200 }
1201 if (input->ExpectTag(34)) goto parse_name;
1202 break;
1203 }
1204
1205 // optional string name = 4;
1206 case 4: {
1207 if (tag == 34) {
1208 parse_name:
1209 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1210 input, this->mutable_name()));
1211 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1212 this->name().data(), this->name().length(),
1213 ::google::protobuf::internal::WireFormatLite::PARSE,
1214 "google.protobuf.Field.name"));
1215 } else {
1216 goto handle_unusual;
1217 }
1218 if (input->ExpectTag(50)) goto parse_type_url;
1219 break;
1220 }
1221
1222 // optional string type_url = 6;
1223 case 6: {
1224 if (tag == 50) {
1225 parse_type_url:
1226 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1227 input, this->mutable_type_url()));
1228 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1229 this->type_url().data(), this->type_url().length(),
1230 ::google::protobuf::internal::WireFormatLite::PARSE,
1231 "google.protobuf.Field.type_url"));
1232 } else {
1233 goto handle_unusual;
1234 }
1235 if (input->ExpectTag(56)) goto parse_oneof_index;
1236 break;
1237 }
1238
1239 // optional int32 oneof_index = 7;
1240 case 7: {
1241 if (tag == 56) {
1242 parse_oneof_index:
1243 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1244 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1245 input, &oneof_index_)));
1246
1247 } else {
1248 goto handle_unusual;
1249 }
1250 if (input->ExpectTag(64)) goto parse_packed;
1251 break;
1252 }
1253
1254 // optional bool packed = 8;
1255 case 8: {
1256 if (tag == 64) {
1257 parse_packed:
1258 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1259 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
1260 input, &packed_)));
1261
1262 } else {
1263 goto handle_unusual;
1264 }
1265 if (input->ExpectTag(74)) goto parse_options;
1266 break;
1267 }
1268
1269 // repeated .google.protobuf.Option options = 9;
1270 case 9: {
1271 if (tag == 74) {
1272 parse_options:
1273 DO_(input->IncrementRecursionDepth());
1274 parse_loop_options:
1275 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
1276 input, add_options()));
1277 } else {
1278 goto handle_unusual;
1279 }
1280 if (input->ExpectTag(74)) goto parse_loop_options;
1281 input->UnsafeDecrementRecursionDepth();
1282 if (input->ExpectTag(82)) goto parse_json_name;
1283 break;
1284 }
1285
1286 // optional string json_name = 10;
1287 case 10: {
1288 if (tag == 82) {
1289 parse_json_name:
1290 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1291 input, this->mutable_json_name()));
1292 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1293 this->json_name().data(), this->json_name().length(),
1294 ::google::protobuf::internal::WireFormatLite::PARSE,
1295 "google.protobuf.Field.json_name"));
1296 } else {
1297 goto handle_unusual;
1298 }
1299 if (input->ExpectTag(90)) goto parse_default_value;
1300 break;
1301 }
1302
1303 // optional string default_value = 11;
1304 case 11: {
1305 if (tag == 90) {
1306 parse_default_value:
1307 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1308 input, this->mutable_default_value()));
1309 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1310 this->default_value().data(), this->default_value().length(),
1311 ::google::protobuf::internal::WireFormatLite::PARSE,
1312 "google.protobuf.Field.default_value"));
1313 } else {
1314 goto handle_unusual;
1315 }
1316 if (input->ExpectAtEnd()) goto success;
1317 break;
1318 }
1319
1320 default: {
1321 handle_unusual:
1322 if (tag == 0 ||
1323 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1324 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1325 goto success;
1326 }
1327 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
1328 break;
1329 }
1330 }
1331 }
1332 success:
1333 // @@protoc_insertion_point(parse_success:google.protobuf.Field)
1334 return true;
1335 failure:
1336 // @@protoc_insertion_point(parse_failure:google.protobuf.Field)
1337 return false;
1338 #undef DO_
1339 }
1340
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const1341 void Field::SerializeWithCachedSizes(
1342 ::google::protobuf::io::CodedOutputStream* output) const {
1343 // @@protoc_insertion_point(serialize_start:google.protobuf.Field)
1344 // optional .google.protobuf.Field.Kind kind = 1;
1345 if (this->kind() != 0) {
1346 ::google::protobuf::internal::WireFormatLite::WriteEnum(
1347 1, this->kind(), output);
1348 }
1349
1350 // optional .google.protobuf.Field.Cardinality cardinality = 2;
1351 if (this->cardinality() != 0) {
1352 ::google::protobuf::internal::WireFormatLite::WriteEnum(
1353 2, this->cardinality(), output);
1354 }
1355
1356 // optional int32 number = 3;
1357 if (this->number() != 0) {
1358 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output);
1359 }
1360
1361 // optional string name = 4;
1362 if (this->name().size() > 0) {
1363 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1364 this->name().data(), this->name().length(),
1365 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1366 "google.protobuf.Field.name");
1367 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1368 4, this->name(), output);
1369 }
1370
1371 // optional string type_url = 6;
1372 if (this->type_url().size() > 0) {
1373 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1374 this->type_url().data(), this->type_url().length(),
1375 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1376 "google.protobuf.Field.type_url");
1377 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1378 6, this->type_url(), output);
1379 }
1380
1381 // optional int32 oneof_index = 7;
1382 if (this->oneof_index() != 0) {
1383 ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->oneof_index(), output);
1384 }
1385
1386 // optional bool packed = 8;
1387 if (this->packed() != 0) {
1388 ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->packed(), output);
1389 }
1390
1391 // repeated .google.protobuf.Option options = 9;
1392 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
1393 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1394 9, this->options(i), output);
1395 }
1396
1397 // optional string json_name = 10;
1398 if (this->json_name().size() > 0) {
1399 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1400 this->json_name().data(), this->json_name().length(),
1401 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1402 "google.protobuf.Field.json_name");
1403 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1404 10, this->json_name(), output);
1405 }
1406
1407 // optional string default_value = 11;
1408 if (this->default_value().size() > 0) {
1409 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1410 this->default_value().data(), this->default_value().length(),
1411 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1412 "google.protobuf.Field.default_value");
1413 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1414 11, this->default_value(), output);
1415 }
1416
1417 // @@protoc_insertion_point(serialize_end:google.protobuf.Field)
1418 }
1419
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const1420 ::google::protobuf::uint8* Field::SerializeWithCachedSizesToArray(
1421 ::google::protobuf::uint8* target) const {
1422 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field)
1423 // optional .google.protobuf.Field.Kind kind = 1;
1424 if (this->kind() != 0) {
1425 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1426 1, this->kind(), target);
1427 }
1428
1429 // optional .google.protobuf.Field.Cardinality cardinality = 2;
1430 if (this->cardinality() != 0) {
1431 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1432 2, this->cardinality(), target);
1433 }
1434
1435 // optional int32 number = 3;
1436 if (this->number() != 0) {
1437 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target);
1438 }
1439
1440 // optional string name = 4;
1441 if (this->name().size() > 0) {
1442 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1443 this->name().data(), this->name().length(),
1444 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1445 "google.protobuf.Field.name");
1446 target =
1447 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1448 4, this->name(), target);
1449 }
1450
1451 // optional string type_url = 6;
1452 if (this->type_url().size() > 0) {
1453 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1454 this->type_url().data(), this->type_url().length(),
1455 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1456 "google.protobuf.Field.type_url");
1457 target =
1458 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1459 6, this->type_url(), target);
1460 }
1461
1462 // optional int32 oneof_index = 7;
1463 if (this->oneof_index() != 0) {
1464 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->oneof_index(), target);
1465 }
1466
1467 // optional bool packed = 8;
1468 if (this->packed() != 0) {
1469 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->packed(), target);
1470 }
1471
1472 // repeated .google.protobuf.Option options = 9;
1473 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
1474 target = ::google::protobuf::internal::WireFormatLite::
1475 WriteMessageNoVirtualToArray(
1476 9, this->options(i), target);
1477 }
1478
1479 // optional string json_name = 10;
1480 if (this->json_name().size() > 0) {
1481 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1482 this->json_name().data(), this->json_name().length(),
1483 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1484 "google.protobuf.Field.json_name");
1485 target =
1486 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1487 10, this->json_name(), target);
1488 }
1489
1490 // optional string default_value = 11;
1491 if (this->default_value().size() > 0) {
1492 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1493 this->default_value().data(), this->default_value().length(),
1494 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1495 "google.protobuf.Field.default_value");
1496 target =
1497 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1498 11, this->default_value(), target);
1499 }
1500
1501 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field)
1502 return target;
1503 }
1504
ByteSize() const1505 int Field::ByteSize() const {
1506 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field)
1507 int total_size = 0;
1508
1509 // optional .google.protobuf.Field.Kind kind = 1;
1510 if (this->kind() != 0) {
1511 total_size += 1 +
1512 ::google::protobuf::internal::WireFormatLite::EnumSize(this->kind());
1513 }
1514
1515 // optional .google.protobuf.Field.Cardinality cardinality = 2;
1516 if (this->cardinality() != 0) {
1517 total_size += 1 +
1518 ::google::protobuf::internal::WireFormatLite::EnumSize(this->cardinality());
1519 }
1520
1521 // optional int32 number = 3;
1522 if (this->number() != 0) {
1523 total_size += 1 +
1524 ::google::protobuf::internal::WireFormatLite::Int32Size(
1525 this->number());
1526 }
1527
1528 // optional string name = 4;
1529 if (this->name().size() > 0) {
1530 total_size += 1 +
1531 ::google::protobuf::internal::WireFormatLite::StringSize(
1532 this->name());
1533 }
1534
1535 // optional string type_url = 6;
1536 if (this->type_url().size() > 0) {
1537 total_size += 1 +
1538 ::google::protobuf::internal::WireFormatLite::StringSize(
1539 this->type_url());
1540 }
1541
1542 // optional int32 oneof_index = 7;
1543 if (this->oneof_index() != 0) {
1544 total_size += 1 +
1545 ::google::protobuf::internal::WireFormatLite::Int32Size(
1546 this->oneof_index());
1547 }
1548
1549 // optional bool packed = 8;
1550 if (this->packed() != 0) {
1551 total_size += 1 + 1;
1552 }
1553
1554 // optional string json_name = 10;
1555 if (this->json_name().size() > 0) {
1556 total_size += 1 +
1557 ::google::protobuf::internal::WireFormatLite::StringSize(
1558 this->json_name());
1559 }
1560
1561 // optional string default_value = 11;
1562 if (this->default_value().size() > 0) {
1563 total_size += 1 +
1564 ::google::protobuf::internal::WireFormatLite::StringSize(
1565 this->default_value());
1566 }
1567
1568 // repeated .google.protobuf.Option options = 9;
1569 total_size += 1 * this->options_size();
1570 for (int i = 0; i < this->options_size(); i++) {
1571 total_size +=
1572 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
1573 this->options(i));
1574 }
1575
1576 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1577 _cached_size_ = total_size;
1578 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1579 return total_size;
1580 }
1581
MergeFrom(const::google::protobuf::Message & from)1582 void Field::MergeFrom(const ::google::protobuf::Message& from) {
1583 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Field)
1584 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
1585 const Field* source =
1586 ::google::protobuf::internal::DynamicCastToGenerated<const Field>(
1587 &from);
1588 if (source == NULL) {
1589 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Field)
1590 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1591 } else {
1592 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Field)
1593 MergeFrom(*source);
1594 }
1595 }
1596
MergeFrom(const Field & from)1597 void Field::MergeFrom(const Field& from) {
1598 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
1599 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
1600 options_.MergeFrom(from.options_);
1601 if (from.kind() != 0) {
1602 set_kind(from.kind());
1603 }
1604 if (from.cardinality() != 0) {
1605 set_cardinality(from.cardinality());
1606 }
1607 if (from.number() != 0) {
1608 set_number(from.number());
1609 }
1610 if (from.name().size() > 0) {
1611
1612 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
1613 }
1614 if (from.type_url().size() > 0) {
1615
1616 type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
1617 }
1618 if (from.oneof_index() != 0) {
1619 set_oneof_index(from.oneof_index());
1620 }
1621 if (from.packed() != 0) {
1622 set_packed(from.packed());
1623 }
1624 if (from.json_name().size() > 0) {
1625
1626 json_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.json_name_);
1627 }
1628 if (from.default_value().size() > 0) {
1629
1630 default_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value_);
1631 }
1632 }
1633
CopyFrom(const::google::protobuf::Message & from)1634 void Field::CopyFrom(const ::google::protobuf::Message& from) {
1635 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Field)
1636 if (&from == this) return;
1637 Clear();
1638 MergeFrom(from);
1639 }
1640
CopyFrom(const Field & from)1641 void Field::CopyFrom(const Field& from) {
1642 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Field)
1643 if (&from == this) return;
1644 Clear();
1645 MergeFrom(from);
1646 }
1647
IsInitialized() const1648 bool Field::IsInitialized() const {
1649
1650 return true;
1651 }
1652
Swap(Field * other)1653 void Field::Swap(Field* other) {
1654 if (other == this) return;
1655 InternalSwap(other);
1656 }
InternalSwap(Field * other)1657 void Field::InternalSwap(Field* other) {
1658 std::swap(kind_, other->kind_);
1659 std::swap(cardinality_, other->cardinality_);
1660 std::swap(number_, other->number_);
1661 name_.Swap(&other->name_);
1662 type_url_.Swap(&other->type_url_);
1663 std::swap(oneof_index_, other->oneof_index_);
1664 std::swap(packed_, other->packed_);
1665 options_.UnsafeArenaSwap(&other->options_);
1666 json_name_.Swap(&other->json_name_);
1667 default_value_.Swap(&other->default_value_);
1668 _internal_metadata_.Swap(&other->_internal_metadata_);
1669 std::swap(_cached_size_, other->_cached_size_);
1670 }
1671
GetMetadata() const1672 ::google::protobuf::Metadata Field::GetMetadata() const {
1673 protobuf_AssignDescriptorsOnce();
1674 ::google::protobuf::Metadata metadata;
1675 metadata.descriptor = Field_descriptor_;
1676 metadata.reflection = Field_reflection_;
1677 return metadata;
1678 }
1679
1680 #if PROTOBUF_INLINE_NOT_IN_HEADERS
1681 // Field
1682
1683 // optional .google.protobuf.Field.Kind kind = 1;
clear_kind()1684 void Field::clear_kind() {
1685 kind_ = 0;
1686 }
kind() const1687 ::google::protobuf::Field_Kind Field::kind() const {
1688 // @@protoc_insertion_point(field_get:google.protobuf.Field.kind)
1689 return static_cast< ::google::protobuf::Field_Kind >(kind_);
1690 }
set_kind(::google::protobuf::Field_Kind value)1691 void Field::set_kind(::google::protobuf::Field_Kind value) {
1692
1693 kind_ = value;
1694 // @@protoc_insertion_point(field_set:google.protobuf.Field.kind)
1695 }
1696
1697 // optional .google.protobuf.Field.Cardinality cardinality = 2;
clear_cardinality()1698 void Field::clear_cardinality() {
1699 cardinality_ = 0;
1700 }
cardinality() const1701 ::google::protobuf::Field_Cardinality Field::cardinality() const {
1702 // @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality)
1703 return static_cast< ::google::protobuf::Field_Cardinality >(cardinality_);
1704 }
set_cardinality(::google::protobuf::Field_Cardinality value)1705 void Field::set_cardinality(::google::protobuf::Field_Cardinality value) {
1706
1707 cardinality_ = value;
1708 // @@protoc_insertion_point(field_set:google.protobuf.Field.cardinality)
1709 }
1710
1711 // optional int32 number = 3;
clear_number()1712 void Field::clear_number() {
1713 number_ = 0;
1714 }
number() const1715 ::google::protobuf::int32 Field::number() const {
1716 // @@protoc_insertion_point(field_get:google.protobuf.Field.number)
1717 return number_;
1718 }
set_number(::google::protobuf::int32 value)1719 void Field::set_number(::google::protobuf::int32 value) {
1720
1721 number_ = value;
1722 // @@protoc_insertion_point(field_set:google.protobuf.Field.number)
1723 }
1724
1725 // optional string name = 4;
clear_name()1726 void Field::clear_name() {
1727 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1728 }
name() const1729 const ::std::string& Field::name() const {
1730 // @@protoc_insertion_point(field_get:google.protobuf.Field.name)
1731 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1732 }
set_name(const::std::string & value)1733 void Field::set_name(const ::std::string& value) {
1734
1735 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1736 // @@protoc_insertion_point(field_set:google.protobuf.Field.name)
1737 }
set_name(const char * value)1738 void Field::set_name(const char* value) {
1739
1740 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1741 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.name)
1742 }
set_name(const char * value,size_t size)1743 void Field::set_name(const char* value, size_t size) {
1744
1745 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1746 ::std::string(reinterpret_cast<const char*>(value), size));
1747 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.name)
1748 }
mutable_name()1749 ::std::string* Field::mutable_name() {
1750
1751 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.name)
1752 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1753 }
release_name()1754 ::std::string* Field::release_name() {
1755 // @@protoc_insertion_point(field_release:google.protobuf.Field.name)
1756
1757 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1758 }
set_allocated_name(::std::string * name)1759 void Field::set_allocated_name(::std::string* name) {
1760 if (name != NULL) {
1761
1762 } else {
1763
1764 }
1765 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
1766 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name)
1767 }
1768
1769 // optional string type_url = 6;
clear_type_url()1770 void Field::clear_type_url() {
1771 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1772 }
type_url() const1773 const ::std::string& Field::type_url() const {
1774 // @@protoc_insertion_point(field_get:google.protobuf.Field.type_url)
1775 return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1776 }
set_type_url(const::std::string & value)1777 void Field::set_type_url(const ::std::string& value) {
1778
1779 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1780 // @@protoc_insertion_point(field_set:google.protobuf.Field.type_url)
1781 }
set_type_url(const char * value)1782 void Field::set_type_url(const char* value) {
1783
1784 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1785 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.type_url)
1786 }
set_type_url(const char * value,size_t size)1787 void Field::set_type_url(const char* value, size_t size) {
1788
1789 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1790 ::std::string(reinterpret_cast<const char*>(value), size));
1791 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.type_url)
1792 }
mutable_type_url()1793 ::std::string* Field::mutable_type_url() {
1794
1795 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.type_url)
1796 return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1797 }
release_type_url()1798 ::std::string* Field::release_type_url() {
1799 // @@protoc_insertion_point(field_release:google.protobuf.Field.type_url)
1800
1801 return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1802 }
set_allocated_type_url(::std::string * type_url)1803 void Field::set_allocated_type_url(::std::string* type_url) {
1804 if (type_url != NULL) {
1805
1806 } else {
1807
1808 }
1809 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
1810 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url)
1811 }
1812
1813 // optional int32 oneof_index = 7;
clear_oneof_index()1814 void Field::clear_oneof_index() {
1815 oneof_index_ = 0;
1816 }
oneof_index() const1817 ::google::protobuf::int32 Field::oneof_index() const {
1818 // @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index)
1819 return oneof_index_;
1820 }
set_oneof_index(::google::protobuf::int32 value)1821 void Field::set_oneof_index(::google::protobuf::int32 value) {
1822
1823 oneof_index_ = value;
1824 // @@protoc_insertion_point(field_set:google.protobuf.Field.oneof_index)
1825 }
1826
1827 // optional bool packed = 8;
clear_packed()1828 void Field::clear_packed() {
1829 packed_ = false;
1830 }
packed() const1831 bool Field::packed() const {
1832 // @@protoc_insertion_point(field_get:google.protobuf.Field.packed)
1833 return packed_;
1834 }
set_packed(bool value)1835 void Field::set_packed(bool value) {
1836
1837 packed_ = value;
1838 // @@protoc_insertion_point(field_set:google.protobuf.Field.packed)
1839 }
1840
1841 // repeated .google.protobuf.Option options = 9;
options_size() const1842 int Field::options_size() const {
1843 return options_.size();
1844 }
clear_options()1845 void Field::clear_options() {
1846 options_.Clear();
1847 }
options(int index) const1848 const ::google::protobuf::Option& Field::options(int index) const {
1849 // @@protoc_insertion_point(field_get:google.protobuf.Field.options)
1850 return options_.Get(index);
1851 }
mutable_options(int index)1852 ::google::protobuf::Option* Field::mutable_options(int index) {
1853 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.options)
1854 return options_.Mutable(index);
1855 }
add_options()1856 ::google::protobuf::Option* Field::add_options() {
1857 // @@protoc_insertion_point(field_add:google.protobuf.Field.options)
1858 return options_.Add();
1859 }
1860 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options()1861 Field::mutable_options() {
1862 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options)
1863 return &options_;
1864 }
1865 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const1866 Field::options() const {
1867 // @@protoc_insertion_point(field_list:google.protobuf.Field.options)
1868 return options_;
1869 }
1870
1871 // optional string json_name = 10;
clear_json_name()1872 void Field::clear_json_name() {
1873 json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1874 }
json_name() const1875 const ::std::string& Field::json_name() const {
1876 // @@protoc_insertion_point(field_get:google.protobuf.Field.json_name)
1877 return json_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1878 }
set_json_name(const::std::string & value)1879 void Field::set_json_name(const ::std::string& value) {
1880
1881 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1882 // @@protoc_insertion_point(field_set:google.protobuf.Field.json_name)
1883 }
set_json_name(const char * value)1884 void Field::set_json_name(const char* value) {
1885
1886 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1887 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.json_name)
1888 }
set_json_name(const char * value,size_t size)1889 void Field::set_json_name(const char* value, size_t size) {
1890
1891 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1892 ::std::string(reinterpret_cast<const char*>(value), size));
1893 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.json_name)
1894 }
mutable_json_name()1895 ::std::string* Field::mutable_json_name() {
1896
1897 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.json_name)
1898 return json_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1899 }
release_json_name()1900 ::std::string* Field::release_json_name() {
1901 // @@protoc_insertion_point(field_release:google.protobuf.Field.json_name)
1902
1903 return json_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1904 }
set_allocated_json_name(::std::string * json_name)1905 void Field::set_allocated_json_name(::std::string* json_name) {
1906 if (json_name != NULL) {
1907
1908 } else {
1909
1910 }
1911 json_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name);
1912 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name)
1913 }
1914
1915 // optional string default_value = 11;
clear_default_value()1916 void Field::clear_default_value() {
1917 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1918 }
default_value() const1919 const ::std::string& Field::default_value() const {
1920 // @@protoc_insertion_point(field_get:google.protobuf.Field.default_value)
1921 return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1922 }
set_default_value(const::std::string & value)1923 void Field::set_default_value(const ::std::string& value) {
1924
1925 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1926 // @@protoc_insertion_point(field_set:google.protobuf.Field.default_value)
1927 }
set_default_value(const char * value)1928 void Field::set_default_value(const char* value) {
1929
1930 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1931 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.default_value)
1932 }
set_default_value(const char * value,size_t size)1933 void Field::set_default_value(const char* value, size_t size) {
1934
1935 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1936 ::std::string(reinterpret_cast<const char*>(value), size));
1937 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.default_value)
1938 }
mutable_default_value()1939 ::std::string* Field::mutable_default_value() {
1940
1941 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.default_value)
1942 return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1943 }
release_default_value()1944 ::std::string* Field::release_default_value() {
1945 // @@protoc_insertion_point(field_release:google.protobuf.Field.default_value)
1946
1947 return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1948 }
set_allocated_default_value(::std::string * default_value)1949 void Field::set_allocated_default_value(::std::string* default_value) {
1950 if (default_value != NULL) {
1951
1952 } else {
1953
1954 }
1955 default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value);
1956 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_value)
1957 }
1958
1959 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
1960
1961 // ===================================================================
1962
1963 #if !defined(_MSC_VER) || _MSC_VER >= 1900
1964 const int Enum::kNameFieldNumber;
1965 const int Enum::kEnumvalueFieldNumber;
1966 const int Enum::kOptionsFieldNumber;
1967 const int Enum::kSourceContextFieldNumber;
1968 const int Enum::kSyntaxFieldNumber;
1969 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1970
Enum()1971 Enum::Enum()
1972 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
1973 SharedCtor();
1974 // @@protoc_insertion_point(constructor:google.protobuf.Enum)
1975 }
1976
InitAsDefaultInstance()1977 void Enum::InitAsDefaultInstance() {
1978 _is_default_instance_ = true;
1979 source_context_ = const_cast< ::google::protobuf::SourceContext*>(&::google::protobuf::SourceContext::default_instance());
1980 }
1981
Enum(const Enum & from)1982 Enum::Enum(const Enum& from)
1983 : ::google::protobuf::Message(),
1984 _internal_metadata_(NULL) {
1985 SharedCtor();
1986 MergeFrom(from);
1987 // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
1988 }
1989
SharedCtor()1990 void Enum::SharedCtor() {
1991 _is_default_instance_ = false;
1992 ::google::protobuf::internal::GetEmptyString();
1993 _cached_size_ = 0;
1994 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1995 source_context_ = NULL;
1996 syntax_ = 0;
1997 }
1998
~Enum()1999 Enum::~Enum() {
2000 // @@protoc_insertion_point(destructor:google.protobuf.Enum)
2001 SharedDtor();
2002 }
2003
SharedDtor()2004 void Enum::SharedDtor() {
2005 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2006 if (this != default_instance_) {
2007 delete source_context_;
2008 }
2009 }
2010
SetCachedSize(int size) const2011 void Enum::SetCachedSize(int size) const {
2012 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2013 _cached_size_ = size;
2014 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2015 }
descriptor()2016 const ::google::protobuf::Descriptor* Enum::descriptor() {
2017 protobuf_AssignDescriptorsOnce();
2018 return Enum_descriptor_;
2019 }
2020
default_instance()2021 const Enum& Enum::default_instance() {
2022 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
2023 return *default_instance_;
2024 }
2025
2026 Enum* Enum::default_instance_ = NULL;
2027
New(::google::protobuf::Arena * arena) const2028 Enum* Enum::New(::google::protobuf::Arena* arena) const {
2029 Enum* n = new Enum;
2030 if (arena != NULL) {
2031 arena->Own(n);
2032 }
2033 return n;
2034 }
2035
Clear()2036 void Enum::Clear() {
2037 // @@protoc_insertion_point(message_clear_start:google.protobuf.Enum)
2038 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2039 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
2040 source_context_ = NULL;
2041 syntax_ = 0;
2042 enumvalue_.Clear();
2043 options_.Clear();
2044 }
2045
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)2046 bool Enum::MergePartialFromCodedStream(
2047 ::google::protobuf::io::CodedInputStream* input) {
2048 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
2049 ::google::protobuf::uint32 tag;
2050 // @@protoc_insertion_point(parse_start:google.protobuf.Enum)
2051 for (;;) {
2052 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2053 tag = p.first;
2054 if (!p.second) goto handle_unusual;
2055 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2056 // optional string name = 1;
2057 case 1: {
2058 if (tag == 10) {
2059 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2060 input, this->mutable_name()));
2061 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2062 this->name().data(), this->name().length(),
2063 ::google::protobuf::internal::WireFormatLite::PARSE,
2064 "google.protobuf.Enum.name"));
2065 } else {
2066 goto handle_unusual;
2067 }
2068 if (input->ExpectTag(18)) goto parse_enumvalue;
2069 break;
2070 }
2071
2072 // repeated .google.protobuf.EnumValue enumvalue = 2;
2073 case 2: {
2074 if (tag == 18) {
2075 parse_enumvalue:
2076 DO_(input->IncrementRecursionDepth());
2077 parse_loop_enumvalue:
2078 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
2079 input, add_enumvalue()));
2080 } else {
2081 goto handle_unusual;
2082 }
2083 if (input->ExpectTag(18)) goto parse_loop_enumvalue;
2084 if (input->ExpectTag(26)) goto parse_loop_options;
2085 input->UnsafeDecrementRecursionDepth();
2086 break;
2087 }
2088
2089 // repeated .google.protobuf.Option options = 3;
2090 case 3: {
2091 if (tag == 26) {
2092 DO_(input->IncrementRecursionDepth());
2093 parse_loop_options:
2094 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
2095 input, add_options()));
2096 } else {
2097 goto handle_unusual;
2098 }
2099 if (input->ExpectTag(26)) goto parse_loop_options;
2100 input->UnsafeDecrementRecursionDepth();
2101 if (input->ExpectTag(34)) goto parse_source_context;
2102 break;
2103 }
2104
2105 // optional .google.protobuf.SourceContext source_context = 4;
2106 case 4: {
2107 if (tag == 34) {
2108 parse_source_context:
2109 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2110 input, mutable_source_context()));
2111 } else {
2112 goto handle_unusual;
2113 }
2114 if (input->ExpectTag(40)) goto parse_syntax;
2115 break;
2116 }
2117
2118 // optional .google.protobuf.Syntax syntax = 5;
2119 case 5: {
2120 if (tag == 40) {
2121 parse_syntax:
2122 int value;
2123 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2124 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
2125 input, &value)));
2126 set_syntax(static_cast< ::google::protobuf::Syntax >(value));
2127 } else {
2128 goto handle_unusual;
2129 }
2130 if (input->ExpectAtEnd()) goto success;
2131 break;
2132 }
2133
2134 default: {
2135 handle_unusual:
2136 if (tag == 0 ||
2137 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2138 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2139 goto success;
2140 }
2141 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
2142 break;
2143 }
2144 }
2145 }
2146 success:
2147 // @@protoc_insertion_point(parse_success:google.protobuf.Enum)
2148 return true;
2149 failure:
2150 // @@protoc_insertion_point(parse_failure:google.protobuf.Enum)
2151 return false;
2152 #undef DO_
2153 }
2154
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const2155 void Enum::SerializeWithCachedSizes(
2156 ::google::protobuf::io::CodedOutputStream* output) const {
2157 // @@protoc_insertion_point(serialize_start:google.protobuf.Enum)
2158 // optional string name = 1;
2159 if (this->name().size() > 0) {
2160 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2161 this->name().data(), this->name().length(),
2162 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
2163 "google.protobuf.Enum.name");
2164 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2165 1, this->name(), output);
2166 }
2167
2168 // repeated .google.protobuf.EnumValue enumvalue = 2;
2169 for (unsigned int i = 0, n = this->enumvalue_size(); i < n; i++) {
2170 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2171 2, this->enumvalue(i), output);
2172 }
2173
2174 // repeated .google.protobuf.Option options = 3;
2175 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
2176 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2177 3, this->options(i), output);
2178 }
2179
2180 // optional .google.protobuf.SourceContext source_context = 4;
2181 if (this->has_source_context()) {
2182 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2183 4, *this->source_context_, output);
2184 }
2185
2186 // optional .google.protobuf.Syntax syntax = 5;
2187 if (this->syntax() != 0) {
2188 ::google::protobuf::internal::WireFormatLite::WriteEnum(
2189 5, this->syntax(), output);
2190 }
2191
2192 // @@protoc_insertion_point(serialize_end:google.protobuf.Enum)
2193 }
2194
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const2195 ::google::protobuf::uint8* Enum::SerializeWithCachedSizesToArray(
2196 ::google::protobuf::uint8* target) const {
2197 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
2198 // optional string name = 1;
2199 if (this->name().size() > 0) {
2200 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2201 this->name().data(), this->name().length(),
2202 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
2203 "google.protobuf.Enum.name");
2204 target =
2205 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2206 1, this->name(), target);
2207 }
2208
2209 // repeated .google.protobuf.EnumValue enumvalue = 2;
2210 for (unsigned int i = 0, n = this->enumvalue_size(); i < n; i++) {
2211 target = ::google::protobuf::internal::WireFormatLite::
2212 WriteMessageNoVirtualToArray(
2213 2, this->enumvalue(i), target);
2214 }
2215
2216 // repeated .google.protobuf.Option options = 3;
2217 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
2218 target = ::google::protobuf::internal::WireFormatLite::
2219 WriteMessageNoVirtualToArray(
2220 3, this->options(i), target);
2221 }
2222
2223 // optional .google.protobuf.SourceContext source_context = 4;
2224 if (this->has_source_context()) {
2225 target = ::google::protobuf::internal::WireFormatLite::
2226 WriteMessageNoVirtualToArray(
2227 4, *this->source_context_, target);
2228 }
2229
2230 // optional .google.protobuf.Syntax syntax = 5;
2231 if (this->syntax() != 0) {
2232 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2233 5, this->syntax(), target);
2234 }
2235
2236 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum)
2237 return target;
2238 }
2239
ByteSize() const2240 int Enum::ByteSize() const {
2241 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum)
2242 int total_size = 0;
2243
2244 // optional string name = 1;
2245 if (this->name().size() > 0) {
2246 total_size += 1 +
2247 ::google::protobuf::internal::WireFormatLite::StringSize(
2248 this->name());
2249 }
2250
2251 // optional .google.protobuf.SourceContext source_context = 4;
2252 if (this->has_source_context()) {
2253 total_size += 1 +
2254 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2255 *this->source_context_);
2256 }
2257
2258 // optional .google.protobuf.Syntax syntax = 5;
2259 if (this->syntax() != 0) {
2260 total_size += 1 +
2261 ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax());
2262 }
2263
2264 // repeated .google.protobuf.EnumValue enumvalue = 2;
2265 total_size += 1 * this->enumvalue_size();
2266 for (int i = 0; i < this->enumvalue_size(); i++) {
2267 total_size +=
2268 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2269 this->enumvalue(i));
2270 }
2271
2272 // repeated .google.protobuf.Option options = 3;
2273 total_size += 1 * this->options_size();
2274 for (int i = 0; i < this->options_size(); i++) {
2275 total_size +=
2276 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2277 this->options(i));
2278 }
2279
2280 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2281 _cached_size_ = total_size;
2282 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2283 return total_size;
2284 }
2285
MergeFrom(const::google::protobuf::Message & from)2286 void Enum::MergeFrom(const ::google::protobuf::Message& from) {
2287 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Enum)
2288 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2289 const Enum* source =
2290 ::google::protobuf::internal::DynamicCastToGenerated<const Enum>(
2291 &from);
2292 if (source == NULL) {
2293 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Enum)
2294 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2295 } else {
2296 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Enum)
2297 MergeFrom(*source);
2298 }
2299 }
2300
MergeFrom(const Enum & from)2301 void Enum::MergeFrom(const Enum& from) {
2302 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
2303 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2304 enumvalue_.MergeFrom(from.enumvalue_);
2305 options_.MergeFrom(from.options_);
2306 if (from.name().size() > 0) {
2307
2308 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
2309 }
2310 if (from.has_source_context()) {
2311 mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.source_context());
2312 }
2313 if (from.syntax() != 0) {
2314 set_syntax(from.syntax());
2315 }
2316 }
2317
CopyFrom(const::google::protobuf::Message & from)2318 void Enum::CopyFrom(const ::google::protobuf::Message& from) {
2319 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Enum)
2320 if (&from == this) return;
2321 Clear();
2322 MergeFrom(from);
2323 }
2324
CopyFrom(const Enum & from)2325 void Enum::CopyFrom(const Enum& from) {
2326 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Enum)
2327 if (&from == this) return;
2328 Clear();
2329 MergeFrom(from);
2330 }
2331
IsInitialized() const2332 bool Enum::IsInitialized() const {
2333
2334 return true;
2335 }
2336
Swap(Enum * other)2337 void Enum::Swap(Enum* other) {
2338 if (other == this) return;
2339 InternalSwap(other);
2340 }
InternalSwap(Enum * other)2341 void Enum::InternalSwap(Enum* other) {
2342 name_.Swap(&other->name_);
2343 enumvalue_.UnsafeArenaSwap(&other->enumvalue_);
2344 options_.UnsafeArenaSwap(&other->options_);
2345 std::swap(source_context_, other->source_context_);
2346 std::swap(syntax_, other->syntax_);
2347 _internal_metadata_.Swap(&other->_internal_metadata_);
2348 std::swap(_cached_size_, other->_cached_size_);
2349 }
2350
GetMetadata() const2351 ::google::protobuf::Metadata Enum::GetMetadata() const {
2352 protobuf_AssignDescriptorsOnce();
2353 ::google::protobuf::Metadata metadata;
2354 metadata.descriptor = Enum_descriptor_;
2355 metadata.reflection = Enum_reflection_;
2356 return metadata;
2357 }
2358
2359 #if PROTOBUF_INLINE_NOT_IN_HEADERS
2360 // Enum
2361
2362 // optional string name = 1;
clear_name()2363 void Enum::clear_name() {
2364 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2365 }
name() const2366 const ::std::string& Enum::name() const {
2367 // @@protoc_insertion_point(field_get:google.protobuf.Enum.name)
2368 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2369 }
set_name(const::std::string & value)2370 void Enum::set_name(const ::std::string& value) {
2371
2372 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
2373 // @@protoc_insertion_point(field_set:google.protobuf.Enum.name)
2374 }
set_name(const char * value)2375 void Enum::set_name(const char* value) {
2376
2377 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
2378 // @@protoc_insertion_point(field_set_char:google.protobuf.Enum.name)
2379 }
set_name(const char * value,size_t size)2380 void Enum::set_name(const char* value, size_t size) {
2381
2382 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2383 ::std::string(reinterpret_cast<const char*>(value), size));
2384 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Enum.name)
2385 }
mutable_name()2386 ::std::string* Enum::mutable_name() {
2387
2388 // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.name)
2389 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2390 }
release_name()2391 ::std::string* Enum::release_name() {
2392 // @@protoc_insertion_point(field_release:google.protobuf.Enum.name)
2393
2394 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2395 }
set_allocated_name(::std::string * name)2396 void Enum::set_allocated_name(::std::string* name) {
2397 if (name != NULL) {
2398
2399 } else {
2400
2401 }
2402 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
2403 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name)
2404 }
2405
2406 // repeated .google.protobuf.EnumValue enumvalue = 2;
enumvalue_size() const2407 int Enum::enumvalue_size() const {
2408 return enumvalue_.size();
2409 }
clear_enumvalue()2410 void Enum::clear_enumvalue() {
2411 enumvalue_.Clear();
2412 }
enumvalue(int index) const2413 const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const {
2414 // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue)
2415 return enumvalue_.Get(index);
2416 }
mutable_enumvalue(int index)2417 ::google::protobuf::EnumValue* Enum::mutable_enumvalue(int index) {
2418 // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.enumvalue)
2419 return enumvalue_.Mutable(index);
2420 }
add_enumvalue()2421 ::google::protobuf::EnumValue* Enum::add_enumvalue() {
2422 // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue)
2423 return enumvalue_.Add();
2424 }
2425 ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >*
mutable_enumvalue()2426 Enum::mutable_enumvalue() {
2427 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue)
2428 return &enumvalue_;
2429 }
2430 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValue >&
enumvalue() const2431 Enum::enumvalue() const {
2432 // @@protoc_insertion_point(field_list:google.protobuf.Enum.enumvalue)
2433 return enumvalue_;
2434 }
2435
2436 // repeated .google.protobuf.Option options = 3;
options_size() const2437 int Enum::options_size() const {
2438 return options_.size();
2439 }
clear_options()2440 void Enum::clear_options() {
2441 options_.Clear();
2442 }
options(int index) const2443 const ::google::protobuf::Option& Enum::options(int index) const {
2444 // @@protoc_insertion_point(field_get:google.protobuf.Enum.options)
2445 return options_.Get(index);
2446 }
mutable_options(int index)2447 ::google::protobuf::Option* Enum::mutable_options(int index) {
2448 // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.options)
2449 return options_.Mutable(index);
2450 }
add_options()2451 ::google::protobuf::Option* Enum::add_options() {
2452 // @@protoc_insertion_point(field_add:google.protobuf.Enum.options)
2453 return options_.Add();
2454 }
2455 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options()2456 Enum::mutable_options() {
2457 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options)
2458 return &options_;
2459 }
2460 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const2461 Enum::options() const {
2462 // @@protoc_insertion_point(field_list:google.protobuf.Enum.options)
2463 return options_;
2464 }
2465
2466 // optional .google.protobuf.SourceContext source_context = 4;
has_source_context() const2467 bool Enum::has_source_context() const {
2468 return !_is_default_instance_ && source_context_ != NULL;
2469 }
clear_source_context()2470 void Enum::clear_source_context() {
2471 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
2472 source_context_ = NULL;
2473 }
source_context() const2474 const ::google::protobuf::SourceContext& Enum::source_context() const {
2475 // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context)
2476 return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
2477 }
mutable_source_context()2478 ::google::protobuf::SourceContext* Enum::mutable_source_context() {
2479
2480 if (source_context_ == NULL) {
2481 source_context_ = new ::google::protobuf::SourceContext;
2482 }
2483 // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context)
2484 return source_context_;
2485 }
release_source_context()2486 ::google::protobuf::SourceContext* Enum::release_source_context() {
2487 // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context)
2488
2489 ::google::protobuf::SourceContext* temp = source_context_;
2490 source_context_ = NULL;
2491 return temp;
2492 }
set_allocated_source_context(::google::protobuf::SourceContext * source_context)2493 void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
2494 delete source_context_;
2495 source_context_ = source_context;
2496 if (source_context) {
2497
2498 } else {
2499
2500 }
2501 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.source_context)
2502 }
2503
2504 // optional .google.protobuf.Syntax syntax = 5;
clear_syntax()2505 void Enum::clear_syntax() {
2506 syntax_ = 0;
2507 }
syntax() const2508 ::google::protobuf::Syntax Enum::syntax() const {
2509 // @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax)
2510 return static_cast< ::google::protobuf::Syntax >(syntax_);
2511 }
set_syntax(::google::protobuf::Syntax value)2512 void Enum::set_syntax(::google::protobuf::Syntax value) {
2513
2514 syntax_ = value;
2515 // @@protoc_insertion_point(field_set:google.protobuf.Enum.syntax)
2516 }
2517
2518 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
2519
2520 // ===================================================================
2521
2522 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2523 const int EnumValue::kNameFieldNumber;
2524 const int EnumValue::kNumberFieldNumber;
2525 const int EnumValue::kOptionsFieldNumber;
2526 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
2527
EnumValue()2528 EnumValue::EnumValue()
2529 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
2530 SharedCtor();
2531 // @@protoc_insertion_point(constructor:google.protobuf.EnumValue)
2532 }
2533
InitAsDefaultInstance()2534 void EnumValue::InitAsDefaultInstance() {
2535 _is_default_instance_ = true;
2536 }
2537
EnumValue(const EnumValue & from)2538 EnumValue::EnumValue(const EnumValue& from)
2539 : ::google::protobuf::Message(),
2540 _internal_metadata_(NULL) {
2541 SharedCtor();
2542 MergeFrom(from);
2543 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
2544 }
2545
SharedCtor()2546 void EnumValue::SharedCtor() {
2547 _is_default_instance_ = false;
2548 ::google::protobuf::internal::GetEmptyString();
2549 _cached_size_ = 0;
2550 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2551 number_ = 0;
2552 }
2553
~EnumValue()2554 EnumValue::~EnumValue() {
2555 // @@protoc_insertion_point(destructor:google.protobuf.EnumValue)
2556 SharedDtor();
2557 }
2558
SharedDtor()2559 void EnumValue::SharedDtor() {
2560 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2561 if (this != default_instance_) {
2562 }
2563 }
2564
SetCachedSize(int size) const2565 void EnumValue::SetCachedSize(int size) const {
2566 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2567 _cached_size_ = size;
2568 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2569 }
descriptor()2570 const ::google::protobuf::Descriptor* EnumValue::descriptor() {
2571 protobuf_AssignDescriptorsOnce();
2572 return EnumValue_descriptor_;
2573 }
2574
default_instance()2575 const EnumValue& EnumValue::default_instance() {
2576 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
2577 return *default_instance_;
2578 }
2579
2580 EnumValue* EnumValue::default_instance_ = NULL;
2581
New(::google::protobuf::Arena * arena) const2582 EnumValue* EnumValue::New(::google::protobuf::Arena* arena) const {
2583 EnumValue* n = new EnumValue;
2584 if (arena != NULL) {
2585 arena->Own(n);
2586 }
2587 return n;
2588 }
2589
Clear()2590 void EnumValue::Clear() {
2591 // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue)
2592 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2593 number_ = 0;
2594 options_.Clear();
2595 }
2596
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)2597 bool EnumValue::MergePartialFromCodedStream(
2598 ::google::protobuf::io::CodedInputStream* input) {
2599 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
2600 ::google::protobuf::uint32 tag;
2601 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValue)
2602 for (;;) {
2603 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2604 tag = p.first;
2605 if (!p.second) goto handle_unusual;
2606 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2607 // optional string name = 1;
2608 case 1: {
2609 if (tag == 10) {
2610 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2611 input, this->mutable_name()));
2612 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2613 this->name().data(), this->name().length(),
2614 ::google::protobuf::internal::WireFormatLite::PARSE,
2615 "google.protobuf.EnumValue.name"));
2616 } else {
2617 goto handle_unusual;
2618 }
2619 if (input->ExpectTag(16)) goto parse_number;
2620 break;
2621 }
2622
2623 // optional int32 number = 2;
2624 case 2: {
2625 if (tag == 16) {
2626 parse_number:
2627 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2628 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2629 input, &number_)));
2630
2631 } else {
2632 goto handle_unusual;
2633 }
2634 if (input->ExpectTag(26)) goto parse_options;
2635 break;
2636 }
2637
2638 // repeated .google.protobuf.Option options = 3;
2639 case 3: {
2640 if (tag == 26) {
2641 parse_options:
2642 DO_(input->IncrementRecursionDepth());
2643 parse_loop_options:
2644 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
2645 input, add_options()));
2646 } else {
2647 goto handle_unusual;
2648 }
2649 if (input->ExpectTag(26)) goto parse_loop_options;
2650 input->UnsafeDecrementRecursionDepth();
2651 if (input->ExpectAtEnd()) goto success;
2652 break;
2653 }
2654
2655 default: {
2656 handle_unusual:
2657 if (tag == 0 ||
2658 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2659 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2660 goto success;
2661 }
2662 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
2663 break;
2664 }
2665 }
2666 }
2667 success:
2668 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValue)
2669 return true;
2670 failure:
2671 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValue)
2672 return false;
2673 #undef DO_
2674 }
2675
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const2676 void EnumValue::SerializeWithCachedSizes(
2677 ::google::protobuf::io::CodedOutputStream* output) const {
2678 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue)
2679 // optional string name = 1;
2680 if (this->name().size() > 0) {
2681 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2682 this->name().data(), this->name().length(),
2683 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
2684 "google.protobuf.EnumValue.name");
2685 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2686 1, this->name(), output);
2687 }
2688
2689 // optional int32 number = 2;
2690 if (this->number() != 0) {
2691 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output);
2692 }
2693
2694 // repeated .google.protobuf.Option options = 3;
2695 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
2696 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2697 3, this->options(i), output);
2698 }
2699
2700 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValue)
2701 }
2702
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const2703 ::google::protobuf::uint8* EnumValue::SerializeWithCachedSizesToArray(
2704 ::google::protobuf::uint8* target) const {
2705 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
2706 // optional string name = 1;
2707 if (this->name().size() > 0) {
2708 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2709 this->name().data(), this->name().length(),
2710 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
2711 "google.protobuf.EnumValue.name");
2712 target =
2713 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2714 1, this->name(), target);
2715 }
2716
2717 // optional int32 number = 2;
2718 if (this->number() != 0) {
2719 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target);
2720 }
2721
2722 // repeated .google.protobuf.Option options = 3;
2723 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
2724 target = ::google::protobuf::internal::WireFormatLite::
2725 WriteMessageNoVirtualToArray(
2726 3, this->options(i), target);
2727 }
2728
2729 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue)
2730 return target;
2731 }
2732
ByteSize() const2733 int EnumValue::ByteSize() const {
2734 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue)
2735 int total_size = 0;
2736
2737 // optional string name = 1;
2738 if (this->name().size() > 0) {
2739 total_size += 1 +
2740 ::google::protobuf::internal::WireFormatLite::StringSize(
2741 this->name());
2742 }
2743
2744 // optional int32 number = 2;
2745 if (this->number() != 0) {
2746 total_size += 1 +
2747 ::google::protobuf::internal::WireFormatLite::Int32Size(
2748 this->number());
2749 }
2750
2751 // repeated .google.protobuf.Option options = 3;
2752 total_size += 1 * this->options_size();
2753 for (int i = 0; i < this->options_size(); i++) {
2754 total_size +=
2755 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2756 this->options(i));
2757 }
2758
2759 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2760 _cached_size_ = total_size;
2761 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2762 return total_size;
2763 }
2764
MergeFrom(const::google::protobuf::Message & from)2765 void EnumValue::MergeFrom(const ::google::protobuf::Message& from) {
2766 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumValue)
2767 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2768 const EnumValue* source =
2769 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValue>(
2770 &from);
2771 if (source == NULL) {
2772 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumValue)
2773 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2774 } else {
2775 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.EnumValue)
2776 MergeFrom(*source);
2777 }
2778 }
2779
MergeFrom(const EnumValue & from)2780 void EnumValue::MergeFrom(const EnumValue& from) {
2781 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
2782 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2783 options_.MergeFrom(from.options_);
2784 if (from.name().size() > 0) {
2785
2786 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
2787 }
2788 if (from.number() != 0) {
2789 set_number(from.number());
2790 }
2791 }
2792
CopyFrom(const::google::protobuf::Message & from)2793 void EnumValue::CopyFrom(const ::google::protobuf::Message& from) {
2794 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumValue)
2795 if (&from == this) return;
2796 Clear();
2797 MergeFrom(from);
2798 }
2799
CopyFrom(const EnumValue & from)2800 void EnumValue::CopyFrom(const EnumValue& from) {
2801 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumValue)
2802 if (&from == this) return;
2803 Clear();
2804 MergeFrom(from);
2805 }
2806
IsInitialized() const2807 bool EnumValue::IsInitialized() const {
2808
2809 return true;
2810 }
2811
Swap(EnumValue * other)2812 void EnumValue::Swap(EnumValue* other) {
2813 if (other == this) return;
2814 InternalSwap(other);
2815 }
InternalSwap(EnumValue * other)2816 void EnumValue::InternalSwap(EnumValue* other) {
2817 name_.Swap(&other->name_);
2818 std::swap(number_, other->number_);
2819 options_.UnsafeArenaSwap(&other->options_);
2820 _internal_metadata_.Swap(&other->_internal_metadata_);
2821 std::swap(_cached_size_, other->_cached_size_);
2822 }
2823
GetMetadata() const2824 ::google::protobuf::Metadata EnumValue::GetMetadata() const {
2825 protobuf_AssignDescriptorsOnce();
2826 ::google::protobuf::Metadata metadata;
2827 metadata.descriptor = EnumValue_descriptor_;
2828 metadata.reflection = EnumValue_reflection_;
2829 return metadata;
2830 }
2831
2832 #if PROTOBUF_INLINE_NOT_IN_HEADERS
2833 // EnumValue
2834
2835 // optional string name = 1;
clear_name()2836 void EnumValue::clear_name() {
2837 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2838 }
name() const2839 const ::std::string& EnumValue::name() const {
2840 // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.name)
2841 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2842 }
set_name(const::std::string & value)2843 void EnumValue::set_name(const ::std::string& value) {
2844
2845 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
2846 // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.name)
2847 }
set_name(const char * value)2848 void EnumValue::set_name(const char* value) {
2849
2850 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
2851 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValue.name)
2852 }
set_name(const char * value,size_t size)2853 void EnumValue::set_name(const char* value, size_t size) {
2854
2855 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2856 ::std::string(reinterpret_cast<const char*>(value), size));
2857 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValue.name)
2858 }
mutable_name()2859 ::std::string* EnumValue::mutable_name() {
2860
2861 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.name)
2862 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2863 }
release_name()2864 ::std::string* EnumValue::release_name() {
2865 // @@protoc_insertion_point(field_release:google.protobuf.EnumValue.name)
2866
2867 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2868 }
set_allocated_name(::std::string * name)2869 void EnumValue::set_allocated_name(::std::string* name) {
2870 if (name != NULL) {
2871
2872 } else {
2873
2874 }
2875 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
2876 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name)
2877 }
2878
2879 // optional int32 number = 2;
clear_number()2880 void EnumValue::clear_number() {
2881 number_ = 0;
2882 }
number() const2883 ::google::protobuf::int32 EnumValue::number() const {
2884 // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number)
2885 return number_;
2886 }
set_number(::google::protobuf::int32 value)2887 void EnumValue::set_number(::google::protobuf::int32 value) {
2888
2889 number_ = value;
2890 // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.number)
2891 }
2892
2893 // repeated .google.protobuf.Option options = 3;
options_size() const2894 int EnumValue::options_size() const {
2895 return options_.size();
2896 }
clear_options()2897 void EnumValue::clear_options() {
2898 options_.Clear();
2899 }
options(int index) const2900 const ::google::protobuf::Option& EnumValue::options(int index) const {
2901 // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options)
2902 return options_.Get(index);
2903 }
mutable_options(int index)2904 ::google::protobuf::Option* EnumValue::mutable_options(int index) {
2905 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.options)
2906 return options_.Mutable(index);
2907 }
add_options()2908 ::google::protobuf::Option* EnumValue::add_options() {
2909 // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options)
2910 return options_.Add();
2911 }
2912 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options()2913 EnumValue::mutable_options() {
2914 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options)
2915 return &options_;
2916 }
2917 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const2918 EnumValue::options() const {
2919 // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options)
2920 return options_;
2921 }
2922
2923 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
2924
2925 // ===================================================================
2926
2927 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2928 const int Option::kNameFieldNumber;
2929 const int Option::kValueFieldNumber;
2930 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
2931
Option()2932 Option::Option()
2933 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
2934 SharedCtor();
2935 // @@protoc_insertion_point(constructor:google.protobuf.Option)
2936 }
2937
InitAsDefaultInstance()2938 void Option::InitAsDefaultInstance() {
2939 _is_default_instance_ = true;
2940 value_ = const_cast< ::google::protobuf::Any*>(&::google::protobuf::Any::default_instance());
2941 }
2942
Option(const Option & from)2943 Option::Option(const Option& from)
2944 : ::google::protobuf::Message(),
2945 _internal_metadata_(NULL) {
2946 SharedCtor();
2947 MergeFrom(from);
2948 // @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
2949 }
2950
SharedCtor()2951 void Option::SharedCtor() {
2952 _is_default_instance_ = false;
2953 ::google::protobuf::internal::GetEmptyString();
2954 _cached_size_ = 0;
2955 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2956 value_ = NULL;
2957 }
2958
~Option()2959 Option::~Option() {
2960 // @@protoc_insertion_point(destructor:google.protobuf.Option)
2961 SharedDtor();
2962 }
2963
SharedDtor()2964 void Option::SharedDtor() {
2965 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2966 if (this != default_instance_) {
2967 delete value_;
2968 }
2969 }
2970
SetCachedSize(int size) const2971 void Option::SetCachedSize(int size) const {
2972 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2973 _cached_size_ = size;
2974 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2975 }
descriptor()2976 const ::google::protobuf::Descriptor* Option::descriptor() {
2977 protobuf_AssignDescriptorsOnce();
2978 return Option_descriptor_;
2979 }
2980
default_instance()2981 const Option& Option::default_instance() {
2982 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
2983 return *default_instance_;
2984 }
2985
2986 Option* Option::default_instance_ = NULL;
2987
New(::google::protobuf::Arena * arena) const2988 Option* Option::New(::google::protobuf::Arena* arena) const {
2989 Option* n = new Option;
2990 if (arena != NULL) {
2991 arena->Own(n);
2992 }
2993 return n;
2994 }
2995
Clear()2996 void Option::Clear() {
2997 // @@protoc_insertion_point(message_clear_start:google.protobuf.Option)
2998 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2999 if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_;
3000 value_ = NULL;
3001 }
3002
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)3003 bool Option::MergePartialFromCodedStream(
3004 ::google::protobuf::io::CodedInputStream* input) {
3005 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
3006 ::google::protobuf::uint32 tag;
3007 // @@protoc_insertion_point(parse_start:google.protobuf.Option)
3008 for (;;) {
3009 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
3010 tag = p.first;
3011 if (!p.second) goto handle_unusual;
3012 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
3013 // optional string name = 1;
3014 case 1: {
3015 if (tag == 10) {
3016 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3017 input, this->mutable_name()));
3018 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
3019 this->name().data(), this->name().length(),
3020 ::google::protobuf::internal::WireFormatLite::PARSE,
3021 "google.protobuf.Option.name"));
3022 } else {
3023 goto handle_unusual;
3024 }
3025 if (input->ExpectTag(18)) goto parse_value;
3026 break;
3027 }
3028
3029 // optional .google.protobuf.Any value = 2;
3030 case 2: {
3031 if (tag == 18) {
3032 parse_value:
3033 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3034 input, mutable_value()));
3035 } else {
3036 goto handle_unusual;
3037 }
3038 if (input->ExpectAtEnd()) goto success;
3039 break;
3040 }
3041
3042 default: {
3043 handle_unusual:
3044 if (tag == 0 ||
3045 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
3046 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
3047 goto success;
3048 }
3049 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
3050 break;
3051 }
3052 }
3053 }
3054 success:
3055 // @@protoc_insertion_point(parse_success:google.protobuf.Option)
3056 return true;
3057 failure:
3058 // @@protoc_insertion_point(parse_failure:google.protobuf.Option)
3059 return false;
3060 #undef DO_
3061 }
3062
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const3063 void Option::SerializeWithCachedSizes(
3064 ::google::protobuf::io::CodedOutputStream* output) const {
3065 // @@protoc_insertion_point(serialize_start:google.protobuf.Option)
3066 // optional string name = 1;
3067 if (this->name().size() > 0) {
3068 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
3069 this->name().data(), this->name().length(),
3070 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
3071 "google.protobuf.Option.name");
3072 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3073 1, this->name(), output);
3074 }
3075
3076 // optional .google.protobuf.Any value = 2;
3077 if (this->has_value()) {
3078 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3079 2, *this->value_, output);
3080 }
3081
3082 // @@protoc_insertion_point(serialize_end:google.protobuf.Option)
3083 }
3084
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const3085 ::google::protobuf::uint8* Option::SerializeWithCachedSizesToArray(
3086 ::google::protobuf::uint8* target) const {
3087 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
3088 // optional string name = 1;
3089 if (this->name().size() > 0) {
3090 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
3091 this->name().data(), this->name().length(),
3092 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
3093 "google.protobuf.Option.name");
3094 target =
3095 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3096 1, this->name(), target);
3097 }
3098
3099 // optional .google.protobuf.Any value = 2;
3100 if (this->has_value()) {
3101 target = ::google::protobuf::internal::WireFormatLite::
3102 WriteMessageNoVirtualToArray(
3103 2, *this->value_, target);
3104 }
3105
3106 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option)
3107 return target;
3108 }
3109
ByteSize() const3110 int Option::ByteSize() const {
3111 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option)
3112 int total_size = 0;
3113
3114 // optional string name = 1;
3115 if (this->name().size() > 0) {
3116 total_size += 1 +
3117 ::google::protobuf::internal::WireFormatLite::StringSize(
3118 this->name());
3119 }
3120
3121 // optional .google.protobuf.Any value = 2;
3122 if (this->has_value()) {
3123 total_size += 1 +
3124 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
3125 *this->value_);
3126 }
3127
3128 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3129 _cached_size_ = total_size;
3130 GOOGLE_SAFE_CONCURRENT_WRITES_END();
3131 return total_size;
3132 }
3133
MergeFrom(const::google::protobuf::Message & from)3134 void Option::MergeFrom(const ::google::protobuf::Message& from) {
3135 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Option)
3136 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
3137 const Option* source =
3138 ::google::protobuf::internal::DynamicCastToGenerated<const Option>(
3139 &from);
3140 if (source == NULL) {
3141 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Option)
3142 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
3143 } else {
3144 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Option)
3145 MergeFrom(*source);
3146 }
3147 }
3148
MergeFrom(const Option & from)3149 void Option::MergeFrom(const Option& from) {
3150 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
3151 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
3152 if (from.name().size() > 0) {
3153
3154 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
3155 }
3156 if (from.has_value()) {
3157 mutable_value()->::google::protobuf::Any::MergeFrom(from.value());
3158 }
3159 }
3160
CopyFrom(const::google::protobuf::Message & from)3161 void Option::CopyFrom(const ::google::protobuf::Message& from) {
3162 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Option)
3163 if (&from == this) return;
3164 Clear();
3165 MergeFrom(from);
3166 }
3167
CopyFrom(const Option & from)3168 void Option::CopyFrom(const Option& from) {
3169 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Option)
3170 if (&from == this) return;
3171 Clear();
3172 MergeFrom(from);
3173 }
3174
IsInitialized() const3175 bool Option::IsInitialized() const {
3176
3177 return true;
3178 }
3179
Swap(Option * other)3180 void Option::Swap(Option* other) {
3181 if (other == this) return;
3182 InternalSwap(other);
3183 }
InternalSwap(Option * other)3184 void Option::InternalSwap(Option* other) {
3185 name_.Swap(&other->name_);
3186 std::swap(value_, other->value_);
3187 _internal_metadata_.Swap(&other->_internal_metadata_);
3188 std::swap(_cached_size_, other->_cached_size_);
3189 }
3190
GetMetadata() const3191 ::google::protobuf::Metadata Option::GetMetadata() const {
3192 protobuf_AssignDescriptorsOnce();
3193 ::google::protobuf::Metadata metadata;
3194 metadata.descriptor = Option_descriptor_;
3195 metadata.reflection = Option_reflection_;
3196 return metadata;
3197 }
3198
3199 #if PROTOBUF_INLINE_NOT_IN_HEADERS
3200 // Option
3201
3202 // optional string name = 1;
clear_name()3203 void Option::clear_name() {
3204 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3205 }
name() const3206 const ::std::string& Option::name() const {
3207 // @@protoc_insertion_point(field_get:google.protobuf.Option.name)
3208 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3209 }
set_name(const::std::string & value)3210 void Option::set_name(const ::std::string& value) {
3211
3212 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
3213 // @@protoc_insertion_point(field_set:google.protobuf.Option.name)
3214 }
set_name(const char * value)3215 void Option::set_name(const char* value) {
3216
3217 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
3218 // @@protoc_insertion_point(field_set_char:google.protobuf.Option.name)
3219 }
set_name(const char * value,size_t size)3220 void Option::set_name(const char* value, size_t size) {
3221
3222 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
3223 ::std::string(reinterpret_cast<const char*>(value), size));
3224 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Option.name)
3225 }
mutable_name()3226 ::std::string* Option::mutable_name() {
3227
3228 // @@protoc_insertion_point(field_mutable:google.protobuf.Option.name)
3229 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3230 }
release_name()3231 ::std::string* Option::release_name() {
3232 // @@protoc_insertion_point(field_release:google.protobuf.Option.name)
3233
3234 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3235 }
set_allocated_name(::std::string * name)3236 void Option::set_allocated_name(::std::string* name) {
3237 if (name != NULL) {
3238
3239 } else {
3240
3241 }
3242 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
3243 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name)
3244 }
3245
3246 // optional .google.protobuf.Any value = 2;
has_value() const3247 bool Option::has_value() const {
3248 return !_is_default_instance_ && value_ != NULL;
3249 }
clear_value()3250 void Option::clear_value() {
3251 if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_;
3252 value_ = NULL;
3253 }
value() const3254 const ::google::protobuf::Any& Option::value() const {
3255 // @@protoc_insertion_point(field_get:google.protobuf.Option.value)
3256 return value_ != NULL ? *value_ : *default_instance_->value_;
3257 }
mutable_value()3258 ::google::protobuf::Any* Option::mutable_value() {
3259
3260 if (value_ == NULL) {
3261 value_ = new ::google::protobuf::Any;
3262 }
3263 // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value)
3264 return value_;
3265 }
release_value()3266 ::google::protobuf::Any* Option::release_value() {
3267 // @@protoc_insertion_point(field_release:google.protobuf.Option.value)
3268
3269 ::google::protobuf::Any* temp = value_;
3270 value_ = NULL;
3271 return temp;
3272 }
set_allocated_value(::google::protobuf::Any * value)3273 void Option::set_allocated_value(::google::protobuf::Any* value) {
3274 delete value_;
3275 value_ = value;
3276 if (value) {
3277
3278 } else {
3279
3280 }
3281 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.value)
3282 }
3283
3284 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
3285
3286 // @@protoc_insertion_point(namespace_scope)
3287
3288 } // namespace protobuf
3289 } // namespace google
3290
3291 // @@protoc_insertion_point(global_scope)
3292