blob: ff0cfcf8ce4b6935c4f9f1b5d10b4cd43d9911f2 [file] [log] [blame]
temporal40ee5512008-07-10 02:12:20 +00001// Generated by the protocol buffer compiler. DO NOT EDIT!
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002// source: google/protobuf/descriptor.proto
temporal40ee5512008-07-10 02:12:20 +00003
kenton@google.com80b1d622009-07-29 01:13:20 +00004#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
Bo Yang1f0286a2015-12-04 13:18:44 -08005#include <google/protobuf/descriptor.pb.h>
kenton@google.comc65c0412010-02-01 20:35:34 +00006
7#include <algorithm>
8
pliard@google.com75575df2012-10-02 00:15:46 +00009#include <google/protobuf/stubs/common.h>
Feng Xiaoe841bac2015-12-11 17:09:20 -080010#include <google/protobuf/stubs/port.h>
kenton@google.comd37d46d2009-04-25 02:53:47 +000011#include <google/protobuf/stubs/once.h>
temporal40ee5512008-07-10 02:12:20 +000012#include <google/protobuf/io/coded_stream.h>
kenton@google.com80b1d622009-07-29 01:13:20 +000013#include <google/protobuf/wire_format_lite_inl.h>
14#include <google/protobuf/descriptor.h>
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000015#include <google/protobuf/generated_message_reflection.h>
temporal40ee5512008-07-10 02:12:20 +000016#include <google/protobuf/reflection_ops.h>
kenton@google.com80b1d622009-07-29 01:13:20 +000017#include <google/protobuf/wire_format.h>
kenton@google.comfccb1462009-12-18 02:11:36 +000018// @@protoc_insertion_point(includes)
temporal40ee5512008-07-10 02:12:20 +000019
20namespace google {
21namespace protobuf {
22
23namespace {
24
temporal779f61c2008-08-13 03:15:00 +000025const ::google::protobuf::Descriptor* FileDescriptorSet_descriptor_ = NULL;
26const ::google::protobuf::internal::GeneratedMessageReflection*
27 FileDescriptorSet_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000028const ::google::protobuf::Descriptor* FileDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000029const ::google::protobuf::internal::GeneratedMessageReflection*
30 FileDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000031const ::google::protobuf::Descriptor* DescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000032const ::google::protobuf::internal::GeneratedMessageReflection*
33 DescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000034const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000035const ::google::protobuf::internal::GeneratedMessageReflection*
36 DescriptorProto_ExtensionRange_reflection_ = NULL;
Bo Yang5db21732015-05-21 14:28:59 -070037const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange_descriptor_ = NULL;
38const ::google::protobuf::internal::GeneratedMessageReflection*
39 DescriptorProto_ReservedRange_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000040const ::google::protobuf::Descriptor* FieldDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000041const ::google::protobuf::internal::GeneratedMessageReflection*
42 FieldDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000043const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor_ = NULL;
44const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor_ = NULL;
jieluo@google.com4de8f552014-07-18 00:47:59 +000045const ::google::protobuf::Descriptor* OneofDescriptorProto_descriptor_ = NULL;
46const ::google::protobuf::internal::GeneratedMessageReflection*
47 OneofDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000048const ::google::protobuf::Descriptor* EnumDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000049const ::google::protobuf::internal::GeneratedMessageReflection*
50 EnumDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000051const ::google::protobuf::Descriptor* EnumValueDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000052const ::google::protobuf::internal::GeneratedMessageReflection*
53 EnumValueDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000054const ::google::protobuf::Descriptor* ServiceDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000055const ::google::protobuf::internal::GeneratedMessageReflection*
56 ServiceDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000057const ::google::protobuf::Descriptor* MethodDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000058const ::google::protobuf::internal::GeneratedMessageReflection*
59 MethodDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000060const ::google::protobuf::Descriptor* FileOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000061const ::google::protobuf::internal::GeneratedMessageReflection*
62 FileOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000063const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor_ = NULL;
64const ::google::protobuf::Descriptor* MessageOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000065const ::google::protobuf::internal::GeneratedMessageReflection*
66 MessageOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000067const ::google::protobuf::Descriptor* FieldOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000068const ::google::protobuf::internal::GeneratedMessageReflection*
69 FieldOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000070const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor_ = NULL;
Bo Yang5db21732015-05-21 14:28:59 -070071const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000072const ::google::protobuf::Descriptor* EnumOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000073const ::google::protobuf::internal::GeneratedMessageReflection*
74 EnumOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000075const ::google::protobuf::Descriptor* EnumValueOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000076const ::google::protobuf::internal::GeneratedMessageReflection*
77 EnumValueOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000078const ::google::protobuf::Descriptor* ServiceOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000079const ::google::protobuf::internal::GeneratedMessageReflection*
80 ServiceOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000081const ::google::protobuf::Descriptor* MethodOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000082const ::google::protobuf::internal::GeneratedMessageReflection*
83 MethodOptions_reflection_ = NULL;
kenton@google.com24bf56f2008-09-24 20:31:01 +000084const ::google::protobuf::Descriptor* UninterpretedOption_descriptor_ = NULL;
85const ::google::protobuf::internal::GeneratedMessageReflection*
86 UninterpretedOption_reflection_ = NULL;
87const ::google::protobuf::Descriptor* UninterpretedOption_NamePart_descriptor_ = NULL;
88const ::google::protobuf::internal::GeneratedMessageReflection*
89 UninterpretedOption_NamePart_reflection_ = NULL;
liujisi@google.com33165fe2010-11-02 13:14:58 +000090const ::google::protobuf::Descriptor* SourceCodeInfo_descriptor_ = NULL;
91const ::google::protobuf::internal::GeneratedMessageReflection*
92 SourceCodeInfo_reflection_ = NULL;
93const ::google::protobuf::Descriptor* SourceCodeInfo_Location_descriptor_ = NULL;
94const ::google::protobuf::internal::GeneratedMessageReflection*
95 SourceCodeInfo_Location_reflection_ = NULL;
Jisi Liu5221dcb2016-01-29 13:51:05 -080096const ::google::protobuf::Descriptor* GeneratedCodeInfo_descriptor_ = NULL;
97const ::google::protobuf::internal::GeneratedMessageReflection*
98 GeneratedCodeInfo_reflection_ = NULL;
99const ::google::protobuf::Descriptor* GeneratedCodeInfo_Annotation_descriptor_ = NULL;
100const ::google::protobuf::internal::GeneratedMessageReflection*
101 GeneratedCodeInfo_Annotation_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +0000102
103} // namespace
104
105
kenton@google.comd37d46d2009-04-25 02:53:47 +0000106void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() {
107 protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
108 const ::google::protobuf::FileDescriptor* file =
109 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
110 "google/protobuf/descriptor.proto");
111 GOOGLE_CHECK(file != NULL);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000112 FileDescriptorSet_descriptor_ = file->message_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000113 static const int FileDescriptorSet_offsets_[1] = {
114 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_),
115 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000116 FileDescriptorSet_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800117 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000118 FileDescriptorSet_descriptor_,
119 FileDescriptorSet::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000120 FileDescriptorSet_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000121 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800122 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000123 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800124 sizeof(FileDescriptorSet),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800125 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _internal_metadata_),
126 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000127 FileDescriptorProto_descriptor_ = file->message_type(1);
Feng Xiao6ef984a2014-11-10 17:34:54 -0800128 static const int FileDescriptorProto_offsets_[12] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000129 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_),
130 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_),
131 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000132 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, public_dependency_),
133 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, weak_dependency_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000134 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_),
135 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_),
136 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_),
137 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_),
138 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000139 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, source_code_info_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800140 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, syntax_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000141 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000142 FileDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800143 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000144 FileDescriptorProto_descriptor_,
145 FileDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000146 FileDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000147 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800148 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000149 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800150 sizeof(FileDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800151 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _internal_metadata_),
152 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000153 DescriptorProto_descriptor_ = file->message_type(2);
Bo Yang5db21732015-05-21 14:28:59 -0700154 static const int DescriptorProto_offsets_[10] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000155 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_),
156 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_),
157 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_),
158 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_),
159 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_),
160 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000161 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, oneof_decl_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000162 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_),
Bo Yang5db21732015-05-21 14:28:59 -0700163 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, reserved_range_),
164 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, reserved_name_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000165 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000166 DescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800167 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000168 DescriptorProto_descriptor_,
169 DescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000170 DescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000171 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800172 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000173 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800174 sizeof(DescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800175 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _internal_metadata_),
176 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000177 DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000178 static const int DescriptorProto_ExtensionRange_offsets_[2] = {
179 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_),
180 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_),
181 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000182 DescriptorProto_ExtensionRange_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800183 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000184 DescriptorProto_ExtensionRange_descriptor_,
185 DescriptorProto_ExtensionRange::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000186 DescriptorProto_ExtensionRange_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000187 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800188 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000189 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800190 sizeof(DescriptorProto_ExtensionRange),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800191 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _internal_metadata_),
192 -1);
Bo Yang5db21732015-05-21 14:28:59 -0700193 DescriptorProto_ReservedRange_descriptor_ = DescriptorProto_descriptor_->nested_type(1);
194 static const int DescriptorProto_ReservedRange_offsets_[2] = {
195 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, start_),
196 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, end_),
197 };
198 DescriptorProto_ReservedRange_reflection_ =
199 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
200 DescriptorProto_ReservedRange_descriptor_,
201 DescriptorProto_ReservedRange::default_instance_,
202 DescriptorProto_ReservedRange_offsets_,
203 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, _has_bits_[0]),
204 -1,
205 -1,
206 sizeof(DescriptorProto_ReservedRange),
207 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, _internal_metadata_),
208 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000209 FieldDescriptorProto_descriptor_ = file->message_type(3);
Jisi Liu46e8ff62015-10-05 11:59:43 -0700210 static const int FieldDescriptorProto_offsets_[10] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000211 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_),
212 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_),
213 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_),
214 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_),
215 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_),
216 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_),
217 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000218 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, oneof_index_),
Jisi Liu46e8ff62015-10-05 11:59:43 -0700219 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, json_name_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000220 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_),
221 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000222 FieldDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800223 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000224 FieldDescriptorProto_descriptor_,
225 FieldDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000226 FieldDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000227 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800228 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000229 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800230 sizeof(FieldDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800231 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _internal_metadata_),
232 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000233 FieldDescriptorProto_Type_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(0);
234 FieldDescriptorProto_Label_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000235 OneofDescriptorProto_descriptor_ = file->message_type(4);
236 static const int OneofDescriptorProto_offsets_[1] = {
237 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, name_),
238 };
239 OneofDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800240 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
jieluo@google.com4de8f552014-07-18 00:47:59 +0000241 OneofDescriptorProto_descriptor_,
242 OneofDescriptorProto::default_instance_,
243 OneofDescriptorProto_offsets_,
244 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800245 -1,
jieluo@google.com4de8f552014-07-18 00:47:59 +0000246 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800247 sizeof(OneofDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800248 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, _internal_metadata_),
249 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000250 EnumDescriptorProto_descriptor_ = file->message_type(5);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000251 static const int EnumDescriptorProto_offsets_[3] = {
252 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_),
253 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_),
254 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_),
255 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000256 EnumDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800257 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000258 EnumDescriptorProto_descriptor_,
259 EnumDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000260 EnumDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000261 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800262 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000263 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800264 sizeof(EnumDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800265 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _internal_metadata_),
266 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000267 EnumValueDescriptorProto_descriptor_ = file->message_type(6);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000268 static const int EnumValueDescriptorProto_offsets_[3] = {
269 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_),
270 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_),
271 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_),
272 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000273 EnumValueDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800274 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000275 EnumValueDescriptorProto_descriptor_,
276 EnumValueDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000277 EnumValueDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000278 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800279 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000280 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800281 sizeof(EnumValueDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800282 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _internal_metadata_),
283 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000284 ServiceDescriptorProto_descriptor_ = file->message_type(7);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000285 static const int ServiceDescriptorProto_offsets_[3] = {
286 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_),
287 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_),
288 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_),
289 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000290 ServiceDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800291 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000292 ServiceDescriptorProto_descriptor_,
293 ServiceDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000294 ServiceDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000295 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800296 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000297 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800298 sizeof(ServiceDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800299 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _internal_metadata_),
300 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000301 MethodDescriptorProto_descriptor_ = file->message_type(8);
Feng Xiao99aa0f92014-11-20 16:18:53 -0800302 static const int MethodDescriptorProto_offsets_[6] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000303 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_),
304 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_),
305 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_),
306 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_),
Feng Xiao99aa0f92014-11-20 16:18:53 -0800307 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, client_streaming_),
308 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, server_streaming_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000309 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000310 MethodDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800311 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000312 MethodDescriptorProto_descriptor_,
313 MethodDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000314 MethodDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000315 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800316 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000317 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800318 sizeof(MethodDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800319 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _internal_metadata_),
320 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000321 FileOptions_descriptor_ = file->message_type(9);
Xiao Hang801e9202015-07-27 17:46:22 -0700322 static const int FileOptions_offsets_[16] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000323 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_),
324 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_),
325 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000326 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generate_equals_and_hash_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000327 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_string_check_utf8_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000328 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000329 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, go_package_),
kenton@google.comfccb1462009-12-18 02:11:36 +0000330 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_generic_services_),
331 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generic_services_),
332 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, py_generic_services_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000333 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, deprecated_),
Feng Xiaof157a562014-11-14 11:50:31 -0800334 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_enable_arenas_),
Jisi Liu885b6122015-02-28 14:51:22 -0800335 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, objc_class_prefix_),
Jan Tattermusch685ae362015-03-16 19:07:16 -0700336 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, csharp_namespace_),
Xiao Hang801e9202015-07-27 17:46:22 -0700337 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, javanano_use_deprecated_package_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000338 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_),
339 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000340 FileOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800341 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000342 FileOptions_descriptor_,
343 FileOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000344 FileOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000345 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800346 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000347 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800348 sizeof(FileOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800349 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _internal_metadata_),
350 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000351 FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000352 MessageOptions_descriptor_ = file->message_type(10);
Feng Xiao6ef984a2014-11-10 17:34:54 -0800353 static const int MessageOptions_offsets_[5] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000354 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_),
kenton@google.com80b1d622009-07-29 01:13:20 +0000355 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, no_standard_descriptor_accessor_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000356 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, deprecated_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800357 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, map_entry_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000358 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_),
359 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000360 MessageOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800361 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000362 MessageOptions_descriptor_,
363 MessageOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000364 MessageOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000365 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800366 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000367 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800368 sizeof(MessageOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800369 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _internal_metadata_),
370 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000371 FieldOptions_descriptor_ = file->message_type(11);
Bo Yang5db21732015-05-21 14:28:59 -0700372 static const int FieldOptions_offsets_[7] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000373 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_),
kenton@google.com2d6daa72009-01-22 01:27:00 +0000374 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_),
Bo Yang5db21732015-05-21 14:28:59 -0700375 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, jstype_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000376 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, lazy_),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000377 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, deprecated_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000378 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, weak_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000379 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_),
380 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000381 FieldOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800382 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000383 FieldOptions_descriptor_,
384 FieldOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000385 FieldOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000386 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800387 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000388 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800389 sizeof(FieldOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800390 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _internal_metadata_),
391 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000392 FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0);
Bo Yang5db21732015-05-21 14:28:59 -0700393 FieldOptions_JSType_descriptor_ = FieldOptions_descriptor_->enum_type(1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000394 EnumOptions_descriptor_ = file->message_type(12);
395 static const int EnumOptions_offsets_[3] = {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000396 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, allow_alias_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000397 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000398 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_),
399 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000400 EnumOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800401 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000402 EnumOptions_descriptor_,
403 EnumOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000404 EnumOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000405 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800406 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000407 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800408 sizeof(EnumOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800409 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _internal_metadata_),
410 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000411 EnumValueOptions_descriptor_ = file->message_type(13);
412 static const int EnumValueOptions_offsets_[2] = {
413 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000414 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_),
415 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000416 EnumValueOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800417 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000418 EnumValueOptions_descriptor_,
419 EnumValueOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000420 EnumValueOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000421 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800422 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000423 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800424 sizeof(EnumValueOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800425 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _internal_metadata_),
426 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000427 ServiceOptions_descriptor_ = file->message_type(14);
428 static const int ServiceOptions_offsets_[2] = {
429 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000430 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_),
431 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000432 ServiceOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800433 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000434 ServiceOptions_descriptor_,
435 ServiceOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000436 ServiceOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000437 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800438 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000439 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800440 sizeof(ServiceOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800441 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _internal_metadata_),
442 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000443 MethodOptions_descriptor_ = file->message_type(15);
444 static const int MethodOptions_offsets_[2] = {
445 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000446 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_),
447 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000448 MethodOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800449 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000450 MethodOptions_descriptor_,
451 MethodOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000452 MethodOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000453 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800454 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000455 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800456 sizeof(MethodOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800457 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _internal_metadata_),
458 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000459 UninterpretedOption_descriptor_ = file->message_type(16);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000460 static const int UninterpretedOption_offsets_[7] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000461 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_),
462 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_),
463 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_),
464 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_),
465 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_),
466 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000467 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, aggregate_value_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000468 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000469 UninterpretedOption_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800470 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000471 UninterpretedOption_descriptor_,
472 UninterpretedOption::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000473 UninterpretedOption_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000474 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800475 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000476 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800477 sizeof(UninterpretedOption),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800478 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _internal_metadata_),
479 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000480 UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000481 static const int UninterpretedOption_NamePart_offsets_[2] = {
482 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_),
483 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_),
484 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000485 UninterpretedOption_NamePart_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800486 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000487 UninterpretedOption_NamePart_descriptor_,
488 UninterpretedOption_NamePart::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000489 UninterpretedOption_NamePart_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000490 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800491 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000492 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800493 sizeof(UninterpretedOption_NamePart),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800494 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _internal_metadata_),
495 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000496 SourceCodeInfo_descriptor_ = file->message_type(17);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000497 static const int SourceCodeInfo_offsets_[1] = {
498 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, location_),
499 };
500 SourceCodeInfo_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800501 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
liujisi@google.com33165fe2010-11-02 13:14:58 +0000502 SourceCodeInfo_descriptor_,
503 SourceCodeInfo::default_instance_,
504 SourceCodeInfo_offsets_,
505 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800506 -1,
liujisi@google.com33165fe2010-11-02 13:14:58 +0000507 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800508 sizeof(SourceCodeInfo),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800509 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _internal_metadata_),
510 -1);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000511 SourceCodeInfo_Location_descriptor_ = SourceCodeInfo_descriptor_->nested_type(0);
Jisi Liu885b6122015-02-28 14:51:22 -0800512 static const int SourceCodeInfo_Location_offsets_[5] = {
liujisi@google.com33165fe2010-11-02 13:14:58 +0000513 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, path_),
514 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, span_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000515 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_comments_),
516 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, trailing_comments_),
Jisi Liu885b6122015-02-28 14:51:22 -0800517 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_detached_comments_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000518 };
519 SourceCodeInfo_Location_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800520 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
liujisi@google.com33165fe2010-11-02 13:14:58 +0000521 SourceCodeInfo_Location_descriptor_,
522 SourceCodeInfo_Location::default_instance_,
523 SourceCodeInfo_Location_offsets_,
524 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800525 -1,
liujisi@google.com33165fe2010-11-02 13:14:58 +0000526 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800527 sizeof(SourceCodeInfo_Location),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800528 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _internal_metadata_),
529 -1);
Jisi Liu5221dcb2016-01-29 13:51:05 -0800530 GeneratedCodeInfo_descriptor_ = file->message_type(18);
531 static const int GeneratedCodeInfo_offsets_[1] = {
532 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, annotation_),
533 };
534 GeneratedCodeInfo_reflection_ =
535 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
536 GeneratedCodeInfo_descriptor_,
537 GeneratedCodeInfo::default_instance_,
538 GeneratedCodeInfo_offsets_,
539 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, _has_bits_[0]),
540 -1,
541 -1,
542 sizeof(GeneratedCodeInfo),
543 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, _internal_metadata_),
544 -1);
545 GeneratedCodeInfo_Annotation_descriptor_ = GeneratedCodeInfo_descriptor_->nested_type(0);
546 static const int GeneratedCodeInfo_Annotation_offsets_[4] = {
547 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, path_),
548 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, source_file_),
549 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, begin_),
550 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, end_),
551 };
552 GeneratedCodeInfo_Annotation_reflection_ =
553 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
554 GeneratedCodeInfo_Annotation_descriptor_,
555 GeneratedCodeInfo_Annotation::default_instance_,
556 GeneratedCodeInfo_Annotation_offsets_,
557 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _has_bits_[0]),
558 -1,
559 -1,
560 sizeof(GeneratedCodeInfo_Annotation),
561 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _internal_metadata_),
562 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000563}
564
kenton@google.comd37d46d2009-04-25 02:53:47 +0000565namespace {
566
567GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
568inline void protobuf_AssignDescriptorsOnce() {
569 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
570 &protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto);
571}
572
kenton@google.com80b1d622009-07-29 01:13:20 +0000573void protobuf_RegisterTypes(const ::std::string&) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000574 protobuf_AssignDescriptorsOnce();
575 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800576 FileDescriptorSet_descriptor_, &FileDescriptorSet::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000577 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800578 FileDescriptorProto_descriptor_, &FileDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000579 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800580 DescriptorProto_descriptor_, &DescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000581 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800582 DescriptorProto_ExtensionRange_descriptor_, &DescriptorProto_ExtensionRange::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000583 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Bo Yang5db21732015-05-21 14:28:59 -0700584 DescriptorProto_ReservedRange_descriptor_, &DescriptorProto_ReservedRange::default_instance());
585 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800586 FieldDescriptorProto_descriptor_, &FieldDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000587 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800588 OneofDescriptorProto_descriptor_, &OneofDescriptorProto::default_instance());
jieluo@google.com4de8f552014-07-18 00:47:59 +0000589 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800590 EnumDescriptorProto_descriptor_, &EnumDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000591 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800592 EnumValueDescriptorProto_descriptor_, &EnumValueDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000593 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800594 ServiceDescriptorProto_descriptor_, &ServiceDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000595 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800596 MethodDescriptorProto_descriptor_, &MethodDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000597 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800598 FileOptions_descriptor_, &FileOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000599 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800600 MessageOptions_descriptor_, &MessageOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000601 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800602 FieldOptions_descriptor_, &FieldOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000603 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800604 EnumOptions_descriptor_, &EnumOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000605 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800606 EnumValueOptions_descriptor_, &EnumValueOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000607 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800608 ServiceOptions_descriptor_, &ServiceOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000609 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800610 MethodOptions_descriptor_, &MethodOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000611 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800612 UninterpretedOption_descriptor_, &UninterpretedOption::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000613 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800614 UninterpretedOption_NamePart_descriptor_, &UninterpretedOption_NamePart::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +0000615 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800616 SourceCodeInfo_descriptor_, &SourceCodeInfo::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +0000617 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800618 SourceCodeInfo_Location_descriptor_, &SourceCodeInfo_Location::default_instance());
Jisi Liu5221dcb2016-01-29 13:51:05 -0800619 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
620 GeneratedCodeInfo_descriptor_, &GeneratedCodeInfo::default_instance());
621 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
622 GeneratedCodeInfo_Annotation_descriptor_, &GeneratedCodeInfo_Annotation::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000623}
624
625} // namespace
626
kenton@google.com63e646b2009-05-06 19:27:03 +0000627void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto() {
628 delete FileDescriptorSet::default_instance_;
629 delete FileDescriptorSet_reflection_;
630 delete FileDescriptorProto::default_instance_;
631 delete FileDescriptorProto_reflection_;
632 delete DescriptorProto::default_instance_;
633 delete DescriptorProto_reflection_;
634 delete DescriptorProto_ExtensionRange::default_instance_;
635 delete DescriptorProto_ExtensionRange_reflection_;
Bo Yang5db21732015-05-21 14:28:59 -0700636 delete DescriptorProto_ReservedRange::default_instance_;
637 delete DescriptorProto_ReservedRange_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000638 delete FieldDescriptorProto::default_instance_;
639 delete FieldDescriptorProto_reflection_;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000640 delete OneofDescriptorProto::default_instance_;
641 delete OneofDescriptorProto_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000642 delete EnumDescriptorProto::default_instance_;
643 delete EnumDescriptorProto_reflection_;
644 delete EnumValueDescriptorProto::default_instance_;
645 delete EnumValueDescriptorProto_reflection_;
646 delete ServiceDescriptorProto::default_instance_;
647 delete ServiceDescriptorProto_reflection_;
648 delete MethodDescriptorProto::default_instance_;
649 delete MethodDescriptorProto_reflection_;
650 delete FileOptions::default_instance_;
651 delete FileOptions_reflection_;
652 delete MessageOptions::default_instance_;
653 delete MessageOptions_reflection_;
654 delete FieldOptions::default_instance_;
655 delete FieldOptions_reflection_;
656 delete EnumOptions::default_instance_;
657 delete EnumOptions_reflection_;
658 delete EnumValueOptions::default_instance_;
659 delete EnumValueOptions_reflection_;
660 delete ServiceOptions::default_instance_;
661 delete ServiceOptions_reflection_;
662 delete MethodOptions::default_instance_;
663 delete MethodOptions_reflection_;
664 delete UninterpretedOption::default_instance_;
665 delete UninterpretedOption_reflection_;
666 delete UninterpretedOption_NamePart::default_instance_;
667 delete UninterpretedOption_NamePart_reflection_;
liujisi@google.com33165fe2010-11-02 13:14:58 +0000668 delete SourceCodeInfo::default_instance_;
669 delete SourceCodeInfo_reflection_;
670 delete SourceCodeInfo_Location::default_instance_;
671 delete SourceCodeInfo_Location_reflection_;
Jisi Liu5221dcb2016-01-29 13:51:05 -0800672 delete GeneratedCodeInfo::default_instance_;
673 delete GeneratedCodeInfo_reflection_;
674 delete GeneratedCodeInfo_Annotation::default_instance_;
675 delete GeneratedCodeInfo_Annotation_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000676}
677
kenton@google.comd37d46d2009-04-25 02:53:47 +0000678void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
temporal40ee5512008-07-10 02:12:20 +0000679 static bool already_here = false;
680 if (already_here) return;
681 already_here = true;
682 GOOGLE_PROTOBUF_VERIFY_VERSION;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000683
kenton@google.comd37d46d2009-04-25 02:53:47 +0000684 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
temporal40ee5512008-07-10 02:12:20 +0000685 "\n google/protobuf/descriptor.proto\022\017goog"
temporal779f61c2008-08-13 03:15:00 +0000686 "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file"
687 "\030\001 \003(\0132$.google.protobuf.FileDescriptorP"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800688 "roto\"\333\003\n\023FileDescriptorProto\022\014\n\004name\030\001 \001"
temporal779f61c2008-08-13 03:15:00 +0000689 "(\t\022\017\n\007package\030\002 \001(\t\022\022\n\ndependency\030\003 \003(\t\022"
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000690 "\031\n\021public_dependency\030\n \003(\005\022\027\n\017weak_depen"
691 "dency\030\013 \003(\005\0226\n\014message_type\030\004 \003(\0132 .goog"
692 "le.protobuf.DescriptorProto\0227\n\tenum_type"
693 "\030\005 \003(\0132$.google.protobuf.EnumDescriptorP"
694 "roto\0228\n\007service\030\006 \003(\0132\'.google.protobuf."
695 "ServiceDescriptorProto\0228\n\textension\030\007 \003("
liujisi@google.com33165fe2010-11-02 13:14:58 +0000696 "\0132%.google.protobuf.FieldDescriptorProto"
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000697 "\022-\n\007options\030\010 \001(\0132\034.google.protobuf.File"
698 "Options\0229\n\020source_code_info\030\t \001(\0132\037.goog"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800699 "le.protobuf.SourceCodeInfo\022\016\n\006syntax\030\014 \001"
Bo Yang5db21732015-05-21 14:28:59 -0700700 "(\t\"\360\004\n\017DescriptorProto\022\014\n\004name\030\001 \001(\t\0224\n\005"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800701 "field\030\002 \003(\0132%.google.protobuf.FieldDescr"
702 "iptorProto\0228\n\textension\030\006 \003(\0132%.google.p"
703 "rotobuf.FieldDescriptorProto\0225\n\013nested_t"
704 "ype\030\003 \003(\0132 .google.protobuf.DescriptorPr"
705 "oto\0227\n\tenum_type\030\004 \003(\0132$.google.protobuf"
706 ".EnumDescriptorProto\022H\n\017extension_range\030"
707 "\005 \003(\0132/.google.protobuf.DescriptorProto."
708 "ExtensionRange\0229\n\noneof_decl\030\010 \003(\0132%.goo"
709 "gle.protobuf.OneofDescriptorProto\0220\n\007opt"
710 "ions\030\007 \001(\0132\037.google.protobuf.MessageOpti"
Bo Yang5db21732015-05-21 14:28:59 -0700711 "ons\022F\n\016reserved_range\030\t \003(\0132..google.pro"
712 "tobuf.DescriptorProto.ReservedRange\022\025\n\rr"
713 "eserved_name\030\n \003(\t\032,\n\016ExtensionRange\022\r\n\005"
714 "start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\032+\n\rReservedRang"
Jisi Liu46e8ff62015-10-05 11:59:43 -0700715 "e\022\r\n\005start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\"\274\005\n\024FieldD"
Bo Yang5db21732015-05-21 14:28:59 -0700716 "escriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\003"
717 " \001(\005\022:\n\005label\030\004 \001(\0162+.google.protobuf.Fi"
718 "eldDescriptorProto.Label\0228\n\004type\030\005 \001(\0162*"
719 ".google.protobuf.FieldDescriptorProto.Ty"
720 "pe\022\021\n\ttype_name\030\006 \001(\t\022\020\n\010extendee\030\002 \001(\t\022"
721 "\025\n\rdefault_value\030\007 \001(\t\022\023\n\013oneof_index\030\t "
Jisi Liu46e8ff62015-10-05 11:59:43 -0700722 "\001(\005\022\021\n\tjson_name\030\n \001(\t\022.\n\007options\030\010 \001(\0132"
723 "\035.google.protobuf.FieldOptions\"\266\002\n\004Type\022"
724 "\017\n\013TYPE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE"
725 "_INT64\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020"
726 "\005\022\020\n\014TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n"
727 "\tTYPE_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GR"
728 "OUP\020\n\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022"
729 "\017\n\013TYPE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_"
730 "SFIXED32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SI"
731 "NT32\020\021\022\017\n\013TYPE_SINT64\020\022\"C\n\005Label\022\022\n\016LABE"
732 "L_OPTIONAL\020\001\022\022\n\016LABEL_REQUIRED\020\002\022\022\n\016LABE"
733 "L_REPEATED\020\003\"$\n\024OneofDescriptorProto\022\014\n\004"
734 "name\030\001 \001(\t\"\214\001\n\023EnumDescriptorProto\022\014\n\004na"
735 "me\030\001 \001(\t\0228\n\005value\030\002 \003(\0132).google.protobu"
736 "f.EnumValueDescriptorProto\022-\n\007options\030\003 "
737 "\001(\0132\034.google.protobuf.EnumOptions\"l\n\030Enu"
738 "mValueDescriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006n"
739 "umber\030\002 \001(\005\0222\n\007options\030\003 \001(\0132!.google.pr"
740 "otobuf.EnumValueOptions\"\220\001\n\026ServiceDescr"
741 "iptorProto\022\014\n\004name\030\001 \001(\t\0226\n\006method\030\002 \003(\013"
742 "2&.google.protobuf.MethodDescriptorProto"
743 "\0220\n\007options\030\003 \001(\0132\037.google.protobuf.Serv"
744 "iceOptions\"\301\001\n\025MethodDescriptorProto\022\014\n\004"
745 "name\030\001 \001(\t\022\022\n\ninput_type\030\002 \001(\t\022\023\n\013output"
746 "_type\030\003 \001(\t\022/\n\007options\030\004 \001(\0132\036.google.pr"
747 "otobuf.MethodOptions\022\037\n\020client_streaming"
748 "\030\005 \001(\010:\005false\022\037\n\020server_streaming\030\006 \001(\010:"
Jisi Liu5221dcb2016-01-29 13:51:05 -0800749 "\005false\"\256\005\n\013FileOptions\022\024\n\014java_package\030\001"
Jisi Liu46e8ff62015-10-05 11:59:43 -0700750 " \001(\t\022\034\n\024java_outer_classname\030\010 \001(\t\022\"\n\023ja"
751 "va_multiple_files\030\n \001(\010:\005false\022,\n\035java_g"
752 "enerate_equals_and_hash\030\024 \001(\010:\005false\022%\n\026"
753 "java_string_check_utf8\030\033 \001(\010:\005false\022F\n\014o"
754 "ptimize_for\030\t \001(\0162).google.protobuf.File"
755 "Options.OptimizeMode:\005SPEED\022\022\n\ngo_packag"
756 "e\030\013 \001(\t\022\"\n\023cc_generic_services\030\020 \001(\010:\005fa"
757 "lse\022$\n\025java_generic_services\030\021 \001(\010:\005fals"
758 "e\022\"\n\023py_generic_services\030\022 \001(\010:\005false\022\031\n"
759 "\ndeprecated\030\027 \001(\010:\005false\022\037\n\020cc_enable_ar"
760 "enas\030\037 \001(\010:\005false\022\031\n\021objc_class_prefix\030$"
Jisi Liu5221dcb2016-01-29 13:51:05 -0800761 " \001(\t\022\030\n\020csharp_namespace\030% \001(\t\022+\n\037javana"
762 "no_use_deprecated_package\030& \001(\010B\002\030\001\022C\n\024u"
763 "ninterpreted_option\030\347\007 \003(\0132$.google.prot"
764 "obuf.UninterpretedOption\":\n\014OptimizeMode"
765 "\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE\020\002\022\020\n\014LITE_RUNTI"
766 "ME\020\003*\t\010\350\007\020\200\200\200\200\002\"\346\001\n\016MessageOptions\022&\n\027me"
767 "ssage_set_wire_format\030\001 \001(\010:\005false\022.\n\037no"
768 "_standard_descriptor_accessor\030\002 \001(\010:\005fal"
769 "se\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\021\n\tmap_ent"
770 "ry\030\007 \001(\010\022C\n\024uninterpreted_option\030\347\007 \003(\0132"
771 "$.google.protobuf.UninterpretedOption*\t\010"
772 "\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOptions\022:\n\005ctype\030\001 \001(\016"
773 "2#.google.protobuf.FieldOptions.CType:\006S"
774 "TRING\022\016\n\006packed\030\002 \001(\010\022\?\n\006jstype\030\006 \001(\0162$."
775 "google.protobuf.FieldOptions.JSType:\tJS_"
776 "NORMAL\022\023\n\004lazy\030\005 \001(\010:\005false\022\031\n\ndeprecate"
777 "d\030\003 \001(\010:\005false\022\023\n\004weak\030\n \001(\010:\005false\022C\n\024u"
778 "ninterpreted_option\030\347\007 \003(\0132$.google.prot"
779 "obuf.UninterpretedOption\"/\n\005CType\022\n\n\006STR"
780 "ING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020\002\"5\n\006JST"
781 "ype\022\r\n\tJS_NORMAL\020\000\022\r\n\tJS_STRING\020\001\022\r\n\tJS_"
782 "NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n\013EnumOptions\022\023\n\013a"
783 "llow_alias\030\002 \001(\010\022\031\n\ndeprecated\030\003 \001(\010:\005fa"
784 "lse\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goo"
785 "gle.protobuf.UninterpretedOption*\t\010\350\007\020\200\200"
786 "\200\200\002\"}\n\020EnumValueOptions\022\031\n\ndeprecated\030\001 "
787 "\001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003("
788 "\0132$.google.protobuf.UninterpretedOption*"
789 "\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOptions\022\031\n\ndeprecat"
Jisi Liu46e8ff62015-10-05 11:59:43 -0700790 "ed\030! \001(\010:\005false\022C\n\024uninterpreted_option\030"
791 "\347\007 \003(\0132$.google.protobuf.UninterpretedOp"
Jisi Liu5221dcb2016-01-29 13:51:05 -0800792 "tion*\t\010\350\007\020\200\200\200\200\002\"z\n\rMethodOptions\022\031\n\ndepr"
793 "ecated\030! \001(\010:\005false\022C\n\024uninterpreted_opt"
794 "ion\030\347\007 \003(\0132$.google.protobuf.Uninterpret"
795 "edOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023UninterpretedOpt"
796 "ion\022;\n\004name\030\002 \003(\0132-.google.protobuf.Unin"
797 "terpretedOption.NamePart\022\030\n\020identifier_v"
798 "alue\030\003 \001(\t\022\032\n\022positive_int_value\030\004 \001(\004\022\032"
799 "\n\022negative_int_value\030\005 \001(\003\022\024\n\014double_val"
800 "ue\030\006 \001(\001\022\024\n\014string_value\030\007 \001(\014\022\027\n\017aggreg"
801 "ate_value\030\010 \001(\t\0323\n\010NamePart\022\021\n\tname_part"
802 "\030\001 \002(\t\022\024\n\014is_extension\030\002 \002(\010\"\325\001\n\016SourceC"
803 "odeInfo\022:\n\010location\030\001 \003(\0132(.google.proto"
804 "buf.SourceCodeInfo.Location\032\206\001\n\010Location"
805 "\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004span\030\002 \003(\005B\002\020\001\022\030\n\020"
806 "leading_comments\030\003 \001(\t\022\031\n\021trailing_comme"
807 "nts\030\004 \001(\t\022!\n\031leading_detached_comments\030\006"
808 " \003(\t\"\247\001\n\021GeneratedCodeInfo\022A\n\nannotation"
809 "\030\001 \003(\0132-.google.protobuf.GeneratedCodeIn"
810 "fo.Annotation\032O\n\nAnnotation\022\020\n\004path\030\001 \003("
811 "\005B\002\020\001\022\023\n\013source_file\030\002 \001(\t\022\r\n\005begin\030\003 \001("
812 "\005\022\013\n\003end\030\004 \001(\005BX\n\023com.google.protobufB\020D"
813 "escriptorProtosH\001Z\ndescriptor\242\002\003GPB\252\002\032Go"
814 "ogle.Protobuf.Reflection", 5184);
kenton@google.comd37d46d2009-04-25 02:53:47 +0000815 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
816 "google/protobuf/descriptor.proto", &protobuf_RegisterTypes);
817 FileDescriptorSet::default_instance_ = new FileDescriptorSet();
818 FileDescriptorProto::default_instance_ = new FileDescriptorProto();
819 DescriptorProto::default_instance_ = new DescriptorProto();
820 DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange();
Bo Yang5db21732015-05-21 14:28:59 -0700821 DescriptorProto_ReservedRange::default_instance_ = new DescriptorProto_ReservedRange();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000822 FieldDescriptorProto::default_instance_ = new FieldDescriptorProto();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000823 OneofDescriptorProto::default_instance_ = new OneofDescriptorProto();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000824 EnumDescriptorProto::default_instance_ = new EnumDescriptorProto();
825 EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto();
826 ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto();
827 MethodDescriptorProto::default_instance_ = new MethodDescriptorProto();
828 FileOptions::default_instance_ = new FileOptions();
829 MessageOptions::default_instance_ = new MessageOptions();
830 FieldOptions::default_instance_ = new FieldOptions();
831 EnumOptions::default_instance_ = new EnumOptions();
832 EnumValueOptions::default_instance_ = new EnumValueOptions();
833 ServiceOptions::default_instance_ = new ServiceOptions();
834 MethodOptions::default_instance_ = new MethodOptions();
835 UninterpretedOption::default_instance_ = new UninterpretedOption();
836 UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart();
liujisi@google.com33165fe2010-11-02 13:14:58 +0000837 SourceCodeInfo::default_instance_ = new SourceCodeInfo();
838 SourceCodeInfo_Location::default_instance_ = new SourceCodeInfo_Location();
Jisi Liu5221dcb2016-01-29 13:51:05 -0800839 GeneratedCodeInfo::default_instance_ = new GeneratedCodeInfo();
840 GeneratedCodeInfo_Annotation::default_instance_ = new GeneratedCodeInfo_Annotation();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000841 FileDescriptorSet::default_instance_->InitAsDefaultInstance();
842 FileDescriptorProto::default_instance_->InitAsDefaultInstance();
843 DescriptorProto::default_instance_->InitAsDefaultInstance();
844 DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance();
Bo Yang5db21732015-05-21 14:28:59 -0700845 DescriptorProto_ReservedRange::default_instance_->InitAsDefaultInstance();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000846 FieldDescriptorProto::default_instance_->InitAsDefaultInstance();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000847 OneofDescriptorProto::default_instance_->InitAsDefaultInstance();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000848 EnumDescriptorProto::default_instance_->InitAsDefaultInstance();
849 EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance();
850 ServiceDescriptorProto::default_instance_->InitAsDefaultInstance();
851 MethodDescriptorProto::default_instance_->InitAsDefaultInstance();
852 FileOptions::default_instance_->InitAsDefaultInstance();
853 MessageOptions::default_instance_->InitAsDefaultInstance();
854 FieldOptions::default_instance_->InitAsDefaultInstance();
855 EnumOptions::default_instance_->InitAsDefaultInstance();
856 EnumValueOptions::default_instance_->InitAsDefaultInstance();
857 ServiceOptions::default_instance_->InitAsDefaultInstance();
858 MethodOptions::default_instance_->InitAsDefaultInstance();
859 UninterpretedOption::default_instance_->InitAsDefaultInstance();
860 UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance();
liujisi@google.com33165fe2010-11-02 13:14:58 +0000861 SourceCodeInfo::default_instance_->InitAsDefaultInstance();
862 SourceCodeInfo_Location::default_instance_->InitAsDefaultInstance();
Jisi Liu5221dcb2016-01-29 13:51:05 -0800863 GeneratedCodeInfo::default_instance_->InitAsDefaultInstance();
864 GeneratedCodeInfo_Annotation::default_instance_->InitAsDefaultInstance();
kenton@google.com63e646b2009-05-06 19:27:03 +0000865 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto);
temporal40ee5512008-07-10 02:12:20 +0000866}
867
kenton@google.comd37d46d2009-04-25 02:53:47 +0000868// Force AddDescriptors() to be called at static initialization time.
temporal40ee5512008-07-10 02:12:20 +0000869struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto {
870 StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000871 protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +0000872 }
873} static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_;
874
Feng Xiaof157a562014-11-14 11:50:31 -0800875namespace {
876
877static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;
878static void MergeFromFail(int line) {
879 GOOGLE_CHECK(false) << __FILE__ << ":" << line;
880}
881
882} // namespace
883
884
temporal40ee5512008-07-10 02:12:20 +0000885// ===================================================================
886
Bruce Dawson86ba70e2015-10-29 12:41:29 -0700887#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +0000888const int FileDescriptorSet::kFileFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -0700889#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal779f61c2008-08-13 03:15:00 +0000890
kenton@google.com573989f2009-10-30 22:02:17 +0000891FileDescriptorSet::FileDescriptorSet()
Bo Yang5db21732015-05-21 14:28:59 -0700892 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000893 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000894 // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000895}
896
kenton@google.com80b1d622009-07-29 01:13:20 +0000897void FileDescriptorSet::InitAsDefaultInstance() {
898}
kenton@google.com24bf56f2008-09-24 20:31:01 +0000899
kenton@google.com573989f2009-10-30 22:02:17 +0000900FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -0800901 : ::google::protobuf::Message(),
902 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000903 SharedCtor();
temporal779f61c2008-08-13 03:15:00 +0000904 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000905 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000906}
907
kenton@google.comd37d46d2009-04-25 02:53:47 +0000908void FileDescriptorSet::SharedCtor() {
909 _cached_size_ = 0;
910 ::memset(_has_bits_, 0, sizeof(_has_bits_));
911}
912
temporal779f61c2008-08-13 03:15:00 +0000913FileDescriptorSet::~FileDescriptorSet() {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000914 // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +0000915 SharedDtor();
916}
917
918void FileDescriptorSet::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +0000919 if (this != default_instance_) {
temporal779f61c2008-08-13 03:15:00 +0000920 }
921}
922
kenton@google.comfccb1462009-12-18 02:11:36 +0000923void FileDescriptorSet::SetCachedSize(int size) const {
924 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
925 _cached_size_ = size;
926 GOOGLE_SAFE_CONCURRENT_WRITES_END();
927}
temporal779f61c2008-08-13 03:15:00 +0000928const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000929 protobuf_AssignDescriptorsOnce();
temporal779f61c2008-08-13 03:15:00 +0000930 return FileDescriptorSet_descriptor_;
931}
932
kenton@google.com24bf56f2008-09-24 20:31:01 +0000933const FileDescriptorSet& FileDescriptorSet::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +0000934 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
935 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +0000936}
937
938FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL;
939
Feng Xiao6ef984a2014-11-10 17:34:54 -0800940FileDescriptorSet* FileDescriptorSet::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -0800941 FileDescriptorSet* n = new FileDescriptorSet;
942 if (arena != NULL) {
943 arena->Own(n);
944 }
945 return n;
temporal779f61c2008-08-13 03:15:00 +0000946}
947
948void FileDescriptorSet::Clear() {
949 file_.Clear();
950 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -0800951 if (_internal_metadata_.have_unknown_fields()) {
952 mutable_unknown_fields()->Clear();
953 }
temporal779f61c2008-08-13 03:15:00 +0000954}
955
956bool FileDescriptorSet::MergePartialFromCodedStream(
957 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000958#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal779f61c2008-08-13 03:15:00 +0000959 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000960 // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorSet)
961 for (;;) {
962 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
963 tag = p.first;
964 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +0000965 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal779f61c2008-08-13 03:15:00 +0000966 // repeated .google.protobuf.FileDescriptorProto file = 1;
967 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000968 if (tag == 10) {
Bo Yang5db21732015-05-21 14:28:59 -0700969 DO_(input->IncrementRecursionDepth());
970 parse_loop_file:
971 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +0000972 input, add_file()));
973 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000974 goto handle_unusual;
temporal779f61c2008-08-13 03:15:00 +0000975 }
Bo Yang5db21732015-05-21 14:28:59 -0700976 if (input->ExpectTag(10)) goto parse_loop_file;
977 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000978 if (input->ExpectAtEnd()) goto success;
temporal779f61c2008-08-13 03:15:00 +0000979 break;
980 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000981
temporal779f61c2008-08-13 03:15:00 +0000982 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000983 handle_unusual:
984 if (tag == 0 ||
985 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +0000986 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000987 goto success;
temporal779f61c2008-08-13 03:15:00 +0000988 }
989 DO_(::google::protobuf::internal::WireFormat::SkipField(
990 input, tag, mutable_unknown_fields()));
991 break;
992 }
993 }
994 }
jieluo@google.com4de8f552014-07-18 00:47:59 +0000995success:
996 // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000997 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000998failure:
999 // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorSet)
1000 return false;
temporal779f61c2008-08-13 03:15:00 +00001001#undef DO_
1002}
1003
kenton@google.comd37d46d2009-04-25 02:53:47 +00001004void FileDescriptorSet::SerializeWithCachedSizes(
temporal779f61c2008-08-13 03:15:00 +00001005 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001006 // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +00001007 // repeated .google.protobuf.FileDescriptorProto file = 1;
Feng Xiaof157a562014-11-14 11:50:31 -08001008 for (unsigned int i = 0, n = this->file_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001009 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001010 1, this->file(i), output);
temporal779f61c2008-08-13 03:15:00 +00001011 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001012
Feng Xiao6ef984a2014-11-10 17:34:54 -08001013 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001014 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1015 unknown_fields(), output);
temporal779f61c2008-08-13 03:15:00 +00001016 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001017 // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001018}
1019
1020::google::protobuf::uint8* FileDescriptorSet::SerializeWithCachedSizesToArray(
1021 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001022 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001023 // repeated .google.protobuf.FileDescriptorProto file = 1;
Feng Xiaof157a562014-11-14 11:50:31 -08001024 for (unsigned int i = 0, n = this->file_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001025 target = ::google::protobuf::internal::WireFormatLite::
1026 WriteMessageNoVirtualToArray(
1027 1, this->file(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001028 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001029
Feng Xiao6ef984a2014-11-10 17:34:54 -08001030 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001031 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1032 unknown_fields(), target);
1033 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001034 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001035 return target;
temporal779f61c2008-08-13 03:15:00 +00001036}
1037
1038int FileDescriptorSet::ByteSize() const {
1039 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001040
temporal779f61c2008-08-13 03:15:00 +00001041 // repeated .google.protobuf.FileDescriptorProto file = 1;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001042 total_size += 1 * this->file_size();
1043 for (int i = 0; i < this->file_size(); i++) {
temporal779f61c2008-08-13 03:15:00 +00001044 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001045 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal779f61c2008-08-13 03:15:00 +00001046 this->file(i));
1047 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001048
Feng Xiao6ef984a2014-11-10 17:34:54 -08001049 if (_internal_metadata_.have_unknown_fields()) {
temporal779f61c2008-08-13 03:15:00 +00001050 total_size +=
1051 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1052 unknown_fields());
1053 }
kenton@google.comfccb1462009-12-18 02:11:36 +00001054 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal779f61c2008-08-13 03:15:00 +00001055 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00001056 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal779f61c2008-08-13 03:15:00 +00001057 return total_size;
1058}
1059
1060void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001061 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07001062 const FileDescriptorSet* source =
1063 ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorSet>(
1064 &from);
temporal779f61c2008-08-13 03:15:00 +00001065 if (source == NULL) {
1066 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1067 } else {
1068 MergeFrom(*source);
1069 }
1070}
1071
1072void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001073 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal779f61c2008-08-13 03:15:00 +00001074 file_.MergeFrom(from.file_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08001075 if (from._internal_metadata_.have_unknown_fields()) {
1076 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1077 }
temporal779f61c2008-08-13 03:15:00 +00001078}
1079
1080void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) {
1081 if (&from == this) return;
1082 Clear();
1083 MergeFrom(from);
1084}
1085
1086void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
1087 if (&from == this) return;
1088 Clear();
1089 MergeFrom(from);
1090}
1091
kenton@google.comceb561d2009-06-25 19:05:36 +00001092bool FileDescriptorSet::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001093
jieluo@google.com4de8f552014-07-18 00:47:59 +00001094 if (!::google::protobuf::internal::AllAreInitialized(this->file())) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00001095 return true;
1096}
1097
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001098void FileDescriptorSet::Swap(FileDescriptorSet* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08001099 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001100 InternalSwap(other);
1101}
1102void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) {
1103 file_.UnsafeArenaSwap(&other->file_);
1104 std::swap(_has_bits_[0], other->_has_bits_[0]);
1105 _internal_metadata_.Swap(&other->_internal_metadata_);
1106 std::swap(_cached_size_, other->_cached_size_);
1107}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001108
kenton@google.com80b1d622009-07-29 01:13:20 +00001109::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const {
1110 protobuf_AssignDescriptorsOnce();
1111 ::google::protobuf::Metadata metadata;
1112 metadata.descriptor = FileDescriptorSet_descriptor_;
1113 metadata.reflection = FileDescriptorSet_reflection_;
1114 return metadata;
temporal779f61c2008-08-13 03:15:00 +00001115}
1116
Jisi Liu885b6122015-02-28 14:51:22 -08001117#if PROTOBUF_INLINE_NOT_IN_HEADERS
1118// FileDescriptorSet
1119
1120// repeated .google.protobuf.FileDescriptorProto file = 1;
Bo Yang5db21732015-05-21 14:28:59 -07001121int FileDescriptorSet::file_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001122 return file_.size();
1123}
Bo Yang5db21732015-05-21 14:28:59 -07001124void FileDescriptorSet::clear_file() {
Jisi Liu885b6122015-02-28 14:51:22 -08001125 file_.Clear();
1126}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001127const ::google::protobuf::FileDescriptorProto& FileDescriptorSet::file(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08001128 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file)
1129 return file_.Get(index);
1130}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001131::google::protobuf::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08001132 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorSet.file)
1133 return file_.Mutable(index);
1134}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001135::google::protobuf::FileDescriptorProto* FileDescriptorSet::add_file() {
Jisi Liu885b6122015-02-28 14:51:22 -08001136 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file)
1137 return file_.Add();
1138}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001139::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08001140FileDescriptorSet::mutable_file() {
1141 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file)
1142 return &file_;
1143}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001144const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
1145FileDescriptorSet::file() const {
1146 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file)
1147 return file_;
1148}
Jisi Liu885b6122015-02-28 14:51:22 -08001149
1150#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal779f61c2008-08-13 03:15:00 +00001151
1152// ===================================================================
1153
Bruce Dawson86ba70e2015-10-29 12:41:29 -07001154#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001155const int FileDescriptorProto::kNameFieldNumber;
1156const int FileDescriptorProto::kPackageFieldNumber;
1157const int FileDescriptorProto::kDependencyFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001158const int FileDescriptorProto::kPublicDependencyFieldNumber;
1159const int FileDescriptorProto::kWeakDependencyFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001160const int FileDescriptorProto::kMessageTypeFieldNumber;
1161const int FileDescriptorProto::kEnumTypeFieldNumber;
1162const int FileDescriptorProto::kServiceFieldNumber;
1163const int FileDescriptorProto::kExtensionFieldNumber;
1164const int FileDescriptorProto::kOptionsFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001165const int FileDescriptorProto::kSourceCodeInfoFieldNumber;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001166const int FileDescriptorProto::kSyntaxFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07001167#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00001168
kenton@google.com573989f2009-10-30 22:02:17 +00001169FileDescriptorProto::FileDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07001170 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001171 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00001172 // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00001173}
1174
kenton@google.com80b1d622009-07-29 01:13:20 +00001175void FileDescriptorProto::InitAsDefaultInstance() {
1176 options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +00001177 source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(&::google::protobuf::SourceCodeInfo::default_instance());
temporal40ee5512008-07-10 02:12:20 +00001178}
1179
kenton@google.com573989f2009-10-30 22:02:17 +00001180FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08001181 : ::google::protobuf::Message(),
1182 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001183 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00001184 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00001185 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001186}
1187
kenton@google.comd37d46d2009-04-25 02:53:47 +00001188void FileDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001189 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00001190 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001191 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1192 package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00001193 options_ = NULL;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001194 source_code_info_ = NULL;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001195 syntax_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00001196 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1197}
1198
temporal40ee5512008-07-10 02:12:20 +00001199FileDescriptorProto::~FileDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001200 // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001201 SharedDtor();
1202}
1203
1204void FileDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08001205 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1206 package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1207 syntax_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00001208 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00001209 delete options_;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001210 delete source_code_info_;
temporal40ee5512008-07-10 02:12:20 +00001211 }
1212}
1213
kenton@google.comfccb1462009-12-18 02:11:36 +00001214void FileDescriptorProto::SetCachedSize(int size) const {
1215 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1216 _cached_size_ = size;
1217 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1218}
temporal40ee5512008-07-10 02:12:20 +00001219const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001220 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00001221 return FileDescriptorProto_descriptor_;
1222}
1223
kenton@google.com24bf56f2008-09-24 20:31:01 +00001224const FileDescriptorProto& FileDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00001225 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
1226 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001227}
1228
1229FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL;
1230
Feng Xiao6ef984a2014-11-10 17:34:54 -08001231FileDescriptorProto* FileDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08001232 FileDescriptorProto* n = new FileDescriptorProto;
1233 if (arena != NULL) {
1234 arena->Own(n);
1235 }
1236 return n;
temporal40ee5512008-07-10 02:12:20 +00001237}
1238
1239void FileDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07001240 if (_has_bits_[0 / 32] & 3u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001241 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001242 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00001243 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001244 if (has_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001245 package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00001246 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001247 }
Austin Schuhe8268372015-05-19 23:22:20 -07001248 if (_has_bits_[8 / 32] & 3584u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001249 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001250 if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear();
1251 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001252 if (has_source_code_info()) {
1253 if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear();
1254 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001255 if (has_syntax()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001256 syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Feng Xiao6ef984a2014-11-10 17:34:54 -08001257 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001258 }
temporal40ee5512008-07-10 02:12:20 +00001259 dependency_.Clear();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001260 public_dependency_.Clear();
1261 weak_dependency_.Clear();
temporal40ee5512008-07-10 02:12:20 +00001262 message_type_.Clear();
1263 enum_type_.Clear();
1264 service_.Clear();
1265 extension_.Clear();
1266 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08001267 if (_internal_metadata_.have_unknown_fields()) {
1268 mutable_unknown_fields()->Clear();
1269 }
temporal40ee5512008-07-10 02:12:20 +00001270}
1271
1272bool FileDescriptorProto::MergePartialFromCodedStream(
1273 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001274#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00001275 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00001276 // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorProto)
1277 for (;;) {
1278 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1279 tag = p.first;
1280 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00001281 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00001282 // optional string name = 1;
1283 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001284 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001285 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1286 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001287 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00001288 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001289 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001290 "google.protobuf.FileDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00001291 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001292 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001293 }
temporal40ee5512008-07-10 02:12:20 +00001294 if (input->ExpectTag(18)) goto parse_package;
1295 break;
1296 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001297
temporal40ee5512008-07-10 02:12:20 +00001298 // optional string package = 2;
1299 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001300 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001301 parse_package:
1302 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1303 input, this->mutable_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001304 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00001305 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001306 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001307 "google.protobuf.FileDescriptorProto.package");
kenton@google.comfccb1462009-12-18 02:11:36 +00001308 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001309 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001310 }
temporal40ee5512008-07-10 02:12:20 +00001311 if (input->ExpectTag(26)) goto parse_dependency;
1312 break;
1313 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001314
temporal40ee5512008-07-10 02:12:20 +00001315 // repeated string dependency = 3;
1316 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001317 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001318 parse_dependency:
1319 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1320 input, this->add_dependency()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001321 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.com20724212012-05-16 05:41:31 +00001322 this->dependency(this->dependency_size() - 1).data(),
1323 this->dependency(this->dependency_size() - 1).length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001324 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001325 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.comfccb1462009-12-18 02:11:36 +00001326 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001327 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001328 }
temporal40ee5512008-07-10 02:12:20 +00001329 if (input->ExpectTag(26)) goto parse_dependency;
1330 if (input->ExpectTag(34)) goto parse_message_type;
1331 break;
1332 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001333
temporal40ee5512008-07-10 02:12:20 +00001334 // repeated .google.protobuf.DescriptorProto message_type = 4;
1335 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001336 if (tag == 34) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001337 parse_message_type:
Bo Yang5db21732015-05-21 14:28:59 -07001338 DO_(input->IncrementRecursionDepth());
1339 parse_loop_message_type:
1340 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001341 input, add_message_type()));
1342 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001343 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001344 }
Bo Yang5db21732015-05-21 14:28:59 -07001345 if (input->ExpectTag(34)) goto parse_loop_message_type;
1346 if (input->ExpectTag(42)) goto parse_loop_enum_type;
1347 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001348 break;
1349 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001350
temporal40ee5512008-07-10 02:12:20 +00001351 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
1352 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001353 if (tag == 42) {
Bo Yang5db21732015-05-21 14:28:59 -07001354 DO_(input->IncrementRecursionDepth());
1355 parse_loop_enum_type:
1356 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001357 input, add_enum_type()));
1358 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001359 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001360 }
Bo Yang5db21732015-05-21 14:28:59 -07001361 if (input->ExpectTag(42)) goto parse_loop_enum_type;
1362 if (input->ExpectTag(50)) goto parse_loop_service;
1363 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001364 break;
1365 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001366
temporal40ee5512008-07-10 02:12:20 +00001367 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
1368 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001369 if (tag == 50) {
Bo Yang5db21732015-05-21 14:28:59 -07001370 DO_(input->IncrementRecursionDepth());
1371 parse_loop_service:
1372 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001373 input, add_service()));
1374 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001375 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001376 }
Bo Yang5db21732015-05-21 14:28:59 -07001377 if (input->ExpectTag(50)) goto parse_loop_service;
1378 if (input->ExpectTag(58)) goto parse_loop_extension;
1379 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001380 break;
1381 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001382
temporal40ee5512008-07-10 02:12:20 +00001383 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
1384 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001385 if (tag == 58) {
Bo Yang5db21732015-05-21 14:28:59 -07001386 DO_(input->IncrementRecursionDepth());
1387 parse_loop_extension:
1388 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001389 input, add_extension()));
1390 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001391 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001392 }
Bo Yang5db21732015-05-21 14:28:59 -07001393 if (input->ExpectTag(58)) goto parse_loop_extension;
1394 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001395 if (input->ExpectTag(66)) goto parse_options;
1396 break;
1397 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001398
temporal40ee5512008-07-10 02:12:20 +00001399 // optional .google.protobuf.FileOptions options = 8;
1400 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001401 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001402 parse_options:
1403 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1404 input, mutable_options()));
1405 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001406 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001407 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001408 if (input->ExpectTag(74)) goto parse_source_code_info;
1409 break;
1410 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001411
liujisi@google.com33165fe2010-11-02 13:14:58 +00001412 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1413 case 9: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001414 if (tag == 74) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001415 parse_source_code_info:
1416 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1417 input, mutable_source_code_info()));
1418 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001419 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001420 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001421 if (input->ExpectTag(80)) goto parse_public_dependency;
1422 break;
1423 }
1424
1425 // repeated int32 public_dependency = 10;
1426 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001427 if (tag == 80) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001428 parse_public_dependency:
1429 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1430 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1431 1, 80, input, this->mutable_public_dependency())));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001432 } else if (tag == 82) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001433 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1434 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1435 input, this->mutable_public_dependency())));
1436 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001437 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001438 }
1439 if (input->ExpectTag(80)) goto parse_public_dependency;
1440 if (input->ExpectTag(88)) goto parse_weak_dependency;
1441 break;
1442 }
1443
1444 // repeated int32 weak_dependency = 11;
1445 case 11: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001446 if (tag == 88) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001447 parse_weak_dependency:
1448 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1449 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1450 1, 88, input, this->mutable_weak_dependency())));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001451 } else if (tag == 90) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001452 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1453 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1454 input, this->mutable_weak_dependency())));
1455 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001456 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001457 }
1458 if (input->ExpectTag(88)) goto parse_weak_dependency;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001459 if (input->ExpectTag(98)) goto parse_syntax;
1460 break;
1461 }
1462
1463 // optional string syntax = 12;
1464 case 12: {
1465 if (tag == 98) {
1466 parse_syntax:
1467 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1468 input, this->mutable_syntax()));
1469 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1470 this->syntax().data(), this->syntax().length(),
1471 ::google::protobuf::internal::WireFormat::PARSE,
1472 "google.protobuf.FileDescriptorProto.syntax");
1473 } else {
1474 goto handle_unusual;
1475 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001476 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00001477 break;
1478 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001479
temporal40ee5512008-07-10 02:12:20 +00001480 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001481 handle_unusual:
1482 if (tag == 0 ||
1483 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001484 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001485 goto success;
temporal40ee5512008-07-10 02:12:20 +00001486 }
1487 DO_(::google::protobuf::internal::WireFormat::SkipField(
1488 input, tag, mutable_unknown_fields()));
1489 break;
1490 }
1491 }
1492 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001493success:
1494 // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001495 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00001496failure:
1497 // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorProto)
1498 return false;
temporal40ee5512008-07-10 02:12:20 +00001499#undef DO_
1500}
1501
kenton@google.comd37d46d2009-04-25 02:53:47 +00001502void FileDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00001503 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001504 // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001505 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001506 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001507 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001508 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001509 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001510 "google.protobuf.FileDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00001511 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00001512 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00001513 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001514
temporal40ee5512008-07-10 02:12:20 +00001515 // optional string package = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001516 if (has_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001517 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001518 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001519 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001520 "google.protobuf.FileDescriptorProto.package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00001521 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00001522 2, this->package(), output);
temporal40ee5512008-07-10 02:12:20 +00001523 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001524
temporal40ee5512008-07-10 02:12:20 +00001525 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001526 for (int i = 0; i < this->dependency_size(); i++) {
Jisi Liu4c663d82015-08-25 17:03:05 -07001527 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1528 this->dependency(i).data(), this->dependency(i).length(),
1529 ::google::protobuf::internal::WireFormat::SERIALIZE,
1530 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.com80b1d622009-07-29 01:13:20 +00001531 ::google::protobuf::internal::WireFormatLite::WriteString(
1532 3, this->dependency(i), output);
temporal40ee5512008-07-10 02:12:20 +00001533 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001534
temporal40ee5512008-07-10 02:12:20 +00001535 // repeated .google.protobuf.DescriptorProto message_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08001536 for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001537 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001538 4, this->message_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001539 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001540
temporal40ee5512008-07-10 02:12:20 +00001541 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08001542 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001543 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001544 5, this->enum_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001545 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001546
temporal40ee5512008-07-10 02:12:20 +00001547 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08001548 for (unsigned int i = 0, n = this->service_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001549 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001550 6, this->service(i), output);
temporal40ee5512008-07-10 02:12:20 +00001551 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001552
temporal40ee5512008-07-10 02:12:20 +00001553 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
Feng Xiaof157a562014-11-14 11:50:31 -08001554 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001555 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001556 7, this->extension(i), output);
temporal40ee5512008-07-10 02:12:20 +00001557 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001558
temporal40ee5512008-07-10 02:12:20 +00001559 // optional .google.protobuf.FileOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001560 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001561 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001562 8, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00001563 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001564
liujisi@google.com33165fe2010-11-02 13:14:58 +00001565 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1566 if (has_source_code_info()) {
1567 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001568 9, *this->source_code_info_, output);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001569 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001570
1571 // repeated int32 public_dependency = 10;
1572 for (int i = 0; i < this->public_dependency_size(); i++) {
1573 ::google::protobuf::internal::WireFormatLite::WriteInt32(
1574 10, this->public_dependency(i), output);
1575 }
1576
1577 // repeated int32 weak_dependency = 11;
1578 for (int i = 0; i < this->weak_dependency_size(); i++) {
1579 ::google::protobuf::internal::WireFormatLite::WriteInt32(
1580 11, this->weak_dependency(i), output);
1581 }
1582
Feng Xiao6ef984a2014-11-10 17:34:54 -08001583 // optional string syntax = 12;
1584 if (has_syntax()) {
1585 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1586 this->syntax().data(), this->syntax().length(),
1587 ::google::protobuf::internal::WireFormat::SERIALIZE,
1588 "google.protobuf.FileDescriptorProto.syntax");
1589 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1590 12, this->syntax(), output);
1591 }
1592
1593 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001594 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1595 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00001596 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001597 // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001598}
1599
1600::google::protobuf::uint8* FileDescriptorProto::SerializeWithCachedSizesToArray(
1601 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001602 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001603 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001604 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001605 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001606 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001607 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001608 "google.protobuf.FileDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00001609 target =
1610 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1611 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001612 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001613
kenton@google.comd37d46d2009-04-25 02:53:47 +00001614 // optional string package = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001615 if (has_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001616 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001617 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001618 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001619 "google.protobuf.FileDescriptorProto.package");
kenton@google.com80b1d622009-07-29 01:13:20 +00001620 target =
1621 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1622 2, this->package(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001623 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001624
kenton@google.comd37d46d2009-04-25 02:53:47 +00001625 // repeated string dependency = 3;
1626 for (int i = 0; i < this->dependency_size(); i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001627 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001628 this->dependency(i).data(), this->dependency(i).length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001629 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001630 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.com80b1d622009-07-29 01:13:20 +00001631 target = ::google::protobuf::internal::WireFormatLite::
1632 WriteStringToArray(3, this->dependency(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001633 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001634
kenton@google.comd37d46d2009-04-25 02:53:47 +00001635 // repeated .google.protobuf.DescriptorProto message_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08001636 for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001637 target = ::google::protobuf::internal::WireFormatLite::
1638 WriteMessageNoVirtualToArray(
1639 4, this->message_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001640 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001641
kenton@google.comd37d46d2009-04-25 02:53:47 +00001642 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08001643 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001644 target = ::google::protobuf::internal::WireFormatLite::
1645 WriteMessageNoVirtualToArray(
1646 5, this->enum_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001647 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001648
kenton@google.comd37d46d2009-04-25 02:53:47 +00001649 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08001650 for (unsigned int i = 0, n = this->service_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001651 target = ::google::protobuf::internal::WireFormatLite::
1652 WriteMessageNoVirtualToArray(
1653 6, this->service(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001654 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001655
kenton@google.comd37d46d2009-04-25 02:53:47 +00001656 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
Feng Xiaof157a562014-11-14 11:50:31 -08001657 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001658 target = ::google::protobuf::internal::WireFormatLite::
1659 WriteMessageNoVirtualToArray(
1660 7, this->extension(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001661 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001662
kenton@google.comd37d46d2009-04-25 02:53:47 +00001663 // optional .google.protobuf.FileOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001664 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001665 target = ::google::protobuf::internal::WireFormatLite::
1666 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001667 8, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001668 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001669
liujisi@google.com33165fe2010-11-02 13:14:58 +00001670 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1671 if (has_source_code_info()) {
1672 target = ::google::protobuf::internal::WireFormatLite::
1673 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001674 9, *this->source_code_info_, target);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001675 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001676
1677 // repeated int32 public_dependency = 10;
1678 for (int i = 0; i < this->public_dependency_size(); i++) {
1679 target = ::google::protobuf::internal::WireFormatLite::
1680 WriteInt32ToArray(10, this->public_dependency(i), target);
1681 }
1682
1683 // repeated int32 weak_dependency = 11;
1684 for (int i = 0; i < this->weak_dependency_size(); i++) {
1685 target = ::google::protobuf::internal::WireFormatLite::
1686 WriteInt32ToArray(11, this->weak_dependency(i), target);
1687 }
1688
Feng Xiao6ef984a2014-11-10 17:34:54 -08001689 // optional string syntax = 12;
1690 if (has_syntax()) {
1691 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1692 this->syntax().data(), this->syntax().length(),
1693 ::google::protobuf::internal::WireFormat::SERIALIZE,
1694 "google.protobuf.FileDescriptorProto.syntax");
1695 target =
1696 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1697 12, this->syntax(), target);
1698 }
1699
1700 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001701 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1702 unknown_fields(), target);
1703 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001704 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001705 return target;
temporal40ee5512008-07-10 02:12:20 +00001706}
1707
1708int FileDescriptorProto::ByteSize() const {
1709 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001710
Austin Schuh307af622015-06-05 22:46:01 -07001711 if (_has_bits_[0 / 32] & 3u) {
temporal40ee5512008-07-10 02:12:20 +00001712 // optional string name = 1;
1713 if (has_name()) {
1714 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001715 ::google::protobuf::internal::WireFormatLite::StringSize(
1716 this->name());
temporal40ee5512008-07-10 02:12:20 +00001717 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001718
temporal40ee5512008-07-10 02:12:20 +00001719 // optional string package = 2;
1720 if (has_package()) {
1721 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001722 ::google::protobuf::internal::WireFormatLite::StringSize(
1723 this->package());
temporal40ee5512008-07-10 02:12:20 +00001724 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001725
1726 }
Austin Schuh307af622015-06-05 22:46:01 -07001727 if (_has_bits_[9 / 32] & 3584u) {
temporal40ee5512008-07-10 02:12:20 +00001728 // optional .google.protobuf.FileOptions options = 8;
1729 if (has_options()) {
1730 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001731 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08001732 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00001733 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001734
liujisi@google.com33165fe2010-11-02 13:14:58 +00001735 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1736 if (has_source_code_info()) {
1737 total_size += 1 +
1738 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08001739 *this->source_code_info_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001740 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001741
Feng Xiao6ef984a2014-11-10 17:34:54 -08001742 // optional string syntax = 12;
1743 if (has_syntax()) {
1744 total_size += 1 +
1745 ::google::protobuf::internal::WireFormatLite::StringSize(
1746 this->syntax());
1747 }
1748
liujisi@google.com33165fe2010-11-02 13:14:58 +00001749 }
temporal40ee5512008-07-10 02:12:20 +00001750 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001751 total_size += 1 * this->dependency_size();
1752 for (int i = 0; i < this->dependency_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001753 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
temporal40ee5512008-07-10 02:12:20 +00001754 this->dependency(i));
1755 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001756
1757 // repeated int32 public_dependency = 10;
1758 {
1759 int data_size = 0;
1760 for (int i = 0; i < this->public_dependency_size(); i++) {
1761 data_size += ::google::protobuf::internal::WireFormatLite::
1762 Int32Size(this->public_dependency(i));
1763 }
1764 total_size += 1 * this->public_dependency_size() + data_size;
1765 }
1766
1767 // repeated int32 weak_dependency = 11;
1768 {
1769 int data_size = 0;
1770 for (int i = 0; i < this->weak_dependency_size(); i++) {
1771 data_size += ::google::protobuf::internal::WireFormatLite::
1772 Int32Size(this->weak_dependency(i));
1773 }
1774 total_size += 1 * this->weak_dependency_size() + data_size;
1775 }
1776
temporal40ee5512008-07-10 02:12:20 +00001777 // repeated .google.protobuf.DescriptorProto message_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001778 total_size += 1 * this->message_type_size();
1779 for (int i = 0; i < this->message_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001780 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001781 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001782 this->message_type(i));
1783 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001784
temporal40ee5512008-07-10 02:12:20 +00001785 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001786 total_size += 1 * this->enum_type_size();
1787 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001788 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001789 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001790 this->enum_type(i));
1791 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001792
temporal40ee5512008-07-10 02:12:20 +00001793 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001794 total_size += 1 * this->service_size();
1795 for (int i = 0; i < this->service_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001796 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001797 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001798 this->service(i));
1799 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001800
temporal40ee5512008-07-10 02:12:20 +00001801 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001802 total_size += 1 * this->extension_size();
1803 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001804 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001805 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001806 this->extension(i));
1807 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001808
Feng Xiao6ef984a2014-11-10 17:34:54 -08001809 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00001810 total_size +=
1811 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1812 unknown_fields());
1813 }
kenton@google.comfccb1462009-12-18 02:11:36 +00001814 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00001815 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00001816 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00001817 return total_size;
1818}
1819
1820void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001821 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07001822 const FileDescriptorProto* source =
1823 ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorProto>(
1824 &from);
temporal40ee5512008-07-10 02:12:20 +00001825 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00001826 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00001827 } else {
1828 MergeFrom(*source);
1829 }
1830}
1831
1832void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001833 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00001834 dependency_.MergeFrom(from.dependency_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001835 public_dependency_.MergeFrom(from.public_dependency_);
1836 weak_dependency_.MergeFrom(from.weak_dependency_);
temporal40ee5512008-07-10 02:12:20 +00001837 message_type_.MergeFrom(from.message_type_);
1838 enum_type_.MergeFrom(from.enum_type_);
1839 service_.MergeFrom(from.service_);
1840 extension_.MergeFrom(from.extension_);
1841 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001842 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001843 set_has_name();
1844 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00001845 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001846 if (from.has_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001847 set_has_package();
1848 package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.package_);
temporal40ee5512008-07-10 02:12:20 +00001849 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001850 }
1851 if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001852 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001853 mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options());
1854 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001855 if (from.has_source_code_info()) {
1856 mutable_source_code_info()->::google::protobuf::SourceCodeInfo::MergeFrom(from.source_code_info());
1857 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001858 if (from.has_syntax()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001859 set_has_syntax();
1860 syntax_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.syntax_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08001861 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001862 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001863 if (from._internal_metadata_.have_unknown_fields()) {
1864 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1865 }
temporal40ee5512008-07-10 02:12:20 +00001866}
1867
1868void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
1869 if (&from == this) return;
1870 Clear();
1871 MergeFrom(from);
1872}
1873
1874void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
1875 if (&from == this) return;
1876 Clear();
1877 MergeFrom(from);
1878}
1879
1880bool FileDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001881
jieluo@google.com4de8f552014-07-18 00:47:59 +00001882 if (!::google::protobuf::internal::AllAreInitialized(this->message_type())) return false;
1883 if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false;
1884 if (!::google::protobuf::internal::AllAreInitialized(this->service())) return false;
1885 if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001886 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001887 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001888 }
temporal40ee5512008-07-10 02:12:20 +00001889 return true;
1890}
1891
kenton@google.comceb561d2009-06-25 19:05:36 +00001892void FileDescriptorProto::Swap(FileDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08001893 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001894 InternalSwap(other);
1895}
1896void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) {
1897 name_.Swap(&other->name_);
1898 package_.Swap(&other->package_);
1899 dependency_.UnsafeArenaSwap(&other->dependency_);
1900 public_dependency_.UnsafeArenaSwap(&other->public_dependency_);
1901 weak_dependency_.UnsafeArenaSwap(&other->weak_dependency_);
1902 message_type_.UnsafeArenaSwap(&other->message_type_);
1903 enum_type_.UnsafeArenaSwap(&other->enum_type_);
1904 service_.UnsafeArenaSwap(&other->service_);
1905 extension_.UnsafeArenaSwap(&other->extension_);
1906 std::swap(options_, other->options_);
1907 std::swap(source_code_info_, other->source_code_info_);
1908 syntax_.Swap(&other->syntax_);
1909 std::swap(_has_bits_[0], other->_has_bits_[0]);
1910 _internal_metadata_.Swap(&other->_internal_metadata_);
1911 std::swap(_cached_size_, other->_cached_size_);
1912}
kenton@google.comceb561d2009-06-25 19:05:36 +00001913
kenton@google.com80b1d622009-07-29 01:13:20 +00001914::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const {
1915 protobuf_AssignDescriptorsOnce();
1916 ::google::protobuf::Metadata metadata;
1917 metadata.descriptor = FileDescriptorProto_descriptor_;
1918 metadata.reflection = FileDescriptorProto_reflection_;
1919 return metadata;
temporal40ee5512008-07-10 02:12:20 +00001920}
1921
Jisi Liu885b6122015-02-28 14:51:22 -08001922#if PROTOBUF_INLINE_NOT_IN_HEADERS
1923// FileDescriptorProto
1924
1925// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07001926bool FileDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001927 return (_has_bits_[0] & 0x00000001u) != 0;
1928}
Bo Yang5db21732015-05-21 14:28:59 -07001929void FileDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001930 _has_bits_[0] |= 0x00000001u;
1931}
Bo Yang5db21732015-05-21 14:28:59 -07001932void FileDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001933 _has_bits_[0] &= ~0x00000001u;
1934}
Bo Yang5db21732015-05-21 14:28:59 -07001935void FileDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001936 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1937 clear_has_name();
1938}
1939 const ::std::string& FileDescriptorProto::name() const {
1940 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name)
1941 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1942}
1943 void FileDescriptorProto::set_name(const ::std::string& value) {
1944 set_has_name();
1945 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1946 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name)
1947}
1948 void FileDescriptorProto::set_name(const char* value) {
1949 set_has_name();
1950 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1951 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name)
1952}
1953 void FileDescriptorProto::set_name(const char* value, size_t size) {
1954 set_has_name();
1955 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1956 ::std::string(reinterpret_cast<const char*>(value), size));
1957 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name)
1958}
1959 ::std::string* FileDescriptorProto::mutable_name() {
1960 set_has_name();
1961 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name)
1962 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1963}
1964 ::std::string* FileDescriptorProto::release_name() {
1965 clear_has_name();
1966 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1967}
1968 void FileDescriptorProto::set_allocated_name(::std::string* name) {
1969 if (name != NULL) {
1970 set_has_name();
1971 } else {
1972 clear_has_name();
1973 }
1974 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
1975 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name)
1976}
1977
1978// optional string package = 2;
Bo Yang5db21732015-05-21 14:28:59 -07001979bool FileDescriptorProto::has_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001980 return (_has_bits_[0] & 0x00000002u) != 0;
1981}
Bo Yang5db21732015-05-21 14:28:59 -07001982void FileDescriptorProto::set_has_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001983 _has_bits_[0] |= 0x00000002u;
1984}
Bo Yang5db21732015-05-21 14:28:59 -07001985void FileDescriptorProto::clear_has_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001986 _has_bits_[0] &= ~0x00000002u;
1987}
Bo Yang5db21732015-05-21 14:28:59 -07001988void FileDescriptorProto::clear_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001989 package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1990 clear_has_package();
1991}
1992 const ::std::string& FileDescriptorProto::package() const {
1993 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package)
1994 return package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1995}
1996 void FileDescriptorProto::set_package(const ::std::string& value) {
1997 set_has_package();
1998 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1999 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package)
2000}
2001 void FileDescriptorProto::set_package(const char* value) {
2002 set_has_package();
2003 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
2004 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package)
2005}
2006 void FileDescriptorProto::set_package(const char* value, size_t size) {
2007 set_has_package();
2008 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2009 ::std::string(reinterpret_cast<const char*>(value), size));
2010 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package)
2011}
2012 ::std::string* FileDescriptorProto::mutable_package() {
2013 set_has_package();
2014 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package)
2015 return package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2016}
2017 ::std::string* FileDescriptorProto::release_package() {
2018 clear_has_package();
2019 return package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2020}
2021 void FileDescriptorProto::set_allocated_package(::std::string* package) {
2022 if (package != NULL) {
2023 set_has_package();
2024 } else {
2025 clear_has_package();
2026 }
2027 package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), package);
2028 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package)
2029}
2030
2031// repeated string dependency = 3;
Bo Yang5db21732015-05-21 14:28:59 -07002032int FileDescriptorProto::dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002033 return dependency_.size();
2034}
Bo Yang5db21732015-05-21 14:28:59 -07002035void FileDescriptorProto::clear_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08002036 dependency_.Clear();
2037}
2038 const ::std::string& FileDescriptorProto::dependency(int index) const {
2039 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency)
2040 return dependency_.Get(index);
2041}
2042 ::std::string* FileDescriptorProto::mutable_dependency(int index) {
2043 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency)
2044 return dependency_.Mutable(index);
2045}
2046 void FileDescriptorProto::set_dependency(int index, const ::std::string& value) {
2047 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
2048 dependency_.Mutable(index)->assign(value);
2049}
2050 void FileDescriptorProto::set_dependency(int index, const char* value) {
2051 dependency_.Mutable(index)->assign(value);
2052 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency)
2053}
2054 void FileDescriptorProto::set_dependency(int index, const char* value, size_t size) {
2055 dependency_.Mutable(index)->assign(
2056 reinterpret_cast<const char*>(value), size);
2057 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency)
2058}
2059 ::std::string* FileDescriptorProto::add_dependency() {
2060 return dependency_.Add();
2061}
2062 void FileDescriptorProto::add_dependency(const ::std::string& value) {
2063 dependency_.Add()->assign(value);
2064 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
2065}
2066 void FileDescriptorProto::add_dependency(const char* value) {
2067 dependency_.Add()->assign(value);
2068 // @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency)
2069}
2070 void FileDescriptorProto::add_dependency(const char* value, size_t size) {
2071 dependency_.Add()->assign(reinterpret_cast<const char*>(value), size);
2072 // @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency)
2073}
2074 const ::google::protobuf::RepeatedPtrField< ::std::string>&
2075FileDescriptorProto::dependency() const {
2076 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency)
2077 return dependency_;
2078}
2079 ::google::protobuf::RepeatedPtrField< ::std::string>*
2080FileDescriptorProto::mutable_dependency() {
2081 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency)
2082 return &dependency_;
2083}
2084
2085// repeated int32 public_dependency = 10;
Bo Yang5db21732015-05-21 14:28:59 -07002086int FileDescriptorProto::public_dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002087 return public_dependency_.size();
2088}
Bo Yang5db21732015-05-21 14:28:59 -07002089void FileDescriptorProto::clear_public_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08002090 public_dependency_.Clear();
2091}
2092 ::google::protobuf::int32 FileDescriptorProto::public_dependency(int index) const {
2093 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency)
2094 return public_dependency_.Get(index);
2095}
2096 void FileDescriptorProto::set_public_dependency(int index, ::google::protobuf::int32 value) {
2097 public_dependency_.Set(index, value);
2098 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency)
2099}
2100 void FileDescriptorProto::add_public_dependency(::google::protobuf::int32 value) {
2101 public_dependency_.Add(value);
2102 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency)
2103}
2104 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
2105FileDescriptorProto::public_dependency() const {
2106 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency)
2107 return public_dependency_;
2108}
2109 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
2110FileDescriptorProto::mutable_public_dependency() {
2111 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency)
2112 return &public_dependency_;
2113}
2114
2115// repeated int32 weak_dependency = 11;
Bo Yang5db21732015-05-21 14:28:59 -07002116int FileDescriptorProto::weak_dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002117 return weak_dependency_.size();
2118}
Bo Yang5db21732015-05-21 14:28:59 -07002119void FileDescriptorProto::clear_weak_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08002120 weak_dependency_.Clear();
2121}
2122 ::google::protobuf::int32 FileDescriptorProto::weak_dependency(int index) const {
2123 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency)
2124 return weak_dependency_.Get(index);
2125}
2126 void FileDescriptorProto::set_weak_dependency(int index, ::google::protobuf::int32 value) {
2127 weak_dependency_.Set(index, value);
2128 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency)
2129}
2130 void FileDescriptorProto::add_weak_dependency(::google::protobuf::int32 value) {
2131 weak_dependency_.Add(value);
2132 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency)
2133}
2134 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
2135FileDescriptorProto::weak_dependency() const {
2136 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency)
2137 return weak_dependency_;
2138}
2139 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
2140FileDescriptorProto::mutable_weak_dependency() {
2141 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency)
2142 return &weak_dependency_;
2143}
2144
2145// repeated .google.protobuf.DescriptorProto message_type = 4;
Bo Yang5db21732015-05-21 14:28:59 -07002146int FileDescriptorProto::message_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002147 return message_type_.size();
2148}
Bo Yang5db21732015-05-21 14:28:59 -07002149void FileDescriptorProto::clear_message_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002150 message_type_.Clear();
2151}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002152const ::google::protobuf::DescriptorProto& FileDescriptorProto::message_type(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08002153 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.message_type)
2154 return message_type_.Get(index);
2155}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002156::google::protobuf::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08002157 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.message_type)
2158 return message_type_.Mutable(index);
2159}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002160::google::protobuf::DescriptorProto* FileDescriptorProto::add_message_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002161 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.message_type)
2162 return message_type_.Add();
2163}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002164::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08002165FileDescriptorProto::mutable_message_type() {
2166 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type)
2167 return &message_type_;
2168}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002169const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
2170FileDescriptorProto::message_type() const {
2171 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type)
2172 return message_type_;
2173}
Jisi Liu885b6122015-02-28 14:51:22 -08002174
2175// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Bo Yang5db21732015-05-21 14:28:59 -07002176int FileDescriptorProto::enum_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002177 return enum_type_.size();
2178}
Bo Yang5db21732015-05-21 14:28:59 -07002179void FileDescriptorProto::clear_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002180 enum_type_.Clear();
2181}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002182const ::google::protobuf::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08002183 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.enum_type)
2184 return enum_type_.Get(index);
2185}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002186::google::protobuf::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08002187 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.enum_type)
2188 return enum_type_.Mutable(index);
2189}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002190::google::protobuf::EnumDescriptorProto* FileDescriptorProto::add_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002191 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.enum_type)
2192 return enum_type_.Add();
2193}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002194::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08002195FileDescriptorProto::mutable_enum_type() {
2196 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type)
2197 return &enum_type_;
2198}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002199const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
2200FileDescriptorProto::enum_type() const {
2201 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type)
2202 return enum_type_;
2203}
Jisi Liu885b6122015-02-28 14:51:22 -08002204
2205// repeated .google.protobuf.ServiceDescriptorProto service = 6;
Bo Yang5db21732015-05-21 14:28:59 -07002206int FileDescriptorProto::service_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002207 return service_.size();
2208}
Bo Yang5db21732015-05-21 14:28:59 -07002209void FileDescriptorProto::clear_service() {
Jisi Liu885b6122015-02-28 14:51:22 -08002210 service_.Clear();
2211}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002212const ::google::protobuf::ServiceDescriptorProto& FileDescriptorProto::service(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08002213 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service)
2214 return service_.Get(index);
2215}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002216::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08002217 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.service)
2218 return service_.Mutable(index);
2219}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002220::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::add_service() {
Jisi Liu885b6122015-02-28 14:51:22 -08002221 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service)
2222 return service_.Add();
2223}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002224::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08002225FileDescriptorProto::mutable_service() {
2226 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service)
2227 return &service_;
2228}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002229const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >&
2230FileDescriptorProto::service() const {
2231 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service)
2232 return service_;
2233}
Jisi Liu885b6122015-02-28 14:51:22 -08002234
2235// repeated .google.protobuf.FieldDescriptorProto extension = 7;
Bo Yang5db21732015-05-21 14:28:59 -07002236int FileDescriptorProto::extension_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002237 return extension_.size();
2238}
Bo Yang5db21732015-05-21 14:28:59 -07002239void FileDescriptorProto::clear_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08002240 extension_.Clear();
2241}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002242const ::google::protobuf::FieldDescriptorProto& FileDescriptorProto::extension(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08002243 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension)
2244 return extension_.Get(index);
2245}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002246::google::protobuf::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08002247 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.extension)
2248 return extension_.Mutable(index);
2249}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002250::google::protobuf::FieldDescriptorProto* FileDescriptorProto::add_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08002251 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension)
2252 return extension_.Add();
2253}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002254::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08002255FileDescriptorProto::mutable_extension() {
2256 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension)
2257 return &extension_;
2258}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002259const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
2260FileDescriptorProto::extension() const {
2261 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension)
2262 return extension_;
2263}
Jisi Liu885b6122015-02-28 14:51:22 -08002264
2265// optional .google.protobuf.FileOptions options = 8;
Bo Yang5db21732015-05-21 14:28:59 -07002266bool FileDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002267 return (_has_bits_[0] & 0x00000200u) != 0;
2268}
Bo Yang5db21732015-05-21 14:28:59 -07002269void FileDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002270 _has_bits_[0] |= 0x00000200u;
2271}
Bo Yang5db21732015-05-21 14:28:59 -07002272void FileDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002273 _has_bits_[0] &= ~0x00000200u;
2274}
Bo Yang5db21732015-05-21 14:28:59 -07002275void FileDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002276 if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear();
2277 clear_has_options();
2278}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002279const ::google::protobuf::FileOptions& FileDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002280 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options)
2281 return options_ != NULL ? *options_ : *default_instance_->options_;
2282}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002283::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002284 set_has_options();
2285 if (options_ == NULL) {
2286 options_ = new ::google::protobuf::FileOptions;
2287 }
2288 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options)
2289 return options_;
2290}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002291::google::protobuf::FileOptions* FileDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002292 clear_has_options();
2293 ::google::protobuf::FileOptions* temp = options_;
2294 options_ = NULL;
2295 return temp;
2296}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002297void FileDescriptorProto::set_allocated_options(::google::protobuf::FileOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08002298 delete options_;
2299 options_ = options;
2300 if (options) {
2301 set_has_options();
2302 } else {
2303 clear_has_options();
2304 }
2305 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.options)
2306}
2307
2308// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
Bo Yang5db21732015-05-21 14:28:59 -07002309bool FileDescriptorProto::has_source_code_info() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002310 return (_has_bits_[0] & 0x00000400u) != 0;
2311}
Bo Yang5db21732015-05-21 14:28:59 -07002312void FileDescriptorProto::set_has_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002313 _has_bits_[0] |= 0x00000400u;
2314}
Bo Yang5db21732015-05-21 14:28:59 -07002315void FileDescriptorProto::clear_has_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002316 _has_bits_[0] &= ~0x00000400u;
2317}
Bo Yang5db21732015-05-21 14:28:59 -07002318void FileDescriptorProto::clear_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002319 if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear();
2320 clear_has_source_code_info();
2321}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002322const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002323 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info)
2324 return source_code_info_ != NULL ? *source_code_info_ : *default_instance_->source_code_info_;
2325}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002326::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002327 set_has_source_code_info();
2328 if (source_code_info_ == NULL) {
2329 source_code_info_ = new ::google::protobuf::SourceCodeInfo;
2330 }
2331 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info)
2332 return source_code_info_;
2333}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002334::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002335 clear_has_source_code_info();
2336 ::google::protobuf::SourceCodeInfo* temp = source_code_info_;
2337 source_code_info_ = NULL;
2338 return temp;
2339}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002340void FileDescriptorProto::set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info) {
Jisi Liu885b6122015-02-28 14:51:22 -08002341 delete source_code_info_;
2342 source_code_info_ = source_code_info;
2343 if (source_code_info) {
2344 set_has_source_code_info();
2345 } else {
2346 clear_has_source_code_info();
2347 }
2348 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info)
2349}
2350
2351// optional string syntax = 12;
Bo Yang5db21732015-05-21 14:28:59 -07002352bool FileDescriptorProto::has_syntax() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002353 return (_has_bits_[0] & 0x00000800u) != 0;
2354}
Bo Yang5db21732015-05-21 14:28:59 -07002355void FileDescriptorProto::set_has_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002356 _has_bits_[0] |= 0x00000800u;
2357}
Bo Yang5db21732015-05-21 14:28:59 -07002358void FileDescriptorProto::clear_has_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002359 _has_bits_[0] &= ~0x00000800u;
2360}
Bo Yang5db21732015-05-21 14:28:59 -07002361void FileDescriptorProto::clear_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002362 syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2363 clear_has_syntax();
2364}
2365 const ::std::string& FileDescriptorProto::syntax() const {
2366 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax)
2367 return syntax_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2368}
2369 void FileDescriptorProto::set_syntax(const ::std::string& value) {
2370 set_has_syntax();
2371 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
2372 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax)
2373}
2374 void FileDescriptorProto::set_syntax(const char* value) {
2375 set_has_syntax();
2376 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
2377 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax)
2378}
2379 void FileDescriptorProto::set_syntax(const char* value, size_t size) {
2380 set_has_syntax();
2381 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2382 ::std::string(reinterpret_cast<const char*>(value), size));
2383 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax)
2384}
2385 ::std::string* FileDescriptorProto::mutable_syntax() {
2386 set_has_syntax();
2387 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax)
2388 return syntax_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2389}
2390 ::std::string* FileDescriptorProto::release_syntax() {
2391 clear_has_syntax();
2392 return syntax_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2393}
2394 void FileDescriptorProto::set_allocated_syntax(::std::string* syntax) {
2395 if (syntax != NULL) {
2396 set_has_syntax();
2397 } else {
2398 clear_has_syntax();
2399 }
2400 syntax_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), syntax);
2401 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax)
2402}
2403
2404#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00002405
2406// ===================================================================
2407
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002408#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002409const int DescriptorProto_ExtensionRange::kStartFieldNumber;
2410const int DescriptorProto_ExtensionRange::kEndFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002411#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00002412
kenton@google.com573989f2009-10-30 22:02:17 +00002413DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange()
Bo Yang5db21732015-05-21 14:28:59 -07002414 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002415 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00002416 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002417}
2418
kenton@google.com80b1d622009-07-29 01:13:20 +00002419void DescriptorProto_ExtensionRange::InitAsDefaultInstance() {
2420}
kenton@google.com24bf56f2008-09-24 20:31:01 +00002421
kenton@google.com573989f2009-10-30 22:02:17 +00002422DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08002423 : ::google::protobuf::Message(),
2424 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002425 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00002426 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00002427 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002428}
2429
kenton@google.comd37d46d2009-04-25 02:53:47 +00002430void DescriptorProto_ExtensionRange::SharedCtor() {
2431 _cached_size_ = 0;
2432 start_ = 0;
2433 end_ = 0;
2434 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2435}
2436
temporal40ee5512008-07-10 02:12:20 +00002437DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002438 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002439 SharedDtor();
2440}
2441
2442void DescriptorProto_ExtensionRange::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00002443 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002444 }
2445}
2446
kenton@google.comfccb1462009-12-18 02:11:36 +00002447void DescriptorProto_ExtensionRange::SetCachedSize(int size) const {
2448 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2449 _cached_size_ = size;
2450 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2451}
temporal40ee5512008-07-10 02:12:20 +00002452const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002453 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00002454 return DescriptorProto_ExtensionRange_descriptor_;
2455}
2456
kenton@google.com24bf56f2008-09-24 20:31:01 +00002457const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00002458 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
2459 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00002460}
2461
2462DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL;
2463
Feng Xiao6ef984a2014-11-10 17:34:54 -08002464DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08002465 DescriptorProto_ExtensionRange* n = new DescriptorProto_ExtensionRange;
2466 if (arena != NULL) {
2467 arena->Own(n);
2468 }
2469 return n;
temporal40ee5512008-07-10 02:12:20 +00002470}
2471
2472void DescriptorProto_ExtensionRange::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -08002473#define ZR_HELPER_(f) reinterpret_cast<char*>(\
2474 &reinterpret_cast<DescriptorProto_ExtensionRange*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00002475
Jisi Liu885b6122015-02-28 14:51:22 -08002476#define ZR_(first, last) do {\
2477 ::memset(&first, 0,\
2478 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
2479} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00002480
2481 ZR_(start_, end_);
2482
Jisi Liu885b6122015-02-28 14:51:22 -08002483#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00002484#undef ZR_
2485
temporal40ee5512008-07-10 02:12:20 +00002486 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08002487 if (_internal_metadata_.have_unknown_fields()) {
2488 mutable_unknown_fields()->Clear();
2489 }
temporal40ee5512008-07-10 02:12:20 +00002490}
2491
2492bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream(
2493 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002494#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00002495 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002496 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ExtensionRange)
2497 for (;;) {
2498 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2499 tag = p.first;
2500 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00002501 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00002502 // optional int32 start = 1;
2503 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002504 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002505 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2506 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2507 input, &start_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00002508 set_has_start();
kenton@google.comfccb1462009-12-18 02:11:36 +00002509 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002510 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00002511 }
temporal40ee5512008-07-10 02:12:20 +00002512 if (input->ExpectTag(16)) goto parse_end;
2513 break;
2514 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002515
temporal40ee5512008-07-10 02:12:20 +00002516 // optional int32 end = 2;
2517 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002518 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002519 parse_end:
2520 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2521 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2522 input, &end_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00002523 set_has_end();
kenton@google.comfccb1462009-12-18 02:11:36 +00002524 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002525 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00002526 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002527 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00002528 break;
2529 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002530
temporal40ee5512008-07-10 02:12:20 +00002531 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002532 handle_unusual:
2533 if (tag == 0 ||
2534 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002535 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002536 goto success;
temporal40ee5512008-07-10 02:12:20 +00002537 }
2538 DO_(::google::protobuf::internal::WireFormat::SkipField(
2539 input, tag, mutable_unknown_fields()));
2540 break;
2541 }
2542 }
2543 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002544success:
2545 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002546 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002547failure:
2548 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ExtensionRange)
2549 return false;
temporal40ee5512008-07-10 02:12:20 +00002550#undef DO_
2551}
2552
kenton@google.comd37d46d2009-04-25 02:53:47 +00002553void DescriptorProto_ExtensionRange::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00002554 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002555 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002556 // optional int32 start = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002557 if (has_start()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002558 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output);
temporal40ee5512008-07-10 02:12:20 +00002559 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002560
temporal40ee5512008-07-10 02:12:20 +00002561 // optional int32 end = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002562 if (has_end()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002563 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output);
temporal40ee5512008-07-10 02:12:20 +00002564 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002565
Feng Xiao6ef984a2014-11-10 17:34:54 -08002566 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002567 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2568 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00002569 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002570 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002571}
2572
2573::google::protobuf::uint8* DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray(
2574 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002575 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002576 // optional int32 start = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002577 if (has_start()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002578 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002579 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002580
kenton@google.comd37d46d2009-04-25 02:53:47 +00002581 // optional int32 end = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002582 if (has_end()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002583 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002584 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002585
Feng Xiao6ef984a2014-11-10 17:34:54 -08002586 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002587 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2588 unknown_fields(), target);
2589 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002590 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002591 return target;
temporal40ee5512008-07-10 02:12:20 +00002592}
2593
2594int DescriptorProto_ExtensionRange::ByteSize() const {
2595 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002596
Austin Schuh307af622015-06-05 22:46:01 -07002597 if (_has_bits_[0 / 32] & 3u) {
temporal40ee5512008-07-10 02:12:20 +00002598 // optional int32 start = 1;
2599 if (has_start()) {
2600 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002601 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00002602 this->start());
2603 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002604
temporal40ee5512008-07-10 02:12:20 +00002605 // optional int32 end = 2;
2606 if (has_end()) {
2607 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002608 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00002609 this->end());
2610 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002611
temporal40ee5512008-07-10 02:12:20 +00002612 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08002613 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00002614 total_size +=
2615 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2616 unknown_fields());
2617 }
kenton@google.comfccb1462009-12-18 02:11:36 +00002618 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00002619 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00002620 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00002621 return total_size;
2622}
2623
2624void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08002625 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07002626 const DescriptorProto_ExtensionRange* source =
2627 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ExtensionRange>(
2628 &from);
temporal40ee5512008-07-10 02:12:20 +00002629 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00002630 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00002631 } else {
2632 MergeFrom(*source);
2633 }
2634}
2635
2636void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08002637 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00002638 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002639 if (from.has_start()) {
temporal40ee5512008-07-10 02:12:20 +00002640 set_start(from.start());
2641 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002642 if (from.has_end()) {
temporal40ee5512008-07-10 02:12:20 +00002643 set_end(from.end());
2644 }
2645 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08002646 if (from._internal_metadata_.have_unknown_fields()) {
2647 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2648 }
temporal40ee5512008-07-10 02:12:20 +00002649}
2650
2651void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) {
2652 if (&from == this) return;
2653 Clear();
2654 MergeFrom(from);
2655}
2656
2657void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) {
2658 if (&from == this) return;
2659 Clear();
2660 MergeFrom(from);
2661}
2662
kenton@google.comceb561d2009-06-25 19:05:36 +00002663bool DescriptorProto_ExtensionRange::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002664
kenton@google.comceb561d2009-06-25 19:05:36 +00002665 return true;
2666}
2667
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002668void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08002669 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08002670 InternalSwap(other);
2671}
2672void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) {
2673 std::swap(start_, other->start_);
2674 std::swap(end_, other->end_);
2675 std::swap(_has_bits_[0], other->_has_bits_[0]);
2676 _internal_metadata_.Swap(&other->_internal_metadata_);
2677 std::swap(_cached_size_, other->_cached_size_);
2678}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002679
kenton@google.com80b1d622009-07-29 01:13:20 +00002680::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const {
2681 protobuf_AssignDescriptorsOnce();
2682 ::google::protobuf::Metadata metadata;
2683 metadata.descriptor = DescriptorProto_ExtensionRange_descriptor_;
2684 metadata.reflection = DescriptorProto_ExtensionRange_reflection_;
2685 return metadata;
temporal40ee5512008-07-10 02:12:20 +00002686}
2687
temporal40ee5512008-07-10 02:12:20 +00002688
2689// -------------------------------------------------------------------
2690
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002691#if !defined(_MSC_VER) || _MSC_VER >= 1900
Bo Yang5db21732015-05-21 14:28:59 -07002692const int DescriptorProto_ReservedRange::kStartFieldNumber;
2693const int DescriptorProto_ReservedRange::kEndFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002694#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Bo Yang5db21732015-05-21 14:28:59 -07002695
2696DescriptorProto_ReservedRange::DescriptorProto_ReservedRange()
2697 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
2698 SharedCtor();
2699 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ReservedRange)
2700}
2701
2702void DescriptorProto_ReservedRange::InitAsDefaultInstance() {
2703}
2704
2705DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from)
2706 : ::google::protobuf::Message(),
2707 _internal_metadata_(NULL) {
2708 SharedCtor();
2709 MergeFrom(from);
2710 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange)
2711}
2712
2713void DescriptorProto_ReservedRange::SharedCtor() {
2714 _cached_size_ = 0;
2715 start_ = 0;
2716 end_ = 0;
2717 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2718}
2719
2720DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() {
2721 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ReservedRange)
2722 SharedDtor();
2723}
2724
2725void DescriptorProto_ReservedRange::SharedDtor() {
2726 if (this != default_instance_) {
2727 }
2728}
2729
2730void DescriptorProto_ReservedRange::SetCachedSize(int size) const {
2731 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2732 _cached_size_ = size;
2733 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2734}
2735const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange::descriptor() {
2736 protobuf_AssignDescriptorsOnce();
2737 return DescriptorProto_ReservedRange_descriptor_;
2738}
2739
2740const DescriptorProto_ReservedRange& DescriptorProto_ReservedRange::default_instance() {
2741 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
2742 return *default_instance_;
2743}
2744
2745DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::default_instance_ = NULL;
2746
2747DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::New(::google::protobuf::Arena* arena) const {
2748 DescriptorProto_ReservedRange* n = new DescriptorProto_ReservedRange;
2749 if (arena != NULL) {
2750 arena->Own(n);
2751 }
2752 return n;
2753}
2754
2755void DescriptorProto_ReservedRange::Clear() {
2756#define ZR_HELPER_(f) reinterpret_cast<char*>(\
2757 &reinterpret_cast<DescriptorProto_ReservedRange*>(16)->f)
2758
2759#define ZR_(first, last) do {\
2760 ::memset(&first, 0,\
2761 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
2762} while (0)
2763
2764 ZR_(start_, end_);
2765
2766#undef ZR_HELPER_
2767#undef ZR_
2768
2769 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2770 if (_internal_metadata_.have_unknown_fields()) {
2771 mutable_unknown_fields()->Clear();
2772 }
2773}
2774
2775bool DescriptorProto_ReservedRange::MergePartialFromCodedStream(
2776 ::google::protobuf::io::CodedInputStream* input) {
2777#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
2778 ::google::protobuf::uint32 tag;
2779 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ReservedRange)
2780 for (;;) {
2781 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2782 tag = p.first;
2783 if (!p.second) goto handle_unusual;
2784 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2785 // optional int32 start = 1;
2786 case 1: {
2787 if (tag == 8) {
2788 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2789 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2790 input, &start_)));
2791 set_has_start();
2792 } else {
2793 goto handle_unusual;
2794 }
2795 if (input->ExpectTag(16)) goto parse_end;
2796 break;
2797 }
2798
2799 // optional int32 end = 2;
2800 case 2: {
2801 if (tag == 16) {
2802 parse_end:
2803 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2804 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2805 input, &end_)));
2806 set_has_end();
2807 } else {
2808 goto handle_unusual;
2809 }
2810 if (input->ExpectAtEnd()) goto success;
2811 break;
2812 }
2813
2814 default: {
2815 handle_unusual:
2816 if (tag == 0 ||
2817 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2818 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2819 goto success;
2820 }
2821 DO_(::google::protobuf::internal::WireFormat::SkipField(
2822 input, tag, mutable_unknown_fields()));
2823 break;
2824 }
2825 }
2826 }
2827success:
2828 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ReservedRange)
2829 return true;
2830failure:
2831 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ReservedRange)
2832 return false;
2833#undef DO_
2834}
2835
2836void DescriptorProto_ReservedRange::SerializeWithCachedSizes(
2837 ::google::protobuf::io::CodedOutputStream* output) const {
2838 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ReservedRange)
2839 // optional int32 start = 1;
2840 if (has_start()) {
2841 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output);
2842 }
2843
2844 // optional int32 end = 2;
2845 if (has_end()) {
2846 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output);
2847 }
2848
2849 if (_internal_metadata_.have_unknown_fields()) {
2850 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2851 unknown_fields(), output);
2852 }
2853 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange)
2854}
2855
2856::google::protobuf::uint8* DescriptorProto_ReservedRange::SerializeWithCachedSizesToArray(
2857 ::google::protobuf::uint8* target) const {
2858 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange)
2859 // optional int32 start = 1;
2860 if (has_start()) {
2861 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target);
2862 }
2863
2864 // optional int32 end = 2;
2865 if (has_end()) {
2866 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target);
2867 }
2868
2869 if (_internal_metadata_.have_unknown_fields()) {
2870 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2871 unknown_fields(), target);
2872 }
2873 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange)
2874 return target;
2875}
2876
2877int DescriptorProto_ReservedRange::ByteSize() const {
2878 int total_size = 0;
2879
Austin Schuh307af622015-06-05 22:46:01 -07002880 if (_has_bits_[0 / 32] & 3u) {
Bo Yang5db21732015-05-21 14:28:59 -07002881 // optional int32 start = 1;
2882 if (has_start()) {
2883 total_size += 1 +
2884 ::google::protobuf::internal::WireFormatLite::Int32Size(
2885 this->start());
2886 }
2887
2888 // optional int32 end = 2;
2889 if (has_end()) {
2890 total_size += 1 +
2891 ::google::protobuf::internal::WireFormatLite::Int32Size(
2892 this->end());
2893 }
2894
2895 }
2896 if (_internal_metadata_.have_unknown_fields()) {
2897 total_size +=
2898 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2899 unknown_fields());
2900 }
2901 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2902 _cached_size_ = total_size;
2903 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2904 return total_size;
2905}
2906
2907void DescriptorProto_ReservedRange::MergeFrom(const ::google::protobuf::Message& from) {
2908 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2909 const DescriptorProto_ReservedRange* source =
2910 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ReservedRange>(
2911 &from);
2912 if (source == NULL) {
2913 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2914 } else {
2915 MergeFrom(*source);
2916 }
2917}
2918
2919void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) {
2920 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2921 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2922 if (from.has_start()) {
2923 set_start(from.start());
2924 }
2925 if (from.has_end()) {
2926 set_end(from.end());
2927 }
2928 }
2929 if (from._internal_metadata_.have_unknown_fields()) {
2930 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2931 }
2932}
2933
2934void DescriptorProto_ReservedRange::CopyFrom(const ::google::protobuf::Message& from) {
2935 if (&from == this) return;
2936 Clear();
2937 MergeFrom(from);
2938}
2939
2940void DescriptorProto_ReservedRange::CopyFrom(const DescriptorProto_ReservedRange& from) {
2941 if (&from == this) return;
2942 Clear();
2943 MergeFrom(from);
2944}
2945
2946bool DescriptorProto_ReservedRange::IsInitialized() const {
2947
2948 return true;
2949}
2950
2951void DescriptorProto_ReservedRange::Swap(DescriptorProto_ReservedRange* other) {
2952 if (other == this) return;
2953 InternalSwap(other);
2954}
2955void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) {
2956 std::swap(start_, other->start_);
2957 std::swap(end_, other->end_);
2958 std::swap(_has_bits_[0], other->_has_bits_[0]);
2959 _internal_metadata_.Swap(&other->_internal_metadata_);
2960 std::swap(_cached_size_, other->_cached_size_);
2961}
2962
2963::google::protobuf::Metadata DescriptorProto_ReservedRange::GetMetadata() const {
2964 protobuf_AssignDescriptorsOnce();
2965 ::google::protobuf::Metadata metadata;
2966 metadata.descriptor = DescriptorProto_ReservedRange_descriptor_;
2967 metadata.reflection = DescriptorProto_ReservedRange_reflection_;
2968 return metadata;
2969}
2970
2971
2972// -------------------------------------------------------------------
2973
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002974#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002975const int DescriptorProto::kNameFieldNumber;
2976const int DescriptorProto::kFieldFieldNumber;
2977const int DescriptorProto::kExtensionFieldNumber;
2978const int DescriptorProto::kNestedTypeFieldNumber;
2979const int DescriptorProto::kEnumTypeFieldNumber;
2980const int DescriptorProto::kExtensionRangeFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002981const int DescriptorProto::kOneofDeclFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002982const int DescriptorProto::kOptionsFieldNumber;
Bo Yang5db21732015-05-21 14:28:59 -07002983const int DescriptorProto::kReservedRangeFieldNumber;
2984const int DescriptorProto::kReservedNameFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002985#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00002986
kenton@google.com573989f2009-10-30 22:02:17 +00002987DescriptorProto::DescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07002988 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002989 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00002990 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00002991}
2992
kenton@google.com80b1d622009-07-29 01:13:20 +00002993void DescriptorProto::InitAsDefaultInstance() {
2994 options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00002995}
2996
kenton@google.com573989f2009-10-30 22:02:17 +00002997DescriptorProto::DescriptorProto(const DescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08002998 : ::google::protobuf::Message(),
2999 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003000 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00003001 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00003002 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00003003}
3004
kenton@google.comd37d46d2009-04-25 02:53:47 +00003005void DescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003006 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00003007 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08003008 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00003009 options_ = NULL;
3010 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3011}
3012
temporal40ee5512008-07-10 02:12:20 +00003013DescriptorProto::~DescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003014 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003015 SharedDtor();
3016}
3017
3018void DescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08003019 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00003020 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00003021 delete options_;
3022 }
3023}
3024
kenton@google.comfccb1462009-12-18 02:11:36 +00003025void DescriptorProto::SetCachedSize(int size) const {
3026 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3027 _cached_size_ = size;
3028 GOOGLE_SAFE_CONCURRENT_WRITES_END();
3029}
temporal40ee5512008-07-10 02:12:20 +00003030const ::google::protobuf::Descriptor* DescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003031 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00003032 return DescriptorProto_descriptor_;
3033}
3034
kenton@google.com24bf56f2008-09-24 20:31:01 +00003035const DescriptorProto& DescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00003036 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
3037 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003038}
3039
3040DescriptorProto* DescriptorProto::default_instance_ = NULL;
3041
Feng Xiao6ef984a2014-11-10 17:34:54 -08003042DescriptorProto* DescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08003043 DescriptorProto* n = new DescriptorProto;
3044 if (arena != NULL) {
3045 arena->Own(n);
3046 }
3047 return n;
temporal40ee5512008-07-10 02:12:20 +00003048}
3049
3050void DescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07003051 if (_has_bits_[0 / 32] & 129u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003052 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08003053 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00003054 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003055 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003056 if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
3057 }
3058 }
3059 field_.Clear();
3060 extension_.Clear();
3061 nested_type_.Clear();
3062 enum_type_.Clear();
3063 extension_range_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +00003064 oneof_decl_.Clear();
Bo Yang5db21732015-05-21 14:28:59 -07003065 reserved_range_.Clear();
3066 reserved_name_.Clear();
temporal40ee5512008-07-10 02:12:20 +00003067 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08003068 if (_internal_metadata_.have_unknown_fields()) {
3069 mutable_unknown_fields()->Clear();
3070 }
temporal40ee5512008-07-10 02:12:20 +00003071}
3072
3073bool DescriptorProto::MergePartialFromCodedStream(
3074 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003075#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00003076 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003077 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto)
3078 for (;;) {
3079 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
3080 tag = p.first;
3081 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00003082 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00003083 // optional string name = 1;
3084 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003085 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003086 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3087 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00003088 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00003089 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003090 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003091 "google.protobuf.DescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00003092 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003093 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003094 }
temporal40ee5512008-07-10 02:12:20 +00003095 if (input->ExpectTag(18)) goto parse_field;
3096 break;
3097 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003098
temporal40ee5512008-07-10 02:12:20 +00003099 // repeated .google.protobuf.FieldDescriptorProto field = 2;
3100 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003101 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003102 parse_field:
Bo Yang5db21732015-05-21 14:28:59 -07003103 DO_(input->IncrementRecursionDepth());
3104 parse_loop_field:
3105 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003106 input, add_field()));
3107 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003108 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003109 }
Bo Yang5db21732015-05-21 14:28:59 -07003110 if (input->ExpectTag(18)) goto parse_loop_field;
3111 if (input->ExpectTag(26)) goto parse_loop_nested_type;
3112 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003113 break;
3114 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003115
temporal40ee5512008-07-10 02:12:20 +00003116 // repeated .google.protobuf.DescriptorProto nested_type = 3;
3117 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003118 if (tag == 26) {
Bo Yang5db21732015-05-21 14:28:59 -07003119 DO_(input->IncrementRecursionDepth());
3120 parse_loop_nested_type:
3121 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003122 input, add_nested_type()));
3123 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003124 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003125 }
Bo Yang5db21732015-05-21 14:28:59 -07003126 if (input->ExpectTag(26)) goto parse_loop_nested_type;
3127 if (input->ExpectTag(34)) goto parse_loop_enum_type;
3128 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003129 break;
3130 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003131
temporal40ee5512008-07-10 02:12:20 +00003132 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
3133 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003134 if (tag == 34) {
Bo Yang5db21732015-05-21 14:28:59 -07003135 DO_(input->IncrementRecursionDepth());
3136 parse_loop_enum_type:
3137 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003138 input, add_enum_type()));
3139 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003140 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003141 }
Bo Yang5db21732015-05-21 14:28:59 -07003142 if (input->ExpectTag(34)) goto parse_loop_enum_type;
3143 if (input->ExpectTag(42)) goto parse_loop_extension_range;
3144 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003145 break;
3146 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003147
temporal40ee5512008-07-10 02:12:20 +00003148 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
3149 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003150 if (tag == 42) {
Bo Yang5db21732015-05-21 14:28:59 -07003151 DO_(input->IncrementRecursionDepth());
3152 parse_loop_extension_range:
3153 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003154 input, add_extension_range()));
3155 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003156 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003157 }
Bo Yang5db21732015-05-21 14:28:59 -07003158 if (input->ExpectTag(42)) goto parse_loop_extension_range;
3159 if (input->ExpectTag(50)) goto parse_loop_extension;
3160 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003161 break;
3162 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003163
temporal40ee5512008-07-10 02:12:20 +00003164 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
3165 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003166 if (tag == 50) {
Bo Yang5db21732015-05-21 14:28:59 -07003167 DO_(input->IncrementRecursionDepth());
3168 parse_loop_extension:
3169 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003170 input, add_extension()));
3171 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003172 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003173 }
Bo Yang5db21732015-05-21 14:28:59 -07003174 if (input->ExpectTag(50)) goto parse_loop_extension;
3175 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003176 if (input->ExpectTag(58)) goto parse_options;
3177 break;
3178 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003179
temporal40ee5512008-07-10 02:12:20 +00003180 // optional .google.protobuf.MessageOptions options = 7;
3181 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003182 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003183 parse_options:
3184 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3185 input, mutable_options()));
3186 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003187 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003188 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003189 if (input->ExpectTag(66)) goto parse_oneof_decl;
3190 break;
3191 }
3192
3193 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
3194 case 8: {
3195 if (tag == 66) {
3196 parse_oneof_decl:
Bo Yang5db21732015-05-21 14:28:59 -07003197 DO_(input->IncrementRecursionDepth());
3198 parse_loop_oneof_decl:
3199 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
jieluo@google.com4de8f552014-07-18 00:47:59 +00003200 input, add_oneof_decl()));
3201 } else {
3202 goto handle_unusual;
3203 }
Bo Yang5db21732015-05-21 14:28:59 -07003204 if (input->ExpectTag(66)) goto parse_loop_oneof_decl;
3205 if (input->ExpectTag(74)) goto parse_loop_reserved_range;
3206 input->UnsafeDecrementRecursionDepth();
3207 break;
3208 }
3209
3210 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3211 case 9: {
3212 if (tag == 74) {
3213 DO_(input->IncrementRecursionDepth());
3214 parse_loop_reserved_range:
3215 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
3216 input, add_reserved_range()));
3217 } else {
3218 goto handle_unusual;
3219 }
3220 if (input->ExpectTag(74)) goto parse_loop_reserved_range;
3221 input->UnsafeDecrementRecursionDepth();
3222 if (input->ExpectTag(82)) goto parse_reserved_name;
3223 break;
3224 }
3225
3226 // repeated string reserved_name = 10;
3227 case 10: {
3228 if (tag == 82) {
3229 parse_reserved_name:
3230 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3231 input, this->add_reserved_name()));
3232 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3233 this->reserved_name(this->reserved_name_size() - 1).data(),
3234 this->reserved_name(this->reserved_name_size() - 1).length(),
3235 ::google::protobuf::internal::WireFormat::PARSE,
3236 "google.protobuf.DescriptorProto.reserved_name");
3237 } else {
3238 goto handle_unusual;
3239 }
3240 if (input->ExpectTag(82)) goto parse_reserved_name;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003241 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00003242 break;
3243 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003244
temporal40ee5512008-07-10 02:12:20 +00003245 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003246 handle_unusual:
3247 if (tag == 0 ||
3248 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003249 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003250 goto success;
temporal40ee5512008-07-10 02:12:20 +00003251 }
3252 DO_(::google::protobuf::internal::WireFormat::SkipField(
3253 input, tag, mutable_unknown_fields()));
3254 break;
3255 }
3256 }
3257 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003258success:
3259 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00003260 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003261failure:
3262 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto)
3263 return false;
temporal40ee5512008-07-10 02:12:20 +00003264#undef DO_
3265}
3266
kenton@google.comd37d46d2009-04-25 02:53:47 +00003267void DescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00003268 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003269 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00003270 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003271 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003272 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00003273 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003274 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003275 "google.protobuf.DescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00003276 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00003277 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00003278 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003279
temporal40ee5512008-07-10 02:12:20 +00003280 // repeated .google.protobuf.FieldDescriptorProto field = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08003281 for (unsigned int i = 0, n = this->field_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003282 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003283 2, this->field(i), output);
temporal40ee5512008-07-10 02:12:20 +00003284 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003285
temporal40ee5512008-07-10 02:12:20 +00003286 // repeated .google.protobuf.DescriptorProto nested_type = 3;
Feng Xiaof157a562014-11-14 11:50:31 -08003287 for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003288 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003289 3, this->nested_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00003290 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003291
temporal40ee5512008-07-10 02:12:20 +00003292 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08003293 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003294 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003295 4, this->enum_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00003296 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003297
temporal40ee5512008-07-10 02:12:20 +00003298 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08003299 for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003300 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003301 5, this->extension_range(i), output);
temporal40ee5512008-07-10 02:12:20 +00003302 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003303
temporal40ee5512008-07-10 02:12:20 +00003304 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08003305 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003306 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003307 6, this->extension(i), output);
temporal40ee5512008-07-10 02:12:20 +00003308 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003309
temporal40ee5512008-07-10 02:12:20 +00003310 // optional .google.protobuf.MessageOptions options = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003311 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003312 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08003313 7, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00003314 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003315
jieluo@google.com4de8f552014-07-18 00:47:59 +00003316 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Feng Xiaof157a562014-11-14 11:50:31 -08003317 for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003318 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3319 8, this->oneof_decl(i), output);
3320 }
3321
Bo Yang5db21732015-05-21 14:28:59 -07003322 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3323 for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) {
3324 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3325 9, this->reserved_range(i), output);
3326 }
3327
3328 // repeated string reserved_name = 10;
3329 for (int i = 0; i < this->reserved_name_size(); i++) {
Jisi Liu4c663d82015-08-25 17:03:05 -07003330 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3331 this->reserved_name(i).data(), this->reserved_name(i).length(),
3332 ::google::protobuf::internal::WireFormat::SERIALIZE,
3333 "google.protobuf.DescriptorProto.reserved_name");
Bo Yang5db21732015-05-21 14:28:59 -07003334 ::google::protobuf::internal::WireFormatLite::WriteString(
3335 10, this->reserved_name(i), output);
3336 }
3337
Feng Xiao6ef984a2014-11-10 17:34:54 -08003338 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003339 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3340 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00003341 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003342 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003343}
3344
3345::google::protobuf::uint8* DescriptorProto::SerializeWithCachedSizesToArray(
3346 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003347 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003348 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003349 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003350 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00003351 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003352 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003353 "google.protobuf.DescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00003354 target =
3355 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3356 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003357 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003358
kenton@google.comd37d46d2009-04-25 02:53:47 +00003359 // repeated .google.protobuf.FieldDescriptorProto field = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08003360 for (unsigned int i = 0, n = this->field_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003361 target = ::google::protobuf::internal::WireFormatLite::
3362 WriteMessageNoVirtualToArray(
3363 2, this->field(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003364 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003365
kenton@google.comd37d46d2009-04-25 02:53:47 +00003366 // repeated .google.protobuf.DescriptorProto nested_type = 3;
Feng Xiaof157a562014-11-14 11:50:31 -08003367 for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003368 target = ::google::protobuf::internal::WireFormatLite::
3369 WriteMessageNoVirtualToArray(
3370 3, this->nested_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003371 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003372
kenton@google.comd37d46d2009-04-25 02:53:47 +00003373 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08003374 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003375 target = ::google::protobuf::internal::WireFormatLite::
3376 WriteMessageNoVirtualToArray(
3377 4, this->enum_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003378 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003379
kenton@google.comd37d46d2009-04-25 02:53:47 +00003380 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08003381 for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003382 target = ::google::protobuf::internal::WireFormatLite::
3383 WriteMessageNoVirtualToArray(
3384 5, this->extension_range(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003385 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003386
kenton@google.comd37d46d2009-04-25 02:53:47 +00003387 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08003388 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003389 target = ::google::protobuf::internal::WireFormatLite::
3390 WriteMessageNoVirtualToArray(
3391 6, this->extension(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003392 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003393
kenton@google.comd37d46d2009-04-25 02:53:47 +00003394 // optional .google.protobuf.MessageOptions options = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003395 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003396 target = ::google::protobuf::internal::WireFormatLite::
3397 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08003398 7, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003399 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003400
jieluo@google.com4de8f552014-07-18 00:47:59 +00003401 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Feng Xiaof157a562014-11-14 11:50:31 -08003402 for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003403 target = ::google::protobuf::internal::WireFormatLite::
3404 WriteMessageNoVirtualToArray(
3405 8, this->oneof_decl(i), target);
3406 }
3407
Bo Yang5db21732015-05-21 14:28:59 -07003408 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3409 for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) {
3410 target = ::google::protobuf::internal::WireFormatLite::
3411 WriteMessageNoVirtualToArray(
3412 9, this->reserved_range(i), target);
3413 }
3414
3415 // repeated string reserved_name = 10;
3416 for (int i = 0; i < this->reserved_name_size(); i++) {
3417 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3418 this->reserved_name(i).data(), this->reserved_name(i).length(),
3419 ::google::protobuf::internal::WireFormat::SERIALIZE,
3420 "google.protobuf.DescriptorProto.reserved_name");
3421 target = ::google::protobuf::internal::WireFormatLite::
3422 WriteStringToArray(10, this->reserved_name(i), target);
3423 }
3424
Feng Xiao6ef984a2014-11-10 17:34:54 -08003425 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003426 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3427 unknown_fields(), target);
3428 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003429 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003430 return target;
temporal40ee5512008-07-10 02:12:20 +00003431}
3432
3433int DescriptorProto::ByteSize() const {
3434 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003435
Austin Schuh307af622015-06-05 22:46:01 -07003436 if (_has_bits_[0 / 32] & 129u) {
temporal40ee5512008-07-10 02:12:20 +00003437 // optional string name = 1;
3438 if (has_name()) {
3439 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003440 ::google::protobuf::internal::WireFormatLite::StringSize(
3441 this->name());
temporal40ee5512008-07-10 02:12:20 +00003442 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003443
temporal40ee5512008-07-10 02:12:20 +00003444 // optional .google.protobuf.MessageOptions options = 7;
3445 if (has_options()) {
3446 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003447 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08003448 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00003449 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003450
temporal40ee5512008-07-10 02:12:20 +00003451 }
3452 // repeated .google.protobuf.FieldDescriptorProto field = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003453 total_size += 1 * this->field_size();
3454 for (int i = 0; i < this->field_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003455 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003456 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003457 this->field(i));
3458 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003459
temporal40ee5512008-07-10 02:12:20 +00003460 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003461 total_size += 1 * this->extension_size();
3462 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003463 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003464 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003465 this->extension(i));
3466 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003467
temporal40ee5512008-07-10 02:12:20 +00003468 // repeated .google.protobuf.DescriptorProto nested_type = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003469 total_size += 1 * this->nested_type_size();
3470 for (int i = 0; i < this->nested_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003471 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003472 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003473 this->nested_type(i));
3474 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003475
temporal40ee5512008-07-10 02:12:20 +00003476 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003477 total_size += 1 * this->enum_type_size();
3478 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003479 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003480 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003481 this->enum_type(i));
3482 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003483
temporal40ee5512008-07-10 02:12:20 +00003484 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003485 total_size += 1 * this->extension_range_size();
3486 for (int i = 0; i < this->extension_range_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003487 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003488 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003489 this->extension_range(i));
3490 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003491
jieluo@google.com4de8f552014-07-18 00:47:59 +00003492 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
3493 total_size += 1 * this->oneof_decl_size();
3494 for (int i = 0; i < this->oneof_decl_size(); i++) {
3495 total_size +=
3496 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
3497 this->oneof_decl(i));
3498 }
3499
Bo Yang5db21732015-05-21 14:28:59 -07003500 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3501 total_size += 1 * this->reserved_range_size();
3502 for (int i = 0; i < this->reserved_range_size(); i++) {
3503 total_size +=
3504 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
3505 this->reserved_range(i));
3506 }
3507
3508 // repeated string reserved_name = 10;
3509 total_size += 1 * this->reserved_name_size();
3510 for (int i = 0; i < this->reserved_name_size(); i++) {
3511 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
3512 this->reserved_name(i));
3513 }
3514
Feng Xiao6ef984a2014-11-10 17:34:54 -08003515 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00003516 total_size +=
3517 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3518 unknown_fields());
3519 }
kenton@google.comfccb1462009-12-18 02:11:36 +00003520 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00003521 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00003522 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00003523 return total_size;
3524}
3525
3526void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08003527 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07003528 const DescriptorProto* source =
3529 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto>(
3530 &from);
temporal40ee5512008-07-10 02:12:20 +00003531 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003532 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003533 } else {
3534 MergeFrom(*source);
3535 }
3536}
3537
3538void DescriptorProto::MergeFrom(const DescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08003539 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00003540 field_.MergeFrom(from.field_);
3541 extension_.MergeFrom(from.extension_);
3542 nested_type_.MergeFrom(from.nested_type_);
3543 enum_type_.MergeFrom(from.enum_type_);
3544 extension_range_.MergeFrom(from.extension_range_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00003545 oneof_decl_.MergeFrom(from.oneof_decl_);
Bo Yang5db21732015-05-21 14:28:59 -07003546 reserved_range_.MergeFrom(from.reserved_range_);
3547 reserved_name_.MergeFrom(from.reserved_name_);
temporal40ee5512008-07-10 02:12:20 +00003548 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003549 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08003550 set_has_name();
3551 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00003552 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003553 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003554 mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options());
3555 }
3556 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08003557 if (from._internal_metadata_.have_unknown_fields()) {
3558 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3559 }
temporal40ee5512008-07-10 02:12:20 +00003560}
3561
3562void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
3563 if (&from == this) return;
3564 Clear();
3565 MergeFrom(from);
3566}
3567
3568void DescriptorProto::CopyFrom(const DescriptorProto& from) {
3569 if (&from == this) return;
3570 Clear();
3571 MergeFrom(from);
3572}
3573
3574bool DescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003575
jieluo@google.com4de8f552014-07-18 00:47:59 +00003576 if (!::google::protobuf::internal::AllAreInitialized(this->field())) return false;
3577 if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false;
3578 if (!::google::protobuf::internal::AllAreInitialized(this->nested_type())) return false;
3579 if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003580 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08003581 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003582 }
temporal40ee5512008-07-10 02:12:20 +00003583 return true;
3584}
3585
kenton@google.comceb561d2009-06-25 19:05:36 +00003586void DescriptorProto::Swap(DescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08003587 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08003588 InternalSwap(other);
3589}
3590void DescriptorProto::InternalSwap(DescriptorProto* other) {
3591 name_.Swap(&other->name_);
3592 field_.UnsafeArenaSwap(&other->field_);
3593 extension_.UnsafeArenaSwap(&other->extension_);
3594 nested_type_.UnsafeArenaSwap(&other->nested_type_);
3595 enum_type_.UnsafeArenaSwap(&other->enum_type_);
3596 extension_range_.UnsafeArenaSwap(&other->extension_range_);
3597 oneof_decl_.UnsafeArenaSwap(&other->oneof_decl_);
3598 std::swap(options_, other->options_);
Bo Yang5db21732015-05-21 14:28:59 -07003599 reserved_range_.UnsafeArenaSwap(&other->reserved_range_);
3600 reserved_name_.UnsafeArenaSwap(&other->reserved_name_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08003601 std::swap(_has_bits_[0], other->_has_bits_[0]);
3602 _internal_metadata_.Swap(&other->_internal_metadata_);
3603 std::swap(_cached_size_, other->_cached_size_);
3604}
kenton@google.comceb561d2009-06-25 19:05:36 +00003605
kenton@google.com80b1d622009-07-29 01:13:20 +00003606::google::protobuf::Metadata DescriptorProto::GetMetadata() const {
3607 protobuf_AssignDescriptorsOnce();
3608 ::google::protobuf::Metadata metadata;
3609 metadata.descriptor = DescriptorProto_descriptor_;
3610 metadata.reflection = DescriptorProto_reflection_;
3611 return metadata;
temporal40ee5512008-07-10 02:12:20 +00003612}
3613
Jisi Liu885b6122015-02-28 14:51:22 -08003614#if PROTOBUF_INLINE_NOT_IN_HEADERS
3615// DescriptorProto_ExtensionRange
3616
3617// optional int32 start = 1;
Bo Yang5db21732015-05-21 14:28:59 -07003618bool DescriptorProto_ExtensionRange::has_start() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003619 return (_has_bits_[0] & 0x00000001u) != 0;
3620}
Bo Yang5db21732015-05-21 14:28:59 -07003621void DescriptorProto_ExtensionRange::set_has_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003622 _has_bits_[0] |= 0x00000001u;
3623}
Bo Yang5db21732015-05-21 14:28:59 -07003624void DescriptorProto_ExtensionRange::clear_has_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003625 _has_bits_[0] &= ~0x00000001u;
3626}
Bo Yang5db21732015-05-21 14:28:59 -07003627void DescriptorProto_ExtensionRange::clear_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003628 start_ = 0;
3629 clear_has_start();
3630}
3631 ::google::protobuf::int32 DescriptorProto_ExtensionRange::start() const {
3632 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start)
3633 return start_;
3634}
3635 void DescriptorProto_ExtensionRange::set_start(::google::protobuf::int32 value) {
3636 set_has_start();
3637 start_ = value;
3638 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start)
3639}
3640
3641// optional int32 end = 2;
Bo Yang5db21732015-05-21 14:28:59 -07003642bool DescriptorProto_ExtensionRange::has_end() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003643 return (_has_bits_[0] & 0x00000002u) != 0;
3644}
Bo Yang5db21732015-05-21 14:28:59 -07003645void DescriptorProto_ExtensionRange::set_has_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003646 _has_bits_[0] |= 0x00000002u;
3647}
Bo Yang5db21732015-05-21 14:28:59 -07003648void DescriptorProto_ExtensionRange::clear_has_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003649 _has_bits_[0] &= ~0x00000002u;
3650}
Bo Yang5db21732015-05-21 14:28:59 -07003651void DescriptorProto_ExtensionRange::clear_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003652 end_ = 0;
3653 clear_has_end();
3654}
3655 ::google::protobuf::int32 DescriptorProto_ExtensionRange::end() const {
3656 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end)
3657 return end_;
3658}
3659 void DescriptorProto_ExtensionRange::set_end(::google::protobuf::int32 value) {
3660 set_has_end();
3661 end_ = value;
3662 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end)
3663}
3664
3665// -------------------------------------------------------------------
3666
Bo Yang5db21732015-05-21 14:28:59 -07003667// DescriptorProto_ReservedRange
3668
3669// optional int32 start = 1;
3670bool DescriptorProto_ReservedRange::has_start() const {
3671 return (_has_bits_[0] & 0x00000001u) != 0;
3672}
3673void DescriptorProto_ReservedRange::set_has_start() {
3674 _has_bits_[0] |= 0x00000001u;
3675}
3676void DescriptorProto_ReservedRange::clear_has_start() {
3677 _has_bits_[0] &= ~0x00000001u;
3678}
3679void DescriptorProto_ReservedRange::clear_start() {
3680 start_ = 0;
3681 clear_has_start();
3682}
3683 ::google::protobuf::int32 DescriptorProto_ReservedRange::start() const {
3684 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start)
3685 return start_;
3686}
3687 void DescriptorProto_ReservedRange::set_start(::google::protobuf::int32 value) {
3688 set_has_start();
3689 start_ = value;
3690 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start)
3691}
3692
3693// optional int32 end = 2;
3694bool DescriptorProto_ReservedRange::has_end() const {
3695 return (_has_bits_[0] & 0x00000002u) != 0;
3696}
3697void DescriptorProto_ReservedRange::set_has_end() {
3698 _has_bits_[0] |= 0x00000002u;
3699}
3700void DescriptorProto_ReservedRange::clear_has_end() {
3701 _has_bits_[0] &= ~0x00000002u;
3702}
3703void DescriptorProto_ReservedRange::clear_end() {
3704 end_ = 0;
3705 clear_has_end();
3706}
3707 ::google::protobuf::int32 DescriptorProto_ReservedRange::end() const {
3708 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end)
3709 return end_;
3710}
3711 void DescriptorProto_ReservedRange::set_end(::google::protobuf::int32 value) {
3712 set_has_end();
3713 end_ = value;
3714 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end)
3715}
3716
3717// -------------------------------------------------------------------
3718
Jisi Liu885b6122015-02-28 14:51:22 -08003719// DescriptorProto
3720
3721// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07003722bool DescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003723 return (_has_bits_[0] & 0x00000001u) != 0;
3724}
Bo Yang5db21732015-05-21 14:28:59 -07003725void DescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003726 _has_bits_[0] |= 0x00000001u;
3727}
Bo Yang5db21732015-05-21 14:28:59 -07003728void DescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003729 _has_bits_[0] &= ~0x00000001u;
3730}
Bo Yang5db21732015-05-21 14:28:59 -07003731void DescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003732 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3733 clear_has_name();
3734}
3735 const ::std::string& DescriptorProto::name() const {
3736 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name)
3737 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3738}
3739 void DescriptorProto::set_name(const ::std::string& value) {
3740 set_has_name();
3741 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
3742 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name)
3743}
3744 void DescriptorProto::set_name(const char* value) {
3745 set_has_name();
3746 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
3747 // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name)
3748}
3749 void DescriptorProto::set_name(const char* value, size_t size) {
3750 set_has_name();
3751 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
3752 ::std::string(reinterpret_cast<const char*>(value), size));
3753 // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name)
3754}
3755 ::std::string* DescriptorProto::mutable_name() {
3756 set_has_name();
3757 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name)
3758 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3759}
3760 ::std::string* DescriptorProto::release_name() {
3761 clear_has_name();
3762 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3763}
3764 void DescriptorProto::set_allocated_name(::std::string* name) {
3765 if (name != NULL) {
3766 set_has_name();
3767 } else {
3768 clear_has_name();
3769 }
3770 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
3771 // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name)
3772}
3773
3774// repeated .google.protobuf.FieldDescriptorProto field = 2;
Bo Yang5db21732015-05-21 14:28:59 -07003775int DescriptorProto::field_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003776 return field_.size();
3777}
Bo Yang5db21732015-05-21 14:28:59 -07003778void DescriptorProto::clear_field() {
Jisi Liu885b6122015-02-28 14:51:22 -08003779 field_.Clear();
3780}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003781const ::google::protobuf::FieldDescriptorProto& DescriptorProto::field(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003782 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field)
3783 return field_.Get(index);
3784}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003785::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_field(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003786 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.field)
3787 return field_.Mutable(index);
3788}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003789::google::protobuf::FieldDescriptorProto* DescriptorProto::add_field() {
Jisi Liu885b6122015-02-28 14:51:22 -08003790 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field)
3791 return field_.Add();
3792}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003793::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003794DescriptorProto::mutable_field() {
3795 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field)
3796 return &field_;
3797}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003798const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
3799DescriptorProto::field() const {
3800 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field)
3801 return field_;
3802}
Jisi Liu885b6122015-02-28 14:51:22 -08003803
3804// repeated .google.protobuf.FieldDescriptorProto extension = 6;
Bo Yang5db21732015-05-21 14:28:59 -07003805int DescriptorProto::extension_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003806 return extension_.size();
3807}
Bo Yang5db21732015-05-21 14:28:59 -07003808void DescriptorProto::clear_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08003809 extension_.Clear();
3810}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003811const ::google::protobuf::FieldDescriptorProto& DescriptorProto::extension(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003812 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension)
3813 return extension_.Get(index);
3814}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003815::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003816 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension)
3817 return extension_.Mutable(index);
3818}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003819::google::protobuf::FieldDescriptorProto* DescriptorProto::add_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08003820 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension)
3821 return extension_.Add();
3822}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003823::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003824DescriptorProto::mutable_extension() {
3825 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension)
3826 return &extension_;
3827}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003828const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
3829DescriptorProto::extension() const {
3830 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension)
3831 return extension_;
3832}
Jisi Liu885b6122015-02-28 14:51:22 -08003833
3834// repeated .google.protobuf.DescriptorProto nested_type = 3;
Bo Yang5db21732015-05-21 14:28:59 -07003835int DescriptorProto::nested_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003836 return nested_type_.size();
3837}
Bo Yang5db21732015-05-21 14:28:59 -07003838void DescriptorProto::clear_nested_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003839 nested_type_.Clear();
3840}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003841const ::google::protobuf::DescriptorProto& DescriptorProto::nested_type(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003842 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.nested_type)
3843 return nested_type_.Get(index);
3844}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003845::google::protobuf::DescriptorProto* DescriptorProto::mutable_nested_type(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003846 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.nested_type)
3847 return nested_type_.Mutable(index);
3848}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003849::google::protobuf::DescriptorProto* DescriptorProto::add_nested_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003850 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.nested_type)
3851 return nested_type_.Add();
3852}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003853::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003854DescriptorProto::mutable_nested_type() {
3855 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type)
3856 return &nested_type_;
3857}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003858const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
3859DescriptorProto::nested_type() const {
3860 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type)
3861 return nested_type_;
3862}
Jisi Liu885b6122015-02-28 14:51:22 -08003863
3864// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Bo Yang5db21732015-05-21 14:28:59 -07003865int DescriptorProto::enum_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003866 return enum_type_.size();
3867}
Bo Yang5db21732015-05-21 14:28:59 -07003868void DescriptorProto::clear_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003869 enum_type_.Clear();
3870}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003871const ::google::protobuf::EnumDescriptorProto& DescriptorProto::enum_type(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003872 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.enum_type)
3873 return enum_type_.Get(index);
3874}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003875::google::protobuf::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003876 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.enum_type)
3877 return enum_type_.Mutable(index);
3878}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003879::google::protobuf::EnumDescriptorProto* DescriptorProto::add_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003880 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.enum_type)
3881 return enum_type_.Add();
3882}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003883::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003884DescriptorProto::mutable_enum_type() {
3885 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type)
3886 return &enum_type_;
3887}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003888const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
3889DescriptorProto::enum_type() const {
3890 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type)
3891 return enum_type_;
3892}
Jisi Liu885b6122015-02-28 14:51:22 -08003893
3894// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Bo Yang5db21732015-05-21 14:28:59 -07003895int DescriptorProto::extension_range_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003896 return extension_range_.size();
3897}
Bo Yang5db21732015-05-21 14:28:59 -07003898void DescriptorProto::clear_extension_range() {
Jisi Liu885b6122015-02-28 14:51:22 -08003899 extension_range_.Clear();
3900}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003901const ::google::protobuf::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003902 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension_range)
3903 return extension_range_.Get(index);
3904}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003905::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003906 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension_range)
3907 return extension_range_.Mutable(index);
3908}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003909::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() {
Jisi Liu885b6122015-02-28 14:51:22 -08003910 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension_range)
3911 return extension_range_.Add();
3912}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003913::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >*
Jisi Liu885b6122015-02-28 14:51:22 -08003914DescriptorProto::mutable_extension_range() {
3915 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range)
3916 return &extension_range_;
3917}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003918const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >&
3919DescriptorProto::extension_range() const {
3920 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range)
3921 return extension_range_;
3922}
Jisi Liu885b6122015-02-28 14:51:22 -08003923
3924// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Bo Yang5db21732015-05-21 14:28:59 -07003925int DescriptorProto::oneof_decl_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003926 return oneof_decl_.size();
3927}
Bo Yang5db21732015-05-21 14:28:59 -07003928void DescriptorProto::clear_oneof_decl() {
Jisi Liu885b6122015-02-28 14:51:22 -08003929 oneof_decl_.Clear();
3930}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003931const ::google::protobuf::OneofDescriptorProto& DescriptorProto::oneof_decl(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003932 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.oneof_decl)
3933 return oneof_decl_.Get(index);
3934}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003935::google::protobuf::OneofDescriptorProto* DescriptorProto::mutable_oneof_decl(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003936 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.oneof_decl)
3937 return oneof_decl_.Mutable(index);
3938}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003939::google::protobuf::OneofDescriptorProto* DescriptorProto::add_oneof_decl() {
Jisi Liu885b6122015-02-28 14:51:22 -08003940 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.oneof_decl)
3941 return oneof_decl_.Add();
3942}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003943::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003944DescriptorProto::mutable_oneof_decl() {
3945 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl)
3946 return &oneof_decl_;
3947}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003948const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >&
3949DescriptorProto::oneof_decl() const {
3950 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl)
3951 return oneof_decl_;
3952}
Jisi Liu885b6122015-02-28 14:51:22 -08003953
3954// optional .google.protobuf.MessageOptions options = 7;
Bo Yang5db21732015-05-21 14:28:59 -07003955bool DescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003956 return (_has_bits_[0] & 0x00000080u) != 0;
3957}
Bo Yang5db21732015-05-21 14:28:59 -07003958void DescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003959 _has_bits_[0] |= 0x00000080u;
3960}
Bo Yang5db21732015-05-21 14:28:59 -07003961void DescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003962 _has_bits_[0] &= ~0x00000080u;
3963}
Bo Yang5db21732015-05-21 14:28:59 -07003964void DescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003965 if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
3966 clear_has_options();
3967}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003968const ::google::protobuf::MessageOptions& DescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003969 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options)
3970 return options_ != NULL ? *options_ : *default_instance_->options_;
3971}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003972::google::protobuf::MessageOptions* DescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003973 set_has_options();
3974 if (options_ == NULL) {
3975 options_ = new ::google::protobuf::MessageOptions;
3976 }
3977 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options)
3978 return options_;
3979}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003980::google::protobuf::MessageOptions* DescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003981 clear_has_options();
3982 ::google::protobuf::MessageOptions* temp = options_;
3983 options_ = NULL;
3984 return temp;
3985}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003986void DescriptorProto::set_allocated_options(::google::protobuf::MessageOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08003987 delete options_;
3988 options_ = options;
3989 if (options) {
3990 set_has_options();
3991 } else {
3992 clear_has_options();
3993 }
3994 // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options)
3995}
3996
Bo Yang5db21732015-05-21 14:28:59 -07003997// repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3998int DescriptorProto::reserved_range_size() const {
3999 return reserved_range_.size();
4000}
4001void DescriptorProto::clear_reserved_range() {
4002 reserved_range_.Clear();
4003}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004004const ::google::protobuf::DescriptorProto_ReservedRange& DescriptorProto::reserved_range(int index) const {
Bo Yang5db21732015-05-21 14:28:59 -07004005 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_range)
4006 return reserved_range_.Get(index);
4007}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004008::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::mutable_reserved_range(int index) {
Bo Yang5db21732015-05-21 14:28:59 -07004009 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_range)
4010 return reserved_range_.Mutable(index);
4011}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004012::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() {
Bo Yang5db21732015-05-21 14:28:59 -07004013 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_range)
4014 return reserved_range_.Add();
4015}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004016::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >*
Bo Yang5db21732015-05-21 14:28:59 -07004017DescriptorProto::mutable_reserved_range() {
4018 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range)
4019 return &reserved_range_;
4020}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004021const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >&
4022DescriptorProto::reserved_range() const {
4023 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_range)
4024 return reserved_range_;
4025}
Bo Yang5db21732015-05-21 14:28:59 -07004026
4027// repeated string reserved_name = 10;
4028int DescriptorProto::reserved_name_size() const {
4029 return reserved_name_.size();
4030}
4031void DescriptorProto::clear_reserved_name() {
4032 reserved_name_.Clear();
4033}
4034 const ::std::string& DescriptorProto::reserved_name(int index) const {
4035 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name)
4036 return reserved_name_.Get(index);
4037}
4038 ::std::string* DescriptorProto::mutable_reserved_name(int index) {
4039 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name)
4040 return reserved_name_.Mutable(index);
4041}
4042 void DescriptorProto::set_reserved_name(int index, const ::std::string& value) {
4043 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
4044 reserved_name_.Mutable(index)->assign(value);
4045}
4046 void DescriptorProto::set_reserved_name(int index, const char* value) {
4047 reserved_name_.Mutable(index)->assign(value);
4048 // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name)
4049}
4050 void DescriptorProto::set_reserved_name(int index, const char* value, size_t size) {
4051 reserved_name_.Mutable(index)->assign(
4052 reinterpret_cast<const char*>(value), size);
4053 // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name)
4054}
4055 ::std::string* DescriptorProto::add_reserved_name() {
4056 return reserved_name_.Add();
4057}
4058 void DescriptorProto::add_reserved_name(const ::std::string& value) {
4059 reserved_name_.Add()->assign(value);
4060 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
4061}
4062 void DescriptorProto::add_reserved_name(const char* value) {
4063 reserved_name_.Add()->assign(value);
4064 // @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name)
4065}
4066 void DescriptorProto::add_reserved_name(const char* value, size_t size) {
4067 reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size);
4068 // @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name)
4069}
4070 const ::google::protobuf::RepeatedPtrField< ::std::string>&
4071DescriptorProto::reserved_name() const {
4072 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name)
4073 return reserved_name_;
4074}
4075 ::google::protobuf::RepeatedPtrField< ::std::string>*
4076DescriptorProto::mutable_reserved_name() {
4077 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name)
4078 return &reserved_name_;
4079}
4080
Jisi Liu885b6122015-02-28 14:51:22 -08004081#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00004082
4083// ===================================================================
4084
4085const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004086 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004087 return FieldDescriptorProto_Type_descriptor_;
4088}
4089bool FieldDescriptorProto_Type_IsValid(int value) {
4090 switch(value) {
4091 case 1:
4092 case 2:
4093 case 3:
4094 case 4:
4095 case 5:
4096 case 6:
4097 case 7:
4098 case 8:
4099 case 9:
4100 case 10:
4101 case 11:
4102 case 12:
4103 case 13:
4104 case 14:
4105 case 15:
4106 case 16:
4107 case 17:
4108 case 18:
4109 return true;
4110 default:
4111 return false;
4112 }
4113}
4114
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004115#if !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00004116const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE;
4117const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT;
4118const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64;
4119const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64;
4120const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32;
4121const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64;
4122const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32;
4123const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL;
4124const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING;
4125const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP;
4126const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE;
4127const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES;
4128const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32;
4129const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM;
4130const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32;
4131const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64;
4132const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32;
4133const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64;
4134const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN;
4135const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00004136const int FieldDescriptorProto::Type_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004137#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00004138const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004139 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004140 return FieldDescriptorProto_Label_descriptor_;
4141}
4142bool FieldDescriptorProto_Label_IsValid(int value) {
4143 switch(value) {
4144 case 1:
4145 case 2:
4146 case 3:
4147 return true;
4148 default:
4149 return false;
4150 }
4151}
4152
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004153#if !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00004154const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL;
4155const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED;
4156const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED;
4157const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN;
4158const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00004159const int FieldDescriptorProto::Label_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004160#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
4161#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004162const int FieldDescriptorProto::kNameFieldNumber;
4163const int FieldDescriptorProto::kNumberFieldNumber;
4164const int FieldDescriptorProto::kLabelFieldNumber;
4165const int FieldDescriptorProto::kTypeFieldNumber;
4166const int FieldDescriptorProto::kTypeNameFieldNumber;
4167const int FieldDescriptorProto::kExtendeeFieldNumber;
4168const int FieldDescriptorProto::kDefaultValueFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004169const int FieldDescriptorProto::kOneofIndexFieldNumber;
Jisi Liu46e8ff62015-10-05 11:59:43 -07004170const int FieldDescriptorProto::kJsonNameFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004171const int FieldDescriptorProto::kOptionsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004172#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00004173
kenton@google.com573989f2009-10-30 22:02:17 +00004174FieldDescriptorProto::FieldDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07004175 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004176 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00004177 // @@protoc_insertion_point(constructor:google.protobuf.FieldDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00004178}
4179
kenton@google.com80b1d622009-07-29 01:13:20 +00004180void FieldDescriptorProto::InitAsDefaultInstance() {
4181 options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00004182}
4183
kenton@google.com573989f2009-10-30 22:02:17 +00004184FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08004185 : ::google::protobuf::Message(),
4186 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004187 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00004188 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00004189 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004190}
4191
kenton@google.comd37d46d2009-04-25 02:53:47 +00004192void FieldDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004193 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00004194 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004195 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00004196 number_ = 0;
4197 label_ = 1;
4198 type_ = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004199 type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4200 extendee_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4201 default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00004202 oneof_index_ = 0;
Jisi Liu46e8ff62015-10-05 11:59:43 -07004203 json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00004204 options_ = NULL;
4205 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4206}
4207
temporal40ee5512008-07-10 02:12:20 +00004208FieldDescriptorProto::~FieldDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004209 // @@protoc_insertion_point(destructor:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004210 SharedDtor();
4211}
4212
4213void FieldDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08004214 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4215 type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4216 extendee_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4217 default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jisi Liu46e8ff62015-10-05 11:59:43 -07004218 json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00004219 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004220 delete options_;
4221 }
4222}
4223
kenton@google.comfccb1462009-12-18 02:11:36 +00004224void FieldDescriptorProto::SetCachedSize(int size) const {
4225 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4226 _cached_size_ = size;
4227 GOOGLE_SAFE_CONCURRENT_WRITES_END();
4228}
temporal40ee5512008-07-10 02:12:20 +00004229const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004230 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004231 return FieldDescriptorProto_descriptor_;
4232}
4233
kenton@google.com24bf56f2008-09-24 20:31:01 +00004234const FieldDescriptorProto& FieldDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00004235 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
4236 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00004237}
4238
4239FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL;
4240
Feng Xiao6ef984a2014-11-10 17:34:54 -08004241FieldDescriptorProto* FieldDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08004242 FieldDescriptorProto* n = new FieldDescriptorProto;
4243 if (arena != NULL) {
4244 arena->Own(n);
4245 }
4246 return n;
temporal40ee5512008-07-10 02:12:20 +00004247}
4248
4249void FieldDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07004250 if (_has_bits_[0 / 32] & 255u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004251 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004252 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004253 }
4254 number_ = 0;
4255 label_ = 1;
4256 type_ = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004257 if (has_type_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004258 type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004259 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004260 if (has_extendee()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004261 extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004262 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004263 if (has_default_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004264 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004265 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004266 oneof_index_ = 0;
4267 }
Jisi Liu46e8ff62015-10-05 11:59:43 -07004268 if (_has_bits_[8 / 32] & 768u) {
4269 if (has_json_name()) {
4270 json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4271 }
4272 if (has_options()) {
4273 if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
4274 }
temporal40ee5512008-07-10 02:12:20 +00004275 }
4276 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08004277 if (_internal_metadata_.have_unknown_fields()) {
4278 mutable_unknown_fields()->Clear();
4279 }
temporal40ee5512008-07-10 02:12:20 +00004280}
4281
4282bool FieldDescriptorProto::MergePartialFromCodedStream(
4283 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004284#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00004285 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004286 // @@protoc_insertion_point(parse_start:google.protobuf.FieldDescriptorProto)
4287 for (;;) {
4288 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
4289 tag = p.first;
4290 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00004291 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00004292 // optional string name = 1;
4293 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004294 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004295 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4296 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004297 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004298 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004299 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004300 "google.protobuf.FieldDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00004301 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004302 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004303 }
temporal40ee5512008-07-10 02:12:20 +00004304 if (input->ExpectTag(18)) goto parse_extendee;
4305 break;
4306 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004307
temporal40ee5512008-07-10 02:12:20 +00004308 // optional string extendee = 2;
4309 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004310 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004311 parse_extendee:
4312 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4313 input, this->mutable_extendee()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004314 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004315 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004316 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004317 "google.protobuf.FieldDescriptorProto.extendee");
kenton@google.comfccb1462009-12-18 02:11:36 +00004318 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004319 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004320 }
temporal40ee5512008-07-10 02:12:20 +00004321 if (input->ExpectTag(24)) goto parse_number;
4322 break;
4323 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004324
temporal40ee5512008-07-10 02:12:20 +00004325 // optional int32 number = 3;
4326 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004327 if (tag == 24) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004328 parse_number:
4329 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4330 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
4331 input, &number_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004332 set_has_number();
kenton@google.comfccb1462009-12-18 02:11:36 +00004333 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004334 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004335 }
temporal40ee5512008-07-10 02:12:20 +00004336 if (input->ExpectTag(32)) goto parse_label;
4337 break;
4338 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004339
temporal40ee5512008-07-10 02:12:20 +00004340 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
4341 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004342 if (tag == 32) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004343 parse_label:
4344 int value;
4345 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4346 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
4347 input, &value)));
4348 if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) {
4349 set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value));
4350 } else {
4351 mutable_unknown_fields()->AddVarint(4, value);
4352 }
temporal40ee5512008-07-10 02:12:20 +00004353 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004354 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004355 }
4356 if (input->ExpectTag(40)) goto parse_type;
4357 break;
4358 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004359
temporal40ee5512008-07-10 02:12:20 +00004360 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
4361 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004362 if (tag == 40) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004363 parse_type:
4364 int value;
4365 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4366 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
4367 input, &value)));
4368 if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) {
4369 set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value));
4370 } else {
4371 mutable_unknown_fields()->AddVarint(5, value);
4372 }
temporal40ee5512008-07-10 02:12:20 +00004373 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004374 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004375 }
4376 if (input->ExpectTag(50)) goto parse_type_name;
4377 break;
4378 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004379
temporal40ee5512008-07-10 02:12:20 +00004380 // optional string type_name = 6;
4381 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004382 if (tag == 50) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004383 parse_type_name:
4384 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4385 input, this->mutable_type_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004386 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004387 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004388 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004389 "google.protobuf.FieldDescriptorProto.type_name");
kenton@google.comfccb1462009-12-18 02:11:36 +00004390 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004391 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004392 }
temporal40ee5512008-07-10 02:12:20 +00004393 if (input->ExpectTag(58)) goto parse_default_value;
4394 break;
4395 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004396
temporal40ee5512008-07-10 02:12:20 +00004397 // optional string default_value = 7;
4398 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004399 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004400 parse_default_value:
4401 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4402 input, this->mutable_default_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004403 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004404 this->default_value().data(), this->default_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004405 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004406 "google.protobuf.FieldDescriptorProto.default_value");
kenton@google.comfccb1462009-12-18 02:11:36 +00004407 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004408 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004409 }
temporal40ee5512008-07-10 02:12:20 +00004410 if (input->ExpectTag(66)) goto parse_options;
4411 break;
4412 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004413
temporal40ee5512008-07-10 02:12:20 +00004414 // optional .google.protobuf.FieldOptions options = 8;
4415 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004416 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004417 parse_options:
4418 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
4419 input, mutable_options()));
4420 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004421 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004422 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004423 if (input->ExpectTag(72)) goto parse_oneof_index;
4424 break;
4425 }
4426
4427 // optional int32 oneof_index = 9;
4428 case 9: {
4429 if (tag == 72) {
4430 parse_oneof_index:
4431 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4432 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
4433 input, &oneof_index_)));
4434 set_has_oneof_index();
4435 } else {
4436 goto handle_unusual;
4437 }
Jisi Liu46e8ff62015-10-05 11:59:43 -07004438 if (input->ExpectTag(82)) goto parse_json_name;
4439 break;
4440 }
4441
4442 // optional string json_name = 10;
4443 case 10: {
4444 if (tag == 82) {
4445 parse_json_name:
4446 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4447 input, this->mutable_json_name()));
4448 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4449 this->json_name().data(), this->json_name().length(),
4450 ::google::protobuf::internal::WireFormat::PARSE,
4451 "google.protobuf.FieldDescriptorProto.json_name");
4452 } else {
4453 goto handle_unusual;
4454 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004455 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00004456 break;
4457 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004458
temporal40ee5512008-07-10 02:12:20 +00004459 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004460 handle_unusual:
4461 if (tag == 0 ||
4462 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004463 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004464 goto success;
temporal40ee5512008-07-10 02:12:20 +00004465 }
4466 DO_(::google::protobuf::internal::WireFormat::SkipField(
4467 input, tag, mutable_unknown_fields()));
4468 break;
4469 }
4470 }
4471 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004472success:
4473 // @@protoc_insertion_point(parse_success:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004474 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004475failure:
4476 // @@protoc_insertion_point(parse_failure:google.protobuf.FieldDescriptorProto)
4477 return false;
temporal40ee5512008-07-10 02:12:20 +00004478#undef DO_
4479}
4480
kenton@google.comd37d46d2009-04-25 02:53:47 +00004481void FieldDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00004482 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004483 // @@protoc_insertion_point(serialize_start:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004484 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004485 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004486 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004487 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004488 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004489 "google.protobuf.FieldDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004490 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004491 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00004492 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004493
temporal40ee5512008-07-10 02:12:20 +00004494 // optional string extendee = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004495 if (has_extendee()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004496 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004497 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004498 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004499 "google.protobuf.FieldDescriptorProto.extendee");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004500 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004501 2, this->extendee(), output);
temporal40ee5512008-07-10 02:12:20 +00004502 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004503
temporal40ee5512008-07-10 02:12:20 +00004504 // optional int32 number = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004505 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004506 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output);
temporal40ee5512008-07-10 02:12:20 +00004507 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004508
temporal40ee5512008-07-10 02:12:20 +00004509 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004510 if (has_label()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004511 ::google::protobuf::internal::WireFormatLite::WriteEnum(
4512 4, this->label(), output);
temporal40ee5512008-07-10 02:12:20 +00004513 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004514
temporal40ee5512008-07-10 02:12:20 +00004515 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004516 if (has_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004517 ::google::protobuf::internal::WireFormatLite::WriteEnum(
4518 5, this->type(), output);
temporal40ee5512008-07-10 02:12:20 +00004519 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004520
temporal40ee5512008-07-10 02:12:20 +00004521 // optional string type_name = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004522 if (has_type_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004523 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004524 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004525 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004526 "google.protobuf.FieldDescriptorProto.type_name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004527 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004528 6, this->type_name(), output);
temporal40ee5512008-07-10 02:12:20 +00004529 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004530
temporal40ee5512008-07-10 02:12:20 +00004531 // optional string default_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004532 if (has_default_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004533 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004534 this->default_value().data(), this->default_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004535 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004536 "google.protobuf.FieldDescriptorProto.default_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004537 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004538 7, this->default_value(), output);
temporal40ee5512008-07-10 02:12:20 +00004539 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004540
temporal40ee5512008-07-10 02:12:20 +00004541 // optional .google.protobuf.FieldOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004542 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004543 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08004544 8, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00004545 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004546
jieluo@google.com4de8f552014-07-18 00:47:59 +00004547 // optional int32 oneof_index = 9;
4548 if (has_oneof_index()) {
4549 ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->oneof_index(), output);
4550 }
4551
Jisi Liu46e8ff62015-10-05 11:59:43 -07004552 // optional string json_name = 10;
4553 if (has_json_name()) {
4554 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4555 this->json_name().data(), this->json_name().length(),
4556 ::google::protobuf::internal::WireFormat::SERIALIZE,
4557 "google.protobuf.FieldDescriptorProto.json_name");
4558 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4559 10, this->json_name(), output);
4560 }
4561
Feng Xiao6ef984a2014-11-10 17:34:54 -08004562 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004563 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4564 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00004565 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004566 // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004567}
4568
4569::google::protobuf::uint8* FieldDescriptorProto::SerializeWithCachedSizesToArray(
4570 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004571 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004572 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004573 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004574 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004575 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004576 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004577 "google.protobuf.FieldDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00004578 target =
4579 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4580 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004581 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004582
kenton@google.comd37d46d2009-04-25 02:53:47 +00004583 // optional string extendee = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004584 if (has_extendee()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004585 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004586 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004587 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004588 "google.protobuf.FieldDescriptorProto.extendee");
kenton@google.com80b1d622009-07-29 01:13:20 +00004589 target =
4590 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4591 2, this->extendee(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004592 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004593
kenton@google.comd37d46d2009-04-25 02:53:47 +00004594 // optional int32 number = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004595 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004596 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004597 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004598
kenton@google.comd37d46d2009-04-25 02:53:47 +00004599 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004600 if (has_label()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004601 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4602 4, this->label(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004603 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004604
kenton@google.comd37d46d2009-04-25 02:53:47 +00004605 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004606 if (has_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004607 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4608 5, this->type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004609 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004610
kenton@google.comd37d46d2009-04-25 02:53:47 +00004611 // optional string type_name = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004612 if (has_type_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004613 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004614 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004615 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004616 "google.protobuf.FieldDescriptorProto.type_name");
kenton@google.com80b1d622009-07-29 01:13:20 +00004617 target =
4618 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4619 6, this->type_name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004620 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004621
kenton@google.comd37d46d2009-04-25 02:53:47 +00004622 // optional string default_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004623 if (has_default_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004624 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004625 this->default_value().data(), this->default_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004626 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004627 "google.protobuf.FieldDescriptorProto.default_value");
kenton@google.com80b1d622009-07-29 01:13:20 +00004628 target =
4629 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4630 7, this->default_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004631 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004632
kenton@google.comd37d46d2009-04-25 02:53:47 +00004633 // optional .google.protobuf.FieldOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004634 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004635 target = ::google::protobuf::internal::WireFormatLite::
4636 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08004637 8, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004638 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004639
jieluo@google.com4de8f552014-07-18 00:47:59 +00004640 // optional int32 oneof_index = 9;
4641 if (has_oneof_index()) {
4642 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->oneof_index(), target);
4643 }
4644
Jisi Liu46e8ff62015-10-05 11:59:43 -07004645 // optional string json_name = 10;
4646 if (has_json_name()) {
4647 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4648 this->json_name().data(), this->json_name().length(),
4649 ::google::protobuf::internal::WireFormat::SERIALIZE,
4650 "google.protobuf.FieldDescriptorProto.json_name");
4651 target =
4652 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4653 10, this->json_name(), target);
4654 }
4655
Feng Xiao6ef984a2014-11-10 17:34:54 -08004656 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004657 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
4658 unknown_fields(), target);
4659 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004660 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004661 return target;
temporal40ee5512008-07-10 02:12:20 +00004662}
4663
4664int FieldDescriptorProto::ByteSize() const {
4665 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004666
Austin Schuh307af622015-06-05 22:46:01 -07004667 if (_has_bits_[0 / 32] & 255u) {
temporal40ee5512008-07-10 02:12:20 +00004668 // optional string name = 1;
4669 if (has_name()) {
4670 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004671 ::google::protobuf::internal::WireFormatLite::StringSize(
4672 this->name());
temporal40ee5512008-07-10 02:12:20 +00004673 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004674
temporal40ee5512008-07-10 02:12:20 +00004675 // optional int32 number = 3;
4676 if (has_number()) {
4677 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004678 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00004679 this->number());
4680 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004681
temporal40ee5512008-07-10 02:12:20 +00004682 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
4683 if (has_label()) {
4684 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004685 ::google::protobuf::internal::WireFormatLite::EnumSize(this->label());
temporal40ee5512008-07-10 02:12:20 +00004686 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004687
temporal40ee5512008-07-10 02:12:20 +00004688 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
4689 if (has_type()) {
4690 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004691 ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
temporal40ee5512008-07-10 02:12:20 +00004692 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004693
temporal40ee5512008-07-10 02:12:20 +00004694 // optional string type_name = 6;
4695 if (has_type_name()) {
4696 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004697 ::google::protobuf::internal::WireFormatLite::StringSize(
4698 this->type_name());
temporal40ee5512008-07-10 02:12:20 +00004699 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004700
temporal40ee5512008-07-10 02:12:20 +00004701 // optional string extendee = 2;
4702 if (has_extendee()) {
4703 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004704 ::google::protobuf::internal::WireFormatLite::StringSize(
4705 this->extendee());
temporal40ee5512008-07-10 02:12:20 +00004706 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004707
temporal40ee5512008-07-10 02:12:20 +00004708 // optional string default_value = 7;
4709 if (has_default_value()) {
4710 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004711 ::google::protobuf::internal::WireFormatLite::StringSize(
4712 this->default_value());
temporal40ee5512008-07-10 02:12:20 +00004713 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004714
jieluo@google.com4de8f552014-07-18 00:47:59 +00004715 // optional int32 oneof_index = 9;
4716 if (has_oneof_index()) {
4717 total_size += 1 +
4718 ::google::protobuf::internal::WireFormatLite::Int32Size(
4719 this->oneof_index());
4720 }
4721
4722 }
Jisi Liu46e8ff62015-10-05 11:59:43 -07004723 if (_has_bits_[8 / 32] & 768u) {
4724 // optional string json_name = 10;
4725 if (has_json_name()) {
4726 total_size += 1 +
4727 ::google::protobuf::internal::WireFormatLite::StringSize(
4728 this->json_name());
4729 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004730
Jisi Liu46e8ff62015-10-05 11:59:43 -07004731 // optional .google.protobuf.FieldOptions options = 8;
4732 if (has_options()) {
4733 total_size += 1 +
4734 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
4735 *this->options_);
4736 }
4737
4738 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004739 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00004740 total_size +=
4741 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4742 unknown_fields());
4743 }
kenton@google.comfccb1462009-12-18 02:11:36 +00004744 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00004745 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00004746 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00004747 return total_size;
4748}
4749
4750void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08004751 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07004752 const FieldDescriptorProto* source =
4753 ::google::protobuf::internal::DynamicCastToGenerated<const FieldDescriptorProto>(
4754 &from);
temporal40ee5512008-07-10 02:12:20 +00004755 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00004756 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00004757 } else {
4758 MergeFrom(*source);
4759 }
4760}
4761
4762void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08004763 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00004764 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004765 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004766 set_has_name();
4767 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00004768 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004769 if (from.has_number()) {
temporal40ee5512008-07-10 02:12:20 +00004770 set_number(from.number());
4771 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004772 if (from.has_label()) {
temporal40ee5512008-07-10 02:12:20 +00004773 set_label(from.label());
4774 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004775 if (from.has_type()) {
temporal40ee5512008-07-10 02:12:20 +00004776 set_type(from.type());
4777 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004778 if (from.has_type_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004779 set_has_type_name();
4780 type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_name_);
temporal40ee5512008-07-10 02:12:20 +00004781 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004782 if (from.has_extendee()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004783 set_has_extendee();
4784 extendee_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extendee_);
temporal40ee5512008-07-10 02:12:20 +00004785 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004786 if (from.has_default_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004787 set_has_default_value();
4788 default_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value_);
temporal40ee5512008-07-10 02:12:20 +00004789 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004790 if (from.has_oneof_index()) {
4791 set_oneof_index(from.oneof_index());
4792 }
4793 }
4794 if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
Jisi Liu46e8ff62015-10-05 11:59:43 -07004795 if (from.has_json_name()) {
4796 set_has_json_name();
4797 json_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.json_name_);
4798 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004799 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00004800 mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options());
4801 }
4802 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004803 if (from._internal_metadata_.have_unknown_fields()) {
4804 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4805 }
temporal40ee5512008-07-10 02:12:20 +00004806}
4807
4808void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
4809 if (&from == this) return;
4810 Clear();
4811 MergeFrom(from);
4812}
4813
4814void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
4815 if (&from == this) return;
4816 Clear();
4817 MergeFrom(from);
4818}
4819
kenton@google.comceb561d2009-06-25 19:05:36 +00004820bool FieldDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004821
kenton@google.comceb561d2009-06-25 19:05:36 +00004822 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004823 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00004824 }
4825 return true;
4826}
4827
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004828void FieldDescriptorProto::Swap(FieldDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08004829 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004830 InternalSwap(other);
4831}
4832void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) {
4833 name_.Swap(&other->name_);
4834 std::swap(number_, other->number_);
4835 std::swap(label_, other->label_);
4836 std::swap(type_, other->type_);
4837 type_name_.Swap(&other->type_name_);
4838 extendee_.Swap(&other->extendee_);
4839 default_value_.Swap(&other->default_value_);
4840 std::swap(oneof_index_, other->oneof_index_);
Jisi Liu46e8ff62015-10-05 11:59:43 -07004841 json_name_.Swap(&other->json_name_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08004842 std::swap(options_, other->options_);
4843 std::swap(_has_bits_[0], other->_has_bits_[0]);
4844 _internal_metadata_.Swap(&other->_internal_metadata_);
4845 std::swap(_cached_size_, other->_cached_size_);
4846}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004847
kenton@google.com80b1d622009-07-29 01:13:20 +00004848::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const {
4849 protobuf_AssignDescriptorsOnce();
4850 ::google::protobuf::Metadata metadata;
4851 metadata.descriptor = FieldDescriptorProto_descriptor_;
4852 metadata.reflection = FieldDescriptorProto_reflection_;
4853 return metadata;
temporal40ee5512008-07-10 02:12:20 +00004854}
4855
Jisi Liu885b6122015-02-28 14:51:22 -08004856#if PROTOBUF_INLINE_NOT_IN_HEADERS
4857// FieldDescriptorProto
4858
4859// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07004860bool FieldDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004861 return (_has_bits_[0] & 0x00000001u) != 0;
4862}
Bo Yang5db21732015-05-21 14:28:59 -07004863void FieldDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004864 _has_bits_[0] |= 0x00000001u;
4865}
Bo Yang5db21732015-05-21 14:28:59 -07004866void FieldDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004867 _has_bits_[0] &= ~0x00000001u;
4868}
Bo Yang5db21732015-05-21 14:28:59 -07004869void FieldDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004870 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4871 clear_has_name();
4872}
4873 const ::std::string& FieldDescriptorProto::name() const {
4874 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name)
4875 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4876}
4877 void FieldDescriptorProto::set_name(const ::std::string& value) {
4878 set_has_name();
4879 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
4880 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name)
4881}
4882 void FieldDescriptorProto::set_name(const char* value) {
4883 set_has_name();
4884 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
4885 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name)
4886}
4887 void FieldDescriptorProto::set_name(const char* value, size_t size) {
4888 set_has_name();
4889 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
4890 ::std::string(reinterpret_cast<const char*>(value), size));
4891 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name)
4892}
4893 ::std::string* FieldDescriptorProto::mutable_name() {
4894 set_has_name();
4895 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name)
4896 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4897}
4898 ::std::string* FieldDescriptorProto::release_name() {
4899 clear_has_name();
4900 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4901}
4902 void FieldDescriptorProto::set_allocated_name(::std::string* name) {
4903 if (name != NULL) {
4904 set_has_name();
4905 } else {
4906 clear_has_name();
4907 }
4908 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
4909 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name)
4910}
4911
4912// optional int32 number = 3;
Bo Yang5db21732015-05-21 14:28:59 -07004913bool FieldDescriptorProto::has_number() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004914 return (_has_bits_[0] & 0x00000002u) != 0;
4915}
Bo Yang5db21732015-05-21 14:28:59 -07004916void FieldDescriptorProto::set_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004917 _has_bits_[0] |= 0x00000002u;
4918}
Bo Yang5db21732015-05-21 14:28:59 -07004919void FieldDescriptorProto::clear_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004920 _has_bits_[0] &= ~0x00000002u;
4921}
Bo Yang5db21732015-05-21 14:28:59 -07004922void FieldDescriptorProto::clear_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004923 number_ = 0;
4924 clear_has_number();
4925}
4926 ::google::protobuf::int32 FieldDescriptorProto::number() const {
4927 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number)
4928 return number_;
4929}
4930 void FieldDescriptorProto::set_number(::google::protobuf::int32 value) {
4931 set_has_number();
4932 number_ = value;
4933 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number)
4934}
4935
4936// optional .google.protobuf.FieldDescriptorProto.Label label = 4;
Bo Yang5db21732015-05-21 14:28:59 -07004937bool FieldDescriptorProto::has_label() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004938 return (_has_bits_[0] & 0x00000004u) != 0;
4939}
Bo Yang5db21732015-05-21 14:28:59 -07004940void FieldDescriptorProto::set_has_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004941 _has_bits_[0] |= 0x00000004u;
4942}
Bo Yang5db21732015-05-21 14:28:59 -07004943void FieldDescriptorProto::clear_has_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004944 _has_bits_[0] &= ~0x00000004u;
4945}
Bo Yang5db21732015-05-21 14:28:59 -07004946void FieldDescriptorProto::clear_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004947 label_ = 1;
4948 clear_has_label();
4949}
4950 ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const {
4951 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label)
4952 return static_cast< ::google::protobuf::FieldDescriptorProto_Label >(label_);
4953}
4954 void FieldDescriptorProto::set_label(::google::protobuf::FieldDescriptorProto_Label value) {
4955 assert(::google::protobuf::FieldDescriptorProto_Label_IsValid(value));
4956 set_has_label();
4957 label_ = value;
4958 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.label)
4959}
4960
4961// optional .google.protobuf.FieldDescriptorProto.Type type = 5;
Bo Yang5db21732015-05-21 14:28:59 -07004962bool FieldDescriptorProto::has_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004963 return (_has_bits_[0] & 0x00000008u) != 0;
4964}
Bo Yang5db21732015-05-21 14:28:59 -07004965void FieldDescriptorProto::set_has_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004966 _has_bits_[0] |= 0x00000008u;
4967}
Bo Yang5db21732015-05-21 14:28:59 -07004968void FieldDescriptorProto::clear_has_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004969 _has_bits_[0] &= ~0x00000008u;
4970}
Bo Yang5db21732015-05-21 14:28:59 -07004971void FieldDescriptorProto::clear_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004972 type_ = 1;
4973 clear_has_type();
4974}
4975 ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const {
4976 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type)
4977 return static_cast< ::google::protobuf::FieldDescriptorProto_Type >(type_);
4978}
4979 void FieldDescriptorProto::set_type(::google::protobuf::FieldDescriptorProto_Type value) {
4980 assert(::google::protobuf::FieldDescriptorProto_Type_IsValid(value));
4981 set_has_type();
4982 type_ = value;
4983 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type)
4984}
4985
4986// optional string type_name = 6;
Bo Yang5db21732015-05-21 14:28:59 -07004987bool FieldDescriptorProto::has_type_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004988 return (_has_bits_[0] & 0x00000010u) != 0;
4989}
Bo Yang5db21732015-05-21 14:28:59 -07004990void FieldDescriptorProto::set_has_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004991 _has_bits_[0] |= 0x00000010u;
4992}
Bo Yang5db21732015-05-21 14:28:59 -07004993void FieldDescriptorProto::clear_has_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004994 _has_bits_[0] &= ~0x00000010u;
4995}
Bo Yang5db21732015-05-21 14:28:59 -07004996void FieldDescriptorProto::clear_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004997 type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4998 clear_has_type_name();
4999}
5000 const ::std::string& FieldDescriptorProto::type_name() const {
5001 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name)
5002 return type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5003}
5004 void FieldDescriptorProto::set_type_name(const ::std::string& value) {
5005 set_has_type_name();
5006 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5007 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name)
5008}
5009 void FieldDescriptorProto::set_type_name(const char* value) {
5010 set_has_type_name();
5011 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5012 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name)
5013}
5014 void FieldDescriptorProto::set_type_name(const char* value, size_t size) {
5015 set_has_type_name();
5016 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5017 ::std::string(reinterpret_cast<const char*>(value), size));
5018 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name)
5019}
5020 ::std::string* FieldDescriptorProto::mutable_type_name() {
5021 set_has_type_name();
5022 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name)
5023 return type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5024}
5025 ::std::string* FieldDescriptorProto::release_type_name() {
5026 clear_has_type_name();
5027 return type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5028}
5029 void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) {
5030 if (type_name != NULL) {
5031 set_has_type_name();
5032 } else {
5033 clear_has_type_name();
5034 }
5035 type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_name);
5036 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name)
5037}
5038
5039// optional string extendee = 2;
Bo Yang5db21732015-05-21 14:28:59 -07005040bool FieldDescriptorProto::has_extendee() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005041 return (_has_bits_[0] & 0x00000020u) != 0;
5042}
Bo Yang5db21732015-05-21 14:28:59 -07005043void FieldDescriptorProto::set_has_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08005044 _has_bits_[0] |= 0x00000020u;
5045}
Bo Yang5db21732015-05-21 14:28:59 -07005046void FieldDescriptorProto::clear_has_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08005047 _has_bits_[0] &= ~0x00000020u;
5048}
Bo Yang5db21732015-05-21 14:28:59 -07005049void FieldDescriptorProto::clear_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08005050 extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5051 clear_has_extendee();
5052}
5053 const ::std::string& FieldDescriptorProto::extendee() const {
5054 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee)
5055 return extendee_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5056}
5057 void FieldDescriptorProto::set_extendee(const ::std::string& value) {
5058 set_has_extendee();
5059 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5060 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee)
5061}
5062 void FieldDescriptorProto::set_extendee(const char* value) {
5063 set_has_extendee();
5064 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5065 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee)
5066}
5067 void FieldDescriptorProto::set_extendee(const char* value, size_t size) {
5068 set_has_extendee();
5069 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5070 ::std::string(reinterpret_cast<const char*>(value), size));
5071 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee)
5072}
5073 ::std::string* FieldDescriptorProto::mutable_extendee() {
5074 set_has_extendee();
5075 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee)
5076 return extendee_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5077}
5078 ::std::string* FieldDescriptorProto::release_extendee() {
5079 clear_has_extendee();
5080 return extendee_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5081}
5082 void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) {
5083 if (extendee != NULL) {
5084 set_has_extendee();
5085 } else {
5086 clear_has_extendee();
5087 }
5088 extendee_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extendee);
5089 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee)
5090}
5091
5092// optional string default_value = 7;
Bo Yang5db21732015-05-21 14:28:59 -07005093bool FieldDescriptorProto::has_default_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005094 return (_has_bits_[0] & 0x00000040u) != 0;
5095}
Bo Yang5db21732015-05-21 14:28:59 -07005096void FieldDescriptorProto::set_has_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005097 _has_bits_[0] |= 0x00000040u;
5098}
Bo Yang5db21732015-05-21 14:28:59 -07005099void FieldDescriptorProto::clear_has_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005100 _has_bits_[0] &= ~0x00000040u;
5101}
Bo Yang5db21732015-05-21 14:28:59 -07005102void FieldDescriptorProto::clear_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005103 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5104 clear_has_default_value();
5105}
5106 const ::std::string& FieldDescriptorProto::default_value() const {
5107 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value)
5108 return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5109}
5110 void FieldDescriptorProto::set_default_value(const ::std::string& value) {
5111 set_has_default_value();
5112 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5113 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value)
5114}
5115 void FieldDescriptorProto::set_default_value(const char* value) {
5116 set_has_default_value();
5117 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5118 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value)
5119}
5120 void FieldDescriptorProto::set_default_value(const char* value, size_t size) {
5121 set_has_default_value();
5122 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5123 ::std::string(reinterpret_cast<const char*>(value), size));
5124 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value)
5125}
5126 ::std::string* FieldDescriptorProto::mutable_default_value() {
5127 set_has_default_value();
5128 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value)
5129 return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5130}
5131 ::std::string* FieldDescriptorProto::release_default_value() {
5132 clear_has_default_value();
5133 return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5134}
5135 void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) {
5136 if (default_value != NULL) {
5137 set_has_default_value();
5138 } else {
5139 clear_has_default_value();
5140 }
5141 default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value);
5142 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value)
5143}
5144
5145// optional int32 oneof_index = 9;
Bo Yang5db21732015-05-21 14:28:59 -07005146bool FieldDescriptorProto::has_oneof_index() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005147 return (_has_bits_[0] & 0x00000080u) != 0;
5148}
Bo Yang5db21732015-05-21 14:28:59 -07005149void FieldDescriptorProto::set_has_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005150 _has_bits_[0] |= 0x00000080u;
5151}
Bo Yang5db21732015-05-21 14:28:59 -07005152void FieldDescriptorProto::clear_has_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005153 _has_bits_[0] &= ~0x00000080u;
5154}
Bo Yang5db21732015-05-21 14:28:59 -07005155void FieldDescriptorProto::clear_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005156 oneof_index_ = 0;
5157 clear_has_oneof_index();
5158}
5159 ::google::protobuf::int32 FieldDescriptorProto::oneof_index() const {
5160 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index)
5161 return oneof_index_;
5162}
5163 void FieldDescriptorProto::set_oneof_index(::google::protobuf::int32 value) {
5164 set_has_oneof_index();
5165 oneof_index_ = value;
5166 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index)
5167}
5168
Jisi Liu46e8ff62015-10-05 11:59:43 -07005169// optional string json_name = 10;
5170bool FieldDescriptorProto::has_json_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005171 return (_has_bits_[0] & 0x00000100u) != 0;
5172}
Jisi Liu46e8ff62015-10-05 11:59:43 -07005173void FieldDescriptorProto::set_has_json_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005174 _has_bits_[0] |= 0x00000100u;
5175}
Jisi Liu46e8ff62015-10-05 11:59:43 -07005176void FieldDescriptorProto::clear_has_json_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005177 _has_bits_[0] &= ~0x00000100u;
5178}
Jisi Liu46e8ff62015-10-05 11:59:43 -07005179void FieldDescriptorProto::clear_json_name() {
5180 json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5181 clear_has_json_name();
5182}
5183 const ::std::string& FieldDescriptorProto::json_name() const {
5184 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name)
5185 return json_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5186}
5187 void FieldDescriptorProto::set_json_name(const ::std::string& value) {
5188 set_has_json_name();
5189 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5190 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name)
5191}
5192 void FieldDescriptorProto::set_json_name(const char* value) {
5193 set_has_json_name();
5194 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5195 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.json_name)
5196}
5197 void FieldDescriptorProto::set_json_name(const char* value, size_t size) {
5198 set_has_json_name();
5199 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5200 ::std::string(reinterpret_cast<const char*>(value), size));
5201 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.json_name)
5202}
5203 ::std::string* FieldDescriptorProto::mutable_json_name() {
5204 set_has_json_name();
5205 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.json_name)
5206 return json_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5207}
5208 ::std::string* FieldDescriptorProto::release_json_name() {
5209 clear_has_json_name();
5210 return json_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5211}
5212 void FieldDescriptorProto::set_allocated_json_name(::std::string* json_name) {
5213 if (json_name != NULL) {
5214 set_has_json_name();
5215 } else {
5216 clear_has_json_name();
5217 }
5218 json_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name);
5219 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.json_name)
5220}
5221
5222// optional .google.protobuf.FieldOptions options = 8;
5223bool FieldDescriptorProto::has_options() const {
5224 return (_has_bits_[0] & 0x00000200u) != 0;
5225}
5226void FieldDescriptorProto::set_has_options() {
5227 _has_bits_[0] |= 0x00000200u;
5228}
5229void FieldDescriptorProto::clear_has_options() {
5230 _has_bits_[0] &= ~0x00000200u;
5231}
Bo Yang5db21732015-05-21 14:28:59 -07005232void FieldDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005233 if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
5234 clear_has_options();
5235}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005236const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005237 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options)
5238 return options_ != NULL ? *options_ : *default_instance_->options_;
5239}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005240::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005241 set_has_options();
5242 if (options_ == NULL) {
5243 options_ = new ::google::protobuf::FieldOptions;
5244 }
5245 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options)
5246 return options_;
5247}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005248::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005249 clear_has_options();
5250 ::google::protobuf::FieldOptions* temp = options_;
5251 options_ = NULL;
5252 return temp;
5253}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005254void FieldDescriptorProto::set_allocated_options(::google::protobuf::FieldOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08005255 delete options_;
5256 options_ = options;
5257 if (options) {
5258 set_has_options();
5259 } else {
5260 clear_has_options();
5261 }
5262 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.options)
5263}
5264
5265#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00005266
5267// ===================================================================
5268
Bruce Dawson86ba70e2015-10-29 12:41:29 -07005269#if !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +00005270const int OneofDescriptorProto::kNameFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07005271#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +00005272
5273OneofDescriptorProto::OneofDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07005274 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005275 SharedCtor();
5276 // @@protoc_insertion_point(constructor:google.protobuf.OneofDescriptorProto)
5277}
5278
5279void OneofDescriptorProto::InitAsDefaultInstance() {
5280}
5281
5282OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08005283 : ::google::protobuf::Message(),
5284 _internal_metadata_(NULL) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005285 SharedCtor();
5286 MergeFrom(from);
5287 // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto)
5288}
5289
5290void OneofDescriptorProto::SharedCtor() {
5291 ::google::protobuf::internal::GetEmptyString();
5292 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005293 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005294 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5295}
5296
5297OneofDescriptorProto::~OneofDescriptorProto() {
5298 // @@protoc_insertion_point(destructor:google.protobuf.OneofDescriptorProto)
5299 SharedDtor();
5300}
5301
5302void OneofDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08005303 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005304 if (this != default_instance_) {
5305 }
5306}
5307
5308void OneofDescriptorProto::SetCachedSize(int size) const {
5309 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5310 _cached_size_ = size;
5311 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5312}
5313const ::google::protobuf::Descriptor* OneofDescriptorProto::descriptor() {
5314 protobuf_AssignDescriptorsOnce();
5315 return OneofDescriptorProto_descriptor_;
5316}
5317
5318const OneofDescriptorProto& OneofDescriptorProto::default_instance() {
5319 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
5320 return *default_instance_;
5321}
5322
5323OneofDescriptorProto* OneofDescriptorProto::default_instance_ = NULL;
5324
Feng Xiao6ef984a2014-11-10 17:34:54 -08005325OneofDescriptorProto* OneofDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08005326 OneofDescriptorProto* n = new OneofDescriptorProto;
5327 if (arena != NULL) {
5328 arena->Own(n);
5329 }
5330 return n;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005331}
5332
5333void OneofDescriptorProto::Clear() {
5334 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005335 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005336 }
5337 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08005338 if (_internal_metadata_.have_unknown_fields()) {
5339 mutable_unknown_fields()->Clear();
5340 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005341}
5342
5343bool OneofDescriptorProto::MergePartialFromCodedStream(
5344 ::google::protobuf::io::CodedInputStream* input) {
5345#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
5346 ::google::protobuf::uint32 tag;
5347 // @@protoc_insertion_point(parse_start:google.protobuf.OneofDescriptorProto)
5348 for (;;) {
5349 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
5350 tag = p.first;
5351 if (!p.second) goto handle_unusual;
5352 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
5353 // optional string name = 1;
5354 case 1: {
5355 if (tag == 10) {
5356 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5357 input, this->mutable_name()));
5358 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5359 this->name().data(), this->name().length(),
5360 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005361 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005362 } else {
5363 goto handle_unusual;
5364 }
5365 if (input->ExpectAtEnd()) goto success;
5366 break;
5367 }
5368
5369 default: {
5370 handle_unusual:
5371 if (tag == 0 ||
5372 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
5373 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
5374 goto success;
5375 }
5376 DO_(::google::protobuf::internal::WireFormat::SkipField(
5377 input, tag, mutable_unknown_fields()));
5378 break;
5379 }
5380 }
5381 }
5382success:
5383 // @@protoc_insertion_point(parse_success:google.protobuf.OneofDescriptorProto)
5384 return true;
5385failure:
5386 // @@protoc_insertion_point(parse_failure:google.protobuf.OneofDescriptorProto)
5387 return false;
5388#undef DO_
5389}
5390
5391void OneofDescriptorProto::SerializeWithCachedSizes(
5392 ::google::protobuf::io::CodedOutputStream* output) const {
5393 // @@protoc_insertion_point(serialize_start:google.protobuf.OneofDescriptorProto)
5394 // optional string name = 1;
5395 if (has_name()) {
5396 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5397 this->name().data(), this->name().length(),
5398 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005399 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005400 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5401 1, this->name(), output);
5402 }
5403
Feng Xiao6ef984a2014-11-10 17:34:54 -08005404 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005405 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5406 unknown_fields(), output);
5407 }
5408 // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto)
5409}
5410
5411::google::protobuf::uint8* OneofDescriptorProto::SerializeWithCachedSizesToArray(
5412 ::google::protobuf::uint8* target) const {
5413 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto)
5414 // optional string name = 1;
5415 if (has_name()) {
5416 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5417 this->name().data(), this->name().length(),
5418 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005419 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005420 target =
5421 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5422 1, this->name(), target);
5423 }
5424
Feng Xiao6ef984a2014-11-10 17:34:54 -08005425 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005426 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5427 unknown_fields(), target);
5428 }
5429 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto)
5430 return target;
5431}
5432
5433int OneofDescriptorProto::ByteSize() const {
5434 int total_size = 0;
5435
Feng Xiao6ef984a2014-11-10 17:34:54 -08005436 // optional string name = 1;
5437 if (has_name()) {
5438 total_size += 1 +
5439 ::google::protobuf::internal::WireFormatLite::StringSize(
5440 this->name());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005441 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005442
5443 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005444 total_size +=
5445 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5446 unknown_fields());
5447 }
5448 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5449 _cached_size_ = total_size;
5450 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5451 return total_size;
5452}
5453
5454void OneofDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005455 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07005456 const OneofDescriptorProto* source =
5457 ::google::protobuf::internal::DynamicCastToGenerated<const OneofDescriptorProto>(
5458 &from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005459 if (source == NULL) {
5460 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
5461 } else {
5462 MergeFrom(*source);
5463 }
5464}
5465
5466void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005467 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005468 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
5469 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005470 set_has_name();
5471 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005472 }
5473 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005474 if (from._internal_metadata_.have_unknown_fields()) {
5475 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5476 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005477}
5478
5479void OneofDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
5480 if (&from == this) return;
5481 Clear();
5482 MergeFrom(from);
5483}
5484
5485void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) {
5486 if (&from == this) return;
5487 Clear();
5488 MergeFrom(from);
5489}
5490
5491bool OneofDescriptorProto::IsInitialized() const {
5492
5493 return true;
5494}
5495
5496void OneofDescriptorProto::Swap(OneofDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08005497 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005498 InternalSwap(other);
5499}
5500void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
5501 name_.Swap(&other->name_);
5502 std::swap(_has_bits_[0], other->_has_bits_[0]);
5503 _internal_metadata_.Swap(&other->_internal_metadata_);
5504 std::swap(_cached_size_, other->_cached_size_);
5505}
jieluo@google.com4de8f552014-07-18 00:47:59 +00005506
5507::google::protobuf::Metadata OneofDescriptorProto::GetMetadata() const {
5508 protobuf_AssignDescriptorsOnce();
5509 ::google::protobuf::Metadata metadata;
5510 metadata.descriptor = OneofDescriptorProto_descriptor_;
5511 metadata.reflection = OneofDescriptorProto_reflection_;
5512 return metadata;
5513}
5514
Jisi Liu885b6122015-02-28 14:51:22 -08005515#if PROTOBUF_INLINE_NOT_IN_HEADERS
5516// OneofDescriptorProto
5517
5518// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07005519bool OneofDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005520 return (_has_bits_[0] & 0x00000001u) != 0;
5521}
Bo Yang5db21732015-05-21 14:28:59 -07005522void OneofDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005523 _has_bits_[0] |= 0x00000001u;
5524}
Bo Yang5db21732015-05-21 14:28:59 -07005525void OneofDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005526 _has_bits_[0] &= ~0x00000001u;
5527}
Bo Yang5db21732015-05-21 14:28:59 -07005528void OneofDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005529 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5530 clear_has_name();
5531}
5532 const ::std::string& OneofDescriptorProto::name() const {
5533 // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name)
5534 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5535}
5536 void OneofDescriptorProto::set_name(const ::std::string& value) {
5537 set_has_name();
5538 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5539 // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name)
5540}
5541 void OneofDescriptorProto::set_name(const char* value) {
5542 set_has_name();
5543 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5544 // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name)
5545}
5546 void OneofDescriptorProto::set_name(const char* value, size_t size) {
5547 set_has_name();
5548 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5549 ::std::string(reinterpret_cast<const char*>(value), size));
5550 // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name)
5551}
5552 ::std::string* OneofDescriptorProto::mutable_name() {
5553 set_has_name();
5554 // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name)
5555 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5556}
5557 ::std::string* OneofDescriptorProto::release_name() {
5558 clear_has_name();
5559 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5560}
5561 void OneofDescriptorProto::set_allocated_name(::std::string* name) {
5562 if (name != NULL) {
5563 set_has_name();
5564 } else {
5565 clear_has_name();
5566 }
5567 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
5568 // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name)
5569}
5570
5571#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
jieluo@google.com4de8f552014-07-18 00:47:59 +00005572
5573// ===================================================================
5574
Bruce Dawson86ba70e2015-10-29 12:41:29 -07005575#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005576const int EnumDescriptorProto::kNameFieldNumber;
5577const int EnumDescriptorProto::kValueFieldNumber;
5578const int EnumDescriptorProto::kOptionsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07005579#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00005580
kenton@google.com573989f2009-10-30 22:02:17 +00005581EnumDescriptorProto::EnumDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07005582 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005583 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00005584 // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00005585}
5586
kenton@google.com80b1d622009-07-29 01:13:20 +00005587void EnumDescriptorProto::InitAsDefaultInstance() {
5588 options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00005589}
5590
kenton@google.com573989f2009-10-30 22:02:17 +00005591EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08005592 : ::google::protobuf::Message(),
5593 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005594 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005595 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005596 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005597}
5598
kenton@google.comd37d46d2009-04-25 02:53:47 +00005599void EnumDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005600 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00005601 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005602 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00005603 options_ = NULL;
5604 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5605}
5606
temporal40ee5512008-07-10 02:12:20 +00005607EnumDescriptorProto::~EnumDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005608 // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005609 SharedDtor();
5610}
5611
5612void EnumDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08005613 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00005614 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00005615 delete options_;
5616 }
5617}
5618
kenton@google.comfccb1462009-12-18 02:11:36 +00005619void EnumDescriptorProto::SetCachedSize(int size) const {
5620 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5621 _cached_size_ = size;
5622 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5623}
temporal40ee5512008-07-10 02:12:20 +00005624const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005625 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00005626 return EnumDescriptorProto_descriptor_;
5627}
5628
kenton@google.com24bf56f2008-09-24 20:31:01 +00005629const EnumDescriptorProto& EnumDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00005630 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
5631 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005632}
5633
5634EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL;
5635
Feng Xiao6ef984a2014-11-10 17:34:54 -08005636EnumDescriptorProto* EnumDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08005637 EnumDescriptorProto* n = new EnumDescriptorProto;
5638 if (arena != NULL) {
5639 arena->Own(n);
5640 }
5641 return n;
temporal40ee5512008-07-10 02:12:20 +00005642}
5643
5644void EnumDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07005645 if (_has_bits_[0 / 32] & 5u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005646 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005647 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00005648 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005649 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00005650 if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear();
5651 }
5652 }
5653 value_.Clear();
5654 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08005655 if (_internal_metadata_.have_unknown_fields()) {
5656 mutable_unknown_fields()->Clear();
5657 }
temporal40ee5512008-07-10 02:12:20 +00005658}
5659
5660bool EnumDescriptorProto::MergePartialFromCodedStream(
5661 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005662#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00005663 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005664 // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto)
5665 for (;;) {
5666 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
5667 tag = p.first;
5668 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00005669 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00005670 // optional string name = 1;
5671 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005672 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005673 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5674 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00005675 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00005676 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005677 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005678 "google.protobuf.EnumDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00005679 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005680 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005681 }
temporal40ee5512008-07-10 02:12:20 +00005682 if (input->ExpectTag(18)) goto parse_value;
5683 break;
5684 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005685
temporal40ee5512008-07-10 02:12:20 +00005686 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
5687 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005688 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005689 parse_value:
Bo Yang5db21732015-05-21 14:28:59 -07005690 DO_(input->IncrementRecursionDepth());
5691 parse_loop_value:
5692 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00005693 input, add_value()));
5694 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005695 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005696 }
Bo Yang5db21732015-05-21 14:28:59 -07005697 if (input->ExpectTag(18)) goto parse_loop_value;
5698 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00005699 if (input->ExpectTag(26)) goto parse_options;
5700 break;
5701 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005702
temporal40ee5512008-07-10 02:12:20 +00005703 // optional .google.protobuf.EnumOptions options = 3;
5704 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005705 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005706 parse_options:
5707 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
5708 input, mutable_options()));
5709 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005710 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005711 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005712 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00005713 break;
5714 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005715
temporal40ee5512008-07-10 02:12:20 +00005716 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005717 handle_unusual:
5718 if (tag == 0 ||
5719 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005720 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005721 goto success;
temporal40ee5512008-07-10 02:12:20 +00005722 }
5723 DO_(::google::protobuf::internal::WireFormat::SkipField(
5724 input, tag, mutable_unknown_fields()));
5725 break;
5726 }
5727 }
5728 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005729success:
5730 // @@protoc_insertion_point(parse_success:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005731 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005732failure:
5733 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumDescriptorProto)
5734 return false;
temporal40ee5512008-07-10 02:12:20 +00005735#undef DO_
5736}
5737
kenton@google.comd37d46d2009-04-25 02:53:47 +00005738void EnumDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00005739 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005740 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005741 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005742 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005743 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00005744 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005745 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005746 "google.protobuf.EnumDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005747 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00005748 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00005749 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005750
temporal40ee5512008-07-10 02:12:20 +00005751 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08005752 for (unsigned int i = 0, n = this->value_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005753 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00005754 2, this->value(i), output);
temporal40ee5512008-07-10 02:12:20 +00005755 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005756
temporal40ee5512008-07-10 02:12:20 +00005757 // optional .google.protobuf.EnumOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005758 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005759 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08005760 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00005761 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005762
Feng Xiao6ef984a2014-11-10 17:34:54 -08005763 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005764 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5765 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00005766 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005767 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005768}
5769
5770::google::protobuf::uint8* EnumDescriptorProto::SerializeWithCachedSizesToArray(
5771 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005772 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005773 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005774 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005775 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00005776 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005777 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005778 "google.protobuf.EnumDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00005779 target =
5780 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5781 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005782 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005783
kenton@google.comd37d46d2009-04-25 02:53:47 +00005784 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08005785 for (unsigned int i = 0, n = this->value_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005786 target = ::google::protobuf::internal::WireFormatLite::
5787 WriteMessageNoVirtualToArray(
5788 2, this->value(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005789 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005790
kenton@google.comd37d46d2009-04-25 02:53:47 +00005791 // optional .google.protobuf.EnumOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005792 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005793 target = ::google::protobuf::internal::WireFormatLite::
5794 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08005795 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005796 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005797
Feng Xiao6ef984a2014-11-10 17:34:54 -08005798 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005799 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5800 unknown_fields(), target);
5801 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005802 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005803 return target;
temporal40ee5512008-07-10 02:12:20 +00005804}
5805
5806int EnumDescriptorProto::ByteSize() const {
5807 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005808
Austin Schuh307af622015-06-05 22:46:01 -07005809 if (_has_bits_[0 / 32] & 5u) {
temporal40ee5512008-07-10 02:12:20 +00005810 // optional string name = 1;
5811 if (has_name()) {
5812 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00005813 ::google::protobuf::internal::WireFormatLite::StringSize(
5814 this->name());
temporal40ee5512008-07-10 02:12:20 +00005815 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005816
temporal40ee5512008-07-10 02:12:20 +00005817 // optional .google.protobuf.EnumOptions options = 3;
5818 if (has_options()) {
5819 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00005820 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08005821 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00005822 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005823
temporal40ee5512008-07-10 02:12:20 +00005824 }
5825 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005826 total_size += 1 * this->value_size();
5827 for (int i = 0; i < this->value_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00005828 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00005829 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00005830 this->value(i));
5831 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005832
Feng Xiao6ef984a2014-11-10 17:34:54 -08005833 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00005834 total_size +=
5835 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5836 unknown_fields());
5837 }
kenton@google.comfccb1462009-12-18 02:11:36 +00005838 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00005839 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00005840 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00005841 return total_size;
5842}
5843
5844void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005845 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07005846 const EnumDescriptorProto* source =
5847 ::google::protobuf::internal::DynamicCastToGenerated<const EnumDescriptorProto>(
5848 &from);
temporal40ee5512008-07-10 02:12:20 +00005849 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00005850 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00005851 } else {
5852 MergeFrom(*source);
5853 }
5854}
5855
5856void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005857 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00005858 value_.MergeFrom(from.value_);
5859 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005860 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005861 set_has_name();
5862 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00005863 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005864 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00005865 mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options());
5866 }
5867 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005868 if (from._internal_metadata_.have_unknown_fields()) {
5869 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5870 }
temporal40ee5512008-07-10 02:12:20 +00005871}
5872
5873void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
5874 if (&from == this) return;
5875 Clear();
5876 MergeFrom(from);
5877}
5878
5879void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
5880 if (&from == this) return;
5881 Clear();
5882 MergeFrom(from);
5883}
5884
5885bool EnumDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005886
jieluo@google.com4de8f552014-07-18 00:47:59 +00005887 if (!::google::protobuf::internal::AllAreInitialized(this->value())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005888 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005889 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005890 }
temporal40ee5512008-07-10 02:12:20 +00005891 return true;
5892}
5893
kenton@google.comceb561d2009-06-25 19:05:36 +00005894void EnumDescriptorProto::Swap(EnumDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08005895 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005896 InternalSwap(other);
5897}
5898void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) {
5899 name_.Swap(&other->name_);
5900 value_.UnsafeArenaSwap(&other->value_);
5901 std::swap(options_, other->options_);
5902 std::swap(_has_bits_[0], other->_has_bits_[0]);
5903 _internal_metadata_.Swap(&other->_internal_metadata_);
5904 std::swap(_cached_size_, other->_cached_size_);
5905}
kenton@google.comceb561d2009-06-25 19:05:36 +00005906
kenton@google.com80b1d622009-07-29 01:13:20 +00005907::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const {
5908 protobuf_AssignDescriptorsOnce();
5909 ::google::protobuf::Metadata metadata;
5910 metadata.descriptor = EnumDescriptorProto_descriptor_;
5911 metadata.reflection = EnumDescriptorProto_reflection_;
5912 return metadata;
temporal40ee5512008-07-10 02:12:20 +00005913}
5914
Jisi Liu885b6122015-02-28 14:51:22 -08005915#if PROTOBUF_INLINE_NOT_IN_HEADERS
5916// EnumDescriptorProto
5917
5918// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07005919bool EnumDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005920 return (_has_bits_[0] & 0x00000001u) != 0;
5921}
Bo Yang5db21732015-05-21 14:28:59 -07005922void EnumDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005923 _has_bits_[0] |= 0x00000001u;
5924}
Bo Yang5db21732015-05-21 14:28:59 -07005925void EnumDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005926 _has_bits_[0] &= ~0x00000001u;
5927}
Bo Yang5db21732015-05-21 14:28:59 -07005928void EnumDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005929 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5930 clear_has_name();
5931}
5932 const ::std::string& EnumDescriptorProto::name() const {
5933 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name)
5934 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5935}
5936 void EnumDescriptorProto::set_name(const ::std::string& value) {
5937 set_has_name();
5938 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5939 // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name)
5940}
5941 void EnumDescriptorProto::set_name(const char* value) {
5942 set_has_name();
5943 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5944 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name)
5945}
5946 void EnumDescriptorProto::set_name(const char* value, size_t size) {
5947 set_has_name();
5948 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5949 ::std::string(reinterpret_cast<const char*>(value), size));
5950 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name)
5951}
5952 ::std::string* EnumDescriptorProto::mutable_name() {
5953 set_has_name();
5954 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name)
5955 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5956}
5957 ::std::string* EnumDescriptorProto::release_name() {
5958 clear_has_name();
5959 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5960}
5961 void EnumDescriptorProto::set_allocated_name(::std::string* name) {
5962 if (name != NULL) {
5963 set_has_name();
5964 } else {
5965 clear_has_name();
5966 }
5967 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
5968 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name)
5969}
5970
5971// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Bo Yang5db21732015-05-21 14:28:59 -07005972int EnumDescriptorProto::value_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005973 return value_.size();
5974}
Bo Yang5db21732015-05-21 14:28:59 -07005975void EnumDescriptorProto::clear_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005976 value_.Clear();
5977}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005978const ::google::protobuf::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08005979 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value)
5980 return value_.Get(index);
5981}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005982::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08005983 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.value)
5984 return value_.Mutable(index);
5985}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005986::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::add_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005987 // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value)
5988 return value_.Add();
5989}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005990::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08005991EnumDescriptorProto::mutable_value() {
5992 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value)
5993 return &value_;
5994}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005995const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >&
5996EnumDescriptorProto::value() const {
5997 // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value)
5998 return value_;
5999}
Jisi Liu885b6122015-02-28 14:51:22 -08006000
6001// optional .google.protobuf.EnumOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07006002bool EnumDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006003 return (_has_bits_[0] & 0x00000004u) != 0;
6004}
Bo Yang5db21732015-05-21 14:28:59 -07006005void EnumDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006006 _has_bits_[0] |= 0x00000004u;
6007}
Bo Yang5db21732015-05-21 14:28:59 -07006008void EnumDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006009 _has_bits_[0] &= ~0x00000004u;
6010}
Bo Yang5db21732015-05-21 14:28:59 -07006011void EnumDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006012 if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear();
6013 clear_has_options();
6014}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006015const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006016 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options)
6017 return options_ != NULL ? *options_ : *default_instance_->options_;
6018}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006019::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006020 set_has_options();
6021 if (options_ == NULL) {
6022 options_ = new ::google::protobuf::EnumOptions;
6023 }
6024 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options)
6025 return options_;
6026}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006027::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006028 clear_has_options();
6029 ::google::protobuf::EnumOptions* temp = options_;
6030 options_ = NULL;
6031 return temp;
6032}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006033void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08006034 delete options_;
6035 options_ = options;
6036 if (options) {
6037 set_has_options();
6038 } else {
6039 clear_has_options();
6040 }
6041 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.options)
6042}
6043
6044#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00006045
6046// ===================================================================
6047
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006048#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006049const int EnumValueDescriptorProto::kNameFieldNumber;
6050const int EnumValueDescriptorProto::kNumberFieldNumber;
6051const int EnumValueDescriptorProto::kOptionsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006052#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00006053
kenton@google.com573989f2009-10-30 22:02:17 +00006054EnumValueDescriptorProto::EnumValueDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07006055 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006056 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00006057 // @@protoc_insertion_point(constructor:google.protobuf.EnumValueDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00006058}
6059
kenton@google.com80b1d622009-07-29 01:13:20 +00006060void EnumValueDescriptorProto::InitAsDefaultInstance() {
6061 options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00006062}
6063
kenton@google.com573989f2009-10-30 22:02:17 +00006064EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08006065 : ::google::protobuf::Message(),
6066 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006067 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006068 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00006069 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006070}
6071
kenton@google.comd37d46d2009-04-25 02:53:47 +00006072void EnumValueDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006073 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00006074 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006075 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00006076 number_ = 0;
6077 options_ = NULL;
6078 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6079}
6080
temporal40ee5512008-07-10 02:12:20 +00006081EnumValueDescriptorProto::~EnumValueDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006082 // @@protoc_insertion_point(destructor:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006083 SharedDtor();
6084}
6085
6086void EnumValueDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08006087 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00006088 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00006089 delete options_;
6090 }
6091}
6092
kenton@google.comfccb1462009-12-18 02:11:36 +00006093void EnumValueDescriptorProto::SetCachedSize(int size) const {
6094 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6095 _cached_size_ = size;
6096 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6097}
temporal40ee5512008-07-10 02:12:20 +00006098const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006099 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00006100 return EnumValueDescriptorProto_descriptor_;
6101}
6102
kenton@google.com24bf56f2008-09-24 20:31:01 +00006103const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00006104 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
6105 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006106}
6107
6108EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL;
6109
Feng Xiao6ef984a2014-11-10 17:34:54 -08006110EnumValueDescriptorProto* EnumValueDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08006111 EnumValueDescriptorProto* n = new EnumValueDescriptorProto;
6112 if (arena != NULL) {
6113 arena->Own(n);
6114 }
6115 return n;
temporal40ee5512008-07-10 02:12:20 +00006116}
6117
6118void EnumValueDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07006119 if (_has_bits_[0 / 32] & 7u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006120 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006121 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00006122 }
6123 number_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006124 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006125 if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear();
6126 }
6127 }
6128 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08006129 if (_internal_metadata_.have_unknown_fields()) {
6130 mutable_unknown_fields()->Clear();
6131 }
temporal40ee5512008-07-10 02:12:20 +00006132}
6133
6134bool EnumValueDescriptorProto::MergePartialFromCodedStream(
6135 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006136#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00006137 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006138 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueDescriptorProto)
6139 for (;;) {
6140 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
6141 tag = p.first;
6142 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00006143 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00006144 // optional string name = 1;
6145 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006146 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006147 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6148 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00006149 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00006150 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006151 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006152 "google.protobuf.EnumValueDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00006153 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006154 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006155 }
temporal40ee5512008-07-10 02:12:20 +00006156 if (input->ExpectTag(16)) goto parse_number;
6157 break;
6158 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006159
temporal40ee5512008-07-10 02:12:20 +00006160 // optional int32 number = 2;
6161 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006162 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006163 parse_number:
6164 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
6165 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
6166 input, &number_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00006167 set_has_number();
kenton@google.comfccb1462009-12-18 02:11:36 +00006168 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006169 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006170 }
temporal40ee5512008-07-10 02:12:20 +00006171 if (input->ExpectTag(26)) goto parse_options;
6172 break;
6173 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006174
temporal40ee5512008-07-10 02:12:20 +00006175 // optional .google.protobuf.EnumValueOptions options = 3;
6176 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006177 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006178 parse_options:
6179 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6180 input, mutable_options()));
6181 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006182 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006183 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006184 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00006185 break;
6186 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006187
temporal40ee5512008-07-10 02:12:20 +00006188 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006189 handle_unusual:
6190 if (tag == 0 ||
6191 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006192 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006193 goto success;
temporal40ee5512008-07-10 02:12:20 +00006194 }
6195 DO_(::google::protobuf::internal::WireFormat::SkipField(
6196 input, tag, mutable_unknown_fields()));
6197 break;
6198 }
6199 }
6200 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006201success:
6202 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006203 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006204failure:
6205 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueDescriptorProto)
6206 return false;
temporal40ee5512008-07-10 02:12:20 +00006207#undef DO_
6208}
6209
kenton@google.comd37d46d2009-04-25 02:53:47 +00006210void EnumValueDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00006211 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006212 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006213 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006214 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006215 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006216 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006217 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006218 "google.protobuf.EnumValueDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00006219 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00006220 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00006221 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006222
temporal40ee5512008-07-10 02:12:20 +00006223 // optional int32 number = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006224 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006225 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output);
temporal40ee5512008-07-10 02:12:20 +00006226 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006227
temporal40ee5512008-07-10 02:12:20 +00006228 // optional .google.protobuf.EnumValueOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006229 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006230 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006231 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00006232 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006233
Feng Xiao6ef984a2014-11-10 17:34:54 -08006234 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006235 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6236 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00006237 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006238 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006239}
6240
6241::google::protobuf::uint8* EnumValueDescriptorProto::SerializeWithCachedSizesToArray(
6242 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006243 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006244 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006245 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006246 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006247 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006248 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006249 "google.protobuf.EnumValueDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00006250 target =
6251 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6252 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006253 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006254
kenton@google.comd37d46d2009-04-25 02:53:47 +00006255 // optional int32 number = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006256 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006257 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006258 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006259
kenton@google.comd37d46d2009-04-25 02:53:47 +00006260 // optional .google.protobuf.EnumValueOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006261 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006262 target = ::google::protobuf::internal::WireFormatLite::
6263 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006264 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006265 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006266
Feng Xiao6ef984a2014-11-10 17:34:54 -08006267 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006268 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6269 unknown_fields(), target);
6270 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006271 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006272 return target;
temporal40ee5512008-07-10 02:12:20 +00006273}
6274
6275int EnumValueDescriptorProto::ByteSize() const {
6276 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006277
Austin Schuh307af622015-06-05 22:46:01 -07006278 if (_has_bits_[0 / 32] & 7u) {
temporal40ee5512008-07-10 02:12:20 +00006279 // optional string name = 1;
6280 if (has_name()) {
6281 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006282 ::google::protobuf::internal::WireFormatLite::StringSize(
6283 this->name());
temporal40ee5512008-07-10 02:12:20 +00006284 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006285
temporal40ee5512008-07-10 02:12:20 +00006286 // optional int32 number = 2;
6287 if (has_number()) {
6288 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006289 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00006290 this->number());
6291 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006292
temporal40ee5512008-07-10 02:12:20 +00006293 // optional .google.protobuf.EnumValueOptions options = 3;
6294 if (has_options()) {
6295 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006296 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08006297 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00006298 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006299
temporal40ee5512008-07-10 02:12:20 +00006300 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006301 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00006302 total_size +=
6303 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6304 unknown_fields());
6305 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006306 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00006307 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006308 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00006309 return total_size;
6310}
6311
6312void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006313 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07006314 const EnumValueDescriptorProto* source =
6315 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueDescriptorProto>(
6316 &from);
temporal40ee5512008-07-10 02:12:20 +00006317 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00006318 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00006319 } else {
6320 MergeFrom(*source);
6321 }
6322}
6323
6324void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006325 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00006326 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006327 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006328 set_has_name();
6329 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00006330 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006331 if (from.has_number()) {
temporal40ee5512008-07-10 02:12:20 +00006332 set_number(from.number());
6333 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006334 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006335 mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options());
6336 }
6337 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006338 if (from._internal_metadata_.have_unknown_fields()) {
6339 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6340 }
temporal40ee5512008-07-10 02:12:20 +00006341}
6342
6343void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
6344 if (&from == this) return;
6345 Clear();
6346 MergeFrom(from);
6347}
6348
6349void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
6350 if (&from == this) return;
6351 Clear();
6352 MergeFrom(from);
6353}
6354
kenton@google.comceb561d2009-06-25 19:05:36 +00006355bool EnumValueDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006356
kenton@google.comceb561d2009-06-25 19:05:36 +00006357 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006358 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00006359 }
6360 return true;
6361}
6362
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006363void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08006364 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006365 InternalSwap(other);
6366}
6367void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) {
6368 name_.Swap(&other->name_);
6369 std::swap(number_, other->number_);
6370 std::swap(options_, other->options_);
6371 std::swap(_has_bits_[0], other->_has_bits_[0]);
6372 _internal_metadata_.Swap(&other->_internal_metadata_);
6373 std::swap(_cached_size_, other->_cached_size_);
6374}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006375
kenton@google.com80b1d622009-07-29 01:13:20 +00006376::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const {
6377 protobuf_AssignDescriptorsOnce();
6378 ::google::protobuf::Metadata metadata;
6379 metadata.descriptor = EnumValueDescriptorProto_descriptor_;
6380 metadata.reflection = EnumValueDescriptorProto_reflection_;
6381 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006382}
6383
Jisi Liu885b6122015-02-28 14:51:22 -08006384#if PROTOBUF_INLINE_NOT_IN_HEADERS
6385// EnumValueDescriptorProto
6386
6387// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07006388bool EnumValueDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006389 return (_has_bits_[0] & 0x00000001u) != 0;
6390}
Bo Yang5db21732015-05-21 14:28:59 -07006391void EnumValueDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006392 _has_bits_[0] |= 0x00000001u;
6393}
Bo Yang5db21732015-05-21 14:28:59 -07006394void EnumValueDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006395 _has_bits_[0] &= ~0x00000001u;
6396}
Bo Yang5db21732015-05-21 14:28:59 -07006397void EnumValueDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006398 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6399 clear_has_name();
6400}
6401 const ::std::string& EnumValueDescriptorProto::name() const {
6402 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name)
6403 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6404}
6405 void EnumValueDescriptorProto::set_name(const ::std::string& value) {
6406 set_has_name();
6407 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
6408 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name)
6409}
6410 void EnumValueDescriptorProto::set_name(const char* value) {
6411 set_has_name();
6412 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
6413 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name)
6414}
6415 void EnumValueDescriptorProto::set_name(const char* value, size_t size) {
6416 set_has_name();
6417 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
6418 ::std::string(reinterpret_cast<const char*>(value), size));
6419 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name)
6420}
6421 ::std::string* EnumValueDescriptorProto::mutable_name() {
6422 set_has_name();
6423 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name)
6424 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6425}
6426 ::std::string* EnumValueDescriptorProto::release_name() {
6427 clear_has_name();
6428 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6429}
6430 void EnumValueDescriptorProto::set_allocated_name(::std::string* name) {
6431 if (name != NULL) {
6432 set_has_name();
6433 } else {
6434 clear_has_name();
6435 }
6436 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
6437 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name)
6438}
6439
6440// optional int32 number = 2;
Bo Yang5db21732015-05-21 14:28:59 -07006441bool EnumValueDescriptorProto::has_number() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006442 return (_has_bits_[0] & 0x00000002u) != 0;
6443}
Bo Yang5db21732015-05-21 14:28:59 -07006444void EnumValueDescriptorProto::set_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006445 _has_bits_[0] |= 0x00000002u;
6446}
Bo Yang5db21732015-05-21 14:28:59 -07006447void EnumValueDescriptorProto::clear_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006448 _has_bits_[0] &= ~0x00000002u;
6449}
Bo Yang5db21732015-05-21 14:28:59 -07006450void EnumValueDescriptorProto::clear_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006451 number_ = 0;
6452 clear_has_number();
6453}
6454 ::google::protobuf::int32 EnumValueDescriptorProto::number() const {
6455 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number)
6456 return number_;
6457}
6458 void EnumValueDescriptorProto::set_number(::google::protobuf::int32 value) {
6459 set_has_number();
6460 number_ = value;
6461 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number)
6462}
6463
6464// optional .google.protobuf.EnumValueOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07006465bool EnumValueDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006466 return (_has_bits_[0] & 0x00000004u) != 0;
6467}
Bo Yang5db21732015-05-21 14:28:59 -07006468void EnumValueDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006469 _has_bits_[0] |= 0x00000004u;
6470}
Bo Yang5db21732015-05-21 14:28:59 -07006471void EnumValueDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006472 _has_bits_[0] &= ~0x00000004u;
6473}
Bo Yang5db21732015-05-21 14:28:59 -07006474void EnumValueDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006475 if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear();
6476 clear_has_options();
6477}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006478const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006479 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options)
6480 return options_ != NULL ? *options_ : *default_instance_->options_;
6481}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006482::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006483 set_has_options();
6484 if (options_ == NULL) {
6485 options_ = new ::google::protobuf::EnumValueOptions;
6486 }
6487 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options)
6488 return options_;
6489}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006490::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006491 clear_has_options();
6492 ::google::protobuf::EnumValueOptions* temp = options_;
6493 options_ = NULL;
6494 return temp;
6495}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006496void EnumValueDescriptorProto::set_allocated_options(::google::protobuf::EnumValueOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08006497 delete options_;
6498 options_ = options;
6499 if (options) {
6500 set_has_options();
6501 } else {
6502 clear_has_options();
6503 }
6504 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.options)
6505}
6506
6507#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00006508
6509// ===================================================================
6510
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006511#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006512const int ServiceDescriptorProto::kNameFieldNumber;
6513const int ServiceDescriptorProto::kMethodFieldNumber;
6514const int ServiceDescriptorProto::kOptionsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006515#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00006516
kenton@google.com573989f2009-10-30 22:02:17 +00006517ServiceDescriptorProto::ServiceDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07006518 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006519 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00006520 // @@protoc_insertion_point(constructor:google.protobuf.ServiceDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00006521}
6522
kenton@google.com80b1d622009-07-29 01:13:20 +00006523void ServiceDescriptorProto::InitAsDefaultInstance() {
6524 options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00006525}
6526
kenton@google.com573989f2009-10-30 22:02:17 +00006527ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08006528 : ::google::protobuf::Message(),
6529 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006530 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006531 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00006532 // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006533}
6534
kenton@google.comd37d46d2009-04-25 02:53:47 +00006535void ServiceDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006536 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00006537 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006538 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00006539 options_ = NULL;
6540 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6541}
6542
temporal40ee5512008-07-10 02:12:20 +00006543ServiceDescriptorProto::~ServiceDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006544 // @@protoc_insertion_point(destructor:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006545 SharedDtor();
6546}
6547
6548void ServiceDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08006549 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00006550 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00006551 delete options_;
6552 }
6553}
6554
kenton@google.comfccb1462009-12-18 02:11:36 +00006555void ServiceDescriptorProto::SetCachedSize(int size) const {
6556 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6557 _cached_size_ = size;
6558 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6559}
temporal40ee5512008-07-10 02:12:20 +00006560const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006561 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00006562 return ServiceDescriptorProto_descriptor_;
6563}
6564
kenton@google.com24bf56f2008-09-24 20:31:01 +00006565const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00006566 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
6567 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006568}
6569
6570ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL;
6571
Feng Xiao6ef984a2014-11-10 17:34:54 -08006572ServiceDescriptorProto* ServiceDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08006573 ServiceDescriptorProto* n = new ServiceDescriptorProto;
6574 if (arena != NULL) {
6575 arena->Own(n);
6576 }
6577 return n;
temporal40ee5512008-07-10 02:12:20 +00006578}
6579
6580void ServiceDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07006581 if (_has_bits_[0 / 32] & 5u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006582 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006583 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00006584 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006585 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006586 if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear();
6587 }
6588 }
6589 method_.Clear();
6590 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08006591 if (_internal_metadata_.have_unknown_fields()) {
6592 mutable_unknown_fields()->Clear();
6593 }
temporal40ee5512008-07-10 02:12:20 +00006594}
6595
6596bool ServiceDescriptorProto::MergePartialFromCodedStream(
6597 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006598#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00006599 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006600 // @@protoc_insertion_point(parse_start:google.protobuf.ServiceDescriptorProto)
6601 for (;;) {
6602 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
6603 tag = p.first;
6604 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00006605 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00006606 // optional string name = 1;
6607 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006608 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006609 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6610 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00006611 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00006612 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006613 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006614 "google.protobuf.ServiceDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00006615 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006616 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006617 }
temporal40ee5512008-07-10 02:12:20 +00006618 if (input->ExpectTag(18)) goto parse_method;
6619 break;
6620 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006621
temporal40ee5512008-07-10 02:12:20 +00006622 // repeated .google.protobuf.MethodDescriptorProto method = 2;
6623 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006624 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006625 parse_method:
Bo Yang5db21732015-05-21 14:28:59 -07006626 DO_(input->IncrementRecursionDepth());
6627 parse_loop_method:
6628 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00006629 input, add_method()));
6630 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006631 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006632 }
Bo Yang5db21732015-05-21 14:28:59 -07006633 if (input->ExpectTag(18)) goto parse_loop_method;
6634 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00006635 if (input->ExpectTag(26)) goto parse_options;
6636 break;
6637 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006638
temporal40ee5512008-07-10 02:12:20 +00006639 // optional .google.protobuf.ServiceOptions options = 3;
6640 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006641 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006642 parse_options:
6643 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6644 input, mutable_options()));
6645 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006646 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006647 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006648 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00006649 break;
6650 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006651
temporal40ee5512008-07-10 02:12:20 +00006652 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006653 handle_unusual:
6654 if (tag == 0 ||
6655 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006656 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006657 goto success;
temporal40ee5512008-07-10 02:12:20 +00006658 }
6659 DO_(::google::protobuf::internal::WireFormat::SkipField(
6660 input, tag, mutable_unknown_fields()));
6661 break;
6662 }
6663 }
6664 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006665success:
6666 // @@protoc_insertion_point(parse_success:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006667 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006668failure:
6669 // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceDescriptorProto)
6670 return false;
temporal40ee5512008-07-10 02:12:20 +00006671#undef DO_
6672}
6673
kenton@google.comd37d46d2009-04-25 02:53:47 +00006674void ServiceDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00006675 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006676 // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006677 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006678 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006679 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006680 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006681 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006682 "google.protobuf.ServiceDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00006683 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00006684 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00006685 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006686
temporal40ee5512008-07-10 02:12:20 +00006687 // repeated .google.protobuf.MethodDescriptorProto method = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08006688 for (unsigned int i = 0, n = this->method_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006689 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00006690 2, this->method(i), output);
temporal40ee5512008-07-10 02:12:20 +00006691 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006692
temporal40ee5512008-07-10 02:12:20 +00006693 // optional .google.protobuf.ServiceOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006694 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006695 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006696 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00006697 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006698
Feng Xiao6ef984a2014-11-10 17:34:54 -08006699 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006700 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6701 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00006702 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006703 // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006704}
6705
6706::google::protobuf::uint8* ServiceDescriptorProto::SerializeWithCachedSizesToArray(
6707 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006708 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006709 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006710 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006711 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006712 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006713 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006714 "google.protobuf.ServiceDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00006715 target =
6716 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6717 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006718 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006719
kenton@google.comd37d46d2009-04-25 02:53:47 +00006720 // repeated .google.protobuf.MethodDescriptorProto method = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08006721 for (unsigned int i = 0, n = this->method_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006722 target = ::google::protobuf::internal::WireFormatLite::
6723 WriteMessageNoVirtualToArray(
6724 2, this->method(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006725 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006726
kenton@google.comd37d46d2009-04-25 02:53:47 +00006727 // optional .google.protobuf.ServiceOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006728 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006729 target = ::google::protobuf::internal::WireFormatLite::
6730 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006731 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006732 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006733
Feng Xiao6ef984a2014-11-10 17:34:54 -08006734 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006735 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6736 unknown_fields(), target);
6737 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006738 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006739 return target;
temporal40ee5512008-07-10 02:12:20 +00006740}
6741
6742int ServiceDescriptorProto::ByteSize() const {
6743 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006744
Austin Schuh307af622015-06-05 22:46:01 -07006745 if (_has_bits_[0 / 32] & 5u) {
temporal40ee5512008-07-10 02:12:20 +00006746 // optional string name = 1;
6747 if (has_name()) {
6748 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006749 ::google::protobuf::internal::WireFormatLite::StringSize(
6750 this->name());
temporal40ee5512008-07-10 02:12:20 +00006751 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006752
temporal40ee5512008-07-10 02:12:20 +00006753 // optional .google.protobuf.ServiceOptions options = 3;
6754 if (has_options()) {
6755 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006756 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08006757 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00006758 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006759
temporal40ee5512008-07-10 02:12:20 +00006760 }
6761 // repeated .google.protobuf.MethodDescriptorProto method = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00006762 total_size += 1 * this->method_size();
6763 for (int i = 0; i < this->method_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00006764 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00006765 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00006766 this->method(i));
6767 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006768
Feng Xiao6ef984a2014-11-10 17:34:54 -08006769 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00006770 total_size +=
6771 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6772 unknown_fields());
6773 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006774 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00006775 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006776 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00006777 return total_size;
6778}
6779
6780void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006781 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07006782 const ServiceDescriptorProto* source =
6783 ::google::protobuf::internal::DynamicCastToGenerated<const ServiceDescriptorProto>(
6784 &from);
temporal40ee5512008-07-10 02:12:20 +00006785 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00006786 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00006787 } else {
6788 MergeFrom(*source);
6789 }
6790}
6791
6792void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006793 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00006794 method_.MergeFrom(from.method_);
6795 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006796 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006797 set_has_name();
6798 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00006799 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006800 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006801 mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options());
6802 }
6803 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006804 if (from._internal_metadata_.have_unknown_fields()) {
6805 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6806 }
temporal40ee5512008-07-10 02:12:20 +00006807}
6808
6809void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
6810 if (&from == this) return;
6811 Clear();
6812 MergeFrom(from);
6813}
6814
6815void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) {
6816 if (&from == this) return;
6817 Clear();
6818 MergeFrom(from);
6819}
6820
6821bool ServiceDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006822
jieluo@google.com4de8f552014-07-18 00:47:59 +00006823 if (!::google::protobuf::internal::AllAreInitialized(this->method())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006824 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006825 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006826 }
temporal40ee5512008-07-10 02:12:20 +00006827 return true;
6828}
6829
kenton@google.comceb561d2009-06-25 19:05:36 +00006830void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08006831 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006832 InternalSwap(other);
6833}
6834void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) {
6835 name_.Swap(&other->name_);
6836 method_.UnsafeArenaSwap(&other->method_);
6837 std::swap(options_, other->options_);
6838 std::swap(_has_bits_[0], other->_has_bits_[0]);
6839 _internal_metadata_.Swap(&other->_internal_metadata_);
6840 std::swap(_cached_size_, other->_cached_size_);
6841}
kenton@google.comceb561d2009-06-25 19:05:36 +00006842
kenton@google.com80b1d622009-07-29 01:13:20 +00006843::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const {
6844 protobuf_AssignDescriptorsOnce();
6845 ::google::protobuf::Metadata metadata;
6846 metadata.descriptor = ServiceDescriptorProto_descriptor_;
6847 metadata.reflection = ServiceDescriptorProto_reflection_;
6848 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006849}
6850
Jisi Liu885b6122015-02-28 14:51:22 -08006851#if PROTOBUF_INLINE_NOT_IN_HEADERS
6852// ServiceDescriptorProto
6853
6854// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07006855bool ServiceDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006856 return (_has_bits_[0] & 0x00000001u) != 0;
6857}
Bo Yang5db21732015-05-21 14:28:59 -07006858void ServiceDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006859 _has_bits_[0] |= 0x00000001u;
6860}
Bo Yang5db21732015-05-21 14:28:59 -07006861void ServiceDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006862 _has_bits_[0] &= ~0x00000001u;
6863}
Bo Yang5db21732015-05-21 14:28:59 -07006864void ServiceDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006865 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6866 clear_has_name();
6867}
6868 const ::std::string& ServiceDescriptorProto::name() const {
6869 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name)
6870 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6871}
6872 void ServiceDescriptorProto::set_name(const ::std::string& value) {
6873 set_has_name();
6874 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
6875 // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name)
6876}
6877 void ServiceDescriptorProto::set_name(const char* value) {
6878 set_has_name();
6879 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
6880 // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name)
6881}
6882 void ServiceDescriptorProto::set_name(const char* value, size_t size) {
6883 set_has_name();
6884 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
6885 ::std::string(reinterpret_cast<const char*>(value), size));
6886 // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name)
6887}
6888 ::std::string* ServiceDescriptorProto::mutable_name() {
6889 set_has_name();
6890 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name)
6891 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6892}
6893 ::std::string* ServiceDescriptorProto::release_name() {
6894 clear_has_name();
6895 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6896}
6897 void ServiceDescriptorProto::set_allocated_name(::std::string* name) {
6898 if (name != NULL) {
6899 set_has_name();
6900 } else {
6901 clear_has_name();
6902 }
6903 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
6904 // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name)
6905}
6906
6907// repeated .google.protobuf.MethodDescriptorProto method = 2;
Bo Yang5db21732015-05-21 14:28:59 -07006908int ServiceDescriptorProto::method_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006909 return method_.size();
6910}
Bo Yang5db21732015-05-21 14:28:59 -07006911void ServiceDescriptorProto::clear_method() {
Jisi Liu885b6122015-02-28 14:51:22 -08006912 method_.Clear();
6913}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006914const ::google::protobuf::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08006915 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method)
6916 return method_.Get(index);
6917}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006918::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08006919 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.method)
6920 return method_.Mutable(index);
6921}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006922::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::add_method() {
Jisi Liu885b6122015-02-28 14:51:22 -08006923 // @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method)
6924 return method_.Add();
6925}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006926::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08006927ServiceDescriptorProto::mutable_method() {
6928 // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method)
6929 return &method_;
6930}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006931const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >&
6932ServiceDescriptorProto::method() const {
6933 // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method)
6934 return method_;
6935}
Jisi Liu885b6122015-02-28 14:51:22 -08006936
6937// optional .google.protobuf.ServiceOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07006938bool ServiceDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006939 return (_has_bits_[0] & 0x00000004u) != 0;
6940}
Bo Yang5db21732015-05-21 14:28:59 -07006941void ServiceDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006942 _has_bits_[0] |= 0x00000004u;
6943}
Bo Yang5db21732015-05-21 14:28:59 -07006944void ServiceDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006945 _has_bits_[0] &= ~0x00000004u;
6946}
Bo Yang5db21732015-05-21 14:28:59 -07006947void ServiceDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006948 if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear();
6949 clear_has_options();
6950}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006951const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006952 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options)
6953 return options_ != NULL ? *options_ : *default_instance_->options_;
6954}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006955::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006956 set_has_options();
6957 if (options_ == NULL) {
6958 options_ = new ::google::protobuf::ServiceOptions;
6959 }
6960 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options)
6961 return options_;
6962}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006963::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006964 clear_has_options();
6965 ::google::protobuf::ServiceOptions* temp = options_;
6966 options_ = NULL;
6967 return temp;
6968}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006969void ServiceDescriptorProto::set_allocated_options(::google::protobuf::ServiceOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08006970 delete options_;
6971 options_ = options;
6972 if (options) {
6973 set_has_options();
6974 } else {
6975 clear_has_options();
6976 }
6977 // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.options)
6978}
6979
6980#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00006981
6982// ===================================================================
6983
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006984#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006985const int MethodDescriptorProto::kNameFieldNumber;
6986const int MethodDescriptorProto::kInputTypeFieldNumber;
6987const int MethodDescriptorProto::kOutputTypeFieldNumber;
6988const int MethodDescriptorProto::kOptionsFieldNumber;
Feng Xiao99aa0f92014-11-20 16:18:53 -08006989const int MethodDescriptorProto::kClientStreamingFieldNumber;
6990const int MethodDescriptorProto::kServerStreamingFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006991#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00006992
kenton@google.com573989f2009-10-30 22:02:17 +00006993MethodDescriptorProto::MethodDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07006994 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006995 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00006996 // @@protoc_insertion_point(constructor:google.protobuf.MethodDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00006997}
6998
kenton@google.com80b1d622009-07-29 01:13:20 +00006999void MethodDescriptorProto::InitAsDefaultInstance() {
7000 options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00007001}
7002
kenton@google.com573989f2009-10-30 22:02:17 +00007003MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08007004 : ::google::protobuf::Message(),
7005 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007006 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00007007 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00007008 // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00007009}
7010
kenton@google.comd37d46d2009-04-25 02:53:47 +00007011void MethodDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007012 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00007013 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007014 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7015 input_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7016 output_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00007017 options_ = NULL;
Feng Xiao99aa0f92014-11-20 16:18:53 -08007018 client_streaming_ = false;
7019 server_streaming_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00007020 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7021}
7022
temporal40ee5512008-07-10 02:12:20 +00007023MethodDescriptorProto::~MethodDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007024 // @@protoc_insertion_point(destructor:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007025 SharedDtor();
7026}
7027
7028void MethodDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08007029 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7030 input_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7031 output_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00007032 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00007033 delete options_;
7034 }
7035}
7036
kenton@google.comfccb1462009-12-18 02:11:36 +00007037void MethodDescriptorProto::SetCachedSize(int size) const {
7038 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7039 _cached_size_ = size;
7040 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7041}
temporal40ee5512008-07-10 02:12:20 +00007042const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007043 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00007044 return MethodDescriptorProto_descriptor_;
7045}
7046
kenton@google.com24bf56f2008-09-24 20:31:01 +00007047const MethodDescriptorProto& MethodDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00007048 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
7049 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00007050}
7051
7052MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL;
7053
Feng Xiao6ef984a2014-11-10 17:34:54 -08007054MethodDescriptorProto* MethodDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08007055 MethodDescriptorProto* n = new MethodDescriptorProto;
7056 if (arena != NULL) {
7057 arena->Own(n);
7058 }
7059 return n;
temporal40ee5512008-07-10 02:12:20 +00007060}
7061
7062void MethodDescriptorProto::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -08007063#define ZR_HELPER_(f) reinterpret_cast<char*>(\
7064 &reinterpret_cast<MethodDescriptorProto*>(16)->f)
Feng Xiao99aa0f92014-11-20 16:18:53 -08007065
Jisi Liu885b6122015-02-28 14:51:22 -08007066#define ZR_(first, last) do {\
7067 ::memset(&first, 0,\
7068 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
7069} while (0)
Feng Xiao99aa0f92014-11-20 16:18:53 -08007070
Austin Schuhe8268372015-05-19 23:22:20 -07007071 if (_has_bits_[0 / 32] & 63u) {
Feng Xiao99aa0f92014-11-20 16:18:53 -08007072 ZR_(client_streaming_, server_streaming_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00007073 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007074 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007075 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007076 if (has_input_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007077 input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007078 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007079 if (has_output_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007080 output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007081 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007082 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00007083 if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear();
7084 }
7085 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08007086
Jisi Liu885b6122015-02-28 14:51:22 -08007087#undef ZR_HELPER_
Feng Xiao99aa0f92014-11-20 16:18:53 -08007088#undef ZR_
7089
temporal40ee5512008-07-10 02:12:20 +00007090 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08007091 if (_internal_metadata_.have_unknown_fields()) {
7092 mutable_unknown_fields()->Clear();
7093 }
temporal40ee5512008-07-10 02:12:20 +00007094}
7095
7096bool MethodDescriptorProto::MergePartialFromCodedStream(
7097 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007098#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00007099 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007100 // @@protoc_insertion_point(parse_start:google.protobuf.MethodDescriptorProto)
7101 for (;;) {
7102 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
7103 tag = p.first;
7104 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00007105 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00007106 // optional string name = 1;
7107 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007108 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007109 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7110 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007111 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007112 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007113 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007114 "google.protobuf.MethodDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00007115 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007116 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007117 }
temporal40ee5512008-07-10 02:12:20 +00007118 if (input->ExpectTag(18)) goto parse_input_type;
7119 break;
7120 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007121
temporal40ee5512008-07-10 02:12:20 +00007122 // optional string input_type = 2;
7123 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007124 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007125 parse_input_type:
7126 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7127 input, this->mutable_input_type()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007128 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007129 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007130 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007131 "google.protobuf.MethodDescriptorProto.input_type");
kenton@google.comfccb1462009-12-18 02:11:36 +00007132 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007133 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007134 }
temporal40ee5512008-07-10 02:12:20 +00007135 if (input->ExpectTag(26)) goto parse_output_type;
7136 break;
7137 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007138
temporal40ee5512008-07-10 02:12:20 +00007139 // optional string output_type = 3;
7140 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007141 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007142 parse_output_type:
7143 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7144 input, this->mutable_output_type()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007145 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007146 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007147 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007148 "google.protobuf.MethodDescriptorProto.output_type");
kenton@google.comfccb1462009-12-18 02:11:36 +00007149 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007150 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007151 }
temporal40ee5512008-07-10 02:12:20 +00007152 if (input->ExpectTag(34)) goto parse_options;
7153 break;
7154 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007155
temporal40ee5512008-07-10 02:12:20 +00007156 // optional .google.protobuf.MethodOptions options = 4;
7157 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007158 if (tag == 34) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007159 parse_options:
7160 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
7161 input, mutable_options()));
7162 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007163 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007164 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08007165 if (input->ExpectTag(40)) goto parse_client_streaming;
7166 break;
7167 }
7168
7169 // optional bool client_streaming = 5 [default = false];
7170 case 5: {
7171 if (tag == 40) {
7172 parse_client_streaming:
7173 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7174 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7175 input, &client_streaming_)));
7176 set_has_client_streaming();
7177 } else {
7178 goto handle_unusual;
7179 }
7180 if (input->ExpectTag(48)) goto parse_server_streaming;
7181 break;
7182 }
7183
7184 // optional bool server_streaming = 6 [default = false];
7185 case 6: {
7186 if (tag == 48) {
7187 parse_server_streaming:
7188 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7189 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7190 input, &server_streaming_)));
7191 set_has_server_streaming();
7192 } else {
7193 goto handle_unusual;
7194 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007195 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00007196 break;
7197 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007198
temporal40ee5512008-07-10 02:12:20 +00007199 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007200 handle_unusual:
7201 if (tag == 0 ||
7202 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00007203 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007204 goto success;
temporal40ee5512008-07-10 02:12:20 +00007205 }
7206 DO_(::google::protobuf::internal::WireFormat::SkipField(
7207 input, tag, mutable_unknown_fields()));
7208 break;
7209 }
7210 }
7211 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007212success:
7213 // @@protoc_insertion_point(parse_success:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00007214 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007215failure:
7216 // @@protoc_insertion_point(parse_failure:google.protobuf.MethodDescriptorProto)
7217 return false;
temporal40ee5512008-07-10 02:12:20 +00007218#undef DO_
7219}
7220
kenton@google.comd37d46d2009-04-25 02:53:47 +00007221void MethodDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00007222 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007223 // @@protoc_insertion_point(serialize_start:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00007224 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007225 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007226 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007227 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007228 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007229 "google.protobuf.MethodDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007230 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007231 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00007232 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007233
temporal40ee5512008-07-10 02:12:20 +00007234 // optional string input_type = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007235 if (has_input_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007236 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007237 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007238 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007239 "google.protobuf.MethodDescriptorProto.input_type");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007240 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007241 2, this->input_type(), output);
temporal40ee5512008-07-10 02:12:20 +00007242 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007243
temporal40ee5512008-07-10 02:12:20 +00007244 // optional string output_type = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007245 if (has_output_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007246 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007247 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007248 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007249 "google.protobuf.MethodDescriptorProto.output_type");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007250 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007251 3, this->output_type(), output);
temporal40ee5512008-07-10 02:12:20 +00007252 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007253
temporal40ee5512008-07-10 02:12:20 +00007254 // optional .google.protobuf.MethodOptions options = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007255 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007256 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08007257 4, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00007258 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007259
Feng Xiao99aa0f92014-11-20 16:18:53 -08007260 // optional bool client_streaming = 5 [default = false];
7261 if (has_client_streaming()) {
7262 ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->client_streaming(), output);
7263 }
7264
7265 // optional bool server_streaming = 6 [default = false];
7266 if (has_server_streaming()) {
7267 ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->server_streaming(), output);
7268 }
7269
Feng Xiao6ef984a2014-11-10 17:34:54 -08007270 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007271 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
7272 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00007273 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007274 // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007275}
7276
7277::google::protobuf::uint8* MethodDescriptorProto::SerializeWithCachedSizesToArray(
7278 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007279 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007280 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007281 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007282 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007283 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007284 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007285 "google.protobuf.MethodDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00007286 target =
7287 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7288 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007289 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007290
kenton@google.comd37d46d2009-04-25 02:53:47 +00007291 // optional string input_type = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007292 if (has_input_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007293 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007294 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007295 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007296 "google.protobuf.MethodDescriptorProto.input_type");
kenton@google.com80b1d622009-07-29 01:13:20 +00007297 target =
7298 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7299 2, this->input_type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007300 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007301
kenton@google.comd37d46d2009-04-25 02:53:47 +00007302 // optional string output_type = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007303 if (has_output_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007304 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007305 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007306 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007307 "google.protobuf.MethodDescriptorProto.output_type");
kenton@google.com80b1d622009-07-29 01:13:20 +00007308 target =
7309 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7310 3, this->output_type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007311 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007312
kenton@google.comd37d46d2009-04-25 02:53:47 +00007313 // optional .google.protobuf.MethodOptions options = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007314 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007315 target = ::google::protobuf::internal::WireFormatLite::
7316 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08007317 4, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007318 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007319
Feng Xiao99aa0f92014-11-20 16:18:53 -08007320 // optional bool client_streaming = 5 [default = false];
7321 if (has_client_streaming()) {
7322 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->client_streaming(), target);
7323 }
7324
7325 // optional bool server_streaming = 6 [default = false];
7326 if (has_server_streaming()) {
7327 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->server_streaming(), target);
7328 }
7329
Feng Xiao6ef984a2014-11-10 17:34:54 -08007330 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007331 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
7332 unknown_fields(), target);
7333 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007334 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007335 return target;
temporal40ee5512008-07-10 02:12:20 +00007336}
7337
7338int MethodDescriptorProto::ByteSize() const {
7339 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007340
Austin Schuh307af622015-06-05 22:46:01 -07007341 if (_has_bits_[0 / 32] & 63u) {
temporal40ee5512008-07-10 02:12:20 +00007342 // optional string name = 1;
7343 if (has_name()) {
7344 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007345 ::google::protobuf::internal::WireFormatLite::StringSize(
7346 this->name());
temporal40ee5512008-07-10 02:12:20 +00007347 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007348
temporal40ee5512008-07-10 02:12:20 +00007349 // optional string input_type = 2;
7350 if (has_input_type()) {
7351 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007352 ::google::protobuf::internal::WireFormatLite::StringSize(
7353 this->input_type());
temporal40ee5512008-07-10 02:12:20 +00007354 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007355
temporal40ee5512008-07-10 02:12:20 +00007356 // optional string output_type = 3;
7357 if (has_output_type()) {
7358 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007359 ::google::protobuf::internal::WireFormatLite::StringSize(
7360 this->output_type());
temporal40ee5512008-07-10 02:12:20 +00007361 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007362
temporal40ee5512008-07-10 02:12:20 +00007363 // optional .google.protobuf.MethodOptions options = 4;
7364 if (has_options()) {
7365 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007366 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08007367 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00007368 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007369
Feng Xiao99aa0f92014-11-20 16:18:53 -08007370 // optional bool client_streaming = 5 [default = false];
7371 if (has_client_streaming()) {
7372 total_size += 1 + 1;
7373 }
7374
7375 // optional bool server_streaming = 6 [default = false];
7376 if (has_server_streaming()) {
7377 total_size += 1 + 1;
7378 }
7379
temporal40ee5512008-07-10 02:12:20 +00007380 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08007381 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00007382 total_size +=
7383 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
7384 unknown_fields());
7385 }
kenton@google.comfccb1462009-12-18 02:11:36 +00007386 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00007387 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00007388 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00007389 return total_size;
7390}
7391
7392void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08007393 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07007394 const MethodDescriptorProto* source =
7395 ::google::protobuf::internal::DynamicCastToGenerated<const MethodDescriptorProto>(
7396 &from);
temporal40ee5512008-07-10 02:12:20 +00007397 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00007398 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00007399 } else {
7400 MergeFrom(*source);
7401 }
7402}
7403
7404void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08007405 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00007406 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00007407 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007408 set_has_name();
7409 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00007410 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007411 if (from.has_input_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007412 set_has_input_type();
7413 input_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.input_type_);
temporal40ee5512008-07-10 02:12:20 +00007414 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007415 if (from.has_output_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007416 set_has_output_type();
7417 output_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.output_type_);
temporal40ee5512008-07-10 02:12:20 +00007418 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007419 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00007420 mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options());
7421 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08007422 if (from.has_client_streaming()) {
7423 set_client_streaming(from.client_streaming());
7424 }
7425 if (from.has_server_streaming()) {
7426 set_server_streaming(from.server_streaming());
7427 }
temporal40ee5512008-07-10 02:12:20 +00007428 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08007429 if (from._internal_metadata_.have_unknown_fields()) {
7430 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
7431 }
temporal40ee5512008-07-10 02:12:20 +00007432}
7433
7434void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
7435 if (&from == this) return;
7436 Clear();
7437 MergeFrom(from);
7438}
7439
7440void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) {
7441 if (&from == this) return;
7442 Clear();
7443 MergeFrom(from);
7444}
7445
kenton@google.comceb561d2009-06-25 19:05:36 +00007446bool MethodDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007447
kenton@google.comceb561d2009-06-25 19:05:36 +00007448 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007449 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00007450 }
7451 return true;
7452}
7453
kenton@google.com26bd9ee2008-11-21 00:06:27 +00007454void MethodDescriptorProto::Swap(MethodDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08007455 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007456 InternalSwap(other);
7457}
7458void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) {
7459 name_.Swap(&other->name_);
7460 input_type_.Swap(&other->input_type_);
7461 output_type_.Swap(&other->output_type_);
7462 std::swap(options_, other->options_);
Feng Xiao99aa0f92014-11-20 16:18:53 -08007463 std::swap(client_streaming_, other->client_streaming_);
7464 std::swap(server_streaming_, other->server_streaming_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08007465 std::swap(_has_bits_[0], other->_has_bits_[0]);
7466 _internal_metadata_.Swap(&other->_internal_metadata_);
7467 std::swap(_cached_size_, other->_cached_size_);
7468}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00007469
kenton@google.com80b1d622009-07-29 01:13:20 +00007470::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const {
7471 protobuf_AssignDescriptorsOnce();
7472 ::google::protobuf::Metadata metadata;
7473 metadata.descriptor = MethodDescriptorProto_descriptor_;
7474 metadata.reflection = MethodDescriptorProto_reflection_;
7475 return metadata;
temporal40ee5512008-07-10 02:12:20 +00007476}
7477
Jisi Liu885b6122015-02-28 14:51:22 -08007478#if PROTOBUF_INLINE_NOT_IN_HEADERS
7479// MethodDescriptorProto
7480
7481// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07007482bool MethodDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007483 return (_has_bits_[0] & 0x00000001u) != 0;
7484}
Bo Yang5db21732015-05-21 14:28:59 -07007485void MethodDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007486 _has_bits_[0] |= 0x00000001u;
7487}
Bo Yang5db21732015-05-21 14:28:59 -07007488void MethodDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007489 _has_bits_[0] &= ~0x00000001u;
7490}
Bo Yang5db21732015-05-21 14:28:59 -07007491void MethodDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007492 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7493 clear_has_name();
7494}
7495 const ::std::string& MethodDescriptorProto::name() const {
7496 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name)
7497 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7498}
7499 void MethodDescriptorProto::set_name(const ::std::string& value) {
7500 set_has_name();
7501 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7502 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name)
7503}
7504 void MethodDescriptorProto::set_name(const char* value) {
7505 set_has_name();
7506 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7507 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name)
7508}
7509 void MethodDescriptorProto::set_name(const char* value, size_t size) {
7510 set_has_name();
7511 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7512 ::std::string(reinterpret_cast<const char*>(value), size));
7513 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name)
7514}
7515 ::std::string* MethodDescriptorProto::mutable_name() {
7516 set_has_name();
7517 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name)
7518 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7519}
7520 ::std::string* MethodDescriptorProto::release_name() {
7521 clear_has_name();
7522 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7523}
7524 void MethodDescriptorProto::set_allocated_name(::std::string* name) {
7525 if (name != NULL) {
7526 set_has_name();
7527 } else {
7528 clear_has_name();
7529 }
7530 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
7531 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name)
7532}
7533
7534// optional string input_type = 2;
Bo Yang5db21732015-05-21 14:28:59 -07007535bool MethodDescriptorProto::has_input_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007536 return (_has_bits_[0] & 0x00000002u) != 0;
7537}
Bo Yang5db21732015-05-21 14:28:59 -07007538void MethodDescriptorProto::set_has_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007539 _has_bits_[0] |= 0x00000002u;
7540}
Bo Yang5db21732015-05-21 14:28:59 -07007541void MethodDescriptorProto::clear_has_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007542 _has_bits_[0] &= ~0x00000002u;
7543}
Bo Yang5db21732015-05-21 14:28:59 -07007544void MethodDescriptorProto::clear_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007545 input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7546 clear_has_input_type();
7547}
7548 const ::std::string& MethodDescriptorProto::input_type() const {
7549 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type)
7550 return input_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7551}
7552 void MethodDescriptorProto::set_input_type(const ::std::string& value) {
7553 set_has_input_type();
7554 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7555 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type)
7556}
7557 void MethodDescriptorProto::set_input_type(const char* value) {
7558 set_has_input_type();
7559 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7560 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type)
7561}
7562 void MethodDescriptorProto::set_input_type(const char* value, size_t size) {
7563 set_has_input_type();
7564 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7565 ::std::string(reinterpret_cast<const char*>(value), size));
7566 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type)
7567}
7568 ::std::string* MethodDescriptorProto::mutable_input_type() {
7569 set_has_input_type();
7570 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type)
7571 return input_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7572}
7573 ::std::string* MethodDescriptorProto::release_input_type() {
7574 clear_has_input_type();
7575 return input_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7576}
7577 void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) {
7578 if (input_type != NULL) {
7579 set_has_input_type();
7580 } else {
7581 clear_has_input_type();
7582 }
7583 input_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), input_type);
7584 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type)
7585}
7586
7587// optional string output_type = 3;
Bo Yang5db21732015-05-21 14:28:59 -07007588bool MethodDescriptorProto::has_output_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007589 return (_has_bits_[0] & 0x00000004u) != 0;
7590}
Bo Yang5db21732015-05-21 14:28:59 -07007591void MethodDescriptorProto::set_has_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007592 _has_bits_[0] |= 0x00000004u;
7593}
Bo Yang5db21732015-05-21 14:28:59 -07007594void MethodDescriptorProto::clear_has_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007595 _has_bits_[0] &= ~0x00000004u;
7596}
Bo Yang5db21732015-05-21 14:28:59 -07007597void MethodDescriptorProto::clear_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007598 output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7599 clear_has_output_type();
7600}
7601 const ::std::string& MethodDescriptorProto::output_type() const {
7602 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type)
7603 return output_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7604}
7605 void MethodDescriptorProto::set_output_type(const ::std::string& value) {
7606 set_has_output_type();
7607 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7608 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type)
7609}
7610 void MethodDescriptorProto::set_output_type(const char* value) {
7611 set_has_output_type();
7612 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7613 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type)
7614}
7615 void MethodDescriptorProto::set_output_type(const char* value, size_t size) {
7616 set_has_output_type();
7617 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7618 ::std::string(reinterpret_cast<const char*>(value), size));
7619 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type)
7620}
7621 ::std::string* MethodDescriptorProto::mutable_output_type() {
7622 set_has_output_type();
7623 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type)
7624 return output_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7625}
7626 ::std::string* MethodDescriptorProto::release_output_type() {
7627 clear_has_output_type();
7628 return output_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7629}
7630 void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) {
7631 if (output_type != NULL) {
7632 set_has_output_type();
7633 } else {
7634 clear_has_output_type();
7635 }
7636 output_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), output_type);
7637 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type)
7638}
7639
7640// optional .google.protobuf.MethodOptions options = 4;
Bo Yang5db21732015-05-21 14:28:59 -07007641bool MethodDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007642 return (_has_bits_[0] & 0x00000008u) != 0;
7643}
Bo Yang5db21732015-05-21 14:28:59 -07007644void MethodDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007645 _has_bits_[0] |= 0x00000008u;
7646}
Bo Yang5db21732015-05-21 14:28:59 -07007647void MethodDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007648 _has_bits_[0] &= ~0x00000008u;
7649}
Bo Yang5db21732015-05-21 14:28:59 -07007650void MethodDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007651 if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear();
7652 clear_has_options();
7653}
Feng Xiaoeee38b02015-08-22 18:25:48 -07007654const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007655 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options)
7656 return options_ != NULL ? *options_ : *default_instance_->options_;
7657}
Feng Xiaoeee38b02015-08-22 18:25:48 -07007658::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007659 set_has_options();
7660 if (options_ == NULL) {
7661 options_ = new ::google::protobuf::MethodOptions;
7662 }
7663 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options)
7664 return options_;
7665}
Feng Xiaoeee38b02015-08-22 18:25:48 -07007666::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007667 clear_has_options();
7668 ::google::protobuf::MethodOptions* temp = options_;
7669 options_ = NULL;
7670 return temp;
7671}
Feng Xiaoeee38b02015-08-22 18:25:48 -07007672void MethodDescriptorProto::set_allocated_options(::google::protobuf::MethodOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08007673 delete options_;
7674 options_ = options;
7675 if (options) {
7676 set_has_options();
7677 } else {
7678 clear_has_options();
7679 }
7680 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options)
7681}
7682
7683// optional bool client_streaming = 5 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07007684bool MethodDescriptorProto::has_client_streaming() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007685 return (_has_bits_[0] & 0x00000010u) != 0;
7686}
Bo Yang5db21732015-05-21 14:28:59 -07007687void MethodDescriptorProto::set_has_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007688 _has_bits_[0] |= 0x00000010u;
7689}
Bo Yang5db21732015-05-21 14:28:59 -07007690void MethodDescriptorProto::clear_has_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007691 _has_bits_[0] &= ~0x00000010u;
7692}
Bo Yang5db21732015-05-21 14:28:59 -07007693void MethodDescriptorProto::clear_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007694 client_streaming_ = false;
7695 clear_has_client_streaming();
7696}
7697 bool MethodDescriptorProto::client_streaming() const {
7698 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.client_streaming)
7699 return client_streaming_;
7700}
7701 void MethodDescriptorProto::set_client_streaming(bool value) {
7702 set_has_client_streaming();
7703 client_streaming_ = value;
7704 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.client_streaming)
7705}
7706
7707// optional bool server_streaming = 6 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07007708bool MethodDescriptorProto::has_server_streaming() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007709 return (_has_bits_[0] & 0x00000020u) != 0;
7710}
Bo Yang5db21732015-05-21 14:28:59 -07007711void MethodDescriptorProto::set_has_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007712 _has_bits_[0] |= 0x00000020u;
7713}
Bo Yang5db21732015-05-21 14:28:59 -07007714void MethodDescriptorProto::clear_has_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007715 _has_bits_[0] &= ~0x00000020u;
7716}
Bo Yang5db21732015-05-21 14:28:59 -07007717void MethodDescriptorProto::clear_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007718 server_streaming_ = false;
7719 clear_has_server_streaming();
7720}
7721 bool MethodDescriptorProto::server_streaming() const {
7722 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.server_streaming)
7723 return server_streaming_;
7724}
7725 void MethodDescriptorProto::set_server_streaming(bool value) {
7726 set_has_server_streaming();
7727 server_streaming_ = value;
7728 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.server_streaming)
7729}
7730
7731#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00007732
7733// ===================================================================
7734
7735const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007736 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00007737 return FileOptions_OptimizeMode_descriptor_;
7738}
7739bool FileOptions_OptimizeMode_IsValid(int value) {
7740 switch(value) {
7741 case 1:
7742 case 2:
kenton@google.com80b1d622009-07-29 01:13:20 +00007743 case 3:
temporal40ee5512008-07-10 02:12:20 +00007744 return true;
7745 default:
7746 return false;
7747 }
7748}
7749
Bruce Dawson86ba70e2015-10-29 12:41:29 -07007750#if !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00007751const FileOptions_OptimizeMode FileOptions::SPEED;
7752const FileOptions_OptimizeMode FileOptions::CODE_SIZE;
kenton@google.com80b1d622009-07-29 01:13:20 +00007753const FileOptions_OptimizeMode FileOptions::LITE_RUNTIME;
temporal40ee5512008-07-10 02:12:20 +00007754const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN;
7755const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00007756const int FileOptions::OptimizeMode_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07007757#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
7758#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007759const int FileOptions::kJavaPackageFieldNumber;
7760const int FileOptions::kJavaOuterClassnameFieldNumber;
7761const int FileOptions::kJavaMultipleFilesFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007762const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007763const int FileOptions::kJavaStringCheckUtf8FieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007764const int FileOptions::kOptimizeForFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007765const int FileOptions::kGoPackageFieldNumber;
kenton@google.comfccb1462009-12-18 02:11:36 +00007766const int FileOptions::kCcGenericServicesFieldNumber;
7767const int FileOptions::kJavaGenericServicesFieldNumber;
7768const int FileOptions::kPyGenericServicesFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007769const int FileOptions::kDeprecatedFieldNumber;
Feng Xiaof157a562014-11-14 11:50:31 -08007770const int FileOptions::kCcEnableArenasFieldNumber;
Jisi Liu885b6122015-02-28 14:51:22 -08007771const int FileOptions::kObjcClassPrefixFieldNumber;
Jan Tattermusch685ae362015-03-16 19:07:16 -07007772const int FileOptions::kCsharpNamespaceFieldNumber;
Xiao Hang801e9202015-07-27 17:46:22 -07007773const int FileOptions::kJavananoUseDeprecatedPackageFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007774const int FileOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07007775#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.com24bf56f2008-09-24 20:31:01 +00007776
kenton@google.com573989f2009-10-30 22:02:17 +00007777FileOptions::FileOptions()
Bo Yang5db21732015-05-21 14:28:59 -07007778 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007779 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00007780 // @@protoc_insertion_point(constructor:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00007781}
7782
kenton@google.com80b1d622009-07-29 01:13:20 +00007783void FileOptions::InitAsDefaultInstance() {
7784}
kenton@google.com24bf56f2008-09-24 20:31:01 +00007785
kenton@google.com573989f2009-10-30 22:02:17 +00007786FileOptions::FileOptions(const FileOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08007787 : ::google::protobuf::Message(),
7788 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007789 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00007790 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00007791 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00007792}
7793
kenton@google.comd37d46d2009-04-25 02:53:47 +00007794void FileOptions::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007795 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00007796 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007797 java_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7798 java_outer_classname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00007799 java_multiple_files_ = false;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007800 java_generate_equals_and_hash_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007801 java_string_check_utf8_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00007802 optimize_for_ = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007803 go_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +00007804 cc_generic_services_ = false;
7805 java_generic_services_ = false;
7806 py_generic_services_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007807 deprecated_ = false;
Feng Xiaof157a562014-11-14 11:50:31 -08007808 cc_enable_arenas_ = false;
Jisi Liu885b6122015-02-28 14:51:22 -08007809 objc_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jan Tattermusch685ae362015-03-16 19:07:16 -07007810 csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Xiao Hang801e9202015-07-27 17:46:22 -07007811 javanano_use_deprecated_package_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00007812 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7813}
7814
temporal40ee5512008-07-10 02:12:20 +00007815FileOptions::~FileOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007816 // @@protoc_insertion_point(destructor:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007817 SharedDtor();
7818}
7819
7820void FileOptions::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08007821 java_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7822 java_outer_classname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7823 go_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jisi Liu885b6122015-02-28 14:51:22 -08007824 objc_class_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jan Tattermusch685ae362015-03-16 19:07:16 -07007825 csharp_namespace_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00007826 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00007827 }
7828}
7829
kenton@google.comfccb1462009-12-18 02:11:36 +00007830void FileOptions::SetCachedSize(int size) const {
7831 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7832 _cached_size_ = size;
7833 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7834}
temporal40ee5512008-07-10 02:12:20 +00007835const ::google::protobuf::Descriptor* FileOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007836 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00007837 return FileOptions_descriptor_;
7838}
7839
kenton@google.com24bf56f2008-09-24 20:31:01 +00007840const FileOptions& FileOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00007841 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
7842 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00007843}
7844
7845FileOptions* FileOptions::default_instance_ = NULL;
7846
Feng Xiao6ef984a2014-11-10 17:34:54 -08007847FileOptions* FileOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08007848 FileOptions* n = new FileOptions;
7849 if (arena != NULL) {
7850 arena->Own(n);
7851 }
7852 return n;
temporal40ee5512008-07-10 02:12:20 +00007853}
7854
7855void FileOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007856 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08007857#define ZR_HELPER_(f) reinterpret_cast<char*>(\
7858 &reinterpret_cast<FileOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00007859
Jisi Liu885b6122015-02-28 14:51:22 -08007860#define ZR_(first, last) do {\
7861 ::memset(&first, 0,\
7862 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
7863} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00007864
Austin Schuhe8268372015-05-19 23:22:20 -07007865 if (_has_bits_[0 / 32] & 255u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007866 ZR_(java_multiple_files_, cc_generic_services_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00007867 if (has_java_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007868 java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007869 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007870 if (has_java_outer_classname()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007871 java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007872 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00007873 optimize_for_ = 1;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007874 if (has_go_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007875 go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007876 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007877 }
Xiao Hang801e9202015-07-27 17:46:22 -07007878 if (_has_bits_[8 / 32] & 32512u) {
7879 ZR_(java_generic_services_, javanano_use_deprecated_package_);
Jisi Liu885b6122015-02-28 14:51:22 -08007880 if (has_objc_class_prefix()) {
7881 objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7882 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07007883 if (has_csharp_namespace()) {
7884 csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7885 }
Jisi Liu885b6122015-02-28 14:51:22 -08007886 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007887
Jisi Liu885b6122015-02-28 14:51:22 -08007888#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00007889#undef ZR_
7890
kenton@google.com24bf56f2008-09-24 20:31:01 +00007891 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00007892 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08007893 if (_internal_metadata_.have_unknown_fields()) {
7894 mutable_unknown_fields()->Clear();
7895 }
temporal40ee5512008-07-10 02:12:20 +00007896}
7897
7898bool FileOptions::MergePartialFromCodedStream(
7899 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007900#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00007901 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007902 // @@protoc_insertion_point(parse_start:google.protobuf.FileOptions)
7903 for (;;) {
7904 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
7905 tag = p.first;
7906 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00007907 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00007908 // optional string java_package = 1;
7909 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007910 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007911 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7912 input, this->mutable_java_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007913 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007914 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007915 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007916 "google.protobuf.FileOptions.java_package");
kenton@google.comfccb1462009-12-18 02:11:36 +00007917 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007918 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007919 }
temporal40ee5512008-07-10 02:12:20 +00007920 if (input->ExpectTag(66)) goto parse_java_outer_classname;
7921 break;
7922 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007923
temporal40ee5512008-07-10 02:12:20 +00007924 // optional string java_outer_classname = 8;
7925 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007926 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007927 parse_java_outer_classname:
7928 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7929 input, this->mutable_java_outer_classname()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007930 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007931 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007932 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007933 "google.protobuf.FileOptions.java_outer_classname");
kenton@google.comfccb1462009-12-18 02:11:36 +00007934 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007935 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007936 }
temporal40ee5512008-07-10 02:12:20 +00007937 if (input->ExpectTag(72)) goto parse_optimize_for;
7938 break;
7939 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007940
kenton@google.comd37d46d2009-04-25 02:53:47 +00007941 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
temporal40ee5512008-07-10 02:12:20 +00007942 case 9: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007943 if (tag == 72) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007944 parse_optimize_for:
7945 int value;
7946 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7947 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
7948 input, &value)));
7949 if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) {
7950 set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value));
7951 } else {
7952 mutable_unknown_fields()->AddVarint(9, value);
7953 }
temporal40ee5512008-07-10 02:12:20 +00007954 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007955 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007956 }
7957 if (input->ExpectTag(80)) goto parse_java_multiple_files;
7958 break;
7959 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007960
temporal40ee5512008-07-10 02:12:20 +00007961 // optional bool java_multiple_files = 10 [default = false];
7962 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007963 if (tag == 80) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007964 parse_java_multiple_files:
7965 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7966 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7967 input, &java_multiple_files_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00007968 set_has_java_multiple_files();
kenton@google.comfccb1462009-12-18 02:11:36 +00007969 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007970 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007971 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007972 if (input->ExpectTag(90)) goto parse_go_package;
7973 break;
7974 }
7975
7976 // optional string go_package = 11;
7977 case 11: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007978 if (tag == 90) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007979 parse_go_package:
7980 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7981 input, this->mutable_go_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007982 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007983 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007984 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007985 "google.protobuf.FileOptions.go_package");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007986 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007987 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007988 }
kenton@google.comfccb1462009-12-18 02:11:36 +00007989 if (input->ExpectTag(128)) goto parse_cc_generic_services;
7990 break;
7991 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007992
liujisi@google.com33165fe2010-11-02 13:14:58 +00007993 // optional bool cc_generic_services = 16 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00007994 case 16: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007995 if (tag == 128) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007996 parse_cc_generic_services:
7997 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7998 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7999 input, &cc_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00008000 set_has_cc_generic_services();
kenton@google.comfccb1462009-12-18 02:11:36 +00008001 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008002 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00008003 }
8004 if (input->ExpectTag(136)) goto parse_java_generic_services;
8005 break;
8006 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008007
liujisi@google.com33165fe2010-11-02 13:14:58 +00008008 // optional bool java_generic_services = 17 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008009 case 17: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008010 if (tag == 136) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008011 parse_java_generic_services:
8012 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8013 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8014 input, &java_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00008015 set_has_java_generic_services();
kenton@google.comfccb1462009-12-18 02:11:36 +00008016 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008017 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00008018 }
8019 if (input->ExpectTag(144)) goto parse_py_generic_services;
8020 break;
8021 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008022
liujisi@google.com33165fe2010-11-02 13:14:58 +00008023 // optional bool py_generic_services = 18 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008024 case 18: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008025 if (tag == 144) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008026 parse_py_generic_services:
8027 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8028 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8029 input, &py_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00008030 set_has_py_generic_services();
8031 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008032 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008033 }
8034 if (input->ExpectTag(160)) goto parse_java_generate_equals_and_hash;
8035 break;
8036 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008037
liujisi@google.com33165fe2010-11-02 13:14:58 +00008038 // optional bool java_generate_equals_and_hash = 20 [default = false];
8039 case 20: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008040 if (tag == 160) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008041 parse_java_generate_equals_and_hash:
8042 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8043 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8044 input, &java_generate_equals_and_hash_)));
8045 set_has_java_generate_equals_and_hash();
kenton@google.comfccb1462009-12-18 02:11:36 +00008046 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008047 goto handle_unusual;
8048 }
8049 if (input->ExpectTag(184)) goto parse_deprecated;
8050 break;
8051 }
8052
8053 // optional bool deprecated = 23 [default = false];
8054 case 23: {
8055 if (tag == 184) {
8056 parse_deprecated:
8057 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8058 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8059 input, &deprecated_)));
8060 set_has_deprecated();
8061 } else {
8062 goto handle_unusual;
8063 }
8064 if (input->ExpectTag(216)) goto parse_java_string_check_utf8;
8065 break;
8066 }
8067
8068 // optional bool java_string_check_utf8 = 27 [default = false];
8069 case 27: {
8070 if (tag == 216) {
8071 parse_java_string_check_utf8:
8072 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8073 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8074 input, &java_string_check_utf8_)));
8075 set_has_java_string_check_utf8();
8076 } else {
8077 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00008078 }
Feng Xiaof157a562014-11-14 11:50:31 -08008079 if (input->ExpectTag(248)) goto parse_cc_enable_arenas;
8080 break;
8081 }
8082
8083 // optional bool cc_enable_arenas = 31 [default = false];
8084 case 31: {
8085 if (tag == 248) {
8086 parse_cc_enable_arenas:
8087 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8088 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8089 input, &cc_enable_arenas_)));
8090 set_has_cc_enable_arenas();
8091 } else {
8092 goto handle_unusual;
8093 }
Jisi Liu885b6122015-02-28 14:51:22 -08008094 if (input->ExpectTag(290)) goto parse_objc_class_prefix;
8095 break;
8096 }
8097
8098 // optional string objc_class_prefix = 36;
8099 case 36: {
8100 if (tag == 290) {
8101 parse_objc_class_prefix:
8102 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
8103 input, this->mutable_objc_class_prefix()));
8104 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8105 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
8106 ::google::protobuf::internal::WireFormat::PARSE,
8107 "google.protobuf.FileOptions.objc_class_prefix");
8108 } else {
8109 goto handle_unusual;
8110 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07008111 if (input->ExpectTag(298)) goto parse_csharp_namespace;
8112 break;
8113 }
8114
8115 // optional string csharp_namespace = 37;
8116 case 37: {
8117 if (tag == 298) {
8118 parse_csharp_namespace:
8119 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
8120 input, this->mutable_csharp_namespace()));
8121 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8122 this->csharp_namespace().data(), this->csharp_namespace().length(),
8123 ::google::protobuf::internal::WireFormat::PARSE,
8124 "google.protobuf.FileOptions.csharp_namespace");
8125 } else {
8126 goto handle_unusual;
8127 }
Xiao Hang801e9202015-07-27 17:46:22 -07008128 if (input->ExpectTag(304)) goto parse_javanano_use_deprecated_package;
8129 break;
8130 }
8131
Jisi Liu5221dcb2016-01-29 13:51:05 -08008132 // optional bool javanano_use_deprecated_package = 38 [deprecated = true];
Xiao Hang801e9202015-07-27 17:46:22 -07008133 case 38: {
8134 if (tag == 304) {
8135 parse_javanano_use_deprecated_package:
8136 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8137 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8138 input, &javanano_use_deprecated_package_)));
8139 set_has_javanano_use_deprecated_package();
8140 } else {
8141 goto handle_unusual;
8142 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008143 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
8144 break;
8145 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008146
kenton@google.com24bf56f2008-09-24 20:31:01 +00008147 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
8148 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008149 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008150 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -07008151 DO_(input->IncrementRecursionDepth());
8152 parse_loop_uninterpreted_option:
8153 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00008154 input, add_uninterpreted_option()));
8155 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008156 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +00008157 }
Bo Yang5db21732015-05-21 14:28:59 -07008158 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
8159 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +00008160 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00008161 break;
8162 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008163
temporal40ee5512008-07-10 02:12:20 +00008164 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008165 handle_unusual:
8166 if (tag == 0 ||
8167 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00008168 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008169 goto success;
temporal40ee5512008-07-10 02:12:20 +00008170 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008171 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008172 DO_(_extensions_.ParseField(tag, input, default_instance_,
8173 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00008174 continue;
8175 }
temporal40ee5512008-07-10 02:12:20 +00008176 DO_(::google::protobuf::internal::WireFormat::SkipField(
8177 input, tag, mutable_unknown_fields()));
8178 break;
8179 }
8180 }
8181 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008182success:
8183 // @@protoc_insertion_point(parse_success:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00008184 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00008185failure:
8186 // @@protoc_insertion_point(parse_failure:google.protobuf.FileOptions)
8187 return false;
temporal40ee5512008-07-10 02:12:20 +00008188#undef DO_
8189}
8190
kenton@google.comd37d46d2009-04-25 02:53:47 +00008191void FileOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00008192 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008193 // @@protoc_insertion_point(serialize_start:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00008194 // optional string java_package = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008195 if (has_java_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008196 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008197 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008198 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008199 "google.protobuf.FileOptions.java_package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008200 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00008201 1, this->java_package(), output);
temporal40ee5512008-07-10 02:12:20 +00008202 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008203
temporal40ee5512008-07-10 02:12:20 +00008204 // optional string java_outer_classname = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008205 if (has_java_outer_classname()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008206 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008207 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008208 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008209 "google.protobuf.FileOptions.java_outer_classname");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008210 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00008211 8, this->java_outer_classname(), output);
temporal40ee5512008-07-10 02:12:20 +00008212 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008213
kenton@google.comd37d46d2009-04-25 02:53:47 +00008214 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008215 if (has_optimize_for()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008216 ::google::protobuf::internal::WireFormatLite::WriteEnum(
8217 9, this->optimize_for(), output);
temporal40ee5512008-07-10 02:12:20 +00008218 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008219
temporal40ee5512008-07-10 02:12:20 +00008220 // optional bool java_multiple_files = 10 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008221 if (has_java_multiple_files()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008222 ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output);
temporal40ee5512008-07-10 02:12:20 +00008223 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008224
8225 // optional string go_package = 11;
8226 if (has_go_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008227 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008228 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008229 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008230 "google.protobuf.FileOptions.go_package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008231 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008232 11, this->go_package(), output);
8233 }
8234
liujisi@google.com33165fe2010-11-02 13:14:58 +00008235 // optional bool cc_generic_services = 16 [default = false];
8236 if (has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008237 ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output);
8238 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008239
liujisi@google.com33165fe2010-11-02 13:14:58 +00008240 // optional bool java_generic_services = 17 [default = false];
8241 if (has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008242 ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output);
8243 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008244
liujisi@google.com33165fe2010-11-02 13:14:58 +00008245 // optional bool py_generic_services = 18 [default = false];
8246 if (has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008247 ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output);
8248 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008249
liujisi@google.com33165fe2010-11-02 13:14:58 +00008250 // optional bool java_generate_equals_and_hash = 20 [default = false];
8251 if (has_java_generate_equals_and_hash()) {
8252 ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output);
8253 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008254
jieluo@google.com4de8f552014-07-18 00:47:59 +00008255 // optional bool deprecated = 23 [default = false];
8256 if (has_deprecated()) {
8257 ::google::protobuf::internal::WireFormatLite::WriteBool(23, this->deprecated(), output);
8258 }
8259
8260 // optional bool java_string_check_utf8 = 27 [default = false];
8261 if (has_java_string_check_utf8()) {
8262 ::google::protobuf::internal::WireFormatLite::WriteBool(27, this->java_string_check_utf8(), output);
8263 }
8264
Feng Xiaof157a562014-11-14 11:50:31 -08008265 // optional bool cc_enable_arenas = 31 [default = false];
8266 if (has_cc_enable_arenas()) {
8267 ::google::protobuf::internal::WireFormatLite::WriteBool(31, this->cc_enable_arenas(), output);
8268 }
8269
Jisi Liu885b6122015-02-28 14:51:22 -08008270 // optional string objc_class_prefix = 36;
8271 if (has_objc_class_prefix()) {
8272 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8273 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
8274 ::google::protobuf::internal::WireFormat::SERIALIZE,
8275 "google.protobuf.FileOptions.objc_class_prefix");
8276 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
8277 36, this->objc_class_prefix(), output);
8278 }
8279
Jan Tattermusch685ae362015-03-16 19:07:16 -07008280 // optional string csharp_namespace = 37;
8281 if (has_csharp_namespace()) {
8282 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8283 this->csharp_namespace().data(), this->csharp_namespace().length(),
8284 ::google::protobuf::internal::WireFormat::SERIALIZE,
8285 "google.protobuf.FileOptions.csharp_namespace");
8286 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
8287 37, this->csharp_namespace(), output);
8288 }
8289
Jisi Liu5221dcb2016-01-29 13:51:05 -08008290 // optional bool javanano_use_deprecated_package = 38 [deprecated = true];
Xiao Hang801e9202015-07-27 17:46:22 -07008291 if (has_javanano_use_deprecated_package()) {
8292 ::google::protobuf::internal::WireFormatLite::WriteBool(38, this->javanano_use_deprecated_package(), output);
8293 }
8294
kenton@google.com24bf56f2008-09-24 20:31:01 +00008295 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08008296 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008297 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00008298 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00008299 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008300
kenton@google.com24bf56f2008-09-24 20:31:01 +00008301 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008302 _extensions_.SerializeWithCachedSizes(
8303 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008304
Feng Xiao6ef984a2014-11-10 17:34:54 -08008305 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008306 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
8307 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00008308 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008309 // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008310}
8311
8312::google::protobuf::uint8* FileOptions::SerializeWithCachedSizesToArray(
8313 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008314 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008315 // optional string java_package = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008316 if (has_java_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008317 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008318 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008319 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008320 "google.protobuf.FileOptions.java_package");
kenton@google.com80b1d622009-07-29 01:13:20 +00008321 target =
8322 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8323 1, this->java_package(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008324 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008325
kenton@google.comd37d46d2009-04-25 02:53:47 +00008326 // optional string java_outer_classname = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008327 if (has_java_outer_classname()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008328 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008329 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008330 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008331 "google.protobuf.FileOptions.java_outer_classname");
kenton@google.com80b1d622009-07-29 01:13:20 +00008332 target =
8333 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8334 8, this->java_outer_classname(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008335 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008336
kenton@google.comd37d46d2009-04-25 02:53:47 +00008337 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008338 if (has_optimize_for()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008339 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
8340 9, this->optimize_for(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008341 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008342
kenton@google.comd37d46d2009-04-25 02:53:47 +00008343 // optional bool java_multiple_files = 10 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008344 if (has_java_multiple_files()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008345 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008346 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008347
8348 // optional string go_package = 11;
8349 if (has_go_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008350 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008351 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008352 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008353 "google.protobuf.FileOptions.go_package");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008354 target =
8355 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8356 11, this->go_package(), target);
8357 }
8358
liujisi@google.com33165fe2010-11-02 13:14:58 +00008359 // optional bool cc_generic_services = 16 [default = false];
8360 if (has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008361 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target);
8362 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008363
liujisi@google.com33165fe2010-11-02 13:14:58 +00008364 // optional bool java_generic_services = 17 [default = false];
8365 if (has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008366 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target);
8367 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008368
liujisi@google.com33165fe2010-11-02 13:14:58 +00008369 // optional bool py_generic_services = 18 [default = false];
8370 if (has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008371 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target);
8372 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008373
liujisi@google.com33165fe2010-11-02 13:14:58 +00008374 // optional bool java_generate_equals_and_hash = 20 [default = false];
8375 if (has_java_generate_equals_and_hash()) {
8376 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target);
8377 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008378
jieluo@google.com4de8f552014-07-18 00:47:59 +00008379 // optional bool deprecated = 23 [default = false];
8380 if (has_deprecated()) {
8381 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(23, this->deprecated(), target);
8382 }
8383
8384 // optional bool java_string_check_utf8 = 27 [default = false];
8385 if (has_java_string_check_utf8()) {
8386 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(27, this->java_string_check_utf8(), target);
8387 }
8388
Feng Xiaof157a562014-11-14 11:50:31 -08008389 // optional bool cc_enable_arenas = 31 [default = false];
8390 if (has_cc_enable_arenas()) {
8391 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(31, this->cc_enable_arenas(), target);
8392 }
8393
Jisi Liu885b6122015-02-28 14:51:22 -08008394 // optional string objc_class_prefix = 36;
8395 if (has_objc_class_prefix()) {
8396 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8397 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
8398 ::google::protobuf::internal::WireFormat::SERIALIZE,
8399 "google.protobuf.FileOptions.objc_class_prefix");
8400 target =
8401 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8402 36, this->objc_class_prefix(), target);
8403 }
8404
Jan Tattermusch685ae362015-03-16 19:07:16 -07008405 // optional string csharp_namespace = 37;
8406 if (has_csharp_namespace()) {
8407 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8408 this->csharp_namespace().data(), this->csharp_namespace().length(),
8409 ::google::protobuf::internal::WireFormat::SERIALIZE,
8410 "google.protobuf.FileOptions.csharp_namespace");
8411 target =
8412 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8413 37, this->csharp_namespace(), target);
8414 }
8415
Jisi Liu5221dcb2016-01-29 13:51:05 -08008416 // optional bool javanano_use_deprecated_package = 38 [deprecated = true];
Xiao Hang801e9202015-07-27 17:46:22 -07008417 if (has_javanano_use_deprecated_package()) {
8418 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(38, this->javanano_use_deprecated_package(), target);
8419 }
8420
kenton@google.comd37d46d2009-04-25 02:53:47 +00008421 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08008422 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008423 target = ::google::protobuf::internal::WireFormatLite::
8424 WriteMessageNoVirtualToArray(
8425 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008426 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008427
kenton@google.comd37d46d2009-04-25 02:53:47 +00008428 // Extension range [1000, 536870912)
8429 target = _extensions_.SerializeWithCachedSizesToArray(
8430 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008431
Feng Xiao6ef984a2014-11-10 17:34:54 -08008432 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008433 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
8434 unknown_fields(), target);
8435 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008436 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008437 return target;
temporal40ee5512008-07-10 02:12:20 +00008438}
8439
8440int FileOptions::ByteSize() const {
8441 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008442
Austin Schuh307af622015-06-05 22:46:01 -07008443 if (_has_bits_[0 / 32] & 255u) {
temporal40ee5512008-07-10 02:12:20 +00008444 // optional string java_package = 1;
8445 if (has_java_package()) {
8446 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008447 ::google::protobuf::internal::WireFormatLite::StringSize(
8448 this->java_package());
temporal40ee5512008-07-10 02:12:20 +00008449 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008450
temporal40ee5512008-07-10 02:12:20 +00008451 // optional string java_outer_classname = 8;
8452 if (has_java_outer_classname()) {
8453 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008454 ::google::protobuf::internal::WireFormatLite::StringSize(
8455 this->java_outer_classname());
temporal40ee5512008-07-10 02:12:20 +00008456 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008457
temporal40ee5512008-07-10 02:12:20 +00008458 // optional bool java_multiple_files = 10 [default = false];
8459 if (has_java_multiple_files()) {
8460 total_size += 1 + 1;
8461 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008462
liujisi@google.com33165fe2010-11-02 13:14:58 +00008463 // optional bool java_generate_equals_and_hash = 20 [default = false];
8464 if (has_java_generate_equals_and_hash()) {
8465 total_size += 2 + 1;
8466 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008467
jieluo@google.com4de8f552014-07-18 00:47:59 +00008468 // optional bool java_string_check_utf8 = 27 [default = false];
8469 if (has_java_string_check_utf8()) {
8470 total_size += 2 + 1;
8471 }
8472
kenton@google.comd37d46d2009-04-25 02:53:47 +00008473 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
temporal40ee5512008-07-10 02:12:20 +00008474 if (has_optimize_for()) {
8475 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008476 ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for());
temporal40ee5512008-07-10 02:12:20 +00008477 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008478
8479 // optional string go_package = 11;
8480 if (has_go_package()) {
8481 total_size += 1 +
8482 ::google::protobuf::internal::WireFormatLite::StringSize(
8483 this->go_package());
8484 }
8485
liujisi@google.com33165fe2010-11-02 13:14:58 +00008486 // optional bool cc_generic_services = 16 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008487 if (has_cc_generic_services()) {
8488 total_size += 2 + 1;
8489 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008490
jieluo@google.com4de8f552014-07-18 00:47:59 +00008491 }
Xiao Hang801e9202015-07-27 17:46:22 -07008492 if (_has_bits_[8 / 32] & 32512u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008493 // optional bool java_generic_services = 17 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008494 if (has_java_generic_services()) {
8495 total_size += 2 + 1;
8496 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008497
liujisi@google.com33165fe2010-11-02 13:14:58 +00008498 // optional bool py_generic_services = 18 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008499 if (has_py_generic_services()) {
8500 total_size += 2 + 1;
8501 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008502
jieluo@google.com4de8f552014-07-18 00:47:59 +00008503 // optional bool deprecated = 23 [default = false];
8504 if (has_deprecated()) {
8505 total_size += 2 + 1;
8506 }
8507
Feng Xiaof157a562014-11-14 11:50:31 -08008508 // optional bool cc_enable_arenas = 31 [default = false];
8509 if (has_cc_enable_arenas()) {
8510 total_size += 2 + 1;
8511 }
8512
Jisi Liu885b6122015-02-28 14:51:22 -08008513 // optional string objc_class_prefix = 36;
8514 if (has_objc_class_prefix()) {
8515 total_size += 2 +
8516 ::google::protobuf::internal::WireFormatLite::StringSize(
8517 this->objc_class_prefix());
8518 }
8519
Jan Tattermusch685ae362015-03-16 19:07:16 -07008520 // optional string csharp_namespace = 37;
8521 if (has_csharp_namespace()) {
8522 total_size += 2 +
8523 ::google::protobuf::internal::WireFormatLite::StringSize(
8524 this->csharp_namespace());
8525 }
8526
Jisi Liu5221dcb2016-01-29 13:51:05 -08008527 // optional bool javanano_use_deprecated_package = 38 [deprecated = true];
Xiao Hang801e9202015-07-27 17:46:22 -07008528 if (has_javanano_use_deprecated_package()) {
8529 total_size += 2 + 1;
8530 }
8531
temporal40ee5512008-07-10 02:12:20 +00008532 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008533 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00008534 total_size += 2 * this->uninterpreted_option_size();
8535 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00008536 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00008537 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00008538 this->uninterpreted_option(i));
8539 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008540
kenton@google.comd37d46d2009-04-25 02:53:47 +00008541 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008542
Feng Xiao6ef984a2014-11-10 17:34:54 -08008543 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00008544 total_size +=
8545 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
8546 unknown_fields());
8547 }
kenton@google.comfccb1462009-12-18 02:11:36 +00008548 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00008549 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00008550 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00008551 return total_size;
8552}
8553
8554void FileOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08008555 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07008556 const FileOptions* source =
8557 ::google::protobuf::internal::DynamicCastToGenerated<const FileOptions>(
8558 &from);
temporal40ee5512008-07-10 02:12:20 +00008559 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00008560 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00008561 } else {
8562 MergeFrom(*source);
8563 }
8564}
8565
8566void FileOptions::MergeFrom(const FileOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08008567 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +00008568 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00008569 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008570 if (from.has_java_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008571 set_has_java_package();
8572 java_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_package_);
temporal40ee5512008-07-10 02:12:20 +00008573 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008574 if (from.has_java_outer_classname()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008575 set_has_java_outer_classname();
8576 java_outer_classname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_outer_classname_);
temporal40ee5512008-07-10 02:12:20 +00008577 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008578 if (from.has_java_multiple_files()) {
temporal40ee5512008-07-10 02:12:20 +00008579 set_java_multiple_files(from.java_multiple_files());
8580 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008581 if (from.has_java_generate_equals_and_hash()) {
8582 set_java_generate_equals_and_hash(from.java_generate_equals_and_hash());
8583 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008584 if (from.has_java_string_check_utf8()) {
8585 set_java_string_check_utf8(from.java_string_check_utf8());
8586 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008587 if (from.has_optimize_for()) {
temporal40ee5512008-07-10 02:12:20 +00008588 set_optimize_for(from.optimize_for());
8589 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008590 if (from.has_go_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008591 set_has_go_package();
8592 go_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.go_package_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008593 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008594 if (from.has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008595 set_cc_generic_services(from.cc_generic_services());
8596 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008597 }
8598 if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008599 if (from.has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008600 set_java_generic_services(from.java_generic_services());
8601 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008602 if (from.has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008603 set_py_generic_services(from.py_generic_services());
8604 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008605 if (from.has_deprecated()) {
8606 set_deprecated(from.deprecated());
8607 }
Feng Xiaof157a562014-11-14 11:50:31 -08008608 if (from.has_cc_enable_arenas()) {
8609 set_cc_enable_arenas(from.cc_enable_arenas());
8610 }
Jisi Liu885b6122015-02-28 14:51:22 -08008611 if (from.has_objc_class_prefix()) {
8612 set_has_objc_class_prefix();
8613 objc_class_prefix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.objc_class_prefix_);
8614 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07008615 if (from.has_csharp_namespace()) {
8616 set_has_csharp_namespace();
8617 csharp_namespace_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace_);
8618 }
Xiao Hang801e9202015-07-27 17:46:22 -07008619 if (from.has_javanano_use_deprecated_package()) {
8620 set_javanano_use_deprecated_package(from.javanano_use_deprecated_package());
8621 }
temporal40ee5512008-07-10 02:12:20 +00008622 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008623 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08008624 if (from._internal_metadata_.have_unknown_fields()) {
8625 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
8626 }
temporal40ee5512008-07-10 02:12:20 +00008627}
8628
8629void FileOptions::CopyFrom(const ::google::protobuf::Message& from) {
8630 if (&from == this) return;
8631 Clear();
8632 MergeFrom(from);
8633}
8634
8635void FileOptions::CopyFrom(const FileOptions& from) {
8636 if (&from == this) return;
8637 Clear();
8638 MergeFrom(from);
8639}
8640
kenton@google.comceb561d2009-06-25 19:05:36 +00008641bool FileOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008642
jieluo@google.com4de8f552014-07-18 00:47:59 +00008643 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008644
kenton@google.comceb561d2009-06-25 19:05:36 +00008645 if (!_extensions_.IsInitialized()) return false; return true;
8646}
8647
kenton@google.com26bd9ee2008-11-21 00:06:27 +00008648void FileOptions::Swap(FileOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08008649 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08008650 InternalSwap(other);
8651}
8652void FileOptions::InternalSwap(FileOptions* other) {
8653 java_package_.Swap(&other->java_package_);
8654 java_outer_classname_.Swap(&other->java_outer_classname_);
8655 std::swap(java_multiple_files_, other->java_multiple_files_);
8656 std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_);
8657 std::swap(java_string_check_utf8_, other->java_string_check_utf8_);
8658 std::swap(optimize_for_, other->optimize_for_);
8659 go_package_.Swap(&other->go_package_);
8660 std::swap(cc_generic_services_, other->cc_generic_services_);
8661 std::swap(java_generic_services_, other->java_generic_services_);
8662 std::swap(py_generic_services_, other->py_generic_services_);
8663 std::swap(deprecated_, other->deprecated_);
Feng Xiaof157a562014-11-14 11:50:31 -08008664 std::swap(cc_enable_arenas_, other->cc_enable_arenas_);
Jisi Liu885b6122015-02-28 14:51:22 -08008665 objc_class_prefix_.Swap(&other->objc_class_prefix_);
Jan Tattermusch685ae362015-03-16 19:07:16 -07008666 csharp_namespace_.Swap(&other->csharp_namespace_);
Xiao Hang801e9202015-07-27 17:46:22 -07008667 std::swap(javanano_use_deprecated_package_, other->javanano_use_deprecated_package_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08008668 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
8669 std::swap(_has_bits_[0], other->_has_bits_[0]);
8670 _internal_metadata_.Swap(&other->_internal_metadata_);
8671 std::swap(_cached_size_, other->_cached_size_);
8672 _extensions_.Swap(&other->_extensions_);
8673}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00008674
kenton@google.com80b1d622009-07-29 01:13:20 +00008675::google::protobuf::Metadata FileOptions::GetMetadata() const {
8676 protobuf_AssignDescriptorsOnce();
8677 ::google::protobuf::Metadata metadata;
8678 metadata.descriptor = FileOptions_descriptor_;
8679 metadata.reflection = FileOptions_reflection_;
8680 return metadata;
temporal40ee5512008-07-10 02:12:20 +00008681}
8682
Jisi Liu885b6122015-02-28 14:51:22 -08008683#if PROTOBUF_INLINE_NOT_IN_HEADERS
8684// FileOptions
8685
8686// optional string java_package = 1;
Bo Yang5db21732015-05-21 14:28:59 -07008687bool FileOptions::has_java_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008688 return (_has_bits_[0] & 0x00000001u) != 0;
8689}
Bo Yang5db21732015-05-21 14:28:59 -07008690void FileOptions::set_has_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008691 _has_bits_[0] |= 0x00000001u;
8692}
Bo Yang5db21732015-05-21 14:28:59 -07008693void FileOptions::clear_has_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008694 _has_bits_[0] &= ~0x00000001u;
8695}
Bo Yang5db21732015-05-21 14:28:59 -07008696void FileOptions::clear_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008697 java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8698 clear_has_java_package();
8699}
8700 const ::std::string& FileOptions::java_package() const {
8701 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package)
8702 return java_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8703}
8704 void FileOptions::set_java_package(const ::std::string& value) {
8705 set_has_java_package();
8706 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8707 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package)
8708}
8709 void FileOptions::set_java_package(const char* value) {
8710 set_has_java_package();
8711 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8712 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package)
8713}
8714 void FileOptions::set_java_package(const char* value, size_t size) {
8715 set_has_java_package();
8716 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8717 ::std::string(reinterpret_cast<const char*>(value), size));
8718 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package)
8719}
8720 ::std::string* FileOptions::mutable_java_package() {
8721 set_has_java_package();
8722 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package)
8723 return java_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8724}
8725 ::std::string* FileOptions::release_java_package() {
8726 clear_has_java_package();
8727 return java_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8728}
8729 void FileOptions::set_allocated_java_package(::std::string* java_package) {
8730 if (java_package != NULL) {
8731 set_has_java_package();
8732 } else {
8733 clear_has_java_package();
8734 }
8735 java_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_package);
8736 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package)
8737}
8738
8739// optional string java_outer_classname = 8;
Bo Yang5db21732015-05-21 14:28:59 -07008740bool FileOptions::has_java_outer_classname() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008741 return (_has_bits_[0] & 0x00000002u) != 0;
8742}
Bo Yang5db21732015-05-21 14:28:59 -07008743void FileOptions::set_has_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008744 _has_bits_[0] |= 0x00000002u;
8745}
Bo Yang5db21732015-05-21 14:28:59 -07008746void FileOptions::clear_has_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008747 _has_bits_[0] &= ~0x00000002u;
8748}
Bo Yang5db21732015-05-21 14:28:59 -07008749void FileOptions::clear_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008750 java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8751 clear_has_java_outer_classname();
8752}
8753 const ::std::string& FileOptions::java_outer_classname() const {
8754 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname)
8755 return java_outer_classname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8756}
8757 void FileOptions::set_java_outer_classname(const ::std::string& value) {
8758 set_has_java_outer_classname();
8759 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8760 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname)
8761}
8762 void FileOptions::set_java_outer_classname(const char* value) {
8763 set_has_java_outer_classname();
8764 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8765 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_outer_classname)
8766}
8767 void FileOptions::set_java_outer_classname(const char* value, size_t size) {
8768 set_has_java_outer_classname();
8769 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8770 ::std::string(reinterpret_cast<const char*>(value), size));
8771 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname)
8772}
8773 ::std::string* FileOptions::mutable_java_outer_classname() {
8774 set_has_java_outer_classname();
8775 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname)
8776 return java_outer_classname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8777}
8778 ::std::string* FileOptions::release_java_outer_classname() {
8779 clear_has_java_outer_classname();
8780 return java_outer_classname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8781}
8782 void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) {
8783 if (java_outer_classname != NULL) {
8784 set_has_java_outer_classname();
8785 } else {
8786 clear_has_java_outer_classname();
8787 }
8788 java_outer_classname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_outer_classname);
8789 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname)
8790}
8791
8792// optional bool java_multiple_files = 10 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008793bool FileOptions::has_java_multiple_files() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008794 return (_has_bits_[0] & 0x00000004u) != 0;
8795}
Bo Yang5db21732015-05-21 14:28:59 -07008796void FileOptions::set_has_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008797 _has_bits_[0] |= 0x00000004u;
8798}
Bo Yang5db21732015-05-21 14:28:59 -07008799void FileOptions::clear_has_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008800 _has_bits_[0] &= ~0x00000004u;
8801}
Bo Yang5db21732015-05-21 14:28:59 -07008802void FileOptions::clear_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008803 java_multiple_files_ = false;
8804 clear_has_java_multiple_files();
8805}
8806 bool FileOptions::java_multiple_files() const {
8807 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_multiple_files)
8808 return java_multiple_files_;
8809}
8810 void FileOptions::set_java_multiple_files(bool value) {
8811 set_has_java_multiple_files();
8812 java_multiple_files_ = value;
8813 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files)
8814}
8815
8816// optional bool java_generate_equals_and_hash = 20 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008817bool FileOptions::has_java_generate_equals_and_hash() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008818 return (_has_bits_[0] & 0x00000008u) != 0;
8819}
Bo Yang5db21732015-05-21 14:28:59 -07008820void FileOptions::set_has_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008821 _has_bits_[0] |= 0x00000008u;
8822}
Bo Yang5db21732015-05-21 14:28:59 -07008823void FileOptions::clear_has_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008824 _has_bits_[0] &= ~0x00000008u;
8825}
Bo Yang5db21732015-05-21 14:28:59 -07008826void FileOptions::clear_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008827 java_generate_equals_and_hash_ = false;
8828 clear_has_java_generate_equals_and_hash();
8829}
8830 bool FileOptions::java_generate_equals_and_hash() const {
8831 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash)
8832 return java_generate_equals_and_hash_;
8833}
8834 void FileOptions::set_java_generate_equals_and_hash(bool value) {
8835 set_has_java_generate_equals_and_hash();
8836 java_generate_equals_and_hash_ = value;
8837 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generate_equals_and_hash)
8838}
8839
8840// optional bool java_string_check_utf8 = 27 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008841bool FileOptions::has_java_string_check_utf8() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008842 return (_has_bits_[0] & 0x00000010u) != 0;
8843}
Bo Yang5db21732015-05-21 14:28:59 -07008844void FileOptions::set_has_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008845 _has_bits_[0] |= 0x00000010u;
8846}
Bo Yang5db21732015-05-21 14:28:59 -07008847void FileOptions::clear_has_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008848 _has_bits_[0] &= ~0x00000010u;
8849}
Bo Yang5db21732015-05-21 14:28:59 -07008850void FileOptions::clear_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008851 java_string_check_utf8_ = false;
8852 clear_has_java_string_check_utf8();
8853}
8854 bool FileOptions::java_string_check_utf8() const {
8855 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_string_check_utf8)
8856 return java_string_check_utf8_;
8857}
8858 void FileOptions::set_java_string_check_utf8(bool value) {
8859 set_has_java_string_check_utf8();
8860 java_string_check_utf8_ = value;
8861 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_string_check_utf8)
8862}
8863
8864// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
Bo Yang5db21732015-05-21 14:28:59 -07008865bool FileOptions::has_optimize_for() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008866 return (_has_bits_[0] & 0x00000020u) != 0;
8867}
Bo Yang5db21732015-05-21 14:28:59 -07008868void FileOptions::set_has_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008869 _has_bits_[0] |= 0x00000020u;
8870}
Bo Yang5db21732015-05-21 14:28:59 -07008871void FileOptions::clear_has_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008872 _has_bits_[0] &= ~0x00000020u;
8873}
Bo Yang5db21732015-05-21 14:28:59 -07008874void FileOptions::clear_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008875 optimize_for_ = 1;
8876 clear_has_optimize_for();
8877}
8878 ::google::protobuf::FileOptions_OptimizeMode FileOptions::optimize_for() const {
8879 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.optimize_for)
8880 return static_cast< ::google::protobuf::FileOptions_OptimizeMode >(optimize_for_);
8881}
8882 void FileOptions::set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value) {
8883 assert(::google::protobuf::FileOptions_OptimizeMode_IsValid(value));
8884 set_has_optimize_for();
8885 optimize_for_ = value;
8886 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.optimize_for)
8887}
8888
8889// optional string go_package = 11;
Bo Yang5db21732015-05-21 14:28:59 -07008890bool FileOptions::has_go_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008891 return (_has_bits_[0] & 0x00000040u) != 0;
8892}
Bo Yang5db21732015-05-21 14:28:59 -07008893void FileOptions::set_has_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008894 _has_bits_[0] |= 0x00000040u;
8895}
Bo Yang5db21732015-05-21 14:28:59 -07008896void FileOptions::clear_has_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008897 _has_bits_[0] &= ~0x00000040u;
8898}
Bo Yang5db21732015-05-21 14:28:59 -07008899void FileOptions::clear_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008900 go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8901 clear_has_go_package();
8902}
8903 const ::std::string& FileOptions::go_package() const {
8904 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package)
8905 return go_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8906}
8907 void FileOptions::set_go_package(const ::std::string& value) {
8908 set_has_go_package();
8909 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8910 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package)
8911}
8912 void FileOptions::set_go_package(const char* value) {
8913 set_has_go_package();
8914 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8915 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package)
8916}
8917 void FileOptions::set_go_package(const char* value, size_t size) {
8918 set_has_go_package();
8919 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8920 ::std::string(reinterpret_cast<const char*>(value), size));
8921 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package)
8922}
8923 ::std::string* FileOptions::mutable_go_package() {
8924 set_has_go_package();
8925 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package)
8926 return go_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8927}
8928 ::std::string* FileOptions::release_go_package() {
8929 clear_has_go_package();
8930 return go_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8931}
8932 void FileOptions::set_allocated_go_package(::std::string* go_package) {
8933 if (go_package != NULL) {
8934 set_has_go_package();
8935 } else {
8936 clear_has_go_package();
8937 }
8938 go_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), go_package);
8939 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package)
8940}
8941
8942// optional bool cc_generic_services = 16 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008943bool FileOptions::has_cc_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008944 return (_has_bits_[0] & 0x00000080u) != 0;
8945}
Bo Yang5db21732015-05-21 14:28:59 -07008946void FileOptions::set_has_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008947 _has_bits_[0] |= 0x00000080u;
8948}
Bo Yang5db21732015-05-21 14:28:59 -07008949void FileOptions::clear_has_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008950 _has_bits_[0] &= ~0x00000080u;
8951}
Bo Yang5db21732015-05-21 14:28:59 -07008952void FileOptions::clear_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008953 cc_generic_services_ = false;
8954 clear_has_cc_generic_services();
8955}
8956 bool FileOptions::cc_generic_services() const {
8957 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services)
8958 return cc_generic_services_;
8959}
8960 void FileOptions::set_cc_generic_services(bool value) {
8961 set_has_cc_generic_services();
8962 cc_generic_services_ = value;
8963 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_generic_services)
8964}
8965
8966// optional bool java_generic_services = 17 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008967bool FileOptions::has_java_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008968 return (_has_bits_[0] & 0x00000100u) != 0;
8969}
Bo Yang5db21732015-05-21 14:28:59 -07008970void FileOptions::set_has_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008971 _has_bits_[0] |= 0x00000100u;
8972}
Bo Yang5db21732015-05-21 14:28:59 -07008973void FileOptions::clear_has_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008974 _has_bits_[0] &= ~0x00000100u;
8975}
Bo Yang5db21732015-05-21 14:28:59 -07008976void FileOptions::clear_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008977 java_generic_services_ = false;
8978 clear_has_java_generic_services();
8979}
8980 bool FileOptions::java_generic_services() const {
8981 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generic_services)
8982 return java_generic_services_;
8983}
8984 void FileOptions::set_java_generic_services(bool value) {
8985 set_has_java_generic_services();
8986 java_generic_services_ = value;
8987 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generic_services)
8988}
8989
8990// optional bool py_generic_services = 18 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008991bool FileOptions::has_py_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008992 return (_has_bits_[0] & 0x00000200u) != 0;
8993}
Bo Yang5db21732015-05-21 14:28:59 -07008994void FileOptions::set_has_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008995 _has_bits_[0] |= 0x00000200u;
8996}
Bo Yang5db21732015-05-21 14:28:59 -07008997void FileOptions::clear_has_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008998 _has_bits_[0] &= ~0x00000200u;
8999}
Bo Yang5db21732015-05-21 14:28:59 -07009000void FileOptions::clear_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08009001 py_generic_services_ = false;
9002 clear_has_py_generic_services();
9003}
9004 bool FileOptions::py_generic_services() const {
9005 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.py_generic_services)
9006 return py_generic_services_;
9007}
9008 void FileOptions::set_py_generic_services(bool value) {
9009 set_has_py_generic_services();
9010 py_generic_services_ = value;
9011 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.py_generic_services)
9012}
9013
9014// optional bool deprecated = 23 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009015bool FileOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009016 return (_has_bits_[0] & 0x00000400u) != 0;
9017}
Bo Yang5db21732015-05-21 14:28:59 -07009018void FileOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009019 _has_bits_[0] |= 0x00000400u;
9020}
Bo Yang5db21732015-05-21 14:28:59 -07009021void FileOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009022 _has_bits_[0] &= ~0x00000400u;
9023}
Bo Yang5db21732015-05-21 14:28:59 -07009024void FileOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009025 deprecated_ = false;
9026 clear_has_deprecated();
9027}
9028 bool FileOptions::deprecated() const {
9029 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.deprecated)
9030 return deprecated_;
9031}
9032 void FileOptions::set_deprecated(bool value) {
9033 set_has_deprecated();
9034 deprecated_ = value;
9035 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.deprecated)
9036}
9037
9038// optional bool cc_enable_arenas = 31 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009039bool FileOptions::has_cc_enable_arenas() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009040 return (_has_bits_[0] & 0x00000800u) != 0;
9041}
Bo Yang5db21732015-05-21 14:28:59 -07009042void FileOptions::set_has_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08009043 _has_bits_[0] |= 0x00000800u;
9044}
Bo Yang5db21732015-05-21 14:28:59 -07009045void FileOptions::clear_has_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08009046 _has_bits_[0] &= ~0x00000800u;
9047}
Bo Yang5db21732015-05-21 14:28:59 -07009048void FileOptions::clear_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08009049 cc_enable_arenas_ = false;
9050 clear_has_cc_enable_arenas();
9051}
9052 bool FileOptions::cc_enable_arenas() const {
9053 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_enable_arenas)
9054 return cc_enable_arenas_;
9055}
9056 void FileOptions::set_cc_enable_arenas(bool value) {
9057 set_has_cc_enable_arenas();
9058 cc_enable_arenas_ = value;
9059 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_enable_arenas)
9060}
9061
9062// optional string objc_class_prefix = 36;
Bo Yang5db21732015-05-21 14:28:59 -07009063bool FileOptions::has_objc_class_prefix() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009064 return (_has_bits_[0] & 0x00001000u) != 0;
9065}
Bo Yang5db21732015-05-21 14:28:59 -07009066void FileOptions::set_has_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08009067 _has_bits_[0] |= 0x00001000u;
9068}
Bo Yang5db21732015-05-21 14:28:59 -07009069void FileOptions::clear_has_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08009070 _has_bits_[0] &= ~0x00001000u;
9071}
Bo Yang5db21732015-05-21 14:28:59 -07009072void FileOptions::clear_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08009073 objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9074 clear_has_objc_class_prefix();
9075}
9076 const ::std::string& FileOptions::objc_class_prefix() const {
9077 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix)
9078 return objc_class_prefix_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9079}
9080 void FileOptions::set_objc_class_prefix(const ::std::string& value) {
9081 set_has_objc_class_prefix();
9082 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
9083 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix)
9084}
9085 void FileOptions::set_objc_class_prefix(const char* value) {
9086 set_has_objc_class_prefix();
9087 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
9088 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.objc_class_prefix)
9089}
9090 void FileOptions::set_objc_class_prefix(const char* value, size_t size) {
9091 set_has_objc_class_prefix();
9092 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
9093 ::std::string(reinterpret_cast<const char*>(value), size));
9094 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.objc_class_prefix)
9095}
9096 ::std::string* FileOptions::mutable_objc_class_prefix() {
9097 set_has_objc_class_prefix();
9098 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix)
9099 return objc_class_prefix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9100}
9101 ::std::string* FileOptions::release_objc_class_prefix() {
9102 clear_has_objc_class_prefix();
9103 return objc_class_prefix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9104}
9105 void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_class_prefix) {
9106 if (objc_class_prefix != NULL) {
9107 set_has_objc_class_prefix();
9108 } else {
9109 clear_has_objc_class_prefix();
9110 }
9111 objc_class_prefix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), objc_class_prefix);
9112 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix)
9113}
9114
Jan Tattermusch685ae362015-03-16 19:07:16 -07009115// optional string csharp_namespace = 37;
Bo Yang5db21732015-05-21 14:28:59 -07009116bool FileOptions::has_csharp_namespace() const {
Jan Tattermusch685ae362015-03-16 19:07:16 -07009117 return (_has_bits_[0] & 0x00002000u) != 0;
9118}
Bo Yang5db21732015-05-21 14:28:59 -07009119void FileOptions::set_has_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07009120 _has_bits_[0] |= 0x00002000u;
9121}
Bo Yang5db21732015-05-21 14:28:59 -07009122void FileOptions::clear_has_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07009123 _has_bits_[0] &= ~0x00002000u;
9124}
Bo Yang5db21732015-05-21 14:28:59 -07009125void FileOptions::clear_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07009126 csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9127 clear_has_csharp_namespace();
9128}
9129 const ::std::string& FileOptions::csharp_namespace() const {
9130 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace)
9131 return csharp_namespace_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9132}
9133 void FileOptions::set_csharp_namespace(const ::std::string& value) {
9134 set_has_csharp_namespace();
9135 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
9136 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace)
9137}
9138 void FileOptions::set_csharp_namespace(const char* value) {
9139 set_has_csharp_namespace();
9140 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
9141 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.csharp_namespace)
9142}
9143 void FileOptions::set_csharp_namespace(const char* value, size_t size) {
9144 set_has_csharp_namespace();
9145 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
9146 ::std::string(reinterpret_cast<const char*>(value), size));
9147 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.csharp_namespace)
9148}
9149 ::std::string* FileOptions::mutable_csharp_namespace() {
9150 set_has_csharp_namespace();
9151 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace)
9152 return csharp_namespace_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9153}
9154 ::std::string* FileOptions::release_csharp_namespace() {
9155 clear_has_csharp_namespace();
9156 return csharp_namespace_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9157}
9158 void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_namespace) {
9159 if (csharp_namespace != NULL) {
9160 set_has_csharp_namespace();
9161 } else {
9162 clear_has_csharp_namespace();
9163 }
9164 csharp_namespace_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), csharp_namespace);
9165 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
9166}
9167
Jisi Liu5221dcb2016-01-29 13:51:05 -08009168// optional bool javanano_use_deprecated_package = 38 [deprecated = true];
Xiao Hang801e9202015-07-27 17:46:22 -07009169bool FileOptions::has_javanano_use_deprecated_package() const {
9170 return (_has_bits_[0] & 0x00004000u) != 0;
9171}
9172void FileOptions::set_has_javanano_use_deprecated_package() {
9173 _has_bits_[0] |= 0x00004000u;
9174}
9175void FileOptions::clear_has_javanano_use_deprecated_package() {
9176 _has_bits_[0] &= ~0x00004000u;
9177}
9178void FileOptions::clear_javanano_use_deprecated_package() {
9179 javanano_use_deprecated_package_ = false;
9180 clear_has_javanano_use_deprecated_package();
9181}
9182 bool FileOptions::javanano_use_deprecated_package() const {
9183 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.javanano_use_deprecated_package)
9184 return javanano_use_deprecated_package_;
9185}
9186 void FileOptions::set_javanano_use_deprecated_package(bool value) {
9187 set_has_javanano_use_deprecated_package();
9188 javanano_use_deprecated_package_ = value;
9189 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.javanano_use_deprecated_package)
9190}
9191
Jisi Liu885b6122015-02-28 14:51:22 -08009192// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -07009193int FileOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009194 return uninterpreted_option_.size();
9195}
Bo Yang5db21732015-05-21 14:28:59 -07009196void FileOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009197 uninterpreted_option_.Clear();
9198}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009199const ::google::protobuf::UninterpretedOption& FileOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08009200 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.uninterpreted_option)
9201 return uninterpreted_option_.Get(index);
9202}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009203::google::protobuf::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08009204 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.uninterpreted_option)
9205 return uninterpreted_option_.Mutable(index);
9206}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009207::google::protobuf::UninterpretedOption* FileOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009208 // @@protoc_insertion_point(field_add:google.protobuf.FileOptions.uninterpreted_option)
9209 return uninterpreted_option_.Add();
9210}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009211::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -08009212FileOptions::mutable_uninterpreted_option() {
9213 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option)
9214 return &uninterpreted_option_;
9215}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009216const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
9217FileOptions::uninterpreted_option() const {
9218 // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option)
9219 return uninterpreted_option_;
9220}
Jisi Liu885b6122015-02-28 14:51:22 -08009221
9222#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00009223
9224// ===================================================================
9225
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009226#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009227const int MessageOptions::kMessageSetWireFormatFieldNumber;
kenton@google.com80b1d622009-07-29 01:13:20 +00009228const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009229const int MessageOptions::kDeprecatedFieldNumber;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009230const int MessageOptions::kMapEntryFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009231const int MessageOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009232#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00009233
kenton@google.com573989f2009-10-30 22:02:17 +00009234MessageOptions::MessageOptions()
Bo Yang5db21732015-05-21 14:28:59 -07009235 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009236 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009237 // @@protoc_insertion_point(constructor:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009238}
9239
kenton@google.com80b1d622009-07-29 01:13:20 +00009240void MessageOptions::InitAsDefaultInstance() {
9241}
kenton@google.com24bf56f2008-09-24 20:31:01 +00009242
kenton@google.com573989f2009-10-30 22:02:17 +00009243MessageOptions::MessageOptions(const MessageOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08009244 : ::google::protobuf::Message(),
9245 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009246 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00009247 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009248 // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009249}
9250
kenton@google.comd37d46d2009-04-25 02:53:47 +00009251void MessageOptions::SharedCtor() {
9252 _cached_size_ = 0;
9253 message_set_wire_format_ = false;
kenton@google.com80b1d622009-07-29 01:13:20 +00009254 no_standard_descriptor_accessor_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009255 deprecated_ = false;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009256 map_entry_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009257 ::memset(_has_bits_, 0, sizeof(_has_bits_));
9258}
9259
temporal40ee5512008-07-10 02:12:20 +00009260MessageOptions::~MessageOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009261 // @@protoc_insertion_point(destructor:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009262 SharedDtor();
9263}
9264
9265void MessageOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009266 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00009267 }
9268}
9269
kenton@google.comfccb1462009-12-18 02:11:36 +00009270void MessageOptions::SetCachedSize(int size) const {
9271 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
9272 _cached_size_ = size;
9273 GOOGLE_SAFE_CONCURRENT_WRITES_END();
9274}
temporal40ee5512008-07-10 02:12:20 +00009275const ::google::protobuf::Descriptor* MessageOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009276 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009277 return MessageOptions_descriptor_;
9278}
9279
kenton@google.com24bf56f2008-09-24 20:31:01 +00009280const MessageOptions& MessageOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00009281 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
9282 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009283}
9284
9285MessageOptions* MessageOptions::default_instance_ = NULL;
9286
Feng Xiao6ef984a2014-11-10 17:34:54 -08009287MessageOptions* MessageOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08009288 MessageOptions* n = new MessageOptions;
9289 if (arena != NULL) {
9290 arena->Own(n);
9291 }
9292 return n;
temporal40ee5512008-07-10 02:12:20 +00009293}
9294
9295void MessageOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009296 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08009297#define ZR_HELPER_(f) reinterpret_cast<char*>(\
9298 &reinterpret_cast<MessageOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009299
Jisi Liu885b6122015-02-28 14:51:22 -08009300#define ZR_(first, last) do {\
9301 ::memset(&first, 0,\
9302 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
9303} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009304
Feng Xiao6ef984a2014-11-10 17:34:54 -08009305 ZR_(message_set_wire_format_, map_entry_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009306
Jisi Liu885b6122015-02-28 14:51:22 -08009307#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00009308#undef ZR_
9309
kenton@google.com24bf56f2008-09-24 20:31:01 +00009310 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00009311 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08009312 if (_internal_metadata_.have_unknown_fields()) {
9313 mutable_unknown_fields()->Clear();
9314 }
temporal40ee5512008-07-10 02:12:20 +00009315}
9316
9317bool MessageOptions::MergePartialFromCodedStream(
9318 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009319#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00009320 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009321 // @@protoc_insertion_point(parse_start:google.protobuf.MessageOptions)
9322 for (;;) {
9323 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
9324 tag = p.first;
9325 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009326 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00009327 // optional bool message_set_wire_format = 1 [default = false];
9328 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009329 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009330 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9331 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9332 input, &message_set_wire_format_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009333 set_has_message_set_wire_format();
kenton@google.comfccb1462009-12-18 02:11:36 +00009334 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009335 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00009336 }
kenton@google.com80b1d622009-07-29 01:13:20 +00009337 if (input->ExpectTag(16)) goto parse_no_standard_descriptor_accessor;
9338 break;
9339 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009340
kenton@google.com80b1d622009-07-29 01:13:20 +00009341 // optional bool no_standard_descriptor_accessor = 2 [default = false];
9342 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009343 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009344 parse_no_standard_descriptor_accessor:
9345 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9346 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9347 input, &no_standard_descriptor_accessor_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009348 set_has_no_standard_descriptor_accessor();
kenton@google.comfccb1462009-12-18 02:11:36 +00009349 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009350 goto handle_unusual;
9351 }
9352 if (input->ExpectTag(24)) goto parse_deprecated;
9353 break;
9354 }
9355
9356 // optional bool deprecated = 3 [default = false];
9357 case 3: {
9358 if (tag == 24) {
9359 parse_deprecated:
9360 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9361 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9362 input, &deprecated_)));
9363 set_has_deprecated();
9364 } else {
9365 goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009366 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08009367 if (input->ExpectTag(56)) goto parse_map_entry;
9368 break;
9369 }
9370
9371 // optional bool map_entry = 7;
9372 case 7: {
9373 if (tag == 56) {
9374 parse_map_entry:
9375 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9376 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9377 input, &map_entry_)));
9378 set_has_map_entry();
9379 } else {
9380 goto handle_unusual;
9381 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009382 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
9383 break;
9384 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009385
kenton@google.com24bf56f2008-09-24 20:31:01 +00009386 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
9387 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009388 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009389 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -07009390 DO_(input->IncrementRecursionDepth());
9391 parse_loop_uninterpreted_option:
9392 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00009393 input, add_uninterpreted_option()));
9394 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009395 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009396 }
Bo Yang5db21732015-05-21 14:28:59 -07009397 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
9398 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009399 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00009400 break;
9401 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009402
temporal40ee5512008-07-10 02:12:20 +00009403 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009404 handle_unusual:
9405 if (tag == 0 ||
9406 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00009407 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009408 goto success;
temporal40ee5512008-07-10 02:12:20 +00009409 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009410 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009411 DO_(_extensions_.ParseField(tag, input, default_instance_,
9412 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00009413 continue;
9414 }
temporal40ee5512008-07-10 02:12:20 +00009415 DO_(::google::protobuf::internal::WireFormat::SkipField(
9416 input, tag, mutable_unknown_fields()));
9417 break;
9418 }
9419 }
9420 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009421success:
9422 // @@protoc_insertion_point(parse_success:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009423 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009424failure:
9425 // @@protoc_insertion_point(parse_failure:google.protobuf.MessageOptions)
9426 return false;
temporal40ee5512008-07-10 02:12:20 +00009427#undef DO_
9428}
9429
kenton@google.comd37d46d2009-04-25 02:53:47 +00009430void MessageOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00009431 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009432 // @@protoc_insertion_point(serialize_start:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009433 // optional bool message_set_wire_format = 1 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009434 if (has_message_set_wire_format()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009435 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output);
9436 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009437
kenton@google.com80b1d622009-07-29 01:13:20 +00009438 // optional bool no_standard_descriptor_accessor = 2 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009439 if (has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009440 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output);
temporal40ee5512008-07-10 02:12:20 +00009441 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009442
jieluo@google.com4de8f552014-07-18 00:47:59 +00009443 // optional bool deprecated = 3 [default = false];
9444 if (has_deprecated()) {
9445 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
9446 }
9447
Feng Xiao6ef984a2014-11-10 17:34:54 -08009448 // optional bool map_entry = 7;
9449 if (has_map_entry()) {
9450 ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->map_entry(), output);
9451 }
9452
kenton@google.com24bf56f2008-09-24 20:31:01 +00009453 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08009454 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009455 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00009456 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00009457 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009458
kenton@google.com24bf56f2008-09-24 20:31:01 +00009459 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009460 _extensions_.SerializeWithCachedSizes(
9461 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009462
Feng Xiao6ef984a2014-11-10 17:34:54 -08009463 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009464 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
9465 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00009466 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009467 // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009468}
9469
9470::google::protobuf::uint8* MessageOptions::SerializeWithCachedSizesToArray(
9471 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009472 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009473 // optional bool message_set_wire_format = 1 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009474 if (has_message_set_wire_format()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009475 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target);
9476 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009477
kenton@google.com80b1d622009-07-29 01:13:20 +00009478 // optional bool no_standard_descriptor_accessor = 2 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009479 if (has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009480 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009481 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009482
jieluo@google.com4de8f552014-07-18 00:47:59 +00009483 // optional bool deprecated = 3 [default = false];
9484 if (has_deprecated()) {
9485 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
9486 }
9487
Feng Xiao6ef984a2014-11-10 17:34:54 -08009488 // optional bool map_entry = 7;
9489 if (has_map_entry()) {
9490 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->map_entry(), target);
9491 }
9492
kenton@google.comd37d46d2009-04-25 02:53:47 +00009493 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08009494 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009495 target = ::google::protobuf::internal::WireFormatLite::
9496 WriteMessageNoVirtualToArray(
9497 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009498 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009499
kenton@google.comd37d46d2009-04-25 02:53:47 +00009500 // Extension range [1000, 536870912)
9501 target = _extensions_.SerializeWithCachedSizesToArray(
9502 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009503
Feng Xiao6ef984a2014-11-10 17:34:54 -08009504 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009505 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
9506 unknown_fields(), target);
9507 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009508 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009509 return target;
temporal40ee5512008-07-10 02:12:20 +00009510}
9511
9512int MessageOptions::ByteSize() const {
9513 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009514
Austin Schuh307af622015-06-05 22:46:01 -07009515 if (_has_bits_[0 / 32] & 15u) {
temporal40ee5512008-07-10 02:12:20 +00009516 // optional bool message_set_wire_format = 1 [default = false];
9517 if (has_message_set_wire_format()) {
9518 total_size += 1 + 1;
9519 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009520
kenton@google.com80b1d622009-07-29 01:13:20 +00009521 // optional bool no_standard_descriptor_accessor = 2 [default = false];
9522 if (has_no_standard_descriptor_accessor()) {
9523 total_size += 1 + 1;
9524 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009525
jieluo@google.com4de8f552014-07-18 00:47:59 +00009526 // optional bool deprecated = 3 [default = false];
9527 if (has_deprecated()) {
9528 total_size += 1 + 1;
9529 }
9530
Feng Xiao6ef984a2014-11-10 17:34:54 -08009531 // optional bool map_entry = 7;
9532 if (has_map_entry()) {
9533 total_size += 1 + 1;
9534 }
9535
temporal40ee5512008-07-10 02:12:20 +00009536 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009537 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00009538 total_size += 2 * this->uninterpreted_option_size();
9539 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009540 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00009541 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00009542 this->uninterpreted_option(i));
9543 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009544
kenton@google.comd37d46d2009-04-25 02:53:47 +00009545 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009546
Feng Xiao6ef984a2014-11-10 17:34:54 -08009547 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00009548 total_size +=
9549 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
9550 unknown_fields());
9551 }
kenton@google.comfccb1462009-12-18 02:11:36 +00009552 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00009553 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00009554 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00009555 return total_size;
9556}
9557
9558void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08009559 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07009560 const MessageOptions* source =
9561 ::google::protobuf::internal::DynamicCastToGenerated<const MessageOptions>(
9562 &from);
temporal40ee5512008-07-10 02:12:20 +00009563 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00009564 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00009565 } else {
9566 MergeFrom(*source);
9567 }
9568}
9569
9570void MessageOptions::MergeFrom(const MessageOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08009571 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +00009572 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00009573 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00009574 if (from.has_message_set_wire_format()) {
temporal40ee5512008-07-10 02:12:20 +00009575 set_message_set_wire_format(from.message_set_wire_format());
9576 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00009577 if (from.has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009578 set_no_standard_descriptor_accessor(from.no_standard_descriptor_accessor());
9579 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009580 if (from.has_deprecated()) {
9581 set_deprecated(from.deprecated());
9582 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08009583 if (from.has_map_entry()) {
9584 set_map_entry(from.map_entry());
9585 }
temporal40ee5512008-07-10 02:12:20 +00009586 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009587 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08009588 if (from._internal_metadata_.have_unknown_fields()) {
9589 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
9590 }
temporal40ee5512008-07-10 02:12:20 +00009591}
9592
9593void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) {
9594 if (&from == this) return;
9595 Clear();
9596 MergeFrom(from);
9597}
9598
9599void MessageOptions::CopyFrom(const MessageOptions& from) {
9600 if (&from == this) return;
9601 Clear();
9602 MergeFrom(from);
9603}
9604
kenton@google.comceb561d2009-06-25 19:05:36 +00009605bool MessageOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009606
jieluo@google.com4de8f552014-07-18 00:47:59 +00009607 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009608
kenton@google.comceb561d2009-06-25 19:05:36 +00009609 if (!_extensions_.IsInitialized()) return false; return true;
9610}
9611
kenton@google.com26bd9ee2008-11-21 00:06:27 +00009612void MessageOptions::Swap(MessageOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08009613 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009614 InternalSwap(other);
9615}
9616void MessageOptions::InternalSwap(MessageOptions* other) {
9617 std::swap(message_set_wire_format_, other->message_set_wire_format_);
9618 std::swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_);
9619 std::swap(deprecated_, other->deprecated_);
9620 std::swap(map_entry_, other->map_entry_);
9621 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
9622 std::swap(_has_bits_[0], other->_has_bits_[0]);
9623 _internal_metadata_.Swap(&other->_internal_metadata_);
9624 std::swap(_cached_size_, other->_cached_size_);
9625 _extensions_.Swap(&other->_extensions_);
9626}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00009627
kenton@google.com80b1d622009-07-29 01:13:20 +00009628::google::protobuf::Metadata MessageOptions::GetMetadata() const {
9629 protobuf_AssignDescriptorsOnce();
9630 ::google::protobuf::Metadata metadata;
9631 metadata.descriptor = MessageOptions_descriptor_;
9632 metadata.reflection = MessageOptions_reflection_;
9633 return metadata;
temporal40ee5512008-07-10 02:12:20 +00009634}
9635
Jisi Liu885b6122015-02-28 14:51:22 -08009636#if PROTOBUF_INLINE_NOT_IN_HEADERS
9637// MessageOptions
9638
9639// optional bool message_set_wire_format = 1 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009640bool MessageOptions::has_message_set_wire_format() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009641 return (_has_bits_[0] & 0x00000001u) != 0;
9642}
Bo Yang5db21732015-05-21 14:28:59 -07009643void MessageOptions::set_has_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009644 _has_bits_[0] |= 0x00000001u;
9645}
Bo Yang5db21732015-05-21 14:28:59 -07009646void MessageOptions::clear_has_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009647 _has_bits_[0] &= ~0x00000001u;
9648}
Bo Yang5db21732015-05-21 14:28:59 -07009649void MessageOptions::clear_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009650 message_set_wire_format_ = false;
9651 clear_has_message_set_wire_format();
9652}
9653 bool MessageOptions::message_set_wire_format() const {
9654 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.message_set_wire_format)
9655 return message_set_wire_format_;
9656}
9657 void MessageOptions::set_message_set_wire_format(bool value) {
9658 set_has_message_set_wire_format();
9659 message_set_wire_format_ = value;
9660 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.message_set_wire_format)
9661}
9662
9663// optional bool no_standard_descriptor_accessor = 2 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009664bool MessageOptions::has_no_standard_descriptor_accessor() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009665 return (_has_bits_[0] & 0x00000002u) != 0;
9666}
Bo Yang5db21732015-05-21 14:28:59 -07009667void MessageOptions::set_has_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009668 _has_bits_[0] |= 0x00000002u;
9669}
Bo Yang5db21732015-05-21 14:28:59 -07009670void MessageOptions::clear_has_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009671 _has_bits_[0] &= ~0x00000002u;
9672}
Bo Yang5db21732015-05-21 14:28:59 -07009673void MessageOptions::clear_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009674 no_standard_descriptor_accessor_ = false;
9675 clear_has_no_standard_descriptor_accessor();
9676}
9677 bool MessageOptions::no_standard_descriptor_accessor() const {
9678 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
9679 return no_standard_descriptor_accessor_;
9680}
9681 void MessageOptions::set_no_standard_descriptor_accessor(bool value) {
9682 set_has_no_standard_descriptor_accessor();
9683 no_standard_descriptor_accessor_ = value;
9684 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
9685}
9686
9687// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009688bool MessageOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009689 return (_has_bits_[0] & 0x00000004u) != 0;
9690}
Bo Yang5db21732015-05-21 14:28:59 -07009691void MessageOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009692 _has_bits_[0] |= 0x00000004u;
9693}
Bo Yang5db21732015-05-21 14:28:59 -07009694void MessageOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009695 _has_bits_[0] &= ~0x00000004u;
9696}
Bo Yang5db21732015-05-21 14:28:59 -07009697void MessageOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009698 deprecated_ = false;
9699 clear_has_deprecated();
9700}
9701 bool MessageOptions::deprecated() const {
9702 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated)
9703 return deprecated_;
9704}
9705 void MessageOptions::set_deprecated(bool value) {
9706 set_has_deprecated();
9707 deprecated_ = value;
9708 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated)
9709}
9710
9711// optional bool map_entry = 7;
Bo Yang5db21732015-05-21 14:28:59 -07009712bool MessageOptions::has_map_entry() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009713 return (_has_bits_[0] & 0x00000008u) != 0;
9714}
Bo Yang5db21732015-05-21 14:28:59 -07009715void MessageOptions::set_has_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009716 _has_bits_[0] |= 0x00000008u;
9717}
Bo Yang5db21732015-05-21 14:28:59 -07009718void MessageOptions::clear_has_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009719 _has_bits_[0] &= ~0x00000008u;
9720}
Bo Yang5db21732015-05-21 14:28:59 -07009721void MessageOptions::clear_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009722 map_entry_ = false;
9723 clear_has_map_entry();
9724}
9725 bool MessageOptions::map_entry() const {
9726 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry)
9727 return map_entry_;
9728}
9729 void MessageOptions::set_map_entry(bool value) {
9730 set_has_map_entry();
9731 map_entry_ = value;
9732 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry)
9733}
9734
9735// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -07009736int MessageOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009737 return uninterpreted_option_.size();
9738}
Bo Yang5db21732015-05-21 14:28:59 -07009739void MessageOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009740 uninterpreted_option_.Clear();
9741}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009742const ::google::protobuf::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08009743 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.uninterpreted_option)
9744 return uninterpreted_option_.Get(index);
9745}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009746::google::protobuf::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08009747 // @@protoc_insertion_point(field_mutable:google.protobuf.MessageOptions.uninterpreted_option)
9748 return uninterpreted_option_.Mutable(index);
9749}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009750::google::protobuf::UninterpretedOption* MessageOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009751 // @@protoc_insertion_point(field_add:google.protobuf.MessageOptions.uninterpreted_option)
9752 return uninterpreted_option_.Add();
9753}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009754::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -08009755MessageOptions::mutable_uninterpreted_option() {
9756 // @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option)
9757 return &uninterpreted_option_;
9758}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009759const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
9760MessageOptions::uninterpreted_option() const {
9761 // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option)
9762 return uninterpreted_option_;
9763}
Jisi Liu885b6122015-02-28 14:51:22 -08009764
9765#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00009766
9767// ===================================================================
9768
9769const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009770 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009771 return FieldOptions_CType_descriptor_;
9772}
9773bool FieldOptions_CType_IsValid(int value) {
9774 switch(value) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009775 case 0:
temporal40ee5512008-07-10 02:12:20 +00009776 case 1:
9777 case 2:
9778 return true;
9779 default:
9780 return false;
9781 }
9782}
9783
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009784#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comfccb1462009-12-18 02:11:36 +00009785const FieldOptions_CType FieldOptions::STRING;
temporal40ee5512008-07-10 02:12:20 +00009786const FieldOptions_CType FieldOptions::CORD;
9787const FieldOptions_CType FieldOptions::STRING_PIECE;
9788const FieldOptions_CType FieldOptions::CType_MIN;
9789const FieldOptions_CType FieldOptions::CType_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00009790const int FieldOptions::CType_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009791#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Bo Yang5db21732015-05-21 14:28:59 -07009792const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor() {
9793 protobuf_AssignDescriptorsOnce();
9794 return FieldOptions_JSType_descriptor_;
9795}
9796bool FieldOptions_JSType_IsValid(int value) {
9797 switch(value) {
9798 case 0:
9799 case 1:
9800 case 2:
9801 return true;
9802 default:
9803 return false;
9804 }
9805}
9806
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009807#if !defined(_MSC_VER) || _MSC_VER >= 1900
Bo Yang5db21732015-05-21 14:28:59 -07009808const FieldOptions_JSType FieldOptions::JS_NORMAL;
9809const FieldOptions_JSType FieldOptions::JS_STRING;
9810const FieldOptions_JSType FieldOptions::JS_NUMBER;
9811const FieldOptions_JSType FieldOptions::JSType_MIN;
9812const FieldOptions_JSType FieldOptions::JSType_MAX;
9813const int FieldOptions::JSType_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009814#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
9815#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009816const int FieldOptions::kCtypeFieldNumber;
9817const int FieldOptions::kPackedFieldNumber;
Bo Yang5db21732015-05-21 14:28:59 -07009818const int FieldOptions::kJstypeFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009819const int FieldOptions::kLazyFieldNumber;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009820const int FieldOptions::kDeprecatedFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009821const int FieldOptions::kWeakFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009822const int FieldOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009823#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.com24bf56f2008-09-24 20:31:01 +00009824
kenton@google.com573989f2009-10-30 22:02:17 +00009825FieldOptions::FieldOptions()
Bo Yang5db21732015-05-21 14:28:59 -07009826 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009827 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009828 // @@protoc_insertion_point(constructor:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +00009829}
9830
kenton@google.com80b1d622009-07-29 01:13:20 +00009831void FieldOptions::InitAsDefaultInstance() {
9832}
kenton@google.com24bf56f2008-09-24 20:31:01 +00009833
kenton@google.com573989f2009-10-30 22:02:17 +00009834FieldOptions::FieldOptions(const FieldOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08009835 : ::google::protobuf::Message(),
9836 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009837 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00009838 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009839 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +00009840}
9841
kenton@google.comd37d46d2009-04-25 02:53:47 +00009842void FieldOptions::SharedCtor() {
9843 _cached_size_ = 0;
kenton@google.comfccb1462009-12-18 02:11:36 +00009844 ctype_ = 0;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009845 packed_ = false;
Bo Yang5db21732015-05-21 14:28:59 -07009846 jstype_ = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009847 lazy_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009848 deprecated_ = false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009849 weak_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009850 ::memset(_has_bits_, 0, sizeof(_has_bits_));
9851}
9852
temporal40ee5512008-07-10 02:12:20 +00009853FieldOptions::~FieldOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009854 // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009855 SharedDtor();
9856}
9857
9858void FieldOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009859 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00009860 }
9861}
9862
kenton@google.comfccb1462009-12-18 02:11:36 +00009863void FieldOptions::SetCachedSize(int size) const {
9864 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
9865 _cached_size_ = size;
9866 GOOGLE_SAFE_CONCURRENT_WRITES_END();
9867}
temporal40ee5512008-07-10 02:12:20 +00009868const ::google::protobuf::Descriptor* FieldOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009869 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009870 return FieldOptions_descriptor_;
9871}
9872
kenton@google.com24bf56f2008-09-24 20:31:01 +00009873const FieldOptions& FieldOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00009874 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
9875 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009876}
9877
9878FieldOptions* FieldOptions::default_instance_ = NULL;
9879
Feng Xiao6ef984a2014-11-10 17:34:54 -08009880FieldOptions* FieldOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08009881 FieldOptions* n = new FieldOptions;
9882 if (arena != NULL) {
9883 arena->Own(n);
9884 }
9885 return n;
temporal40ee5512008-07-10 02:12:20 +00009886}
9887
9888void FieldOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009889 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08009890#define ZR_HELPER_(f) reinterpret_cast<char*>(\
9891 &reinterpret_cast<FieldOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009892
Jisi Liu885b6122015-02-28 14:51:22 -08009893#define ZR_(first, last) do {\
9894 ::memset(&first, 0,\
9895 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
9896} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009897
Bo Yang5db21732015-05-21 14:28:59 -07009898 if (_has_bits_[0 / 32] & 63u) {
9899 ZR_(ctype_, jstype_);
9900 ZR_(packed_, weak_);
temporal40ee5512008-07-10 02:12:20 +00009901 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009902
Jisi Liu885b6122015-02-28 14:51:22 -08009903#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00009904#undef ZR_
9905
kenton@google.com24bf56f2008-09-24 20:31:01 +00009906 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00009907 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08009908 if (_internal_metadata_.have_unknown_fields()) {
9909 mutable_unknown_fields()->Clear();
9910 }
temporal40ee5512008-07-10 02:12:20 +00009911}
9912
9913bool FieldOptions::MergePartialFromCodedStream(
9914 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009915#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00009916 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009917 // @@protoc_insertion_point(parse_start:google.protobuf.FieldOptions)
9918 for (;;) {
9919 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
9920 tag = p.first;
9921 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009922 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009923 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
temporal40ee5512008-07-10 02:12:20 +00009924 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009925 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009926 int value;
9927 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9928 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
9929 input, &value)));
9930 if (::google::protobuf::FieldOptions_CType_IsValid(value)) {
9931 set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value));
9932 } else {
9933 mutable_unknown_fields()->AddVarint(1, value);
9934 }
temporal40ee5512008-07-10 02:12:20 +00009935 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009936 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00009937 }
kenton@google.com2d6daa72009-01-22 01:27:00 +00009938 if (input->ExpectTag(16)) goto parse_packed;
9939 break;
9940 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009941
kenton@google.com2d6daa72009-01-22 01:27:00 +00009942 // optional bool packed = 2;
9943 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009944 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009945 parse_packed:
9946 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9947 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9948 input, &packed_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009949 set_has_packed();
kenton@google.comfccb1462009-12-18 02:11:36 +00009950 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009951 goto handle_unusual;
kenton@google.com2d6daa72009-01-22 01:27:00 +00009952 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00009953 if (input->ExpectTag(24)) goto parse_deprecated;
9954 break;
9955 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009956
kenton@google.comd37d46d2009-04-25 02:53:47 +00009957 // optional bool deprecated = 3 [default = false];
9958 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009959 if (tag == 24) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009960 parse_deprecated:
9961 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9962 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9963 input, &deprecated_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009964 set_has_deprecated();
kenton@google.comfccb1462009-12-18 02:11:36 +00009965 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009966 goto handle_unusual;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009967 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009968 if (input->ExpectTag(40)) goto parse_lazy;
9969 break;
9970 }
9971
9972 // optional bool lazy = 5 [default = false];
9973 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009974 if (tag == 40) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009975 parse_lazy:
9976 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9977 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9978 input, &lazy_)));
9979 set_has_lazy();
9980 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009981 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009982 }
Bo Yang5db21732015-05-21 14:28:59 -07009983 if (input->ExpectTag(48)) goto parse_jstype;
9984 break;
9985 }
9986
9987 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
9988 case 6: {
9989 if (tag == 48) {
9990 parse_jstype:
9991 int value;
9992 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9993 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
9994 input, &value)));
9995 if (::google::protobuf::FieldOptions_JSType_IsValid(value)) {
9996 set_jstype(static_cast< ::google::protobuf::FieldOptions_JSType >(value));
9997 } else {
9998 mutable_unknown_fields()->AddVarint(6, value);
9999 }
10000 } else {
10001 goto handle_unusual;
10002 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010003 if (input->ExpectTag(80)) goto parse_weak;
10004 break;
10005 }
10006
10007 // optional bool weak = 10 [default = false];
10008 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010009 if (tag == 80) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010010 parse_weak:
10011 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10012 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10013 input, &weak_)));
10014 set_has_weak();
10015 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010016 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010017 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010018 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
10019 break;
10020 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010021
kenton@google.com24bf56f2008-09-24 20:31:01 +000010022 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
10023 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010024 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010025 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070010026 DO_(input->IncrementRecursionDepth());
10027 parse_loop_uninterpreted_option:
10028 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000010029 input, add_uninterpreted_option()));
10030 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010031 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010032 }
Bo Yang5db21732015-05-21 14:28:59 -070010033 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
10034 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010035 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +000010036 break;
10037 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010038
temporal40ee5512008-07-10 02:12:20 +000010039 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010040 handle_unusual:
10041 if (tag == 0 ||
10042 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000010043 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010044 goto success;
temporal40ee5512008-07-10 02:12:20 +000010045 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010046 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010047 DO_(_extensions_.ParseField(tag, input, default_instance_,
10048 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000010049 continue;
10050 }
temporal40ee5512008-07-10 02:12:20 +000010051 DO_(::google::protobuf::internal::WireFormat::SkipField(
10052 input, tag, mutable_unknown_fields()));
10053 break;
10054 }
10055 }
10056 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010057success:
10058 // @@protoc_insertion_point(parse_success:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +000010059 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010060failure:
10061 // @@protoc_insertion_point(parse_failure:google.protobuf.FieldOptions)
10062 return false;
temporal40ee5512008-07-10 02:12:20 +000010063#undef DO_
10064}
10065
kenton@google.comd37d46d2009-04-25 02:53:47 +000010066void FieldOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000010067 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010068 // @@protoc_insertion_point(serialize_start:google.protobuf.FieldOptions)
kenton@google.comfccb1462009-12-18 02:11:36 +000010069 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
liujisi@google.com33165fe2010-11-02 13:14:58 +000010070 if (has_ctype()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010071 ::google::protobuf::internal::WireFormatLite::WriteEnum(
10072 1, this->ctype(), output);
temporal40ee5512008-07-10 02:12:20 +000010073 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010074
kenton@google.com2d6daa72009-01-22 01:27:00 +000010075 // optional bool packed = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000010076 if (has_packed()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010077 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->packed(), output);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010078 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010079
kenton@google.comd37d46d2009-04-25 02:53:47 +000010080 // optional bool deprecated = 3 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +000010081 if (has_deprecated()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010082 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
kenton@google.com2d6daa72009-01-22 01:27:00 +000010083 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010084
10085 // optional bool lazy = 5 [default = false];
10086 if (has_lazy()) {
10087 ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->lazy(), output);
10088 }
10089
Bo Yang5db21732015-05-21 14:28:59 -070010090 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10091 if (has_jstype()) {
10092 ::google::protobuf::internal::WireFormatLite::WriteEnum(
10093 6, this->jstype(), output);
10094 }
10095
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010096 // optional bool weak = 10 [default = false];
10097 if (has_weak()) {
10098 ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->weak(), output);
10099 }
10100
kenton@google.com24bf56f2008-09-24 20:31:01 +000010101 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010102 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010103 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000010104 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010105 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010106
kenton@google.com24bf56f2008-09-24 20:31:01 +000010107 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010108 _extensions_.SerializeWithCachedSizes(
10109 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010110
Feng Xiao6ef984a2014-11-10 17:34:54 -080010111 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010112 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
10113 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000010114 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010115 // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010116}
10117
10118::google::protobuf::uint8* FieldOptions::SerializeWithCachedSizesToArray(
10119 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010120 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions)
kenton@google.comfccb1462009-12-18 02:11:36 +000010121 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
liujisi@google.com33165fe2010-11-02 13:14:58 +000010122 if (has_ctype()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010123 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
10124 1, this->ctype(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010125 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010126
kenton@google.comd37d46d2009-04-25 02:53:47 +000010127 // optional bool packed = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000010128 if (has_packed()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010129 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010130 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010131
kenton@google.comd37d46d2009-04-25 02:53:47 +000010132 // optional bool deprecated = 3 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +000010133 if (has_deprecated()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010134 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010135 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010136
10137 // optional bool lazy = 5 [default = false];
10138 if (has_lazy()) {
10139 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->lazy(), target);
10140 }
10141
Bo Yang5db21732015-05-21 14:28:59 -070010142 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10143 if (has_jstype()) {
10144 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
10145 6, this->jstype(), target);
10146 }
10147
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010148 // optional bool weak = 10 [default = false];
10149 if (has_weak()) {
10150 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->weak(), target);
10151 }
10152
kenton@google.comd37d46d2009-04-25 02:53:47 +000010153 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010154 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010155 target = ::google::protobuf::internal::WireFormatLite::
10156 WriteMessageNoVirtualToArray(
10157 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010158 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010159
kenton@google.comd37d46d2009-04-25 02:53:47 +000010160 // Extension range [1000, 536870912)
10161 target = _extensions_.SerializeWithCachedSizesToArray(
10162 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010163
Feng Xiao6ef984a2014-11-10 17:34:54 -080010164 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010165 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
10166 unknown_fields(), target);
10167 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010168 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010169 return target;
temporal40ee5512008-07-10 02:12:20 +000010170}
10171
10172int FieldOptions::ByteSize() const {
10173 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010174
Austin Schuh307af622015-06-05 22:46:01 -070010175 if (_has_bits_[0 / 32] & 63u) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010176 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
temporal40ee5512008-07-10 02:12:20 +000010177 if (has_ctype()) {
10178 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000010179 ::google::protobuf::internal::WireFormatLite::EnumSize(this->ctype());
temporal40ee5512008-07-10 02:12:20 +000010180 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010181
kenton@google.com2d6daa72009-01-22 01:27:00 +000010182 // optional bool packed = 2;
10183 if (has_packed()) {
10184 total_size += 1 + 1;
10185 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010186
Bo Yang5db21732015-05-21 14:28:59 -070010187 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10188 if (has_jstype()) {
10189 total_size += 1 +
10190 ::google::protobuf::internal::WireFormatLite::EnumSize(this->jstype());
10191 }
10192
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010193 // optional bool lazy = 5 [default = false];
10194 if (has_lazy()) {
10195 total_size += 1 + 1;
10196 }
10197
kenton@google.comd37d46d2009-04-25 02:53:47 +000010198 // optional bool deprecated = 3 [default = false];
10199 if (has_deprecated()) {
10200 total_size += 1 + 1;
10201 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010202
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010203 // optional bool weak = 10 [default = false];
10204 if (has_weak()) {
10205 total_size += 1 + 1;
10206 }
10207
temporal40ee5512008-07-10 02:12:20 +000010208 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010209 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000010210 total_size += 2 * this->uninterpreted_option_size();
10211 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010212 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000010213 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000010214 this->uninterpreted_option(i));
10215 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010216
kenton@google.comd37d46d2009-04-25 02:53:47 +000010217 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010218
Feng Xiao6ef984a2014-11-10 17:34:54 -080010219 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000010220 total_size +=
10221 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
10222 unknown_fields());
10223 }
kenton@google.comfccb1462009-12-18 02:11:36 +000010224 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000010225 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000010226 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000010227 return total_size;
10228}
10229
10230void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010231 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070010232 const FieldOptions* source =
10233 ::google::protobuf::internal::DynamicCastToGenerated<const FieldOptions>(
10234 &from);
temporal40ee5512008-07-10 02:12:20 +000010235 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +000010236 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +000010237 } else {
10238 MergeFrom(*source);
10239 }
10240}
10241
10242void FieldOptions::MergeFrom(const FieldOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010243 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010244 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +000010245 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000010246 if (from.has_ctype()) {
temporal40ee5512008-07-10 02:12:20 +000010247 set_ctype(from.ctype());
10248 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000010249 if (from.has_packed()) {
kenton@google.com2d6daa72009-01-22 01:27:00 +000010250 set_packed(from.packed());
10251 }
Bo Yang5db21732015-05-21 14:28:59 -070010252 if (from.has_jstype()) {
10253 set_jstype(from.jstype());
10254 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010255 if (from.has_lazy()) {
10256 set_lazy(from.lazy());
10257 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000010258 if (from.has_deprecated()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010259 set_deprecated(from.deprecated());
10260 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010261 if (from.has_weak()) {
10262 set_weak(from.weak());
10263 }
temporal40ee5512008-07-10 02:12:20 +000010264 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010265 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010266 if (from._internal_metadata_.have_unknown_fields()) {
10267 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
10268 }
temporal40ee5512008-07-10 02:12:20 +000010269}
10270
10271void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) {
10272 if (&from == this) return;
10273 Clear();
10274 MergeFrom(from);
10275}
10276
10277void FieldOptions::CopyFrom(const FieldOptions& from) {
10278 if (&from == this) return;
10279 Clear();
10280 MergeFrom(from);
10281}
10282
kenton@google.comceb561d2009-06-25 19:05:36 +000010283bool FieldOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010284
jieluo@google.com4de8f552014-07-18 00:47:59 +000010285 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010286
kenton@google.comceb561d2009-06-25 19:05:36 +000010287 if (!_extensions_.IsInitialized()) return false; return true;
10288}
10289
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010290void FieldOptions::Swap(FieldOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080010291 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080010292 InternalSwap(other);
10293}
10294void FieldOptions::InternalSwap(FieldOptions* other) {
10295 std::swap(ctype_, other->ctype_);
10296 std::swap(packed_, other->packed_);
Bo Yang5db21732015-05-21 14:28:59 -070010297 std::swap(jstype_, other->jstype_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010298 std::swap(lazy_, other->lazy_);
10299 std::swap(deprecated_, other->deprecated_);
10300 std::swap(weak_, other->weak_);
10301 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
10302 std::swap(_has_bits_[0], other->_has_bits_[0]);
10303 _internal_metadata_.Swap(&other->_internal_metadata_);
10304 std::swap(_cached_size_, other->_cached_size_);
10305 _extensions_.Swap(&other->_extensions_);
10306}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010307
kenton@google.com80b1d622009-07-29 01:13:20 +000010308::google::protobuf::Metadata FieldOptions::GetMetadata() const {
10309 protobuf_AssignDescriptorsOnce();
10310 ::google::protobuf::Metadata metadata;
10311 metadata.descriptor = FieldOptions_descriptor_;
10312 metadata.reflection = FieldOptions_reflection_;
10313 return metadata;
temporal40ee5512008-07-10 02:12:20 +000010314}
10315
Jisi Liu885b6122015-02-28 14:51:22 -080010316#if PROTOBUF_INLINE_NOT_IN_HEADERS
10317// FieldOptions
10318
10319// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
Bo Yang5db21732015-05-21 14:28:59 -070010320bool FieldOptions::has_ctype() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010321 return (_has_bits_[0] & 0x00000001u) != 0;
10322}
Bo Yang5db21732015-05-21 14:28:59 -070010323void FieldOptions::set_has_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010324 _has_bits_[0] |= 0x00000001u;
10325}
Bo Yang5db21732015-05-21 14:28:59 -070010326void FieldOptions::clear_has_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010327 _has_bits_[0] &= ~0x00000001u;
10328}
Bo Yang5db21732015-05-21 14:28:59 -070010329void FieldOptions::clear_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010330 ctype_ = 0;
10331 clear_has_ctype();
10332}
10333 ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const {
10334 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype)
10335 return static_cast< ::google::protobuf::FieldOptions_CType >(ctype_);
10336}
10337 void FieldOptions::set_ctype(::google::protobuf::FieldOptions_CType value) {
10338 assert(::google::protobuf::FieldOptions_CType_IsValid(value));
10339 set_has_ctype();
10340 ctype_ = value;
10341 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.ctype)
10342}
10343
10344// optional bool packed = 2;
Bo Yang5db21732015-05-21 14:28:59 -070010345bool FieldOptions::has_packed() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010346 return (_has_bits_[0] & 0x00000002u) != 0;
10347}
Bo Yang5db21732015-05-21 14:28:59 -070010348void FieldOptions::set_has_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010349 _has_bits_[0] |= 0x00000002u;
10350}
Bo Yang5db21732015-05-21 14:28:59 -070010351void FieldOptions::clear_has_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010352 _has_bits_[0] &= ~0x00000002u;
10353}
Bo Yang5db21732015-05-21 14:28:59 -070010354void FieldOptions::clear_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010355 packed_ = false;
10356 clear_has_packed();
10357}
10358 bool FieldOptions::packed() const {
10359 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed)
10360 return packed_;
10361}
10362 void FieldOptions::set_packed(bool value) {
10363 set_has_packed();
10364 packed_ = value;
10365 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.packed)
10366}
10367
Bo Yang5db21732015-05-21 14:28:59 -070010368// optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10369bool FieldOptions::has_jstype() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010370 return (_has_bits_[0] & 0x00000004u) != 0;
10371}
Bo Yang5db21732015-05-21 14:28:59 -070010372void FieldOptions::set_has_jstype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010373 _has_bits_[0] |= 0x00000004u;
10374}
Bo Yang5db21732015-05-21 14:28:59 -070010375void FieldOptions::clear_has_jstype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010376 _has_bits_[0] &= ~0x00000004u;
10377}
Bo Yang5db21732015-05-21 14:28:59 -070010378void FieldOptions::clear_jstype() {
10379 jstype_ = 0;
10380 clear_has_jstype();
10381}
10382 ::google::protobuf::FieldOptions_JSType FieldOptions::jstype() const {
10383 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype)
10384 return static_cast< ::google::protobuf::FieldOptions_JSType >(jstype_);
10385}
10386 void FieldOptions::set_jstype(::google::protobuf::FieldOptions_JSType value) {
10387 assert(::google::protobuf::FieldOptions_JSType_IsValid(value));
10388 set_has_jstype();
10389 jstype_ = value;
10390 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.jstype)
10391}
10392
10393// optional bool lazy = 5 [default = false];
10394bool FieldOptions::has_lazy() const {
10395 return (_has_bits_[0] & 0x00000008u) != 0;
10396}
10397void FieldOptions::set_has_lazy() {
10398 _has_bits_[0] |= 0x00000008u;
10399}
10400void FieldOptions::clear_has_lazy() {
10401 _has_bits_[0] &= ~0x00000008u;
10402}
10403void FieldOptions::clear_lazy() {
Jisi Liu885b6122015-02-28 14:51:22 -080010404 lazy_ = false;
10405 clear_has_lazy();
10406}
10407 bool FieldOptions::lazy() const {
10408 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.lazy)
10409 return lazy_;
10410}
10411 void FieldOptions::set_lazy(bool value) {
10412 set_has_lazy();
10413 lazy_ = value;
10414 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.lazy)
10415}
10416
10417// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010418bool FieldOptions::has_deprecated() const {
10419 return (_has_bits_[0] & 0x00000010u) != 0;
Jisi Liu885b6122015-02-28 14:51:22 -080010420}
Bo Yang5db21732015-05-21 14:28:59 -070010421void FieldOptions::set_has_deprecated() {
10422 _has_bits_[0] |= 0x00000010u;
Jisi Liu885b6122015-02-28 14:51:22 -080010423}
Bo Yang5db21732015-05-21 14:28:59 -070010424void FieldOptions::clear_has_deprecated() {
10425 _has_bits_[0] &= ~0x00000010u;
Jisi Liu885b6122015-02-28 14:51:22 -080010426}
Bo Yang5db21732015-05-21 14:28:59 -070010427void FieldOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010428 deprecated_ = false;
10429 clear_has_deprecated();
10430}
10431 bool FieldOptions::deprecated() const {
10432 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.deprecated)
10433 return deprecated_;
10434}
10435 void FieldOptions::set_deprecated(bool value) {
10436 set_has_deprecated();
10437 deprecated_ = value;
10438 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated)
10439}
10440
10441// optional bool weak = 10 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010442bool FieldOptions::has_weak() const {
10443 return (_has_bits_[0] & 0x00000020u) != 0;
Jisi Liu885b6122015-02-28 14:51:22 -080010444}
Bo Yang5db21732015-05-21 14:28:59 -070010445void FieldOptions::set_has_weak() {
10446 _has_bits_[0] |= 0x00000020u;
Jisi Liu885b6122015-02-28 14:51:22 -080010447}
Bo Yang5db21732015-05-21 14:28:59 -070010448void FieldOptions::clear_has_weak() {
10449 _has_bits_[0] &= ~0x00000020u;
Jisi Liu885b6122015-02-28 14:51:22 -080010450}
Bo Yang5db21732015-05-21 14:28:59 -070010451void FieldOptions::clear_weak() {
Jisi Liu885b6122015-02-28 14:51:22 -080010452 weak_ = false;
10453 clear_has_weak();
10454}
10455 bool FieldOptions::weak() const {
10456 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak)
10457 return weak_;
10458}
10459 void FieldOptions::set_weak(bool value) {
10460 set_has_weak();
10461 weak_ = value;
10462 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak)
10463}
10464
10465// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070010466int FieldOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010467 return uninterpreted_option_.size();
10468}
Bo Yang5db21732015-05-21 14:28:59 -070010469void FieldOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010470 uninterpreted_option_.Clear();
10471}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010472const ::google::protobuf::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080010473 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.uninterpreted_option)
10474 return uninterpreted_option_.Get(index);
10475}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010476::google::protobuf::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080010477 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.uninterpreted_option)
10478 return uninterpreted_option_.Mutable(index);
10479}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010480::google::protobuf::UninterpretedOption* FieldOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010481 // @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.uninterpreted_option)
10482 return uninterpreted_option_.Add();
10483}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010484::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080010485FieldOptions::mutable_uninterpreted_option() {
10486 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option)
10487 return &uninterpreted_option_;
10488}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010489const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
10490FieldOptions::uninterpreted_option() const {
10491 // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option)
10492 return uninterpreted_option_;
10493}
Jisi Liu885b6122015-02-28 14:51:22 -080010494
10495#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000010496
10497// ===================================================================
10498
Bruce Dawson86ba70e2015-10-29 12:41:29 -070010499#if !defined(_MSC_VER) || _MSC_VER >= 1900
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010500const int EnumOptions::kAllowAliasFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010501const int EnumOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000010502const int EnumOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070010503#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +000010504
kenton@google.com573989f2009-10-30 22:02:17 +000010505EnumOptions::EnumOptions()
Bo Yang5db21732015-05-21 14:28:59 -070010506 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010507 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010508 // @@protoc_insertion_point(constructor:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010509}
10510
kenton@google.com80b1d622009-07-29 01:13:20 +000010511void EnumOptions::InitAsDefaultInstance() {
10512}
kenton@google.com24bf56f2008-09-24 20:31:01 +000010513
kenton@google.com573989f2009-10-30 22:02:17 +000010514EnumOptions::EnumOptions(const EnumOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080010515 : ::google::protobuf::Message(),
10516 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010517 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000010518 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000010519 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010520}
10521
kenton@google.comd37d46d2009-04-25 02:53:47 +000010522void EnumOptions::SharedCtor() {
10523 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010524 allow_alias_ = false;
10525 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000010526 ::memset(_has_bits_, 0, sizeof(_has_bits_));
10527}
10528
temporal40ee5512008-07-10 02:12:20 +000010529EnumOptions::~EnumOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010530 // @@protoc_insertion_point(destructor:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010531 SharedDtor();
10532}
10533
10534void EnumOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010535 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000010536 }
10537}
10538
kenton@google.comfccb1462009-12-18 02:11:36 +000010539void EnumOptions::SetCachedSize(int size) const {
10540 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
10541 _cached_size_ = size;
10542 GOOGLE_SAFE_CONCURRENT_WRITES_END();
10543}
temporal40ee5512008-07-10 02:12:20 +000010544const ::google::protobuf::Descriptor* EnumOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010545 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000010546 return EnumOptions_descriptor_;
10547}
10548
kenton@google.com24bf56f2008-09-24 20:31:01 +000010549const EnumOptions& EnumOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000010550 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
10551 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010552}
10553
10554EnumOptions* EnumOptions::default_instance_ = NULL;
10555
Feng Xiao6ef984a2014-11-10 17:34:54 -080010556EnumOptions* EnumOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080010557 EnumOptions* n = new EnumOptions;
10558 if (arena != NULL) {
10559 arena->Own(n);
10560 }
10561 return n;
temporal40ee5512008-07-10 02:12:20 +000010562}
10563
10564void EnumOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010565 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -080010566#define ZR_HELPER_(f) reinterpret_cast<char*>(\
10567 &reinterpret_cast<EnumOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +000010568
Jisi Liu885b6122015-02-28 14:51:22 -080010569#define ZR_(first, last) do {\
10570 ::memset(&first, 0,\
10571 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
10572} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +000010573
10574 ZR_(allow_alias_, deprecated_);
10575
Jisi Liu885b6122015-02-28 14:51:22 -080010576#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +000010577#undef ZR_
10578
kenton@google.com24bf56f2008-09-24 20:31:01 +000010579 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000010580 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080010581 if (_internal_metadata_.have_unknown_fields()) {
10582 mutable_unknown_fields()->Clear();
10583 }
temporal40ee5512008-07-10 02:12:20 +000010584}
10585
10586bool EnumOptions::MergePartialFromCodedStream(
10587 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010588#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000010589 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010590 // @@protoc_insertion_point(parse_start:google.protobuf.EnumOptions)
10591 for (;;) {
10592 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
10593 tag = p.first;
10594 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000010595 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010596 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010597 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010598 if (tag == 16) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010599 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10600 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10601 input, &allow_alias_)));
10602 set_has_allow_alias();
10603 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010604 goto handle_unusual;
10605 }
10606 if (input->ExpectTag(24)) goto parse_deprecated;
10607 break;
10608 }
10609
10610 // optional bool deprecated = 3 [default = false];
10611 case 3: {
10612 if (tag == 24) {
10613 parse_deprecated:
10614 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10615 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10616 input, &deprecated_)));
10617 set_has_deprecated();
10618 } else {
10619 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010620 }
10621 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
10622 break;
10623 }
10624
kenton@google.com24bf56f2008-09-24 20:31:01 +000010625 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
10626 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010627 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010628 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070010629 DO_(input->IncrementRecursionDepth());
10630 parse_loop_uninterpreted_option:
10631 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000010632 input, add_uninterpreted_option()));
10633 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010634 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010635 }
Bo Yang5db21732015-05-21 14:28:59 -070010636 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
10637 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010638 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010639 break;
10640 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010641
kenton@google.com24bf56f2008-09-24 20:31:01 +000010642 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010643 handle_unusual:
10644 if (tag == 0 ||
10645 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000010646 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010647 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010648 }
10649 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010650 DO_(_extensions_.ParseField(tag, input, default_instance_,
10651 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000010652 continue;
10653 }
10654 DO_(::google::protobuf::internal::WireFormat::SkipField(
10655 input, tag, mutable_unknown_fields()));
10656 break;
10657 }
temporal40ee5512008-07-10 02:12:20 +000010658 }
temporal40ee5512008-07-10 02:12:20 +000010659 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010660success:
10661 // @@protoc_insertion_point(parse_success:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010662 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010663failure:
10664 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumOptions)
10665 return false;
temporal40ee5512008-07-10 02:12:20 +000010666#undef DO_
10667}
10668
kenton@google.comd37d46d2009-04-25 02:53:47 +000010669void EnumOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000010670 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010671 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumOptions)
10672 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010673 if (has_allow_alias()) {
10674 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->allow_alias(), output);
10675 }
10676
jieluo@google.com4de8f552014-07-18 00:47:59 +000010677 // optional bool deprecated = 3 [default = false];
10678 if (has_deprecated()) {
10679 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
10680 }
10681
kenton@google.com24bf56f2008-09-24 20:31:01 +000010682 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010683 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010684 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000010685 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010686 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010687
kenton@google.com24bf56f2008-09-24 20:31:01 +000010688 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010689 _extensions_.SerializeWithCachedSizes(
10690 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010691
Feng Xiao6ef984a2014-11-10 17:34:54 -080010692 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010693 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
10694 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000010695 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010696 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010697}
10698
10699::google::protobuf::uint8* EnumOptions::SerializeWithCachedSizesToArray(
10700 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010701 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions)
10702 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010703 if (has_allow_alias()) {
10704 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->allow_alias(), target);
10705 }
10706
jieluo@google.com4de8f552014-07-18 00:47:59 +000010707 // optional bool deprecated = 3 [default = false];
10708 if (has_deprecated()) {
10709 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
10710 }
10711
kenton@google.comd37d46d2009-04-25 02:53:47 +000010712 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010713 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010714 target = ::google::protobuf::internal::WireFormatLite::
10715 WriteMessageNoVirtualToArray(
10716 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010717 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010718
kenton@google.comd37d46d2009-04-25 02:53:47 +000010719 // Extension range [1000, 536870912)
10720 target = _extensions_.SerializeWithCachedSizesToArray(
10721 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010722
Feng Xiao6ef984a2014-11-10 17:34:54 -080010723 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010724 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
10725 unknown_fields(), target);
10726 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010727 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010728 return target;
temporal40ee5512008-07-10 02:12:20 +000010729}
10730
10731int EnumOptions::ByteSize() const {
10732 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010733
Austin Schuh307af622015-06-05 22:46:01 -070010734 if (_has_bits_[0 / 32] & 3u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010735 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010736 if (has_allow_alias()) {
10737 total_size += 1 + 1;
10738 }
10739
jieluo@google.com4de8f552014-07-18 00:47:59 +000010740 // optional bool deprecated = 3 [default = false];
10741 if (has_deprecated()) {
10742 total_size += 1 + 1;
10743 }
10744
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010745 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010746 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000010747 total_size += 2 * this->uninterpreted_option_size();
10748 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010749 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000010750 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000010751 this->uninterpreted_option(i));
10752 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010753
kenton@google.comd37d46d2009-04-25 02:53:47 +000010754 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010755
Feng Xiao6ef984a2014-11-10 17:34:54 -080010756 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000010757 total_size +=
10758 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
10759 unknown_fields());
10760 }
kenton@google.comfccb1462009-12-18 02:11:36 +000010761 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000010762 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000010763 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000010764 return total_size;
10765}
10766
10767void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010768 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070010769 const EnumOptions* source =
10770 ::google::protobuf::internal::DynamicCastToGenerated<const EnumOptions>(
10771 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010772 if (source == NULL) {
10773 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
10774 } else {
10775 MergeFrom(*source);
10776 }
temporal40ee5512008-07-10 02:12:20 +000010777}
10778
10779void EnumOptions::MergeFrom(const EnumOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010780 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010781 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010782 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
10783 if (from.has_allow_alias()) {
10784 set_allow_alias(from.allow_alias());
10785 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010786 if (from.has_deprecated()) {
10787 set_deprecated(from.deprecated());
10788 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010789 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010790 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010791 if (from._internal_metadata_.have_unknown_fields()) {
10792 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
10793 }
temporal40ee5512008-07-10 02:12:20 +000010794}
10795
10796void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) {
10797 if (&from == this) return;
10798 Clear();
10799 MergeFrom(from);
10800}
10801
10802void EnumOptions::CopyFrom(const EnumOptions& from) {
10803 if (&from == this) return;
10804 Clear();
10805 MergeFrom(from);
10806}
10807
kenton@google.comceb561d2009-06-25 19:05:36 +000010808bool EnumOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010809
jieluo@google.com4de8f552014-07-18 00:47:59 +000010810 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010811
kenton@google.comceb561d2009-06-25 19:05:36 +000010812 if (!_extensions_.IsInitialized()) return false; return true;
10813}
10814
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010815void EnumOptions::Swap(EnumOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080010816 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080010817 InternalSwap(other);
10818}
10819void EnumOptions::InternalSwap(EnumOptions* other) {
10820 std::swap(allow_alias_, other->allow_alias_);
10821 std::swap(deprecated_, other->deprecated_);
10822 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
10823 std::swap(_has_bits_[0], other->_has_bits_[0]);
10824 _internal_metadata_.Swap(&other->_internal_metadata_);
10825 std::swap(_cached_size_, other->_cached_size_);
10826 _extensions_.Swap(&other->_extensions_);
10827}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010828
kenton@google.com80b1d622009-07-29 01:13:20 +000010829::google::protobuf::Metadata EnumOptions::GetMetadata() const {
10830 protobuf_AssignDescriptorsOnce();
10831 ::google::protobuf::Metadata metadata;
10832 metadata.descriptor = EnumOptions_descriptor_;
10833 metadata.reflection = EnumOptions_reflection_;
10834 return metadata;
temporal40ee5512008-07-10 02:12:20 +000010835}
10836
Jisi Liu885b6122015-02-28 14:51:22 -080010837#if PROTOBUF_INLINE_NOT_IN_HEADERS
10838// EnumOptions
10839
10840// optional bool allow_alias = 2;
Bo Yang5db21732015-05-21 14:28:59 -070010841bool EnumOptions::has_allow_alias() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010842 return (_has_bits_[0] & 0x00000001u) != 0;
10843}
Bo Yang5db21732015-05-21 14:28:59 -070010844void EnumOptions::set_has_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010845 _has_bits_[0] |= 0x00000001u;
10846}
Bo Yang5db21732015-05-21 14:28:59 -070010847void EnumOptions::clear_has_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010848 _has_bits_[0] &= ~0x00000001u;
10849}
Bo Yang5db21732015-05-21 14:28:59 -070010850void EnumOptions::clear_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010851 allow_alias_ = false;
10852 clear_has_allow_alias();
10853}
10854 bool EnumOptions::allow_alias() const {
10855 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.allow_alias)
10856 return allow_alias_;
10857}
10858 void EnumOptions::set_allow_alias(bool value) {
10859 set_has_allow_alias();
10860 allow_alias_ = value;
10861 // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.allow_alias)
10862}
10863
10864// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010865bool EnumOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010866 return (_has_bits_[0] & 0x00000002u) != 0;
10867}
Bo Yang5db21732015-05-21 14:28:59 -070010868void EnumOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010869 _has_bits_[0] |= 0x00000002u;
10870}
Bo Yang5db21732015-05-21 14:28:59 -070010871void EnumOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010872 _has_bits_[0] &= ~0x00000002u;
10873}
Bo Yang5db21732015-05-21 14:28:59 -070010874void EnumOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010875 deprecated_ = false;
10876 clear_has_deprecated();
10877}
10878 bool EnumOptions::deprecated() const {
10879 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated)
10880 return deprecated_;
10881}
10882 void EnumOptions::set_deprecated(bool value) {
10883 set_has_deprecated();
10884 deprecated_ = value;
10885 // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated)
10886}
10887
10888// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070010889int EnumOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010890 return uninterpreted_option_.size();
10891}
Bo Yang5db21732015-05-21 14:28:59 -070010892void EnumOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010893 uninterpreted_option_.Clear();
10894}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010895const ::google::protobuf::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080010896 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.uninterpreted_option)
10897 return uninterpreted_option_.Get(index);
10898}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010899::google::protobuf::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080010900 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumOptions.uninterpreted_option)
10901 return uninterpreted_option_.Mutable(index);
10902}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010903::google::protobuf::UninterpretedOption* EnumOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010904 // @@protoc_insertion_point(field_add:google.protobuf.EnumOptions.uninterpreted_option)
10905 return uninterpreted_option_.Add();
10906}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010907::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080010908EnumOptions::mutable_uninterpreted_option() {
10909 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option)
10910 return &uninterpreted_option_;
10911}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010912const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
10913EnumOptions::uninterpreted_option() const {
10914 // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option)
10915 return uninterpreted_option_;
10916}
Jisi Liu885b6122015-02-28 14:51:22 -080010917
10918#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000010919
10920// ===================================================================
10921
Bruce Dawson86ba70e2015-10-29 12:41:29 -070010922#if !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +000010923const int EnumValueOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000010924const int EnumValueOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070010925#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +000010926
kenton@google.com573989f2009-10-30 22:02:17 +000010927EnumValueOptions::EnumValueOptions()
Bo Yang5db21732015-05-21 14:28:59 -070010928 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010929 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010930 // @@protoc_insertion_point(constructor:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000010931}
10932
kenton@google.com80b1d622009-07-29 01:13:20 +000010933void EnumValueOptions::InitAsDefaultInstance() {
10934}
kenton@google.com24bf56f2008-09-24 20:31:01 +000010935
kenton@google.com573989f2009-10-30 22:02:17 +000010936EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080010937 : ::google::protobuf::Message(),
10938 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010939 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000010940 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000010941 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000010942}
10943
kenton@google.comd37d46d2009-04-25 02:53:47 +000010944void EnumValueOptions::SharedCtor() {
10945 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010946 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000010947 ::memset(_has_bits_, 0, sizeof(_has_bits_));
10948}
10949
temporal40ee5512008-07-10 02:12:20 +000010950EnumValueOptions::~EnumValueOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010951 // @@protoc_insertion_point(destructor:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010952 SharedDtor();
10953}
10954
10955void EnumValueOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010956 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000010957 }
10958}
10959
kenton@google.comfccb1462009-12-18 02:11:36 +000010960void EnumValueOptions::SetCachedSize(int size) const {
10961 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
10962 _cached_size_ = size;
10963 GOOGLE_SAFE_CONCURRENT_WRITES_END();
10964}
temporal40ee5512008-07-10 02:12:20 +000010965const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010966 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000010967 return EnumValueOptions_descriptor_;
10968}
10969
kenton@google.com24bf56f2008-09-24 20:31:01 +000010970const EnumValueOptions& EnumValueOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000010971 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
10972 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010973}
10974
10975EnumValueOptions* EnumValueOptions::default_instance_ = NULL;
10976
Feng Xiao6ef984a2014-11-10 17:34:54 -080010977EnumValueOptions* EnumValueOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080010978 EnumValueOptions* n = new EnumValueOptions;
10979 if (arena != NULL) {
10980 arena->Own(n);
10981 }
10982 return n;
temporal40ee5512008-07-10 02:12:20 +000010983}
10984
10985void EnumValueOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010986 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010987 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010988 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000010989 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080010990 if (_internal_metadata_.have_unknown_fields()) {
10991 mutable_unknown_fields()->Clear();
10992 }
temporal40ee5512008-07-10 02:12:20 +000010993}
10994
10995bool EnumValueOptions::MergePartialFromCodedStream(
10996 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010997#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000010998 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010999 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueOptions)
11000 for (;;) {
11001 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
11002 tag = p.first;
11003 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011004 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011005 // optional bool deprecated = 1 [default = false];
11006 case 1: {
11007 if (tag == 8) {
11008 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
11009 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
11010 input, &deprecated_)));
11011 set_has_deprecated();
11012 } else {
11013 goto handle_unusual;
11014 }
11015 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
11016 break;
11017 }
11018
kenton@google.com24bf56f2008-09-24 20:31:01 +000011019 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
11020 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011021 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011022 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070011023 DO_(input->IncrementRecursionDepth());
11024 parse_loop_uninterpreted_option:
11025 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000011026 input, add_uninterpreted_option()));
11027 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011028 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011029 }
Bo Yang5db21732015-05-21 14:28:59 -070011030 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
11031 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011032 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011033 break;
11034 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011035
kenton@google.com24bf56f2008-09-24 20:31:01 +000011036 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011037 handle_unusual:
11038 if (tag == 0 ||
11039 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000011040 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011041 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011042 }
11043 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011044 DO_(_extensions_.ParseField(tag, input, default_instance_,
11045 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000011046 continue;
11047 }
11048 DO_(::google::protobuf::internal::WireFormat::SkipField(
11049 input, tag, mutable_unknown_fields()));
11050 break;
11051 }
temporal40ee5512008-07-10 02:12:20 +000011052 }
temporal40ee5512008-07-10 02:12:20 +000011053 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011054success:
11055 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000011056 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011057failure:
11058 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueOptions)
11059 return false;
temporal40ee5512008-07-10 02:12:20 +000011060#undef DO_
11061}
11062
kenton@google.comd37d46d2009-04-25 02:53:47 +000011063void EnumValueOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000011064 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011065 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueOptions)
11066 // optional bool deprecated = 1 [default = false];
11067 if (has_deprecated()) {
11068 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->deprecated(), output);
11069 }
11070
kenton@google.com24bf56f2008-09-24 20:31:01 +000011071 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011072 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011073 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000011074 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011075 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011076
kenton@google.com24bf56f2008-09-24 20:31:01 +000011077 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011078 _extensions_.SerializeWithCachedSizes(
11079 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011080
Feng Xiao6ef984a2014-11-10 17:34:54 -080011081 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011082 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11083 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000011084 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011085 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011086}
11087
11088::google::protobuf::uint8* EnumValueOptions::SerializeWithCachedSizesToArray(
11089 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011090 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions)
11091 // optional bool deprecated = 1 [default = false];
11092 if (has_deprecated()) {
11093 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->deprecated(), target);
11094 }
11095
kenton@google.comd37d46d2009-04-25 02:53:47 +000011096 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011097 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011098 target = ::google::protobuf::internal::WireFormatLite::
11099 WriteMessageNoVirtualToArray(
11100 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011101 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011102
kenton@google.comd37d46d2009-04-25 02:53:47 +000011103 // Extension range [1000, 536870912)
11104 target = _extensions_.SerializeWithCachedSizesToArray(
11105 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011106
Feng Xiao6ef984a2014-11-10 17:34:54 -080011107 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011108 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11109 unknown_fields(), target);
11110 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011111 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011112 return target;
temporal40ee5512008-07-10 02:12:20 +000011113}
11114
11115int EnumValueOptions::ByteSize() const {
11116 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011117
Feng Xiao6ef984a2014-11-10 17:34:54 -080011118 // optional bool deprecated = 1 [default = false];
11119 if (has_deprecated()) {
11120 total_size += 1 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011121 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080011122
kenton@google.com24bf56f2008-09-24 20:31:01 +000011123 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000011124 total_size += 2 * this->uninterpreted_option_size();
11125 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011126 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000011127 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011128 this->uninterpreted_option(i));
11129 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011130
kenton@google.comd37d46d2009-04-25 02:53:47 +000011131 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011132
Feng Xiao6ef984a2014-11-10 17:34:54 -080011133 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000011134 total_size +=
11135 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
11136 unknown_fields());
11137 }
kenton@google.comfccb1462009-12-18 02:11:36 +000011138 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000011139 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000011140 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000011141 return total_size;
11142}
11143
11144void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011145 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070011146 const EnumValueOptions* source =
11147 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueOptions>(
11148 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011149 if (source == NULL) {
11150 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
11151 } else {
11152 MergeFrom(*source);
11153 }
temporal40ee5512008-07-10 02:12:20 +000011154}
11155
11156void EnumValueOptions::MergeFrom(const EnumValueOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011157 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011158 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011159 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
11160 if (from.has_deprecated()) {
11161 set_deprecated(from.deprecated());
11162 }
11163 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011164 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080011165 if (from._internal_metadata_.have_unknown_fields()) {
11166 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
11167 }
temporal40ee5512008-07-10 02:12:20 +000011168}
11169
11170void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) {
11171 if (&from == this) return;
11172 Clear();
11173 MergeFrom(from);
11174}
11175
11176void EnumValueOptions::CopyFrom(const EnumValueOptions& from) {
11177 if (&from == this) return;
11178 Clear();
11179 MergeFrom(from);
11180}
11181
kenton@google.comceb561d2009-06-25 19:05:36 +000011182bool EnumValueOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011183
jieluo@google.com4de8f552014-07-18 00:47:59 +000011184 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011185
kenton@google.comceb561d2009-06-25 19:05:36 +000011186 if (!_extensions_.IsInitialized()) return false; return true;
11187}
11188
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011189void EnumValueOptions::Swap(EnumValueOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011190 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011191 InternalSwap(other);
11192}
11193void EnumValueOptions::InternalSwap(EnumValueOptions* other) {
11194 std::swap(deprecated_, other->deprecated_);
11195 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11196 std::swap(_has_bits_[0], other->_has_bits_[0]);
11197 _internal_metadata_.Swap(&other->_internal_metadata_);
11198 std::swap(_cached_size_, other->_cached_size_);
11199 _extensions_.Swap(&other->_extensions_);
11200}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011201
kenton@google.com80b1d622009-07-29 01:13:20 +000011202::google::protobuf::Metadata EnumValueOptions::GetMetadata() const {
11203 protobuf_AssignDescriptorsOnce();
11204 ::google::protobuf::Metadata metadata;
11205 metadata.descriptor = EnumValueOptions_descriptor_;
11206 metadata.reflection = EnumValueOptions_reflection_;
11207 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011208}
11209
Jisi Liu885b6122015-02-28 14:51:22 -080011210#if PROTOBUF_INLINE_NOT_IN_HEADERS
11211// EnumValueOptions
11212
11213// optional bool deprecated = 1 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011214bool EnumValueOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011215 return (_has_bits_[0] & 0x00000001u) != 0;
11216}
Bo Yang5db21732015-05-21 14:28:59 -070011217void EnumValueOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011218 _has_bits_[0] |= 0x00000001u;
11219}
Bo Yang5db21732015-05-21 14:28:59 -070011220void EnumValueOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011221 _has_bits_[0] &= ~0x00000001u;
11222}
Bo Yang5db21732015-05-21 14:28:59 -070011223void EnumValueOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011224 deprecated_ = false;
11225 clear_has_deprecated();
11226}
11227 bool EnumValueOptions::deprecated() const {
11228 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.deprecated)
11229 return deprecated_;
11230}
11231 void EnumValueOptions::set_deprecated(bool value) {
11232 set_has_deprecated();
11233 deprecated_ = value;
11234 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueOptions.deprecated)
11235}
11236
11237// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011238int EnumValueOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011239 return uninterpreted_option_.size();
11240}
Bo Yang5db21732015-05-21 14:28:59 -070011241void EnumValueOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011242 uninterpreted_option_.Clear();
11243}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011244const ::google::protobuf::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080011245 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.uninterpreted_option)
11246 return uninterpreted_option_.Get(index);
11247}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011248::google::protobuf::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080011249 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueOptions.uninterpreted_option)
11250 return uninterpreted_option_.Mutable(index);
11251}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011252::google::protobuf::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011253 // @@protoc_insertion_point(field_add:google.protobuf.EnumValueOptions.uninterpreted_option)
11254 return uninterpreted_option_.Add();
11255}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011256::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080011257EnumValueOptions::mutable_uninterpreted_option() {
11258 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option)
11259 return &uninterpreted_option_;
11260}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011261const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11262EnumValueOptions::uninterpreted_option() const {
11263 // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option)
11264 return uninterpreted_option_;
11265}
Jisi Liu885b6122015-02-28 14:51:22 -080011266
11267#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011268
11269// ===================================================================
11270
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011271#if !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +000011272const int ServiceOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011273const int ServiceOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011274#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +000011275
kenton@google.com573989f2009-10-30 22:02:17 +000011276ServiceOptions::ServiceOptions()
Bo Yang5db21732015-05-21 14:28:59 -070011277 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011278 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011279 // @@protoc_insertion_point(constructor:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011280}
11281
kenton@google.com80b1d622009-07-29 01:13:20 +000011282void ServiceOptions::InitAsDefaultInstance() {
11283}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011284
kenton@google.com573989f2009-10-30 22:02:17 +000011285ServiceOptions::ServiceOptions(const ServiceOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011286 : ::google::protobuf::Message(),
11287 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011288 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000011289 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011290 // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011291}
11292
kenton@google.comd37d46d2009-04-25 02:53:47 +000011293void ServiceOptions::SharedCtor() {
11294 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011295 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000011296 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11297}
11298
temporal40ee5512008-07-10 02:12:20 +000011299ServiceOptions::~ServiceOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011300 // @@protoc_insertion_point(destructor:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011301 SharedDtor();
11302}
11303
11304void ServiceOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011305 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000011306 }
11307}
11308
kenton@google.comfccb1462009-12-18 02:11:36 +000011309void ServiceOptions::SetCachedSize(int size) const {
11310 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
11311 _cached_size_ = size;
11312 GOOGLE_SAFE_CONCURRENT_WRITES_END();
11313}
temporal40ee5512008-07-10 02:12:20 +000011314const ::google::protobuf::Descriptor* ServiceOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011315 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000011316 return ServiceOptions_descriptor_;
11317}
11318
kenton@google.com24bf56f2008-09-24 20:31:01 +000011319const ServiceOptions& ServiceOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000011320 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
11321 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011322}
11323
11324ServiceOptions* ServiceOptions::default_instance_ = NULL;
11325
Feng Xiao6ef984a2014-11-10 17:34:54 -080011326ServiceOptions* ServiceOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080011327 ServiceOptions* n = new ServiceOptions;
11328 if (arena != NULL) {
11329 arena->Own(n);
11330 }
11331 return n;
temporal40ee5512008-07-10 02:12:20 +000011332}
11333
11334void ServiceOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011335 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011336 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011337 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000011338 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080011339 if (_internal_metadata_.have_unknown_fields()) {
11340 mutable_unknown_fields()->Clear();
11341 }
temporal40ee5512008-07-10 02:12:20 +000011342}
11343
11344bool ServiceOptions::MergePartialFromCodedStream(
11345 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011346#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000011347 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011348 // @@protoc_insertion_point(parse_start:google.protobuf.ServiceOptions)
11349 for (;;) {
11350 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
11351 tag = p.first;
11352 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011353 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011354 // optional bool deprecated = 33 [default = false];
11355 case 33: {
11356 if (tag == 264) {
11357 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
11358 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
11359 input, &deprecated_)));
11360 set_has_deprecated();
11361 } else {
11362 goto handle_unusual;
11363 }
11364 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
11365 break;
11366 }
11367
kenton@google.com24bf56f2008-09-24 20:31:01 +000011368 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
11369 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011370 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011371 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070011372 DO_(input->IncrementRecursionDepth());
11373 parse_loop_uninterpreted_option:
11374 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000011375 input, add_uninterpreted_option()));
11376 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011377 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011378 }
Bo Yang5db21732015-05-21 14:28:59 -070011379 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
11380 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011381 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011382 break;
11383 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011384
kenton@google.com24bf56f2008-09-24 20:31:01 +000011385 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011386 handle_unusual:
11387 if (tag == 0 ||
11388 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000011389 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011390 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011391 }
11392 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011393 DO_(_extensions_.ParseField(tag, input, default_instance_,
11394 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000011395 continue;
11396 }
11397 DO_(::google::protobuf::internal::WireFormat::SkipField(
11398 input, tag, mutable_unknown_fields()));
11399 break;
11400 }
temporal40ee5512008-07-10 02:12:20 +000011401 }
temporal40ee5512008-07-10 02:12:20 +000011402 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011403success:
11404 // @@protoc_insertion_point(parse_success:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011405 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011406failure:
11407 // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceOptions)
11408 return false;
temporal40ee5512008-07-10 02:12:20 +000011409#undef DO_
11410}
11411
kenton@google.comd37d46d2009-04-25 02:53:47 +000011412void ServiceOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000011413 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011414 // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceOptions)
11415 // optional bool deprecated = 33 [default = false];
11416 if (has_deprecated()) {
11417 ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output);
11418 }
11419
kenton@google.com24bf56f2008-09-24 20:31:01 +000011420 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011421 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011422 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000011423 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011424 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011425
kenton@google.com24bf56f2008-09-24 20:31:01 +000011426 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011427 _extensions_.SerializeWithCachedSizes(
11428 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011429
Feng Xiao6ef984a2014-11-10 17:34:54 -080011430 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011431 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11432 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000011433 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011434 // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011435}
11436
11437::google::protobuf::uint8* ServiceOptions::SerializeWithCachedSizesToArray(
11438 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011439 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions)
11440 // optional bool deprecated = 33 [default = false];
11441 if (has_deprecated()) {
11442 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target);
11443 }
11444
kenton@google.comd37d46d2009-04-25 02:53:47 +000011445 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011446 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011447 target = ::google::protobuf::internal::WireFormatLite::
11448 WriteMessageNoVirtualToArray(
11449 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011450 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011451
kenton@google.comd37d46d2009-04-25 02:53:47 +000011452 // Extension range [1000, 536870912)
11453 target = _extensions_.SerializeWithCachedSizesToArray(
11454 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011455
Feng Xiao6ef984a2014-11-10 17:34:54 -080011456 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011457 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11458 unknown_fields(), target);
11459 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011460 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011461 return target;
temporal40ee5512008-07-10 02:12:20 +000011462}
11463
11464int ServiceOptions::ByteSize() const {
11465 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011466
Feng Xiao6ef984a2014-11-10 17:34:54 -080011467 // optional bool deprecated = 33 [default = false];
11468 if (has_deprecated()) {
11469 total_size += 2 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011470 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080011471
kenton@google.com24bf56f2008-09-24 20:31:01 +000011472 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000011473 total_size += 2 * this->uninterpreted_option_size();
11474 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011475 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000011476 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011477 this->uninterpreted_option(i));
11478 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011479
kenton@google.comd37d46d2009-04-25 02:53:47 +000011480 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011481
Feng Xiao6ef984a2014-11-10 17:34:54 -080011482 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000011483 total_size +=
11484 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
11485 unknown_fields());
11486 }
kenton@google.comfccb1462009-12-18 02:11:36 +000011487 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000011488 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000011489 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000011490 return total_size;
11491}
11492
11493void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011494 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070011495 const ServiceOptions* source =
11496 ::google::protobuf::internal::DynamicCastToGenerated<const ServiceOptions>(
11497 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011498 if (source == NULL) {
11499 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
11500 } else {
11501 MergeFrom(*source);
11502 }
temporal40ee5512008-07-10 02:12:20 +000011503}
11504
11505void ServiceOptions::MergeFrom(const ServiceOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011506 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011507 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011508 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
11509 if (from.has_deprecated()) {
11510 set_deprecated(from.deprecated());
11511 }
11512 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011513 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080011514 if (from._internal_metadata_.have_unknown_fields()) {
11515 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
11516 }
temporal40ee5512008-07-10 02:12:20 +000011517}
11518
11519void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) {
11520 if (&from == this) return;
11521 Clear();
11522 MergeFrom(from);
11523}
11524
11525void ServiceOptions::CopyFrom(const ServiceOptions& from) {
11526 if (&from == this) return;
11527 Clear();
11528 MergeFrom(from);
11529}
11530
kenton@google.comceb561d2009-06-25 19:05:36 +000011531bool ServiceOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011532
jieluo@google.com4de8f552014-07-18 00:47:59 +000011533 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011534
kenton@google.comceb561d2009-06-25 19:05:36 +000011535 if (!_extensions_.IsInitialized()) return false; return true;
11536}
11537
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011538void ServiceOptions::Swap(ServiceOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011539 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011540 InternalSwap(other);
11541}
11542void ServiceOptions::InternalSwap(ServiceOptions* other) {
11543 std::swap(deprecated_, other->deprecated_);
11544 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11545 std::swap(_has_bits_[0], other->_has_bits_[0]);
11546 _internal_metadata_.Swap(&other->_internal_metadata_);
11547 std::swap(_cached_size_, other->_cached_size_);
11548 _extensions_.Swap(&other->_extensions_);
11549}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011550
kenton@google.com80b1d622009-07-29 01:13:20 +000011551::google::protobuf::Metadata ServiceOptions::GetMetadata() const {
11552 protobuf_AssignDescriptorsOnce();
11553 ::google::protobuf::Metadata metadata;
11554 metadata.descriptor = ServiceOptions_descriptor_;
11555 metadata.reflection = ServiceOptions_reflection_;
11556 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011557}
11558
Jisi Liu885b6122015-02-28 14:51:22 -080011559#if PROTOBUF_INLINE_NOT_IN_HEADERS
11560// ServiceOptions
11561
11562// optional bool deprecated = 33 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011563bool ServiceOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011564 return (_has_bits_[0] & 0x00000001u) != 0;
11565}
Bo Yang5db21732015-05-21 14:28:59 -070011566void ServiceOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011567 _has_bits_[0] |= 0x00000001u;
11568}
Bo Yang5db21732015-05-21 14:28:59 -070011569void ServiceOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011570 _has_bits_[0] &= ~0x00000001u;
11571}
Bo Yang5db21732015-05-21 14:28:59 -070011572void ServiceOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011573 deprecated_ = false;
11574 clear_has_deprecated();
11575}
11576 bool ServiceOptions::deprecated() const {
11577 // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.deprecated)
11578 return deprecated_;
11579}
11580 void ServiceOptions::set_deprecated(bool value) {
11581 set_has_deprecated();
11582 deprecated_ = value;
11583 // @@protoc_insertion_point(field_set:google.protobuf.ServiceOptions.deprecated)
11584}
11585
11586// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011587int ServiceOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011588 return uninterpreted_option_.size();
11589}
Bo Yang5db21732015-05-21 14:28:59 -070011590void ServiceOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011591 uninterpreted_option_.Clear();
11592}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011593const ::google::protobuf::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080011594 // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.uninterpreted_option)
11595 return uninterpreted_option_.Get(index);
11596}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011597::google::protobuf::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080011598 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceOptions.uninterpreted_option)
11599 return uninterpreted_option_.Mutable(index);
11600}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011601::google::protobuf::UninterpretedOption* ServiceOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011602 // @@protoc_insertion_point(field_add:google.protobuf.ServiceOptions.uninterpreted_option)
11603 return uninterpreted_option_.Add();
11604}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011605::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080011606ServiceOptions::mutable_uninterpreted_option() {
11607 // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option)
11608 return &uninterpreted_option_;
11609}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011610const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11611ServiceOptions::uninterpreted_option() const {
11612 // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option)
11613 return uninterpreted_option_;
11614}
Jisi Liu885b6122015-02-28 14:51:22 -080011615
11616#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011617
11618// ===================================================================
11619
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011620#if !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +000011621const int MethodOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011622const int MethodOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011623#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +000011624
kenton@google.com573989f2009-10-30 22:02:17 +000011625MethodOptions::MethodOptions()
Bo Yang5db21732015-05-21 14:28:59 -070011626 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011627 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011628 // @@protoc_insertion_point(constructor:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011629}
11630
kenton@google.com80b1d622009-07-29 01:13:20 +000011631void MethodOptions::InitAsDefaultInstance() {
11632}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011633
kenton@google.com573989f2009-10-30 22:02:17 +000011634MethodOptions::MethodOptions(const MethodOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011635 : ::google::protobuf::Message(),
11636 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011637 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000011638 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011639 // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011640}
11641
kenton@google.comd37d46d2009-04-25 02:53:47 +000011642void MethodOptions::SharedCtor() {
11643 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011644 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000011645 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11646}
11647
temporal40ee5512008-07-10 02:12:20 +000011648MethodOptions::~MethodOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011649 // @@protoc_insertion_point(destructor:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011650 SharedDtor();
11651}
11652
11653void MethodOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011654 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000011655 }
11656}
11657
kenton@google.comfccb1462009-12-18 02:11:36 +000011658void MethodOptions::SetCachedSize(int size) const {
11659 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
11660 _cached_size_ = size;
11661 GOOGLE_SAFE_CONCURRENT_WRITES_END();
11662}
temporal40ee5512008-07-10 02:12:20 +000011663const ::google::protobuf::Descriptor* MethodOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011664 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000011665 return MethodOptions_descriptor_;
11666}
11667
kenton@google.com24bf56f2008-09-24 20:31:01 +000011668const MethodOptions& MethodOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000011669 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
11670 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011671}
11672
11673MethodOptions* MethodOptions::default_instance_ = NULL;
11674
Feng Xiao6ef984a2014-11-10 17:34:54 -080011675MethodOptions* MethodOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080011676 MethodOptions* n = new MethodOptions;
11677 if (arena != NULL) {
11678 arena->Own(n);
11679 }
11680 return n;
temporal40ee5512008-07-10 02:12:20 +000011681}
11682
11683void MethodOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011684 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011685 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011686 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000011687 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080011688 if (_internal_metadata_.have_unknown_fields()) {
11689 mutable_unknown_fields()->Clear();
11690 }
temporal40ee5512008-07-10 02:12:20 +000011691}
11692
11693bool MethodOptions::MergePartialFromCodedStream(
11694 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011695#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000011696 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011697 // @@protoc_insertion_point(parse_start:google.protobuf.MethodOptions)
11698 for (;;) {
11699 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
11700 tag = p.first;
11701 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011702 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011703 // optional bool deprecated = 33 [default = false];
11704 case 33: {
11705 if (tag == 264) {
11706 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
11707 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
11708 input, &deprecated_)));
11709 set_has_deprecated();
11710 } else {
11711 goto handle_unusual;
11712 }
11713 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
11714 break;
11715 }
11716
kenton@google.com24bf56f2008-09-24 20:31:01 +000011717 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
11718 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011719 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011720 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070011721 DO_(input->IncrementRecursionDepth());
11722 parse_loop_uninterpreted_option:
11723 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000011724 input, add_uninterpreted_option()));
11725 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011726 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011727 }
Bo Yang5db21732015-05-21 14:28:59 -070011728 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
11729 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011730 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011731 break;
11732 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011733
kenton@google.com24bf56f2008-09-24 20:31:01 +000011734 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011735 handle_unusual:
11736 if (tag == 0 ||
11737 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000011738 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011739 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011740 }
11741 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011742 DO_(_extensions_.ParseField(tag, input, default_instance_,
11743 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000011744 continue;
11745 }
11746 DO_(::google::protobuf::internal::WireFormat::SkipField(
11747 input, tag, mutable_unknown_fields()));
11748 break;
11749 }
temporal40ee5512008-07-10 02:12:20 +000011750 }
temporal40ee5512008-07-10 02:12:20 +000011751 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011752success:
11753 // @@protoc_insertion_point(parse_success:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011754 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011755failure:
11756 // @@protoc_insertion_point(parse_failure:google.protobuf.MethodOptions)
11757 return false;
temporal40ee5512008-07-10 02:12:20 +000011758#undef DO_
11759}
11760
kenton@google.comd37d46d2009-04-25 02:53:47 +000011761void MethodOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000011762 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011763 // @@protoc_insertion_point(serialize_start:google.protobuf.MethodOptions)
11764 // optional bool deprecated = 33 [default = false];
11765 if (has_deprecated()) {
11766 ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output);
11767 }
11768
kenton@google.com24bf56f2008-09-24 20:31:01 +000011769 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011770 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011771 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000011772 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011773 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011774
kenton@google.com24bf56f2008-09-24 20:31:01 +000011775 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011776 _extensions_.SerializeWithCachedSizes(
11777 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011778
Feng Xiao6ef984a2014-11-10 17:34:54 -080011779 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011780 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11781 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000011782 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011783 // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011784}
11785
11786::google::protobuf::uint8* MethodOptions::SerializeWithCachedSizesToArray(
11787 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011788 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions)
11789 // optional bool deprecated = 33 [default = false];
11790 if (has_deprecated()) {
11791 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target);
11792 }
11793
kenton@google.comd37d46d2009-04-25 02:53:47 +000011794 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011795 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011796 target = ::google::protobuf::internal::WireFormatLite::
11797 WriteMessageNoVirtualToArray(
11798 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011799 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011800
kenton@google.comd37d46d2009-04-25 02:53:47 +000011801 // Extension range [1000, 536870912)
11802 target = _extensions_.SerializeWithCachedSizesToArray(
11803 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011804
Feng Xiao6ef984a2014-11-10 17:34:54 -080011805 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011806 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11807 unknown_fields(), target);
11808 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011809 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011810 return target;
temporal40ee5512008-07-10 02:12:20 +000011811}
11812
11813int MethodOptions::ByteSize() const {
11814 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011815
Feng Xiao6ef984a2014-11-10 17:34:54 -080011816 // optional bool deprecated = 33 [default = false];
11817 if (has_deprecated()) {
11818 total_size += 2 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011819 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080011820
kenton@google.com24bf56f2008-09-24 20:31:01 +000011821 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000011822 total_size += 2 * this->uninterpreted_option_size();
11823 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011824 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000011825 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011826 this->uninterpreted_option(i));
11827 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011828
kenton@google.comd37d46d2009-04-25 02:53:47 +000011829 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011830
Feng Xiao6ef984a2014-11-10 17:34:54 -080011831 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000011832 total_size +=
11833 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
11834 unknown_fields());
11835 }
kenton@google.comfccb1462009-12-18 02:11:36 +000011836 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000011837 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000011838 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000011839 return total_size;
11840}
11841
11842void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011843 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070011844 const MethodOptions* source =
11845 ::google::protobuf::internal::DynamicCastToGenerated<const MethodOptions>(
11846 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011847 if (source == NULL) {
11848 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
11849 } else {
11850 MergeFrom(*source);
11851 }
temporal40ee5512008-07-10 02:12:20 +000011852}
11853
11854void MethodOptions::MergeFrom(const MethodOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011855 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011856 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011857 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
11858 if (from.has_deprecated()) {
11859 set_deprecated(from.deprecated());
11860 }
11861 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011862 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080011863 if (from._internal_metadata_.have_unknown_fields()) {
11864 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
11865 }
temporal40ee5512008-07-10 02:12:20 +000011866}
11867
11868void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) {
11869 if (&from == this) return;
11870 Clear();
11871 MergeFrom(from);
11872}
11873
11874void MethodOptions::CopyFrom(const MethodOptions& from) {
11875 if (&from == this) return;
11876 Clear();
11877 MergeFrom(from);
11878}
11879
kenton@google.comceb561d2009-06-25 19:05:36 +000011880bool MethodOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011881
jieluo@google.com4de8f552014-07-18 00:47:59 +000011882 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011883
kenton@google.comceb561d2009-06-25 19:05:36 +000011884 if (!_extensions_.IsInitialized()) return false; return true;
11885}
11886
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011887void MethodOptions::Swap(MethodOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011888 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011889 InternalSwap(other);
11890}
11891void MethodOptions::InternalSwap(MethodOptions* other) {
11892 std::swap(deprecated_, other->deprecated_);
11893 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11894 std::swap(_has_bits_[0], other->_has_bits_[0]);
11895 _internal_metadata_.Swap(&other->_internal_metadata_);
11896 std::swap(_cached_size_, other->_cached_size_);
11897 _extensions_.Swap(&other->_extensions_);
11898}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011899
kenton@google.com80b1d622009-07-29 01:13:20 +000011900::google::protobuf::Metadata MethodOptions::GetMetadata() const {
11901 protobuf_AssignDescriptorsOnce();
11902 ::google::protobuf::Metadata metadata;
11903 metadata.descriptor = MethodOptions_descriptor_;
11904 metadata.reflection = MethodOptions_reflection_;
11905 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011906}
11907
Jisi Liu885b6122015-02-28 14:51:22 -080011908#if PROTOBUF_INLINE_NOT_IN_HEADERS
11909// MethodOptions
11910
11911// optional bool deprecated = 33 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011912bool MethodOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011913 return (_has_bits_[0] & 0x00000001u) != 0;
11914}
Bo Yang5db21732015-05-21 14:28:59 -070011915void MethodOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011916 _has_bits_[0] |= 0x00000001u;
11917}
Bo Yang5db21732015-05-21 14:28:59 -070011918void MethodOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011919 _has_bits_[0] &= ~0x00000001u;
11920}
Bo Yang5db21732015-05-21 14:28:59 -070011921void MethodOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011922 deprecated_ = false;
11923 clear_has_deprecated();
11924}
11925 bool MethodOptions::deprecated() const {
11926 // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.deprecated)
11927 return deprecated_;
11928}
11929 void MethodOptions::set_deprecated(bool value) {
11930 set_has_deprecated();
11931 deprecated_ = value;
11932 // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.deprecated)
11933}
11934
11935// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011936int MethodOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011937 return uninterpreted_option_.size();
11938}
Bo Yang5db21732015-05-21 14:28:59 -070011939void MethodOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011940 uninterpreted_option_.Clear();
11941}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011942const ::google::protobuf::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080011943 // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.uninterpreted_option)
11944 return uninterpreted_option_.Get(index);
11945}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011946::google::protobuf::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080011947 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodOptions.uninterpreted_option)
11948 return uninterpreted_option_.Mutable(index);
11949}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011950::google::protobuf::UninterpretedOption* MethodOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011951 // @@protoc_insertion_point(field_add:google.protobuf.MethodOptions.uninterpreted_option)
11952 return uninterpreted_option_.Add();
11953}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011954::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080011955MethodOptions::mutable_uninterpreted_option() {
11956 // @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option)
11957 return &uninterpreted_option_;
11958}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011959const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11960MethodOptions::uninterpreted_option() const {
11961 // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option)
11962 return uninterpreted_option_;
11963}
Jisi Liu885b6122015-02-28 14:51:22 -080011964
11965#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011966
kenton@google.com24bf56f2008-09-24 20:31:01 +000011967// ===================================================================
11968
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011969#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011970const int UninterpretedOption_NamePart::kNamePartFieldNumber;
11971const int UninterpretedOption_NamePart::kIsExtensionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011972#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.com24bf56f2008-09-24 20:31:01 +000011973
kenton@google.com573989f2009-10-30 22:02:17 +000011974UninterpretedOption_NamePart::UninterpretedOption_NamePart()
Bo Yang5db21732015-05-21 14:28:59 -070011975 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011976 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011977 // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000011978}
11979
kenton@google.com80b1d622009-07-29 01:13:20 +000011980void UninterpretedOption_NamePart::InitAsDefaultInstance() {
11981}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011982
kenton@google.com573989f2009-10-30 22:02:17 +000011983UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011984 : ::google::protobuf::Message(),
11985 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011986 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +000011987 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011988 // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000011989}
11990
kenton@google.comd37d46d2009-04-25 02:53:47 +000011991void UninterpretedOption_NamePart::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011992 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +000011993 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011994 name_part_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000011995 is_extension_ = false;
11996 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11997}
11998
kenton@google.com24bf56f2008-09-24 20:31:01 +000011999UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012000 // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012001 SharedDtor();
12002}
12003
12004void UninterpretedOption_NamePart::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080012005 name_part_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012006 if (this != default_instance_) {
12007 }
12008}
12009
kenton@google.comfccb1462009-12-18 02:11:36 +000012010void UninterpretedOption_NamePart::SetCachedSize(int size) const {
12011 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
12012 _cached_size_ = size;
12013 GOOGLE_SAFE_CONCURRENT_WRITES_END();
12014}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012015const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012016 protobuf_AssignDescriptorsOnce();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012017 return UninterpretedOption_NamePart_descriptor_;
12018}
12019
12020const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000012021 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
12022 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012023}
12024
12025UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL;
12026
Feng Xiao6ef984a2014-11-10 17:34:54 -080012027UninterpretedOption_NamePart* UninterpretedOption_NamePart::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080012028 UninterpretedOption_NamePart* n = new UninterpretedOption_NamePart;
12029 if (arena != NULL) {
12030 arena->Own(n);
12031 }
12032 return n;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012033}
12034
12035void UninterpretedOption_NamePart::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -070012036 if (_has_bits_[0 / 32] & 3u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012037 if (has_name_part()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012038 name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012039 }
12040 is_extension_ = false;
12041 }
12042 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080012043 if (_internal_metadata_.have_unknown_fields()) {
12044 mutable_unknown_fields()->Clear();
12045 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012046}
12047
12048bool UninterpretedOption_NamePart::MergePartialFromCodedStream(
12049 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012050#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
kenton@google.com24bf56f2008-09-24 20:31:01 +000012051 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012052 // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption.NamePart)
12053 for (;;) {
12054 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
12055 tag = p.first;
12056 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000012057 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012058 // required string name_part = 1;
12059 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012060 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012061 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
12062 input, this->mutable_name_part()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000012063 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +000012064 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012065 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012066 "google.protobuf.UninterpretedOption.NamePart.name_part");
kenton@google.comfccb1462009-12-18 02:11:36 +000012067 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012068 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012069 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012070 if (input->ExpectTag(16)) goto parse_is_extension;
12071 break;
12072 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012073
kenton@google.com24bf56f2008-09-24 20:31:01 +000012074 // required bool is_extension = 2;
12075 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012076 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012077 parse_is_extension:
12078 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12079 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
12080 input, &is_extension_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012081 set_has_is_extension();
kenton@google.comfccb1462009-12-18 02:11:36 +000012082 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012083 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012084 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012085 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012086 break;
12087 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012088
kenton@google.com24bf56f2008-09-24 20:31:01 +000012089 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012090 handle_unusual:
12091 if (tag == 0 ||
12092 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000012093 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012094 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012095 }
12096 DO_(::google::protobuf::internal::WireFormat::SkipField(
12097 input, tag, mutable_unknown_fields()));
12098 break;
12099 }
12100 }
12101 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012102success:
12103 // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012104 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012105failure:
12106 // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption.NamePart)
12107 return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012108#undef DO_
12109}
12110
kenton@google.comd37d46d2009-04-25 02:53:47 +000012111void UninterpretedOption_NamePart::SerializeWithCachedSizes(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012112 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012113 // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012114 // required string name_part = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012115 if (has_name_part()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012116 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012117 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012118 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012119 "google.protobuf.UninterpretedOption.NamePart.name_part");
jieluo@google.com4de8f552014-07-18 00:47:59 +000012120 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000012121 1, this->name_part(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012122 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012123
kenton@google.com24bf56f2008-09-24 20:31:01 +000012124 // required bool is_extension = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012125 if (has_is_extension()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012126 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_extension(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012127 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012128
Feng Xiao6ef984a2014-11-10 17:34:54 -080012129 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012130 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
12131 unknown_fields(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012132 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012133 // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012134}
12135
12136::google::protobuf::uint8* UninterpretedOption_NamePart::SerializeWithCachedSizesToArray(
12137 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012138 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012139 // required string name_part = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012140 if (has_name_part()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012141 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012142 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012143 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012144 "google.protobuf.UninterpretedOption.NamePart.name_part");
kenton@google.com80b1d622009-07-29 01:13:20 +000012145 target =
12146 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12147 1, this->name_part(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012148 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012149
kenton@google.comd37d46d2009-04-25 02:53:47 +000012150 // required bool is_extension = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012151 if (has_is_extension()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012152 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012153 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012154
Feng Xiao6ef984a2014-11-10 17:34:54 -080012155 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012156 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
12157 unknown_fields(), target);
12158 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012159 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012160 return target;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012161}
12162
Feng Xiao6ef984a2014-11-10 17:34:54 -080012163int UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const {
12164 int total_size = 0;
12165
12166 if (has_name_part()) {
12167 // required string name_part = 1;
12168 total_size += 1 +
12169 ::google::protobuf::internal::WireFormatLite::StringSize(
12170 this->name_part());
12171 }
12172
12173 if (has_is_extension()) {
12174 // required bool is_extension = 2;
12175 total_size += 1 + 1;
12176 }
12177
12178 return total_size;
12179}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012180int UninterpretedOption_NamePart::ByteSize() const {
12181 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012182
Feng Xiao6ef984a2014-11-10 17:34:54 -080012183 if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
kenton@google.com24bf56f2008-09-24 20:31:01 +000012184 // required string name_part = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012185 total_size += 1 +
12186 ::google::protobuf::internal::WireFormatLite::StringSize(
12187 this->name_part());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012188
kenton@google.com24bf56f2008-09-24 20:31:01 +000012189 // required bool is_extension = 2;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012190 total_size += 1 + 1;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012191
Feng Xiao6ef984a2014-11-10 17:34:54 -080012192 } else {
12193 total_size += RequiredFieldsByteSizeFallback();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012194 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012195 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012196 total_size +=
12197 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
12198 unknown_fields());
12199 }
kenton@google.comfccb1462009-12-18 02:11:36 +000012200 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012201 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000012202 GOOGLE_SAFE_CONCURRENT_WRITES_END();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012203 return total_size;
12204}
12205
12206void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012207 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070012208 const UninterpretedOption_NamePart* source =
12209 ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption_NamePart>(
12210 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012211 if (source == NULL) {
12212 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
12213 } else {
12214 MergeFrom(*source);
12215 }
12216}
12217
12218void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012219 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012220 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012221 if (from.has_name_part()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012222 set_has_name_part();
12223 name_part_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_part_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012224 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012225 if (from.has_is_extension()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012226 set_is_extension(from.is_extension());
12227 }
12228 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012229 if (from._internal_metadata_.have_unknown_fields()) {
12230 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
12231 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012232}
12233
12234void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) {
12235 if (&from == this) return;
12236 Clear();
12237 MergeFrom(from);
12238}
12239
12240void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) {
12241 if (&from == this) return;
12242 Clear();
12243 MergeFrom(from);
12244}
12245
kenton@google.comceb561d2009-06-25 19:05:36 +000012246bool UninterpretedOption_NamePart::IsInitialized() const {
12247 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012248
kenton@google.comceb561d2009-06-25 19:05:36 +000012249 return true;
12250}
12251
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012252void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080012253 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012254 InternalSwap(other);
12255}
12256void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) {
12257 name_part_.Swap(&other->name_part_);
12258 std::swap(is_extension_, other->is_extension_);
12259 std::swap(_has_bits_[0], other->_has_bits_[0]);
12260 _internal_metadata_.Swap(&other->_internal_metadata_);
12261 std::swap(_cached_size_, other->_cached_size_);
12262}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012263
kenton@google.com80b1d622009-07-29 01:13:20 +000012264::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const {
12265 protobuf_AssignDescriptorsOnce();
12266 ::google::protobuf::Metadata metadata;
12267 metadata.descriptor = UninterpretedOption_NamePart_descriptor_;
12268 metadata.reflection = UninterpretedOption_NamePart_reflection_;
12269 return metadata;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012270}
12271
kenton@google.com24bf56f2008-09-24 20:31:01 +000012272
12273// -------------------------------------------------------------------
12274
Bruce Dawson86ba70e2015-10-29 12:41:29 -070012275#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000012276const int UninterpretedOption::kNameFieldNumber;
12277const int UninterpretedOption::kIdentifierValueFieldNumber;
12278const int UninterpretedOption::kPositiveIntValueFieldNumber;
12279const int UninterpretedOption::kNegativeIntValueFieldNumber;
12280const int UninterpretedOption::kDoubleValueFieldNumber;
12281const int UninterpretedOption::kStringValueFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012282const int UninterpretedOption::kAggregateValueFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070012283#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000012284
kenton@google.com573989f2009-10-30 22:02:17 +000012285UninterpretedOption::UninterpretedOption()
Bo Yang5db21732015-05-21 14:28:59 -070012286 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012287 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000012288 // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012289}
12290
kenton@google.com80b1d622009-07-29 01:13:20 +000012291void UninterpretedOption::InitAsDefaultInstance() {
12292}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012293
kenton@google.com573989f2009-10-30 22:02:17 +000012294UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080012295 : ::google::protobuf::Message(),
12296 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012297 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012298 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000012299 // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012300}
12301
kenton@google.comd37d46d2009-04-25 02:53:47 +000012302void UninterpretedOption::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012303 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +000012304 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012305 identifier_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000012306 positive_int_value_ = GOOGLE_ULONGLONG(0);
12307 negative_int_value_ = GOOGLE_LONGLONG(0);
12308 double_value_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012309 string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12310 aggregate_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000012311 ::memset(_has_bits_, 0, sizeof(_has_bits_));
12312}
12313
kenton@google.com24bf56f2008-09-24 20:31:01 +000012314UninterpretedOption::~UninterpretedOption() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012315 // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012316 SharedDtor();
12317}
12318
12319void UninterpretedOption::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080012320 identifier_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12321 string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12322 aggregate_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012323 if (this != default_instance_) {
12324 }
12325}
12326
kenton@google.comfccb1462009-12-18 02:11:36 +000012327void UninterpretedOption::SetCachedSize(int size) const {
12328 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
12329 _cached_size_ = size;
12330 GOOGLE_SAFE_CONCURRENT_WRITES_END();
12331}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012332const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012333 protobuf_AssignDescriptorsOnce();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012334 return UninterpretedOption_descriptor_;
12335}
12336
12337const UninterpretedOption& UninterpretedOption::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000012338 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
12339 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012340}
12341
12342UninterpretedOption* UninterpretedOption::default_instance_ = NULL;
12343
Feng Xiao6ef984a2014-11-10 17:34:54 -080012344UninterpretedOption* UninterpretedOption::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080012345 UninterpretedOption* n = new UninterpretedOption;
12346 if (arena != NULL) {
12347 arena->Own(n);
12348 }
12349 return n;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012350}
12351
12352void UninterpretedOption::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -080012353#define ZR_HELPER_(f) reinterpret_cast<char*>(\
12354 &reinterpret_cast<UninterpretedOption*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +000012355
Jisi Liu885b6122015-02-28 14:51:22 -080012356#define ZR_(first, last) do {\
12357 ::memset(&first, 0,\
12358 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
12359} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +000012360
Austin Schuhe8268372015-05-19 23:22:20 -070012361 if (_has_bits_[0 / 32] & 126u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012362 ZR_(positive_int_value_, double_value_);
liujisi@google.com33165fe2010-11-02 13:14:58 +000012363 if (has_identifier_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012364 identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012365 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012366 if (has_string_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012367 string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012368 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012369 if (has_aggregate_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012370 aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000012371 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012372 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012373
Jisi Liu885b6122015-02-28 14:51:22 -080012374#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +000012375#undef ZR_
12376
kenton@google.com24bf56f2008-09-24 20:31:01 +000012377 name_.Clear();
12378 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080012379 if (_internal_metadata_.have_unknown_fields()) {
12380 mutable_unknown_fields()->Clear();
12381 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012382}
12383
12384bool UninterpretedOption::MergePartialFromCodedStream(
12385 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012386#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
kenton@google.com24bf56f2008-09-24 20:31:01 +000012387 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012388 // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption)
12389 for (;;) {
12390 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
12391 tag = p.first;
12392 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000012393 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012394 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
12395 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012396 if (tag == 18) {
Bo Yang5db21732015-05-21 14:28:59 -070012397 DO_(input->IncrementRecursionDepth());
12398 parse_loop_name:
12399 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000012400 input, add_name()));
12401 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012402 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012403 }
Bo Yang5db21732015-05-21 14:28:59 -070012404 if (input->ExpectTag(18)) goto parse_loop_name;
12405 input->UnsafeDecrementRecursionDepth();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012406 if (input->ExpectTag(26)) goto parse_identifier_value;
12407 break;
12408 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012409
kenton@google.com24bf56f2008-09-24 20:31:01 +000012410 // optional string identifier_value = 3;
12411 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012412 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012413 parse_identifier_value:
12414 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
12415 input, this->mutable_identifier_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000012416 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +000012417 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012418 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012419 "google.protobuf.UninterpretedOption.identifier_value");
kenton@google.comfccb1462009-12-18 02:11:36 +000012420 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012421 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012422 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012423 if (input->ExpectTag(32)) goto parse_positive_int_value;
12424 break;
12425 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012426
kenton@google.com24bf56f2008-09-24 20:31:01 +000012427 // optional uint64 positive_int_value = 4;
12428 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012429 if (tag == 32) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012430 parse_positive_int_value:
12431 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12432 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
12433 input, &positive_int_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012434 set_has_positive_int_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012435 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012436 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012437 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012438 if (input->ExpectTag(40)) goto parse_negative_int_value;
12439 break;
12440 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012441
kenton@google.com24bf56f2008-09-24 20:31:01 +000012442 // optional int64 negative_int_value = 5;
12443 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012444 if (tag == 40) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012445 parse_negative_int_value:
12446 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12447 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
12448 input, &negative_int_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012449 set_has_negative_int_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012450 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012451 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012452 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012453 if (input->ExpectTag(49)) goto parse_double_value;
12454 break;
12455 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012456
kenton@google.com24bf56f2008-09-24 20:31:01 +000012457 // optional double double_value = 6;
12458 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012459 if (tag == 49) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012460 parse_double_value:
12461 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12462 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
12463 input, &double_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012464 set_has_double_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012465 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012466 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012467 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012468 if (input->ExpectTag(58)) goto parse_string_value;
12469 break;
12470 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012471
kenton@google.com24bf56f2008-09-24 20:31:01 +000012472 // optional bytes string_value = 7;
12473 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012474 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012475 parse_string_value:
12476 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
12477 input, this->mutable_string_value()));
12478 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012479 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012480 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012481 if (input->ExpectTag(66)) goto parse_aggregate_value;
12482 break;
12483 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012484
liujisi@google.com33165fe2010-11-02 13:14:58 +000012485 // optional string aggregate_value = 8;
12486 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012487 if (tag == 66) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012488 parse_aggregate_value:
12489 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
12490 input, this->mutable_aggregate_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000012491 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012492 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012493 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012494 "google.protobuf.UninterpretedOption.aggregate_value");
liujisi@google.com33165fe2010-11-02 13:14:58 +000012495 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012496 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012497 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012498 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012499 break;
12500 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012501
kenton@google.com24bf56f2008-09-24 20:31:01 +000012502 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012503 handle_unusual:
12504 if (tag == 0 ||
12505 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000012506 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012507 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012508 }
12509 DO_(::google::protobuf::internal::WireFormat::SkipField(
12510 input, tag, mutable_unknown_fields()));
12511 break;
12512 }
12513 }
12514 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012515success:
12516 // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012517 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012518failure:
12519 // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption)
12520 return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012521#undef DO_
12522}
12523
kenton@google.comd37d46d2009-04-25 02:53:47 +000012524void UninterpretedOption::SerializeWithCachedSizes(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012525 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012526 // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012527 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Feng Xiaof157a562014-11-14 11:50:31 -080012528 for (unsigned int i = 0, n = this->name_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012529 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000012530 2, this->name(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012531 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012532
kenton@google.com24bf56f2008-09-24 20:31:01 +000012533 // optional string identifier_value = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012534 if (has_identifier_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012535 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012536 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012537 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012538 "google.protobuf.UninterpretedOption.identifier_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +000012539 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000012540 3, this->identifier_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012541 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012542
kenton@google.com24bf56f2008-09-24 20:31:01 +000012543 // optional uint64 positive_int_value = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012544 if (has_positive_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012545 ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012546 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012547
kenton@google.com24bf56f2008-09-24 20:31:01 +000012548 // optional int64 negative_int_value = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012549 if (has_negative_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012550 ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012551 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012552
kenton@google.com24bf56f2008-09-24 20:31:01 +000012553 // optional double double_value = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012554 if (has_double_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012555 ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->double_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012556 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012557
kenton@google.com24bf56f2008-09-24 20:31:01 +000012558 // optional bytes string_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012559 if (has_string_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012560 ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000012561 7, this->string_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012562 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012563
liujisi@google.com33165fe2010-11-02 13:14:58 +000012564 // optional string aggregate_value = 8;
12565 if (has_aggregate_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012566 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012567 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012568 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012569 "google.protobuf.UninterpretedOption.aggregate_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +000012570 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012571 8, this->aggregate_value(), output);
12572 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012573
Feng Xiao6ef984a2014-11-10 17:34:54 -080012574 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012575 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
12576 unknown_fields(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012577 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012578 // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012579}
12580
12581::google::protobuf::uint8* UninterpretedOption::SerializeWithCachedSizesToArray(
12582 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012583 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012584 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Feng Xiaof157a562014-11-14 11:50:31 -080012585 for (unsigned int i = 0, n = this->name_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012586 target = ::google::protobuf::internal::WireFormatLite::
12587 WriteMessageNoVirtualToArray(
12588 2, this->name(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012589 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012590
kenton@google.comd37d46d2009-04-25 02:53:47 +000012591 // optional string identifier_value = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012592 if (has_identifier_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012593 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012594 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012595 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012596 "google.protobuf.UninterpretedOption.identifier_value");
kenton@google.com80b1d622009-07-29 01:13:20 +000012597 target =
12598 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12599 3, this->identifier_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012600 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012601
kenton@google.comd37d46d2009-04-25 02:53:47 +000012602 // optional uint64 positive_int_value = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012603 if (has_positive_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012604 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012605 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012606
kenton@google.comd37d46d2009-04-25 02:53:47 +000012607 // optional int64 negative_int_value = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012608 if (has_negative_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012609 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012610 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012611
kenton@google.comd37d46d2009-04-25 02:53:47 +000012612 // optional double double_value = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012613 if (has_double_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012614 target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012615 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012616
kenton@google.comd37d46d2009-04-25 02:53:47 +000012617 // optional bytes string_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012618 if (has_string_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012619 target =
12620 ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
12621 7, this->string_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012622 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012623
liujisi@google.com33165fe2010-11-02 13:14:58 +000012624 // optional string aggregate_value = 8;
12625 if (has_aggregate_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012626 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012627 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012628 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012629 "google.protobuf.UninterpretedOption.aggregate_value");
liujisi@google.com33165fe2010-11-02 13:14:58 +000012630 target =
12631 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12632 8, this->aggregate_value(), target);
12633 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012634
Feng Xiao6ef984a2014-11-10 17:34:54 -080012635 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012636 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
12637 unknown_fields(), target);
12638 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012639 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012640 return target;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012641}
12642
12643int UninterpretedOption::ByteSize() const {
12644 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012645
Austin Schuh307af622015-06-05 22:46:01 -070012646 if (_has_bits_[1 / 32] & 126u) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012647 // optional string identifier_value = 3;
12648 if (has_identifier_value()) {
12649 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012650 ::google::protobuf::internal::WireFormatLite::StringSize(
12651 this->identifier_value());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012652 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012653
kenton@google.com24bf56f2008-09-24 20:31:01 +000012654 // optional uint64 positive_int_value = 4;
12655 if (has_positive_int_value()) {
12656 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012657 ::google::protobuf::internal::WireFormatLite::UInt64Size(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012658 this->positive_int_value());
12659 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012660
kenton@google.com24bf56f2008-09-24 20:31:01 +000012661 // optional int64 negative_int_value = 5;
12662 if (has_negative_int_value()) {
12663 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012664 ::google::protobuf::internal::WireFormatLite::Int64Size(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012665 this->negative_int_value());
12666 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012667
kenton@google.com24bf56f2008-09-24 20:31:01 +000012668 // optional double double_value = 6;
12669 if (has_double_value()) {
12670 total_size += 1 + 8;
12671 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012672
kenton@google.com24bf56f2008-09-24 20:31:01 +000012673 // optional bytes string_value = 7;
12674 if (has_string_value()) {
12675 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012676 ::google::protobuf::internal::WireFormatLite::BytesSize(
12677 this->string_value());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012678 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012679
liujisi@google.com33165fe2010-11-02 13:14:58 +000012680 // optional string aggregate_value = 8;
12681 if (has_aggregate_value()) {
12682 total_size += 1 +
12683 ::google::protobuf::internal::WireFormatLite::StringSize(
12684 this->aggregate_value());
12685 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012686
kenton@google.com24bf56f2008-09-24 20:31:01 +000012687 }
12688 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +000012689 total_size += 1 * this->name_size();
12690 for (int i = 0; i < this->name_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012691 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000012692 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012693 this->name(i));
12694 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012695
Feng Xiao6ef984a2014-11-10 17:34:54 -080012696 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012697 total_size +=
12698 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
12699 unknown_fields());
12700 }
kenton@google.comfccb1462009-12-18 02:11:36 +000012701 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012702 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000012703 GOOGLE_SAFE_CONCURRENT_WRITES_END();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012704 return total_size;
12705}
12706
12707void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012708 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070012709 const UninterpretedOption* source =
12710 ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption>(
12711 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012712 if (source == NULL) {
12713 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
12714 } else {
12715 MergeFrom(*source);
12716 }
12717}
12718
12719void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012720 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012721 name_.MergeFrom(from.name_);
12722 if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012723 if (from.has_identifier_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012724 set_has_identifier_value();
12725 identifier_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.identifier_value_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012726 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012727 if (from.has_positive_int_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012728 set_positive_int_value(from.positive_int_value());
12729 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012730 if (from.has_negative_int_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012731 set_negative_int_value(from.negative_int_value());
12732 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012733 if (from.has_double_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012734 set_double_value(from.double_value());
12735 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012736 if (from.has_string_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012737 set_has_string_value();
12738 string_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_value_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012739 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012740 if (from.has_aggregate_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012741 set_has_aggregate_value();
12742 aggregate_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.aggregate_value_);
liujisi@google.com33165fe2010-11-02 13:14:58 +000012743 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012744 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012745 if (from._internal_metadata_.have_unknown_fields()) {
12746 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
12747 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012748}
12749
12750void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) {
12751 if (&from == this) return;
12752 Clear();
12753 MergeFrom(from);
12754}
12755
12756void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
12757 if (&from == this) return;
12758 Clear();
12759 MergeFrom(from);
12760}
12761
kenton@google.comceb561d2009-06-25 19:05:36 +000012762bool UninterpretedOption::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012763
jieluo@google.com4de8f552014-07-18 00:47:59 +000012764 if (!::google::protobuf::internal::AllAreInitialized(this->name())) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +000012765 return true;
12766}
12767
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012768void UninterpretedOption::Swap(UninterpretedOption* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080012769 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012770 InternalSwap(other);
12771}
12772void UninterpretedOption::InternalSwap(UninterpretedOption* other) {
12773 name_.UnsafeArenaSwap(&other->name_);
12774 identifier_value_.Swap(&other->identifier_value_);
12775 std::swap(positive_int_value_, other->positive_int_value_);
12776 std::swap(negative_int_value_, other->negative_int_value_);
12777 std::swap(double_value_, other->double_value_);
12778 string_value_.Swap(&other->string_value_);
12779 aggregate_value_.Swap(&other->aggregate_value_);
12780 std::swap(_has_bits_[0], other->_has_bits_[0]);
12781 _internal_metadata_.Swap(&other->_internal_metadata_);
12782 std::swap(_cached_size_, other->_cached_size_);
12783}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012784
kenton@google.com80b1d622009-07-29 01:13:20 +000012785::google::protobuf::Metadata UninterpretedOption::GetMetadata() const {
12786 protobuf_AssignDescriptorsOnce();
12787 ::google::protobuf::Metadata metadata;
12788 metadata.descriptor = UninterpretedOption_descriptor_;
12789 metadata.reflection = UninterpretedOption_reflection_;
12790 return metadata;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012791}
12792
Jisi Liu885b6122015-02-28 14:51:22 -080012793#if PROTOBUF_INLINE_NOT_IN_HEADERS
12794// UninterpretedOption_NamePart
12795
12796// required string name_part = 1;
Bo Yang5db21732015-05-21 14:28:59 -070012797bool UninterpretedOption_NamePart::has_name_part() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012798 return (_has_bits_[0] & 0x00000001u) != 0;
12799}
Bo Yang5db21732015-05-21 14:28:59 -070012800void UninterpretedOption_NamePart::set_has_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012801 _has_bits_[0] |= 0x00000001u;
12802}
Bo Yang5db21732015-05-21 14:28:59 -070012803void UninterpretedOption_NamePart::clear_has_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012804 _has_bits_[0] &= ~0x00000001u;
12805}
Bo Yang5db21732015-05-21 14:28:59 -070012806void UninterpretedOption_NamePart::clear_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012807 name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12808 clear_has_name_part();
12809}
12810 const ::std::string& UninterpretedOption_NamePart::name_part() const {
12811 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part)
12812 return name_part_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12813}
12814 void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) {
12815 set_has_name_part();
12816 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12817 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part)
12818}
12819 void UninterpretedOption_NamePart::set_name_part(const char* value) {
12820 set_has_name_part();
12821 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12822 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.NamePart.name_part)
12823}
12824 void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) {
12825 set_has_name_part();
12826 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
12827 ::std::string(reinterpret_cast<const char*>(value), size));
12828 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part)
12829}
12830 ::std::string* UninterpretedOption_NamePart::mutable_name_part() {
12831 set_has_name_part();
12832 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part)
12833 return name_part_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12834}
12835 ::std::string* UninterpretedOption_NamePart::release_name_part() {
12836 clear_has_name_part();
12837 return name_part_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12838}
12839 void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) {
12840 if (name_part != NULL) {
12841 set_has_name_part();
12842 } else {
12843 clear_has_name_part();
12844 }
12845 name_part_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_part);
12846 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part)
12847}
12848
12849// required bool is_extension = 2;
Bo Yang5db21732015-05-21 14:28:59 -070012850bool UninterpretedOption_NamePart::has_is_extension() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012851 return (_has_bits_[0] & 0x00000002u) != 0;
12852}
Bo Yang5db21732015-05-21 14:28:59 -070012853void UninterpretedOption_NamePart::set_has_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012854 _has_bits_[0] |= 0x00000002u;
12855}
Bo Yang5db21732015-05-21 14:28:59 -070012856void UninterpretedOption_NamePart::clear_has_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012857 _has_bits_[0] &= ~0x00000002u;
12858}
Bo Yang5db21732015-05-21 14:28:59 -070012859void UninterpretedOption_NamePart::clear_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012860 is_extension_ = false;
12861 clear_has_is_extension();
12862}
12863 bool UninterpretedOption_NamePart::is_extension() const {
12864 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.is_extension)
12865 return is_extension_;
12866}
12867 void UninterpretedOption_NamePart::set_is_extension(bool value) {
12868 set_has_is_extension();
12869 is_extension_ = value;
12870 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.is_extension)
12871}
12872
12873// -------------------------------------------------------------------
12874
12875// UninterpretedOption
12876
12877// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Bo Yang5db21732015-05-21 14:28:59 -070012878int UninterpretedOption::name_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012879 return name_.size();
12880}
Bo Yang5db21732015-05-21 14:28:59 -070012881void UninterpretedOption::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -080012882 name_.Clear();
12883}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012884const ::google::protobuf::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080012885 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.name)
12886 return name_.Get(index);
12887}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012888::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080012889 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.name)
12890 return name_.Mutable(index);
12891}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012892::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::add_name() {
Jisi Liu885b6122015-02-28 14:51:22 -080012893 // @@protoc_insertion_point(field_add:google.protobuf.UninterpretedOption.name)
12894 return name_.Add();
12895}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012896::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >*
Jisi Liu885b6122015-02-28 14:51:22 -080012897UninterpretedOption::mutable_name() {
12898 // @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name)
12899 return &name_;
12900}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012901const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >&
12902UninterpretedOption::name() const {
12903 // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name)
12904 return name_;
12905}
Jisi Liu885b6122015-02-28 14:51:22 -080012906
12907// optional string identifier_value = 3;
Bo Yang5db21732015-05-21 14:28:59 -070012908bool UninterpretedOption::has_identifier_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012909 return (_has_bits_[0] & 0x00000002u) != 0;
12910}
Bo Yang5db21732015-05-21 14:28:59 -070012911void UninterpretedOption::set_has_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012912 _has_bits_[0] |= 0x00000002u;
12913}
Bo Yang5db21732015-05-21 14:28:59 -070012914void UninterpretedOption::clear_has_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012915 _has_bits_[0] &= ~0x00000002u;
12916}
Bo Yang5db21732015-05-21 14:28:59 -070012917void UninterpretedOption::clear_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012918 identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12919 clear_has_identifier_value();
12920}
12921 const ::std::string& UninterpretedOption::identifier_value() const {
12922 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value)
12923 return identifier_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12924}
12925 void UninterpretedOption::set_identifier_value(const ::std::string& value) {
12926 set_has_identifier_value();
12927 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12928 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value)
12929}
12930 void UninterpretedOption::set_identifier_value(const char* value) {
12931 set_has_identifier_value();
12932 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12933 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value)
12934}
12935 void UninterpretedOption::set_identifier_value(const char* value, size_t size) {
12936 set_has_identifier_value();
12937 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
12938 ::std::string(reinterpret_cast<const char*>(value), size));
12939 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value)
12940}
12941 ::std::string* UninterpretedOption::mutable_identifier_value() {
12942 set_has_identifier_value();
12943 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value)
12944 return identifier_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12945}
12946 ::std::string* UninterpretedOption::release_identifier_value() {
12947 clear_has_identifier_value();
12948 return identifier_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12949}
12950 void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) {
12951 if (identifier_value != NULL) {
12952 set_has_identifier_value();
12953 } else {
12954 clear_has_identifier_value();
12955 }
12956 identifier_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), identifier_value);
12957 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value)
12958}
12959
12960// optional uint64 positive_int_value = 4;
Bo Yang5db21732015-05-21 14:28:59 -070012961bool UninterpretedOption::has_positive_int_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012962 return (_has_bits_[0] & 0x00000004u) != 0;
12963}
Bo Yang5db21732015-05-21 14:28:59 -070012964void UninterpretedOption::set_has_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012965 _has_bits_[0] |= 0x00000004u;
12966}
Bo Yang5db21732015-05-21 14:28:59 -070012967void UninterpretedOption::clear_has_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012968 _has_bits_[0] &= ~0x00000004u;
12969}
Bo Yang5db21732015-05-21 14:28:59 -070012970void UninterpretedOption::clear_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012971 positive_int_value_ = GOOGLE_ULONGLONG(0);
12972 clear_has_positive_int_value();
12973}
12974 ::google::protobuf::uint64 UninterpretedOption::positive_int_value() const {
12975 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value)
12976 return positive_int_value_;
12977}
12978 void UninterpretedOption::set_positive_int_value(::google::protobuf::uint64 value) {
12979 set_has_positive_int_value();
12980 positive_int_value_ = value;
12981 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value)
12982}
12983
12984// optional int64 negative_int_value = 5;
Bo Yang5db21732015-05-21 14:28:59 -070012985bool UninterpretedOption::has_negative_int_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012986 return (_has_bits_[0] & 0x00000008u) != 0;
12987}
Bo Yang5db21732015-05-21 14:28:59 -070012988void UninterpretedOption::set_has_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012989 _has_bits_[0] |= 0x00000008u;
12990}
Bo Yang5db21732015-05-21 14:28:59 -070012991void UninterpretedOption::clear_has_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012992 _has_bits_[0] &= ~0x00000008u;
12993}
Bo Yang5db21732015-05-21 14:28:59 -070012994void UninterpretedOption::clear_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012995 negative_int_value_ = GOOGLE_LONGLONG(0);
12996 clear_has_negative_int_value();
12997}
12998 ::google::protobuf::int64 UninterpretedOption::negative_int_value() const {
12999 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value)
13000 return negative_int_value_;
13001}
13002 void UninterpretedOption::set_negative_int_value(::google::protobuf::int64 value) {
13003 set_has_negative_int_value();
13004 negative_int_value_ = value;
13005 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value)
13006}
13007
13008// optional double double_value = 6;
Bo Yang5db21732015-05-21 14:28:59 -070013009bool UninterpretedOption::has_double_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013010 return (_has_bits_[0] & 0x00000010u) != 0;
13011}
Bo Yang5db21732015-05-21 14:28:59 -070013012void UninterpretedOption::set_has_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013013 _has_bits_[0] |= 0x00000010u;
13014}
Bo Yang5db21732015-05-21 14:28:59 -070013015void UninterpretedOption::clear_has_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013016 _has_bits_[0] &= ~0x00000010u;
13017}
Bo Yang5db21732015-05-21 14:28:59 -070013018void UninterpretedOption::clear_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013019 double_value_ = 0;
13020 clear_has_double_value();
13021}
13022 double UninterpretedOption::double_value() const {
13023 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.double_value)
13024 return double_value_;
13025}
13026 void UninterpretedOption::set_double_value(double value) {
13027 set_has_double_value();
13028 double_value_ = value;
13029 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.double_value)
13030}
13031
13032// optional bytes string_value = 7;
Bo Yang5db21732015-05-21 14:28:59 -070013033bool UninterpretedOption::has_string_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013034 return (_has_bits_[0] & 0x00000020u) != 0;
13035}
Bo Yang5db21732015-05-21 14:28:59 -070013036void UninterpretedOption::set_has_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013037 _has_bits_[0] |= 0x00000020u;
13038}
Bo Yang5db21732015-05-21 14:28:59 -070013039void UninterpretedOption::clear_has_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013040 _has_bits_[0] &= ~0x00000020u;
13041}
Bo Yang5db21732015-05-21 14:28:59 -070013042void UninterpretedOption::clear_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013043 string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13044 clear_has_string_value();
13045}
13046 const ::std::string& UninterpretedOption::string_value() const {
13047 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value)
13048 return string_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13049}
13050 void UninterpretedOption::set_string_value(const ::std::string& value) {
13051 set_has_string_value();
13052 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13053 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value)
13054}
13055 void UninterpretedOption::set_string_value(const char* value) {
13056 set_has_string_value();
13057 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13058 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value)
13059}
13060 void UninterpretedOption::set_string_value(const void* value, size_t size) {
13061 set_has_string_value();
13062 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13063 ::std::string(reinterpret_cast<const char*>(value), size));
13064 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value)
13065}
13066 ::std::string* UninterpretedOption::mutable_string_value() {
13067 set_has_string_value();
13068 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value)
13069 return string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13070}
13071 ::std::string* UninterpretedOption::release_string_value() {
13072 clear_has_string_value();
13073 return string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13074}
13075 void UninterpretedOption::set_allocated_string_value(::std::string* string_value) {
13076 if (string_value != NULL) {
13077 set_has_string_value();
13078 } else {
13079 clear_has_string_value();
13080 }
13081 string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value);
13082 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value)
13083}
13084
13085// optional string aggregate_value = 8;
Bo Yang5db21732015-05-21 14:28:59 -070013086bool UninterpretedOption::has_aggregate_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013087 return (_has_bits_[0] & 0x00000040u) != 0;
13088}
Bo Yang5db21732015-05-21 14:28:59 -070013089void UninterpretedOption::set_has_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013090 _has_bits_[0] |= 0x00000040u;
13091}
Bo Yang5db21732015-05-21 14:28:59 -070013092void UninterpretedOption::clear_has_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013093 _has_bits_[0] &= ~0x00000040u;
13094}
Bo Yang5db21732015-05-21 14:28:59 -070013095void UninterpretedOption::clear_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013096 aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13097 clear_has_aggregate_value();
13098}
13099 const ::std::string& UninterpretedOption::aggregate_value() const {
13100 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value)
13101 return aggregate_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13102}
13103 void UninterpretedOption::set_aggregate_value(const ::std::string& value) {
13104 set_has_aggregate_value();
13105 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13106 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value)
13107}
13108 void UninterpretedOption::set_aggregate_value(const char* value) {
13109 set_has_aggregate_value();
13110 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13111 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value)
13112}
13113 void UninterpretedOption::set_aggregate_value(const char* value, size_t size) {
13114 set_has_aggregate_value();
13115 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13116 ::std::string(reinterpret_cast<const char*>(value), size));
13117 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value)
13118}
13119 ::std::string* UninterpretedOption::mutable_aggregate_value() {
13120 set_has_aggregate_value();
13121 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value)
13122 return aggregate_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13123}
13124 ::std::string* UninterpretedOption::release_aggregate_value() {
13125 clear_has_aggregate_value();
13126 return aggregate_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13127}
13128 void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) {
13129 if (aggregate_value != NULL) {
13130 set_has_aggregate_value();
13131 } else {
13132 clear_has_aggregate_value();
13133 }
13134 aggregate_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), aggregate_value);
13135 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value)
13136}
13137
13138#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
kenton@google.com24bf56f2008-09-24 20:31:01 +000013139
liujisi@google.com33165fe2010-11-02 13:14:58 +000013140// ===================================================================
13141
Bruce Dawson86ba70e2015-10-29 12:41:29 -070013142#if !defined(_MSC_VER) || _MSC_VER >= 1900
liujisi@google.com33165fe2010-11-02 13:14:58 +000013143const int SourceCodeInfo_Location::kPathFieldNumber;
13144const int SourceCodeInfo_Location::kSpanFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013145const int SourceCodeInfo_Location::kLeadingCommentsFieldNumber;
13146const int SourceCodeInfo_Location::kTrailingCommentsFieldNumber;
Jisi Liu885b6122015-02-28 14:51:22 -080013147const int SourceCodeInfo_Location::kLeadingDetachedCommentsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070013148#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
liujisi@google.com33165fe2010-11-02 13:14:58 +000013149
13150SourceCodeInfo_Location::SourceCodeInfo_Location()
Bo Yang5db21732015-05-21 14:28:59 -070013151 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013152 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000013153 // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013154}
13155
13156void SourceCodeInfo_Location::InitAsDefaultInstance() {
13157}
13158
13159SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080013160 : ::google::protobuf::Message(),
13161 _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013162 SharedCtor();
13163 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000013164 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013165}
13166
13167void SourceCodeInfo_Location::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013168 ::google::protobuf::internal::GetEmptyString();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013169 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080013170 leading_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13171 trailing_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000013172 ::memset(_has_bits_, 0, sizeof(_has_bits_));
13173}
13174
13175SourceCodeInfo_Location::~SourceCodeInfo_Location() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013176 // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013177 SharedDtor();
13178}
13179
13180void SourceCodeInfo_Location::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080013181 leading_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13182 trailing_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000013183 if (this != default_instance_) {
13184 }
13185}
13186
13187void SourceCodeInfo_Location::SetCachedSize(int size) const {
13188 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13189 _cached_size_ = size;
13190 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13191}
13192const ::google::protobuf::Descriptor* SourceCodeInfo_Location::descriptor() {
13193 protobuf_AssignDescriptorsOnce();
13194 return SourceCodeInfo_Location_descriptor_;
13195}
13196
13197const SourceCodeInfo_Location& SourceCodeInfo_Location::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000013198 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
13199 return *default_instance_;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013200}
13201
13202SourceCodeInfo_Location* SourceCodeInfo_Location::default_instance_ = NULL;
13203
Feng Xiao6ef984a2014-11-10 17:34:54 -080013204SourceCodeInfo_Location* SourceCodeInfo_Location::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080013205 SourceCodeInfo_Location* n = new SourceCodeInfo_Location;
13206 if (arena != NULL) {
13207 arena->Own(n);
13208 }
13209 return n;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013210}
13211
13212void SourceCodeInfo_Location::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -070013213 if (_has_bits_[0 / 32] & 12u) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013214 if (has_leading_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013215 leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013216 }
13217 if (has_trailing_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013218 trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013219 }
13220 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013221 path_.Clear();
13222 span_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -080013223 leading_detached_comments_.Clear();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013224 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080013225 if (_internal_metadata_.have_unknown_fields()) {
13226 mutable_unknown_fields()->Clear();
13227 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013228}
13229
13230bool SourceCodeInfo_Location::MergePartialFromCodedStream(
13231 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013232#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
liujisi@google.com33165fe2010-11-02 13:14:58 +000013233 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013234 // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo.Location)
13235 for (;;) {
13236 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
13237 tag = p.first;
13238 if (!p.second) goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013239 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
13240 // repeated int32 path = 1 [packed = true];
13241 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013242 if (tag == 10) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013243 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
13244 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13245 input, this->mutable_path())));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013246 } else if (tag == 8) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013247 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
13248 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13249 1, 10, input, this->mutable_path())));
13250 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013251 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013252 }
13253 if (input->ExpectTag(18)) goto parse_span;
13254 break;
13255 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013256
liujisi@google.com33165fe2010-11-02 13:14:58 +000013257 // repeated int32 span = 2 [packed = true];
13258 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013259 if (tag == 18) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013260 parse_span:
13261 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
13262 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13263 input, this->mutable_span())));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013264 } else if (tag == 16) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013265 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
13266 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13267 1, 18, input, this->mutable_span())));
13268 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013269 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013270 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013271 if (input->ExpectTag(26)) goto parse_leading_comments;
13272 break;
13273 }
13274
13275 // optional string leading_comments = 3;
13276 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013277 if (tag == 26) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013278 parse_leading_comments:
13279 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13280 input, this->mutable_leading_comments()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013281 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013282 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013283 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013284 "google.protobuf.SourceCodeInfo.Location.leading_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013285 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013286 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013287 }
13288 if (input->ExpectTag(34)) goto parse_trailing_comments;
13289 break;
13290 }
13291
13292 // optional string trailing_comments = 4;
13293 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013294 if (tag == 34) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013295 parse_trailing_comments:
13296 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13297 input, this->mutable_trailing_comments()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013298 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013299 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013300 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013301 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013302 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013303 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013304 }
Jisi Liu885b6122015-02-28 14:51:22 -080013305 if (input->ExpectTag(50)) goto parse_leading_detached_comments;
13306 break;
13307 }
13308
13309 // repeated string leading_detached_comments = 6;
13310 case 6: {
13311 if (tag == 50) {
13312 parse_leading_detached_comments:
13313 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13314 input, this->add_leading_detached_comments()));
13315 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13316 this->leading_detached_comments(this->leading_detached_comments_size() - 1).data(),
13317 this->leading_detached_comments(this->leading_detached_comments_size() - 1).length(),
13318 ::google::protobuf::internal::WireFormat::PARSE,
13319 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
13320 } else {
13321 goto handle_unusual;
13322 }
13323 if (input->ExpectTag(50)) goto parse_leading_detached_comments;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013324 if (input->ExpectAtEnd()) goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013325 break;
13326 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013327
liujisi@google.com33165fe2010-11-02 13:14:58 +000013328 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013329 handle_unusual:
13330 if (tag == 0 ||
13331 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
liujisi@google.com33165fe2010-11-02 13:14:58 +000013332 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013333 goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013334 }
13335 DO_(::google::protobuf::internal::WireFormat::SkipField(
13336 input, tag, mutable_unknown_fields()));
13337 break;
13338 }
13339 }
13340 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013341success:
13342 // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013343 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013344failure:
13345 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo.Location)
13346 return false;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013347#undef DO_
13348}
13349
13350void SourceCodeInfo_Location::SerializeWithCachedSizes(
13351 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013352 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013353 // repeated int32 path = 1 [packed = true];
13354 if (this->path_size() > 0) {
13355 ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
13356 output->WriteVarint32(_path_cached_byte_size_);
13357 }
13358 for (int i = 0; i < this->path_size(); i++) {
13359 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
13360 this->path(i), output);
13361 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013362
liujisi@google.com33165fe2010-11-02 13:14:58 +000013363 // repeated int32 span = 2 [packed = true];
13364 if (this->span_size() > 0) {
13365 ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
13366 output->WriteVarint32(_span_cached_byte_size_);
13367 }
13368 for (int i = 0; i < this->span_size(); i++) {
13369 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
13370 this->span(i), output);
13371 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013372
13373 // optional string leading_comments = 3;
13374 if (has_leading_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013375 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013376 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013377 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013378 "google.protobuf.SourceCodeInfo.Location.leading_comments");
jieluo@google.com4de8f552014-07-18 00:47:59 +000013379 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013380 3, this->leading_comments(), output);
13381 }
13382
13383 // optional string trailing_comments = 4;
13384 if (has_trailing_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013385 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013386 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013387 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013388 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
jieluo@google.com4de8f552014-07-18 00:47:59 +000013389 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013390 4, this->trailing_comments(), output);
13391 }
13392
Jisi Liu885b6122015-02-28 14:51:22 -080013393 // repeated string leading_detached_comments = 6;
13394 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
Jisi Liu4c663d82015-08-25 17:03:05 -070013395 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13396 this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(),
13397 ::google::protobuf::internal::WireFormat::SERIALIZE,
13398 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
Jisi Liu885b6122015-02-28 14:51:22 -080013399 ::google::protobuf::internal::WireFormatLite::WriteString(
13400 6, this->leading_detached_comments(i), output);
13401 }
13402
Feng Xiao6ef984a2014-11-10 17:34:54 -080013403 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013404 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
13405 unknown_fields(), output);
13406 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013407 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013408}
13409
13410::google::protobuf::uint8* SourceCodeInfo_Location::SerializeWithCachedSizesToArray(
13411 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013412 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013413 // repeated int32 path = 1 [packed = true];
13414 if (this->path_size() > 0) {
13415 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
13416 1,
13417 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
13418 target);
13419 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
13420 _path_cached_byte_size_, target);
13421 }
13422 for (int i = 0; i < this->path_size(); i++) {
13423 target = ::google::protobuf::internal::WireFormatLite::
13424 WriteInt32NoTagToArray(this->path(i), target);
13425 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013426
liujisi@google.com33165fe2010-11-02 13:14:58 +000013427 // repeated int32 span = 2 [packed = true];
13428 if (this->span_size() > 0) {
13429 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
13430 2,
13431 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
13432 target);
13433 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
13434 _span_cached_byte_size_, target);
13435 }
13436 for (int i = 0; i < this->span_size(); i++) {
13437 target = ::google::protobuf::internal::WireFormatLite::
13438 WriteInt32NoTagToArray(this->span(i), target);
13439 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013440
13441 // optional string leading_comments = 3;
13442 if (has_leading_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013443 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013444 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013445 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013446 "google.protobuf.SourceCodeInfo.Location.leading_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013447 target =
13448 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
13449 3, this->leading_comments(), target);
13450 }
13451
13452 // optional string trailing_comments = 4;
13453 if (has_trailing_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013454 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013455 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013456 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013457 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013458 target =
13459 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
13460 4, this->trailing_comments(), target);
13461 }
13462
Jisi Liu885b6122015-02-28 14:51:22 -080013463 // repeated string leading_detached_comments = 6;
13464 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
13465 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13466 this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(),
13467 ::google::protobuf::internal::WireFormat::SERIALIZE,
13468 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
13469 target = ::google::protobuf::internal::WireFormatLite::
13470 WriteStringToArray(6, this->leading_detached_comments(i), target);
13471 }
13472
Feng Xiao6ef984a2014-11-10 17:34:54 -080013473 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013474 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
13475 unknown_fields(), target);
13476 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013477 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013478 return target;
13479}
13480
13481int SourceCodeInfo_Location::ByteSize() const {
13482 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013483
Austin Schuh307af622015-06-05 22:46:01 -070013484 if (_has_bits_[2 / 32] & 12u) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013485 // optional string leading_comments = 3;
13486 if (has_leading_comments()) {
13487 total_size += 1 +
13488 ::google::protobuf::internal::WireFormatLite::StringSize(
13489 this->leading_comments());
13490 }
13491
13492 // optional string trailing_comments = 4;
13493 if (has_trailing_comments()) {
13494 total_size += 1 +
13495 ::google::protobuf::internal::WireFormatLite::StringSize(
13496 this->trailing_comments());
13497 }
13498
13499 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013500 // repeated int32 path = 1 [packed = true];
13501 {
13502 int data_size = 0;
13503 for (int i = 0; i < this->path_size(); i++) {
13504 data_size += ::google::protobuf::internal::WireFormatLite::
13505 Int32Size(this->path(i));
13506 }
13507 if (data_size > 0) {
13508 total_size += 1 +
13509 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
13510 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013511 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013512 _path_cached_byte_size_ = data_size;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013513 GOOGLE_SAFE_CONCURRENT_WRITES_END();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013514 total_size += data_size;
13515 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013516
liujisi@google.com33165fe2010-11-02 13:14:58 +000013517 // repeated int32 span = 2 [packed = true];
13518 {
13519 int data_size = 0;
13520 for (int i = 0; i < this->span_size(); i++) {
13521 data_size += ::google::protobuf::internal::WireFormatLite::
13522 Int32Size(this->span(i));
13523 }
13524 if (data_size > 0) {
13525 total_size += 1 +
13526 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
13527 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013528 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013529 _span_cached_byte_size_ = data_size;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013530 GOOGLE_SAFE_CONCURRENT_WRITES_END();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013531 total_size += data_size;
13532 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013533
Jisi Liu885b6122015-02-28 14:51:22 -080013534 // repeated string leading_detached_comments = 6;
13535 total_size += 1 * this->leading_detached_comments_size();
13536 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
13537 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
13538 this->leading_detached_comments(i));
13539 }
13540
Feng Xiao6ef984a2014-11-10 17:34:54 -080013541 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013542 total_size +=
13543 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
13544 unknown_fields());
13545 }
13546 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13547 _cached_size_ = total_size;
13548 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13549 return total_size;
13550}
13551
13552void SourceCodeInfo_Location::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013553 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070013554 const SourceCodeInfo_Location* source =
13555 ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo_Location>(
13556 &from);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013557 if (source == NULL) {
13558 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
13559 } else {
13560 MergeFrom(*source);
13561 }
13562}
13563
13564void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013565 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013566 path_.MergeFrom(from.path_);
13567 span_.MergeFrom(from.span_);
Jisi Liu885b6122015-02-28 14:51:22 -080013568 leading_detached_comments_.MergeFrom(from.leading_detached_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013569 if (from._has_bits_[2 / 32] & (0xffu << (2 % 32))) {
13570 if (from.has_leading_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013571 set_has_leading_comments();
13572 leading_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.leading_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013573 }
13574 if (from.has_trailing_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013575 set_has_trailing_comments();
13576 trailing_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.trailing_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013577 }
13578 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080013579 if (from._internal_metadata_.have_unknown_fields()) {
13580 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
13581 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013582}
13583
13584void SourceCodeInfo_Location::CopyFrom(const ::google::protobuf::Message& from) {
13585 if (&from == this) return;
13586 Clear();
13587 MergeFrom(from);
13588}
13589
13590void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) {
13591 if (&from == this) return;
13592 Clear();
13593 MergeFrom(from);
13594}
13595
13596bool SourceCodeInfo_Location::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013597
liujisi@google.com33165fe2010-11-02 13:14:58 +000013598 return true;
13599}
13600
13601void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080013602 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080013603 InternalSwap(other);
13604}
13605void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) {
13606 path_.UnsafeArenaSwap(&other->path_);
13607 span_.UnsafeArenaSwap(&other->span_);
13608 leading_comments_.Swap(&other->leading_comments_);
13609 trailing_comments_.Swap(&other->trailing_comments_);
Jisi Liu885b6122015-02-28 14:51:22 -080013610 leading_detached_comments_.UnsafeArenaSwap(&other->leading_detached_comments_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080013611 std::swap(_has_bits_[0], other->_has_bits_[0]);
13612 _internal_metadata_.Swap(&other->_internal_metadata_);
13613 std::swap(_cached_size_, other->_cached_size_);
13614}
liujisi@google.com33165fe2010-11-02 13:14:58 +000013615
13616::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const {
13617 protobuf_AssignDescriptorsOnce();
13618 ::google::protobuf::Metadata metadata;
13619 metadata.descriptor = SourceCodeInfo_Location_descriptor_;
13620 metadata.reflection = SourceCodeInfo_Location_reflection_;
13621 return metadata;
13622}
13623
13624
13625// -------------------------------------------------------------------
13626
Bruce Dawson86ba70e2015-10-29 12:41:29 -070013627#if !defined(_MSC_VER) || _MSC_VER >= 1900
liujisi@google.com33165fe2010-11-02 13:14:58 +000013628const int SourceCodeInfo::kLocationFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070013629#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
liujisi@google.com33165fe2010-11-02 13:14:58 +000013630
13631SourceCodeInfo::SourceCodeInfo()
Bo Yang5db21732015-05-21 14:28:59 -070013632 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013633 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000013634 // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013635}
13636
13637void SourceCodeInfo::InitAsDefaultInstance() {
13638}
13639
13640SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080013641 : ::google::protobuf::Message(),
13642 _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013643 SharedCtor();
13644 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000013645 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013646}
13647
13648void SourceCodeInfo::SharedCtor() {
13649 _cached_size_ = 0;
13650 ::memset(_has_bits_, 0, sizeof(_has_bits_));
13651}
13652
13653SourceCodeInfo::~SourceCodeInfo() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013654 // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013655 SharedDtor();
13656}
13657
13658void SourceCodeInfo::SharedDtor() {
13659 if (this != default_instance_) {
13660 }
13661}
13662
13663void SourceCodeInfo::SetCachedSize(int size) const {
13664 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13665 _cached_size_ = size;
13666 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13667}
13668const ::google::protobuf::Descriptor* SourceCodeInfo::descriptor() {
13669 protobuf_AssignDescriptorsOnce();
13670 return SourceCodeInfo_descriptor_;
13671}
13672
13673const SourceCodeInfo& SourceCodeInfo::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000013674 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
13675 return *default_instance_;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013676}
13677
13678SourceCodeInfo* SourceCodeInfo::default_instance_ = NULL;
13679
Feng Xiao6ef984a2014-11-10 17:34:54 -080013680SourceCodeInfo* SourceCodeInfo::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080013681 SourceCodeInfo* n = new SourceCodeInfo;
13682 if (arena != NULL) {
13683 arena->Own(n);
13684 }
13685 return n;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013686}
13687
13688void SourceCodeInfo::Clear() {
13689 location_.Clear();
13690 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080013691 if (_internal_metadata_.have_unknown_fields()) {
13692 mutable_unknown_fields()->Clear();
13693 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013694}
13695
13696bool SourceCodeInfo::MergePartialFromCodedStream(
13697 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013698#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
liujisi@google.com33165fe2010-11-02 13:14:58 +000013699 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013700 // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo)
13701 for (;;) {
13702 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
13703 tag = p.first;
13704 if (!p.second) goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013705 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
13706 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
13707 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013708 if (tag == 10) {
Bo Yang5db21732015-05-21 14:28:59 -070013709 DO_(input->IncrementRecursionDepth());
13710 parse_loop_location:
13711 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
liujisi@google.com33165fe2010-11-02 13:14:58 +000013712 input, add_location()));
13713 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013714 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013715 }
Bo Yang5db21732015-05-21 14:28:59 -070013716 if (input->ExpectTag(10)) goto parse_loop_location;
13717 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000013718 if (input->ExpectAtEnd()) goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013719 break;
13720 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013721
liujisi@google.com33165fe2010-11-02 13:14:58 +000013722 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013723 handle_unusual:
13724 if (tag == 0 ||
13725 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
liujisi@google.com33165fe2010-11-02 13:14:58 +000013726 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013727 goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013728 }
13729 DO_(::google::protobuf::internal::WireFormat::SkipField(
13730 input, tag, mutable_unknown_fields()));
13731 break;
13732 }
13733 }
13734 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013735success:
13736 // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013737 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013738failure:
13739 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo)
13740 return false;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013741#undef DO_
13742}
13743
13744void SourceCodeInfo::SerializeWithCachedSizes(
13745 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013746 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013747 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Feng Xiaof157a562014-11-14 11:50:31 -080013748 for (unsigned int i = 0, n = this->location_size(); i < n; i++) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013749 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
13750 1, this->location(i), output);
13751 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013752
Feng Xiao6ef984a2014-11-10 17:34:54 -080013753 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013754 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
13755 unknown_fields(), output);
13756 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013757 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013758}
13759
13760::google::protobuf::uint8* SourceCodeInfo::SerializeWithCachedSizesToArray(
13761 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013762 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013763 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Feng Xiaof157a562014-11-14 11:50:31 -080013764 for (unsigned int i = 0, n = this->location_size(); i < n; i++) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013765 target = ::google::protobuf::internal::WireFormatLite::
13766 WriteMessageNoVirtualToArray(
13767 1, this->location(i), target);
13768 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013769
Feng Xiao6ef984a2014-11-10 17:34:54 -080013770 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013771 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
13772 unknown_fields(), target);
13773 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013774 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013775 return target;
13776}
13777
13778int SourceCodeInfo::ByteSize() const {
13779 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013780
liujisi@google.com33165fe2010-11-02 13:14:58 +000013781 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
13782 total_size += 1 * this->location_size();
13783 for (int i = 0; i < this->location_size(); i++) {
13784 total_size +=
13785 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
13786 this->location(i));
13787 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013788
Feng Xiao6ef984a2014-11-10 17:34:54 -080013789 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013790 total_size +=
13791 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
13792 unknown_fields());
13793 }
13794 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13795 _cached_size_ = total_size;
13796 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13797 return total_size;
13798}
13799
13800void SourceCodeInfo::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013801 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070013802 const SourceCodeInfo* source =
13803 ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo>(
13804 &from);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013805 if (source == NULL) {
13806 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
13807 } else {
13808 MergeFrom(*source);
13809 }
13810}
13811
13812void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013813 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013814 location_.MergeFrom(from.location_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080013815 if (from._internal_metadata_.have_unknown_fields()) {
13816 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
13817 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013818}
13819
13820void SourceCodeInfo::CopyFrom(const ::google::protobuf::Message& from) {
13821 if (&from == this) return;
13822 Clear();
13823 MergeFrom(from);
13824}
13825
13826void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) {
13827 if (&from == this) return;
13828 Clear();
13829 MergeFrom(from);
13830}
13831
13832bool SourceCodeInfo::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013833
liujisi@google.com33165fe2010-11-02 13:14:58 +000013834 return true;
13835}
13836
13837void SourceCodeInfo::Swap(SourceCodeInfo* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080013838 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080013839 InternalSwap(other);
13840}
13841void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) {
13842 location_.UnsafeArenaSwap(&other->location_);
13843 std::swap(_has_bits_[0], other->_has_bits_[0]);
13844 _internal_metadata_.Swap(&other->_internal_metadata_);
13845 std::swap(_cached_size_, other->_cached_size_);
13846}
liujisi@google.com33165fe2010-11-02 13:14:58 +000013847
13848::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const {
13849 protobuf_AssignDescriptorsOnce();
13850 ::google::protobuf::Metadata metadata;
13851 metadata.descriptor = SourceCodeInfo_descriptor_;
13852 metadata.reflection = SourceCodeInfo_reflection_;
13853 return metadata;
13854}
13855
Jisi Liu885b6122015-02-28 14:51:22 -080013856#if PROTOBUF_INLINE_NOT_IN_HEADERS
13857// SourceCodeInfo_Location
13858
13859// repeated int32 path = 1 [packed = true];
Bo Yang5db21732015-05-21 14:28:59 -070013860int SourceCodeInfo_Location::path_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013861 return path_.size();
13862}
Bo Yang5db21732015-05-21 14:28:59 -070013863void SourceCodeInfo_Location::clear_path() {
Jisi Liu885b6122015-02-28 14:51:22 -080013864 path_.Clear();
13865}
13866 ::google::protobuf::int32 SourceCodeInfo_Location::path(int index) const {
13867 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path)
13868 return path_.Get(index);
13869}
13870 void SourceCodeInfo_Location::set_path(int index, ::google::protobuf::int32 value) {
13871 path_.Set(index, value);
13872 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path)
13873}
13874 void SourceCodeInfo_Location::add_path(::google::protobuf::int32 value) {
13875 path_.Add(value);
13876 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path)
13877}
13878 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
13879SourceCodeInfo_Location::path() const {
13880 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path)
13881 return path_;
13882}
13883 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
13884SourceCodeInfo_Location::mutable_path() {
13885 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path)
13886 return &path_;
13887}
13888
13889// repeated int32 span = 2 [packed = true];
Bo Yang5db21732015-05-21 14:28:59 -070013890int SourceCodeInfo_Location::span_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013891 return span_.size();
13892}
Bo Yang5db21732015-05-21 14:28:59 -070013893void SourceCodeInfo_Location::clear_span() {
Jisi Liu885b6122015-02-28 14:51:22 -080013894 span_.Clear();
13895}
13896 ::google::protobuf::int32 SourceCodeInfo_Location::span(int index) const {
13897 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span)
13898 return span_.Get(index);
13899}
13900 void SourceCodeInfo_Location::set_span(int index, ::google::protobuf::int32 value) {
13901 span_.Set(index, value);
13902 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span)
13903}
13904 void SourceCodeInfo_Location::add_span(::google::protobuf::int32 value) {
13905 span_.Add(value);
13906 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span)
13907}
13908 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
13909SourceCodeInfo_Location::span() const {
13910 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span)
13911 return span_;
13912}
13913 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
13914SourceCodeInfo_Location::mutable_span() {
13915 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span)
13916 return &span_;
13917}
13918
13919// optional string leading_comments = 3;
Bo Yang5db21732015-05-21 14:28:59 -070013920bool SourceCodeInfo_Location::has_leading_comments() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013921 return (_has_bits_[0] & 0x00000004u) != 0;
13922}
Bo Yang5db21732015-05-21 14:28:59 -070013923void SourceCodeInfo_Location::set_has_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013924 _has_bits_[0] |= 0x00000004u;
13925}
Bo Yang5db21732015-05-21 14:28:59 -070013926void SourceCodeInfo_Location::clear_has_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013927 _has_bits_[0] &= ~0x00000004u;
13928}
Bo Yang5db21732015-05-21 14:28:59 -070013929void SourceCodeInfo_Location::clear_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013930 leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13931 clear_has_leading_comments();
13932}
13933 const ::std::string& SourceCodeInfo_Location::leading_comments() const {
13934 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments)
13935 return leading_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13936}
13937 void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) {
13938 set_has_leading_comments();
13939 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13940 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments)
13941}
13942 void SourceCodeInfo_Location::set_leading_comments(const char* value) {
13943 set_has_leading_comments();
13944 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13945 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_comments)
13946}
13947 void SourceCodeInfo_Location::set_leading_comments(const char* value, size_t size) {
13948 set_has_leading_comments();
13949 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13950 ::std::string(reinterpret_cast<const char*>(value), size));
13951 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments)
13952}
13953 ::std::string* SourceCodeInfo_Location::mutable_leading_comments() {
13954 set_has_leading_comments();
13955 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments)
13956 return leading_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13957}
13958 ::std::string* SourceCodeInfo_Location::release_leading_comments() {
13959 clear_has_leading_comments();
13960 return leading_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13961}
13962 void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) {
13963 if (leading_comments != NULL) {
13964 set_has_leading_comments();
13965 } else {
13966 clear_has_leading_comments();
13967 }
13968 leading_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), leading_comments);
13969 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments)
13970}
13971
13972// optional string trailing_comments = 4;
Bo Yang5db21732015-05-21 14:28:59 -070013973bool SourceCodeInfo_Location::has_trailing_comments() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013974 return (_has_bits_[0] & 0x00000008u) != 0;
13975}
Bo Yang5db21732015-05-21 14:28:59 -070013976void SourceCodeInfo_Location::set_has_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013977 _has_bits_[0] |= 0x00000008u;
13978}
Bo Yang5db21732015-05-21 14:28:59 -070013979void SourceCodeInfo_Location::clear_has_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013980 _has_bits_[0] &= ~0x00000008u;
13981}
Bo Yang5db21732015-05-21 14:28:59 -070013982void SourceCodeInfo_Location::clear_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013983 trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13984 clear_has_trailing_comments();
13985}
13986 const ::std::string& SourceCodeInfo_Location::trailing_comments() const {
13987 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13988 return trailing_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13989}
13990 void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) {
13991 set_has_trailing_comments();
13992 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13993 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13994}
13995 void SourceCodeInfo_Location::set_trailing_comments(const char* value) {
13996 set_has_trailing_comments();
13997 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13998 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13999}
14000 void SourceCodeInfo_Location::set_trailing_comments(const char* value, size_t size) {
14001 set_has_trailing_comments();
14002 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
14003 ::std::string(reinterpret_cast<const char*>(value), size));
14004 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments)
14005}
14006 ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() {
14007 set_has_trailing_comments();
14008 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments)
14009 return trailing_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14010}
14011 ::std::string* SourceCodeInfo_Location::release_trailing_comments() {
14012 clear_has_trailing_comments();
14013 return trailing_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14014}
14015 void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) {
14016 if (trailing_comments != NULL) {
14017 set_has_trailing_comments();
14018 } else {
14019 clear_has_trailing_comments();
14020 }
14021 trailing_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), trailing_comments);
14022 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments)
14023}
14024
14025// repeated string leading_detached_comments = 6;
Bo Yang5db21732015-05-21 14:28:59 -070014026int SourceCodeInfo_Location::leading_detached_comments_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080014027 return leading_detached_comments_.size();
14028}
Bo Yang5db21732015-05-21 14:28:59 -070014029void SourceCodeInfo_Location::clear_leading_detached_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080014030 leading_detached_comments_.Clear();
14031}
14032 const ::std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const {
14033 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14034 return leading_detached_comments_.Get(index);
14035}
14036 ::std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) {
14037 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14038 return leading_detached_comments_.Mutable(index);
14039}
14040 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const ::std::string& value) {
14041 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14042 leading_detached_comments_.Mutable(index)->assign(value);
14043}
14044 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) {
14045 leading_detached_comments_.Mutable(index)->assign(value);
14046 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14047}
14048 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, size_t size) {
14049 leading_detached_comments_.Mutable(index)->assign(
14050 reinterpret_cast<const char*>(value), size);
14051 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14052}
14053 ::std::string* SourceCodeInfo_Location::add_leading_detached_comments() {
14054 return leading_detached_comments_.Add();
14055}
14056 void SourceCodeInfo_Location::add_leading_detached_comments(const ::std::string& value) {
14057 leading_detached_comments_.Add()->assign(value);
14058 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14059}
14060 void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) {
14061 leading_detached_comments_.Add()->assign(value);
14062 // @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14063}
14064 void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, size_t size) {
14065 leading_detached_comments_.Add()->assign(reinterpret_cast<const char*>(value), size);
14066 // @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14067}
14068 const ::google::protobuf::RepeatedPtrField< ::std::string>&
14069SourceCodeInfo_Location::leading_detached_comments() const {
14070 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14071 return leading_detached_comments_;
14072}
14073 ::google::protobuf::RepeatedPtrField< ::std::string>*
14074SourceCodeInfo_Location::mutable_leading_detached_comments() {
14075 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14076 return &leading_detached_comments_;
14077}
14078
14079// -------------------------------------------------------------------
14080
14081// SourceCodeInfo
14082
14083// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Bo Yang5db21732015-05-21 14:28:59 -070014084int SourceCodeInfo::location_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080014085 return location_.size();
14086}
Bo Yang5db21732015-05-21 14:28:59 -070014087void SourceCodeInfo::clear_location() {
Jisi Liu885b6122015-02-28 14:51:22 -080014088 location_.Clear();
14089}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014090const ::google::protobuf::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080014091 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.location)
14092 return location_.Get(index);
14093}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014094::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080014095 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.location)
14096 return location_.Mutable(index);
14097}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014098::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::add_location() {
Jisi Liu885b6122015-02-28 14:51:22 -080014099 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.location)
14100 return location_.Add();
14101}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014102::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >*
Jisi Liu885b6122015-02-28 14:51:22 -080014103SourceCodeInfo::mutable_location() {
14104 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location)
14105 return &location_;
14106}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014107const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >&
14108SourceCodeInfo::location() const {
14109 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location)
14110 return location_;
14111}
Jisi Liu885b6122015-02-28 14:51:22 -080014112
14113#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
liujisi@google.com33165fe2010-11-02 13:14:58 +000014114
Jisi Liu5221dcb2016-01-29 13:51:05 -080014115// ===================================================================
14116
14117#if !defined(_MSC_VER) || _MSC_VER >= 1900
14118const int GeneratedCodeInfo_Annotation::kPathFieldNumber;
14119const int GeneratedCodeInfo_Annotation::kSourceFileFieldNumber;
14120const int GeneratedCodeInfo_Annotation::kBeginFieldNumber;
14121const int GeneratedCodeInfo_Annotation::kEndFieldNumber;
14122#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
14123
14124GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation()
14125 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
14126 SharedCtor();
14127 // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo.Annotation)
14128}
14129
14130void GeneratedCodeInfo_Annotation::InitAsDefaultInstance() {
14131}
14132
14133GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from)
14134 : ::google::protobuf::Message(),
14135 _internal_metadata_(NULL) {
14136 SharedCtor();
14137 MergeFrom(from);
14138 // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation)
14139}
14140
14141void GeneratedCodeInfo_Annotation::SharedCtor() {
14142 ::google::protobuf::internal::GetEmptyString();
14143 _cached_size_ = 0;
14144 source_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14145 begin_ = 0;
14146 end_ = 0;
14147 ::memset(_has_bits_, 0, sizeof(_has_bits_));
14148}
14149
14150GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() {
14151 // @@protoc_insertion_point(destructor:google.protobuf.GeneratedCodeInfo.Annotation)
14152 SharedDtor();
14153}
14154
14155void GeneratedCodeInfo_Annotation::SharedDtor() {
14156 source_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14157 if (this != default_instance_) {
14158 }
14159}
14160
14161void GeneratedCodeInfo_Annotation::SetCachedSize(int size) const {
14162 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14163 _cached_size_ = size;
14164 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14165}
14166const ::google::protobuf::Descriptor* GeneratedCodeInfo_Annotation::descriptor() {
14167 protobuf_AssignDescriptorsOnce();
14168 return GeneratedCodeInfo_Annotation_descriptor_;
14169}
14170
14171const GeneratedCodeInfo_Annotation& GeneratedCodeInfo_Annotation::default_instance() {
14172 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
14173 return *default_instance_;
14174}
14175
14176GeneratedCodeInfo_Annotation* GeneratedCodeInfo_Annotation::default_instance_ = NULL;
14177
14178GeneratedCodeInfo_Annotation* GeneratedCodeInfo_Annotation::New(::google::protobuf::Arena* arena) const {
14179 GeneratedCodeInfo_Annotation* n = new GeneratedCodeInfo_Annotation;
14180 if (arena != NULL) {
14181 arena->Own(n);
14182 }
14183 return n;
14184}
14185
14186void GeneratedCodeInfo_Annotation::Clear() {
14187#define ZR_HELPER_(f) reinterpret_cast<char*>(\
14188 &reinterpret_cast<GeneratedCodeInfo_Annotation*>(16)->f)
14189
14190#define ZR_(first, last) do {\
14191 ::memset(&first, 0,\
14192 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
14193} while (0)
14194
14195 if (_has_bits_[0 / 32] & 14u) {
14196 ZR_(begin_, end_);
14197 if (has_source_file()) {
14198 source_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14199 }
14200 }
14201
14202#undef ZR_HELPER_
14203#undef ZR_
14204
14205 path_.Clear();
14206 ::memset(_has_bits_, 0, sizeof(_has_bits_));
14207 if (_internal_metadata_.have_unknown_fields()) {
14208 mutable_unknown_fields()->Clear();
14209 }
14210}
14211
14212bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream(
14213 ::google::protobuf::io::CodedInputStream* input) {
14214#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
14215 ::google::protobuf::uint32 tag;
14216 // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo.Annotation)
14217 for (;;) {
14218 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
14219 tag = p.first;
14220 if (!p.second) goto handle_unusual;
14221 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
14222 // repeated int32 path = 1 [packed = true];
14223 case 1: {
14224 if (tag == 10) {
14225 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
14226 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
14227 input, this->mutable_path())));
14228 } else if (tag == 8) {
14229 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
14230 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
14231 1, 10, input, this->mutable_path())));
14232 } else {
14233 goto handle_unusual;
14234 }
14235 if (input->ExpectTag(18)) goto parse_source_file;
14236 break;
14237 }
14238
14239 // optional string source_file = 2;
14240 case 2: {
14241 if (tag == 18) {
14242 parse_source_file:
14243 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
14244 input, this->mutable_source_file()));
14245 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
14246 this->source_file().data(), this->source_file().length(),
14247 ::google::protobuf::internal::WireFormat::PARSE,
14248 "google.protobuf.GeneratedCodeInfo.Annotation.source_file");
14249 } else {
14250 goto handle_unusual;
14251 }
14252 if (input->ExpectTag(24)) goto parse_begin;
14253 break;
14254 }
14255
14256 // optional int32 begin = 3;
14257 case 3: {
14258 if (tag == 24) {
14259 parse_begin:
14260 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
14261 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
14262 input, &begin_)));
14263 set_has_begin();
14264 } else {
14265 goto handle_unusual;
14266 }
14267 if (input->ExpectTag(32)) goto parse_end;
14268 break;
14269 }
14270
14271 // optional int32 end = 4;
14272 case 4: {
14273 if (tag == 32) {
14274 parse_end:
14275 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
14276 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
14277 input, &end_)));
14278 set_has_end();
14279 } else {
14280 goto handle_unusual;
14281 }
14282 if (input->ExpectAtEnd()) goto success;
14283 break;
14284 }
14285
14286 default: {
14287 handle_unusual:
14288 if (tag == 0 ||
14289 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
14290 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
14291 goto success;
14292 }
14293 DO_(::google::protobuf::internal::WireFormat::SkipField(
14294 input, tag, mutable_unknown_fields()));
14295 break;
14296 }
14297 }
14298 }
14299success:
14300 // @@protoc_insertion_point(parse_success:google.protobuf.GeneratedCodeInfo.Annotation)
14301 return true;
14302failure:
14303 // @@protoc_insertion_point(parse_failure:google.protobuf.GeneratedCodeInfo.Annotation)
14304 return false;
14305#undef DO_
14306}
14307
14308void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes(
14309 ::google::protobuf::io::CodedOutputStream* output) const {
14310 // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo.Annotation)
14311 // repeated int32 path = 1 [packed = true];
14312 if (this->path_size() > 0) {
14313 ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
14314 output->WriteVarint32(_path_cached_byte_size_);
14315 }
14316 for (int i = 0; i < this->path_size(); i++) {
14317 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
14318 this->path(i), output);
14319 }
14320
14321 // optional string source_file = 2;
14322 if (has_source_file()) {
14323 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
14324 this->source_file().data(), this->source_file().length(),
14325 ::google::protobuf::internal::WireFormat::SERIALIZE,
14326 "google.protobuf.GeneratedCodeInfo.Annotation.source_file");
14327 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
14328 2, this->source_file(), output);
14329 }
14330
14331 // optional int32 begin = 3;
14332 if (has_begin()) {
14333 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->begin(), output);
14334 }
14335
14336 // optional int32 end = 4;
14337 if (has_end()) {
14338 ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->end(), output);
14339 }
14340
14341 if (_internal_metadata_.have_unknown_fields()) {
14342 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
14343 unknown_fields(), output);
14344 }
14345 // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo.Annotation)
14346}
14347
14348::google::protobuf::uint8* GeneratedCodeInfo_Annotation::SerializeWithCachedSizesToArray(
14349 ::google::protobuf::uint8* target) const {
14350 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation)
14351 // repeated int32 path = 1 [packed = true];
14352 if (this->path_size() > 0) {
14353 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
14354 1,
14355 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
14356 target);
14357 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
14358 _path_cached_byte_size_, target);
14359 }
14360 for (int i = 0; i < this->path_size(); i++) {
14361 target = ::google::protobuf::internal::WireFormatLite::
14362 WriteInt32NoTagToArray(this->path(i), target);
14363 }
14364
14365 // optional string source_file = 2;
14366 if (has_source_file()) {
14367 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
14368 this->source_file().data(), this->source_file().length(),
14369 ::google::protobuf::internal::WireFormat::SERIALIZE,
14370 "google.protobuf.GeneratedCodeInfo.Annotation.source_file");
14371 target =
14372 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
14373 2, this->source_file(), target);
14374 }
14375
14376 // optional int32 begin = 3;
14377 if (has_begin()) {
14378 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->begin(), target);
14379 }
14380
14381 // optional int32 end = 4;
14382 if (has_end()) {
14383 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->end(), target);
14384 }
14385
14386 if (_internal_metadata_.have_unknown_fields()) {
14387 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
14388 unknown_fields(), target);
14389 }
14390 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo.Annotation)
14391 return target;
14392}
14393
14394int GeneratedCodeInfo_Annotation::ByteSize() const {
14395 int total_size = 0;
14396
14397 if (_has_bits_[1 / 32] & 14u) {
14398 // optional string source_file = 2;
14399 if (has_source_file()) {
14400 total_size += 1 +
14401 ::google::protobuf::internal::WireFormatLite::StringSize(
14402 this->source_file());
14403 }
14404
14405 // optional int32 begin = 3;
14406 if (has_begin()) {
14407 total_size += 1 +
14408 ::google::protobuf::internal::WireFormatLite::Int32Size(
14409 this->begin());
14410 }
14411
14412 // optional int32 end = 4;
14413 if (has_end()) {
14414 total_size += 1 +
14415 ::google::protobuf::internal::WireFormatLite::Int32Size(
14416 this->end());
14417 }
14418
14419 }
14420 // repeated int32 path = 1 [packed = true];
14421 {
14422 int data_size = 0;
14423 for (int i = 0; i < this->path_size(); i++) {
14424 data_size += ::google::protobuf::internal::WireFormatLite::
14425 Int32Size(this->path(i));
14426 }
14427 if (data_size > 0) {
14428 total_size += 1 +
14429 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
14430 }
14431 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14432 _path_cached_byte_size_ = data_size;
14433 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14434 total_size += data_size;
14435 }
14436
14437 if (_internal_metadata_.have_unknown_fields()) {
14438 total_size +=
14439 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
14440 unknown_fields());
14441 }
14442 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14443 _cached_size_ = total_size;
14444 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14445 return total_size;
14446}
14447
14448void GeneratedCodeInfo_Annotation::MergeFrom(const ::google::protobuf::Message& from) {
14449 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
14450 const GeneratedCodeInfo_Annotation* source =
14451 ::google::protobuf::internal::DynamicCastToGenerated<const GeneratedCodeInfo_Annotation>(
14452 &from);
14453 if (source == NULL) {
14454 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
14455 } else {
14456 MergeFrom(*source);
14457 }
14458}
14459
14460void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& from) {
14461 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
14462 path_.MergeFrom(from.path_);
14463 if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
14464 if (from.has_source_file()) {
14465 set_has_source_file();
14466 source_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_file_);
14467 }
14468 if (from.has_begin()) {
14469 set_begin(from.begin());
14470 }
14471 if (from.has_end()) {
14472 set_end(from.end());
14473 }
14474 }
14475 if (from._internal_metadata_.have_unknown_fields()) {
14476 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
14477 }
14478}
14479
14480void GeneratedCodeInfo_Annotation::CopyFrom(const ::google::protobuf::Message& from) {
14481 if (&from == this) return;
14482 Clear();
14483 MergeFrom(from);
14484}
14485
14486void GeneratedCodeInfo_Annotation::CopyFrom(const GeneratedCodeInfo_Annotation& from) {
14487 if (&from == this) return;
14488 Clear();
14489 MergeFrom(from);
14490}
14491
14492bool GeneratedCodeInfo_Annotation::IsInitialized() const {
14493
14494 return true;
14495}
14496
14497void GeneratedCodeInfo_Annotation::Swap(GeneratedCodeInfo_Annotation* other) {
14498 if (other == this) return;
14499 InternalSwap(other);
14500}
14501void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* other) {
14502 path_.UnsafeArenaSwap(&other->path_);
14503 source_file_.Swap(&other->source_file_);
14504 std::swap(begin_, other->begin_);
14505 std::swap(end_, other->end_);
14506 std::swap(_has_bits_[0], other->_has_bits_[0]);
14507 _internal_metadata_.Swap(&other->_internal_metadata_);
14508 std::swap(_cached_size_, other->_cached_size_);
14509}
14510
14511::google::protobuf::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const {
14512 protobuf_AssignDescriptorsOnce();
14513 ::google::protobuf::Metadata metadata;
14514 metadata.descriptor = GeneratedCodeInfo_Annotation_descriptor_;
14515 metadata.reflection = GeneratedCodeInfo_Annotation_reflection_;
14516 return metadata;
14517}
14518
14519
14520// -------------------------------------------------------------------
14521
14522#if !defined(_MSC_VER) || _MSC_VER >= 1900
14523const int GeneratedCodeInfo::kAnnotationFieldNumber;
14524#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
14525
14526GeneratedCodeInfo::GeneratedCodeInfo()
14527 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
14528 SharedCtor();
14529 // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo)
14530}
14531
14532void GeneratedCodeInfo::InitAsDefaultInstance() {
14533}
14534
14535GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from)
14536 : ::google::protobuf::Message(),
14537 _internal_metadata_(NULL) {
14538 SharedCtor();
14539 MergeFrom(from);
14540 // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo)
14541}
14542
14543void GeneratedCodeInfo::SharedCtor() {
14544 _cached_size_ = 0;
14545 ::memset(_has_bits_, 0, sizeof(_has_bits_));
14546}
14547
14548GeneratedCodeInfo::~GeneratedCodeInfo() {
14549 // @@protoc_insertion_point(destructor:google.protobuf.GeneratedCodeInfo)
14550 SharedDtor();
14551}
14552
14553void GeneratedCodeInfo::SharedDtor() {
14554 if (this != default_instance_) {
14555 }
14556}
14557
14558void GeneratedCodeInfo::SetCachedSize(int size) const {
14559 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14560 _cached_size_ = size;
14561 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14562}
14563const ::google::protobuf::Descriptor* GeneratedCodeInfo::descriptor() {
14564 protobuf_AssignDescriptorsOnce();
14565 return GeneratedCodeInfo_descriptor_;
14566}
14567
14568const GeneratedCodeInfo& GeneratedCodeInfo::default_instance() {
14569 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
14570 return *default_instance_;
14571}
14572
14573GeneratedCodeInfo* GeneratedCodeInfo::default_instance_ = NULL;
14574
14575GeneratedCodeInfo* GeneratedCodeInfo::New(::google::protobuf::Arena* arena) const {
14576 GeneratedCodeInfo* n = new GeneratedCodeInfo;
14577 if (arena != NULL) {
14578 arena->Own(n);
14579 }
14580 return n;
14581}
14582
14583void GeneratedCodeInfo::Clear() {
14584 annotation_.Clear();
14585 ::memset(_has_bits_, 0, sizeof(_has_bits_));
14586 if (_internal_metadata_.have_unknown_fields()) {
14587 mutable_unknown_fields()->Clear();
14588 }
14589}
14590
14591bool GeneratedCodeInfo::MergePartialFromCodedStream(
14592 ::google::protobuf::io::CodedInputStream* input) {
14593#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
14594 ::google::protobuf::uint32 tag;
14595 // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo)
14596 for (;;) {
14597 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
14598 tag = p.first;
14599 if (!p.second) goto handle_unusual;
14600 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
14601 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14602 case 1: {
14603 if (tag == 10) {
14604 DO_(input->IncrementRecursionDepth());
14605 parse_loop_annotation:
14606 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
14607 input, add_annotation()));
14608 } else {
14609 goto handle_unusual;
14610 }
14611 if (input->ExpectTag(10)) goto parse_loop_annotation;
14612 input->UnsafeDecrementRecursionDepth();
14613 if (input->ExpectAtEnd()) goto success;
14614 break;
14615 }
14616
14617 default: {
14618 handle_unusual:
14619 if (tag == 0 ||
14620 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
14621 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
14622 goto success;
14623 }
14624 DO_(::google::protobuf::internal::WireFormat::SkipField(
14625 input, tag, mutable_unknown_fields()));
14626 break;
14627 }
14628 }
14629 }
14630success:
14631 // @@protoc_insertion_point(parse_success:google.protobuf.GeneratedCodeInfo)
14632 return true;
14633failure:
14634 // @@protoc_insertion_point(parse_failure:google.protobuf.GeneratedCodeInfo)
14635 return false;
14636#undef DO_
14637}
14638
14639void GeneratedCodeInfo::SerializeWithCachedSizes(
14640 ::google::protobuf::io::CodedOutputStream* output) const {
14641 // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo)
14642 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14643 for (unsigned int i = 0, n = this->annotation_size(); i < n; i++) {
14644 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
14645 1, this->annotation(i), output);
14646 }
14647
14648 if (_internal_metadata_.have_unknown_fields()) {
14649 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
14650 unknown_fields(), output);
14651 }
14652 // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo)
14653}
14654
14655::google::protobuf::uint8* GeneratedCodeInfo::SerializeWithCachedSizesToArray(
14656 ::google::protobuf::uint8* target) const {
14657 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo)
14658 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14659 for (unsigned int i = 0, n = this->annotation_size(); i < n; i++) {
14660 target = ::google::protobuf::internal::WireFormatLite::
14661 WriteMessageNoVirtualToArray(
14662 1, this->annotation(i), target);
14663 }
14664
14665 if (_internal_metadata_.have_unknown_fields()) {
14666 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
14667 unknown_fields(), target);
14668 }
14669 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo)
14670 return target;
14671}
14672
14673int GeneratedCodeInfo::ByteSize() const {
14674 int total_size = 0;
14675
14676 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14677 total_size += 1 * this->annotation_size();
14678 for (int i = 0; i < this->annotation_size(); i++) {
14679 total_size +=
14680 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
14681 this->annotation(i));
14682 }
14683
14684 if (_internal_metadata_.have_unknown_fields()) {
14685 total_size +=
14686 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
14687 unknown_fields());
14688 }
14689 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14690 _cached_size_ = total_size;
14691 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14692 return total_size;
14693}
14694
14695void GeneratedCodeInfo::MergeFrom(const ::google::protobuf::Message& from) {
14696 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
14697 const GeneratedCodeInfo* source =
14698 ::google::protobuf::internal::DynamicCastToGenerated<const GeneratedCodeInfo>(
14699 &from);
14700 if (source == NULL) {
14701 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
14702 } else {
14703 MergeFrom(*source);
14704 }
14705}
14706
14707void GeneratedCodeInfo::MergeFrom(const GeneratedCodeInfo& from) {
14708 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
14709 annotation_.MergeFrom(from.annotation_);
14710 if (from._internal_metadata_.have_unknown_fields()) {
14711 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
14712 }
14713}
14714
14715void GeneratedCodeInfo::CopyFrom(const ::google::protobuf::Message& from) {
14716 if (&from == this) return;
14717 Clear();
14718 MergeFrom(from);
14719}
14720
14721void GeneratedCodeInfo::CopyFrom(const GeneratedCodeInfo& from) {
14722 if (&from == this) return;
14723 Clear();
14724 MergeFrom(from);
14725}
14726
14727bool GeneratedCodeInfo::IsInitialized() const {
14728
14729 return true;
14730}
14731
14732void GeneratedCodeInfo::Swap(GeneratedCodeInfo* other) {
14733 if (other == this) return;
14734 InternalSwap(other);
14735}
14736void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* other) {
14737 annotation_.UnsafeArenaSwap(&other->annotation_);
14738 std::swap(_has_bits_[0], other->_has_bits_[0]);
14739 _internal_metadata_.Swap(&other->_internal_metadata_);
14740 std::swap(_cached_size_, other->_cached_size_);
14741}
14742
14743::google::protobuf::Metadata GeneratedCodeInfo::GetMetadata() const {
14744 protobuf_AssignDescriptorsOnce();
14745 ::google::protobuf::Metadata metadata;
14746 metadata.descriptor = GeneratedCodeInfo_descriptor_;
14747 metadata.reflection = GeneratedCodeInfo_reflection_;
14748 return metadata;
14749}
14750
14751#if PROTOBUF_INLINE_NOT_IN_HEADERS
14752// GeneratedCodeInfo_Annotation
14753
14754// repeated int32 path = 1 [packed = true];
14755int GeneratedCodeInfo_Annotation::path_size() const {
14756 return path_.size();
14757}
14758void GeneratedCodeInfo_Annotation::clear_path() {
14759 path_.Clear();
14760}
14761 ::google::protobuf::int32 GeneratedCodeInfo_Annotation::path(int index) const {
14762 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.path)
14763 return path_.Get(index);
14764}
14765 void GeneratedCodeInfo_Annotation::set_path(int index, ::google::protobuf::int32 value) {
14766 path_.Set(index, value);
14767 // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path)
14768}
14769 void GeneratedCodeInfo_Annotation::add_path(::google::protobuf::int32 value) {
14770 path_.Add(value);
14771 // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.Annotation.path)
14772}
14773 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
14774GeneratedCodeInfo_Annotation::path() const {
14775 // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.Annotation.path)
14776 return path_;
14777}
14778 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
14779GeneratedCodeInfo_Annotation::mutable_path() {
14780 // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.Annotation.path)
14781 return &path_;
14782}
14783
14784// optional string source_file = 2;
14785bool GeneratedCodeInfo_Annotation::has_source_file() const {
14786 return (_has_bits_[0] & 0x00000002u) != 0;
14787}
14788void GeneratedCodeInfo_Annotation::set_has_source_file() {
14789 _has_bits_[0] |= 0x00000002u;
14790}
14791void GeneratedCodeInfo_Annotation::clear_has_source_file() {
14792 _has_bits_[0] &= ~0x00000002u;
14793}
14794void GeneratedCodeInfo_Annotation::clear_source_file() {
14795 source_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14796 clear_has_source_file();
14797}
14798 const ::std::string& GeneratedCodeInfo_Annotation::source_file() const {
14799 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14800 return source_file_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14801}
14802 void GeneratedCodeInfo_Annotation::set_source_file(const ::std::string& value) {
14803 set_has_source_file();
14804 source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
14805 // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14806}
14807 void GeneratedCodeInfo_Annotation::set_source_file(const char* value) {
14808 set_has_source_file();
14809 source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
14810 // @@protoc_insertion_point(field_set_char:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14811}
14812 void GeneratedCodeInfo_Annotation::set_source_file(const char* value, size_t size) {
14813 set_has_source_file();
14814 source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
14815 ::std::string(reinterpret_cast<const char*>(value), size));
14816 // @@protoc_insertion_point(field_set_pointer:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14817}
14818 ::std::string* GeneratedCodeInfo_Annotation::mutable_source_file() {
14819 set_has_source_file();
14820 // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14821 return source_file_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14822}
14823 ::std::string* GeneratedCodeInfo_Annotation::release_source_file() {
14824 clear_has_source_file();
14825 return source_file_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14826}
14827 void GeneratedCodeInfo_Annotation::set_allocated_source_file(::std::string* source_file) {
14828 if (source_file != NULL) {
14829 set_has_source_file();
14830 } else {
14831 clear_has_source_file();
14832 }
14833 source_file_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source_file);
14834 // @@protoc_insertion_point(field_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14835}
14836
14837// optional int32 begin = 3;
14838bool GeneratedCodeInfo_Annotation::has_begin() const {
14839 return (_has_bits_[0] & 0x00000004u) != 0;
14840}
14841void GeneratedCodeInfo_Annotation::set_has_begin() {
14842 _has_bits_[0] |= 0x00000004u;
14843}
14844void GeneratedCodeInfo_Annotation::clear_has_begin() {
14845 _has_bits_[0] &= ~0x00000004u;
14846}
14847void GeneratedCodeInfo_Annotation::clear_begin() {
14848 begin_ = 0;
14849 clear_has_begin();
14850}
14851 ::google::protobuf::int32 GeneratedCodeInfo_Annotation::begin() const {
14852 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.begin)
14853 return begin_;
14854}
14855 void GeneratedCodeInfo_Annotation::set_begin(::google::protobuf::int32 value) {
14856 set_has_begin();
14857 begin_ = value;
14858 // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.begin)
14859}
14860
14861// optional int32 end = 4;
14862bool GeneratedCodeInfo_Annotation::has_end() const {
14863 return (_has_bits_[0] & 0x00000008u) != 0;
14864}
14865void GeneratedCodeInfo_Annotation::set_has_end() {
14866 _has_bits_[0] |= 0x00000008u;
14867}
14868void GeneratedCodeInfo_Annotation::clear_has_end() {
14869 _has_bits_[0] &= ~0x00000008u;
14870}
14871void GeneratedCodeInfo_Annotation::clear_end() {
14872 end_ = 0;
14873 clear_has_end();
14874}
14875 ::google::protobuf::int32 GeneratedCodeInfo_Annotation::end() const {
14876 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.end)
14877 return end_;
14878}
14879 void GeneratedCodeInfo_Annotation::set_end(::google::protobuf::int32 value) {
14880 set_has_end();
14881 end_ = value;
14882 // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.end)
14883}
14884
14885// -------------------------------------------------------------------
14886
14887// GeneratedCodeInfo
14888
14889// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14890int GeneratedCodeInfo::annotation_size() const {
14891 return annotation_.size();
14892}
14893void GeneratedCodeInfo::clear_annotation() {
14894 annotation_.Clear();
14895}
14896const ::google::protobuf::GeneratedCodeInfo_Annotation& GeneratedCodeInfo::annotation(int index) const {
14897 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.annotation)
14898 return annotation_.Get(index);
14899}
14900::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::mutable_annotation(int index) {
14901 // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.annotation)
14902 return annotation_.Mutable(index);
14903}
14904::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::add_annotation() {
14905 // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.annotation)
14906 return annotation_.Add();
14907}
14908::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >*
14909GeneratedCodeInfo::mutable_annotation() {
14910 // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.annotation)
14911 return &annotation_;
14912}
14913const ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >&
14914GeneratedCodeInfo::annotation() const {
14915 // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.annotation)
14916 return annotation_;
14917}
14918
14919#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
14920
kenton@google.comfccb1462009-12-18 02:11:36 +000014921// @@protoc_insertion_point(namespace_scope)
14922
temporal40ee5512008-07-10 02:12:20 +000014923} // namespace protobuf
14924} // namespace google
kenton@google.comfccb1462009-12-18 02:11:36 +000014925
14926// @@protoc_insertion_point(global_scope)