blob: 1338537e7535f82fd75131b7f2021e82536748aa [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);
Jisi Liu3b3c8ab2016-03-30 11:39:59 -0700322 static const int FileOptions_offsets_[15] = {
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_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000337 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_),
338 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000339 FileOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800340 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000341 FileOptions_descriptor_,
342 FileOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000343 FileOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000344 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800345 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000346 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800347 sizeof(FileOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800348 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _internal_metadata_),
349 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000350 FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000351 MessageOptions_descriptor_ = file->message_type(10);
Feng Xiao6ef984a2014-11-10 17:34:54 -0800352 static const int MessageOptions_offsets_[5] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000353 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_),
kenton@google.com80b1d622009-07-29 01:13:20 +0000354 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, no_standard_descriptor_accessor_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000355 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, deprecated_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800356 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, map_entry_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000357 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_),
358 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000359 MessageOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800360 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000361 MessageOptions_descriptor_,
362 MessageOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000363 MessageOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000364 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800365 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000366 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800367 sizeof(MessageOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800368 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _internal_metadata_),
369 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000370 FieldOptions_descriptor_ = file->message_type(11);
Bo Yang5db21732015-05-21 14:28:59 -0700371 static const int FieldOptions_offsets_[7] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000372 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_),
kenton@google.com2d6daa72009-01-22 01:27:00 +0000373 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_),
Bo Yang5db21732015-05-21 14:28:59 -0700374 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, jstype_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000375 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, lazy_),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000376 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, deprecated_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000377 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, weak_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000378 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_),
379 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000380 FieldOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800381 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000382 FieldOptions_descriptor_,
383 FieldOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000384 FieldOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000385 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800386 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000387 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800388 sizeof(FieldOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800389 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _internal_metadata_),
390 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000391 FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0);
Bo Yang5db21732015-05-21 14:28:59 -0700392 FieldOptions_JSType_descriptor_ = FieldOptions_descriptor_->enum_type(1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000393 EnumOptions_descriptor_ = file->message_type(12);
394 static const int EnumOptions_offsets_[3] = {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000395 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, allow_alias_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000396 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000397 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_),
398 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000399 EnumOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800400 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000401 EnumOptions_descriptor_,
402 EnumOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000403 EnumOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000404 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800405 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000406 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800407 sizeof(EnumOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800408 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _internal_metadata_),
409 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000410 EnumValueOptions_descriptor_ = file->message_type(13);
411 static const int EnumValueOptions_offsets_[2] = {
412 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000413 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_),
414 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000415 EnumValueOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800416 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000417 EnumValueOptions_descriptor_,
418 EnumValueOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000419 EnumValueOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000420 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800421 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000422 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800423 sizeof(EnumValueOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800424 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _internal_metadata_),
425 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000426 ServiceOptions_descriptor_ = file->message_type(14);
427 static const int ServiceOptions_offsets_[2] = {
428 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000429 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_),
430 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000431 ServiceOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800432 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000433 ServiceOptions_descriptor_,
434 ServiceOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000435 ServiceOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000436 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800437 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000438 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800439 sizeof(ServiceOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800440 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _internal_metadata_),
441 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000442 MethodOptions_descriptor_ = file->message_type(15);
443 static const int MethodOptions_offsets_[2] = {
444 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000445 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_),
446 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000447 MethodOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800448 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000449 MethodOptions_descriptor_,
450 MethodOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000451 MethodOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000452 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800453 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000454 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800455 sizeof(MethodOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800456 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _internal_metadata_),
457 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000458 UninterpretedOption_descriptor_ = file->message_type(16);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000459 static const int UninterpretedOption_offsets_[7] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000460 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_),
461 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_),
462 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_),
463 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_),
464 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_),
465 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000466 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, aggregate_value_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000467 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000468 UninterpretedOption_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800469 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000470 UninterpretedOption_descriptor_,
471 UninterpretedOption::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000472 UninterpretedOption_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000473 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800474 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000475 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800476 sizeof(UninterpretedOption),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800477 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _internal_metadata_),
478 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000479 UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000480 static const int UninterpretedOption_NamePart_offsets_[2] = {
481 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_),
482 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_),
483 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000484 UninterpretedOption_NamePart_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800485 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000486 UninterpretedOption_NamePart_descriptor_,
487 UninterpretedOption_NamePart::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000488 UninterpretedOption_NamePart_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000489 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800490 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000491 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800492 sizeof(UninterpretedOption_NamePart),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800493 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _internal_metadata_),
494 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000495 SourceCodeInfo_descriptor_ = file->message_type(17);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000496 static const int SourceCodeInfo_offsets_[1] = {
497 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, location_),
498 };
499 SourceCodeInfo_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800500 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
liujisi@google.com33165fe2010-11-02 13:14:58 +0000501 SourceCodeInfo_descriptor_,
502 SourceCodeInfo::default_instance_,
503 SourceCodeInfo_offsets_,
504 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800505 -1,
liujisi@google.com33165fe2010-11-02 13:14:58 +0000506 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800507 sizeof(SourceCodeInfo),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800508 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _internal_metadata_),
509 -1);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000510 SourceCodeInfo_Location_descriptor_ = SourceCodeInfo_descriptor_->nested_type(0);
Jisi Liu885b6122015-02-28 14:51:22 -0800511 static const int SourceCodeInfo_Location_offsets_[5] = {
liujisi@google.com33165fe2010-11-02 13:14:58 +0000512 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, path_),
513 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, span_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000514 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_comments_),
515 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, trailing_comments_),
Jisi Liu885b6122015-02-28 14:51:22 -0800516 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_detached_comments_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000517 };
518 SourceCodeInfo_Location_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800519 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
liujisi@google.com33165fe2010-11-02 13:14:58 +0000520 SourceCodeInfo_Location_descriptor_,
521 SourceCodeInfo_Location::default_instance_,
522 SourceCodeInfo_Location_offsets_,
523 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800524 -1,
liujisi@google.com33165fe2010-11-02 13:14:58 +0000525 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800526 sizeof(SourceCodeInfo_Location),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800527 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _internal_metadata_),
528 -1);
Jisi Liu5221dcb2016-01-29 13:51:05 -0800529 GeneratedCodeInfo_descriptor_ = file->message_type(18);
530 static const int GeneratedCodeInfo_offsets_[1] = {
531 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, annotation_),
532 };
533 GeneratedCodeInfo_reflection_ =
534 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
535 GeneratedCodeInfo_descriptor_,
536 GeneratedCodeInfo::default_instance_,
537 GeneratedCodeInfo_offsets_,
538 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, _has_bits_[0]),
539 -1,
540 -1,
541 sizeof(GeneratedCodeInfo),
542 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, _internal_metadata_),
543 -1);
544 GeneratedCodeInfo_Annotation_descriptor_ = GeneratedCodeInfo_descriptor_->nested_type(0);
545 static const int GeneratedCodeInfo_Annotation_offsets_[4] = {
546 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, path_),
547 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, source_file_),
548 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, begin_),
549 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, end_),
550 };
551 GeneratedCodeInfo_Annotation_reflection_ =
552 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
553 GeneratedCodeInfo_Annotation_descriptor_,
554 GeneratedCodeInfo_Annotation::default_instance_,
555 GeneratedCodeInfo_Annotation_offsets_,
556 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _has_bits_[0]),
557 -1,
558 -1,
559 sizeof(GeneratedCodeInfo_Annotation),
560 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _internal_metadata_),
561 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000562}
563
kenton@google.comd37d46d2009-04-25 02:53:47 +0000564namespace {
565
566GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
567inline void protobuf_AssignDescriptorsOnce() {
568 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
569 &protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto);
570}
571
kenton@google.com80b1d622009-07-29 01:13:20 +0000572void protobuf_RegisterTypes(const ::std::string&) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000573 protobuf_AssignDescriptorsOnce();
574 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800575 FileDescriptorSet_descriptor_, &FileDescriptorSet::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000576 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800577 FileDescriptorProto_descriptor_, &FileDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000578 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800579 DescriptorProto_descriptor_, &DescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000580 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800581 DescriptorProto_ExtensionRange_descriptor_, &DescriptorProto_ExtensionRange::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000582 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Bo Yang5db21732015-05-21 14:28:59 -0700583 DescriptorProto_ReservedRange_descriptor_, &DescriptorProto_ReservedRange::default_instance());
584 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800585 FieldDescriptorProto_descriptor_, &FieldDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000586 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800587 OneofDescriptorProto_descriptor_, &OneofDescriptorProto::default_instance());
jieluo@google.com4de8f552014-07-18 00:47:59 +0000588 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800589 EnumDescriptorProto_descriptor_, &EnumDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000590 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800591 EnumValueDescriptorProto_descriptor_, &EnumValueDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000592 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800593 ServiceDescriptorProto_descriptor_, &ServiceDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000594 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800595 MethodDescriptorProto_descriptor_, &MethodDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000596 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800597 FileOptions_descriptor_, &FileOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000598 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800599 MessageOptions_descriptor_, &MessageOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000600 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800601 FieldOptions_descriptor_, &FieldOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000602 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800603 EnumOptions_descriptor_, &EnumOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000604 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800605 EnumValueOptions_descriptor_, &EnumValueOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000606 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800607 ServiceOptions_descriptor_, &ServiceOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000608 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800609 MethodOptions_descriptor_, &MethodOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000610 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800611 UninterpretedOption_descriptor_, &UninterpretedOption::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000612 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800613 UninterpretedOption_NamePart_descriptor_, &UninterpretedOption_NamePart::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +0000614 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800615 SourceCodeInfo_descriptor_, &SourceCodeInfo::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +0000616 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800617 SourceCodeInfo_Location_descriptor_, &SourceCodeInfo_Location::default_instance());
Jisi Liu5221dcb2016-01-29 13:51:05 -0800618 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
619 GeneratedCodeInfo_descriptor_, &GeneratedCodeInfo::default_instance());
620 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
621 GeneratedCodeInfo_Annotation_descriptor_, &GeneratedCodeInfo_Annotation::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000622}
623
624} // namespace
625
kenton@google.com63e646b2009-05-06 19:27:03 +0000626void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto() {
627 delete FileDescriptorSet::default_instance_;
628 delete FileDescriptorSet_reflection_;
629 delete FileDescriptorProto::default_instance_;
630 delete FileDescriptorProto_reflection_;
631 delete DescriptorProto::default_instance_;
632 delete DescriptorProto_reflection_;
633 delete DescriptorProto_ExtensionRange::default_instance_;
634 delete DescriptorProto_ExtensionRange_reflection_;
Bo Yang5db21732015-05-21 14:28:59 -0700635 delete DescriptorProto_ReservedRange::default_instance_;
636 delete DescriptorProto_ReservedRange_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000637 delete FieldDescriptorProto::default_instance_;
638 delete FieldDescriptorProto_reflection_;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000639 delete OneofDescriptorProto::default_instance_;
640 delete OneofDescriptorProto_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000641 delete EnumDescriptorProto::default_instance_;
642 delete EnumDescriptorProto_reflection_;
643 delete EnumValueDescriptorProto::default_instance_;
644 delete EnumValueDescriptorProto_reflection_;
645 delete ServiceDescriptorProto::default_instance_;
646 delete ServiceDescriptorProto_reflection_;
647 delete MethodDescriptorProto::default_instance_;
648 delete MethodDescriptorProto_reflection_;
649 delete FileOptions::default_instance_;
650 delete FileOptions_reflection_;
651 delete MessageOptions::default_instance_;
652 delete MessageOptions_reflection_;
653 delete FieldOptions::default_instance_;
654 delete FieldOptions_reflection_;
655 delete EnumOptions::default_instance_;
656 delete EnumOptions_reflection_;
657 delete EnumValueOptions::default_instance_;
658 delete EnumValueOptions_reflection_;
659 delete ServiceOptions::default_instance_;
660 delete ServiceOptions_reflection_;
661 delete MethodOptions::default_instance_;
662 delete MethodOptions_reflection_;
663 delete UninterpretedOption::default_instance_;
664 delete UninterpretedOption_reflection_;
665 delete UninterpretedOption_NamePart::default_instance_;
666 delete UninterpretedOption_NamePart_reflection_;
liujisi@google.com33165fe2010-11-02 13:14:58 +0000667 delete SourceCodeInfo::default_instance_;
668 delete SourceCodeInfo_reflection_;
669 delete SourceCodeInfo_Location::default_instance_;
670 delete SourceCodeInfo_Location_reflection_;
Jisi Liu5221dcb2016-01-29 13:51:05 -0800671 delete GeneratedCodeInfo::default_instance_;
672 delete GeneratedCodeInfo_reflection_;
673 delete GeneratedCodeInfo_Annotation::default_instance_;
674 delete GeneratedCodeInfo_Annotation_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000675}
676
kenton@google.comd37d46d2009-04-25 02:53:47 +0000677void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
temporal40ee5512008-07-10 02:12:20 +0000678 static bool already_here = false;
679 if (already_here) return;
680 already_here = true;
681 GOOGLE_PROTOBUF_VERIFY_VERSION;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000682
kenton@google.comd37d46d2009-04-25 02:53:47 +0000683 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
temporal40ee5512008-07-10 02:12:20 +0000684 "\n google/protobuf/descriptor.proto\022\017goog"
temporal779f61c2008-08-13 03:15:00 +0000685 "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file"
686 "\030\001 \003(\0132$.google.protobuf.FileDescriptorP"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800687 "roto\"\333\003\n\023FileDescriptorProto\022\014\n\004name\030\001 \001"
temporal779f61c2008-08-13 03:15:00 +0000688 "(\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 +0000689 "\031\n\021public_dependency\030\n \003(\005\022\027\n\017weak_depen"
690 "dency\030\013 \003(\005\0226\n\014message_type\030\004 \003(\0132 .goog"
691 "le.protobuf.DescriptorProto\0227\n\tenum_type"
692 "\030\005 \003(\0132$.google.protobuf.EnumDescriptorP"
693 "roto\0228\n\007service\030\006 \003(\0132\'.google.protobuf."
694 "ServiceDescriptorProto\0228\n\textension\030\007 \003("
liujisi@google.com33165fe2010-11-02 13:14:58 +0000695 "\0132%.google.protobuf.FieldDescriptorProto"
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000696 "\022-\n\007options\030\010 \001(\0132\034.google.protobuf.File"
697 "Options\0229\n\020source_code_info\030\t \001(\0132\037.goog"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800698 "le.protobuf.SourceCodeInfo\022\016\n\006syntax\030\014 \001"
Bo Yang5db21732015-05-21 14:28:59 -0700699 "(\t\"\360\004\n\017DescriptorProto\022\014\n\004name\030\001 \001(\t\0224\n\005"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800700 "field\030\002 \003(\0132%.google.protobuf.FieldDescr"
701 "iptorProto\0228\n\textension\030\006 \003(\0132%.google.p"
702 "rotobuf.FieldDescriptorProto\0225\n\013nested_t"
703 "ype\030\003 \003(\0132 .google.protobuf.DescriptorPr"
704 "oto\0227\n\tenum_type\030\004 \003(\0132$.google.protobuf"
705 ".EnumDescriptorProto\022H\n\017extension_range\030"
706 "\005 \003(\0132/.google.protobuf.DescriptorProto."
707 "ExtensionRange\0229\n\noneof_decl\030\010 \003(\0132%.goo"
708 "gle.protobuf.OneofDescriptorProto\0220\n\007opt"
709 "ions\030\007 \001(\0132\037.google.protobuf.MessageOpti"
Bo Yang5db21732015-05-21 14:28:59 -0700710 "ons\022F\n\016reserved_range\030\t \003(\0132..google.pro"
711 "tobuf.DescriptorProto.ReservedRange\022\025\n\rr"
712 "eserved_name\030\n \003(\t\032,\n\016ExtensionRange\022\r\n\005"
713 "start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\032+\n\rReservedRang"
Jisi Liu46e8ff62015-10-05 11:59:43 -0700714 "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 -0700715 "escriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\003"
716 " \001(\005\022:\n\005label\030\004 \001(\0162+.google.protobuf.Fi"
717 "eldDescriptorProto.Label\0228\n\004type\030\005 \001(\0162*"
718 ".google.protobuf.FieldDescriptorProto.Ty"
719 "pe\022\021\n\ttype_name\030\006 \001(\t\022\020\n\010extendee\030\002 \001(\t\022"
720 "\025\n\rdefault_value\030\007 \001(\t\022\023\n\013oneof_index\030\t "
Jisi Liu46e8ff62015-10-05 11:59:43 -0700721 "\001(\005\022\021\n\tjson_name\030\n \001(\t\022.\n\007options\030\010 \001(\0132"
722 "\035.google.protobuf.FieldOptions\"\266\002\n\004Type\022"
723 "\017\n\013TYPE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE"
724 "_INT64\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020"
725 "\005\022\020\n\014TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n"
726 "\tTYPE_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GR"
727 "OUP\020\n\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022"
728 "\017\n\013TYPE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_"
729 "SFIXED32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SI"
730 "NT32\020\021\022\017\n\013TYPE_SINT64\020\022\"C\n\005Label\022\022\n\016LABE"
731 "L_OPTIONAL\020\001\022\022\n\016LABEL_REQUIRED\020\002\022\022\n\016LABE"
732 "L_REPEATED\020\003\"$\n\024OneofDescriptorProto\022\014\n\004"
733 "name\030\001 \001(\t\"\214\001\n\023EnumDescriptorProto\022\014\n\004na"
734 "me\030\001 \001(\t\0228\n\005value\030\002 \003(\0132).google.protobu"
735 "f.EnumValueDescriptorProto\022-\n\007options\030\003 "
736 "\001(\0132\034.google.protobuf.EnumOptions\"l\n\030Enu"
737 "mValueDescriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006n"
738 "umber\030\002 \001(\005\0222\n\007options\030\003 \001(\0132!.google.pr"
739 "otobuf.EnumValueOptions\"\220\001\n\026ServiceDescr"
740 "iptorProto\022\014\n\004name\030\001 \001(\t\0226\n\006method\030\002 \003(\013"
741 "2&.google.protobuf.MethodDescriptorProto"
742 "\0220\n\007options\030\003 \001(\0132\037.google.protobuf.Serv"
743 "iceOptions\"\301\001\n\025MethodDescriptorProto\022\014\n\004"
744 "name\030\001 \001(\t\022\022\n\ninput_type\030\002 \001(\t\022\023\n\013output"
745 "_type\030\003 \001(\t\022/\n\007options\030\004 \001(\0132\036.google.pr"
746 "otobuf.MethodOptions\022\037\n\020client_streaming"
747 "\030\005 \001(\010:\005false\022\037\n\020server_streaming\030\006 \001(\010:"
Jisi Liu3b3c8ab2016-03-30 11:39:59 -0700748 "\005false\"\207\005\n\013FileOptions\022\024\n\014java_package\030\001"
Jisi Liu46e8ff62015-10-05 11:59:43 -0700749 " \001(\t\022\034\n\024java_outer_classname\030\010 \001(\t\022\"\n\023ja"
750 "va_multiple_files\030\n \001(\010:\005false\022,\n\035java_g"
751 "enerate_equals_and_hash\030\024 \001(\010:\005false\022%\n\026"
752 "java_string_check_utf8\030\033 \001(\010:\005false\022F\n\014o"
753 "ptimize_for\030\t \001(\0162).google.protobuf.File"
754 "Options.OptimizeMode:\005SPEED\022\022\n\ngo_packag"
755 "e\030\013 \001(\t\022\"\n\023cc_generic_services\030\020 \001(\010:\005fa"
756 "lse\022$\n\025java_generic_services\030\021 \001(\010:\005fals"
757 "e\022\"\n\023py_generic_services\030\022 \001(\010:\005false\022\031\n"
758 "\ndeprecated\030\027 \001(\010:\005false\022\037\n\020cc_enable_ar"
759 "enas\030\037 \001(\010:\005false\022\031\n\021objc_class_prefix\030$"
Jisi Liu3b3c8ab2016-03-30 11:39:59 -0700760 " \001(\t\022\030\n\020csharp_namespace\030% \001(\t\022C\n\024uninte"
761 "rpreted_option\030\347\007 \003(\0132$.google.protobuf."
762 "UninterpretedOption\":\n\014OptimizeMode\022\t\n\005S"
763 "PEED\020\001\022\r\n\tCODE_SIZE\020\002\022\020\n\014LITE_RUNTIME\020\003*"
764 "\t\010\350\007\020\200\200\200\200\002J\004\010&\020\'\"\346\001\n\016MessageOptions\022&\n\027m"
765 "essage_set_wire_format\030\001 \001(\010:\005false\022.\n\037n"
766 "o_standard_descriptor_accessor\030\002 \001(\010:\005fa"
767 "lse\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\021\n\tmap_en"
768 "try\030\007 \001(\010\022C\n\024uninterpreted_option\030\347\007 \003(\013"
769 "2$.google.protobuf.UninterpretedOption*\t"
770 "\010\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOptions\022:\n\005ctype\030\001 \001("
771 "\0162#.google.protobuf.FieldOptions.CType:\006"
772 "STRING\022\016\n\006packed\030\002 \001(\010\022\?\n\006jstype\030\006 \001(\0162$"
773 ".google.protobuf.FieldOptions.JSType:\tJS"
774 "_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005false\022\031\n\ndeprecat"
775 "ed\030\003 \001(\010:\005false\022\023\n\004weak\030\n \001(\010:\005false\022C\n\024"
776 "uninterpreted_option\030\347\007 \003(\0132$.google.pro"
777 "tobuf.UninterpretedOption\"/\n\005CType\022\n\n\006ST"
778 "RING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020\002\"5\n\006JS"
779 "Type\022\r\n\tJS_NORMAL\020\000\022\r\n\tJS_STRING\020\001\022\r\n\tJS"
780 "_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n\013EnumOptions\022\023\n\013"
781 "allow_alias\030\002 \001(\010\022\031\n\ndeprecated\030\003 \001(\010:\005f"
782 "alse\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.go"
783 "ogle.protobuf.UninterpretedOption*\t\010\350\007\020\200"
784 "\200\200\200\002\"}\n\020EnumValueOptions\022\031\n\ndeprecated\030\001"
785 " \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003"
786 "(\0132$.google.protobuf.UninterpretedOption"
787 "*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOptions\022\031\n\ndepreca"
788 "ted\030! \001(\010:\005false\022C\n\024uninterpreted_option"
789 "\030\347\007 \003(\0132$.google.protobuf.UninterpretedO"
790 "ption*\t\010\350\007\020\200\200\200\200\002\"z\n\rMethodOptions\022\031\n\ndep"
791 "recated\030! \001(\010:\005false\022C\n\024uninterpreted_op"
792 "tion\030\347\007 \003(\0132$.google.protobuf.Uninterpre"
793 "tedOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023UninterpretedOp"
794 "tion\022;\n\004name\030\002 \003(\0132-.google.protobuf.Uni"
795 "nterpretedOption.NamePart\022\030\n\020identifier_"
796 "value\030\003 \001(\t\022\032\n\022positive_int_value\030\004 \001(\004\022"
797 "\032\n\022negative_int_value\030\005 \001(\003\022\024\n\014double_va"
798 "lue\030\006 \001(\001\022\024\n\014string_value\030\007 \001(\014\022\027\n\017aggre"
799 "gate_value\030\010 \001(\t\0323\n\010NamePart\022\021\n\tname_par"
800 "t\030\001 \002(\t\022\024\n\014is_extension\030\002 \002(\010\"\325\001\n\016Source"
801 "CodeInfo\022:\n\010location\030\001 \003(\0132(.google.prot"
802 "obuf.SourceCodeInfo.Location\032\206\001\n\010Locatio"
803 "n\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"
804 "\020leading_comments\030\003 \001(\t\022\031\n\021trailing_comm"
805 "ents\030\004 \001(\t\022!\n\031leading_detached_comments\030"
806 "\006 \003(\t\"\247\001\n\021GeneratedCodeInfo\022A\n\nannotatio"
807 "n\030\001 \003(\0132-.google.protobuf.GeneratedCodeI"
808 "nfo.Annotation\032O\n\nAnnotation\022\020\n\004path\030\001 \003"
809 "(\005B\002\020\001\022\023\n\013source_file\030\002 \001(\t\022\r\n\005begin\030\003 \001"
810 "(\005\022\013\n\003end\030\004 \001(\005BX\n\023com.google.protobufB\020"
811 "DescriptorProtosH\001Z\ndescriptor\242\002\003GPB\252\002\032G"
812 "oogle.Protobuf.Reflection", 5145);
kenton@google.comd37d46d2009-04-25 02:53:47 +0000813 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
814 "google/protobuf/descriptor.proto", &protobuf_RegisterTypes);
815 FileDescriptorSet::default_instance_ = new FileDescriptorSet();
816 FileDescriptorProto::default_instance_ = new FileDescriptorProto();
817 DescriptorProto::default_instance_ = new DescriptorProto();
818 DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange();
Bo Yang5db21732015-05-21 14:28:59 -0700819 DescriptorProto_ReservedRange::default_instance_ = new DescriptorProto_ReservedRange();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000820 FieldDescriptorProto::default_instance_ = new FieldDescriptorProto();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000821 OneofDescriptorProto::default_instance_ = new OneofDescriptorProto();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000822 EnumDescriptorProto::default_instance_ = new EnumDescriptorProto();
823 EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto();
824 ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto();
825 MethodDescriptorProto::default_instance_ = new MethodDescriptorProto();
826 FileOptions::default_instance_ = new FileOptions();
827 MessageOptions::default_instance_ = new MessageOptions();
828 FieldOptions::default_instance_ = new FieldOptions();
829 EnumOptions::default_instance_ = new EnumOptions();
830 EnumValueOptions::default_instance_ = new EnumValueOptions();
831 ServiceOptions::default_instance_ = new ServiceOptions();
832 MethodOptions::default_instance_ = new MethodOptions();
833 UninterpretedOption::default_instance_ = new UninterpretedOption();
834 UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart();
liujisi@google.com33165fe2010-11-02 13:14:58 +0000835 SourceCodeInfo::default_instance_ = new SourceCodeInfo();
836 SourceCodeInfo_Location::default_instance_ = new SourceCodeInfo_Location();
Jisi Liu5221dcb2016-01-29 13:51:05 -0800837 GeneratedCodeInfo::default_instance_ = new GeneratedCodeInfo();
838 GeneratedCodeInfo_Annotation::default_instance_ = new GeneratedCodeInfo_Annotation();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000839 FileDescriptorSet::default_instance_->InitAsDefaultInstance();
840 FileDescriptorProto::default_instance_->InitAsDefaultInstance();
841 DescriptorProto::default_instance_->InitAsDefaultInstance();
842 DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance();
Bo Yang5db21732015-05-21 14:28:59 -0700843 DescriptorProto_ReservedRange::default_instance_->InitAsDefaultInstance();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000844 FieldDescriptorProto::default_instance_->InitAsDefaultInstance();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000845 OneofDescriptorProto::default_instance_->InitAsDefaultInstance();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000846 EnumDescriptorProto::default_instance_->InitAsDefaultInstance();
847 EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance();
848 ServiceDescriptorProto::default_instance_->InitAsDefaultInstance();
849 MethodDescriptorProto::default_instance_->InitAsDefaultInstance();
850 FileOptions::default_instance_->InitAsDefaultInstance();
851 MessageOptions::default_instance_->InitAsDefaultInstance();
852 FieldOptions::default_instance_->InitAsDefaultInstance();
853 EnumOptions::default_instance_->InitAsDefaultInstance();
854 EnumValueOptions::default_instance_->InitAsDefaultInstance();
855 ServiceOptions::default_instance_->InitAsDefaultInstance();
856 MethodOptions::default_instance_->InitAsDefaultInstance();
857 UninterpretedOption::default_instance_->InitAsDefaultInstance();
858 UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance();
liujisi@google.com33165fe2010-11-02 13:14:58 +0000859 SourceCodeInfo::default_instance_->InitAsDefaultInstance();
860 SourceCodeInfo_Location::default_instance_->InitAsDefaultInstance();
Jisi Liu5221dcb2016-01-29 13:51:05 -0800861 GeneratedCodeInfo::default_instance_->InitAsDefaultInstance();
862 GeneratedCodeInfo_Annotation::default_instance_->InitAsDefaultInstance();
kenton@google.com63e646b2009-05-06 19:27:03 +0000863 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto);
temporal40ee5512008-07-10 02:12:20 +0000864}
865
kenton@google.comd37d46d2009-04-25 02:53:47 +0000866// Force AddDescriptors() to be called at static initialization time.
temporal40ee5512008-07-10 02:12:20 +0000867struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto {
868 StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000869 protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +0000870 }
871} static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_;
872
Feng Xiaof157a562014-11-14 11:50:31 -0800873namespace {
874
875static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;
876static void MergeFromFail(int line) {
877 GOOGLE_CHECK(false) << __FILE__ << ":" << line;
878}
879
880} // namespace
881
882
temporal40ee5512008-07-10 02:12:20 +0000883// ===================================================================
884
Bruce Dawson86ba70e2015-10-29 12:41:29 -0700885#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +0000886const int FileDescriptorSet::kFileFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -0700887#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal779f61c2008-08-13 03:15:00 +0000888
kenton@google.com573989f2009-10-30 22:02:17 +0000889FileDescriptorSet::FileDescriptorSet()
Bo Yang5db21732015-05-21 14:28:59 -0700890 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000891 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000892 // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000893}
894
kenton@google.com80b1d622009-07-29 01:13:20 +0000895void FileDescriptorSet::InitAsDefaultInstance() {
896}
kenton@google.com24bf56f2008-09-24 20:31:01 +0000897
kenton@google.com573989f2009-10-30 22:02:17 +0000898FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -0800899 : ::google::protobuf::Message(),
900 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000901 SharedCtor();
temporal779f61c2008-08-13 03:15:00 +0000902 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000903 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000904}
905
kenton@google.comd37d46d2009-04-25 02:53:47 +0000906void FileDescriptorSet::SharedCtor() {
907 _cached_size_ = 0;
908 ::memset(_has_bits_, 0, sizeof(_has_bits_));
909}
910
temporal779f61c2008-08-13 03:15:00 +0000911FileDescriptorSet::~FileDescriptorSet() {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000912 // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +0000913 SharedDtor();
914}
915
916void FileDescriptorSet::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +0000917 if (this != default_instance_) {
temporal779f61c2008-08-13 03:15:00 +0000918 }
919}
920
kenton@google.comfccb1462009-12-18 02:11:36 +0000921void FileDescriptorSet::SetCachedSize(int size) const {
922 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
923 _cached_size_ = size;
924 GOOGLE_SAFE_CONCURRENT_WRITES_END();
925}
temporal779f61c2008-08-13 03:15:00 +0000926const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000927 protobuf_AssignDescriptorsOnce();
temporal779f61c2008-08-13 03:15:00 +0000928 return FileDescriptorSet_descriptor_;
929}
930
kenton@google.com24bf56f2008-09-24 20:31:01 +0000931const FileDescriptorSet& FileDescriptorSet::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +0000932 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
933 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +0000934}
935
936FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL;
937
Feng Xiao6ef984a2014-11-10 17:34:54 -0800938FileDescriptorSet* FileDescriptorSet::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -0800939 FileDescriptorSet* n = new FileDescriptorSet;
940 if (arena != NULL) {
941 arena->Own(n);
942 }
943 return n;
temporal779f61c2008-08-13 03:15:00 +0000944}
945
946void FileDescriptorSet::Clear() {
947 file_.Clear();
948 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -0800949 if (_internal_metadata_.have_unknown_fields()) {
950 mutable_unknown_fields()->Clear();
951 }
temporal779f61c2008-08-13 03:15:00 +0000952}
953
954bool FileDescriptorSet::MergePartialFromCodedStream(
955 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000956#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal779f61c2008-08-13 03:15:00 +0000957 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000958 // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorSet)
959 for (;;) {
960 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
961 tag = p.first;
962 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +0000963 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal779f61c2008-08-13 03:15:00 +0000964 // repeated .google.protobuf.FileDescriptorProto file = 1;
965 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000966 if (tag == 10) {
Bo Yang5db21732015-05-21 14:28:59 -0700967 DO_(input->IncrementRecursionDepth());
968 parse_loop_file:
969 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +0000970 input, add_file()));
971 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000972 goto handle_unusual;
temporal779f61c2008-08-13 03:15:00 +0000973 }
Bo Yang5db21732015-05-21 14:28:59 -0700974 if (input->ExpectTag(10)) goto parse_loop_file;
975 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000976 if (input->ExpectAtEnd()) goto success;
temporal779f61c2008-08-13 03:15:00 +0000977 break;
978 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000979
temporal779f61c2008-08-13 03:15:00 +0000980 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000981 handle_unusual:
982 if (tag == 0 ||
983 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +0000984 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000985 goto success;
temporal779f61c2008-08-13 03:15:00 +0000986 }
987 DO_(::google::protobuf::internal::WireFormat::SkipField(
988 input, tag, mutable_unknown_fields()));
989 break;
990 }
991 }
992 }
jieluo@google.com4de8f552014-07-18 00:47:59 +0000993success:
994 // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000995 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000996failure:
997 // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorSet)
998 return false;
temporal779f61c2008-08-13 03:15:00 +0000999#undef DO_
1000}
1001
kenton@google.comd37d46d2009-04-25 02:53:47 +00001002void FileDescriptorSet::SerializeWithCachedSizes(
temporal779f61c2008-08-13 03:15:00 +00001003 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001004 // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +00001005 // repeated .google.protobuf.FileDescriptorProto file = 1;
Feng Xiaof157a562014-11-14 11:50:31 -08001006 for (unsigned int i = 0, n = this->file_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001007 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001008 1, this->file(i), output);
temporal779f61c2008-08-13 03:15:00 +00001009 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001010
Feng Xiao6ef984a2014-11-10 17:34:54 -08001011 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001012 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1013 unknown_fields(), output);
temporal779f61c2008-08-13 03:15:00 +00001014 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001015 // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001016}
1017
1018::google::protobuf::uint8* FileDescriptorSet::SerializeWithCachedSizesToArray(
1019 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001020 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001021 // repeated .google.protobuf.FileDescriptorProto file = 1;
Feng Xiaof157a562014-11-14 11:50:31 -08001022 for (unsigned int i = 0, n = this->file_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001023 target = ::google::protobuf::internal::WireFormatLite::
1024 WriteMessageNoVirtualToArray(
1025 1, this->file(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001026 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001027
Feng Xiao6ef984a2014-11-10 17:34:54 -08001028 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001029 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1030 unknown_fields(), target);
1031 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001032 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001033 return target;
temporal779f61c2008-08-13 03:15:00 +00001034}
1035
1036int FileDescriptorSet::ByteSize() const {
1037 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001038
temporal779f61c2008-08-13 03:15:00 +00001039 // repeated .google.protobuf.FileDescriptorProto file = 1;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001040 total_size += 1 * this->file_size();
1041 for (int i = 0; i < this->file_size(); i++) {
temporal779f61c2008-08-13 03:15:00 +00001042 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001043 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal779f61c2008-08-13 03:15:00 +00001044 this->file(i));
1045 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001046
Feng Xiao6ef984a2014-11-10 17:34:54 -08001047 if (_internal_metadata_.have_unknown_fields()) {
temporal779f61c2008-08-13 03:15:00 +00001048 total_size +=
1049 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1050 unknown_fields());
1051 }
kenton@google.comfccb1462009-12-18 02:11:36 +00001052 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal779f61c2008-08-13 03:15:00 +00001053 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00001054 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal779f61c2008-08-13 03:15:00 +00001055 return total_size;
1056}
1057
1058void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001059 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07001060 const FileDescriptorSet* source =
1061 ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorSet>(
1062 &from);
temporal779f61c2008-08-13 03:15:00 +00001063 if (source == NULL) {
1064 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1065 } else {
1066 MergeFrom(*source);
1067 }
1068}
1069
1070void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001071 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal779f61c2008-08-13 03:15:00 +00001072 file_.MergeFrom(from.file_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08001073 if (from._internal_metadata_.have_unknown_fields()) {
1074 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1075 }
temporal779f61c2008-08-13 03:15:00 +00001076}
1077
1078void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) {
1079 if (&from == this) return;
1080 Clear();
1081 MergeFrom(from);
1082}
1083
1084void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
1085 if (&from == this) return;
1086 Clear();
1087 MergeFrom(from);
1088}
1089
kenton@google.comceb561d2009-06-25 19:05:36 +00001090bool FileDescriptorSet::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001091
jieluo@google.com4de8f552014-07-18 00:47:59 +00001092 if (!::google::protobuf::internal::AllAreInitialized(this->file())) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00001093 return true;
1094}
1095
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001096void FileDescriptorSet::Swap(FileDescriptorSet* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08001097 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001098 InternalSwap(other);
1099}
1100void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) {
1101 file_.UnsafeArenaSwap(&other->file_);
1102 std::swap(_has_bits_[0], other->_has_bits_[0]);
1103 _internal_metadata_.Swap(&other->_internal_metadata_);
1104 std::swap(_cached_size_, other->_cached_size_);
1105}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001106
kenton@google.com80b1d622009-07-29 01:13:20 +00001107::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const {
1108 protobuf_AssignDescriptorsOnce();
1109 ::google::protobuf::Metadata metadata;
1110 metadata.descriptor = FileDescriptorSet_descriptor_;
1111 metadata.reflection = FileDescriptorSet_reflection_;
1112 return metadata;
temporal779f61c2008-08-13 03:15:00 +00001113}
1114
Jisi Liu885b6122015-02-28 14:51:22 -08001115#if PROTOBUF_INLINE_NOT_IN_HEADERS
1116// FileDescriptorSet
1117
1118// repeated .google.protobuf.FileDescriptorProto file = 1;
Bo Yang5db21732015-05-21 14:28:59 -07001119int FileDescriptorSet::file_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001120 return file_.size();
1121}
Bo Yang5db21732015-05-21 14:28:59 -07001122void FileDescriptorSet::clear_file() {
Jisi Liu885b6122015-02-28 14:51:22 -08001123 file_.Clear();
1124}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001125const ::google::protobuf::FileDescriptorProto& FileDescriptorSet::file(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08001126 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file)
1127 return file_.Get(index);
1128}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001129::google::protobuf::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08001130 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorSet.file)
1131 return file_.Mutable(index);
1132}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001133::google::protobuf::FileDescriptorProto* FileDescriptorSet::add_file() {
Jisi Liu885b6122015-02-28 14:51:22 -08001134 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file)
1135 return file_.Add();
1136}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001137::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08001138FileDescriptorSet::mutable_file() {
1139 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file)
1140 return &file_;
1141}
Feng Xiaoeee38b02015-08-22 18:25:48 -07001142const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
1143FileDescriptorSet::file() const {
1144 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file)
1145 return file_;
1146}
Jisi Liu885b6122015-02-28 14:51:22 -08001147
1148#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal779f61c2008-08-13 03:15:00 +00001149
1150// ===================================================================
1151
Bruce Dawson86ba70e2015-10-29 12:41:29 -07001152#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001153const int FileDescriptorProto::kNameFieldNumber;
1154const int FileDescriptorProto::kPackageFieldNumber;
1155const int FileDescriptorProto::kDependencyFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001156const int FileDescriptorProto::kPublicDependencyFieldNumber;
1157const int FileDescriptorProto::kWeakDependencyFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001158const int FileDescriptorProto::kMessageTypeFieldNumber;
1159const int FileDescriptorProto::kEnumTypeFieldNumber;
1160const int FileDescriptorProto::kServiceFieldNumber;
1161const int FileDescriptorProto::kExtensionFieldNumber;
1162const int FileDescriptorProto::kOptionsFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001163const int FileDescriptorProto::kSourceCodeInfoFieldNumber;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001164const int FileDescriptorProto::kSyntaxFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07001165#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00001166
kenton@google.com573989f2009-10-30 22:02:17 +00001167FileDescriptorProto::FileDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07001168 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001169 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00001170 // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00001171}
1172
kenton@google.com80b1d622009-07-29 01:13:20 +00001173void FileDescriptorProto::InitAsDefaultInstance() {
1174 options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +00001175 source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(&::google::protobuf::SourceCodeInfo::default_instance());
temporal40ee5512008-07-10 02:12:20 +00001176}
1177
kenton@google.com573989f2009-10-30 22:02:17 +00001178FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08001179 : ::google::protobuf::Message(),
1180 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001181 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00001182 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00001183 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001184}
1185
kenton@google.comd37d46d2009-04-25 02:53:47 +00001186void FileDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001187 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00001188 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001189 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1190 package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00001191 options_ = NULL;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001192 source_code_info_ = NULL;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001193 syntax_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00001194 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1195}
1196
temporal40ee5512008-07-10 02:12:20 +00001197FileDescriptorProto::~FileDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001198 // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001199 SharedDtor();
1200}
1201
1202void FileDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08001203 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1204 package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1205 syntax_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00001206 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00001207 delete options_;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001208 delete source_code_info_;
temporal40ee5512008-07-10 02:12:20 +00001209 }
1210}
1211
kenton@google.comfccb1462009-12-18 02:11:36 +00001212void FileDescriptorProto::SetCachedSize(int size) const {
1213 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1214 _cached_size_ = size;
1215 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1216}
temporal40ee5512008-07-10 02:12:20 +00001217const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001218 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00001219 return FileDescriptorProto_descriptor_;
1220}
1221
kenton@google.com24bf56f2008-09-24 20:31:01 +00001222const FileDescriptorProto& FileDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00001223 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
1224 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001225}
1226
1227FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL;
1228
Feng Xiao6ef984a2014-11-10 17:34:54 -08001229FileDescriptorProto* FileDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08001230 FileDescriptorProto* n = new FileDescriptorProto;
1231 if (arena != NULL) {
1232 arena->Own(n);
1233 }
1234 return n;
temporal40ee5512008-07-10 02:12:20 +00001235}
1236
1237void FileDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07001238 if (_has_bits_[0 / 32] & 3u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001239 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001240 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00001241 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001242 if (has_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001243 package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00001244 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001245 }
Austin Schuhe8268372015-05-19 23:22:20 -07001246 if (_has_bits_[8 / 32] & 3584u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001247 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001248 if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear();
1249 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001250 if (has_source_code_info()) {
1251 if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear();
1252 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001253 if (has_syntax()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001254 syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Feng Xiao6ef984a2014-11-10 17:34:54 -08001255 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001256 }
temporal40ee5512008-07-10 02:12:20 +00001257 dependency_.Clear();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001258 public_dependency_.Clear();
1259 weak_dependency_.Clear();
temporal40ee5512008-07-10 02:12:20 +00001260 message_type_.Clear();
1261 enum_type_.Clear();
1262 service_.Clear();
1263 extension_.Clear();
1264 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08001265 if (_internal_metadata_.have_unknown_fields()) {
1266 mutable_unknown_fields()->Clear();
1267 }
temporal40ee5512008-07-10 02:12:20 +00001268}
1269
1270bool FileDescriptorProto::MergePartialFromCodedStream(
1271 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001272#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00001273 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00001274 // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorProto)
1275 for (;;) {
1276 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1277 tag = p.first;
1278 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00001279 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00001280 // optional string name = 1;
1281 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001282 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001283 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1284 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001285 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00001286 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001287 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001288 "google.protobuf.FileDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00001289 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001290 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001291 }
temporal40ee5512008-07-10 02:12:20 +00001292 if (input->ExpectTag(18)) goto parse_package;
1293 break;
1294 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001295
temporal40ee5512008-07-10 02:12:20 +00001296 // optional string package = 2;
1297 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001298 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001299 parse_package:
1300 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1301 input, this->mutable_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001302 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00001303 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001304 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001305 "google.protobuf.FileDescriptorProto.package");
kenton@google.comfccb1462009-12-18 02:11:36 +00001306 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001307 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001308 }
temporal40ee5512008-07-10 02:12:20 +00001309 if (input->ExpectTag(26)) goto parse_dependency;
1310 break;
1311 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001312
temporal40ee5512008-07-10 02:12:20 +00001313 // repeated string dependency = 3;
1314 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001315 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001316 parse_dependency:
1317 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1318 input, this->add_dependency()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001319 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.com20724212012-05-16 05:41:31 +00001320 this->dependency(this->dependency_size() - 1).data(),
1321 this->dependency(this->dependency_size() - 1).length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001322 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001323 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.comfccb1462009-12-18 02:11:36 +00001324 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001325 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001326 }
temporal40ee5512008-07-10 02:12:20 +00001327 if (input->ExpectTag(26)) goto parse_dependency;
1328 if (input->ExpectTag(34)) goto parse_message_type;
1329 break;
1330 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001331
temporal40ee5512008-07-10 02:12:20 +00001332 // repeated .google.protobuf.DescriptorProto message_type = 4;
1333 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001334 if (tag == 34) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001335 parse_message_type:
Bo Yang5db21732015-05-21 14:28:59 -07001336 DO_(input->IncrementRecursionDepth());
1337 parse_loop_message_type:
1338 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001339 input, add_message_type()));
1340 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001341 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001342 }
Bo Yang5db21732015-05-21 14:28:59 -07001343 if (input->ExpectTag(34)) goto parse_loop_message_type;
1344 if (input->ExpectTag(42)) goto parse_loop_enum_type;
1345 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001346 break;
1347 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001348
temporal40ee5512008-07-10 02:12:20 +00001349 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
1350 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001351 if (tag == 42) {
Bo Yang5db21732015-05-21 14:28:59 -07001352 DO_(input->IncrementRecursionDepth());
1353 parse_loop_enum_type:
1354 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001355 input, add_enum_type()));
1356 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001357 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001358 }
Bo Yang5db21732015-05-21 14:28:59 -07001359 if (input->ExpectTag(42)) goto parse_loop_enum_type;
1360 if (input->ExpectTag(50)) goto parse_loop_service;
1361 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001362 break;
1363 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001364
temporal40ee5512008-07-10 02:12:20 +00001365 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
1366 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001367 if (tag == 50) {
Bo Yang5db21732015-05-21 14:28:59 -07001368 DO_(input->IncrementRecursionDepth());
1369 parse_loop_service:
1370 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001371 input, add_service()));
1372 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001373 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001374 }
Bo Yang5db21732015-05-21 14:28:59 -07001375 if (input->ExpectTag(50)) goto parse_loop_service;
1376 if (input->ExpectTag(58)) goto parse_loop_extension;
1377 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001378 break;
1379 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001380
temporal40ee5512008-07-10 02:12:20 +00001381 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
1382 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001383 if (tag == 58) {
Bo Yang5db21732015-05-21 14:28:59 -07001384 DO_(input->IncrementRecursionDepth());
1385 parse_loop_extension:
1386 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001387 input, add_extension()));
1388 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001389 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001390 }
Bo Yang5db21732015-05-21 14:28:59 -07001391 if (input->ExpectTag(58)) goto parse_loop_extension;
1392 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001393 if (input->ExpectTag(66)) goto parse_options;
1394 break;
1395 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001396
temporal40ee5512008-07-10 02:12:20 +00001397 // optional .google.protobuf.FileOptions options = 8;
1398 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001399 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001400 parse_options:
1401 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1402 input, mutable_options()));
1403 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001404 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001405 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001406 if (input->ExpectTag(74)) goto parse_source_code_info;
1407 break;
1408 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001409
liujisi@google.com33165fe2010-11-02 13:14:58 +00001410 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1411 case 9: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001412 if (tag == 74) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001413 parse_source_code_info:
1414 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1415 input, mutable_source_code_info()));
1416 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001417 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001418 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001419 if (input->ExpectTag(80)) goto parse_public_dependency;
1420 break;
1421 }
1422
1423 // repeated int32 public_dependency = 10;
1424 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001425 if (tag == 80) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001426 parse_public_dependency:
1427 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1428 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1429 1, 80, input, this->mutable_public_dependency())));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001430 } else if (tag == 82) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001431 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1432 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1433 input, this->mutable_public_dependency())));
1434 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001435 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001436 }
1437 if (input->ExpectTag(80)) goto parse_public_dependency;
1438 if (input->ExpectTag(88)) goto parse_weak_dependency;
1439 break;
1440 }
1441
1442 // repeated int32 weak_dependency = 11;
1443 case 11: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001444 if (tag == 88) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001445 parse_weak_dependency:
1446 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1447 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1448 1, 88, input, this->mutable_weak_dependency())));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001449 } else if (tag == 90) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001450 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1451 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1452 input, this->mutable_weak_dependency())));
1453 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001454 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001455 }
1456 if (input->ExpectTag(88)) goto parse_weak_dependency;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001457 if (input->ExpectTag(98)) goto parse_syntax;
1458 break;
1459 }
1460
1461 // optional string syntax = 12;
1462 case 12: {
1463 if (tag == 98) {
1464 parse_syntax:
1465 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1466 input, this->mutable_syntax()));
1467 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1468 this->syntax().data(), this->syntax().length(),
1469 ::google::protobuf::internal::WireFormat::PARSE,
1470 "google.protobuf.FileDescriptorProto.syntax");
1471 } else {
1472 goto handle_unusual;
1473 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001474 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00001475 break;
1476 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001477
temporal40ee5512008-07-10 02:12:20 +00001478 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001479 handle_unusual:
1480 if (tag == 0 ||
1481 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001482 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001483 goto success;
temporal40ee5512008-07-10 02:12:20 +00001484 }
1485 DO_(::google::protobuf::internal::WireFormat::SkipField(
1486 input, tag, mutable_unknown_fields()));
1487 break;
1488 }
1489 }
1490 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001491success:
1492 // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001493 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00001494failure:
1495 // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorProto)
1496 return false;
temporal40ee5512008-07-10 02:12:20 +00001497#undef DO_
1498}
1499
kenton@google.comd37d46d2009-04-25 02:53:47 +00001500void FileDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00001501 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001502 // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001503 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001504 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001505 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001506 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001507 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001508 "google.protobuf.FileDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00001509 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00001510 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00001511 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001512
temporal40ee5512008-07-10 02:12:20 +00001513 // optional string package = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001514 if (has_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001515 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001516 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001517 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001518 "google.protobuf.FileDescriptorProto.package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00001519 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00001520 2, this->package(), output);
temporal40ee5512008-07-10 02:12:20 +00001521 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001522
temporal40ee5512008-07-10 02:12:20 +00001523 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001524 for (int i = 0; i < this->dependency_size(); i++) {
Jisi Liu4c663d82015-08-25 17:03:05 -07001525 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1526 this->dependency(i).data(), this->dependency(i).length(),
1527 ::google::protobuf::internal::WireFormat::SERIALIZE,
1528 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.com80b1d622009-07-29 01:13:20 +00001529 ::google::protobuf::internal::WireFormatLite::WriteString(
1530 3, this->dependency(i), output);
temporal40ee5512008-07-10 02:12:20 +00001531 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001532
temporal40ee5512008-07-10 02:12:20 +00001533 // repeated .google.protobuf.DescriptorProto message_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08001534 for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001535 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001536 4, this->message_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001537 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001538
temporal40ee5512008-07-10 02:12:20 +00001539 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08001540 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001541 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001542 5, this->enum_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001543 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001544
temporal40ee5512008-07-10 02:12:20 +00001545 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08001546 for (unsigned int i = 0, n = this->service_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001547 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001548 6, this->service(i), output);
temporal40ee5512008-07-10 02:12:20 +00001549 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001550
temporal40ee5512008-07-10 02:12:20 +00001551 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
Feng Xiaof157a562014-11-14 11:50:31 -08001552 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001553 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001554 7, this->extension(i), output);
temporal40ee5512008-07-10 02:12:20 +00001555 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001556
temporal40ee5512008-07-10 02:12:20 +00001557 // optional .google.protobuf.FileOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001558 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001559 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001560 8, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00001561 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001562
liujisi@google.com33165fe2010-11-02 13:14:58 +00001563 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1564 if (has_source_code_info()) {
1565 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001566 9, *this->source_code_info_, output);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001567 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001568
1569 // repeated int32 public_dependency = 10;
1570 for (int i = 0; i < this->public_dependency_size(); i++) {
1571 ::google::protobuf::internal::WireFormatLite::WriteInt32(
1572 10, this->public_dependency(i), output);
1573 }
1574
1575 // repeated int32 weak_dependency = 11;
1576 for (int i = 0; i < this->weak_dependency_size(); i++) {
1577 ::google::protobuf::internal::WireFormatLite::WriteInt32(
1578 11, this->weak_dependency(i), output);
1579 }
1580
Feng Xiao6ef984a2014-11-10 17:34:54 -08001581 // optional string syntax = 12;
1582 if (has_syntax()) {
1583 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1584 this->syntax().data(), this->syntax().length(),
1585 ::google::protobuf::internal::WireFormat::SERIALIZE,
1586 "google.protobuf.FileDescriptorProto.syntax");
1587 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1588 12, this->syntax(), output);
1589 }
1590
1591 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001592 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1593 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00001594 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001595 // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001596}
1597
1598::google::protobuf::uint8* FileDescriptorProto::SerializeWithCachedSizesToArray(
1599 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001600 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001601 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001602 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001603 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001604 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001605 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001606 "google.protobuf.FileDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00001607 target =
1608 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1609 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001610 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001611
kenton@google.comd37d46d2009-04-25 02:53:47 +00001612 // optional string package = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001613 if (has_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001614 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001615 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001616 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001617 "google.protobuf.FileDescriptorProto.package");
kenton@google.com80b1d622009-07-29 01:13:20 +00001618 target =
1619 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1620 2, this->package(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001621 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001622
kenton@google.comd37d46d2009-04-25 02:53:47 +00001623 // repeated string dependency = 3;
1624 for (int i = 0; i < this->dependency_size(); i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001625 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001626 this->dependency(i).data(), this->dependency(i).length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001627 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001628 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.com80b1d622009-07-29 01:13:20 +00001629 target = ::google::protobuf::internal::WireFormatLite::
1630 WriteStringToArray(3, this->dependency(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001631 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001632
kenton@google.comd37d46d2009-04-25 02:53:47 +00001633 // repeated .google.protobuf.DescriptorProto message_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08001634 for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001635 target = ::google::protobuf::internal::WireFormatLite::
1636 WriteMessageNoVirtualToArray(
1637 4, this->message_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001638 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001639
kenton@google.comd37d46d2009-04-25 02:53:47 +00001640 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08001641 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001642 target = ::google::protobuf::internal::WireFormatLite::
1643 WriteMessageNoVirtualToArray(
1644 5, this->enum_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001645 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001646
kenton@google.comd37d46d2009-04-25 02:53:47 +00001647 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08001648 for (unsigned int i = 0, n = this->service_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001649 target = ::google::protobuf::internal::WireFormatLite::
1650 WriteMessageNoVirtualToArray(
1651 6, this->service(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001652 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001653
kenton@google.comd37d46d2009-04-25 02:53:47 +00001654 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
Feng Xiaof157a562014-11-14 11:50:31 -08001655 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001656 target = ::google::protobuf::internal::WireFormatLite::
1657 WriteMessageNoVirtualToArray(
1658 7, this->extension(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001659 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001660
kenton@google.comd37d46d2009-04-25 02:53:47 +00001661 // optional .google.protobuf.FileOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001662 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001663 target = ::google::protobuf::internal::WireFormatLite::
1664 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001665 8, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001666 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001667
liujisi@google.com33165fe2010-11-02 13:14:58 +00001668 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1669 if (has_source_code_info()) {
1670 target = ::google::protobuf::internal::WireFormatLite::
1671 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001672 9, *this->source_code_info_, target);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001673 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001674
1675 // repeated int32 public_dependency = 10;
1676 for (int i = 0; i < this->public_dependency_size(); i++) {
1677 target = ::google::protobuf::internal::WireFormatLite::
1678 WriteInt32ToArray(10, this->public_dependency(i), target);
1679 }
1680
1681 // repeated int32 weak_dependency = 11;
1682 for (int i = 0; i < this->weak_dependency_size(); i++) {
1683 target = ::google::protobuf::internal::WireFormatLite::
1684 WriteInt32ToArray(11, this->weak_dependency(i), target);
1685 }
1686
Feng Xiao6ef984a2014-11-10 17:34:54 -08001687 // optional string syntax = 12;
1688 if (has_syntax()) {
1689 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1690 this->syntax().data(), this->syntax().length(),
1691 ::google::protobuf::internal::WireFormat::SERIALIZE,
1692 "google.protobuf.FileDescriptorProto.syntax");
1693 target =
1694 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1695 12, this->syntax(), target);
1696 }
1697
1698 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001699 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1700 unknown_fields(), target);
1701 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001702 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001703 return target;
temporal40ee5512008-07-10 02:12:20 +00001704}
1705
1706int FileDescriptorProto::ByteSize() const {
1707 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001708
Austin Schuh307af622015-06-05 22:46:01 -07001709 if (_has_bits_[0 / 32] & 3u) {
temporal40ee5512008-07-10 02:12:20 +00001710 // optional string name = 1;
1711 if (has_name()) {
1712 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001713 ::google::protobuf::internal::WireFormatLite::StringSize(
1714 this->name());
temporal40ee5512008-07-10 02:12:20 +00001715 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001716
temporal40ee5512008-07-10 02:12:20 +00001717 // optional string package = 2;
1718 if (has_package()) {
1719 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001720 ::google::protobuf::internal::WireFormatLite::StringSize(
1721 this->package());
temporal40ee5512008-07-10 02:12:20 +00001722 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001723
1724 }
Austin Schuh307af622015-06-05 22:46:01 -07001725 if (_has_bits_[9 / 32] & 3584u) {
temporal40ee5512008-07-10 02:12:20 +00001726 // optional .google.protobuf.FileOptions options = 8;
1727 if (has_options()) {
1728 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001729 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08001730 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00001731 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001732
liujisi@google.com33165fe2010-11-02 13:14:58 +00001733 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1734 if (has_source_code_info()) {
1735 total_size += 1 +
1736 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08001737 *this->source_code_info_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001738 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001739
Feng Xiao6ef984a2014-11-10 17:34:54 -08001740 // optional string syntax = 12;
1741 if (has_syntax()) {
1742 total_size += 1 +
1743 ::google::protobuf::internal::WireFormatLite::StringSize(
1744 this->syntax());
1745 }
1746
liujisi@google.com33165fe2010-11-02 13:14:58 +00001747 }
temporal40ee5512008-07-10 02:12:20 +00001748 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001749 total_size += 1 * this->dependency_size();
1750 for (int i = 0; i < this->dependency_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001751 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
temporal40ee5512008-07-10 02:12:20 +00001752 this->dependency(i));
1753 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001754
1755 // repeated int32 public_dependency = 10;
1756 {
1757 int data_size = 0;
1758 for (int i = 0; i < this->public_dependency_size(); i++) {
1759 data_size += ::google::protobuf::internal::WireFormatLite::
1760 Int32Size(this->public_dependency(i));
1761 }
1762 total_size += 1 * this->public_dependency_size() + data_size;
1763 }
1764
1765 // repeated int32 weak_dependency = 11;
1766 {
1767 int data_size = 0;
1768 for (int i = 0; i < this->weak_dependency_size(); i++) {
1769 data_size += ::google::protobuf::internal::WireFormatLite::
1770 Int32Size(this->weak_dependency(i));
1771 }
1772 total_size += 1 * this->weak_dependency_size() + data_size;
1773 }
1774
temporal40ee5512008-07-10 02:12:20 +00001775 // repeated .google.protobuf.DescriptorProto message_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001776 total_size += 1 * this->message_type_size();
1777 for (int i = 0; i < this->message_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001778 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001779 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001780 this->message_type(i));
1781 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001782
temporal40ee5512008-07-10 02:12:20 +00001783 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001784 total_size += 1 * this->enum_type_size();
1785 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001786 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001787 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001788 this->enum_type(i));
1789 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001790
temporal40ee5512008-07-10 02:12:20 +00001791 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001792 total_size += 1 * this->service_size();
1793 for (int i = 0; i < this->service_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001794 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001795 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001796 this->service(i));
1797 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001798
temporal40ee5512008-07-10 02:12:20 +00001799 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001800 total_size += 1 * this->extension_size();
1801 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001802 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001803 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001804 this->extension(i));
1805 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001806
Feng Xiao6ef984a2014-11-10 17:34:54 -08001807 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00001808 total_size +=
1809 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1810 unknown_fields());
1811 }
kenton@google.comfccb1462009-12-18 02:11:36 +00001812 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00001813 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00001814 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00001815 return total_size;
1816}
1817
1818void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001819 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07001820 const FileDescriptorProto* source =
1821 ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorProto>(
1822 &from);
temporal40ee5512008-07-10 02:12:20 +00001823 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00001824 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00001825 } else {
1826 MergeFrom(*source);
1827 }
1828}
1829
1830void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001831 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00001832 dependency_.MergeFrom(from.dependency_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001833 public_dependency_.MergeFrom(from.public_dependency_);
1834 weak_dependency_.MergeFrom(from.weak_dependency_);
temporal40ee5512008-07-10 02:12:20 +00001835 message_type_.MergeFrom(from.message_type_);
1836 enum_type_.MergeFrom(from.enum_type_);
1837 service_.MergeFrom(from.service_);
1838 extension_.MergeFrom(from.extension_);
1839 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001840 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001841 set_has_name();
1842 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00001843 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001844 if (from.has_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001845 set_has_package();
1846 package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.package_);
temporal40ee5512008-07-10 02:12:20 +00001847 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001848 }
1849 if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001850 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001851 mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options());
1852 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001853 if (from.has_source_code_info()) {
1854 mutable_source_code_info()->::google::protobuf::SourceCodeInfo::MergeFrom(from.source_code_info());
1855 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001856 if (from.has_syntax()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001857 set_has_syntax();
1858 syntax_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.syntax_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08001859 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001860 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001861 if (from._internal_metadata_.have_unknown_fields()) {
1862 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1863 }
temporal40ee5512008-07-10 02:12:20 +00001864}
1865
1866void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
1867 if (&from == this) return;
1868 Clear();
1869 MergeFrom(from);
1870}
1871
1872void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
1873 if (&from == this) return;
1874 Clear();
1875 MergeFrom(from);
1876}
1877
1878bool FileDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001879
jieluo@google.com4de8f552014-07-18 00:47:59 +00001880 if (!::google::protobuf::internal::AllAreInitialized(this->message_type())) return false;
1881 if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false;
1882 if (!::google::protobuf::internal::AllAreInitialized(this->service())) return false;
1883 if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001884 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001885 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001886 }
temporal40ee5512008-07-10 02:12:20 +00001887 return true;
1888}
1889
kenton@google.comceb561d2009-06-25 19:05:36 +00001890void FileDescriptorProto::Swap(FileDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08001891 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001892 InternalSwap(other);
1893}
1894void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) {
1895 name_.Swap(&other->name_);
1896 package_.Swap(&other->package_);
1897 dependency_.UnsafeArenaSwap(&other->dependency_);
1898 public_dependency_.UnsafeArenaSwap(&other->public_dependency_);
1899 weak_dependency_.UnsafeArenaSwap(&other->weak_dependency_);
1900 message_type_.UnsafeArenaSwap(&other->message_type_);
1901 enum_type_.UnsafeArenaSwap(&other->enum_type_);
1902 service_.UnsafeArenaSwap(&other->service_);
1903 extension_.UnsafeArenaSwap(&other->extension_);
1904 std::swap(options_, other->options_);
1905 std::swap(source_code_info_, other->source_code_info_);
1906 syntax_.Swap(&other->syntax_);
1907 std::swap(_has_bits_[0], other->_has_bits_[0]);
1908 _internal_metadata_.Swap(&other->_internal_metadata_);
1909 std::swap(_cached_size_, other->_cached_size_);
1910}
kenton@google.comceb561d2009-06-25 19:05:36 +00001911
kenton@google.com80b1d622009-07-29 01:13:20 +00001912::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const {
1913 protobuf_AssignDescriptorsOnce();
1914 ::google::protobuf::Metadata metadata;
1915 metadata.descriptor = FileDescriptorProto_descriptor_;
1916 metadata.reflection = FileDescriptorProto_reflection_;
1917 return metadata;
temporal40ee5512008-07-10 02:12:20 +00001918}
1919
Jisi Liu885b6122015-02-28 14:51:22 -08001920#if PROTOBUF_INLINE_NOT_IN_HEADERS
1921// FileDescriptorProto
1922
1923// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07001924bool FileDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001925 return (_has_bits_[0] & 0x00000001u) != 0;
1926}
Bo Yang5db21732015-05-21 14:28:59 -07001927void FileDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001928 _has_bits_[0] |= 0x00000001u;
1929}
Bo Yang5db21732015-05-21 14:28:59 -07001930void FileDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001931 _has_bits_[0] &= ~0x00000001u;
1932}
Bo Yang5db21732015-05-21 14:28:59 -07001933void FileDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001934 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1935 clear_has_name();
1936}
1937 const ::std::string& FileDescriptorProto::name() const {
1938 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name)
1939 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1940}
1941 void FileDescriptorProto::set_name(const ::std::string& value) {
1942 set_has_name();
1943 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1944 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name)
1945}
1946 void FileDescriptorProto::set_name(const char* value) {
1947 set_has_name();
1948 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1949 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name)
1950}
1951 void FileDescriptorProto::set_name(const char* value, size_t size) {
1952 set_has_name();
1953 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1954 ::std::string(reinterpret_cast<const char*>(value), size));
1955 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name)
1956}
1957 ::std::string* FileDescriptorProto::mutable_name() {
1958 set_has_name();
1959 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name)
1960 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1961}
1962 ::std::string* FileDescriptorProto::release_name() {
1963 clear_has_name();
1964 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1965}
1966 void FileDescriptorProto::set_allocated_name(::std::string* name) {
1967 if (name != NULL) {
1968 set_has_name();
1969 } else {
1970 clear_has_name();
1971 }
1972 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
1973 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name)
1974}
1975
1976// optional string package = 2;
Bo Yang5db21732015-05-21 14:28:59 -07001977bool FileDescriptorProto::has_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001978 return (_has_bits_[0] & 0x00000002u) != 0;
1979}
Bo Yang5db21732015-05-21 14:28:59 -07001980void FileDescriptorProto::set_has_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001981 _has_bits_[0] |= 0x00000002u;
1982}
Bo Yang5db21732015-05-21 14:28:59 -07001983void FileDescriptorProto::clear_has_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001984 _has_bits_[0] &= ~0x00000002u;
1985}
Bo Yang5db21732015-05-21 14:28:59 -07001986void FileDescriptorProto::clear_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001987 package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1988 clear_has_package();
1989}
1990 const ::std::string& FileDescriptorProto::package() const {
1991 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package)
1992 return package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1993}
1994 void FileDescriptorProto::set_package(const ::std::string& value) {
1995 set_has_package();
1996 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1997 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package)
1998}
1999 void FileDescriptorProto::set_package(const char* value) {
2000 set_has_package();
2001 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
2002 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package)
2003}
2004 void FileDescriptorProto::set_package(const char* value, size_t size) {
2005 set_has_package();
2006 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2007 ::std::string(reinterpret_cast<const char*>(value), size));
2008 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package)
2009}
2010 ::std::string* FileDescriptorProto::mutable_package() {
2011 set_has_package();
2012 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package)
2013 return package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2014}
2015 ::std::string* FileDescriptorProto::release_package() {
2016 clear_has_package();
2017 return package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2018}
2019 void FileDescriptorProto::set_allocated_package(::std::string* package) {
2020 if (package != NULL) {
2021 set_has_package();
2022 } else {
2023 clear_has_package();
2024 }
2025 package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), package);
2026 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package)
2027}
2028
2029// repeated string dependency = 3;
Bo Yang5db21732015-05-21 14:28:59 -07002030int FileDescriptorProto::dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002031 return dependency_.size();
2032}
Bo Yang5db21732015-05-21 14:28:59 -07002033void FileDescriptorProto::clear_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08002034 dependency_.Clear();
2035}
2036 const ::std::string& FileDescriptorProto::dependency(int index) const {
2037 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency)
2038 return dependency_.Get(index);
2039}
2040 ::std::string* FileDescriptorProto::mutable_dependency(int index) {
2041 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency)
2042 return dependency_.Mutable(index);
2043}
2044 void FileDescriptorProto::set_dependency(int index, const ::std::string& value) {
2045 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
2046 dependency_.Mutable(index)->assign(value);
2047}
2048 void FileDescriptorProto::set_dependency(int index, const char* value) {
2049 dependency_.Mutable(index)->assign(value);
2050 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency)
2051}
2052 void FileDescriptorProto::set_dependency(int index, const char* value, size_t size) {
2053 dependency_.Mutable(index)->assign(
2054 reinterpret_cast<const char*>(value), size);
2055 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency)
2056}
2057 ::std::string* FileDescriptorProto::add_dependency() {
2058 return dependency_.Add();
2059}
2060 void FileDescriptorProto::add_dependency(const ::std::string& value) {
2061 dependency_.Add()->assign(value);
2062 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
2063}
2064 void FileDescriptorProto::add_dependency(const char* value) {
2065 dependency_.Add()->assign(value);
2066 // @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency)
2067}
2068 void FileDescriptorProto::add_dependency(const char* value, size_t size) {
2069 dependency_.Add()->assign(reinterpret_cast<const char*>(value), size);
2070 // @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency)
2071}
2072 const ::google::protobuf::RepeatedPtrField< ::std::string>&
2073FileDescriptorProto::dependency() const {
2074 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency)
2075 return dependency_;
2076}
2077 ::google::protobuf::RepeatedPtrField< ::std::string>*
2078FileDescriptorProto::mutable_dependency() {
2079 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency)
2080 return &dependency_;
2081}
2082
2083// repeated int32 public_dependency = 10;
Bo Yang5db21732015-05-21 14:28:59 -07002084int FileDescriptorProto::public_dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002085 return public_dependency_.size();
2086}
Bo Yang5db21732015-05-21 14:28:59 -07002087void FileDescriptorProto::clear_public_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08002088 public_dependency_.Clear();
2089}
2090 ::google::protobuf::int32 FileDescriptorProto::public_dependency(int index) const {
2091 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency)
2092 return public_dependency_.Get(index);
2093}
2094 void FileDescriptorProto::set_public_dependency(int index, ::google::protobuf::int32 value) {
2095 public_dependency_.Set(index, value);
2096 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency)
2097}
2098 void FileDescriptorProto::add_public_dependency(::google::protobuf::int32 value) {
2099 public_dependency_.Add(value);
2100 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency)
2101}
2102 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
2103FileDescriptorProto::public_dependency() const {
2104 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency)
2105 return public_dependency_;
2106}
2107 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
2108FileDescriptorProto::mutable_public_dependency() {
2109 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency)
2110 return &public_dependency_;
2111}
2112
2113// repeated int32 weak_dependency = 11;
Bo Yang5db21732015-05-21 14:28:59 -07002114int FileDescriptorProto::weak_dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002115 return weak_dependency_.size();
2116}
Bo Yang5db21732015-05-21 14:28:59 -07002117void FileDescriptorProto::clear_weak_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08002118 weak_dependency_.Clear();
2119}
2120 ::google::protobuf::int32 FileDescriptorProto::weak_dependency(int index) const {
2121 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency)
2122 return weak_dependency_.Get(index);
2123}
2124 void FileDescriptorProto::set_weak_dependency(int index, ::google::protobuf::int32 value) {
2125 weak_dependency_.Set(index, value);
2126 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency)
2127}
2128 void FileDescriptorProto::add_weak_dependency(::google::protobuf::int32 value) {
2129 weak_dependency_.Add(value);
2130 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency)
2131}
2132 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
2133FileDescriptorProto::weak_dependency() const {
2134 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency)
2135 return weak_dependency_;
2136}
2137 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
2138FileDescriptorProto::mutable_weak_dependency() {
2139 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency)
2140 return &weak_dependency_;
2141}
2142
2143// repeated .google.protobuf.DescriptorProto message_type = 4;
Bo Yang5db21732015-05-21 14:28:59 -07002144int FileDescriptorProto::message_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002145 return message_type_.size();
2146}
Bo Yang5db21732015-05-21 14:28:59 -07002147void FileDescriptorProto::clear_message_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002148 message_type_.Clear();
2149}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002150const ::google::protobuf::DescriptorProto& FileDescriptorProto::message_type(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08002151 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.message_type)
2152 return message_type_.Get(index);
2153}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002154::google::protobuf::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08002155 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.message_type)
2156 return message_type_.Mutable(index);
2157}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002158::google::protobuf::DescriptorProto* FileDescriptorProto::add_message_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002159 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.message_type)
2160 return message_type_.Add();
2161}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002162::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08002163FileDescriptorProto::mutable_message_type() {
2164 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type)
2165 return &message_type_;
2166}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002167const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
2168FileDescriptorProto::message_type() const {
2169 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type)
2170 return message_type_;
2171}
Jisi Liu885b6122015-02-28 14:51:22 -08002172
2173// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Bo Yang5db21732015-05-21 14:28:59 -07002174int FileDescriptorProto::enum_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002175 return enum_type_.size();
2176}
Bo Yang5db21732015-05-21 14:28:59 -07002177void FileDescriptorProto::clear_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002178 enum_type_.Clear();
2179}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002180const ::google::protobuf::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08002181 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.enum_type)
2182 return enum_type_.Get(index);
2183}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002184::google::protobuf::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08002185 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.enum_type)
2186 return enum_type_.Mutable(index);
2187}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002188::google::protobuf::EnumDescriptorProto* FileDescriptorProto::add_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002189 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.enum_type)
2190 return enum_type_.Add();
2191}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002192::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08002193FileDescriptorProto::mutable_enum_type() {
2194 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type)
2195 return &enum_type_;
2196}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002197const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
2198FileDescriptorProto::enum_type() const {
2199 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type)
2200 return enum_type_;
2201}
Jisi Liu885b6122015-02-28 14:51:22 -08002202
2203// repeated .google.protobuf.ServiceDescriptorProto service = 6;
Bo Yang5db21732015-05-21 14:28:59 -07002204int FileDescriptorProto::service_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002205 return service_.size();
2206}
Bo Yang5db21732015-05-21 14:28:59 -07002207void FileDescriptorProto::clear_service() {
Jisi Liu885b6122015-02-28 14:51:22 -08002208 service_.Clear();
2209}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002210const ::google::protobuf::ServiceDescriptorProto& FileDescriptorProto::service(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08002211 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service)
2212 return service_.Get(index);
2213}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002214::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08002215 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.service)
2216 return service_.Mutable(index);
2217}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002218::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::add_service() {
Jisi Liu885b6122015-02-28 14:51:22 -08002219 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service)
2220 return service_.Add();
2221}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002222::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08002223FileDescriptorProto::mutable_service() {
2224 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service)
2225 return &service_;
2226}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002227const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >&
2228FileDescriptorProto::service() const {
2229 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service)
2230 return service_;
2231}
Jisi Liu885b6122015-02-28 14:51:22 -08002232
2233// repeated .google.protobuf.FieldDescriptorProto extension = 7;
Bo Yang5db21732015-05-21 14:28:59 -07002234int FileDescriptorProto::extension_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002235 return extension_.size();
2236}
Bo Yang5db21732015-05-21 14:28:59 -07002237void FileDescriptorProto::clear_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08002238 extension_.Clear();
2239}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002240const ::google::protobuf::FieldDescriptorProto& FileDescriptorProto::extension(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08002241 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension)
2242 return extension_.Get(index);
2243}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002244::google::protobuf::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08002245 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.extension)
2246 return extension_.Mutable(index);
2247}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002248::google::protobuf::FieldDescriptorProto* FileDescriptorProto::add_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08002249 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension)
2250 return extension_.Add();
2251}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002252::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08002253FileDescriptorProto::mutable_extension() {
2254 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension)
2255 return &extension_;
2256}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002257const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
2258FileDescriptorProto::extension() const {
2259 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension)
2260 return extension_;
2261}
Jisi Liu885b6122015-02-28 14:51:22 -08002262
2263// optional .google.protobuf.FileOptions options = 8;
Bo Yang5db21732015-05-21 14:28:59 -07002264bool FileDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002265 return (_has_bits_[0] & 0x00000200u) != 0;
2266}
Bo Yang5db21732015-05-21 14:28:59 -07002267void FileDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002268 _has_bits_[0] |= 0x00000200u;
2269}
Bo Yang5db21732015-05-21 14:28:59 -07002270void FileDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002271 _has_bits_[0] &= ~0x00000200u;
2272}
Bo Yang5db21732015-05-21 14:28:59 -07002273void FileDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002274 if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear();
2275 clear_has_options();
2276}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002277const ::google::protobuf::FileOptions& FileDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002278 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options)
2279 return options_ != NULL ? *options_ : *default_instance_->options_;
2280}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002281::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002282 set_has_options();
2283 if (options_ == NULL) {
2284 options_ = new ::google::protobuf::FileOptions;
2285 }
2286 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options)
2287 return options_;
2288}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002289::google::protobuf::FileOptions* FileDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002290 clear_has_options();
2291 ::google::protobuf::FileOptions* temp = options_;
2292 options_ = NULL;
2293 return temp;
2294}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002295void FileDescriptorProto::set_allocated_options(::google::protobuf::FileOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08002296 delete options_;
2297 options_ = options;
2298 if (options) {
2299 set_has_options();
2300 } else {
2301 clear_has_options();
2302 }
2303 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.options)
2304}
2305
2306// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
Bo Yang5db21732015-05-21 14:28:59 -07002307bool FileDescriptorProto::has_source_code_info() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002308 return (_has_bits_[0] & 0x00000400u) != 0;
2309}
Bo Yang5db21732015-05-21 14:28:59 -07002310void FileDescriptorProto::set_has_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002311 _has_bits_[0] |= 0x00000400u;
2312}
Bo Yang5db21732015-05-21 14:28:59 -07002313void FileDescriptorProto::clear_has_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002314 _has_bits_[0] &= ~0x00000400u;
2315}
Bo Yang5db21732015-05-21 14:28:59 -07002316void FileDescriptorProto::clear_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002317 if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear();
2318 clear_has_source_code_info();
2319}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002320const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002321 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info)
2322 return source_code_info_ != NULL ? *source_code_info_ : *default_instance_->source_code_info_;
2323}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002324::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002325 set_has_source_code_info();
2326 if (source_code_info_ == NULL) {
2327 source_code_info_ = new ::google::protobuf::SourceCodeInfo;
2328 }
2329 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info)
2330 return source_code_info_;
2331}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002332::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002333 clear_has_source_code_info();
2334 ::google::protobuf::SourceCodeInfo* temp = source_code_info_;
2335 source_code_info_ = NULL;
2336 return temp;
2337}
Feng Xiaoeee38b02015-08-22 18:25:48 -07002338void FileDescriptorProto::set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info) {
Jisi Liu885b6122015-02-28 14:51:22 -08002339 delete source_code_info_;
2340 source_code_info_ = source_code_info;
2341 if (source_code_info) {
2342 set_has_source_code_info();
2343 } else {
2344 clear_has_source_code_info();
2345 }
2346 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info)
2347}
2348
2349// optional string syntax = 12;
Bo Yang5db21732015-05-21 14:28:59 -07002350bool FileDescriptorProto::has_syntax() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002351 return (_has_bits_[0] & 0x00000800u) != 0;
2352}
Bo Yang5db21732015-05-21 14:28:59 -07002353void FileDescriptorProto::set_has_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002354 _has_bits_[0] |= 0x00000800u;
2355}
Bo Yang5db21732015-05-21 14:28:59 -07002356void FileDescriptorProto::clear_has_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002357 _has_bits_[0] &= ~0x00000800u;
2358}
Bo Yang5db21732015-05-21 14:28:59 -07002359void FileDescriptorProto::clear_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002360 syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2361 clear_has_syntax();
2362}
2363 const ::std::string& FileDescriptorProto::syntax() const {
2364 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax)
2365 return syntax_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2366}
2367 void FileDescriptorProto::set_syntax(const ::std::string& value) {
2368 set_has_syntax();
2369 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
2370 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax)
2371}
2372 void FileDescriptorProto::set_syntax(const char* value) {
2373 set_has_syntax();
2374 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
2375 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax)
2376}
2377 void FileDescriptorProto::set_syntax(const char* value, size_t size) {
2378 set_has_syntax();
2379 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2380 ::std::string(reinterpret_cast<const char*>(value), size));
2381 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax)
2382}
2383 ::std::string* FileDescriptorProto::mutable_syntax() {
2384 set_has_syntax();
2385 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax)
2386 return syntax_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2387}
2388 ::std::string* FileDescriptorProto::release_syntax() {
2389 clear_has_syntax();
2390 return syntax_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2391}
2392 void FileDescriptorProto::set_allocated_syntax(::std::string* syntax) {
2393 if (syntax != NULL) {
2394 set_has_syntax();
2395 } else {
2396 clear_has_syntax();
2397 }
2398 syntax_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), syntax);
2399 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax)
2400}
2401
2402#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00002403
2404// ===================================================================
2405
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002406#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002407const int DescriptorProto_ExtensionRange::kStartFieldNumber;
2408const int DescriptorProto_ExtensionRange::kEndFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002409#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00002410
kenton@google.com573989f2009-10-30 22:02:17 +00002411DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange()
Bo Yang5db21732015-05-21 14:28:59 -07002412 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002413 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00002414 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002415}
2416
kenton@google.com80b1d622009-07-29 01:13:20 +00002417void DescriptorProto_ExtensionRange::InitAsDefaultInstance() {
2418}
kenton@google.com24bf56f2008-09-24 20:31:01 +00002419
kenton@google.com573989f2009-10-30 22:02:17 +00002420DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08002421 : ::google::protobuf::Message(),
2422 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002423 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00002424 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00002425 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002426}
2427
kenton@google.comd37d46d2009-04-25 02:53:47 +00002428void DescriptorProto_ExtensionRange::SharedCtor() {
2429 _cached_size_ = 0;
2430 start_ = 0;
2431 end_ = 0;
2432 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2433}
2434
temporal40ee5512008-07-10 02:12:20 +00002435DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002436 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002437 SharedDtor();
2438}
2439
2440void DescriptorProto_ExtensionRange::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00002441 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002442 }
2443}
2444
kenton@google.comfccb1462009-12-18 02:11:36 +00002445void DescriptorProto_ExtensionRange::SetCachedSize(int size) const {
2446 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2447 _cached_size_ = size;
2448 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2449}
temporal40ee5512008-07-10 02:12:20 +00002450const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002451 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00002452 return DescriptorProto_ExtensionRange_descriptor_;
2453}
2454
kenton@google.com24bf56f2008-09-24 20:31:01 +00002455const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00002456 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
2457 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00002458}
2459
2460DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL;
2461
Feng Xiao6ef984a2014-11-10 17:34:54 -08002462DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08002463 DescriptorProto_ExtensionRange* n = new DescriptorProto_ExtensionRange;
2464 if (arena != NULL) {
2465 arena->Own(n);
2466 }
2467 return n;
temporal40ee5512008-07-10 02:12:20 +00002468}
2469
2470void DescriptorProto_ExtensionRange::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -08002471#define ZR_HELPER_(f) reinterpret_cast<char*>(\
2472 &reinterpret_cast<DescriptorProto_ExtensionRange*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00002473
Jisi Liu885b6122015-02-28 14:51:22 -08002474#define ZR_(first, last) do {\
2475 ::memset(&first, 0,\
2476 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
2477} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00002478
2479 ZR_(start_, end_);
2480
Jisi Liu885b6122015-02-28 14:51:22 -08002481#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00002482#undef ZR_
2483
temporal40ee5512008-07-10 02:12:20 +00002484 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08002485 if (_internal_metadata_.have_unknown_fields()) {
2486 mutable_unknown_fields()->Clear();
2487 }
temporal40ee5512008-07-10 02:12:20 +00002488}
2489
2490bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream(
2491 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002492#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00002493 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002494 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ExtensionRange)
2495 for (;;) {
2496 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2497 tag = p.first;
2498 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00002499 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00002500 // optional int32 start = 1;
2501 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002502 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002503 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2504 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2505 input, &start_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00002506 set_has_start();
kenton@google.comfccb1462009-12-18 02:11:36 +00002507 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002508 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00002509 }
temporal40ee5512008-07-10 02:12:20 +00002510 if (input->ExpectTag(16)) goto parse_end;
2511 break;
2512 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002513
temporal40ee5512008-07-10 02:12:20 +00002514 // optional int32 end = 2;
2515 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002516 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002517 parse_end:
2518 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2519 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2520 input, &end_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00002521 set_has_end();
kenton@google.comfccb1462009-12-18 02:11:36 +00002522 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002523 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00002524 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002525 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00002526 break;
2527 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002528
temporal40ee5512008-07-10 02:12:20 +00002529 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002530 handle_unusual:
2531 if (tag == 0 ||
2532 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002533 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002534 goto success;
temporal40ee5512008-07-10 02:12:20 +00002535 }
2536 DO_(::google::protobuf::internal::WireFormat::SkipField(
2537 input, tag, mutable_unknown_fields()));
2538 break;
2539 }
2540 }
2541 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002542success:
2543 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002544 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002545failure:
2546 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ExtensionRange)
2547 return false;
temporal40ee5512008-07-10 02:12:20 +00002548#undef DO_
2549}
2550
kenton@google.comd37d46d2009-04-25 02:53:47 +00002551void DescriptorProto_ExtensionRange::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00002552 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002553 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002554 // optional int32 start = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002555 if (has_start()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002556 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output);
temporal40ee5512008-07-10 02:12:20 +00002557 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002558
temporal40ee5512008-07-10 02:12:20 +00002559 // optional int32 end = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002560 if (has_end()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002561 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output);
temporal40ee5512008-07-10 02:12:20 +00002562 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002563
Feng Xiao6ef984a2014-11-10 17:34:54 -08002564 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002565 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2566 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00002567 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002568 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002569}
2570
2571::google::protobuf::uint8* DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray(
2572 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002573 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002574 // optional int32 start = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002575 if (has_start()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002576 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002577 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002578
kenton@google.comd37d46d2009-04-25 02:53:47 +00002579 // optional int32 end = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002580 if (has_end()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002581 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002582 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002583
Feng Xiao6ef984a2014-11-10 17:34:54 -08002584 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002585 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2586 unknown_fields(), target);
2587 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002588 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002589 return target;
temporal40ee5512008-07-10 02:12:20 +00002590}
2591
2592int DescriptorProto_ExtensionRange::ByteSize() const {
2593 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002594
Austin Schuh307af622015-06-05 22:46:01 -07002595 if (_has_bits_[0 / 32] & 3u) {
temporal40ee5512008-07-10 02:12:20 +00002596 // optional int32 start = 1;
2597 if (has_start()) {
2598 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002599 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00002600 this->start());
2601 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002602
temporal40ee5512008-07-10 02:12:20 +00002603 // optional int32 end = 2;
2604 if (has_end()) {
2605 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002606 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00002607 this->end());
2608 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002609
temporal40ee5512008-07-10 02:12:20 +00002610 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08002611 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00002612 total_size +=
2613 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2614 unknown_fields());
2615 }
kenton@google.comfccb1462009-12-18 02:11:36 +00002616 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00002617 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00002618 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00002619 return total_size;
2620}
2621
2622void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08002623 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07002624 const DescriptorProto_ExtensionRange* source =
2625 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ExtensionRange>(
2626 &from);
temporal40ee5512008-07-10 02:12:20 +00002627 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00002628 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00002629 } else {
2630 MergeFrom(*source);
2631 }
2632}
2633
2634void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08002635 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00002636 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002637 if (from.has_start()) {
temporal40ee5512008-07-10 02:12:20 +00002638 set_start(from.start());
2639 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002640 if (from.has_end()) {
temporal40ee5512008-07-10 02:12:20 +00002641 set_end(from.end());
2642 }
2643 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08002644 if (from._internal_metadata_.have_unknown_fields()) {
2645 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2646 }
temporal40ee5512008-07-10 02:12:20 +00002647}
2648
2649void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) {
2650 if (&from == this) return;
2651 Clear();
2652 MergeFrom(from);
2653}
2654
2655void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) {
2656 if (&from == this) return;
2657 Clear();
2658 MergeFrom(from);
2659}
2660
kenton@google.comceb561d2009-06-25 19:05:36 +00002661bool DescriptorProto_ExtensionRange::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002662
kenton@google.comceb561d2009-06-25 19:05:36 +00002663 return true;
2664}
2665
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002666void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08002667 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08002668 InternalSwap(other);
2669}
2670void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) {
2671 std::swap(start_, other->start_);
2672 std::swap(end_, other->end_);
2673 std::swap(_has_bits_[0], other->_has_bits_[0]);
2674 _internal_metadata_.Swap(&other->_internal_metadata_);
2675 std::swap(_cached_size_, other->_cached_size_);
2676}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002677
kenton@google.com80b1d622009-07-29 01:13:20 +00002678::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const {
2679 protobuf_AssignDescriptorsOnce();
2680 ::google::protobuf::Metadata metadata;
2681 metadata.descriptor = DescriptorProto_ExtensionRange_descriptor_;
2682 metadata.reflection = DescriptorProto_ExtensionRange_reflection_;
2683 return metadata;
temporal40ee5512008-07-10 02:12:20 +00002684}
2685
temporal40ee5512008-07-10 02:12:20 +00002686
2687// -------------------------------------------------------------------
2688
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002689#if !defined(_MSC_VER) || _MSC_VER >= 1900
Bo Yang5db21732015-05-21 14:28:59 -07002690const int DescriptorProto_ReservedRange::kStartFieldNumber;
2691const int DescriptorProto_ReservedRange::kEndFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002692#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Bo Yang5db21732015-05-21 14:28:59 -07002693
2694DescriptorProto_ReservedRange::DescriptorProto_ReservedRange()
2695 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
2696 SharedCtor();
2697 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ReservedRange)
2698}
2699
2700void DescriptorProto_ReservedRange::InitAsDefaultInstance() {
2701}
2702
2703DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from)
2704 : ::google::protobuf::Message(),
2705 _internal_metadata_(NULL) {
2706 SharedCtor();
2707 MergeFrom(from);
2708 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange)
2709}
2710
2711void DescriptorProto_ReservedRange::SharedCtor() {
2712 _cached_size_ = 0;
2713 start_ = 0;
2714 end_ = 0;
2715 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2716}
2717
2718DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() {
2719 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ReservedRange)
2720 SharedDtor();
2721}
2722
2723void DescriptorProto_ReservedRange::SharedDtor() {
2724 if (this != default_instance_) {
2725 }
2726}
2727
2728void DescriptorProto_ReservedRange::SetCachedSize(int size) const {
2729 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2730 _cached_size_ = size;
2731 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2732}
2733const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange::descriptor() {
2734 protobuf_AssignDescriptorsOnce();
2735 return DescriptorProto_ReservedRange_descriptor_;
2736}
2737
2738const DescriptorProto_ReservedRange& DescriptorProto_ReservedRange::default_instance() {
2739 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
2740 return *default_instance_;
2741}
2742
2743DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::default_instance_ = NULL;
2744
2745DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::New(::google::protobuf::Arena* arena) const {
2746 DescriptorProto_ReservedRange* n = new DescriptorProto_ReservedRange;
2747 if (arena != NULL) {
2748 arena->Own(n);
2749 }
2750 return n;
2751}
2752
2753void DescriptorProto_ReservedRange::Clear() {
2754#define ZR_HELPER_(f) reinterpret_cast<char*>(\
2755 &reinterpret_cast<DescriptorProto_ReservedRange*>(16)->f)
2756
2757#define ZR_(first, last) do {\
2758 ::memset(&first, 0,\
2759 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
2760} while (0)
2761
2762 ZR_(start_, end_);
2763
2764#undef ZR_HELPER_
2765#undef ZR_
2766
2767 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2768 if (_internal_metadata_.have_unknown_fields()) {
2769 mutable_unknown_fields()->Clear();
2770 }
2771}
2772
2773bool DescriptorProto_ReservedRange::MergePartialFromCodedStream(
2774 ::google::protobuf::io::CodedInputStream* input) {
2775#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
2776 ::google::protobuf::uint32 tag;
2777 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ReservedRange)
2778 for (;;) {
2779 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2780 tag = p.first;
2781 if (!p.second) goto handle_unusual;
2782 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2783 // optional int32 start = 1;
2784 case 1: {
2785 if (tag == 8) {
2786 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2787 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2788 input, &start_)));
2789 set_has_start();
2790 } else {
2791 goto handle_unusual;
2792 }
2793 if (input->ExpectTag(16)) goto parse_end;
2794 break;
2795 }
2796
2797 // optional int32 end = 2;
2798 case 2: {
2799 if (tag == 16) {
2800 parse_end:
2801 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2802 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2803 input, &end_)));
2804 set_has_end();
2805 } else {
2806 goto handle_unusual;
2807 }
2808 if (input->ExpectAtEnd()) goto success;
2809 break;
2810 }
2811
2812 default: {
2813 handle_unusual:
2814 if (tag == 0 ||
2815 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2816 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2817 goto success;
2818 }
2819 DO_(::google::protobuf::internal::WireFormat::SkipField(
2820 input, tag, mutable_unknown_fields()));
2821 break;
2822 }
2823 }
2824 }
2825success:
2826 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ReservedRange)
2827 return true;
2828failure:
2829 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ReservedRange)
2830 return false;
2831#undef DO_
2832}
2833
2834void DescriptorProto_ReservedRange::SerializeWithCachedSizes(
2835 ::google::protobuf::io::CodedOutputStream* output) const {
2836 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ReservedRange)
2837 // optional int32 start = 1;
2838 if (has_start()) {
2839 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output);
2840 }
2841
2842 // optional int32 end = 2;
2843 if (has_end()) {
2844 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output);
2845 }
2846
2847 if (_internal_metadata_.have_unknown_fields()) {
2848 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2849 unknown_fields(), output);
2850 }
2851 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange)
2852}
2853
2854::google::protobuf::uint8* DescriptorProto_ReservedRange::SerializeWithCachedSizesToArray(
2855 ::google::protobuf::uint8* target) const {
2856 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange)
2857 // optional int32 start = 1;
2858 if (has_start()) {
2859 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target);
2860 }
2861
2862 // optional int32 end = 2;
2863 if (has_end()) {
2864 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target);
2865 }
2866
2867 if (_internal_metadata_.have_unknown_fields()) {
2868 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2869 unknown_fields(), target);
2870 }
2871 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange)
2872 return target;
2873}
2874
2875int DescriptorProto_ReservedRange::ByteSize() const {
2876 int total_size = 0;
2877
Austin Schuh307af622015-06-05 22:46:01 -07002878 if (_has_bits_[0 / 32] & 3u) {
Bo Yang5db21732015-05-21 14:28:59 -07002879 // optional int32 start = 1;
2880 if (has_start()) {
2881 total_size += 1 +
2882 ::google::protobuf::internal::WireFormatLite::Int32Size(
2883 this->start());
2884 }
2885
2886 // optional int32 end = 2;
2887 if (has_end()) {
2888 total_size += 1 +
2889 ::google::protobuf::internal::WireFormatLite::Int32Size(
2890 this->end());
2891 }
2892
2893 }
2894 if (_internal_metadata_.have_unknown_fields()) {
2895 total_size +=
2896 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2897 unknown_fields());
2898 }
2899 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2900 _cached_size_ = total_size;
2901 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2902 return total_size;
2903}
2904
2905void DescriptorProto_ReservedRange::MergeFrom(const ::google::protobuf::Message& from) {
2906 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2907 const DescriptorProto_ReservedRange* source =
2908 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ReservedRange>(
2909 &from);
2910 if (source == NULL) {
2911 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2912 } else {
2913 MergeFrom(*source);
2914 }
2915}
2916
2917void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) {
2918 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2919 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2920 if (from.has_start()) {
2921 set_start(from.start());
2922 }
2923 if (from.has_end()) {
2924 set_end(from.end());
2925 }
2926 }
2927 if (from._internal_metadata_.have_unknown_fields()) {
2928 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2929 }
2930}
2931
2932void DescriptorProto_ReservedRange::CopyFrom(const ::google::protobuf::Message& from) {
2933 if (&from == this) return;
2934 Clear();
2935 MergeFrom(from);
2936}
2937
2938void DescriptorProto_ReservedRange::CopyFrom(const DescriptorProto_ReservedRange& from) {
2939 if (&from == this) return;
2940 Clear();
2941 MergeFrom(from);
2942}
2943
2944bool DescriptorProto_ReservedRange::IsInitialized() const {
2945
2946 return true;
2947}
2948
2949void DescriptorProto_ReservedRange::Swap(DescriptorProto_ReservedRange* other) {
2950 if (other == this) return;
2951 InternalSwap(other);
2952}
2953void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) {
2954 std::swap(start_, other->start_);
2955 std::swap(end_, other->end_);
2956 std::swap(_has_bits_[0], other->_has_bits_[0]);
2957 _internal_metadata_.Swap(&other->_internal_metadata_);
2958 std::swap(_cached_size_, other->_cached_size_);
2959}
2960
2961::google::protobuf::Metadata DescriptorProto_ReservedRange::GetMetadata() const {
2962 protobuf_AssignDescriptorsOnce();
2963 ::google::protobuf::Metadata metadata;
2964 metadata.descriptor = DescriptorProto_ReservedRange_descriptor_;
2965 metadata.reflection = DescriptorProto_ReservedRange_reflection_;
2966 return metadata;
2967}
2968
2969
2970// -------------------------------------------------------------------
2971
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002972#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002973const int DescriptorProto::kNameFieldNumber;
2974const int DescriptorProto::kFieldFieldNumber;
2975const int DescriptorProto::kExtensionFieldNumber;
2976const int DescriptorProto::kNestedTypeFieldNumber;
2977const int DescriptorProto::kEnumTypeFieldNumber;
2978const int DescriptorProto::kExtensionRangeFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002979const int DescriptorProto::kOneofDeclFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002980const int DescriptorProto::kOptionsFieldNumber;
Bo Yang5db21732015-05-21 14:28:59 -07002981const int DescriptorProto::kReservedRangeFieldNumber;
2982const int DescriptorProto::kReservedNameFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07002983#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00002984
kenton@google.com573989f2009-10-30 22:02:17 +00002985DescriptorProto::DescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07002986 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002987 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00002988 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00002989}
2990
kenton@google.com80b1d622009-07-29 01:13:20 +00002991void DescriptorProto::InitAsDefaultInstance() {
2992 options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00002993}
2994
kenton@google.com573989f2009-10-30 22:02:17 +00002995DescriptorProto::DescriptorProto(const DescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08002996 : ::google::protobuf::Message(),
2997 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002998 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00002999 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00003000 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00003001}
3002
kenton@google.comd37d46d2009-04-25 02:53:47 +00003003void DescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003004 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00003005 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08003006 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00003007 options_ = NULL;
3008 ::memset(_has_bits_, 0, sizeof(_has_bits_));
3009}
3010
temporal40ee5512008-07-10 02:12:20 +00003011DescriptorProto::~DescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003012 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003013 SharedDtor();
3014}
3015
3016void DescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08003017 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00003018 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00003019 delete options_;
3020 }
3021}
3022
kenton@google.comfccb1462009-12-18 02:11:36 +00003023void DescriptorProto::SetCachedSize(int size) const {
3024 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3025 _cached_size_ = size;
3026 GOOGLE_SAFE_CONCURRENT_WRITES_END();
3027}
temporal40ee5512008-07-10 02:12:20 +00003028const ::google::protobuf::Descriptor* DescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003029 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00003030 return DescriptorProto_descriptor_;
3031}
3032
kenton@google.com24bf56f2008-09-24 20:31:01 +00003033const DescriptorProto& DescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00003034 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
3035 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003036}
3037
3038DescriptorProto* DescriptorProto::default_instance_ = NULL;
3039
Feng Xiao6ef984a2014-11-10 17:34:54 -08003040DescriptorProto* DescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08003041 DescriptorProto* n = new DescriptorProto;
3042 if (arena != NULL) {
3043 arena->Own(n);
3044 }
3045 return n;
temporal40ee5512008-07-10 02:12:20 +00003046}
3047
3048void DescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07003049 if (_has_bits_[0 / 32] & 129u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003050 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08003051 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00003052 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003053 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003054 if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
3055 }
3056 }
3057 field_.Clear();
3058 extension_.Clear();
3059 nested_type_.Clear();
3060 enum_type_.Clear();
3061 extension_range_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +00003062 oneof_decl_.Clear();
Bo Yang5db21732015-05-21 14:28:59 -07003063 reserved_range_.Clear();
3064 reserved_name_.Clear();
temporal40ee5512008-07-10 02:12:20 +00003065 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08003066 if (_internal_metadata_.have_unknown_fields()) {
3067 mutable_unknown_fields()->Clear();
3068 }
temporal40ee5512008-07-10 02:12:20 +00003069}
3070
3071bool DescriptorProto::MergePartialFromCodedStream(
3072 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003073#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00003074 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003075 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto)
3076 for (;;) {
3077 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
3078 tag = p.first;
3079 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00003080 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00003081 // optional string name = 1;
3082 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003083 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003084 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3085 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00003086 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00003087 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003088 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003089 "google.protobuf.DescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00003090 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003091 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003092 }
temporal40ee5512008-07-10 02:12:20 +00003093 if (input->ExpectTag(18)) goto parse_field;
3094 break;
3095 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003096
temporal40ee5512008-07-10 02:12:20 +00003097 // repeated .google.protobuf.FieldDescriptorProto field = 2;
3098 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003099 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003100 parse_field:
Bo Yang5db21732015-05-21 14:28:59 -07003101 DO_(input->IncrementRecursionDepth());
3102 parse_loop_field:
3103 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003104 input, add_field()));
3105 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003106 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003107 }
Bo Yang5db21732015-05-21 14:28:59 -07003108 if (input->ExpectTag(18)) goto parse_loop_field;
3109 if (input->ExpectTag(26)) goto parse_loop_nested_type;
3110 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003111 break;
3112 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003113
temporal40ee5512008-07-10 02:12:20 +00003114 // repeated .google.protobuf.DescriptorProto nested_type = 3;
3115 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003116 if (tag == 26) {
Bo Yang5db21732015-05-21 14:28:59 -07003117 DO_(input->IncrementRecursionDepth());
3118 parse_loop_nested_type:
3119 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003120 input, add_nested_type()));
3121 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003122 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003123 }
Bo Yang5db21732015-05-21 14:28:59 -07003124 if (input->ExpectTag(26)) goto parse_loop_nested_type;
3125 if (input->ExpectTag(34)) goto parse_loop_enum_type;
3126 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003127 break;
3128 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003129
temporal40ee5512008-07-10 02:12:20 +00003130 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
3131 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003132 if (tag == 34) {
Bo Yang5db21732015-05-21 14:28:59 -07003133 DO_(input->IncrementRecursionDepth());
3134 parse_loop_enum_type:
3135 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003136 input, add_enum_type()));
3137 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003138 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003139 }
Bo Yang5db21732015-05-21 14:28:59 -07003140 if (input->ExpectTag(34)) goto parse_loop_enum_type;
3141 if (input->ExpectTag(42)) goto parse_loop_extension_range;
3142 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003143 break;
3144 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003145
temporal40ee5512008-07-10 02:12:20 +00003146 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
3147 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003148 if (tag == 42) {
Bo Yang5db21732015-05-21 14:28:59 -07003149 DO_(input->IncrementRecursionDepth());
3150 parse_loop_extension_range:
3151 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003152 input, add_extension_range()));
3153 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003154 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003155 }
Bo Yang5db21732015-05-21 14:28:59 -07003156 if (input->ExpectTag(42)) goto parse_loop_extension_range;
3157 if (input->ExpectTag(50)) goto parse_loop_extension;
3158 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003159 break;
3160 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003161
temporal40ee5512008-07-10 02:12:20 +00003162 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
3163 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003164 if (tag == 50) {
Bo Yang5db21732015-05-21 14:28:59 -07003165 DO_(input->IncrementRecursionDepth());
3166 parse_loop_extension:
3167 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003168 input, add_extension()));
3169 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003170 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003171 }
Bo Yang5db21732015-05-21 14:28:59 -07003172 if (input->ExpectTag(50)) goto parse_loop_extension;
3173 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003174 if (input->ExpectTag(58)) goto parse_options;
3175 break;
3176 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003177
temporal40ee5512008-07-10 02:12:20 +00003178 // optional .google.protobuf.MessageOptions options = 7;
3179 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003180 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003181 parse_options:
3182 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3183 input, mutable_options()));
3184 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003185 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003186 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003187 if (input->ExpectTag(66)) goto parse_oneof_decl;
3188 break;
3189 }
3190
3191 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
3192 case 8: {
3193 if (tag == 66) {
3194 parse_oneof_decl:
Bo Yang5db21732015-05-21 14:28:59 -07003195 DO_(input->IncrementRecursionDepth());
3196 parse_loop_oneof_decl:
3197 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
jieluo@google.com4de8f552014-07-18 00:47:59 +00003198 input, add_oneof_decl()));
3199 } else {
3200 goto handle_unusual;
3201 }
Bo Yang5db21732015-05-21 14:28:59 -07003202 if (input->ExpectTag(66)) goto parse_loop_oneof_decl;
3203 if (input->ExpectTag(74)) goto parse_loop_reserved_range;
3204 input->UnsafeDecrementRecursionDepth();
3205 break;
3206 }
3207
3208 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3209 case 9: {
3210 if (tag == 74) {
3211 DO_(input->IncrementRecursionDepth());
3212 parse_loop_reserved_range:
3213 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
3214 input, add_reserved_range()));
3215 } else {
3216 goto handle_unusual;
3217 }
3218 if (input->ExpectTag(74)) goto parse_loop_reserved_range;
3219 input->UnsafeDecrementRecursionDepth();
3220 if (input->ExpectTag(82)) goto parse_reserved_name;
3221 break;
3222 }
3223
3224 // repeated string reserved_name = 10;
3225 case 10: {
3226 if (tag == 82) {
3227 parse_reserved_name:
3228 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3229 input, this->add_reserved_name()));
3230 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3231 this->reserved_name(this->reserved_name_size() - 1).data(),
3232 this->reserved_name(this->reserved_name_size() - 1).length(),
3233 ::google::protobuf::internal::WireFormat::PARSE,
3234 "google.protobuf.DescriptorProto.reserved_name");
3235 } else {
3236 goto handle_unusual;
3237 }
3238 if (input->ExpectTag(82)) goto parse_reserved_name;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003239 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00003240 break;
3241 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003242
temporal40ee5512008-07-10 02:12:20 +00003243 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003244 handle_unusual:
3245 if (tag == 0 ||
3246 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003247 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003248 goto success;
temporal40ee5512008-07-10 02:12:20 +00003249 }
3250 DO_(::google::protobuf::internal::WireFormat::SkipField(
3251 input, tag, mutable_unknown_fields()));
3252 break;
3253 }
3254 }
3255 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003256success:
3257 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00003258 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003259failure:
3260 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto)
3261 return false;
temporal40ee5512008-07-10 02:12:20 +00003262#undef DO_
3263}
3264
kenton@google.comd37d46d2009-04-25 02:53:47 +00003265void DescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00003266 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003267 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00003268 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003269 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003270 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00003271 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003272 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003273 "google.protobuf.DescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00003274 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00003275 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00003276 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003277
temporal40ee5512008-07-10 02:12:20 +00003278 // repeated .google.protobuf.FieldDescriptorProto field = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08003279 for (unsigned int i = 0, n = this->field_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003280 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003281 2, this->field(i), output);
temporal40ee5512008-07-10 02:12:20 +00003282 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003283
temporal40ee5512008-07-10 02:12:20 +00003284 // repeated .google.protobuf.DescriptorProto nested_type = 3;
Feng Xiaof157a562014-11-14 11:50:31 -08003285 for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003286 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003287 3, this->nested_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00003288 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003289
temporal40ee5512008-07-10 02:12:20 +00003290 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08003291 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003292 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003293 4, this->enum_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00003294 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003295
temporal40ee5512008-07-10 02:12:20 +00003296 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08003297 for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003298 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003299 5, this->extension_range(i), output);
temporal40ee5512008-07-10 02:12:20 +00003300 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003301
temporal40ee5512008-07-10 02:12:20 +00003302 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08003303 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003304 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003305 6, this->extension(i), output);
temporal40ee5512008-07-10 02:12:20 +00003306 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003307
temporal40ee5512008-07-10 02:12:20 +00003308 // optional .google.protobuf.MessageOptions options = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003309 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003310 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08003311 7, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00003312 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003313
jieluo@google.com4de8f552014-07-18 00:47:59 +00003314 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Feng Xiaof157a562014-11-14 11:50:31 -08003315 for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003316 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3317 8, this->oneof_decl(i), output);
3318 }
3319
Bo Yang5db21732015-05-21 14:28:59 -07003320 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3321 for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) {
3322 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3323 9, this->reserved_range(i), output);
3324 }
3325
3326 // repeated string reserved_name = 10;
3327 for (int i = 0; i < this->reserved_name_size(); i++) {
Jisi Liu4c663d82015-08-25 17:03:05 -07003328 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3329 this->reserved_name(i).data(), this->reserved_name(i).length(),
3330 ::google::protobuf::internal::WireFormat::SERIALIZE,
3331 "google.protobuf.DescriptorProto.reserved_name");
Bo Yang5db21732015-05-21 14:28:59 -07003332 ::google::protobuf::internal::WireFormatLite::WriteString(
3333 10, this->reserved_name(i), output);
3334 }
3335
Feng Xiao6ef984a2014-11-10 17:34:54 -08003336 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003337 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3338 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00003339 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003340 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003341}
3342
3343::google::protobuf::uint8* DescriptorProto::SerializeWithCachedSizesToArray(
3344 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003345 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003346 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003347 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003348 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00003349 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003350 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003351 "google.protobuf.DescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00003352 target =
3353 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3354 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003355 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003356
kenton@google.comd37d46d2009-04-25 02:53:47 +00003357 // repeated .google.protobuf.FieldDescriptorProto field = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08003358 for (unsigned int i = 0, n = this->field_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003359 target = ::google::protobuf::internal::WireFormatLite::
3360 WriteMessageNoVirtualToArray(
3361 2, this->field(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003362 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003363
kenton@google.comd37d46d2009-04-25 02:53:47 +00003364 // repeated .google.protobuf.DescriptorProto nested_type = 3;
Feng Xiaof157a562014-11-14 11:50:31 -08003365 for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003366 target = ::google::protobuf::internal::WireFormatLite::
3367 WriteMessageNoVirtualToArray(
3368 3, this->nested_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003369 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003370
kenton@google.comd37d46d2009-04-25 02:53:47 +00003371 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08003372 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003373 target = ::google::protobuf::internal::WireFormatLite::
3374 WriteMessageNoVirtualToArray(
3375 4, this->enum_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003376 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003377
kenton@google.comd37d46d2009-04-25 02:53:47 +00003378 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08003379 for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003380 target = ::google::protobuf::internal::WireFormatLite::
3381 WriteMessageNoVirtualToArray(
3382 5, this->extension_range(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003383 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003384
kenton@google.comd37d46d2009-04-25 02:53:47 +00003385 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08003386 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003387 target = ::google::protobuf::internal::WireFormatLite::
3388 WriteMessageNoVirtualToArray(
3389 6, this->extension(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003390 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003391
kenton@google.comd37d46d2009-04-25 02:53:47 +00003392 // optional .google.protobuf.MessageOptions options = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003393 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003394 target = ::google::protobuf::internal::WireFormatLite::
3395 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08003396 7, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003397 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003398
jieluo@google.com4de8f552014-07-18 00:47:59 +00003399 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Feng Xiaof157a562014-11-14 11:50:31 -08003400 for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003401 target = ::google::protobuf::internal::WireFormatLite::
3402 WriteMessageNoVirtualToArray(
3403 8, this->oneof_decl(i), target);
3404 }
3405
Bo Yang5db21732015-05-21 14:28:59 -07003406 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3407 for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) {
3408 target = ::google::protobuf::internal::WireFormatLite::
3409 WriteMessageNoVirtualToArray(
3410 9, this->reserved_range(i), target);
3411 }
3412
3413 // repeated string reserved_name = 10;
3414 for (int i = 0; i < this->reserved_name_size(); i++) {
3415 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3416 this->reserved_name(i).data(), this->reserved_name(i).length(),
3417 ::google::protobuf::internal::WireFormat::SERIALIZE,
3418 "google.protobuf.DescriptorProto.reserved_name");
3419 target = ::google::protobuf::internal::WireFormatLite::
3420 WriteStringToArray(10, this->reserved_name(i), target);
3421 }
3422
Feng Xiao6ef984a2014-11-10 17:34:54 -08003423 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003424 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3425 unknown_fields(), target);
3426 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003427 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003428 return target;
temporal40ee5512008-07-10 02:12:20 +00003429}
3430
3431int DescriptorProto::ByteSize() const {
3432 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003433
Austin Schuh307af622015-06-05 22:46:01 -07003434 if (_has_bits_[0 / 32] & 129u) {
temporal40ee5512008-07-10 02:12:20 +00003435 // optional string name = 1;
3436 if (has_name()) {
3437 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003438 ::google::protobuf::internal::WireFormatLite::StringSize(
3439 this->name());
temporal40ee5512008-07-10 02:12:20 +00003440 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003441
temporal40ee5512008-07-10 02:12:20 +00003442 // optional .google.protobuf.MessageOptions options = 7;
3443 if (has_options()) {
3444 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003445 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08003446 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00003447 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003448
temporal40ee5512008-07-10 02:12:20 +00003449 }
3450 // repeated .google.protobuf.FieldDescriptorProto field = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003451 total_size += 1 * this->field_size();
3452 for (int i = 0; i < this->field_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003453 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003454 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003455 this->field(i));
3456 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003457
temporal40ee5512008-07-10 02:12:20 +00003458 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003459 total_size += 1 * this->extension_size();
3460 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003461 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003462 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003463 this->extension(i));
3464 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003465
temporal40ee5512008-07-10 02:12:20 +00003466 // repeated .google.protobuf.DescriptorProto nested_type = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003467 total_size += 1 * this->nested_type_size();
3468 for (int i = 0; i < this->nested_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003469 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003470 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003471 this->nested_type(i));
3472 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003473
temporal40ee5512008-07-10 02:12:20 +00003474 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003475 total_size += 1 * this->enum_type_size();
3476 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003477 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003478 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003479 this->enum_type(i));
3480 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003481
temporal40ee5512008-07-10 02:12:20 +00003482 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003483 total_size += 1 * this->extension_range_size();
3484 for (int i = 0; i < this->extension_range_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003485 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003486 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003487 this->extension_range(i));
3488 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003489
jieluo@google.com4de8f552014-07-18 00:47:59 +00003490 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
3491 total_size += 1 * this->oneof_decl_size();
3492 for (int i = 0; i < this->oneof_decl_size(); i++) {
3493 total_size +=
3494 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
3495 this->oneof_decl(i));
3496 }
3497
Bo Yang5db21732015-05-21 14:28:59 -07003498 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3499 total_size += 1 * this->reserved_range_size();
3500 for (int i = 0; i < this->reserved_range_size(); i++) {
3501 total_size +=
3502 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
3503 this->reserved_range(i));
3504 }
3505
3506 // repeated string reserved_name = 10;
3507 total_size += 1 * this->reserved_name_size();
3508 for (int i = 0; i < this->reserved_name_size(); i++) {
3509 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
3510 this->reserved_name(i));
3511 }
3512
Feng Xiao6ef984a2014-11-10 17:34:54 -08003513 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00003514 total_size +=
3515 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3516 unknown_fields());
3517 }
kenton@google.comfccb1462009-12-18 02:11:36 +00003518 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00003519 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00003520 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00003521 return total_size;
3522}
3523
3524void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08003525 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07003526 const DescriptorProto* source =
3527 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto>(
3528 &from);
temporal40ee5512008-07-10 02:12:20 +00003529 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003530 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003531 } else {
3532 MergeFrom(*source);
3533 }
3534}
3535
3536void DescriptorProto::MergeFrom(const DescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08003537 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00003538 field_.MergeFrom(from.field_);
3539 extension_.MergeFrom(from.extension_);
3540 nested_type_.MergeFrom(from.nested_type_);
3541 enum_type_.MergeFrom(from.enum_type_);
3542 extension_range_.MergeFrom(from.extension_range_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00003543 oneof_decl_.MergeFrom(from.oneof_decl_);
Bo Yang5db21732015-05-21 14:28:59 -07003544 reserved_range_.MergeFrom(from.reserved_range_);
3545 reserved_name_.MergeFrom(from.reserved_name_);
temporal40ee5512008-07-10 02:12:20 +00003546 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003547 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08003548 set_has_name();
3549 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00003550 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003551 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003552 mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options());
3553 }
3554 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08003555 if (from._internal_metadata_.have_unknown_fields()) {
3556 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3557 }
temporal40ee5512008-07-10 02:12:20 +00003558}
3559
3560void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
3561 if (&from == this) return;
3562 Clear();
3563 MergeFrom(from);
3564}
3565
3566void DescriptorProto::CopyFrom(const DescriptorProto& from) {
3567 if (&from == this) return;
3568 Clear();
3569 MergeFrom(from);
3570}
3571
3572bool DescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003573
jieluo@google.com4de8f552014-07-18 00:47:59 +00003574 if (!::google::protobuf::internal::AllAreInitialized(this->field())) return false;
3575 if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false;
3576 if (!::google::protobuf::internal::AllAreInitialized(this->nested_type())) return false;
3577 if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003578 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08003579 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003580 }
temporal40ee5512008-07-10 02:12:20 +00003581 return true;
3582}
3583
kenton@google.comceb561d2009-06-25 19:05:36 +00003584void DescriptorProto::Swap(DescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08003585 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08003586 InternalSwap(other);
3587}
3588void DescriptorProto::InternalSwap(DescriptorProto* other) {
3589 name_.Swap(&other->name_);
3590 field_.UnsafeArenaSwap(&other->field_);
3591 extension_.UnsafeArenaSwap(&other->extension_);
3592 nested_type_.UnsafeArenaSwap(&other->nested_type_);
3593 enum_type_.UnsafeArenaSwap(&other->enum_type_);
3594 extension_range_.UnsafeArenaSwap(&other->extension_range_);
3595 oneof_decl_.UnsafeArenaSwap(&other->oneof_decl_);
3596 std::swap(options_, other->options_);
Bo Yang5db21732015-05-21 14:28:59 -07003597 reserved_range_.UnsafeArenaSwap(&other->reserved_range_);
3598 reserved_name_.UnsafeArenaSwap(&other->reserved_name_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08003599 std::swap(_has_bits_[0], other->_has_bits_[0]);
3600 _internal_metadata_.Swap(&other->_internal_metadata_);
3601 std::swap(_cached_size_, other->_cached_size_);
3602}
kenton@google.comceb561d2009-06-25 19:05:36 +00003603
kenton@google.com80b1d622009-07-29 01:13:20 +00003604::google::protobuf::Metadata DescriptorProto::GetMetadata() const {
3605 protobuf_AssignDescriptorsOnce();
3606 ::google::protobuf::Metadata metadata;
3607 metadata.descriptor = DescriptorProto_descriptor_;
3608 metadata.reflection = DescriptorProto_reflection_;
3609 return metadata;
temporal40ee5512008-07-10 02:12:20 +00003610}
3611
Jisi Liu885b6122015-02-28 14:51:22 -08003612#if PROTOBUF_INLINE_NOT_IN_HEADERS
3613// DescriptorProto_ExtensionRange
3614
3615// optional int32 start = 1;
Bo Yang5db21732015-05-21 14:28:59 -07003616bool DescriptorProto_ExtensionRange::has_start() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003617 return (_has_bits_[0] & 0x00000001u) != 0;
3618}
Bo Yang5db21732015-05-21 14:28:59 -07003619void DescriptorProto_ExtensionRange::set_has_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003620 _has_bits_[0] |= 0x00000001u;
3621}
Bo Yang5db21732015-05-21 14:28:59 -07003622void DescriptorProto_ExtensionRange::clear_has_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003623 _has_bits_[0] &= ~0x00000001u;
3624}
Bo Yang5db21732015-05-21 14:28:59 -07003625void DescriptorProto_ExtensionRange::clear_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003626 start_ = 0;
3627 clear_has_start();
3628}
3629 ::google::protobuf::int32 DescriptorProto_ExtensionRange::start() const {
3630 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start)
3631 return start_;
3632}
3633 void DescriptorProto_ExtensionRange::set_start(::google::protobuf::int32 value) {
3634 set_has_start();
3635 start_ = value;
3636 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start)
3637}
3638
3639// optional int32 end = 2;
Bo Yang5db21732015-05-21 14:28:59 -07003640bool DescriptorProto_ExtensionRange::has_end() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003641 return (_has_bits_[0] & 0x00000002u) != 0;
3642}
Bo Yang5db21732015-05-21 14:28:59 -07003643void DescriptorProto_ExtensionRange::set_has_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003644 _has_bits_[0] |= 0x00000002u;
3645}
Bo Yang5db21732015-05-21 14:28:59 -07003646void DescriptorProto_ExtensionRange::clear_has_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003647 _has_bits_[0] &= ~0x00000002u;
3648}
Bo Yang5db21732015-05-21 14:28:59 -07003649void DescriptorProto_ExtensionRange::clear_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003650 end_ = 0;
3651 clear_has_end();
3652}
3653 ::google::protobuf::int32 DescriptorProto_ExtensionRange::end() const {
3654 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end)
3655 return end_;
3656}
3657 void DescriptorProto_ExtensionRange::set_end(::google::protobuf::int32 value) {
3658 set_has_end();
3659 end_ = value;
3660 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end)
3661}
3662
3663// -------------------------------------------------------------------
3664
Bo Yang5db21732015-05-21 14:28:59 -07003665// DescriptorProto_ReservedRange
3666
3667// optional int32 start = 1;
3668bool DescriptorProto_ReservedRange::has_start() const {
3669 return (_has_bits_[0] & 0x00000001u) != 0;
3670}
3671void DescriptorProto_ReservedRange::set_has_start() {
3672 _has_bits_[0] |= 0x00000001u;
3673}
3674void DescriptorProto_ReservedRange::clear_has_start() {
3675 _has_bits_[0] &= ~0x00000001u;
3676}
3677void DescriptorProto_ReservedRange::clear_start() {
3678 start_ = 0;
3679 clear_has_start();
3680}
3681 ::google::protobuf::int32 DescriptorProto_ReservedRange::start() const {
3682 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start)
3683 return start_;
3684}
3685 void DescriptorProto_ReservedRange::set_start(::google::protobuf::int32 value) {
3686 set_has_start();
3687 start_ = value;
3688 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start)
3689}
3690
3691// optional int32 end = 2;
3692bool DescriptorProto_ReservedRange::has_end() const {
3693 return (_has_bits_[0] & 0x00000002u) != 0;
3694}
3695void DescriptorProto_ReservedRange::set_has_end() {
3696 _has_bits_[0] |= 0x00000002u;
3697}
3698void DescriptorProto_ReservedRange::clear_has_end() {
3699 _has_bits_[0] &= ~0x00000002u;
3700}
3701void DescriptorProto_ReservedRange::clear_end() {
3702 end_ = 0;
3703 clear_has_end();
3704}
3705 ::google::protobuf::int32 DescriptorProto_ReservedRange::end() const {
3706 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end)
3707 return end_;
3708}
3709 void DescriptorProto_ReservedRange::set_end(::google::protobuf::int32 value) {
3710 set_has_end();
3711 end_ = value;
3712 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end)
3713}
3714
3715// -------------------------------------------------------------------
3716
Jisi Liu885b6122015-02-28 14:51:22 -08003717// DescriptorProto
3718
3719// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07003720bool DescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003721 return (_has_bits_[0] & 0x00000001u) != 0;
3722}
Bo Yang5db21732015-05-21 14:28:59 -07003723void DescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003724 _has_bits_[0] |= 0x00000001u;
3725}
Bo Yang5db21732015-05-21 14:28:59 -07003726void DescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003727 _has_bits_[0] &= ~0x00000001u;
3728}
Bo Yang5db21732015-05-21 14:28:59 -07003729void DescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003730 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3731 clear_has_name();
3732}
3733 const ::std::string& DescriptorProto::name() const {
3734 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name)
3735 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3736}
3737 void DescriptorProto::set_name(const ::std::string& value) {
3738 set_has_name();
3739 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
3740 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name)
3741}
3742 void DescriptorProto::set_name(const char* value) {
3743 set_has_name();
3744 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
3745 // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name)
3746}
3747 void DescriptorProto::set_name(const char* value, size_t size) {
3748 set_has_name();
3749 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
3750 ::std::string(reinterpret_cast<const char*>(value), size));
3751 // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name)
3752}
3753 ::std::string* DescriptorProto::mutable_name() {
3754 set_has_name();
3755 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name)
3756 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3757}
3758 ::std::string* DescriptorProto::release_name() {
3759 clear_has_name();
3760 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3761}
3762 void DescriptorProto::set_allocated_name(::std::string* name) {
3763 if (name != NULL) {
3764 set_has_name();
3765 } else {
3766 clear_has_name();
3767 }
3768 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
3769 // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name)
3770}
3771
3772// repeated .google.protobuf.FieldDescriptorProto field = 2;
Bo Yang5db21732015-05-21 14:28:59 -07003773int DescriptorProto::field_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003774 return field_.size();
3775}
Bo Yang5db21732015-05-21 14:28:59 -07003776void DescriptorProto::clear_field() {
Jisi Liu885b6122015-02-28 14:51:22 -08003777 field_.Clear();
3778}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003779const ::google::protobuf::FieldDescriptorProto& DescriptorProto::field(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003780 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field)
3781 return field_.Get(index);
3782}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003783::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_field(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003784 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.field)
3785 return field_.Mutable(index);
3786}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003787::google::protobuf::FieldDescriptorProto* DescriptorProto::add_field() {
Jisi Liu885b6122015-02-28 14:51:22 -08003788 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field)
3789 return field_.Add();
3790}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003791::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003792DescriptorProto::mutable_field() {
3793 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field)
3794 return &field_;
3795}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003796const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
3797DescriptorProto::field() const {
3798 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field)
3799 return field_;
3800}
Jisi Liu885b6122015-02-28 14:51:22 -08003801
3802// repeated .google.protobuf.FieldDescriptorProto extension = 6;
Bo Yang5db21732015-05-21 14:28:59 -07003803int DescriptorProto::extension_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003804 return extension_.size();
3805}
Bo Yang5db21732015-05-21 14:28:59 -07003806void DescriptorProto::clear_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08003807 extension_.Clear();
3808}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003809const ::google::protobuf::FieldDescriptorProto& DescriptorProto::extension(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003810 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension)
3811 return extension_.Get(index);
3812}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003813::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003814 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension)
3815 return extension_.Mutable(index);
3816}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003817::google::protobuf::FieldDescriptorProto* DescriptorProto::add_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08003818 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension)
3819 return extension_.Add();
3820}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003821::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003822DescriptorProto::mutable_extension() {
3823 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension)
3824 return &extension_;
3825}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003826const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
3827DescriptorProto::extension() const {
3828 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension)
3829 return extension_;
3830}
Jisi Liu885b6122015-02-28 14:51:22 -08003831
3832// repeated .google.protobuf.DescriptorProto nested_type = 3;
Bo Yang5db21732015-05-21 14:28:59 -07003833int DescriptorProto::nested_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003834 return nested_type_.size();
3835}
Bo Yang5db21732015-05-21 14:28:59 -07003836void DescriptorProto::clear_nested_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003837 nested_type_.Clear();
3838}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003839const ::google::protobuf::DescriptorProto& DescriptorProto::nested_type(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003840 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.nested_type)
3841 return nested_type_.Get(index);
3842}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003843::google::protobuf::DescriptorProto* DescriptorProto::mutable_nested_type(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003844 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.nested_type)
3845 return nested_type_.Mutable(index);
3846}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003847::google::protobuf::DescriptorProto* DescriptorProto::add_nested_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003848 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.nested_type)
3849 return nested_type_.Add();
3850}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003851::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003852DescriptorProto::mutable_nested_type() {
3853 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type)
3854 return &nested_type_;
3855}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003856const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
3857DescriptorProto::nested_type() const {
3858 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type)
3859 return nested_type_;
3860}
Jisi Liu885b6122015-02-28 14:51:22 -08003861
3862// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Bo Yang5db21732015-05-21 14:28:59 -07003863int DescriptorProto::enum_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003864 return enum_type_.size();
3865}
Bo Yang5db21732015-05-21 14:28:59 -07003866void DescriptorProto::clear_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003867 enum_type_.Clear();
3868}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003869const ::google::protobuf::EnumDescriptorProto& DescriptorProto::enum_type(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003870 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.enum_type)
3871 return enum_type_.Get(index);
3872}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003873::google::protobuf::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003874 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.enum_type)
3875 return enum_type_.Mutable(index);
3876}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003877::google::protobuf::EnumDescriptorProto* DescriptorProto::add_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003878 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.enum_type)
3879 return enum_type_.Add();
3880}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003881::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003882DescriptorProto::mutable_enum_type() {
3883 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type)
3884 return &enum_type_;
3885}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003886const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
3887DescriptorProto::enum_type() const {
3888 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type)
3889 return enum_type_;
3890}
Jisi Liu885b6122015-02-28 14:51:22 -08003891
3892// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Bo Yang5db21732015-05-21 14:28:59 -07003893int DescriptorProto::extension_range_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003894 return extension_range_.size();
3895}
Bo Yang5db21732015-05-21 14:28:59 -07003896void DescriptorProto::clear_extension_range() {
Jisi Liu885b6122015-02-28 14:51:22 -08003897 extension_range_.Clear();
3898}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003899const ::google::protobuf::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003900 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension_range)
3901 return extension_range_.Get(index);
3902}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003903::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003904 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension_range)
3905 return extension_range_.Mutable(index);
3906}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003907::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() {
Jisi Liu885b6122015-02-28 14:51:22 -08003908 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension_range)
3909 return extension_range_.Add();
3910}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003911::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >*
Jisi Liu885b6122015-02-28 14:51:22 -08003912DescriptorProto::mutable_extension_range() {
3913 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range)
3914 return &extension_range_;
3915}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003916const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >&
3917DescriptorProto::extension_range() const {
3918 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range)
3919 return extension_range_;
3920}
Jisi Liu885b6122015-02-28 14:51:22 -08003921
3922// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Bo Yang5db21732015-05-21 14:28:59 -07003923int DescriptorProto::oneof_decl_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003924 return oneof_decl_.size();
3925}
Bo Yang5db21732015-05-21 14:28:59 -07003926void DescriptorProto::clear_oneof_decl() {
Jisi Liu885b6122015-02-28 14:51:22 -08003927 oneof_decl_.Clear();
3928}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003929const ::google::protobuf::OneofDescriptorProto& DescriptorProto::oneof_decl(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08003930 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.oneof_decl)
3931 return oneof_decl_.Get(index);
3932}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003933::google::protobuf::OneofDescriptorProto* DescriptorProto::mutable_oneof_decl(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08003934 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.oneof_decl)
3935 return oneof_decl_.Mutable(index);
3936}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003937::google::protobuf::OneofDescriptorProto* DescriptorProto::add_oneof_decl() {
Jisi Liu885b6122015-02-28 14:51:22 -08003938 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.oneof_decl)
3939 return oneof_decl_.Add();
3940}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003941::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08003942DescriptorProto::mutable_oneof_decl() {
3943 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl)
3944 return &oneof_decl_;
3945}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003946const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >&
3947DescriptorProto::oneof_decl() const {
3948 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl)
3949 return oneof_decl_;
3950}
Jisi Liu885b6122015-02-28 14:51:22 -08003951
3952// optional .google.protobuf.MessageOptions options = 7;
Bo Yang5db21732015-05-21 14:28:59 -07003953bool DescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003954 return (_has_bits_[0] & 0x00000080u) != 0;
3955}
Bo Yang5db21732015-05-21 14:28:59 -07003956void DescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003957 _has_bits_[0] |= 0x00000080u;
3958}
Bo Yang5db21732015-05-21 14:28:59 -07003959void DescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003960 _has_bits_[0] &= ~0x00000080u;
3961}
Bo Yang5db21732015-05-21 14:28:59 -07003962void DescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003963 if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
3964 clear_has_options();
3965}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003966const ::google::protobuf::MessageOptions& DescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003967 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options)
3968 return options_ != NULL ? *options_ : *default_instance_->options_;
3969}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003970::google::protobuf::MessageOptions* DescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003971 set_has_options();
3972 if (options_ == NULL) {
3973 options_ = new ::google::protobuf::MessageOptions;
3974 }
3975 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options)
3976 return options_;
3977}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003978::google::protobuf::MessageOptions* DescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003979 clear_has_options();
3980 ::google::protobuf::MessageOptions* temp = options_;
3981 options_ = NULL;
3982 return temp;
3983}
Feng Xiaoeee38b02015-08-22 18:25:48 -07003984void DescriptorProto::set_allocated_options(::google::protobuf::MessageOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08003985 delete options_;
3986 options_ = options;
3987 if (options) {
3988 set_has_options();
3989 } else {
3990 clear_has_options();
3991 }
3992 // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options)
3993}
3994
Bo Yang5db21732015-05-21 14:28:59 -07003995// repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3996int DescriptorProto::reserved_range_size() const {
3997 return reserved_range_.size();
3998}
3999void DescriptorProto::clear_reserved_range() {
4000 reserved_range_.Clear();
4001}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004002const ::google::protobuf::DescriptorProto_ReservedRange& DescriptorProto::reserved_range(int index) const {
Bo Yang5db21732015-05-21 14:28:59 -07004003 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_range)
4004 return reserved_range_.Get(index);
4005}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004006::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::mutable_reserved_range(int index) {
Bo Yang5db21732015-05-21 14:28:59 -07004007 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_range)
4008 return reserved_range_.Mutable(index);
4009}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004010::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() {
Bo Yang5db21732015-05-21 14:28:59 -07004011 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_range)
4012 return reserved_range_.Add();
4013}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004014::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >*
Bo Yang5db21732015-05-21 14:28:59 -07004015DescriptorProto::mutable_reserved_range() {
4016 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range)
4017 return &reserved_range_;
4018}
Feng Xiaoeee38b02015-08-22 18:25:48 -07004019const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >&
4020DescriptorProto::reserved_range() const {
4021 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_range)
4022 return reserved_range_;
4023}
Bo Yang5db21732015-05-21 14:28:59 -07004024
4025// repeated string reserved_name = 10;
4026int DescriptorProto::reserved_name_size() const {
4027 return reserved_name_.size();
4028}
4029void DescriptorProto::clear_reserved_name() {
4030 reserved_name_.Clear();
4031}
4032 const ::std::string& DescriptorProto::reserved_name(int index) const {
4033 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name)
4034 return reserved_name_.Get(index);
4035}
4036 ::std::string* DescriptorProto::mutable_reserved_name(int index) {
4037 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name)
4038 return reserved_name_.Mutable(index);
4039}
4040 void DescriptorProto::set_reserved_name(int index, const ::std::string& value) {
4041 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
4042 reserved_name_.Mutable(index)->assign(value);
4043}
4044 void DescriptorProto::set_reserved_name(int index, const char* value) {
4045 reserved_name_.Mutable(index)->assign(value);
4046 // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name)
4047}
4048 void DescriptorProto::set_reserved_name(int index, const char* value, size_t size) {
4049 reserved_name_.Mutable(index)->assign(
4050 reinterpret_cast<const char*>(value), size);
4051 // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name)
4052}
4053 ::std::string* DescriptorProto::add_reserved_name() {
4054 return reserved_name_.Add();
4055}
4056 void DescriptorProto::add_reserved_name(const ::std::string& value) {
4057 reserved_name_.Add()->assign(value);
4058 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
4059}
4060 void DescriptorProto::add_reserved_name(const char* value) {
4061 reserved_name_.Add()->assign(value);
4062 // @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name)
4063}
4064 void DescriptorProto::add_reserved_name(const char* value, size_t size) {
4065 reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size);
4066 // @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name)
4067}
4068 const ::google::protobuf::RepeatedPtrField< ::std::string>&
4069DescriptorProto::reserved_name() const {
4070 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name)
4071 return reserved_name_;
4072}
4073 ::google::protobuf::RepeatedPtrField< ::std::string>*
4074DescriptorProto::mutable_reserved_name() {
4075 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name)
4076 return &reserved_name_;
4077}
4078
Jisi Liu885b6122015-02-28 14:51:22 -08004079#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00004080
4081// ===================================================================
4082
4083const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004084 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004085 return FieldDescriptorProto_Type_descriptor_;
4086}
4087bool FieldDescriptorProto_Type_IsValid(int value) {
4088 switch(value) {
4089 case 1:
4090 case 2:
4091 case 3:
4092 case 4:
4093 case 5:
4094 case 6:
4095 case 7:
4096 case 8:
4097 case 9:
4098 case 10:
4099 case 11:
4100 case 12:
4101 case 13:
4102 case 14:
4103 case 15:
4104 case 16:
4105 case 17:
4106 case 18:
4107 return true;
4108 default:
4109 return false;
4110 }
4111}
4112
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004113#if !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00004114const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE;
4115const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT;
4116const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64;
4117const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64;
4118const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32;
4119const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64;
4120const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32;
4121const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL;
4122const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING;
4123const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP;
4124const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE;
4125const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES;
4126const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32;
4127const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM;
4128const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32;
4129const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64;
4130const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32;
4131const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64;
4132const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN;
4133const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00004134const int FieldDescriptorProto::Type_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004135#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00004136const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004137 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004138 return FieldDescriptorProto_Label_descriptor_;
4139}
4140bool FieldDescriptorProto_Label_IsValid(int value) {
4141 switch(value) {
4142 case 1:
4143 case 2:
4144 case 3:
4145 return true;
4146 default:
4147 return false;
4148 }
4149}
4150
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004151#if !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00004152const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL;
4153const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED;
4154const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED;
4155const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN;
4156const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00004157const int FieldDescriptorProto::Label_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004158#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
4159#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004160const int FieldDescriptorProto::kNameFieldNumber;
4161const int FieldDescriptorProto::kNumberFieldNumber;
4162const int FieldDescriptorProto::kLabelFieldNumber;
4163const int FieldDescriptorProto::kTypeFieldNumber;
4164const int FieldDescriptorProto::kTypeNameFieldNumber;
4165const int FieldDescriptorProto::kExtendeeFieldNumber;
4166const int FieldDescriptorProto::kDefaultValueFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004167const int FieldDescriptorProto::kOneofIndexFieldNumber;
Jisi Liu46e8ff62015-10-05 11:59:43 -07004168const int FieldDescriptorProto::kJsonNameFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004169const int FieldDescriptorProto::kOptionsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07004170#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00004171
kenton@google.com573989f2009-10-30 22:02:17 +00004172FieldDescriptorProto::FieldDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07004173 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004174 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00004175 // @@protoc_insertion_point(constructor:google.protobuf.FieldDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00004176}
4177
kenton@google.com80b1d622009-07-29 01:13:20 +00004178void FieldDescriptorProto::InitAsDefaultInstance() {
4179 options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00004180}
4181
kenton@google.com573989f2009-10-30 22:02:17 +00004182FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08004183 : ::google::protobuf::Message(),
4184 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004185 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00004186 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00004187 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004188}
4189
kenton@google.comd37d46d2009-04-25 02:53:47 +00004190void FieldDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004191 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00004192 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004193 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00004194 number_ = 0;
4195 label_ = 1;
4196 type_ = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004197 type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4198 extendee_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4199 default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00004200 oneof_index_ = 0;
Jisi Liu46e8ff62015-10-05 11:59:43 -07004201 json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00004202 options_ = NULL;
4203 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4204}
4205
temporal40ee5512008-07-10 02:12:20 +00004206FieldDescriptorProto::~FieldDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004207 // @@protoc_insertion_point(destructor:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004208 SharedDtor();
4209}
4210
4211void FieldDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08004212 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4213 type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4214 extendee_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4215 default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jisi Liu46e8ff62015-10-05 11:59:43 -07004216 json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00004217 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004218 delete options_;
4219 }
4220}
4221
kenton@google.comfccb1462009-12-18 02:11:36 +00004222void FieldDescriptorProto::SetCachedSize(int size) const {
4223 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4224 _cached_size_ = size;
4225 GOOGLE_SAFE_CONCURRENT_WRITES_END();
4226}
temporal40ee5512008-07-10 02:12:20 +00004227const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004228 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004229 return FieldDescriptorProto_descriptor_;
4230}
4231
kenton@google.com24bf56f2008-09-24 20:31:01 +00004232const FieldDescriptorProto& FieldDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00004233 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
4234 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00004235}
4236
4237FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL;
4238
Feng Xiao6ef984a2014-11-10 17:34:54 -08004239FieldDescriptorProto* FieldDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08004240 FieldDescriptorProto* n = new FieldDescriptorProto;
4241 if (arena != NULL) {
4242 arena->Own(n);
4243 }
4244 return n;
temporal40ee5512008-07-10 02:12:20 +00004245}
4246
4247void FieldDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07004248 if (_has_bits_[0 / 32] & 255u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004249 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004250 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004251 }
4252 number_ = 0;
4253 label_ = 1;
4254 type_ = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004255 if (has_type_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004256 type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004257 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004258 if (has_extendee()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004259 extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004260 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004261 if (has_default_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004262 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004263 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004264 oneof_index_ = 0;
4265 }
Jisi Liu46e8ff62015-10-05 11:59:43 -07004266 if (_has_bits_[8 / 32] & 768u) {
4267 if (has_json_name()) {
4268 json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4269 }
4270 if (has_options()) {
4271 if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
4272 }
temporal40ee5512008-07-10 02:12:20 +00004273 }
4274 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08004275 if (_internal_metadata_.have_unknown_fields()) {
4276 mutable_unknown_fields()->Clear();
4277 }
temporal40ee5512008-07-10 02:12:20 +00004278}
4279
4280bool FieldDescriptorProto::MergePartialFromCodedStream(
4281 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004282#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00004283 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004284 // @@protoc_insertion_point(parse_start:google.protobuf.FieldDescriptorProto)
4285 for (;;) {
4286 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
4287 tag = p.first;
4288 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00004289 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00004290 // optional string name = 1;
4291 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004292 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004293 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4294 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004295 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004296 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004297 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004298 "google.protobuf.FieldDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00004299 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004300 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004301 }
temporal40ee5512008-07-10 02:12:20 +00004302 if (input->ExpectTag(18)) goto parse_extendee;
4303 break;
4304 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004305
temporal40ee5512008-07-10 02:12:20 +00004306 // optional string extendee = 2;
4307 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004308 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004309 parse_extendee:
4310 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4311 input, this->mutable_extendee()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004312 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004313 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004314 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004315 "google.protobuf.FieldDescriptorProto.extendee");
kenton@google.comfccb1462009-12-18 02:11:36 +00004316 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004317 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004318 }
temporal40ee5512008-07-10 02:12:20 +00004319 if (input->ExpectTag(24)) goto parse_number;
4320 break;
4321 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004322
temporal40ee5512008-07-10 02:12:20 +00004323 // optional int32 number = 3;
4324 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004325 if (tag == 24) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004326 parse_number:
4327 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4328 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
4329 input, &number_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004330 set_has_number();
kenton@google.comfccb1462009-12-18 02:11:36 +00004331 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004332 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004333 }
temporal40ee5512008-07-10 02:12:20 +00004334 if (input->ExpectTag(32)) goto parse_label;
4335 break;
4336 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004337
temporal40ee5512008-07-10 02:12:20 +00004338 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
4339 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004340 if (tag == 32) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004341 parse_label:
4342 int value;
4343 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4344 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
4345 input, &value)));
4346 if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) {
4347 set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value));
4348 } else {
4349 mutable_unknown_fields()->AddVarint(4, value);
4350 }
temporal40ee5512008-07-10 02:12:20 +00004351 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004352 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004353 }
4354 if (input->ExpectTag(40)) goto parse_type;
4355 break;
4356 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004357
temporal40ee5512008-07-10 02:12:20 +00004358 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
4359 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004360 if (tag == 40) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004361 parse_type:
4362 int value;
4363 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4364 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
4365 input, &value)));
4366 if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) {
4367 set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value));
4368 } else {
4369 mutable_unknown_fields()->AddVarint(5, value);
4370 }
temporal40ee5512008-07-10 02:12:20 +00004371 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004372 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004373 }
4374 if (input->ExpectTag(50)) goto parse_type_name;
4375 break;
4376 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004377
temporal40ee5512008-07-10 02:12:20 +00004378 // optional string type_name = 6;
4379 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004380 if (tag == 50) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004381 parse_type_name:
4382 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4383 input, this->mutable_type_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004384 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004385 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004386 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004387 "google.protobuf.FieldDescriptorProto.type_name");
kenton@google.comfccb1462009-12-18 02:11:36 +00004388 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004389 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004390 }
temporal40ee5512008-07-10 02:12:20 +00004391 if (input->ExpectTag(58)) goto parse_default_value;
4392 break;
4393 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004394
temporal40ee5512008-07-10 02:12:20 +00004395 // optional string default_value = 7;
4396 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004397 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004398 parse_default_value:
4399 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4400 input, this->mutable_default_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004401 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004402 this->default_value().data(), this->default_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004403 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004404 "google.protobuf.FieldDescriptorProto.default_value");
kenton@google.comfccb1462009-12-18 02:11:36 +00004405 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004406 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004407 }
temporal40ee5512008-07-10 02:12:20 +00004408 if (input->ExpectTag(66)) goto parse_options;
4409 break;
4410 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004411
temporal40ee5512008-07-10 02:12:20 +00004412 // optional .google.protobuf.FieldOptions options = 8;
4413 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004414 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004415 parse_options:
4416 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
4417 input, mutable_options()));
4418 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004419 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004420 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004421 if (input->ExpectTag(72)) goto parse_oneof_index;
4422 break;
4423 }
4424
4425 // optional int32 oneof_index = 9;
4426 case 9: {
4427 if (tag == 72) {
4428 parse_oneof_index:
4429 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4430 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
4431 input, &oneof_index_)));
4432 set_has_oneof_index();
4433 } else {
4434 goto handle_unusual;
4435 }
Jisi Liu46e8ff62015-10-05 11:59:43 -07004436 if (input->ExpectTag(82)) goto parse_json_name;
4437 break;
4438 }
4439
4440 // optional string json_name = 10;
4441 case 10: {
4442 if (tag == 82) {
4443 parse_json_name:
4444 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4445 input, this->mutable_json_name()));
4446 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4447 this->json_name().data(), this->json_name().length(),
4448 ::google::protobuf::internal::WireFormat::PARSE,
4449 "google.protobuf.FieldDescriptorProto.json_name");
4450 } else {
4451 goto handle_unusual;
4452 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004453 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00004454 break;
4455 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004456
temporal40ee5512008-07-10 02:12:20 +00004457 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004458 handle_unusual:
4459 if (tag == 0 ||
4460 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004461 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004462 goto success;
temporal40ee5512008-07-10 02:12:20 +00004463 }
4464 DO_(::google::protobuf::internal::WireFormat::SkipField(
4465 input, tag, mutable_unknown_fields()));
4466 break;
4467 }
4468 }
4469 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004470success:
4471 // @@protoc_insertion_point(parse_success:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004472 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004473failure:
4474 // @@protoc_insertion_point(parse_failure:google.protobuf.FieldDescriptorProto)
4475 return false;
temporal40ee5512008-07-10 02:12:20 +00004476#undef DO_
4477}
4478
kenton@google.comd37d46d2009-04-25 02:53:47 +00004479void FieldDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00004480 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004481 // @@protoc_insertion_point(serialize_start:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004482 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004483 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004484 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004485 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004486 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004487 "google.protobuf.FieldDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004488 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004489 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00004490 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004491
temporal40ee5512008-07-10 02:12:20 +00004492 // optional string extendee = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004493 if (has_extendee()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004494 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004495 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004496 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004497 "google.protobuf.FieldDescriptorProto.extendee");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004498 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004499 2, this->extendee(), output);
temporal40ee5512008-07-10 02:12:20 +00004500 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004501
temporal40ee5512008-07-10 02:12:20 +00004502 // optional int32 number = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004503 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004504 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output);
temporal40ee5512008-07-10 02:12:20 +00004505 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004506
temporal40ee5512008-07-10 02:12:20 +00004507 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004508 if (has_label()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004509 ::google::protobuf::internal::WireFormatLite::WriteEnum(
4510 4, this->label(), output);
temporal40ee5512008-07-10 02:12:20 +00004511 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004512
temporal40ee5512008-07-10 02:12:20 +00004513 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004514 if (has_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004515 ::google::protobuf::internal::WireFormatLite::WriteEnum(
4516 5, this->type(), output);
temporal40ee5512008-07-10 02:12:20 +00004517 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004518
temporal40ee5512008-07-10 02:12:20 +00004519 // optional string type_name = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004520 if (has_type_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004521 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004522 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004523 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004524 "google.protobuf.FieldDescriptorProto.type_name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004525 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004526 6, this->type_name(), output);
temporal40ee5512008-07-10 02:12:20 +00004527 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004528
temporal40ee5512008-07-10 02:12:20 +00004529 // optional string default_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004530 if (has_default_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004531 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004532 this->default_value().data(), this->default_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004533 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004534 "google.protobuf.FieldDescriptorProto.default_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004535 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004536 7, this->default_value(), output);
temporal40ee5512008-07-10 02:12:20 +00004537 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004538
temporal40ee5512008-07-10 02:12:20 +00004539 // optional .google.protobuf.FieldOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004540 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004541 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08004542 8, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00004543 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004544
jieluo@google.com4de8f552014-07-18 00:47:59 +00004545 // optional int32 oneof_index = 9;
4546 if (has_oneof_index()) {
4547 ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->oneof_index(), output);
4548 }
4549
Jisi Liu46e8ff62015-10-05 11:59:43 -07004550 // optional string json_name = 10;
4551 if (has_json_name()) {
4552 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4553 this->json_name().data(), this->json_name().length(),
4554 ::google::protobuf::internal::WireFormat::SERIALIZE,
4555 "google.protobuf.FieldDescriptorProto.json_name");
4556 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4557 10, this->json_name(), output);
4558 }
4559
Feng Xiao6ef984a2014-11-10 17:34:54 -08004560 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004561 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4562 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00004563 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004564 // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004565}
4566
4567::google::protobuf::uint8* FieldDescriptorProto::SerializeWithCachedSizesToArray(
4568 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004569 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004570 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004571 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004572 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004573 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004574 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004575 "google.protobuf.FieldDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00004576 target =
4577 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4578 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004579 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004580
kenton@google.comd37d46d2009-04-25 02:53:47 +00004581 // optional string extendee = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004582 if (has_extendee()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004583 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004584 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004585 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004586 "google.protobuf.FieldDescriptorProto.extendee");
kenton@google.com80b1d622009-07-29 01:13:20 +00004587 target =
4588 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4589 2, this->extendee(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004590 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004591
kenton@google.comd37d46d2009-04-25 02:53:47 +00004592 // optional int32 number = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004593 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004594 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004595 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004596
kenton@google.comd37d46d2009-04-25 02:53:47 +00004597 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004598 if (has_label()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004599 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4600 4, this->label(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004601 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004602
kenton@google.comd37d46d2009-04-25 02:53:47 +00004603 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004604 if (has_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004605 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4606 5, this->type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004607 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004608
kenton@google.comd37d46d2009-04-25 02:53:47 +00004609 // optional string type_name = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004610 if (has_type_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004611 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004612 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004613 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004614 "google.protobuf.FieldDescriptorProto.type_name");
kenton@google.com80b1d622009-07-29 01:13:20 +00004615 target =
4616 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4617 6, this->type_name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004618 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004619
kenton@google.comd37d46d2009-04-25 02:53:47 +00004620 // optional string default_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004621 if (has_default_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004622 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004623 this->default_value().data(), this->default_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004624 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004625 "google.protobuf.FieldDescriptorProto.default_value");
kenton@google.com80b1d622009-07-29 01:13:20 +00004626 target =
4627 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4628 7, this->default_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004629 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004630
kenton@google.comd37d46d2009-04-25 02:53:47 +00004631 // optional .google.protobuf.FieldOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004632 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004633 target = ::google::protobuf::internal::WireFormatLite::
4634 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08004635 8, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004636 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004637
jieluo@google.com4de8f552014-07-18 00:47:59 +00004638 // optional int32 oneof_index = 9;
4639 if (has_oneof_index()) {
4640 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->oneof_index(), target);
4641 }
4642
Jisi Liu46e8ff62015-10-05 11:59:43 -07004643 // optional string json_name = 10;
4644 if (has_json_name()) {
4645 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4646 this->json_name().data(), this->json_name().length(),
4647 ::google::protobuf::internal::WireFormat::SERIALIZE,
4648 "google.protobuf.FieldDescriptorProto.json_name");
4649 target =
4650 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4651 10, this->json_name(), target);
4652 }
4653
Feng Xiao6ef984a2014-11-10 17:34:54 -08004654 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004655 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
4656 unknown_fields(), target);
4657 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004658 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004659 return target;
temporal40ee5512008-07-10 02:12:20 +00004660}
4661
4662int FieldDescriptorProto::ByteSize() const {
4663 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004664
Austin Schuh307af622015-06-05 22:46:01 -07004665 if (_has_bits_[0 / 32] & 255u) {
temporal40ee5512008-07-10 02:12:20 +00004666 // optional string name = 1;
4667 if (has_name()) {
4668 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004669 ::google::protobuf::internal::WireFormatLite::StringSize(
4670 this->name());
temporal40ee5512008-07-10 02:12:20 +00004671 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004672
temporal40ee5512008-07-10 02:12:20 +00004673 // optional int32 number = 3;
4674 if (has_number()) {
4675 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004676 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00004677 this->number());
4678 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004679
temporal40ee5512008-07-10 02:12:20 +00004680 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
4681 if (has_label()) {
4682 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004683 ::google::protobuf::internal::WireFormatLite::EnumSize(this->label());
temporal40ee5512008-07-10 02:12:20 +00004684 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004685
temporal40ee5512008-07-10 02:12:20 +00004686 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
4687 if (has_type()) {
4688 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004689 ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
temporal40ee5512008-07-10 02:12:20 +00004690 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004691
temporal40ee5512008-07-10 02:12:20 +00004692 // optional string type_name = 6;
4693 if (has_type_name()) {
4694 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004695 ::google::protobuf::internal::WireFormatLite::StringSize(
4696 this->type_name());
temporal40ee5512008-07-10 02:12:20 +00004697 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004698
temporal40ee5512008-07-10 02:12:20 +00004699 // optional string extendee = 2;
4700 if (has_extendee()) {
4701 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004702 ::google::protobuf::internal::WireFormatLite::StringSize(
4703 this->extendee());
temporal40ee5512008-07-10 02:12:20 +00004704 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004705
temporal40ee5512008-07-10 02:12:20 +00004706 // optional string default_value = 7;
4707 if (has_default_value()) {
4708 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004709 ::google::protobuf::internal::WireFormatLite::StringSize(
4710 this->default_value());
temporal40ee5512008-07-10 02:12:20 +00004711 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004712
jieluo@google.com4de8f552014-07-18 00:47:59 +00004713 // optional int32 oneof_index = 9;
4714 if (has_oneof_index()) {
4715 total_size += 1 +
4716 ::google::protobuf::internal::WireFormatLite::Int32Size(
4717 this->oneof_index());
4718 }
4719
4720 }
Jisi Liu46e8ff62015-10-05 11:59:43 -07004721 if (_has_bits_[8 / 32] & 768u) {
4722 // optional string json_name = 10;
4723 if (has_json_name()) {
4724 total_size += 1 +
4725 ::google::protobuf::internal::WireFormatLite::StringSize(
4726 this->json_name());
4727 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004728
Jisi Liu46e8ff62015-10-05 11:59:43 -07004729 // optional .google.protobuf.FieldOptions options = 8;
4730 if (has_options()) {
4731 total_size += 1 +
4732 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
4733 *this->options_);
4734 }
4735
4736 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004737 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00004738 total_size +=
4739 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4740 unknown_fields());
4741 }
kenton@google.comfccb1462009-12-18 02:11:36 +00004742 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00004743 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00004744 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00004745 return total_size;
4746}
4747
4748void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08004749 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07004750 const FieldDescriptorProto* source =
4751 ::google::protobuf::internal::DynamicCastToGenerated<const FieldDescriptorProto>(
4752 &from);
temporal40ee5512008-07-10 02:12:20 +00004753 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00004754 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00004755 } else {
4756 MergeFrom(*source);
4757 }
4758}
4759
4760void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08004761 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00004762 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004763 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004764 set_has_name();
4765 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00004766 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004767 if (from.has_number()) {
temporal40ee5512008-07-10 02:12:20 +00004768 set_number(from.number());
4769 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004770 if (from.has_label()) {
temporal40ee5512008-07-10 02:12:20 +00004771 set_label(from.label());
4772 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004773 if (from.has_type()) {
temporal40ee5512008-07-10 02:12:20 +00004774 set_type(from.type());
4775 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004776 if (from.has_type_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004777 set_has_type_name();
4778 type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_name_);
temporal40ee5512008-07-10 02:12:20 +00004779 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004780 if (from.has_extendee()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004781 set_has_extendee();
4782 extendee_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extendee_);
temporal40ee5512008-07-10 02:12:20 +00004783 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004784 if (from.has_default_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004785 set_has_default_value();
4786 default_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value_);
temporal40ee5512008-07-10 02:12:20 +00004787 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004788 if (from.has_oneof_index()) {
4789 set_oneof_index(from.oneof_index());
4790 }
4791 }
4792 if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
Jisi Liu46e8ff62015-10-05 11:59:43 -07004793 if (from.has_json_name()) {
4794 set_has_json_name();
4795 json_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.json_name_);
4796 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004797 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00004798 mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options());
4799 }
4800 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004801 if (from._internal_metadata_.have_unknown_fields()) {
4802 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4803 }
temporal40ee5512008-07-10 02:12:20 +00004804}
4805
4806void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
4807 if (&from == this) return;
4808 Clear();
4809 MergeFrom(from);
4810}
4811
4812void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
4813 if (&from == this) return;
4814 Clear();
4815 MergeFrom(from);
4816}
4817
kenton@google.comceb561d2009-06-25 19:05:36 +00004818bool FieldDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004819
kenton@google.comceb561d2009-06-25 19:05:36 +00004820 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004821 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00004822 }
4823 return true;
4824}
4825
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004826void FieldDescriptorProto::Swap(FieldDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08004827 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004828 InternalSwap(other);
4829}
4830void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) {
4831 name_.Swap(&other->name_);
4832 std::swap(number_, other->number_);
4833 std::swap(label_, other->label_);
4834 std::swap(type_, other->type_);
4835 type_name_.Swap(&other->type_name_);
4836 extendee_.Swap(&other->extendee_);
4837 default_value_.Swap(&other->default_value_);
4838 std::swap(oneof_index_, other->oneof_index_);
Jisi Liu46e8ff62015-10-05 11:59:43 -07004839 json_name_.Swap(&other->json_name_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08004840 std::swap(options_, other->options_);
4841 std::swap(_has_bits_[0], other->_has_bits_[0]);
4842 _internal_metadata_.Swap(&other->_internal_metadata_);
4843 std::swap(_cached_size_, other->_cached_size_);
4844}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004845
kenton@google.com80b1d622009-07-29 01:13:20 +00004846::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const {
4847 protobuf_AssignDescriptorsOnce();
4848 ::google::protobuf::Metadata metadata;
4849 metadata.descriptor = FieldDescriptorProto_descriptor_;
4850 metadata.reflection = FieldDescriptorProto_reflection_;
4851 return metadata;
temporal40ee5512008-07-10 02:12:20 +00004852}
4853
Jisi Liu885b6122015-02-28 14:51:22 -08004854#if PROTOBUF_INLINE_NOT_IN_HEADERS
4855// FieldDescriptorProto
4856
4857// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07004858bool FieldDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004859 return (_has_bits_[0] & 0x00000001u) != 0;
4860}
Bo Yang5db21732015-05-21 14:28:59 -07004861void FieldDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004862 _has_bits_[0] |= 0x00000001u;
4863}
Bo Yang5db21732015-05-21 14:28:59 -07004864void FieldDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004865 _has_bits_[0] &= ~0x00000001u;
4866}
Bo Yang5db21732015-05-21 14:28:59 -07004867void FieldDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004868 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4869 clear_has_name();
4870}
4871 const ::std::string& FieldDescriptorProto::name() const {
4872 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name)
4873 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4874}
4875 void FieldDescriptorProto::set_name(const ::std::string& value) {
4876 set_has_name();
4877 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
4878 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name)
4879}
4880 void FieldDescriptorProto::set_name(const char* value) {
4881 set_has_name();
4882 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
4883 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name)
4884}
4885 void FieldDescriptorProto::set_name(const char* value, size_t size) {
4886 set_has_name();
4887 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
4888 ::std::string(reinterpret_cast<const char*>(value), size));
4889 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name)
4890}
4891 ::std::string* FieldDescriptorProto::mutable_name() {
4892 set_has_name();
4893 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name)
4894 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4895}
4896 ::std::string* FieldDescriptorProto::release_name() {
4897 clear_has_name();
4898 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4899}
4900 void FieldDescriptorProto::set_allocated_name(::std::string* name) {
4901 if (name != NULL) {
4902 set_has_name();
4903 } else {
4904 clear_has_name();
4905 }
4906 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
4907 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name)
4908}
4909
4910// optional int32 number = 3;
Bo Yang5db21732015-05-21 14:28:59 -07004911bool FieldDescriptorProto::has_number() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004912 return (_has_bits_[0] & 0x00000002u) != 0;
4913}
Bo Yang5db21732015-05-21 14:28:59 -07004914void FieldDescriptorProto::set_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004915 _has_bits_[0] |= 0x00000002u;
4916}
Bo Yang5db21732015-05-21 14:28:59 -07004917void FieldDescriptorProto::clear_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004918 _has_bits_[0] &= ~0x00000002u;
4919}
Bo Yang5db21732015-05-21 14:28:59 -07004920void FieldDescriptorProto::clear_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004921 number_ = 0;
4922 clear_has_number();
4923}
4924 ::google::protobuf::int32 FieldDescriptorProto::number() const {
4925 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number)
4926 return number_;
4927}
4928 void FieldDescriptorProto::set_number(::google::protobuf::int32 value) {
4929 set_has_number();
4930 number_ = value;
4931 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number)
4932}
4933
4934// optional .google.protobuf.FieldDescriptorProto.Label label = 4;
Bo Yang5db21732015-05-21 14:28:59 -07004935bool FieldDescriptorProto::has_label() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004936 return (_has_bits_[0] & 0x00000004u) != 0;
4937}
Bo Yang5db21732015-05-21 14:28:59 -07004938void FieldDescriptorProto::set_has_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004939 _has_bits_[0] |= 0x00000004u;
4940}
Bo Yang5db21732015-05-21 14:28:59 -07004941void FieldDescriptorProto::clear_has_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004942 _has_bits_[0] &= ~0x00000004u;
4943}
Bo Yang5db21732015-05-21 14:28:59 -07004944void FieldDescriptorProto::clear_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004945 label_ = 1;
4946 clear_has_label();
4947}
4948 ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const {
4949 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label)
4950 return static_cast< ::google::protobuf::FieldDescriptorProto_Label >(label_);
4951}
4952 void FieldDescriptorProto::set_label(::google::protobuf::FieldDescriptorProto_Label value) {
4953 assert(::google::protobuf::FieldDescriptorProto_Label_IsValid(value));
4954 set_has_label();
4955 label_ = value;
4956 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.label)
4957}
4958
4959// optional .google.protobuf.FieldDescriptorProto.Type type = 5;
Bo Yang5db21732015-05-21 14:28:59 -07004960bool FieldDescriptorProto::has_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004961 return (_has_bits_[0] & 0x00000008u) != 0;
4962}
Bo Yang5db21732015-05-21 14:28:59 -07004963void FieldDescriptorProto::set_has_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004964 _has_bits_[0] |= 0x00000008u;
4965}
Bo Yang5db21732015-05-21 14:28:59 -07004966void FieldDescriptorProto::clear_has_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004967 _has_bits_[0] &= ~0x00000008u;
4968}
Bo Yang5db21732015-05-21 14:28:59 -07004969void FieldDescriptorProto::clear_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004970 type_ = 1;
4971 clear_has_type();
4972}
4973 ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const {
4974 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type)
4975 return static_cast< ::google::protobuf::FieldDescriptorProto_Type >(type_);
4976}
4977 void FieldDescriptorProto::set_type(::google::protobuf::FieldDescriptorProto_Type value) {
4978 assert(::google::protobuf::FieldDescriptorProto_Type_IsValid(value));
4979 set_has_type();
4980 type_ = value;
4981 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type)
4982}
4983
4984// optional string type_name = 6;
Bo Yang5db21732015-05-21 14:28:59 -07004985bool FieldDescriptorProto::has_type_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004986 return (_has_bits_[0] & 0x00000010u) != 0;
4987}
Bo Yang5db21732015-05-21 14:28:59 -07004988void FieldDescriptorProto::set_has_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004989 _has_bits_[0] |= 0x00000010u;
4990}
Bo Yang5db21732015-05-21 14:28:59 -07004991void FieldDescriptorProto::clear_has_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004992 _has_bits_[0] &= ~0x00000010u;
4993}
Bo Yang5db21732015-05-21 14:28:59 -07004994void FieldDescriptorProto::clear_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004995 type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4996 clear_has_type_name();
4997}
4998 const ::std::string& FieldDescriptorProto::type_name() const {
4999 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name)
5000 return type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5001}
5002 void FieldDescriptorProto::set_type_name(const ::std::string& value) {
5003 set_has_type_name();
5004 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5005 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name)
5006}
5007 void FieldDescriptorProto::set_type_name(const char* value) {
5008 set_has_type_name();
5009 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5010 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name)
5011}
5012 void FieldDescriptorProto::set_type_name(const char* value, size_t size) {
5013 set_has_type_name();
5014 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5015 ::std::string(reinterpret_cast<const char*>(value), size));
5016 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name)
5017}
5018 ::std::string* FieldDescriptorProto::mutable_type_name() {
5019 set_has_type_name();
5020 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name)
5021 return type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5022}
5023 ::std::string* FieldDescriptorProto::release_type_name() {
5024 clear_has_type_name();
5025 return type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5026}
5027 void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) {
5028 if (type_name != NULL) {
5029 set_has_type_name();
5030 } else {
5031 clear_has_type_name();
5032 }
5033 type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_name);
5034 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name)
5035}
5036
5037// optional string extendee = 2;
Bo Yang5db21732015-05-21 14:28:59 -07005038bool FieldDescriptorProto::has_extendee() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005039 return (_has_bits_[0] & 0x00000020u) != 0;
5040}
Bo Yang5db21732015-05-21 14:28:59 -07005041void FieldDescriptorProto::set_has_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08005042 _has_bits_[0] |= 0x00000020u;
5043}
Bo Yang5db21732015-05-21 14:28:59 -07005044void FieldDescriptorProto::clear_has_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08005045 _has_bits_[0] &= ~0x00000020u;
5046}
Bo Yang5db21732015-05-21 14:28:59 -07005047void FieldDescriptorProto::clear_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08005048 extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5049 clear_has_extendee();
5050}
5051 const ::std::string& FieldDescriptorProto::extendee() const {
5052 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee)
5053 return extendee_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5054}
5055 void FieldDescriptorProto::set_extendee(const ::std::string& value) {
5056 set_has_extendee();
5057 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5058 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee)
5059}
5060 void FieldDescriptorProto::set_extendee(const char* value) {
5061 set_has_extendee();
5062 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5063 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee)
5064}
5065 void FieldDescriptorProto::set_extendee(const char* value, size_t size) {
5066 set_has_extendee();
5067 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5068 ::std::string(reinterpret_cast<const char*>(value), size));
5069 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee)
5070}
5071 ::std::string* FieldDescriptorProto::mutable_extendee() {
5072 set_has_extendee();
5073 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee)
5074 return extendee_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5075}
5076 ::std::string* FieldDescriptorProto::release_extendee() {
5077 clear_has_extendee();
5078 return extendee_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5079}
5080 void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) {
5081 if (extendee != NULL) {
5082 set_has_extendee();
5083 } else {
5084 clear_has_extendee();
5085 }
5086 extendee_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extendee);
5087 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee)
5088}
5089
5090// optional string default_value = 7;
Bo Yang5db21732015-05-21 14:28:59 -07005091bool FieldDescriptorProto::has_default_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005092 return (_has_bits_[0] & 0x00000040u) != 0;
5093}
Bo Yang5db21732015-05-21 14:28:59 -07005094void FieldDescriptorProto::set_has_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005095 _has_bits_[0] |= 0x00000040u;
5096}
Bo Yang5db21732015-05-21 14:28:59 -07005097void FieldDescriptorProto::clear_has_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005098 _has_bits_[0] &= ~0x00000040u;
5099}
Bo Yang5db21732015-05-21 14:28:59 -07005100void FieldDescriptorProto::clear_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005101 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5102 clear_has_default_value();
5103}
5104 const ::std::string& FieldDescriptorProto::default_value() const {
5105 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value)
5106 return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5107}
5108 void FieldDescriptorProto::set_default_value(const ::std::string& value) {
5109 set_has_default_value();
5110 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5111 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value)
5112}
5113 void FieldDescriptorProto::set_default_value(const char* value) {
5114 set_has_default_value();
5115 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5116 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value)
5117}
5118 void FieldDescriptorProto::set_default_value(const char* value, size_t size) {
5119 set_has_default_value();
5120 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5121 ::std::string(reinterpret_cast<const char*>(value), size));
5122 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value)
5123}
5124 ::std::string* FieldDescriptorProto::mutable_default_value() {
5125 set_has_default_value();
5126 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value)
5127 return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5128}
5129 ::std::string* FieldDescriptorProto::release_default_value() {
5130 clear_has_default_value();
5131 return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5132}
5133 void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) {
5134 if (default_value != NULL) {
5135 set_has_default_value();
5136 } else {
5137 clear_has_default_value();
5138 }
5139 default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value);
5140 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value)
5141}
5142
5143// optional int32 oneof_index = 9;
Bo Yang5db21732015-05-21 14:28:59 -07005144bool FieldDescriptorProto::has_oneof_index() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005145 return (_has_bits_[0] & 0x00000080u) != 0;
5146}
Bo Yang5db21732015-05-21 14:28:59 -07005147void FieldDescriptorProto::set_has_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005148 _has_bits_[0] |= 0x00000080u;
5149}
Bo Yang5db21732015-05-21 14:28:59 -07005150void FieldDescriptorProto::clear_has_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005151 _has_bits_[0] &= ~0x00000080u;
5152}
Bo Yang5db21732015-05-21 14:28:59 -07005153void FieldDescriptorProto::clear_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005154 oneof_index_ = 0;
5155 clear_has_oneof_index();
5156}
5157 ::google::protobuf::int32 FieldDescriptorProto::oneof_index() const {
5158 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index)
5159 return oneof_index_;
5160}
5161 void FieldDescriptorProto::set_oneof_index(::google::protobuf::int32 value) {
5162 set_has_oneof_index();
5163 oneof_index_ = value;
5164 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index)
5165}
5166
Jisi Liu46e8ff62015-10-05 11:59:43 -07005167// optional string json_name = 10;
5168bool FieldDescriptorProto::has_json_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005169 return (_has_bits_[0] & 0x00000100u) != 0;
5170}
Jisi Liu46e8ff62015-10-05 11:59:43 -07005171void FieldDescriptorProto::set_has_json_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005172 _has_bits_[0] |= 0x00000100u;
5173}
Jisi Liu46e8ff62015-10-05 11:59:43 -07005174void FieldDescriptorProto::clear_has_json_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005175 _has_bits_[0] &= ~0x00000100u;
5176}
Jisi Liu46e8ff62015-10-05 11:59:43 -07005177void FieldDescriptorProto::clear_json_name() {
5178 json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5179 clear_has_json_name();
5180}
5181 const ::std::string& FieldDescriptorProto::json_name() const {
5182 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name)
5183 return json_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5184}
5185 void FieldDescriptorProto::set_json_name(const ::std::string& value) {
5186 set_has_json_name();
5187 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5188 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name)
5189}
5190 void FieldDescriptorProto::set_json_name(const char* value) {
5191 set_has_json_name();
5192 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5193 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.json_name)
5194}
5195 void FieldDescriptorProto::set_json_name(const char* value, size_t size) {
5196 set_has_json_name();
5197 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5198 ::std::string(reinterpret_cast<const char*>(value), size));
5199 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.json_name)
5200}
5201 ::std::string* FieldDescriptorProto::mutable_json_name() {
5202 set_has_json_name();
5203 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.json_name)
5204 return json_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5205}
5206 ::std::string* FieldDescriptorProto::release_json_name() {
5207 clear_has_json_name();
5208 return json_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5209}
5210 void FieldDescriptorProto::set_allocated_json_name(::std::string* json_name) {
5211 if (json_name != NULL) {
5212 set_has_json_name();
5213 } else {
5214 clear_has_json_name();
5215 }
5216 json_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name);
5217 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.json_name)
5218}
5219
5220// optional .google.protobuf.FieldOptions options = 8;
5221bool FieldDescriptorProto::has_options() const {
5222 return (_has_bits_[0] & 0x00000200u) != 0;
5223}
5224void FieldDescriptorProto::set_has_options() {
5225 _has_bits_[0] |= 0x00000200u;
5226}
5227void FieldDescriptorProto::clear_has_options() {
5228 _has_bits_[0] &= ~0x00000200u;
5229}
Bo Yang5db21732015-05-21 14:28:59 -07005230void FieldDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005231 if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
5232 clear_has_options();
5233}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005234const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005235 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options)
5236 return options_ != NULL ? *options_ : *default_instance_->options_;
5237}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005238::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005239 set_has_options();
5240 if (options_ == NULL) {
5241 options_ = new ::google::protobuf::FieldOptions;
5242 }
5243 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options)
5244 return options_;
5245}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005246::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005247 clear_has_options();
5248 ::google::protobuf::FieldOptions* temp = options_;
5249 options_ = NULL;
5250 return temp;
5251}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005252void FieldDescriptorProto::set_allocated_options(::google::protobuf::FieldOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08005253 delete options_;
5254 options_ = options;
5255 if (options) {
5256 set_has_options();
5257 } else {
5258 clear_has_options();
5259 }
5260 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.options)
5261}
5262
5263#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00005264
5265// ===================================================================
5266
Bruce Dawson86ba70e2015-10-29 12:41:29 -07005267#if !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +00005268const int OneofDescriptorProto::kNameFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07005269#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +00005270
5271OneofDescriptorProto::OneofDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07005272 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005273 SharedCtor();
5274 // @@protoc_insertion_point(constructor:google.protobuf.OneofDescriptorProto)
5275}
5276
5277void OneofDescriptorProto::InitAsDefaultInstance() {
5278}
5279
5280OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08005281 : ::google::protobuf::Message(),
5282 _internal_metadata_(NULL) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005283 SharedCtor();
5284 MergeFrom(from);
5285 // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto)
5286}
5287
5288void OneofDescriptorProto::SharedCtor() {
5289 ::google::protobuf::internal::GetEmptyString();
5290 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005291 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005292 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5293}
5294
5295OneofDescriptorProto::~OneofDescriptorProto() {
5296 // @@protoc_insertion_point(destructor:google.protobuf.OneofDescriptorProto)
5297 SharedDtor();
5298}
5299
5300void OneofDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08005301 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005302 if (this != default_instance_) {
5303 }
5304}
5305
5306void OneofDescriptorProto::SetCachedSize(int size) const {
5307 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5308 _cached_size_ = size;
5309 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5310}
5311const ::google::protobuf::Descriptor* OneofDescriptorProto::descriptor() {
5312 protobuf_AssignDescriptorsOnce();
5313 return OneofDescriptorProto_descriptor_;
5314}
5315
5316const OneofDescriptorProto& OneofDescriptorProto::default_instance() {
5317 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
5318 return *default_instance_;
5319}
5320
5321OneofDescriptorProto* OneofDescriptorProto::default_instance_ = NULL;
5322
Feng Xiao6ef984a2014-11-10 17:34:54 -08005323OneofDescriptorProto* OneofDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08005324 OneofDescriptorProto* n = new OneofDescriptorProto;
5325 if (arena != NULL) {
5326 arena->Own(n);
5327 }
5328 return n;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005329}
5330
5331void OneofDescriptorProto::Clear() {
5332 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005333 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005334 }
5335 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08005336 if (_internal_metadata_.have_unknown_fields()) {
5337 mutable_unknown_fields()->Clear();
5338 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005339}
5340
5341bool OneofDescriptorProto::MergePartialFromCodedStream(
5342 ::google::protobuf::io::CodedInputStream* input) {
5343#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
5344 ::google::protobuf::uint32 tag;
5345 // @@protoc_insertion_point(parse_start:google.protobuf.OneofDescriptorProto)
5346 for (;;) {
5347 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
5348 tag = p.first;
5349 if (!p.second) goto handle_unusual;
5350 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
5351 // optional string name = 1;
5352 case 1: {
5353 if (tag == 10) {
5354 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5355 input, this->mutable_name()));
5356 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5357 this->name().data(), this->name().length(),
5358 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005359 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005360 } else {
5361 goto handle_unusual;
5362 }
5363 if (input->ExpectAtEnd()) goto success;
5364 break;
5365 }
5366
5367 default: {
5368 handle_unusual:
5369 if (tag == 0 ||
5370 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
5371 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
5372 goto success;
5373 }
5374 DO_(::google::protobuf::internal::WireFormat::SkipField(
5375 input, tag, mutable_unknown_fields()));
5376 break;
5377 }
5378 }
5379 }
5380success:
5381 // @@protoc_insertion_point(parse_success:google.protobuf.OneofDescriptorProto)
5382 return true;
5383failure:
5384 // @@protoc_insertion_point(parse_failure:google.protobuf.OneofDescriptorProto)
5385 return false;
5386#undef DO_
5387}
5388
5389void OneofDescriptorProto::SerializeWithCachedSizes(
5390 ::google::protobuf::io::CodedOutputStream* output) const {
5391 // @@protoc_insertion_point(serialize_start:google.protobuf.OneofDescriptorProto)
5392 // optional string name = 1;
5393 if (has_name()) {
5394 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5395 this->name().data(), this->name().length(),
5396 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005397 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005398 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5399 1, this->name(), output);
5400 }
5401
Feng Xiao6ef984a2014-11-10 17:34:54 -08005402 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005403 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5404 unknown_fields(), output);
5405 }
5406 // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto)
5407}
5408
5409::google::protobuf::uint8* OneofDescriptorProto::SerializeWithCachedSizesToArray(
5410 ::google::protobuf::uint8* target) const {
5411 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto)
5412 // optional string name = 1;
5413 if (has_name()) {
5414 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5415 this->name().data(), this->name().length(),
5416 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005417 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005418 target =
5419 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5420 1, this->name(), target);
5421 }
5422
Feng Xiao6ef984a2014-11-10 17:34:54 -08005423 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005424 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5425 unknown_fields(), target);
5426 }
5427 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto)
5428 return target;
5429}
5430
5431int OneofDescriptorProto::ByteSize() const {
5432 int total_size = 0;
5433
Feng Xiao6ef984a2014-11-10 17:34:54 -08005434 // optional string name = 1;
5435 if (has_name()) {
5436 total_size += 1 +
5437 ::google::protobuf::internal::WireFormatLite::StringSize(
5438 this->name());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005439 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005440
5441 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005442 total_size +=
5443 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5444 unknown_fields());
5445 }
5446 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5447 _cached_size_ = total_size;
5448 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5449 return total_size;
5450}
5451
5452void OneofDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005453 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07005454 const OneofDescriptorProto* source =
5455 ::google::protobuf::internal::DynamicCastToGenerated<const OneofDescriptorProto>(
5456 &from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005457 if (source == NULL) {
5458 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
5459 } else {
5460 MergeFrom(*source);
5461 }
5462}
5463
5464void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005465 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005466 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
5467 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005468 set_has_name();
5469 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005470 }
5471 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005472 if (from._internal_metadata_.have_unknown_fields()) {
5473 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5474 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005475}
5476
5477void OneofDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
5478 if (&from == this) return;
5479 Clear();
5480 MergeFrom(from);
5481}
5482
5483void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) {
5484 if (&from == this) return;
5485 Clear();
5486 MergeFrom(from);
5487}
5488
5489bool OneofDescriptorProto::IsInitialized() const {
5490
5491 return true;
5492}
5493
5494void OneofDescriptorProto::Swap(OneofDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08005495 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005496 InternalSwap(other);
5497}
5498void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
5499 name_.Swap(&other->name_);
5500 std::swap(_has_bits_[0], other->_has_bits_[0]);
5501 _internal_metadata_.Swap(&other->_internal_metadata_);
5502 std::swap(_cached_size_, other->_cached_size_);
5503}
jieluo@google.com4de8f552014-07-18 00:47:59 +00005504
5505::google::protobuf::Metadata OneofDescriptorProto::GetMetadata() const {
5506 protobuf_AssignDescriptorsOnce();
5507 ::google::protobuf::Metadata metadata;
5508 metadata.descriptor = OneofDescriptorProto_descriptor_;
5509 metadata.reflection = OneofDescriptorProto_reflection_;
5510 return metadata;
5511}
5512
Jisi Liu885b6122015-02-28 14:51:22 -08005513#if PROTOBUF_INLINE_NOT_IN_HEADERS
5514// OneofDescriptorProto
5515
5516// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07005517bool OneofDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005518 return (_has_bits_[0] & 0x00000001u) != 0;
5519}
Bo Yang5db21732015-05-21 14:28:59 -07005520void OneofDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005521 _has_bits_[0] |= 0x00000001u;
5522}
Bo Yang5db21732015-05-21 14:28:59 -07005523void OneofDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005524 _has_bits_[0] &= ~0x00000001u;
5525}
Bo Yang5db21732015-05-21 14:28:59 -07005526void OneofDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005527 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5528 clear_has_name();
5529}
5530 const ::std::string& OneofDescriptorProto::name() const {
5531 // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name)
5532 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5533}
5534 void OneofDescriptorProto::set_name(const ::std::string& value) {
5535 set_has_name();
5536 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5537 // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name)
5538}
5539 void OneofDescriptorProto::set_name(const char* value) {
5540 set_has_name();
5541 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5542 // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name)
5543}
5544 void OneofDescriptorProto::set_name(const char* value, size_t size) {
5545 set_has_name();
5546 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5547 ::std::string(reinterpret_cast<const char*>(value), size));
5548 // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name)
5549}
5550 ::std::string* OneofDescriptorProto::mutable_name() {
5551 set_has_name();
5552 // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name)
5553 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5554}
5555 ::std::string* OneofDescriptorProto::release_name() {
5556 clear_has_name();
5557 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5558}
5559 void OneofDescriptorProto::set_allocated_name(::std::string* name) {
5560 if (name != NULL) {
5561 set_has_name();
5562 } else {
5563 clear_has_name();
5564 }
5565 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
5566 // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name)
5567}
5568
5569#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
jieluo@google.com4de8f552014-07-18 00:47:59 +00005570
5571// ===================================================================
5572
Bruce Dawson86ba70e2015-10-29 12:41:29 -07005573#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005574const int EnumDescriptorProto::kNameFieldNumber;
5575const int EnumDescriptorProto::kValueFieldNumber;
5576const int EnumDescriptorProto::kOptionsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07005577#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00005578
kenton@google.com573989f2009-10-30 22:02:17 +00005579EnumDescriptorProto::EnumDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07005580 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005581 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00005582 // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00005583}
5584
kenton@google.com80b1d622009-07-29 01:13:20 +00005585void EnumDescriptorProto::InitAsDefaultInstance() {
5586 options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00005587}
5588
kenton@google.com573989f2009-10-30 22:02:17 +00005589EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08005590 : ::google::protobuf::Message(),
5591 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005592 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005593 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005594 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005595}
5596
kenton@google.comd37d46d2009-04-25 02:53:47 +00005597void EnumDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005598 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00005599 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005600 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00005601 options_ = NULL;
5602 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5603}
5604
temporal40ee5512008-07-10 02:12:20 +00005605EnumDescriptorProto::~EnumDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005606 // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005607 SharedDtor();
5608}
5609
5610void EnumDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08005611 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00005612 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00005613 delete options_;
5614 }
5615}
5616
kenton@google.comfccb1462009-12-18 02:11:36 +00005617void EnumDescriptorProto::SetCachedSize(int size) const {
5618 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5619 _cached_size_ = size;
5620 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5621}
temporal40ee5512008-07-10 02:12:20 +00005622const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005623 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00005624 return EnumDescriptorProto_descriptor_;
5625}
5626
kenton@google.com24bf56f2008-09-24 20:31:01 +00005627const EnumDescriptorProto& EnumDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00005628 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
5629 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005630}
5631
5632EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL;
5633
Feng Xiao6ef984a2014-11-10 17:34:54 -08005634EnumDescriptorProto* EnumDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08005635 EnumDescriptorProto* n = new EnumDescriptorProto;
5636 if (arena != NULL) {
5637 arena->Own(n);
5638 }
5639 return n;
temporal40ee5512008-07-10 02:12:20 +00005640}
5641
5642void EnumDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07005643 if (_has_bits_[0 / 32] & 5u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005644 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005645 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00005646 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005647 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00005648 if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear();
5649 }
5650 }
5651 value_.Clear();
5652 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08005653 if (_internal_metadata_.have_unknown_fields()) {
5654 mutable_unknown_fields()->Clear();
5655 }
temporal40ee5512008-07-10 02:12:20 +00005656}
5657
5658bool EnumDescriptorProto::MergePartialFromCodedStream(
5659 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005660#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00005661 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005662 // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto)
5663 for (;;) {
5664 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
5665 tag = p.first;
5666 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00005667 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00005668 // optional string name = 1;
5669 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005670 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005671 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5672 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00005673 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00005674 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005675 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005676 "google.protobuf.EnumDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00005677 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005678 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005679 }
temporal40ee5512008-07-10 02:12:20 +00005680 if (input->ExpectTag(18)) goto parse_value;
5681 break;
5682 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005683
temporal40ee5512008-07-10 02:12:20 +00005684 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
5685 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005686 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005687 parse_value:
Bo Yang5db21732015-05-21 14:28:59 -07005688 DO_(input->IncrementRecursionDepth());
5689 parse_loop_value:
5690 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00005691 input, add_value()));
5692 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005693 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005694 }
Bo Yang5db21732015-05-21 14:28:59 -07005695 if (input->ExpectTag(18)) goto parse_loop_value;
5696 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00005697 if (input->ExpectTag(26)) goto parse_options;
5698 break;
5699 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005700
temporal40ee5512008-07-10 02:12:20 +00005701 // optional .google.protobuf.EnumOptions options = 3;
5702 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005703 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005704 parse_options:
5705 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
5706 input, mutable_options()));
5707 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005708 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005709 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005710 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00005711 break;
5712 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005713
temporal40ee5512008-07-10 02:12:20 +00005714 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005715 handle_unusual:
5716 if (tag == 0 ||
5717 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005718 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005719 goto success;
temporal40ee5512008-07-10 02:12:20 +00005720 }
5721 DO_(::google::protobuf::internal::WireFormat::SkipField(
5722 input, tag, mutable_unknown_fields()));
5723 break;
5724 }
5725 }
5726 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005727success:
5728 // @@protoc_insertion_point(parse_success:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005729 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005730failure:
5731 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumDescriptorProto)
5732 return false;
temporal40ee5512008-07-10 02:12:20 +00005733#undef DO_
5734}
5735
kenton@google.comd37d46d2009-04-25 02:53:47 +00005736void EnumDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00005737 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005738 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005739 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005740 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005741 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00005742 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005743 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005744 "google.protobuf.EnumDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005745 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00005746 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00005747 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005748
temporal40ee5512008-07-10 02:12:20 +00005749 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08005750 for (unsigned int i = 0, n = this->value_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005751 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00005752 2, this->value(i), output);
temporal40ee5512008-07-10 02:12:20 +00005753 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005754
temporal40ee5512008-07-10 02:12:20 +00005755 // optional .google.protobuf.EnumOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005756 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005757 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08005758 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00005759 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005760
Feng Xiao6ef984a2014-11-10 17:34:54 -08005761 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005762 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5763 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00005764 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005765 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005766}
5767
5768::google::protobuf::uint8* EnumDescriptorProto::SerializeWithCachedSizesToArray(
5769 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005770 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005771 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005772 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005773 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00005774 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005775 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005776 "google.protobuf.EnumDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00005777 target =
5778 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5779 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005780 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005781
kenton@google.comd37d46d2009-04-25 02:53:47 +00005782 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08005783 for (unsigned int i = 0, n = this->value_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005784 target = ::google::protobuf::internal::WireFormatLite::
5785 WriteMessageNoVirtualToArray(
5786 2, this->value(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005787 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005788
kenton@google.comd37d46d2009-04-25 02:53:47 +00005789 // optional .google.protobuf.EnumOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005790 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005791 target = ::google::protobuf::internal::WireFormatLite::
5792 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08005793 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005794 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005795
Feng Xiao6ef984a2014-11-10 17:34:54 -08005796 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005797 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5798 unknown_fields(), target);
5799 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005800 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005801 return target;
temporal40ee5512008-07-10 02:12:20 +00005802}
5803
5804int EnumDescriptorProto::ByteSize() const {
5805 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005806
Austin Schuh307af622015-06-05 22:46:01 -07005807 if (_has_bits_[0 / 32] & 5u) {
temporal40ee5512008-07-10 02:12:20 +00005808 // optional string name = 1;
5809 if (has_name()) {
5810 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00005811 ::google::protobuf::internal::WireFormatLite::StringSize(
5812 this->name());
temporal40ee5512008-07-10 02:12:20 +00005813 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005814
temporal40ee5512008-07-10 02:12:20 +00005815 // optional .google.protobuf.EnumOptions options = 3;
5816 if (has_options()) {
5817 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00005818 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08005819 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00005820 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005821
temporal40ee5512008-07-10 02:12:20 +00005822 }
5823 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005824 total_size += 1 * this->value_size();
5825 for (int i = 0; i < this->value_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00005826 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00005827 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00005828 this->value(i));
5829 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005830
Feng Xiao6ef984a2014-11-10 17:34:54 -08005831 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00005832 total_size +=
5833 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5834 unknown_fields());
5835 }
kenton@google.comfccb1462009-12-18 02:11:36 +00005836 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00005837 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00005838 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00005839 return total_size;
5840}
5841
5842void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005843 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07005844 const EnumDescriptorProto* source =
5845 ::google::protobuf::internal::DynamicCastToGenerated<const EnumDescriptorProto>(
5846 &from);
temporal40ee5512008-07-10 02:12:20 +00005847 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00005848 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00005849 } else {
5850 MergeFrom(*source);
5851 }
5852}
5853
5854void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005855 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00005856 value_.MergeFrom(from.value_);
5857 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005858 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005859 set_has_name();
5860 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00005861 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005862 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00005863 mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options());
5864 }
5865 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005866 if (from._internal_metadata_.have_unknown_fields()) {
5867 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5868 }
temporal40ee5512008-07-10 02:12:20 +00005869}
5870
5871void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
5872 if (&from == this) return;
5873 Clear();
5874 MergeFrom(from);
5875}
5876
5877void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
5878 if (&from == this) return;
5879 Clear();
5880 MergeFrom(from);
5881}
5882
5883bool EnumDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005884
jieluo@google.com4de8f552014-07-18 00:47:59 +00005885 if (!::google::protobuf::internal::AllAreInitialized(this->value())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005886 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005887 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005888 }
temporal40ee5512008-07-10 02:12:20 +00005889 return true;
5890}
5891
kenton@google.comceb561d2009-06-25 19:05:36 +00005892void EnumDescriptorProto::Swap(EnumDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08005893 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005894 InternalSwap(other);
5895}
5896void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) {
5897 name_.Swap(&other->name_);
5898 value_.UnsafeArenaSwap(&other->value_);
5899 std::swap(options_, other->options_);
5900 std::swap(_has_bits_[0], other->_has_bits_[0]);
5901 _internal_metadata_.Swap(&other->_internal_metadata_);
5902 std::swap(_cached_size_, other->_cached_size_);
5903}
kenton@google.comceb561d2009-06-25 19:05:36 +00005904
kenton@google.com80b1d622009-07-29 01:13:20 +00005905::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const {
5906 protobuf_AssignDescriptorsOnce();
5907 ::google::protobuf::Metadata metadata;
5908 metadata.descriptor = EnumDescriptorProto_descriptor_;
5909 metadata.reflection = EnumDescriptorProto_reflection_;
5910 return metadata;
temporal40ee5512008-07-10 02:12:20 +00005911}
5912
Jisi Liu885b6122015-02-28 14:51:22 -08005913#if PROTOBUF_INLINE_NOT_IN_HEADERS
5914// EnumDescriptorProto
5915
5916// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07005917bool EnumDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005918 return (_has_bits_[0] & 0x00000001u) != 0;
5919}
Bo Yang5db21732015-05-21 14:28:59 -07005920void EnumDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005921 _has_bits_[0] |= 0x00000001u;
5922}
Bo Yang5db21732015-05-21 14:28:59 -07005923void EnumDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005924 _has_bits_[0] &= ~0x00000001u;
5925}
Bo Yang5db21732015-05-21 14:28:59 -07005926void EnumDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005927 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5928 clear_has_name();
5929}
5930 const ::std::string& EnumDescriptorProto::name() const {
5931 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name)
5932 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5933}
5934 void EnumDescriptorProto::set_name(const ::std::string& value) {
5935 set_has_name();
5936 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5937 // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name)
5938}
5939 void EnumDescriptorProto::set_name(const char* value) {
5940 set_has_name();
5941 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5942 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name)
5943}
5944 void EnumDescriptorProto::set_name(const char* value, size_t size) {
5945 set_has_name();
5946 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5947 ::std::string(reinterpret_cast<const char*>(value), size));
5948 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name)
5949}
5950 ::std::string* EnumDescriptorProto::mutable_name() {
5951 set_has_name();
5952 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name)
5953 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5954}
5955 ::std::string* EnumDescriptorProto::release_name() {
5956 clear_has_name();
5957 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5958}
5959 void EnumDescriptorProto::set_allocated_name(::std::string* name) {
5960 if (name != NULL) {
5961 set_has_name();
5962 } else {
5963 clear_has_name();
5964 }
5965 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
5966 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name)
5967}
5968
5969// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Bo Yang5db21732015-05-21 14:28:59 -07005970int EnumDescriptorProto::value_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005971 return value_.size();
5972}
Bo Yang5db21732015-05-21 14:28:59 -07005973void EnumDescriptorProto::clear_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005974 value_.Clear();
5975}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005976const ::google::protobuf::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08005977 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value)
5978 return value_.Get(index);
5979}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005980::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08005981 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.value)
5982 return value_.Mutable(index);
5983}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005984::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::add_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005985 // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value)
5986 return value_.Add();
5987}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005988::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08005989EnumDescriptorProto::mutable_value() {
5990 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value)
5991 return &value_;
5992}
Feng Xiaoeee38b02015-08-22 18:25:48 -07005993const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >&
5994EnumDescriptorProto::value() const {
5995 // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value)
5996 return value_;
5997}
Jisi Liu885b6122015-02-28 14:51:22 -08005998
5999// optional .google.protobuf.EnumOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07006000bool EnumDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006001 return (_has_bits_[0] & 0x00000004u) != 0;
6002}
Bo Yang5db21732015-05-21 14:28:59 -07006003void EnumDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006004 _has_bits_[0] |= 0x00000004u;
6005}
Bo Yang5db21732015-05-21 14:28:59 -07006006void EnumDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006007 _has_bits_[0] &= ~0x00000004u;
6008}
Bo Yang5db21732015-05-21 14:28:59 -07006009void EnumDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006010 if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear();
6011 clear_has_options();
6012}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006013const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006014 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options)
6015 return options_ != NULL ? *options_ : *default_instance_->options_;
6016}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006017::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006018 set_has_options();
6019 if (options_ == NULL) {
6020 options_ = new ::google::protobuf::EnumOptions;
6021 }
6022 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options)
6023 return options_;
6024}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006025::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006026 clear_has_options();
6027 ::google::protobuf::EnumOptions* temp = options_;
6028 options_ = NULL;
6029 return temp;
6030}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006031void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08006032 delete options_;
6033 options_ = options;
6034 if (options) {
6035 set_has_options();
6036 } else {
6037 clear_has_options();
6038 }
6039 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.options)
6040}
6041
6042#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00006043
6044// ===================================================================
6045
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006046#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006047const int EnumValueDescriptorProto::kNameFieldNumber;
6048const int EnumValueDescriptorProto::kNumberFieldNumber;
6049const int EnumValueDescriptorProto::kOptionsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006050#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00006051
kenton@google.com573989f2009-10-30 22:02:17 +00006052EnumValueDescriptorProto::EnumValueDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07006053 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006054 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00006055 // @@protoc_insertion_point(constructor:google.protobuf.EnumValueDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00006056}
6057
kenton@google.com80b1d622009-07-29 01:13:20 +00006058void EnumValueDescriptorProto::InitAsDefaultInstance() {
6059 options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00006060}
6061
kenton@google.com573989f2009-10-30 22:02:17 +00006062EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08006063 : ::google::protobuf::Message(),
6064 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006065 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006066 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00006067 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006068}
6069
kenton@google.comd37d46d2009-04-25 02:53:47 +00006070void EnumValueDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006071 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00006072 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006073 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00006074 number_ = 0;
6075 options_ = NULL;
6076 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6077}
6078
temporal40ee5512008-07-10 02:12:20 +00006079EnumValueDescriptorProto::~EnumValueDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006080 // @@protoc_insertion_point(destructor:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006081 SharedDtor();
6082}
6083
6084void EnumValueDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08006085 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00006086 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00006087 delete options_;
6088 }
6089}
6090
kenton@google.comfccb1462009-12-18 02:11:36 +00006091void EnumValueDescriptorProto::SetCachedSize(int size) const {
6092 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6093 _cached_size_ = size;
6094 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6095}
temporal40ee5512008-07-10 02:12:20 +00006096const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006097 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00006098 return EnumValueDescriptorProto_descriptor_;
6099}
6100
kenton@google.com24bf56f2008-09-24 20:31:01 +00006101const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00006102 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
6103 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006104}
6105
6106EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL;
6107
Feng Xiao6ef984a2014-11-10 17:34:54 -08006108EnumValueDescriptorProto* EnumValueDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08006109 EnumValueDescriptorProto* n = new EnumValueDescriptorProto;
6110 if (arena != NULL) {
6111 arena->Own(n);
6112 }
6113 return n;
temporal40ee5512008-07-10 02:12:20 +00006114}
6115
6116void EnumValueDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07006117 if (_has_bits_[0 / 32] & 7u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006118 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006119 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00006120 }
6121 number_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006122 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006123 if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear();
6124 }
6125 }
6126 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08006127 if (_internal_metadata_.have_unknown_fields()) {
6128 mutable_unknown_fields()->Clear();
6129 }
temporal40ee5512008-07-10 02:12:20 +00006130}
6131
6132bool EnumValueDescriptorProto::MergePartialFromCodedStream(
6133 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006134#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00006135 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006136 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueDescriptorProto)
6137 for (;;) {
6138 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
6139 tag = p.first;
6140 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00006141 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00006142 // optional string name = 1;
6143 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006144 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006145 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6146 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00006147 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00006148 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006149 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006150 "google.protobuf.EnumValueDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00006151 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006152 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006153 }
temporal40ee5512008-07-10 02:12:20 +00006154 if (input->ExpectTag(16)) goto parse_number;
6155 break;
6156 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006157
temporal40ee5512008-07-10 02:12:20 +00006158 // optional int32 number = 2;
6159 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006160 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006161 parse_number:
6162 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
6163 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
6164 input, &number_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00006165 set_has_number();
kenton@google.comfccb1462009-12-18 02:11:36 +00006166 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006167 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006168 }
temporal40ee5512008-07-10 02:12:20 +00006169 if (input->ExpectTag(26)) goto parse_options;
6170 break;
6171 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006172
temporal40ee5512008-07-10 02:12:20 +00006173 // optional .google.protobuf.EnumValueOptions options = 3;
6174 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006175 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006176 parse_options:
6177 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6178 input, mutable_options()));
6179 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006180 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006181 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006182 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00006183 break;
6184 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006185
temporal40ee5512008-07-10 02:12:20 +00006186 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006187 handle_unusual:
6188 if (tag == 0 ||
6189 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006190 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006191 goto success;
temporal40ee5512008-07-10 02:12:20 +00006192 }
6193 DO_(::google::protobuf::internal::WireFormat::SkipField(
6194 input, tag, mutable_unknown_fields()));
6195 break;
6196 }
6197 }
6198 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006199success:
6200 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006201 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006202failure:
6203 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueDescriptorProto)
6204 return false;
temporal40ee5512008-07-10 02:12:20 +00006205#undef DO_
6206}
6207
kenton@google.comd37d46d2009-04-25 02:53:47 +00006208void EnumValueDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00006209 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006210 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006211 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006212 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006213 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006214 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006215 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006216 "google.protobuf.EnumValueDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00006217 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00006218 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00006219 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006220
temporal40ee5512008-07-10 02:12:20 +00006221 // optional int32 number = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006222 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006223 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output);
temporal40ee5512008-07-10 02:12:20 +00006224 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006225
temporal40ee5512008-07-10 02:12:20 +00006226 // optional .google.protobuf.EnumValueOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006227 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006228 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006229 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00006230 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006231
Feng Xiao6ef984a2014-11-10 17:34:54 -08006232 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006233 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6234 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00006235 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006236 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006237}
6238
6239::google::protobuf::uint8* EnumValueDescriptorProto::SerializeWithCachedSizesToArray(
6240 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006241 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006242 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006243 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006244 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006245 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006246 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006247 "google.protobuf.EnumValueDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00006248 target =
6249 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6250 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006251 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006252
kenton@google.comd37d46d2009-04-25 02:53:47 +00006253 // optional int32 number = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006254 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006255 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006256 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006257
kenton@google.comd37d46d2009-04-25 02:53:47 +00006258 // optional .google.protobuf.EnumValueOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006259 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006260 target = ::google::protobuf::internal::WireFormatLite::
6261 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006262 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006263 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006264
Feng Xiao6ef984a2014-11-10 17:34:54 -08006265 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006266 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6267 unknown_fields(), target);
6268 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006269 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006270 return target;
temporal40ee5512008-07-10 02:12:20 +00006271}
6272
6273int EnumValueDescriptorProto::ByteSize() const {
6274 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006275
Austin Schuh307af622015-06-05 22:46:01 -07006276 if (_has_bits_[0 / 32] & 7u) {
temporal40ee5512008-07-10 02:12:20 +00006277 // optional string name = 1;
6278 if (has_name()) {
6279 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006280 ::google::protobuf::internal::WireFormatLite::StringSize(
6281 this->name());
temporal40ee5512008-07-10 02:12:20 +00006282 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006283
temporal40ee5512008-07-10 02:12:20 +00006284 // optional int32 number = 2;
6285 if (has_number()) {
6286 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006287 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00006288 this->number());
6289 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006290
temporal40ee5512008-07-10 02:12:20 +00006291 // optional .google.protobuf.EnumValueOptions options = 3;
6292 if (has_options()) {
6293 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006294 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08006295 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00006296 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006297
temporal40ee5512008-07-10 02:12:20 +00006298 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006299 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00006300 total_size +=
6301 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6302 unknown_fields());
6303 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006304 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00006305 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006306 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00006307 return total_size;
6308}
6309
6310void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006311 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07006312 const EnumValueDescriptorProto* source =
6313 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueDescriptorProto>(
6314 &from);
temporal40ee5512008-07-10 02:12:20 +00006315 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00006316 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00006317 } else {
6318 MergeFrom(*source);
6319 }
6320}
6321
6322void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006323 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00006324 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006325 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006326 set_has_name();
6327 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00006328 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006329 if (from.has_number()) {
temporal40ee5512008-07-10 02:12:20 +00006330 set_number(from.number());
6331 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006332 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006333 mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options());
6334 }
6335 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006336 if (from._internal_metadata_.have_unknown_fields()) {
6337 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6338 }
temporal40ee5512008-07-10 02:12:20 +00006339}
6340
6341void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
6342 if (&from == this) return;
6343 Clear();
6344 MergeFrom(from);
6345}
6346
6347void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
6348 if (&from == this) return;
6349 Clear();
6350 MergeFrom(from);
6351}
6352
kenton@google.comceb561d2009-06-25 19:05:36 +00006353bool EnumValueDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006354
kenton@google.comceb561d2009-06-25 19:05:36 +00006355 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006356 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00006357 }
6358 return true;
6359}
6360
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006361void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08006362 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006363 InternalSwap(other);
6364}
6365void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) {
6366 name_.Swap(&other->name_);
6367 std::swap(number_, other->number_);
6368 std::swap(options_, other->options_);
6369 std::swap(_has_bits_[0], other->_has_bits_[0]);
6370 _internal_metadata_.Swap(&other->_internal_metadata_);
6371 std::swap(_cached_size_, other->_cached_size_);
6372}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006373
kenton@google.com80b1d622009-07-29 01:13:20 +00006374::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const {
6375 protobuf_AssignDescriptorsOnce();
6376 ::google::protobuf::Metadata metadata;
6377 metadata.descriptor = EnumValueDescriptorProto_descriptor_;
6378 metadata.reflection = EnumValueDescriptorProto_reflection_;
6379 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006380}
6381
Jisi Liu885b6122015-02-28 14:51:22 -08006382#if PROTOBUF_INLINE_NOT_IN_HEADERS
6383// EnumValueDescriptorProto
6384
6385// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07006386bool EnumValueDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006387 return (_has_bits_[0] & 0x00000001u) != 0;
6388}
Bo Yang5db21732015-05-21 14:28:59 -07006389void EnumValueDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006390 _has_bits_[0] |= 0x00000001u;
6391}
Bo Yang5db21732015-05-21 14:28:59 -07006392void EnumValueDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006393 _has_bits_[0] &= ~0x00000001u;
6394}
Bo Yang5db21732015-05-21 14:28:59 -07006395void EnumValueDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006396 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6397 clear_has_name();
6398}
6399 const ::std::string& EnumValueDescriptorProto::name() const {
6400 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name)
6401 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6402}
6403 void EnumValueDescriptorProto::set_name(const ::std::string& value) {
6404 set_has_name();
6405 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
6406 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name)
6407}
6408 void EnumValueDescriptorProto::set_name(const char* value) {
6409 set_has_name();
6410 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
6411 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name)
6412}
6413 void EnumValueDescriptorProto::set_name(const char* value, size_t size) {
6414 set_has_name();
6415 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
6416 ::std::string(reinterpret_cast<const char*>(value), size));
6417 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name)
6418}
6419 ::std::string* EnumValueDescriptorProto::mutable_name() {
6420 set_has_name();
6421 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name)
6422 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6423}
6424 ::std::string* EnumValueDescriptorProto::release_name() {
6425 clear_has_name();
6426 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6427}
6428 void EnumValueDescriptorProto::set_allocated_name(::std::string* name) {
6429 if (name != NULL) {
6430 set_has_name();
6431 } else {
6432 clear_has_name();
6433 }
6434 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
6435 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name)
6436}
6437
6438// optional int32 number = 2;
Bo Yang5db21732015-05-21 14:28:59 -07006439bool EnumValueDescriptorProto::has_number() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006440 return (_has_bits_[0] & 0x00000002u) != 0;
6441}
Bo Yang5db21732015-05-21 14:28:59 -07006442void EnumValueDescriptorProto::set_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006443 _has_bits_[0] |= 0x00000002u;
6444}
Bo Yang5db21732015-05-21 14:28:59 -07006445void EnumValueDescriptorProto::clear_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006446 _has_bits_[0] &= ~0x00000002u;
6447}
Bo Yang5db21732015-05-21 14:28:59 -07006448void EnumValueDescriptorProto::clear_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006449 number_ = 0;
6450 clear_has_number();
6451}
6452 ::google::protobuf::int32 EnumValueDescriptorProto::number() const {
6453 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number)
6454 return number_;
6455}
6456 void EnumValueDescriptorProto::set_number(::google::protobuf::int32 value) {
6457 set_has_number();
6458 number_ = value;
6459 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number)
6460}
6461
6462// optional .google.protobuf.EnumValueOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07006463bool EnumValueDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006464 return (_has_bits_[0] & 0x00000004u) != 0;
6465}
Bo Yang5db21732015-05-21 14:28:59 -07006466void EnumValueDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006467 _has_bits_[0] |= 0x00000004u;
6468}
Bo Yang5db21732015-05-21 14:28:59 -07006469void EnumValueDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006470 _has_bits_[0] &= ~0x00000004u;
6471}
Bo Yang5db21732015-05-21 14:28:59 -07006472void EnumValueDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006473 if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear();
6474 clear_has_options();
6475}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006476const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006477 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options)
6478 return options_ != NULL ? *options_ : *default_instance_->options_;
6479}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006480::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006481 set_has_options();
6482 if (options_ == NULL) {
6483 options_ = new ::google::protobuf::EnumValueOptions;
6484 }
6485 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options)
6486 return options_;
6487}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006488::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006489 clear_has_options();
6490 ::google::protobuf::EnumValueOptions* temp = options_;
6491 options_ = NULL;
6492 return temp;
6493}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006494void EnumValueDescriptorProto::set_allocated_options(::google::protobuf::EnumValueOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08006495 delete options_;
6496 options_ = options;
6497 if (options) {
6498 set_has_options();
6499 } else {
6500 clear_has_options();
6501 }
6502 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.options)
6503}
6504
6505#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00006506
6507// ===================================================================
6508
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006509#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006510const int ServiceDescriptorProto::kNameFieldNumber;
6511const int ServiceDescriptorProto::kMethodFieldNumber;
6512const int ServiceDescriptorProto::kOptionsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006513#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00006514
kenton@google.com573989f2009-10-30 22:02:17 +00006515ServiceDescriptorProto::ServiceDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07006516 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006517 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00006518 // @@protoc_insertion_point(constructor:google.protobuf.ServiceDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00006519}
6520
kenton@google.com80b1d622009-07-29 01:13:20 +00006521void ServiceDescriptorProto::InitAsDefaultInstance() {
6522 options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00006523}
6524
kenton@google.com573989f2009-10-30 22:02:17 +00006525ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08006526 : ::google::protobuf::Message(),
6527 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006528 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006529 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00006530 // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006531}
6532
kenton@google.comd37d46d2009-04-25 02:53:47 +00006533void ServiceDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006534 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00006535 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006536 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00006537 options_ = NULL;
6538 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6539}
6540
temporal40ee5512008-07-10 02:12:20 +00006541ServiceDescriptorProto::~ServiceDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006542 // @@protoc_insertion_point(destructor:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006543 SharedDtor();
6544}
6545
6546void ServiceDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08006547 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00006548 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00006549 delete options_;
6550 }
6551}
6552
kenton@google.comfccb1462009-12-18 02:11:36 +00006553void ServiceDescriptorProto::SetCachedSize(int size) const {
6554 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6555 _cached_size_ = size;
6556 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6557}
temporal40ee5512008-07-10 02:12:20 +00006558const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006559 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00006560 return ServiceDescriptorProto_descriptor_;
6561}
6562
kenton@google.com24bf56f2008-09-24 20:31:01 +00006563const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00006564 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
6565 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006566}
6567
6568ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL;
6569
Feng Xiao6ef984a2014-11-10 17:34:54 -08006570ServiceDescriptorProto* ServiceDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08006571 ServiceDescriptorProto* n = new ServiceDescriptorProto;
6572 if (arena != NULL) {
6573 arena->Own(n);
6574 }
6575 return n;
temporal40ee5512008-07-10 02:12:20 +00006576}
6577
6578void ServiceDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07006579 if (_has_bits_[0 / 32] & 5u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006580 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006581 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00006582 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006583 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006584 if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear();
6585 }
6586 }
6587 method_.Clear();
6588 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08006589 if (_internal_metadata_.have_unknown_fields()) {
6590 mutable_unknown_fields()->Clear();
6591 }
temporal40ee5512008-07-10 02:12:20 +00006592}
6593
6594bool ServiceDescriptorProto::MergePartialFromCodedStream(
6595 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006596#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00006597 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006598 // @@protoc_insertion_point(parse_start:google.protobuf.ServiceDescriptorProto)
6599 for (;;) {
6600 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
6601 tag = p.first;
6602 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00006603 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00006604 // optional string name = 1;
6605 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006606 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006607 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6608 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00006609 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00006610 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006611 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006612 "google.protobuf.ServiceDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00006613 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006614 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006615 }
temporal40ee5512008-07-10 02:12:20 +00006616 if (input->ExpectTag(18)) goto parse_method;
6617 break;
6618 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006619
temporal40ee5512008-07-10 02:12:20 +00006620 // repeated .google.protobuf.MethodDescriptorProto method = 2;
6621 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006622 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006623 parse_method:
Bo Yang5db21732015-05-21 14:28:59 -07006624 DO_(input->IncrementRecursionDepth());
6625 parse_loop_method:
6626 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00006627 input, add_method()));
6628 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006629 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006630 }
Bo Yang5db21732015-05-21 14:28:59 -07006631 if (input->ExpectTag(18)) goto parse_loop_method;
6632 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00006633 if (input->ExpectTag(26)) goto parse_options;
6634 break;
6635 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006636
temporal40ee5512008-07-10 02:12:20 +00006637 // optional .google.protobuf.ServiceOptions options = 3;
6638 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006639 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006640 parse_options:
6641 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6642 input, mutable_options()));
6643 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006644 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006645 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006646 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00006647 break;
6648 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006649
temporal40ee5512008-07-10 02:12:20 +00006650 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006651 handle_unusual:
6652 if (tag == 0 ||
6653 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006654 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006655 goto success;
temporal40ee5512008-07-10 02:12:20 +00006656 }
6657 DO_(::google::protobuf::internal::WireFormat::SkipField(
6658 input, tag, mutable_unknown_fields()));
6659 break;
6660 }
6661 }
6662 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006663success:
6664 // @@protoc_insertion_point(parse_success:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006665 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006666failure:
6667 // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceDescriptorProto)
6668 return false;
temporal40ee5512008-07-10 02:12:20 +00006669#undef DO_
6670}
6671
kenton@google.comd37d46d2009-04-25 02:53:47 +00006672void ServiceDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00006673 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006674 // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006675 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006676 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006677 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006678 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006679 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006680 "google.protobuf.ServiceDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00006681 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00006682 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00006683 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006684
temporal40ee5512008-07-10 02:12:20 +00006685 // repeated .google.protobuf.MethodDescriptorProto method = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08006686 for (unsigned int i = 0, n = this->method_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006687 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00006688 2, this->method(i), output);
temporal40ee5512008-07-10 02:12:20 +00006689 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006690
temporal40ee5512008-07-10 02:12:20 +00006691 // optional .google.protobuf.ServiceOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006692 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006693 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006694 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00006695 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006696
Feng Xiao6ef984a2014-11-10 17:34:54 -08006697 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006698 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6699 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00006700 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006701 // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006702}
6703
6704::google::protobuf::uint8* ServiceDescriptorProto::SerializeWithCachedSizesToArray(
6705 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006706 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006707 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006708 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006709 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006710 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006711 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006712 "google.protobuf.ServiceDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00006713 target =
6714 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6715 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006716 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006717
kenton@google.comd37d46d2009-04-25 02:53:47 +00006718 // repeated .google.protobuf.MethodDescriptorProto method = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08006719 for (unsigned int i = 0, n = this->method_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006720 target = ::google::protobuf::internal::WireFormatLite::
6721 WriteMessageNoVirtualToArray(
6722 2, this->method(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006723 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006724
kenton@google.comd37d46d2009-04-25 02:53:47 +00006725 // optional .google.protobuf.ServiceOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006726 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006727 target = ::google::protobuf::internal::WireFormatLite::
6728 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006729 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006730 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006731
Feng Xiao6ef984a2014-11-10 17:34:54 -08006732 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006733 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6734 unknown_fields(), target);
6735 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006736 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006737 return target;
temporal40ee5512008-07-10 02:12:20 +00006738}
6739
6740int ServiceDescriptorProto::ByteSize() const {
6741 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006742
Austin Schuh307af622015-06-05 22:46:01 -07006743 if (_has_bits_[0 / 32] & 5u) {
temporal40ee5512008-07-10 02:12:20 +00006744 // optional string name = 1;
6745 if (has_name()) {
6746 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006747 ::google::protobuf::internal::WireFormatLite::StringSize(
6748 this->name());
temporal40ee5512008-07-10 02:12:20 +00006749 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006750
temporal40ee5512008-07-10 02:12:20 +00006751 // optional .google.protobuf.ServiceOptions options = 3;
6752 if (has_options()) {
6753 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006754 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08006755 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00006756 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006757
temporal40ee5512008-07-10 02:12:20 +00006758 }
6759 // repeated .google.protobuf.MethodDescriptorProto method = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00006760 total_size += 1 * this->method_size();
6761 for (int i = 0; i < this->method_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00006762 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00006763 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00006764 this->method(i));
6765 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006766
Feng Xiao6ef984a2014-11-10 17:34:54 -08006767 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00006768 total_size +=
6769 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6770 unknown_fields());
6771 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006772 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00006773 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006774 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00006775 return total_size;
6776}
6777
6778void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006779 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07006780 const ServiceDescriptorProto* source =
6781 ::google::protobuf::internal::DynamicCastToGenerated<const ServiceDescriptorProto>(
6782 &from);
temporal40ee5512008-07-10 02:12:20 +00006783 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00006784 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00006785 } else {
6786 MergeFrom(*source);
6787 }
6788}
6789
6790void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006791 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00006792 method_.MergeFrom(from.method_);
6793 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006794 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006795 set_has_name();
6796 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00006797 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006798 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006799 mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options());
6800 }
6801 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006802 if (from._internal_metadata_.have_unknown_fields()) {
6803 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6804 }
temporal40ee5512008-07-10 02:12:20 +00006805}
6806
6807void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
6808 if (&from == this) return;
6809 Clear();
6810 MergeFrom(from);
6811}
6812
6813void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) {
6814 if (&from == this) return;
6815 Clear();
6816 MergeFrom(from);
6817}
6818
6819bool ServiceDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006820
jieluo@google.com4de8f552014-07-18 00:47:59 +00006821 if (!::google::protobuf::internal::AllAreInitialized(this->method())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006822 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006823 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006824 }
temporal40ee5512008-07-10 02:12:20 +00006825 return true;
6826}
6827
kenton@google.comceb561d2009-06-25 19:05:36 +00006828void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08006829 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006830 InternalSwap(other);
6831}
6832void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) {
6833 name_.Swap(&other->name_);
6834 method_.UnsafeArenaSwap(&other->method_);
6835 std::swap(options_, other->options_);
6836 std::swap(_has_bits_[0], other->_has_bits_[0]);
6837 _internal_metadata_.Swap(&other->_internal_metadata_);
6838 std::swap(_cached_size_, other->_cached_size_);
6839}
kenton@google.comceb561d2009-06-25 19:05:36 +00006840
kenton@google.com80b1d622009-07-29 01:13:20 +00006841::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const {
6842 protobuf_AssignDescriptorsOnce();
6843 ::google::protobuf::Metadata metadata;
6844 metadata.descriptor = ServiceDescriptorProto_descriptor_;
6845 metadata.reflection = ServiceDescriptorProto_reflection_;
6846 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006847}
6848
Jisi Liu885b6122015-02-28 14:51:22 -08006849#if PROTOBUF_INLINE_NOT_IN_HEADERS
6850// ServiceDescriptorProto
6851
6852// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07006853bool ServiceDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006854 return (_has_bits_[0] & 0x00000001u) != 0;
6855}
Bo Yang5db21732015-05-21 14:28:59 -07006856void ServiceDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006857 _has_bits_[0] |= 0x00000001u;
6858}
Bo Yang5db21732015-05-21 14:28:59 -07006859void ServiceDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006860 _has_bits_[0] &= ~0x00000001u;
6861}
Bo Yang5db21732015-05-21 14:28:59 -07006862void ServiceDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006863 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6864 clear_has_name();
6865}
6866 const ::std::string& ServiceDescriptorProto::name() const {
6867 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name)
6868 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6869}
6870 void ServiceDescriptorProto::set_name(const ::std::string& value) {
6871 set_has_name();
6872 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
6873 // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name)
6874}
6875 void ServiceDescriptorProto::set_name(const char* value) {
6876 set_has_name();
6877 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
6878 // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name)
6879}
6880 void ServiceDescriptorProto::set_name(const char* value, size_t size) {
6881 set_has_name();
6882 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
6883 ::std::string(reinterpret_cast<const char*>(value), size));
6884 // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name)
6885}
6886 ::std::string* ServiceDescriptorProto::mutable_name() {
6887 set_has_name();
6888 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name)
6889 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6890}
6891 ::std::string* ServiceDescriptorProto::release_name() {
6892 clear_has_name();
6893 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6894}
6895 void ServiceDescriptorProto::set_allocated_name(::std::string* name) {
6896 if (name != NULL) {
6897 set_has_name();
6898 } else {
6899 clear_has_name();
6900 }
6901 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
6902 // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name)
6903}
6904
6905// repeated .google.protobuf.MethodDescriptorProto method = 2;
Bo Yang5db21732015-05-21 14:28:59 -07006906int ServiceDescriptorProto::method_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006907 return method_.size();
6908}
Bo Yang5db21732015-05-21 14:28:59 -07006909void ServiceDescriptorProto::clear_method() {
Jisi Liu885b6122015-02-28 14:51:22 -08006910 method_.Clear();
6911}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006912const ::google::protobuf::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08006913 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method)
6914 return method_.Get(index);
6915}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006916::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08006917 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.method)
6918 return method_.Mutable(index);
6919}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006920::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::add_method() {
Jisi Liu885b6122015-02-28 14:51:22 -08006921 // @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method)
6922 return method_.Add();
6923}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006924::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >*
Jisi Liu885b6122015-02-28 14:51:22 -08006925ServiceDescriptorProto::mutable_method() {
6926 // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method)
6927 return &method_;
6928}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006929const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >&
6930ServiceDescriptorProto::method() const {
6931 // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method)
6932 return method_;
6933}
Jisi Liu885b6122015-02-28 14:51:22 -08006934
6935// optional .google.protobuf.ServiceOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07006936bool ServiceDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006937 return (_has_bits_[0] & 0x00000004u) != 0;
6938}
Bo Yang5db21732015-05-21 14:28:59 -07006939void ServiceDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006940 _has_bits_[0] |= 0x00000004u;
6941}
Bo Yang5db21732015-05-21 14:28:59 -07006942void ServiceDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006943 _has_bits_[0] &= ~0x00000004u;
6944}
Bo Yang5db21732015-05-21 14:28:59 -07006945void ServiceDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006946 if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear();
6947 clear_has_options();
6948}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006949const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006950 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options)
6951 return options_ != NULL ? *options_ : *default_instance_->options_;
6952}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006953::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006954 set_has_options();
6955 if (options_ == NULL) {
6956 options_ = new ::google::protobuf::ServiceOptions;
6957 }
6958 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options)
6959 return options_;
6960}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006961::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006962 clear_has_options();
6963 ::google::protobuf::ServiceOptions* temp = options_;
6964 options_ = NULL;
6965 return temp;
6966}
Feng Xiaoeee38b02015-08-22 18:25:48 -07006967void ServiceDescriptorProto::set_allocated_options(::google::protobuf::ServiceOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08006968 delete options_;
6969 options_ = options;
6970 if (options) {
6971 set_has_options();
6972 } else {
6973 clear_has_options();
6974 }
6975 // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.options)
6976}
6977
6978#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00006979
6980// ===================================================================
6981
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006982#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006983const int MethodDescriptorProto::kNameFieldNumber;
6984const int MethodDescriptorProto::kInputTypeFieldNumber;
6985const int MethodDescriptorProto::kOutputTypeFieldNumber;
6986const int MethodDescriptorProto::kOptionsFieldNumber;
Feng Xiao99aa0f92014-11-20 16:18:53 -08006987const int MethodDescriptorProto::kClientStreamingFieldNumber;
6988const int MethodDescriptorProto::kServerStreamingFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07006989#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00006990
kenton@google.com573989f2009-10-30 22:02:17 +00006991MethodDescriptorProto::MethodDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07006992 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006993 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00006994 // @@protoc_insertion_point(constructor:google.protobuf.MethodDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00006995}
6996
kenton@google.com80b1d622009-07-29 01:13:20 +00006997void MethodDescriptorProto::InitAsDefaultInstance() {
6998 options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00006999}
7000
kenton@google.com573989f2009-10-30 22:02:17 +00007001MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08007002 : ::google::protobuf::Message(),
7003 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007004 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00007005 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00007006 // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00007007}
7008
kenton@google.comd37d46d2009-04-25 02:53:47 +00007009void MethodDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007010 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00007011 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007012 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7013 input_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7014 output_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00007015 options_ = NULL;
Feng Xiao99aa0f92014-11-20 16:18:53 -08007016 client_streaming_ = false;
7017 server_streaming_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00007018 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7019}
7020
temporal40ee5512008-07-10 02:12:20 +00007021MethodDescriptorProto::~MethodDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007022 // @@protoc_insertion_point(destructor:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007023 SharedDtor();
7024}
7025
7026void MethodDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08007027 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7028 input_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7029 output_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00007030 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00007031 delete options_;
7032 }
7033}
7034
kenton@google.comfccb1462009-12-18 02:11:36 +00007035void MethodDescriptorProto::SetCachedSize(int size) const {
7036 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7037 _cached_size_ = size;
7038 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7039}
temporal40ee5512008-07-10 02:12:20 +00007040const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007041 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00007042 return MethodDescriptorProto_descriptor_;
7043}
7044
kenton@google.com24bf56f2008-09-24 20:31:01 +00007045const MethodDescriptorProto& MethodDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00007046 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
7047 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00007048}
7049
7050MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL;
7051
Feng Xiao6ef984a2014-11-10 17:34:54 -08007052MethodDescriptorProto* MethodDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08007053 MethodDescriptorProto* n = new MethodDescriptorProto;
7054 if (arena != NULL) {
7055 arena->Own(n);
7056 }
7057 return n;
temporal40ee5512008-07-10 02:12:20 +00007058}
7059
7060void MethodDescriptorProto::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -08007061#define ZR_HELPER_(f) reinterpret_cast<char*>(\
7062 &reinterpret_cast<MethodDescriptorProto*>(16)->f)
Feng Xiao99aa0f92014-11-20 16:18:53 -08007063
Jisi Liu885b6122015-02-28 14:51:22 -08007064#define ZR_(first, last) do {\
7065 ::memset(&first, 0,\
7066 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
7067} while (0)
Feng Xiao99aa0f92014-11-20 16:18:53 -08007068
Austin Schuhe8268372015-05-19 23:22:20 -07007069 if (_has_bits_[0 / 32] & 63u) {
Feng Xiao99aa0f92014-11-20 16:18:53 -08007070 ZR_(client_streaming_, server_streaming_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00007071 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007072 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007073 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007074 if (has_input_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007075 input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007076 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007077 if (has_output_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007078 output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007079 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007080 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00007081 if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear();
7082 }
7083 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08007084
Jisi Liu885b6122015-02-28 14:51:22 -08007085#undef ZR_HELPER_
Feng Xiao99aa0f92014-11-20 16:18:53 -08007086#undef ZR_
7087
temporal40ee5512008-07-10 02:12:20 +00007088 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08007089 if (_internal_metadata_.have_unknown_fields()) {
7090 mutable_unknown_fields()->Clear();
7091 }
temporal40ee5512008-07-10 02:12:20 +00007092}
7093
7094bool MethodDescriptorProto::MergePartialFromCodedStream(
7095 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007096#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00007097 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007098 // @@protoc_insertion_point(parse_start:google.protobuf.MethodDescriptorProto)
7099 for (;;) {
7100 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
7101 tag = p.first;
7102 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00007103 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00007104 // optional string name = 1;
7105 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007106 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007107 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7108 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007109 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007110 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007111 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007112 "google.protobuf.MethodDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00007113 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007114 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007115 }
temporal40ee5512008-07-10 02:12:20 +00007116 if (input->ExpectTag(18)) goto parse_input_type;
7117 break;
7118 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007119
temporal40ee5512008-07-10 02:12:20 +00007120 // optional string input_type = 2;
7121 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007122 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007123 parse_input_type:
7124 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7125 input, this->mutable_input_type()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007126 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007127 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007128 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007129 "google.protobuf.MethodDescriptorProto.input_type");
kenton@google.comfccb1462009-12-18 02:11:36 +00007130 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007131 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007132 }
temporal40ee5512008-07-10 02:12:20 +00007133 if (input->ExpectTag(26)) goto parse_output_type;
7134 break;
7135 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007136
temporal40ee5512008-07-10 02:12:20 +00007137 // optional string output_type = 3;
7138 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007139 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007140 parse_output_type:
7141 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7142 input, this->mutable_output_type()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007143 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007144 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007145 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007146 "google.protobuf.MethodDescriptorProto.output_type");
kenton@google.comfccb1462009-12-18 02:11:36 +00007147 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007148 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007149 }
temporal40ee5512008-07-10 02:12:20 +00007150 if (input->ExpectTag(34)) goto parse_options;
7151 break;
7152 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007153
temporal40ee5512008-07-10 02:12:20 +00007154 // optional .google.protobuf.MethodOptions options = 4;
7155 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007156 if (tag == 34) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007157 parse_options:
7158 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
7159 input, mutable_options()));
7160 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007161 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007162 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08007163 if (input->ExpectTag(40)) goto parse_client_streaming;
7164 break;
7165 }
7166
7167 // optional bool client_streaming = 5 [default = false];
7168 case 5: {
7169 if (tag == 40) {
7170 parse_client_streaming:
7171 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7172 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7173 input, &client_streaming_)));
7174 set_has_client_streaming();
7175 } else {
7176 goto handle_unusual;
7177 }
7178 if (input->ExpectTag(48)) goto parse_server_streaming;
7179 break;
7180 }
7181
7182 // optional bool server_streaming = 6 [default = false];
7183 case 6: {
7184 if (tag == 48) {
7185 parse_server_streaming:
7186 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7187 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7188 input, &server_streaming_)));
7189 set_has_server_streaming();
7190 } else {
7191 goto handle_unusual;
7192 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007193 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00007194 break;
7195 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007196
temporal40ee5512008-07-10 02:12:20 +00007197 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007198 handle_unusual:
7199 if (tag == 0 ||
7200 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00007201 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007202 goto success;
temporal40ee5512008-07-10 02:12:20 +00007203 }
7204 DO_(::google::protobuf::internal::WireFormat::SkipField(
7205 input, tag, mutable_unknown_fields()));
7206 break;
7207 }
7208 }
7209 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007210success:
7211 // @@protoc_insertion_point(parse_success:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00007212 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007213failure:
7214 // @@protoc_insertion_point(parse_failure:google.protobuf.MethodDescriptorProto)
7215 return false;
temporal40ee5512008-07-10 02:12:20 +00007216#undef DO_
7217}
7218
kenton@google.comd37d46d2009-04-25 02:53:47 +00007219void MethodDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00007220 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007221 // @@protoc_insertion_point(serialize_start:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00007222 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007223 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007224 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007225 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007226 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007227 "google.protobuf.MethodDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007228 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007229 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00007230 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007231
temporal40ee5512008-07-10 02:12:20 +00007232 // optional string input_type = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007233 if (has_input_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007234 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007235 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007236 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007237 "google.protobuf.MethodDescriptorProto.input_type");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007238 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007239 2, this->input_type(), output);
temporal40ee5512008-07-10 02:12:20 +00007240 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007241
temporal40ee5512008-07-10 02:12:20 +00007242 // optional string output_type = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007243 if (has_output_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007244 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007245 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007246 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007247 "google.protobuf.MethodDescriptorProto.output_type");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007248 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007249 3, this->output_type(), output);
temporal40ee5512008-07-10 02:12:20 +00007250 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007251
temporal40ee5512008-07-10 02:12:20 +00007252 // optional .google.protobuf.MethodOptions options = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007253 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007254 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08007255 4, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00007256 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007257
Feng Xiao99aa0f92014-11-20 16:18:53 -08007258 // optional bool client_streaming = 5 [default = false];
7259 if (has_client_streaming()) {
7260 ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->client_streaming(), output);
7261 }
7262
7263 // optional bool server_streaming = 6 [default = false];
7264 if (has_server_streaming()) {
7265 ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->server_streaming(), output);
7266 }
7267
Feng Xiao6ef984a2014-11-10 17:34:54 -08007268 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007269 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
7270 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00007271 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007272 // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007273}
7274
7275::google::protobuf::uint8* MethodDescriptorProto::SerializeWithCachedSizesToArray(
7276 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007277 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007278 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007279 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007280 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007281 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007282 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007283 "google.protobuf.MethodDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00007284 target =
7285 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7286 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007287 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007288
kenton@google.comd37d46d2009-04-25 02:53:47 +00007289 // optional string input_type = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007290 if (has_input_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007291 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007292 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007293 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007294 "google.protobuf.MethodDescriptorProto.input_type");
kenton@google.com80b1d622009-07-29 01:13:20 +00007295 target =
7296 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7297 2, this->input_type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007298 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007299
kenton@google.comd37d46d2009-04-25 02:53:47 +00007300 // optional string output_type = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007301 if (has_output_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007302 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007303 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007304 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007305 "google.protobuf.MethodDescriptorProto.output_type");
kenton@google.com80b1d622009-07-29 01:13:20 +00007306 target =
7307 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7308 3, this->output_type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007309 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007310
kenton@google.comd37d46d2009-04-25 02:53:47 +00007311 // optional .google.protobuf.MethodOptions options = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007312 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007313 target = ::google::protobuf::internal::WireFormatLite::
7314 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08007315 4, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007316 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007317
Feng Xiao99aa0f92014-11-20 16:18:53 -08007318 // optional bool client_streaming = 5 [default = false];
7319 if (has_client_streaming()) {
7320 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->client_streaming(), target);
7321 }
7322
7323 // optional bool server_streaming = 6 [default = false];
7324 if (has_server_streaming()) {
7325 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->server_streaming(), target);
7326 }
7327
Feng Xiao6ef984a2014-11-10 17:34:54 -08007328 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007329 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
7330 unknown_fields(), target);
7331 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007332 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007333 return target;
temporal40ee5512008-07-10 02:12:20 +00007334}
7335
7336int MethodDescriptorProto::ByteSize() const {
7337 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007338
Austin Schuh307af622015-06-05 22:46:01 -07007339 if (_has_bits_[0 / 32] & 63u) {
temporal40ee5512008-07-10 02:12:20 +00007340 // optional string name = 1;
7341 if (has_name()) {
7342 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007343 ::google::protobuf::internal::WireFormatLite::StringSize(
7344 this->name());
temporal40ee5512008-07-10 02:12:20 +00007345 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007346
temporal40ee5512008-07-10 02:12:20 +00007347 // optional string input_type = 2;
7348 if (has_input_type()) {
7349 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007350 ::google::protobuf::internal::WireFormatLite::StringSize(
7351 this->input_type());
temporal40ee5512008-07-10 02:12:20 +00007352 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007353
temporal40ee5512008-07-10 02:12:20 +00007354 // optional string output_type = 3;
7355 if (has_output_type()) {
7356 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007357 ::google::protobuf::internal::WireFormatLite::StringSize(
7358 this->output_type());
temporal40ee5512008-07-10 02:12:20 +00007359 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007360
temporal40ee5512008-07-10 02:12:20 +00007361 // optional .google.protobuf.MethodOptions options = 4;
7362 if (has_options()) {
7363 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007364 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08007365 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00007366 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007367
Feng Xiao99aa0f92014-11-20 16:18:53 -08007368 // optional bool client_streaming = 5 [default = false];
7369 if (has_client_streaming()) {
7370 total_size += 1 + 1;
7371 }
7372
7373 // optional bool server_streaming = 6 [default = false];
7374 if (has_server_streaming()) {
7375 total_size += 1 + 1;
7376 }
7377
temporal40ee5512008-07-10 02:12:20 +00007378 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08007379 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00007380 total_size +=
7381 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
7382 unknown_fields());
7383 }
kenton@google.comfccb1462009-12-18 02:11:36 +00007384 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00007385 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00007386 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00007387 return total_size;
7388}
7389
7390void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08007391 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07007392 const MethodDescriptorProto* source =
7393 ::google::protobuf::internal::DynamicCastToGenerated<const MethodDescriptorProto>(
7394 &from);
temporal40ee5512008-07-10 02:12:20 +00007395 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00007396 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00007397 } else {
7398 MergeFrom(*source);
7399 }
7400}
7401
7402void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08007403 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00007404 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00007405 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007406 set_has_name();
7407 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00007408 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007409 if (from.has_input_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007410 set_has_input_type();
7411 input_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.input_type_);
temporal40ee5512008-07-10 02:12:20 +00007412 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007413 if (from.has_output_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007414 set_has_output_type();
7415 output_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.output_type_);
temporal40ee5512008-07-10 02:12:20 +00007416 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007417 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00007418 mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options());
7419 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08007420 if (from.has_client_streaming()) {
7421 set_client_streaming(from.client_streaming());
7422 }
7423 if (from.has_server_streaming()) {
7424 set_server_streaming(from.server_streaming());
7425 }
temporal40ee5512008-07-10 02:12:20 +00007426 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08007427 if (from._internal_metadata_.have_unknown_fields()) {
7428 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
7429 }
temporal40ee5512008-07-10 02:12:20 +00007430}
7431
7432void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
7433 if (&from == this) return;
7434 Clear();
7435 MergeFrom(from);
7436}
7437
7438void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) {
7439 if (&from == this) return;
7440 Clear();
7441 MergeFrom(from);
7442}
7443
kenton@google.comceb561d2009-06-25 19:05:36 +00007444bool MethodDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007445
kenton@google.comceb561d2009-06-25 19:05:36 +00007446 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007447 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00007448 }
7449 return true;
7450}
7451
kenton@google.com26bd9ee2008-11-21 00:06:27 +00007452void MethodDescriptorProto::Swap(MethodDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08007453 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007454 InternalSwap(other);
7455}
7456void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) {
7457 name_.Swap(&other->name_);
7458 input_type_.Swap(&other->input_type_);
7459 output_type_.Swap(&other->output_type_);
7460 std::swap(options_, other->options_);
Feng Xiao99aa0f92014-11-20 16:18:53 -08007461 std::swap(client_streaming_, other->client_streaming_);
7462 std::swap(server_streaming_, other->server_streaming_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08007463 std::swap(_has_bits_[0], other->_has_bits_[0]);
7464 _internal_metadata_.Swap(&other->_internal_metadata_);
7465 std::swap(_cached_size_, other->_cached_size_);
7466}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00007467
kenton@google.com80b1d622009-07-29 01:13:20 +00007468::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const {
7469 protobuf_AssignDescriptorsOnce();
7470 ::google::protobuf::Metadata metadata;
7471 metadata.descriptor = MethodDescriptorProto_descriptor_;
7472 metadata.reflection = MethodDescriptorProto_reflection_;
7473 return metadata;
temporal40ee5512008-07-10 02:12:20 +00007474}
7475
Jisi Liu885b6122015-02-28 14:51:22 -08007476#if PROTOBUF_INLINE_NOT_IN_HEADERS
7477// MethodDescriptorProto
7478
7479// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07007480bool MethodDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007481 return (_has_bits_[0] & 0x00000001u) != 0;
7482}
Bo Yang5db21732015-05-21 14:28:59 -07007483void MethodDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007484 _has_bits_[0] |= 0x00000001u;
7485}
Bo Yang5db21732015-05-21 14:28:59 -07007486void MethodDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007487 _has_bits_[0] &= ~0x00000001u;
7488}
Bo Yang5db21732015-05-21 14:28:59 -07007489void MethodDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007490 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7491 clear_has_name();
7492}
7493 const ::std::string& MethodDescriptorProto::name() const {
7494 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name)
7495 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7496}
7497 void MethodDescriptorProto::set_name(const ::std::string& value) {
7498 set_has_name();
7499 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7500 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name)
7501}
7502 void MethodDescriptorProto::set_name(const char* value) {
7503 set_has_name();
7504 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7505 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name)
7506}
7507 void MethodDescriptorProto::set_name(const char* value, size_t size) {
7508 set_has_name();
7509 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7510 ::std::string(reinterpret_cast<const char*>(value), size));
7511 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name)
7512}
7513 ::std::string* MethodDescriptorProto::mutable_name() {
7514 set_has_name();
7515 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name)
7516 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7517}
7518 ::std::string* MethodDescriptorProto::release_name() {
7519 clear_has_name();
7520 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7521}
7522 void MethodDescriptorProto::set_allocated_name(::std::string* name) {
7523 if (name != NULL) {
7524 set_has_name();
7525 } else {
7526 clear_has_name();
7527 }
7528 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
7529 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name)
7530}
7531
7532// optional string input_type = 2;
Bo Yang5db21732015-05-21 14:28:59 -07007533bool MethodDescriptorProto::has_input_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007534 return (_has_bits_[0] & 0x00000002u) != 0;
7535}
Bo Yang5db21732015-05-21 14:28:59 -07007536void MethodDescriptorProto::set_has_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007537 _has_bits_[0] |= 0x00000002u;
7538}
Bo Yang5db21732015-05-21 14:28:59 -07007539void MethodDescriptorProto::clear_has_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007540 _has_bits_[0] &= ~0x00000002u;
7541}
Bo Yang5db21732015-05-21 14:28:59 -07007542void MethodDescriptorProto::clear_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007543 input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7544 clear_has_input_type();
7545}
7546 const ::std::string& MethodDescriptorProto::input_type() const {
7547 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type)
7548 return input_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7549}
7550 void MethodDescriptorProto::set_input_type(const ::std::string& value) {
7551 set_has_input_type();
7552 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7553 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type)
7554}
7555 void MethodDescriptorProto::set_input_type(const char* value) {
7556 set_has_input_type();
7557 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7558 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type)
7559}
7560 void MethodDescriptorProto::set_input_type(const char* value, size_t size) {
7561 set_has_input_type();
7562 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7563 ::std::string(reinterpret_cast<const char*>(value), size));
7564 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type)
7565}
7566 ::std::string* MethodDescriptorProto::mutable_input_type() {
7567 set_has_input_type();
7568 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type)
7569 return input_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7570}
7571 ::std::string* MethodDescriptorProto::release_input_type() {
7572 clear_has_input_type();
7573 return input_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7574}
7575 void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) {
7576 if (input_type != NULL) {
7577 set_has_input_type();
7578 } else {
7579 clear_has_input_type();
7580 }
7581 input_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), input_type);
7582 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type)
7583}
7584
7585// optional string output_type = 3;
Bo Yang5db21732015-05-21 14:28:59 -07007586bool MethodDescriptorProto::has_output_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007587 return (_has_bits_[0] & 0x00000004u) != 0;
7588}
Bo Yang5db21732015-05-21 14:28:59 -07007589void MethodDescriptorProto::set_has_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007590 _has_bits_[0] |= 0x00000004u;
7591}
Bo Yang5db21732015-05-21 14:28:59 -07007592void MethodDescriptorProto::clear_has_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007593 _has_bits_[0] &= ~0x00000004u;
7594}
Bo Yang5db21732015-05-21 14:28:59 -07007595void MethodDescriptorProto::clear_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007596 output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7597 clear_has_output_type();
7598}
7599 const ::std::string& MethodDescriptorProto::output_type() const {
7600 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type)
7601 return output_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7602}
7603 void MethodDescriptorProto::set_output_type(const ::std::string& value) {
7604 set_has_output_type();
7605 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7606 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type)
7607}
7608 void MethodDescriptorProto::set_output_type(const char* value) {
7609 set_has_output_type();
7610 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7611 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type)
7612}
7613 void MethodDescriptorProto::set_output_type(const char* value, size_t size) {
7614 set_has_output_type();
7615 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7616 ::std::string(reinterpret_cast<const char*>(value), size));
7617 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type)
7618}
7619 ::std::string* MethodDescriptorProto::mutable_output_type() {
7620 set_has_output_type();
7621 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type)
7622 return output_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7623}
7624 ::std::string* MethodDescriptorProto::release_output_type() {
7625 clear_has_output_type();
7626 return output_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7627}
7628 void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) {
7629 if (output_type != NULL) {
7630 set_has_output_type();
7631 } else {
7632 clear_has_output_type();
7633 }
7634 output_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), output_type);
7635 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type)
7636}
7637
7638// optional .google.protobuf.MethodOptions options = 4;
Bo Yang5db21732015-05-21 14:28:59 -07007639bool MethodDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007640 return (_has_bits_[0] & 0x00000008u) != 0;
7641}
Bo Yang5db21732015-05-21 14:28:59 -07007642void MethodDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007643 _has_bits_[0] |= 0x00000008u;
7644}
Bo Yang5db21732015-05-21 14:28:59 -07007645void MethodDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007646 _has_bits_[0] &= ~0x00000008u;
7647}
Bo Yang5db21732015-05-21 14:28:59 -07007648void MethodDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007649 if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear();
7650 clear_has_options();
7651}
Feng Xiaoeee38b02015-08-22 18:25:48 -07007652const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007653 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options)
7654 return options_ != NULL ? *options_ : *default_instance_->options_;
7655}
Feng Xiaoeee38b02015-08-22 18:25:48 -07007656::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007657 set_has_options();
7658 if (options_ == NULL) {
7659 options_ = new ::google::protobuf::MethodOptions;
7660 }
7661 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options)
7662 return options_;
7663}
Feng Xiaoeee38b02015-08-22 18:25:48 -07007664::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007665 clear_has_options();
7666 ::google::protobuf::MethodOptions* temp = options_;
7667 options_ = NULL;
7668 return temp;
7669}
Feng Xiaoeee38b02015-08-22 18:25:48 -07007670void MethodDescriptorProto::set_allocated_options(::google::protobuf::MethodOptions* options) {
Jisi Liu885b6122015-02-28 14:51:22 -08007671 delete options_;
7672 options_ = options;
7673 if (options) {
7674 set_has_options();
7675 } else {
7676 clear_has_options();
7677 }
7678 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options)
7679}
7680
7681// optional bool client_streaming = 5 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07007682bool MethodDescriptorProto::has_client_streaming() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007683 return (_has_bits_[0] & 0x00000010u) != 0;
7684}
Bo Yang5db21732015-05-21 14:28:59 -07007685void MethodDescriptorProto::set_has_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007686 _has_bits_[0] |= 0x00000010u;
7687}
Bo Yang5db21732015-05-21 14:28:59 -07007688void MethodDescriptorProto::clear_has_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007689 _has_bits_[0] &= ~0x00000010u;
7690}
Bo Yang5db21732015-05-21 14:28:59 -07007691void MethodDescriptorProto::clear_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007692 client_streaming_ = false;
7693 clear_has_client_streaming();
7694}
7695 bool MethodDescriptorProto::client_streaming() const {
7696 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.client_streaming)
7697 return client_streaming_;
7698}
7699 void MethodDescriptorProto::set_client_streaming(bool value) {
7700 set_has_client_streaming();
7701 client_streaming_ = value;
7702 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.client_streaming)
7703}
7704
7705// optional bool server_streaming = 6 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07007706bool MethodDescriptorProto::has_server_streaming() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007707 return (_has_bits_[0] & 0x00000020u) != 0;
7708}
Bo Yang5db21732015-05-21 14:28:59 -07007709void MethodDescriptorProto::set_has_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007710 _has_bits_[0] |= 0x00000020u;
7711}
Bo Yang5db21732015-05-21 14:28:59 -07007712void MethodDescriptorProto::clear_has_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007713 _has_bits_[0] &= ~0x00000020u;
7714}
Bo Yang5db21732015-05-21 14:28:59 -07007715void MethodDescriptorProto::clear_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007716 server_streaming_ = false;
7717 clear_has_server_streaming();
7718}
7719 bool MethodDescriptorProto::server_streaming() const {
7720 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.server_streaming)
7721 return server_streaming_;
7722}
7723 void MethodDescriptorProto::set_server_streaming(bool value) {
7724 set_has_server_streaming();
7725 server_streaming_ = value;
7726 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.server_streaming)
7727}
7728
7729#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00007730
7731// ===================================================================
7732
7733const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007734 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00007735 return FileOptions_OptimizeMode_descriptor_;
7736}
7737bool FileOptions_OptimizeMode_IsValid(int value) {
7738 switch(value) {
7739 case 1:
7740 case 2:
kenton@google.com80b1d622009-07-29 01:13:20 +00007741 case 3:
temporal40ee5512008-07-10 02:12:20 +00007742 return true;
7743 default:
7744 return false;
7745 }
7746}
7747
Bruce Dawson86ba70e2015-10-29 12:41:29 -07007748#if !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00007749const FileOptions_OptimizeMode FileOptions::SPEED;
7750const FileOptions_OptimizeMode FileOptions::CODE_SIZE;
kenton@google.com80b1d622009-07-29 01:13:20 +00007751const FileOptions_OptimizeMode FileOptions::LITE_RUNTIME;
temporal40ee5512008-07-10 02:12:20 +00007752const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN;
7753const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00007754const int FileOptions::OptimizeMode_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07007755#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
7756#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007757const int FileOptions::kJavaPackageFieldNumber;
7758const int FileOptions::kJavaOuterClassnameFieldNumber;
7759const int FileOptions::kJavaMultipleFilesFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007760const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007761const int FileOptions::kJavaStringCheckUtf8FieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007762const int FileOptions::kOptimizeForFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007763const int FileOptions::kGoPackageFieldNumber;
kenton@google.comfccb1462009-12-18 02:11:36 +00007764const int FileOptions::kCcGenericServicesFieldNumber;
7765const int FileOptions::kJavaGenericServicesFieldNumber;
7766const int FileOptions::kPyGenericServicesFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007767const int FileOptions::kDeprecatedFieldNumber;
Feng Xiaof157a562014-11-14 11:50:31 -08007768const int FileOptions::kCcEnableArenasFieldNumber;
Jisi Liu885b6122015-02-28 14:51:22 -08007769const int FileOptions::kObjcClassPrefixFieldNumber;
Jan Tattermusch685ae362015-03-16 19:07:16 -07007770const int FileOptions::kCsharpNamespaceFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007771const int FileOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07007772#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.com24bf56f2008-09-24 20:31:01 +00007773
kenton@google.com573989f2009-10-30 22:02:17 +00007774FileOptions::FileOptions()
Bo Yang5db21732015-05-21 14:28:59 -07007775 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007776 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00007777 // @@protoc_insertion_point(constructor:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00007778}
7779
kenton@google.com80b1d622009-07-29 01:13:20 +00007780void FileOptions::InitAsDefaultInstance() {
7781}
kenton@google.com24bf56f2008-09-24 20:31:01 +00007782
kenton@google.com573989f2009-10-30 22:02:17 +00007783FileOptions::FileOptions(const FileOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08007784 : ::google::protobuf::Message(),
7785 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007786 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00007787 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00007788 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00007789}
7790
kenton@google.comd37d46d2009-04-25 02:53:47 +00007791void FileOptions::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007792 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00007793 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007794 java_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7795 java_outer_classname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00007796 java_multiple_files_ = false;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007797 java_generate_equals_and_hash_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007798 java_string_check_utf8_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00007799 optimize_for_ = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007800 go_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +00007801 cc_generic_services_ = false;
7802 java_generic_services_ = false;
7803 py_generic_services_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007804 deprecated_ = false;
Feng Xiaof157a562014-11-14 11:50:31 -08007805 cc_enable_arenas_ = false;
Jisi Liu885b6122015-02-28 14:51:22 -08007806 objc_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jan Tattermusch685ae362015-03-16 19:07:16 -07007807 csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00007808 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7809}
7810
temporal40ee5512008-07-10 02:12:20 +00007811FileOptions::~FileOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007812 // @@protoc_insertion_point(destructor:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007813 SharedDtor();
7814}
7815
7816void FileOptions::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08007817 java_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7818 java_outer_classname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7819 go_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jisi Liu885b6122015-02-28 14:51:22 -08007820 objc_class_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jan Tattermusch685ae362015-03-16 19:07:16 -07007821 csharp_namespace_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00007822 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00007823 }
7824}
7825
kenton@google.comfccb1462009-12-18 02:11:36 +00007826void FileOptions::SetCachedSize(int size) const {
7827 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7828 _cached_size_ = size;
7829 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7830}
temporal40ee5512008-07-10 02:12:20 +00007831const ::google::protobuf::Descriptor* FileOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007832 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00007833 return FileOptions_descriptor_;
7834}
7835
kenton@google.com24bf56f2008-09-24 20:31:01 +00007836const FileOptions& FileOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00007837 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
7838 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00007839}
7840
7841FileOptions* FileOptions::default_instance_ = NULL;
7842
Feng Xiao6ef984a2014-11-10 17:34:54 -08007843FileOptions* FileOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08007844 FileOptions* n = new FileOptions;
7845 if (arena != NULL) {
7846 arena->Own(n);
7847 }
7848 return n;
temporal40ee5512008-07-10 02:12:20 +00007849}
7850
7851void FileOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007852 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08007853#define ZR_HELPER_(f) reinterpret_cast<char*>(\
7854 &reinterpret_cast<FileOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00007855
Jisi Liu885b6122015-02-28 14:51:22 -08007856#define ZR_(first, last) do {\
7857 ::memset(&first, 0,\
7858 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
7859} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00007860
Austin Schuhe8268372015-05-19 23:22:20 -07007861 if (_has_bits_[0 / 32] & 255u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007862 ZR_(java_multiple_files_, cc_generic_services_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00007863 if (has_java_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007864 java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007865 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007866 if (has_java_outer_classname()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007867 java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007868 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00007869 optimize_for_ = 1;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007870 if (has_go_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007871 go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007872 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007873 }
Jisi Liu3b3c8ab2016-03-30 11:39:59 -07007874 if (_has_bits_[8 / 32] & 16128u) {
7875 ZR_(java_generic_services_, cc_enable_arenas_);
Jisi Liu885b6122015-02-28 14:51:22 -08007876 if (has_objc_class_prefix()) {
7877 objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7878 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07007879 if (has_csharp_namespace()) {
7880 csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7881 }
Jisi Liu885b6122015-02-28 14:51:22 -08007882 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007883
Jisi Liu885b6122015-02-28 14:51:22 -08007884#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00007885#undef ZR_
7886
kenton@google.com24bf56f2008-09-24 20:31:01 +00007887 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00007888 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08007889 if (_internal_metadata_.have_unknown_fields()) {
7890 mutable_unknown_fields()->Clear();
7891 }
temporal40ee5512008-07-10 02:12:20 +00007892}
7893
7894bool FileOptions::MergePartialFromCodedStream(
7895 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007896#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00007897 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007898 // @@protoc_insertion_point(parse_start:google.protobuf.FileOptions)
7899 for (;;) {
7900 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
7901 tag = p.first;
7902 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00007903 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00007904 // optional string java_package = 1;
7905 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007906 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007907 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7908 input, this->mutable_java_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007909 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007910 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007911 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007912 "google.protobuf.FileOptions.java_package");
kenton@google.comfccb1462009-12-18 02:11:36 +00007913 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007914 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007915 }
temporal40ee5512008-07-10 02:12:20 +00007916 if (input->ExpectTag(66)) goto parse_java_outer_classname;
7917 break;
7918 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007919
temporal40ee5512008-07-10 02:12:20 +00007920 // optional string java_outer_classname = 8;
7921 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007922 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007923 parse_java_outer_classname:
7924 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7925 input, this->mutable_java_outer_classname()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007926 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007927 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007928 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007929 "google.protobuf.FileOptions.java_outer_classname");
kenton@google.comfccb1462009-12-18 02:11:36 +00007930 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007931 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007932 }
temporal40ee5512008-07-10 02:12:20 +00007933 if (input->ExpectTag(72)) goto parse_optimize_for;
7934 break;
7935 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007936
kenton@google.comd37d46d2009-04-25 02:53:47 +00007937 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
temporal40ee5512008-07-10 02:12:20 +00007938 case 9: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007939 if (tag == 72) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007940 parse_optimize_for:
7941 int value;
7942 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7943 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
7944 input, &value)));
7945 if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) {
7946 set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value));
7947 } else {
7948 mutable_unknown_fields()->AddVarint(9, value);
7949 }
temporal40ee5512008-07-10 02:12:20 +00007950 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007951 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007952 }
7953 if (input->ExpectTag(80)) goto parse_java_multiple_files;
7954 break;
7955 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007956
temporal40ee5512008-07-10 02:12:20 +00007957 // optional bool java_multiple_files = 10 [default = false];
7958 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007959 if (tag == 80) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007960 parse_java_multiple_files:
7961 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7962 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7963 input, &java_multiple_files_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00007964 set_has_java_multiple_files();
kenton@google.comfccb1462009-12-18 02:11:36 +00007965 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007966 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007967 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007968 if (input->ExpectTag(90)) goto parse_go_package;
7969 break;
7970 }
7971
7972 // optional string go_package = 11;
7973 case 11: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007974 if (tag == 90) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007975 parse_go_package:
7976 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7977 input, this->mutable_go_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007978 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007979 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007980 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007981 "google.protobuf.FileOptions.go_package");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007982 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007983 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007984 }
kenton@google.comfccb1462009-12-18 02:11:36 +00007985 if (input->ExpectTag(128)) goto parse_cc_generic_services;
7986 break;
7987 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007988
liujisi@google.com33165fe2010-11-02 13:14:58 +00007989 // optional bool cc_generic_services = 16 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00007990 case 16: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007991 if (tag == 128) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007992 parse_cc_generic_services:
7993 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7994 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7995 input, &cc_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00007996 set_has_cc_generic_services();
kenton@google.comfccb1462009-12-18 02:11:36 +00007997 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007998 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00007999 }
8000 if (input->ExpectTag(136)) goto parse_java_generic_services;
8001 break;
8002 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008003
liujisi@google.com33165fe2010-11-02 13:14:58 +00008004 // optional bool java_generic_services = 17 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008005 case 17: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008006 if (tag == 136) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008007 parse_java_generic_services:
8008 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8009 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8010 input, &java_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00008011 set_has_java_generic_services();
kenton@google.comfccb1462009-12-18 02:11:36 +00008012 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008013 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00008014 }
8015 if (input->ExpectTag(144)) goto parse_py_generic_services;
8016 break;
8017 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008018
liujisi@google.com33165fe2010-11-02 13:14:58 +00008019 // optional bool py_generic_services = 18 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008020 case 18: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008021 if (tag == 144) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008022 parse_py_generic_services:
8023 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8024 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8025 input, &py_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00008026 set_has_py_generic_services();
8027 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008028 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008029 }
8030 if (input->ExpectTag(160)) goto parse_java_generate_equals_and_hash;
8031 break;
8032 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008033
liujisi@google.com33165fe2010-11-02 13:14:58 +00008034 // optional bool java_generate_equals_and_hash = 20 [default = false];
8035 case 20: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008036 if (tag == 160) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008037 parse_java_generate_equals_and_hash:
8038 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8039 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8040 input, &java_generate_equals_and_hash_)));
8041 set_has_java_generate_equals_and_hash();
kenton@google.comfccb1462009-12-18 02:11:36 +00008042 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008043 goto handle_unusual;
8044 }
8045 if (input->ExpectTag(184)) goto parse_deprecated;
8046 break;
8047 }
8048
8049 // optional bool deprecated = 23 [default = false];
8050 case 23: {
8051 if (tag == 184) {
8052 parse_deprecated:
8053 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8054 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8055 input, &deprecated_)));
8056 set_has_deprecated();
8057 } else {
8058 goto handle_unusual;
8059 }
8060 if (input->ExpectTag(216)) goto parse_java_string_check_utf8;
8061 break;
8062 }
8063
8064 // optional bool java_string_check_utf8 = 27 [default = false];
8065 case 27: {
8066 if (tag == 216) {
8067 parse_java_string_check_utf8:
8068 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8069 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8070 input, &java_string_check_utf8_)));
8071 set_has_java_string_check_utf8();
8072 } else {
8073 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00008074 }
Feng Xiaof157a562014-11-14 11:50:31 -08008075 if (input->ExpectTag(248)) goto parse_cc_enable_arenas;
8076 break;
8077 }
8078
8079 // optional bool cc_enable_arenas = 31 [default = false];
8080 case 31: {
8081 if (tag == 248) {
8082 parse_cc_enable_arenas:
8083 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
8084 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
8085 input, &cc_enable_arenas_)));
8086 set_has_cc_enable_arenas();
8087 } else {
8088 goto handle_unusual;
8089 }
Jisi Liu885b6122015-02-28 14:51:22 -08008090 if (input->ExpectTag(290)) goto parse_objc_class_prefix;
8091 break;
8092 }
8093
8094 // optional string objc_class_prefix = 36;
8095 case 36: {
8096 if (tag == 290) {
8097 parse_objc_class_prefix:
8098 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
8099 input, this->mutable_objc_class_prefix()));
8100 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8101 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
8102 ::google::protobuf::internal::WireFormat::PARSE,
8103 "google.protobuf.FileOptions.objc_class_prefix");
8104 } else {
8105 goto handle_unusual;
8106 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07008107 if (input->ExpectTag(298)) goto parse_csharp_namespace;
8108 break;
8109 }
8110
8111 // optional string csharp_namespace = 37;
8112 case 37: {
8113 if (tag == 298) {
8114 parse_csharp_namespace:
8115 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
8116 input, this->mutable_csharp_namespace()));
8117 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8118 this->csharp_namespace().data(), this->csharp_namespace().length(),
8119 ::google::protobuf::internal::WireFormat::PARSE,
8120 "google.protobuf.FileOptions.csharp_namespace");
8121 } else {
8122 goto handle_unusual;
8123 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008124 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
8125 break;
8126 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008127
kenton@google.com24bf56f2008-09-24 20:31:01 +00008128 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
8129 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008130 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008131 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -07008132 DO_(input->IncrementRecursionDepth());
8133 parse_loop_uninterpreted_option:
8134 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00008135 input, add_uninterpreted_option()));
8136 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008137 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +00008138 }
Bo Yang5db21732015-05-21 14:28:59 -07008139 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
8140 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +00008141 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00008142 break;
8143 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008144
temporal40ee5512008-07-10 02:12:20 +00008145 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008146 handle_unusual:
8147 if (tag == 0 ||
8148 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00008149 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008150 goto success;
temporal40ee5512008-07-10 02:12:20 +00008151 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008152 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008153 DO_(_extensions_.ParseField(tag, input, default_instance_,
8154 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00008155 continue;
8156 }
temporal40ee5512008-07-10 02:12:20 +00008157 DO_(::google::protobuf::internal::WireFormat::SkipField(
8158 input, tag, mutable_unknown_fields()));
8159 break;
8160 }
8161 }
8162 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008163success:
8164 // @@protoc_insertion_point(parse_success:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00008165 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00008166failure:
8167 // @@protoc_insertion_point(parse_failure:google.protobuf.FileOptions)
8168 return false;
temporal40ee5512008-07-10 02:12:20 +00008169#undef DO_
8170}
8171
kenton@google.comd37d46d2009-04-25 02:53:47 +00008172void FileOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00008173 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008174 // @@protoc_insertion_point(serialize_start:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00008175 // optional string java_package = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008176 if (has_java_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008177 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008178 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008179 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008180 "google.protobuf.FileOptions.java_package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008181 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00008182 1, this->java_package(), output);
temporal40ee5512008-07-10 02:12:20 +00008183 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008184
temporal40ee5512008-07-10 02:12:20 +00008185 // optional string java_outer_classname = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008186 if (has_java_outer_classname()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008187 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008188 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008189 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008190 "google.protobuf.FileOptions.java_outer_classname");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008191 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00008192 8, this->java_outer_classname(), output);
temporal40ee5512008-07-10 02:12:20 +00008193 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008194
kenton@google.comd37d46d2009-04-25 02:53:47 +00008195 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008196 if (has_optimize_for()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008197 ::google::protobuf::internal::WireFormatLite::WriteEnum(
8198 9, this->optimize_for(), output);
temporal40ee5512008-07-10 02:12:20 +00008199 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008200
temporal40ee5512008-07-10 02:12:20 +00008201 // optional bool java_multiple_files = 10 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008202 if (has_java_multiple_files()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008203 ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output);
temporal40ee5512008-07-10 02:12:20 +00008204 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008205
8206 // optional string go_package = 11;
8207 if (has_go_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008208 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008209 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008210 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008211 "google.protobuf.FileOptions.go_package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008212 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008213 11, this->go_package(), output);
8214 }
8215
liujisi@google.com33165fe2010-11-02 13:14:58 +00008216 // optional bool cc_generic_services = 16 [default = false];
8217 if (has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008218 ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output);
8219 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008220
liujisi@google.com33165fe2010-11-02 13:14:58 +00008221 // optional bool java_generic_services = 17 [default = false];
8222 if (has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008223 ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output);
8224 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008225
liujisi@google.com33165fe2010-11-02 13:14:58 +00008226 // optional bool py_generic_services = 18 [default = false];
8227 if (has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008228 ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output);
8229 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008230
liujisi@google.com33165fe2010-11-02 13:14:58 +00008231 // optional bool java_generate_equals_and_hash = 20 [default = false];
8232 if (has_java_generate_equals_and_hash()) {
8233 ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output);
8234 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008235
jieluo@google.com4de8f552014-07-18 00:47:59 +00008236 // optional bool deprecated = 23 [default = false];
8237 if (has_deprecated()) {
8238 ::google::protobuf::internal::WireFormatLite::WriteBool(23, this->deprecated(), output);
8239 }
8240
8241 // optional bool java_string_check_utf8 = 27 [default = false];
8242 if (has_java_string_check_utf8()) {
8243 ::google::protobuf::internal::WireFormatLite::WriteBool(27, this->java_string_check_utf8(), output);
8244 }
8245
Feng Xiaof157a562014-11-14 11:50:31 -08008246 // optional bool cc_enable_arenas = 31 [default = false];
8247 if (has_cc_enable_arenas()) {
8248 ::google::protobuf::internal::WireFormatLite::WriteBool(31, this->cc_enable_arenas(), output);
8249 }
8250
Jisi Liu885b6122015-02-28 14:51:22 -08008251 // optional string objc_class_prefix = 36;
8252 if (has_objc_class_prefix()) {
8253 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8254 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
8255 ::google::protobuf::internal::WireFormat::SERIALIZE,
8256 "google.protobuf.FileOptions.objc_class_prefix");
8257 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
8258 36, this->objc_class_prefix(), output);
8259 }
8260
Jan Tattermusch685ae362015-03-16 19:07:16 -07008261 // optional string csharp_namespace = 37;
8262 if (has_csharp_namespace()) {
8263 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8264 this->csharp_namespace().data(), this->csharp_namespace().length(),
8265 ::google::protobuf::internal::WireFormat::SERIALIZE,
8266 "google.protobuf.FileOptions.csharp_namespace");
8267 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
8268 37, this->csharp_namespace(), output);
8269 }
8270
kenton@google.com24bf56f2008-09-24 20:31:01 +00008271 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08008272 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008273 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00008274 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00008275 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008276
kenton@google.com24bf56f2008-09-24 20:31:01 +00008277 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008278 _extensions_.SerializeWithCachedSizes(
8279 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008280
Feng Xiao6ef984a2014-11-10 17:34:54 -08008281 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008282 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
8283 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00008284 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008285 // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008286}
8287
8288::google::protobuf::uint8* FileOptions::SerializeWithCachedSizesToArray(
8289 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008290 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008291 // optional string java_package = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008292 if (has_java_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008293 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008294 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008295 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008296 "google.protobuf.FileOptions.java_package");
kenton@google.com80b1d622009-07-29 01:13:20 +00008297 target =
8298 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8299 1, this->java_package(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008300 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008301
kenton@google.comd37d46d2009-04-25 02:53:47 +00008302 // optional string java_outer_classname = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008303 if (has_java_outer_classname()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008304 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008305 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008306 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008307 "google.protobuf.FileOptions.java_outer_classname");
kenton@google.com80b1d622009-07-29 01:13:20 +00008308 target =
8309 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8310 8, this->java_outer_classname(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008311 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008312
kenton@google.comd37d46d2009-04-25 02:53:47 +00008313 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008314 if (has_optimize_for()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008315 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
8316 9, this->optimize_for(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008317 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008318
kenton@google.comd37d46d2009-04-25 02:53:47 +00008319 // optional bool java_multiple_files = 10 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008320 if (has_java_multiple_files()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008321 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008322 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008323
8324 // optional string go_package = 11;
8325 if (has_go_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008326 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008327 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008328 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008329 "google.protobuf.FileOptions.go_package");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008330 target =
8331 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8332 11, this->go_package(), target);
8333 }
8334
liujisi@google.com33165fe2010-11-02 13:14:58 +00008335 // optional bool cc_generic_services = 16 [default = false];
8336 if (has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008337 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target);
8338 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008339
liujisi@google.com33165fe2010-11-02 13:14:58 +00008340 // optional bool java_generic_services = 17 [default = false];
8341 if (has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008342 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target);
8343 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008344
liujisi@google.com33165fe2010-11-02 13:14:58 +00008345 // optional bool py_generic_services = 18 [default = false];
8346 if (has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008347 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target);
8348 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008349
liujisi@google.com33165fe2010-11-02 13:14:58 +00008350 // optional bool java_generate_equals_and_hash = 20 [default = false];
8351 if (has_java_generate_equals_and_hash()) {
8352 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target);
8353 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008354
jieluo@google.com4de8f552014-07-18 00:47:59 +00008355 // optional bool deprecated = 23 [default = false];
8356 if (has_deprecated()) {
8357 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(23, this->deprecated(), target);
8358 }
8359
8360 // optional bool java_string_check_utf8 = 27 [default = false];
8361 if (has_java_string_check_utf8()) {
8362 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(27, this->java_string_check_utf8(), target);
8363 }
8364
Feng Xiaof157a562014-11-14 11:50:31 -08008365 // optional bool cc_enable_arenas = 31 [default = false];
8366 if (has_cc_enable_arenas()) {
8367 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(31, this->cc_enable_arenas(), target);
8368 }
8369
Jisi Liu885b6122015-02-28 14:51:22 -08008370 // optional string objc_class_prefix = 36;
8371 if (has_objc_class_prefix()) {
8372 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8373 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
8374 ::google::protobuf::internal::WireFormat::SERIALIZE,
8375 "google.protobuf.FileOptions.objc_class_prefix");
8376 target =
8377 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8378 36, this->objc_class_prefix(), target);
8379 }
8380
Jan Tattermusch685ae362015-03-16 19:07:16 -07008381 // optional string csharp_namespace = 37;
8382 if (has_csharp_namespace()) {
8383 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8384 this->csharp_namespace().data(), this->csharp_namespace().length(),
8385 ::google::protobuf::internal::WireFormat::SERIALIZE,
8386 "google.protobuf.FileOptions.csharp_namespace");
8387 target =
8388 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8389 37, this->csharp_namespace(), target);
8390 }
8391
kenton@google.comd37d46d2009-04-25 02:53:47 +00008392 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08008393 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008394 target = ::google::protobuf::internal::WireFormatLite::
8395 WriteMessageNoVirtualToArray(
8396 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008397 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008398
kenton@google.comd37d46d2009-04-25 02:53:47 +00008399 // Extension range [1000, 536870912)
8400 target = _extensions_.SerializeWithCachedSizesToArray(
8401 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008402
Feng Xiao6ef984a2014-11-10 17:34:54 -08008403 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008404 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
8405 unknown_fields(), target);
8406 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008407 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008408 return target;
temporal40ee5512008-07-10 02:12:20 +00008409}
8410
8411int FileOptions::ByteSize() const {
8412 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008413
Austin Schuh307af622015-06-05 22:46:01 -07008414 if (_has_bits_[0 / 32] & 255u) {
temporal40ee5512008-07-10 02:12:20 +00008415 // optional string java_package = 1;
8416 if (has_java_package()) {
8417 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008418 ::google::protobuf::internal::WireFormatLite::StringSize(
8419 this->java_package());
temporal40ee5512008-07-10 02:12:20 +00008420 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008421
temporal40ee5512008-07-10 02:12:20 +00008422 // optional string java_outer_classname = 8;
8423 if (has_java_outer_classname()) {
8424 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008425 ::google::protobuf::internal::WireFormatLite::StringSize(
8426 this->java_outer_classname());
temporal40ee5512008-07-10 02:12:20 +00008427 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008428
temporal40ee5512008-07-10 02:12:20 +00008429 // optional bool java_multiple_files = 10 [default = false];
8430 if (has_java_multiple_files()) {
8431 total_size += 1 + 1;
8432 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008433
liujisi@google.com33165fe2010-11-02 13:14:58 +00008434 // optional bool java_generate_equals_and_hash = 20 [default = false];
8435 if (has_java_generate_equals_and_hash()) {
8436 total_size += 2 + 1;
8437 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008438
jieluo@google.com4de8f552014-07-18 00:47:59 +00008439 // optional bool java_string_check_utf8 = 27 [default = false];
8440 if (has_java_string_check_utf8()) {
8441 total_size += 2 + 1;
8442 }
8443
kenton@google.comd37d46d2009-04-25 02:53:47 +00008444 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
temporal40ee5512008-07-10 02:12:20 +00008445 if (has_optimize_for()) {
8446 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008447 ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for());
temporal40ee5512008-07-10 02:12:20 +00008448 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008449
8450 // optional string go_package = 11;
8451 if (has_go_package()) {
8452 total_size += 1 +
8453 ::google::protobuf::internal::WireFormatLite::StringSize(
8454 this->go_package());
8455 }
8456
liujisi@google.com33165fe2010-11-02 13:14:58 +00008457 // optional bool cc_generic_services = 16 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008458 if (has_cc_generic_services()) {
8459 total_size += 2 + 1;
8460 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008461
jieluo@google.com4de8f552014-07-18 00:47:59 +00008462 }
Jisi Liu3b3c8ab2016-03-30 11:39:59 -07008463 if (_has_bits_[8 / 32] & 16128u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008464 // optional bool java_generic_services = 17 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008465 if (has_java_generic_services()) {
8466 total_size += 2 + 1;
8467 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008468
liujisi@google.com33165fe2010-11-02 13:14:58 +00008469 // optional bool py_generic_services = 18 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008470 if (has_py_generic_services()) {
8471 total_size += 2 + 1;
8472 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008473
jieluo@google.com4de8f552014-07-18 00:47:59 +00008474 // optional bool deprecated = 23 [default = false];
8475 if (has_deprecated()) {
8476 total_size += 2 + 1;
8477 }
8478
Feng Xiaof157a562014-11-14 11:50:31 -08008479 // optional bool cc_enable_arenas = 31 [default = false];
8480 if (has_cc_enable_arenas()) {
8481 total_size += 2 + 1;
8482 }
8483
Jisi Liu885b6122015-02-28 14:51:22 -08008484 // optional string objc_class_prefix = 36;
8485 if (has_objc_class_prefix()) {
8486 total_size += 2 +
8487 ::google::protobuf::internal::WireFormatLite::StringSize(
8488 this->objc_class_prefix());
8489 }
8490
Jan Tattermusch685ae362015-03-16 19:07:16 -07008491 // optional string csharp_namespace = 37;
8492 if (has_csharp_namespace()) {
8493 total_size += 2 +
8494 ::google::protobuf::internal::WireFormatLite::StringSize(
8495 this->csharp_namespace());
8496 }
8497
temporal40ee5512008-07-10 02:12:20 +00008498 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008499 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00008500 total_size += 2 * this->uninterpreted_option_size();
8501 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00008502 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00008503 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00008504 this->uninterpreted_option(i));
8505 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008506
kenton@google.comd37d46d2009-04-25 02:53:47 +00008507 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008508
Feng Xiao6ef984a2014-11-10 17:34:54 -08008509 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00008510 total_size +=
8511 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
8512 unknown_fields());
8513 }
kenton@google.comfccb1462009-12-18 02:11:36 +00008514 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00008515 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00008516 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00008517 return total_size;
8518}
8519
8520void FileOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08008521 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07008522 const FileOptions* source =
8523 ::google::protobuf::internal::DynamicCastToGenerated<const FileOptions>(
8524 &from);
temporal40ee5512008-07-10 02:12:20 +00008525 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00008526 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00008527 } else {
8528 MergeFrom(*source);
8529 }
8530}
8531
8532void FileOptions::MergeFrom(const FileOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08008533 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +00008534 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00008535 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008536 if (from.has_java_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008537 set_has_java_package();
8538 java_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_package_);
temporal40ee5512008-07-10 02:12:20 +00008539 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008540 if (from.has_java_outer_classname()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008541 set_has_java_outer_classname();
8542 java_outer_classname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_outer_classname_);
temporal40ee5512008-07-10 02:12:20 +00008543 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008544 if (from.has_java_multiple_files()) {
temporal40ee5512008-07-10 02:12:20 +00008545 set_java_multiple_files(from.java_multiple_files());
8546 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008547 if (from.has_java_generate_equals_and_hash()) {
8548 set_java_generate_equals_and_hash(from.java_generate_equals_and_hash());
8549 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008550 if (from.has_java_string_check_utf8()) {
8551 set_java_string_check_utf8(from.java_string_check_utf8());
8552 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008553 if (from.has_optimize_for()) {
temporal40ee5512008-07-10 02:12:20 +00008554 set_optimize_for(from.optimize_for());
8555 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008556 if (from.has_go_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008557 set_has_go_package();
8558 go_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.go_package_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008559 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008560 if (from.has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008561 set_cc_generic_services(from.cc_generic_services());
8562 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008563 }
8564 if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008565 if (from.has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008566 set_java_generic_services(from.java_generic_services());
8567 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008568 if (from.has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008569 set_py_generic_services(from.py_generic_services());
8570 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008571 if (from.has_deprecated()) {
8572 set_deprecated(from.deprecated());
8573 }
Feng Xiaof157a562014-11-14 11:50:31 -08008574 if (from.has_cc_enable_arenas()) {
8575 set_cc_enable_arenas(from.cc_enable_arenas());
8576 }
Jisi Liu885b6122015-02-28 14:51:22 -08008577 if (from.has_objc_class_prefix()) {
8578 set_has_objc_class_prefix();
8579 objc_class_prefix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.objc_class_prefix_);
8580 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07008581 if (from.has_csharp_namespace()) {
8582 set_has_csharp_namespace();
8583 csharp_namespace_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace_);
8584 }
temporal40ee5512008-07-10 02:12:20 +00008585 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008586 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08008587 if (from._internal_metadata_.have_unknown_fields()) {
8588 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
8589 }
temporal40ee5512008-07-10 02:12:20 +00008590}
8591
8592void FileOptions::CopyFrom(const ::google::protobuf::Message& from) {
8593 if (&from == this) return;
8594 Clear();
8595 MergeFrom(from);
8596}
8597
8598void FileOptions::CopyFrom(const FileOptions& from) {
8599 if (&from == this) return;
8600 Clear();
8601 MergeFrom(from);
8602}
8603
kenton@google.comceb561d2009-06-25 19:05:36 +00008604bool FileOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008605
jieluo@google.com4de8f552014-07-18 00:47:59 +00008606 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008607
kenton@google.comceb561d2009-06-25 19:05:36 +00008608 if (!_extensions_.IsInitialized()) return false; return true;
8609}
8610
kenton@google.com26bd9ee2008-11-21 00:06:27 +00008611void FileOptions::Swap(FileOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08008612 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08008613 InternalSwap(other);
8614}
8615void FileOptions::InternalSwap(FileOptions* other) {
8616 java_package_.Swap(&other->java_package_);
8617 java_outer_classname_.Swap(&other->java_outer_classname_);
8618 std::swap(java_multiple_files_, other->java_multiple_files_);
8619 std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_);
8620 std::swap(java_string_check_utf8_, other->java_string_check_utf8_);
8621 std::swap(optimize_for_, other->optimize_for_);
8622 go_package_.Swap(&other->go_package_);
8623 std::swap(cc_generic_services_, other->cc_generic_services_);
8624 std::swap(java_generic_services_, other->java_generic_services_);
8625 std::swap(py_generic_services_, other->py_generic_services_);
8626 std::swap(deprecated_, other->deprecated_);
Feng Xiaof157a562014-11-14 11:50:31 -08008627 std::swap(cc_enable_arenas_, other->cc_enable_arenas_);
Jisi Liu885b6122015-02-28 14:51:22 -08008628 objc_class_prefix_.Swap(&other->objc_class_prefix_);
Jan Tattermusch685ae362015-03-16 19:07:16 -07008629 csharp_namespace_.Swap(&other->csharp_namespace_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08008630 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
8631 std::swap(_has_bits_[0], other->_has_bits_[0]);
8632 _internal_metadata_.Swap(&other->_internal_metadata_);
8633 std::swap(_cached_size_, other->_cached_size_);
8634 _extensions_.Swap(&other->_extensions_);
8635}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00008636
kenton@google.com80b1d622009-07-29 01:13:20 +00008637::google::protobuf::Metadata FileOptions::GetMetadata() const {
8638 protobuf_AssignDescriptorsOnce();
8639 ::google::protobuf::Metadata metadata;
8640 metadata.descriptor = FileOptions_descriptor_;
8641 metadata.reflection = FileOptions_reflection_;
8642 return metadata;
temporal40ee5512008-07-10 02:12:20 +00008643}
8644
Jisi Liu885b6122015-02-28 14:51:22 -08008645#if PROTOBUF_INLINE_NOT_IN_HEADERS
8646// FileOptions
8647
8648// optional string java_package = 1;
Bo Yang5db21732015-05-21 14:28:59 -07008649bool FileOptions::has_java_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008650 return (_has_bits_[0] & 0x00000001u) != 0;
8651}
Bo Yang5db21732015-05-21 14:28:59 -07008652void FileOptions::set_has_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008653 _has_bits_[0] |= 0x00000001u;
8654}
Bo Yang5db21732015-05-21 14:28:59 -07008655void FileOptions::clear_has_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008656 _has_bits_[0] &= ~0x00000001u;
8657}
Bo Yang5db21732015-05-21 14:28:59 -07008658void FileOptions::clear_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008659 java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8660 clear_has_java_package();
8661}
8662 const ::std::string& FileOptions::java_package() const {
8663 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package)
8664 return java_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8665}
8666 void FileOptions::set_java_package(const ::std::string& value) {
8667 set_has_java_package();
8668 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8669 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package)
8670}
8671 void FileOptions::set_java_package(const char* value) {
8672 set_has_java_package();
8673 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8674 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package)
8675}
8676 void FileOptions::set_java_package(const char* value, size_t size) {
8677 set_has_java_package();
8678 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8679 ::std::string(reinterpret_cast<const char*>(value), size));
8680 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package)
8681}
8682 ::std::string* FileOptions::mutable_java_package() {
8683 set_has_java_package();
8684 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package)
8685 return java_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8686}
8687 ::std::string* FileOptions::release_java_package() {
8688 clear_has_java_package();
8689 return java_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8690}
8691 void FileOptions::set_allocated_java_package(::std::string* java_package) {
8692 if (java_package != NULL) {
8693 set_has_java_package();
8694 } else {
8695 clear_has_java_package();
8696 }
8697 java_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_package);
8698 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package)
8699}
8700
8701// optional string java_outer_classname = 8;
Bo Yang5db21732015-05-21 14:28:59 -07008702bool FileOptions::has_java_outer_classname() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008703 return (_has_bits_[0] & 0x00000002u) != 0;
8704}
Bo Yang5db21732015-05-21 14:28:59 -07008705void FileOptions::set_has_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008706 _has_bits_[0] |= 0x00000002u;
8707}
Bo Yang5db21732015-05-21 14:28:59 -07008708void FileOptions::clear_has_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008709 _has_bits_[0] &= ~0x00000002u;
8710}
Bo Yang5db21732015-05-21 14:28:59 -07008711void FileOptions::clear_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008712 java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8713 clear_has_java_outer_classname();
8714}
8715 const ::std::string& FileOptions::java_outer_classname() const {
8716 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname)
8717 return java_outer_classname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8718}
8719 void FileOptions::set_java_outer_classname(const ::std::string& value) {
8720 set_has_java_outer_classname();
8721 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8722 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname)
8723}
8724 void FileOptions::set_java_outer_classname(const char* value) {
8725 set_has_java_outer_classname();
8726 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8727 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_outer_classname)
8728}
8729 void FileOptions::set_java_outer_classname(const char* value, size_t size) {
8730 set_has_java_outer_classname();
8731 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8732 ::std::string(reinterpret_cast<const char*>(value), size));
8733 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname)
8734}
8735 ::std::string* FileOptions::mutable_java_outer_classname() {
8736 set_has_java_outer_classname();
8737 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname)
8738 return java_outer_classname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8739}
8740 ::std::string* FileOptions::release_java_outer_classname() {
8741 clear_has_java_outer_classname();
8742 return java_outer_classname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8743}
8744 void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) {
8745 if (java_outer_classname != NULL) {
8746 set_has_java_outer_classname();
8747 } else {
8748 clear_has_java_outer_classname();
8749 }
8750 java_outer_classname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_outer_classname);
8751 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname)
8752}
8753
8754// optional bool java_multiple_files = 10 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008755bool FileOptions::has_java_multiple_files() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008756 return (_has_bits_[0] & 0x00000004u) != 0;
8757}
Bo Yang5db21732015-05-21 14:28:59 -07008758void FileOptions::set_has_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008759 _has_bits_[0] |= 0x00000004u;
8760}
Bo Yang5db21732015-05-21 14:28:59 -07008761void FileOptions::clear_has_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008762 _has_bits_[0] &= ~0x00000004u;
8763}
Bo Yang5db21732015-05-21 14:28:59 -07008764void FileOptions::clear_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008765 java_multiple_files_ = false;
8766 clear_has_java_multiple_files();
8767}
8768 bool FileOptions::java_multiple_files() const {
8769 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_multiple_files)
8770 return java_multiple_files_;
8771}
8772 void FileOptions::set_java_multiple_files(bool value) {
8773 set_has_java_multiple_files();
8774 java_multiple_files_ = value;
8775 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files)
8776}
8777
8778// optional bool java_generate_equals_and_hash = 20 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008779bool FileOptions::has_java_generate_equals_and_hash() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008780 return (_has_bits_[0] & 0x00000008u) != 0;
8781}
Bo Yang5db21732015-05-21 14:28:59 -07008782void FileOptions::set_has_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008783 _has_bits_[0] |= 0x00000008u;
8784}
Bo Yang5db21732015-05-21 14:28:59 -07008785void FileOptions::clear_has_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008786 _has_bits_[0] &= ~0x00000008u;
8787}
Bo Yang5db21732015-05-21 14:28:59 -07008788void FileOptions::clear_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008789 java_generate_equals_and_hash_ = false;
8790 clear_has_java_generate_equals_and_hash();
8791}
8792 bool FileOptions::java_generate_equals_and_hash() const {
8793 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash)
8794 return java_generate_equals_and_hash_;
8795}
8796 void FileOptions::set_java_generate_equals_and_hash(bool value) {
8797 set_has_java_generate_equals_and_hash();
8798 java_generate_equals_and_hash_ = value;
8799 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generate_equals_and_hash)
8800}
8801
8802// optional bool java_string_check_utf8 = 27 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008803bool FileOptions::has_java_string_check_utf8() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008804 return (_has_bits_[0] & 0x00000010u) != 0;
8805}
Bo Yang5db21732015-05-21 14:28:59 -07008806void FileOptions::set_has_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008807 _has_bits_[0] |= 0x00000010u;
8808}
Bo Yang5db21732015-05-21 14:28:59 -07008809void FileOptions::clear_has_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008810 _has_bits_[0] &= ~0x00000010u;
8811}
Bo Yang5db21732015-05-21 14:28:59 -07008812void FileOptions::clear_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008813 java_string_check_utf8_ = false;
8814 clear_has_java_string_check_utf8();
8815}
8816 bool FileOptions::java_string_check_utf8() const {
8817 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_string_check_utf8)
8818 return java_string_check_utf8_;
8819}
8820 void FileOptions::set_java_string_check_utf8(bool value) {
8821 set_has_java_string_check_utf8();
8822 java_string_check_utf8_ = value;
8823 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_string_check_utf8)
8824}
8825
8826// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
Bo Yang5db21732015-05-21 14:28:59 -07008827bool FileOptions::has_optimize_for() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008828 return (_has_bits_[0] & 0x00000020u) != 0;
8829}
Bo Yang5db21732015-05-21 14:28:59 -07008830void FileOptions::set_has_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008831 _has_bits_[0] |= 0x00000020u;
8832}
Bo Yang5db21732015-05-21 14:28:59 -07008833void FileOptions::clear_has_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008834 _has_bits_[0] &= ~0x00000020u;
8835}
Bo Yang5db21732015-05-21 14:28:59 -07008836void FileOptions::clear_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008837 optimize_for_ = 1;
8838 clear_has_optimize_for();
8839}
8840 ::google::protobuf::FileOptions_OptimizeMode FileOptions::optimize_for() const {
8841 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.optimize_for)
8842 return static_cast< ::google::protobuf::FileOptions_OptimizeMode >(optimize_for_);
8843}
8844 void FileOptions::set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value) {
8845 assert(::google::protobuf::FileOptions_OptimizeMode_IsValid(value));
8846 set_has_optimize_for();
8847 optimize_for_ = value;
8848 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.optimize_for)
8849}
8850
8851// optional string go_package = 11;
Bo Yang5db21732015-05-21 14:28:59 -07008852bool FileOptions::has_go_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008853 return (_has_bits_[0] & 0x00000040u) != 0;
8854}
Bo Yang5db21732015-05-21 14:28:59 -07008855void FileOptions::set_has_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008856 _has_bits_[0] |= 0x00000040u;
8857}
Bo Yang5db21732015-05-21 14:28:59 -07008858void FileOptions::clear_has_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008859 _has_bits_[0] &= ~0x00000040u;
8860}
Bo Yang5db21732015-05-21 14:28:59 -07008861void FileOptions::clear_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008862 go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8863 clear_has_go_package();
8864}
8865 const ::std::string& FileOptions::go_package() const {
8866 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package)
8867 return go_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8868}
8869 void FileOptions::set_go_package(const ::std::string& value) {
8870 set_has_go_package();
8871 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8872 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package)
8873}
8874 void FileOptions::set_go_package(const char* value) {
8875 set_has_go_package();
8876 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8877 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package)
8878}
8879 void FileOptions::set_go_package(const char* value, size_t size) {
8880 set_has_go_package();
8881 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8882 ::std::string(reinterpret_cast<const char*>(value), size));
8883 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package)
8884}
8885 ::std::string* FileOptions::mutable_go_package() {
8886 set_has_go_package();
8887 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package)
8888 return go_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8889}
8890 ::std::string* FileOptions::release_go_package() {
8891 clear_has_go_package();
8892 return go_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8893}
8894 void FileOptions::set_allocated_go_package(::std::string* go_package) {
8895 if (go_package != NULL) {
8896 set_has_go_package();
8897 } else {
8898 clear_has_go_package();
8899 }
8900 go_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), go_package);
8901 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package)
8902}
8903
8904// optional bool cc_generic_services = 16 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008905bool FileOptions::has_cc_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008906 return (_has_bits_[0] & 0x00000080u) != 0;
8907}
Bo Yang5db21732015-05-21 14:28:59 -07008908void FileOptions::set_has_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008909 _has_bits_[0] |= 0x00000080u;
8910}
Bo Yang5db21732015-05-21 14:28:59 -07008911void FileOptions::clear_has_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008912 _has_bits_[0] &= ~0x00000080u;
8913}
Bo Yang5db21732015-05-21 14:28:59 -07008914void FileOptions::clear_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008915 cc_generic_services_ = false;
8916 clear_has_cc_generic_services();
8917}
8918 bool FileOptions::cc_generic_services() const {
8919 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services)
8920 return cc_generic_services_;
8921}
8922 void FileOptions::set_cc_generic_services(bool value) {
8923 set_has_cc_generic_services();
8924 cc_generic_services_ = value;
8925 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_generic_services)
8926}
8927
8928// optional bool java_generic_services = 17 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008929bool FileOptions::has_java_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008930 return (_has_bits_[0] & 0x00000100u) != 0;
8931}
Bo Yang5db21732015-05-21 14:28:59 -07008932void FileOptions::set_has_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008933 _has_bits_[0] |= 0x00000100u;
8934}
Bo Yang5db21732015-05-21 14:28:59 -07008935void FileOptions::clear_has_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008936 _has_bits_[0] &= ~0x00000100u;
8937}
Bo Yang5db21732015-05-21 14:28:59 -07008938void FileOptions::clear_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008939 java_generic_services_ = false;
8940 clear_has_java_generic_services();
8941}
8942 bool FileOptions::java_generic_services() const {
8943 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generic_services)
8944 return java_generic_services_;
8945}
8946 void FileOptions::set_java_generic_services(bool value) {
8947 set_has_java_generic_services();
8948 java_generic_services_ = value;
8949 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generic_services)
8950}
8951
8952// optional bool py_generic_services = 18 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008953bool FileOptions::has_py_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008954 return (_has_bits_[0] & 0x00000200u) != 0;
8955}
Bo Yang5db21732015-05-21 14:28:59 -07008956void FileOptions::set_has_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008957 _has_bits_[0] |= 0x00000200u;
8958}
Bo Yang5db21732015-05-21 14:28:59 -07008959void FileOptions::clear_has_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008960 _has_bits_[0] &= ~0x00000200u;
8961}
Bo Yang5db21732015-05-21 14:28:59 -07008962void FileOptions::clear_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008963 py_generic_services_ = false;
8964 clear_has_py_generic_services();
8965}
8966 bool FileOptions::py_generic_services() const {
8967 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.py_generic_services)
8968 return py_generic_services_;
8969}
8970 void FileOptions::set_py_generic_services(bool value) {
8971 set_has_py_generic_services();
8972 py_generic_services_ = value;
8973 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.py_generic_services)
8974}
8975
8976// optional bool deprecated = 23 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008977bool FileOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008978 return (_has_bits_[0] & 0x00000400u) != 0;
8979}
Bo Yang5db21732015-05-21 14:28:59 -07008980void FileOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08008981 _has_bits_[0] |= 0x00000400u;
8982}
Bo Yang5db21732015-05-21 14:28:59 -07008983void FileOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08008984 _has_bits_[0] &= ~0x00000400u;
8985}
Bo Yang5db21732015-05-21 14:28:59 -07008986void FileOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08008987 deprecated_ = false;
8988 clear_has_deprecated();
8989}
8990 bool FileOptions::deprecated() const {
8991 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.deprecated)
8992 return deprecated_;
8993}
8994 void FileOptions::set_deprecated(bool value) {
8995 set_has_deprecated();
8996 deprecated_ = value;
8997 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.deprecated)
8998}
8999
9000// optional bool cc_enable_arenas = 31 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009001bool FileOptions::has_cc_enable_arenas() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009002 return (_has_bits_[0] & 0x00000800u) != 0;
9003}
Bo Yang5db21732015-05-21 14:28:59 -07009004void FileOptions::set_has_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08009005 _has_bits_[0] |= 0x00000800u;
9006}
Bo Yang5db21732015-05-21 14:28:59 -07009007void FileOptions::clear_has_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08009008 _has_bits_[0] &= ~0x00000800u;
9009}
Bo Yang5db21732015-05-21 14:28:59 -07009010void FileOptions::clear_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08009011 cc_enable_arenas_ = false;
9012 clear_has_cc_enable_arenas();
9013}
9014 bool FileOptions::cc_enable_arenas() const {
9015 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_enable_arenas)
9016 return cc_enable_arenas_;
9017}
9018 void FileOptions::set_cc_enable_arenas(bool value) {
9019 set_has_cc_enable_arenas();
9020 cc_enable_arenas_ = value;
9021 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_enable_arenas)
9022}
9023
9024// optional string objc_class_prefix = 36;
Bo Yang5db21732015-05-21 14:28:59 -07009025bool FileOptions::has_objc_class_prefix() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009026 return (_has_bits_[0] & 0x00001000u) != 0;
9027}
Bo Yang5db21732015-05-21 14:28:59 -07009028void FileOptions::set_has_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08009029 _has_bits_[0] |= 0x00001000u;
9030}
Bo Yang5db21732015-05-21 14:28:59 -07009031void FileOptions::clear_has_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08009032 _has_bits_[0] &= ~0x00001000u;
9033}
Bo Yang5db21732015-05-21 14:28:59 -07009034void FileOptions::clear_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08009035 objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9036 clear_has_objc_class_prefix();
9037}
9038 const ::std::string& FileOptions::objc_class_prefix() const {
9039 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix)
9040 return objc_class_prefix_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9041}
9042 void FileOptions::set_objc_class_prefix(const ::std::string& value) {
9043 set_has_objc_class_prefix();
9044 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
9045 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix)
9046}
9047 void FileOptions::set_objc_class_prefix(const char* value) {
9048 set_has_objc_class_prefix();
9049 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
9050 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.objc_class_prefix)
9051}
9052 void FileOptions::set_objc_class_prefix(const char* value, size_t size) {
9053 set_has_objc_class_prefix();
9054 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
9055 ::std::string(reinterpret_cast<const char*>(value), size));
9056 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.objc_class_prefix)
9057}
9058 ::std::string* FileOptions::mutable_objc_class_prefix() {
9059 set_has_objc_class_prefix();
9060 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix)
9061 return objc_class_prefix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9062}
9063 ::std::string* FileOptions::release_objc_class_prefix() {
9064 clear_has_objc_class_prefix();
9065 return objc_class_prefix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9066}
9067 void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_class_prefix) {
9068 if (objc_class_prefix != NULL) {
9069 set_has_objc_class_prefix();
9070 } else {
9071 clear_has_objc_class_prefix();
9072 }
9073 objc_class_prefix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), objc_class_prefix);
9074 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix)
9075}
9076
Jan Tattermusch685ae362015-03-16 19:07:16 -07009077// optional string csharp_namespace = 37;
Bo Yang5db21732015-05-21 14:28:59 -07009078bool FileOptions::has_csharp_namespace() const {
Jan Tattermusch685ae362015-03-16 19:07:16 -07009079 return (_has_bits_[0] & 0x00002000u) != 0;
9080}
Bo Yang5db21732015-05-21 14:28:59 -07009081void FileOptions::set_has_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07009082 _has_bits_[0] |= 0x00002000u;
9083}
Bo Yang5db21732015-05-21 14:28:59 -07009084void FileOptions::clear_has_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07009085 _has_bits_[0] &= ~0x00002000u;
9086}
Bo Yang5db21732015-05-21 14:28:59 -07009087void FileOptions::clear_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07009088 csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9089 clear_has_csharp_namespace();
9090}
9091 const ::std::string& FileOptions::csharp_namespace() const {
9092 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace)
9093 return csharp_namespace_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9094}
9095 void FileOptions::set_csharp_namespace(const ::std::string& value) {
9096 set_has_csharp_namespace();
9097 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
9098 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace)
9099}
9100 void FileOptions::set_csharp_namespace(const char* value) {
9101 set_has_csharp_namespace();
9102 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
9103 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.csharp_namespace)
9104}
9105 void FileOptions::set_csharp_namespace(const char* value, size_t size) {
9106 set_has_csharp_namespace();
9107 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
9108 ::std::string(reinterpret_cast<const char*>(value), size));
9109 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.csharp_namespace)
9110}
9111 ::std::string* FileOptions::mutable_csharp_namespace() {
9112 set_has_csharp_namespace();
9113 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace)
9114 return csharp_namespace_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9115}
9116 ::std::string* FileOptions::release_csharp_namespace() {
9117 clear_has_csharp_namespace();
9118 return csharp_namespace_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
9119}
9120 void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_namespace) {
9121 if (csharp_namespace != NULL) {
9122 set_has_csharp_namespace();
9123 } else {
9124 clear_has_csharp_namespace();
9125 }
9126 csharp_namespace_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), csharp_namespace);
9127 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
9128}
9129
Jisi Liu885b6122015-02-28 14:51:22 -08009130// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -07009131int FileOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009132 return uninterpreted_option_.size();
9133}
Bo Yang5db21732015-05-21 14:28:59 -07009134void FileOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009135 uninterpreted_option_.Clear();
9136}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009137const ::google::protobuf::UninterpretedOption& FileOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08009138 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.uninterpreted_option)
9139 return uninterpreted_option_.Get(index);
9140}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009141::google::protobuf::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08009142 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.uninterpreted_option)
9143 return uninterpreted_option_.Mutable(index);
9144}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009145::google::protobuf::UninterpretedOption* FileOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009146 // @@protoc_insertion_point(field_add:google.protobuf.FileOptions.uninterpreted_option)
9147 return uninterpreted_option_.Add();
9148}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009149::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -08009150FileOptions::mutable_uninterpreted_option() {
9151 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option)
9152 return &uninterpreted_option_;
9153}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009154const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
9155FileOptions::uninterpreted_option() const {
9156 // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option)
9157 return uninterpreted_option_;
9158}
Jisi Liu885b6122015-02-28 14:51:22 -08009159
9160#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00009161
9162// ===================================================================
9163
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009164#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009165const int MessageOptions::kMessageSetWireFormatFieldNumber;
kenton@google.com80b1d622009-07-29 01:13:20 +00009166const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009167const int MessageOptions::kDeprecatedFieldNumber;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009168const int MessageOptions::kMapEntryFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009169const int MessageOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009170#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +00009171
kenton@google.com573989f2009-10-30 22:02:17 +00009172MessageOptions::MessageOptions()
Bo Yang5db21732015-05-21 14:28:59 -07009173 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009174 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009175 // @@protoc_insertion_point(constructor:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009176}
9177
kenton@google.com80b1d622009-07-29 01:13:20 +00009178void MessageOptions::InitAsDefaultInstance() {
9179}
kenton@google.com24bf56f2008-09-24 20:31:01 +00009180
kenton@google.com573989f2009-10-30 22:02:17 +00009181MessageOptions::MessageOptions(const MessageOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08009182 : ::google::protobuf::Message(),
9183 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009184 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00009185 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009186 // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009187}
9188
kenton@google.comd37d46d2009-04-25 02:53:47 +00009189void MessageOptions::SharedCtor() {
9190 _cached_size_ = 0;
9191 message_set_wire_format_ = false;
kenton@google.com80b1d622009-07-29 01:13:20 +00009192 no_standard_descriptor_accessor_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009193 deprecated_ = false;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009194 map_entry_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009195 ::memset(_has_bits_, 0, sizeof(_has_bits_));
9196}
9197
temporal40ee5512008-07-10 02:12:20 +00009198MessageOptions::~MessageOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009199 // @@protoc_insertion_point(destructor:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009200 SharedDtor();
9201}
9202
9203void MessageOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009204 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00009205 }
9206}
9207
kenton@google.comfccb1462009-12-18 02:11:36 +00009208void MessageOptions::SetCachedSize(int size) const {
9209 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
9210 _cached_size_ = size;
9211 GOOGLE_SAFE_CONCURRENT_WRITES_END();
9212}
temporal40ee5512008-07-10 02:12:20 +00009213const ::google::protobuf::Descriptor* MessageOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009214 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009215 return MessageOptions_descriptor_;
9216}
9217
kenton@google.com24bf56f2008-09-24 20:31:01 +00009218const MessageOptions& MessageOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00009219 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
9220 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009221}
9222
9223MessageOptions* MessageOptions::default_instance_ = NULL;
9224
Feng Xiao6ef984a2014-11-10 17:34:54 -08009225MessageOptions* MessageOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08009226 MessageOptions* n = new MessageOptions;
9227 if (arena != NULL) {
9228 arena->Own(n);
9229 }
9230 return n;
temporal40ee5512008-07-10 02:12:20 +00009231}
9232
9233void MessageOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009234 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08009235#define ZR_HELPER_(f) reinterpret_cast<char*>(\
9236 &reinterpret_cast<MessageOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009237
Jisi Liu885b6122015-02-28 14:51:22 -08009238#define ZR_(first, last) do {\
9239 ::memset(&first, 0,\
9240 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
9241} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009242
Feng Xiao6ef984a2014-11-10 17:34:54 -08009243 ZR_(message_set_wire_format_, map_entry_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009244
Jisi Liu885b6122015-02-28 14:51:22 -08009245#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00009246#undef ZR_
9247
kenton@google.com24bf56f2008-09-24 20:31:01 +00009248 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00009249 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08009250 if (_internal_metadata_.have_unknown_fields()) {
9251 mutable_unknown_fields()->Clear();
9252 }
temporal40ee5512008-07-10 02:12:20 +00009253}
9254
9255bool MessageOptions::MergePartialFromCodedStream(
9256 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009257#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00009258 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009259 // @@protoc_insertion_point(parse_start:google.protobuf.MessageOptions)
9260 for (;;) {
9261 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
9262 tag = p.first;
9263 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009264 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00009265 // optional bool message_set_wire_format = 1 [default = false];
9266 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009267 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009268 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9269 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9270 input, &message_set_wire_format_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009271 set_has_message_set_wire_format();
kenton@google.comfccb1462009-12-18 02:11:36 +00009272 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009273 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00009274 }
kenton@google.com80b1d622009-07-29 01:13:20 +00009275 if (input->ExpectTag(16)) goto parse_no_standard_descriptor_accessor;
9276 break;
9277 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009278
kenton@google.com80b1d622009-07-29 01:13:20 +00009279 // optional bool no_standard_descriptor_accessor = 2 [default = false];
9280 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009281 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009282 parse_no_standard_descriptor_accessor:
9283 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9284 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9285 input, &no_standard_descriptor_accessor_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009286 set_has_no_standard_descriptor_accessor();
kenton@google.comfccb1462009-12-18 02:11:36 +00009287 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009288 goto handle_unusual;
9289 }
9290 if (input->ExpectTag(24)) goto parse_deprecated;
9291 break;
9292 }
9293
9294 // optional bool deprecated = 3 [default = false];
9295 case 3: {
9296 if (tag == 24) {
9297 parse_deprecated:
9298 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9299 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9300 input, &deprecated_)));
9301 set_has_deprecated();
9302 } else {
9303 goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009304 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08009305 if (input->ExpectTag(56)) goto parse_map_entry;
9306 break;
9307 }
9308
9309 // optional bool map_entry = 7;
9310 case 7: {
9311 if (tag == 56) {
9312 parse_map_entry:
9313 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9314 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9315 input, &map_entry_)));
9316 set_has_map_entry();
9317 } else {
9318 goto handle_unusual;
9319 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009320 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
9321 break;
9322 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009323
kenton@google.com24bf56f2008-09-24 20:31:01 +00009324 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
9325 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009326 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009327 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -07009328 DO_(input->IncrementRecursionDepth());
9329 parse_loop_uninterpreted_option:
9330 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00009331 input, add_uninterpreted_option()));
9332 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009333 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009334 }
Bo Yang5db21732015-05-21 14:28:59 -07009335 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
9336 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009337 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00009338 break;
9339 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009340
temporal40ee5512008-07-10 02:12:20 +00009341 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009342 handle_unusual:
9343 if (tag == 0 ||
9344 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00009345 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009346 goto success;
temporal40ee5512008-07-10 02:12:20 +00009347 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009348 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009349 DO_(_extensions_.ParseField(tag, input, default_instance_,
9350 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00009351 continue;
9352 }
temporal40ee5512008-07-10 02:12:20 +00009353 DO_(::google::protobuf::internal::WireFormat::SkipField(
9354 input, tag, mutable_unknown_fields()));
9355 break;
9356 }
9357 }
9358 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009359success:
9360 // @@protoc_insertion_point(parse_success:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009361 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009362failure:
9363 // @@protoc_insertion_point(parse_failure:google.protobuf.MessageOptions)
9364 return false;
temporal40ee5512008-07-10 02:12:20 +00009365#undef DO_
9366}
9367
kenton@google.comd37d46d2009-04-25 02:53:47 +00009368void MessageOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00009369 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009370 // @@protoc_insertion_point(serialize_start:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009371 // optional bool message_set_wire_format = 1 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009372 if (has_message_set_wire_format()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009373 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output);
9374 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009375
kenton@google.com80b1d622009-07-29 01:13:20 +00009376 // optional bool no_standard_descriptor_accessor = 2 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009377 if (has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009378 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output);
temporal40ee5512008-07-10 02:12:20 +00009379 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009380
jieluo@google.com4de8f552014-07-18 00:47:59 +00009381 // optional bool deprecated = 3 [default = false];
9382 if (has_deprecated()) {
9383 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
9384 }
9385
Feng Xiao6ef984a2014-11-10 17:34:54 -08009386 // optional bool map_entry = 7;
9387 if (has_map_entry()) {
9388 ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->map_entry(), output);
9389 }
9390
kenton@google.com24bf56f2008-09-24 20:31:01 +00009391 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08009392 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009393 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00009394 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00009395 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009396
kenton@google.com24bf56f2008-09-24 20:31:01 +00009397 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009398 _extensions_.SerializeWithCachedSizes(
9399 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009400
Feng Xiao6ef984a2014-11-10 17:34:54 -08009401 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009402 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
9403 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00009404 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009405 // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009406}
9407
9408::google::protobuf::uint8* MessageOptions::SerializeWithCachedSizesToArray(
9409 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009410 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009411 // optional bool message_set_wire_format = 1 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009412 if (has_message_set_wire_format()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009413 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target);
9414 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009415
kenton@google.com80b1d622009-07-29 01:13:20 +00009416 // optional bool no_standard_descriptor_accessor = 2 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009417 if (has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009418 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009419 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009420
jieluo@google.com4de8f552014-07-18 00:47:59 +00009421 // optional bool deprecated = 3 [default = false];
9422 if (has_deprecated()) {
9423 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
9424 }
9425
Feng Xiao6ef984a2014-11-10 17:34:54 -08009426 // optional bool map_entry = 7;
9427 if (has_map_entry()) {
9428 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->map_entry(), target);
9429 }
9430
kenton@google.comd37d46d2009-04-25 02:53:47 +00009431 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08009432 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009433 target = ::google::protobuf::internal::WireFormatLite::
9434 WriteMessageNoVirtualToArray(
9435 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009436 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009437
kenton@google.comd37d46d2009-04-25 02:53:47 +00009438 // Extension range [1000, 536870912)
9439 target = _extensions_.SerializeWithCachedSizesToArray(
9440 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009441
Feng Xiao6ef984a2014-11-10 17:34:54 -08009442 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009443 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
9444 unknown_fields(), target);
9445 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009446 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009447 return target;
temporal40ee5512008-07-10 02:12:20 +00009448}
9449
9450int MessageOptions::ByteSize() const {
9451 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009452
Austin Schuh307af622015-06-05 22:46:01 -07009453 if (_has_bits_[0 / 32] & 15u) {
temporal40ee5512008-07-10 02:12:20 +00009454 // optional bool message_set_wire_format = 1 [default = false];
9455 if (has_message_set_wire_format()) {
9456 total_size += 1 + 1;
9457 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009458
kenton@google.com80b1d622009-07-29 01:13:20 +00009459 // optional bool no_standard_descriptor_accessor = 2 [default = false];
9460 if (has_no_standard_descriptor_accessor()) {
9461 total_size += 1 + 1;
9462 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009463
jieluo@google.com4de8f552014-07-18 00:47:59 +00009464 // optional bool deprecated = 3 [default = false];
9465 if (has_deprecated()) {
9466 total_size += 1 + 1;
9467 }
9468
Feng Xiao6ef984a2014-11-10 17:34:54 -08009469 // optional bool map_entry = 7;
9470 if (has_map_entry()) {
9471 total_size += 1 + 1;
9472 }
9473
temporal40ee5512008-07-10 02:12:20 +00009474 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009475 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00009476 total_size += 2 * this->uninterpreted_option_size();
9477 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009478 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00009479 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00009480 this->uninterpreted_option(i));
9481 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009482
kenton@google.comd37d46d2009-04-25 02:53:47 +00009483 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009484
Feng Xiao6ef984a2014-11-10 17:34:54 -08009485 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00009486 total_size +=
9487 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
9488 unknown_fields());
9489 }
kenton@google.comfccb1462009-12-18 02:11:36 +00009490 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00009491 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00009492 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00009493 return total_size;
9494}
9495
9496void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08009497 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07009498 const MessageOptions* source =
9499 ::google::protobuf::internal::DynamicCastToGenerated<const MessageOptions>(
9500 &from);
temporal40ee5512008-07-10 02:12:20 +00009501 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00009502 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00009503 } else {
9504 MergeFrom(*source);
9505 }
9506}
9507
9508void MessageOptions::MergeFrom(const MessageOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08009509 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +00009510 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00009511 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00009512 if (from.has_message_set_wire_format()) {
temporal40ee5512008-07-10 02:12:20 +00009513 set_message_set_wire_format(from.message_set_wire_format());
9514 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00009515 if (from.has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009516 set_no_standard_descriptor_accessor(from.no_standard_descriptor_accessor());
9517 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009518 if (from.has_deprecated()) {
9519 set_deprecated(from.deprecated());
9520 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08009521 if (from.has_map_entry()) {
9522 set_map_entry(from.map_entry());
9523 }
temporal40ee5512008-07-10 02:12:20 +00009524 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009525 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08009526 if (from._internal_metadata_.have_unknown_fields()) {
9527 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
9528 }
temporal40ee5512008-07-10 02:12:20 +00009529}
9530
9531void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) {
9532 if (&from == this) return;
9533 Clear();
9534 MergeFrom(from);
9535}
9536
9537void MessageOptions::CopyFrom(const MessageOptions& from) {
9538 if (&from == this) return;
9539 Clear();
9540 MergeFrom(from);
9541}
9542
kenton@google.comceb561d2009-06-25 19:05:36 +00009543bool MessageOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009544
jieluo@google.com4de8f552014-07-18 00:47:59 +00009545 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009546
kenton@google.comceb561d2009-06-25 19:05:36 +00009547 if (!_extensions_.IsInitialized()) return false; return true;
9548}
9549
kenton@google.com26bd9ee2008-11-21 00:06:27 +00009550void MessageOptions::Swap(MessageOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08009551 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009552 InternalSwap(other);
9553}
9554void MessageOptions::InternalSwap(MessageOptions* other) {
9555 std::swap(message_set_wire_format_, other->message_set_wire_format_);
9556 std::swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_);
9557 std::swap(deprecated_, other->deprecated_);
9558 std::swap(map_entry_, other->map_entry_);
9559 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
9560 std::swap(_has_bits_[0], other->_has_bits_[0]);
9561 _internal_metadata_.Swap(&other->_internal_metadata_);
9562 std::swap(_cached_size_, other->_cached_size_);
9563 _extensions_.Swap(&other->_extensions_);
9564}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00009565
kenton@google.com80b1d622009-07-29 01:13:20 +00009566::google::protobuf::Metadata MessageOptions::GetMetadata() const {
9567 protobuf_AssignDescriptorsOnce();
9568 ::google::protobuf::Metadata metadata;
9569 metadata.descriptor = MessageOptions_descriptor_;
9570 metadata.reflection = MessageOptions_reflection_;
9571 return metadata;
temporal40ee5512008-07-10 02:12:20 +00009572}
9573
Jisi Liu885b6122015-02-28 14:51:22 -08009574#if PROTOBUF_INLINE_NOT_IN_HEADERS
9575// MessageOptions
9576
9577// optional bool message_set_wire_format = 1 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009578bool MessageOptions::has_message_set_wire_format() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009579 return (_has_bits_[0] & 0x00000001u) != 0;
9580}
Bo Yang5db21732015-05-21 14:28:59 -07009581void MessageOptions::set_has_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009582 _has_bits_[0] |= 0x00000001u;
9583}
Bo Yang5db21732015-05-21 14:28:59 -07009584void MessageOptions::clear_has_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009585 _has_bits_[0] &= ~0x00000001u;
9586}
Bo Yang5db21732015-05-21 14:28:59 -07009587void MessageOptions::clear_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009588 message_set_wire_format_ = false;
9589 clear_has_message_set_wire_format();
9590}
9591 bool MessageOptions::message_set_wire_format() const {
9592 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.message_set_wire_format)
9593 return message_set_wire_format_;
9594}
9595 void MessageOptions::set_message_set_wire_format(bool value) {
9596 set_has_message_set_wire_format();
9597 message_set_wire_format_ = value;
9598 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.message_set_wire_format)
9599}
9600
9601// optional bool no_standard_descriptor_accessor = 2 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009602bool MessageOptions::has_no_standard_descriptor_accessor() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009603 return (_has_bits_[0] & 0x00000002u) != 0;
9604}
Bo Yang5db21732015-05-21 14:28:59 -07009605void MessageOptions::set_has_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009606 _has_bits_[0] |= 0x00000002u;
9607}
Bo Yang5db21732015-05-21 14:28:59 -07009608void MessageOptions::clear_has_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009609 _has_bits_[0] &= ~0x00000002u;
9610}
Bo Yang5db21732015-05-21 14:28:59 -07009611void MessageOptions::clear_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009612 no_standard_descriptor_accessor_ = false;
9613 clear_has_no_standard_descriptor_accessor();
9614}
9615 bool MessageOptions::no_standard_descriptor_accessor() const {
9616 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
9617 return no_standard_descriptor_accessor_;
9618}
9619 void MessageOptions::set_no_standard_descriptor_accessor(bool value) {
9620 set_has_no_standard_descriptor_accessor();
9621 no_standard_descriptor_accessor_ = value;
9622 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
9623}
9624
9625// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009626bool MessageOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009627 return (_has_bits_[0] & 0x00000004u) != 0;
9628}
Bo Yang5db21732015-05-21 14:28:59 -07009629void MessageOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009630 _has_bits_[0] |= 0x00000004u;
9631}
Bo Yang5db21732015-05-21 14:28:59 -07009632void MessageOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009633 _has_bits_[0] &= ~0x00000004u;
9634}
Bo Yang5db21732015-05-21 14:28:59 -07009635void MessageOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009636 deprecated_ = false;
9637 clear_has_deprecated();
9638}
9639 bool MessageOptions::deprecated() const {
9640 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated)
9641 return deprecated_;
9642}
9643 void MessageOptions::set_deprecated(bool value) {
9644 set_has_deprecated();
9645 deprecated_ = value;
9646 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated)
9647}
9648
9649// optional bool map_entry = 7;
Bo Yang5db21732015-05-21 14:28:59 -07009650bool MessageOptions::has_map_entry() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009651 return (_has_bits_[0] & 0x00000008u) != 0;
9652}
Bo Yang5db21732015-05-21 14:28:59 -07009653void MessageOptions::set_has_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009654 _has_bits_[0] |= 0x00000008u;
9655}
Bo Yang5db21732015-05-21 14:28:59 -07009656void MessageOptions::clear_has_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009657 _has_bits_[0] &= ~0x00000008u;
9658}
Bo Yang5db21732015-05-21 14:28:59 -07009659void MessageOptions::clear_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009660 map_entry_ = false;
9661 clear_has_map_entry();
9662}
9663 bool MessageOptions::map_entry() const {
9664 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry)
9665 return map_entry_;
9666}
9667 void MessageOptions::set_map_entry(bool value) {
9668 set_has_map_entry();
9669 map_entry_ = value;
9670 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry)
9671}
9672
9673// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -07009674int MessageOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009675 return uninterpreted_option_.size();
9676}
Bo Yang5db21732015-05-21 14:28:59 -07009677void MessageOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009678 uninterpreted_option_.Clear();
9679}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009680const ::google::protobuf::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -08009681 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.uninterpreted_option)
9682 return uninterpreted_option_.Get(index);
9683}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009684::google::protobuf::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -08009685 // @@protoc_insertion_point(field_mutable:google.protobuf.MessageOptions.uninterpreted_option)
9686 return uninterpreted_option_.Mutable(index);
9687}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009688::google::protobuf::UninterpretedOption* MessageOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009689 // @@protoc_insertion_point(field_add:google.protobuf.MessageOptions.uninterpreted_option)
9690 return uninterpreted_option_.Add();
9691}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009692::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -08009693MessageOptions::mutable_uninterpreted_option() {
9694 // @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option)
9695 return &uninterpreted_option_;
9696}
Feng Xiaoeee38b02015-08-22 18:25:48 -07009697const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
9698MessageOptions::uninterpreted_option() const {
9699 // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option)
9700 return uninterpreted_option_;
9701}
Jisi Liu885b6122015-02-28 14:51:22 -08009702
9703#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00009704
9705// ===================================================================
9706
9707const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009708 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009709 return FieldOptions_CType_descriptor_;
9710}
9711bool FieldOptions_CType_IsValid(int value) {
9712 switch(value) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009713 case 0:
temporal40ee5512008-07-10 02:12:20 +00009714 case 1:
9715 case 2:
9716 return true;
9717 default:
9718 return false;
9719 }
9720}
9721
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009722#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comfccb1462009-12-18 02:11:36 +00009723const FieldOptions_CType FieldOptions::STRING;
temporal40ee5512008-07-10 02:12:20 +00009724const FieldOptions_CType FieldOptions::CORD;
9725const FieldOptions_CType FieldOptions::STRING_PIECE;
9726const FieldOptions_CType FieldOptions::CType_MIN;
9727const FieldOptions_CType FieldOptions::CType_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00009728const int FieldOptions::CType_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009729#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Bo Yang5db21732015-05-21 14:28:59 -07009730const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor() {
9731 protobuf_AssignDescriptorsOnce();
9732 return FieldOptions_JSType_descriptor_;
9733}
9734bool FieldOptions_JSType_IsValid(int value) {
9735 switch(value) {
9736 case 0:
9737 case 1:
9738 case 2:
9739 return true;
9740 default:
9741 return false;
9742 }
9743}
9744
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009745#if !defined(_MSC_VER) || _MSC_VER >= 1900
Bo Yang5db21732015-05-21 14:28:59 -07009746const FieldOptions_JSType FieldOptions::JS_NORMAL;
9747const FieldOptions_JSType FieldOptions::JS_STRING;
9748const FieldOptions_JSType FieldOptions::JS_NUMBER;
9749const FieldOptions_JSType FieldOptions::JSType_MIN;
9750const FieldOptions_JSType FieldOptions::JSType_MAX;
9751const int FieldOptions::JSType_ARRAYSIZE;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009752#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
9753#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009754const int FieldOptions::kCtypeFieldNumber;
9755const int FieldOptions::kPackedFieldNumber;
Bo Yang5db21732015-05-21 14:28:59 -07009756const int FieldOptions::kJstypeFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009757const int FieldOptions::kLazyFieldNumber;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009758const int FieldOptions::kDeprecatedFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009759const int FieldOptions::kWeakFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009760const int FieldOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -07009761#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.com24bf56f2008-09-24 20:31:01 +00009762
kenton@google.com573989f2009-10-30 22:02:17 +00009763FieldOptions::FieldOptions()
Bo Yang5db21732015-05-21 14:28:59 -07009764 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009765 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009766 // @@protoc_insertion_point(constructor:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +00009767}
9768
kenton@google.com80b1d622009-07-29 01:13:20 +00009769void FieldOptions::InitAsDefaultInstance() {
9770}
kenton@google.com24bf56f2008-09-24 20:31:01 +00009771
kenton@google.com573989f2009-10-30 22:02:17 +00009772FieldOptions::FieldOptions(const FieldOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08009773 : ::google::protobuf::Message(),
9774 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009775 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00009776 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009777 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +00009778}
9779
kenton@google.comd37d46d2009-04-25 02:53:47 +00009780void FieldOptions::SharedCtor() {
9781 _cached_size_ = 0;
kenton@google.comfccb1462009-12-18 02:11:36 +00009782 ctype_ = 0;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009783 packed_ = false;
Bo Yang5db21732015-05-21 14:28:59 -07009784 jstype_ = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009785 lazy_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009786 deprecated_ = false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009787 weak_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009788 ::memset(_has_bits_, 0, sizeof(_has_bits_));
9789}
9790
temporal40ee5512008-07-10 02:12:20 +00009791FieldOptions::~FieldOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009792 // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009793 SharedDtor();
9794}
9795
9796void FieldOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009797 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00009798 }
9799}
9800
kenton@google.comfccb1462009-12-18 02:11:36 +00009801void FieldOptions::SetCachedSize(int size) const {
9802 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
9803 _cached_size_ = size;
9804 GOOGLE_SAFE_CONCURRENT_WRITES_END();
9805}
temporal40ee5512008-07-10 02:12:20 +00009806const ::google::protobuf::Descriptor* FieldOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009807 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009808 return FieldOptions_descriptor_;
9809}
9810
kenton@google.com24bf56f2008-09-24 20:31:01 +00009811const FieldOptions& FieldOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00009812 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
9813 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009814}
9815
9816FieldOptions* FieldOptions::default_instance_ = NULL;
9817
Feng Xiao6ef984a2014-11-10 17:34:54 -08009818FieldOptions* FieldOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08009819 FieldOptions* n = new FieldOptions;
9820 if (arena != NULL) {
9821 arena->Own(n);
9822 }
9823 return n;
temporal40ee5512008-07-10 02:12:20 +00009824}
9825
9826void FieldOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009827 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08009828#define ZR_HELPER_(f) reinterpret_cast<char*>(\
9829 &reinterpret_cast<FieldOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009830
Jisi Liu885b6122015-02-28 14:51:22 -08009831#define ZR_(first, last) do {\
9832 ::memset(&first, 0,\
9833 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
9834} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009835
Bo Yang5db21732015-05-21 14:28:59 -07009836 if (_has_bits_[0 / 32] & 63u) {
9837 ZR_(ctype_, jstype_);
9838 ZR_(packed_, weak_);
temporal40ee5512008-07-10 02:12:20 +00009839 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009840
Jisi Liu885b6122015-02-28 14:51:22 -08009841#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00009842#undef ZR_
9843
kenton@google.com24bf56f2008-09-24 20:31:01 +00009844 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00009845 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08009846 if (_internal_metadata_.have_unknown_fields()) {
9847 mutable_unknown_fields()->Clear();
9848 }
temporal40ee5512008-07-10 02:12:20 +00009849}
9850
9851bool FieldOptions::MergePartialFromCodedStream(
9852 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009853#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00009854 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009855 // @@protoc_insertion_point(parse_start:google.protobuf.FieldOptions)
9856 for (;;) {
9857 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
9858 tag = p.first;
9859 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009860 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009861 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
temporal40ee5512008-07-10 02:12:20 +00009862 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009863 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009864 int value;
9865 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9866 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
9867 input, &value)));
9868 if (::google::protobuf::FieldOptions_CType_IsValid(value)) {
9869 set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value));
9870 } else {
9871 mutable_unknown_fields()->AddVarint(1, value);
9872 }
temporal40ee5512008-07-10 02:12:20 +00009873 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009874 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00009875 }
kenton@google.com2d6daa72009-01-22 01:27:00 +00009876 if (input->ExpectTag(16)) goto parse_packed;
9877 break;
9878 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009879
kenton@google.com2d6daa72009-01-22 01:27:00 +00009880 // optional bool packed = 2;
9881 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009882 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009883 parse_packed:
9884 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9885 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9886 input, &packed_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009887 set_has_packed();
kenton@google.comfccb1462009-12-18 02:11:36 +00009888 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009889 goto handle_unusual;
kenton@google.com2d6daa72009-01-22 01:27:00 +00009890 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00009891 if (input->ExpectTag(24)) goto parse_deprecated;
9892 break;
9893 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009894
kenton@google.comd37d46d2009-04-25 02:53:47 +00009895 // optional bool deprecated = 3 [default = false];
9896 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009897 if (tag == 24) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009898 parse_deprecated:
9899 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9900 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9901 input, &deprecated_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009902 set_has_deprecated();
kenton@google.comfccb1462009-12-18 02:11:36 +00009903 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009904 goto handle_unusual;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009905 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009906 if (input->ExpectTag(40)) goto parse_lazy;
9907 break;
9908 }
9909
9910 // optional bool lazy = 5 [default = false];
9911 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009912 if (tag == 40) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009913 parse_lazy:
9914 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9915 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9916 input, &lazy_)));
9917 set_has_lazy();
9918 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009919 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009920 }
Bo Yang5db21732015-05-21 14:28:59 -07009921 if (input->ExpectTag(48)) goto parse_jstype;
9922 break;
9923 }
9924
9925 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
9926 case 6: {
9927 if (tag == 48) {
9928 parse_jstype:
9929 int value;
9930 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9931 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
9932 input, &value)));
9933 if (::google::protobuf::FieldOptions_JSType_IsValid(value)) {
9934 set_jstype(static_cast< ::google::protobuf::FieldOptions_JSType >(value));
9935 } else {
9936 mutable_unknown_fields()->AddVarint(6, value);
9937 }
9938 } else {
9939 goto handle_unusual;
9940 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009941 if (input->ExpectTag(80)) goto parse_weak;
9942 break;
9943 }
9944
9945 // optional bool weak = 10 [default = false];
9946 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009947 if (tag == 80) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009948 parse_weak:
9949 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9950 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9951 input, &weak_)));
9952 set_has_weak();
9953 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009954 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009955 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009956 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
9957 break;
9958 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009959
kenton@google.com24bf56f2008-09-24 20:31:01 +00009960 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
9961 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009962 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009963 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -07009964 DO_(input->IncrementRecursionDepth());
9965 parse_loop_uninterpreted_option:
9966 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00009967 input, add_uninterpreted_option()));
9968 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009969 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009970 }
Bo Yang5db21732015-05-21 14:28:59 -07009971 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
9972 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009973 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00009974 break;
9975 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009976
temporal40ee5512008-07-10 02:12:20 +00009977 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009978 handle_unusual:
9979 if (tag == 0 ||
9980 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00009981 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009982 goto success;
temporal40ee5512008-07-10 02:12:20 +00009983 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009984 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009985 DO_(_extensions_.ParseField(tag, input, default_instance_,
9986 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00009987 continue;
9988 }
temporal40ee5512008-07-10 02:12:20 +00009989 DO_(::google::protobuf::internal::WireFormat::SkipField(
9990 input, tag, mutable_unknown_fields()));
9991 break;
9992 }
9993 }
9994 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009995success:
9996 // @@protoc_insertion_point(parse_success:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +00009997 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009998failure:
9999 // @@protoc_insertion_point(parse_failure:google.protobuf.FieldOptions)
10000 return false;
temporal40ee5512008-07-10 02:12:20 +000010001#undef DO_
10002}
10003
kenton@google.comd37d46d2009-04-25 02:53:47 +000010004void FieldOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000010005 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010006 // @@protoc_insertion_point(serialize_start:google.protobuf.FieldOptions)
kenton@google.comfccb1462009-12-18 02:11:36 +000010007 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
liujisi@google.com33165fe2010-11-02 13:14:58 +000010008 if (has_ctype()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010009 ::google::protobuf::internal::WireFormatLite::WriteEnum(
10010 1, this->ctype(), output);
temporal40ee5512008-07-10 02:12:20 +000010011 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010012
kenton@google.com2d6daa72009-01-22 01:27:00 +000010013 // optional bool packed = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000010014 if (has_packed()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010015 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->packed(), output);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010016 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010017
kenton@google.comd37d46d2009-04-25 02:53:47 +000010018 // optional bool deprecated = 3 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +000010019 if (has_deprecated()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010020 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
kenton@google.com2d6daa72009-01-22 01:27:00 +000010021 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010022
10023 // optional bool lazy = 5 [default = false];
10024 if (has_lazy()) {
10025 ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->lazy(), output);
10026 }
10027
Bo Yang5db21732015-05-21 14:28:59 -070010028 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10029 if (has_jstype()) {
10030 ::google::protobuf::internal::WireFormatLite::WriteEnum(
10031 6, this->jstype(), output);
10032 }
10033
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010034 // optional bool weak = 10 [default = false];
10035 if (has_weak()) {
10036 ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->weak(), output);
10037 }
10038
kenton@google.com24bf56f2008-09-24 20:31:01 +000010039 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010040 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010041 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000010042 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010043 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010044
kenton@google.com24bf56f2008-09-24 20:31:01 +000010045 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010046 _extensions_.SerializeWithCachedSizes(
10047 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010048
Feng Xiao6ef984a2014-11-10 17:34:54 -080010049 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010050 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
10051 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000010052 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010053 // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010054}
10055
10056::google::protobuf::uint8* FieldOptions::SerializeWithCachedSizesToArray(
10057 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010058 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions)
kenton@google.comfccb1462009-12-18 02:11:36 +000010059 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
liujisi@google.com33165fe2010-11-02 13:14:58 +000010060 if (has_ctype()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010061 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
10062 1, this->ctype(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010063 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010064
kenton@google.comd37d46d2009-04-25 02:53:47 +000010065 // optional bool packed = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000010066 if (has_packed()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010067 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010068 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010069
kenton@google.comd37d46d2009-04-25 02:53:47 +000010070 // optional bool deprecated = 3 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +000010071 if (has_deprecated()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010072 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010073 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010074
10075 // optional bool lazy = 5 [default = false];
10076 if (has_lazy()) {
10077 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->lazy(), target);
10078 }
10079
Bo Yang5db21732015-05-21 14:28:59 -070010080 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10081 if (has_jstype()) {
10082 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
10083 6, this->jstype(), target);
10084 }
10085
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010086 // optional bool weak = 10 [default = false];
10087 if (has_weak()) {
10088 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->weak(), target);
10089 }
10090
kenton@google.comd37d46d2009-04-25 02:53:47 +000010091 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010092 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010093 target = ::google::protobuf::internal::WireFormatLite::
10094 WriteMessageNoVirtualToArray(
10095 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010096 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010097
kenton@google.comd37d46d2009-04-25 02:53:47 +000010098 // Extension range [1000, 536870912)
10099 target = _extensions_.SerializeWithCachedSizesToArray(
10100 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010101
Feng Xiao6ef984a2014-11-10 17:34:54 -080010102 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010103 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
10104 unknown_fields(), target);
10105 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010106 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010107 return target;
temporal40ee5512008-07-10 02:12:20 +000010108}
10109
10110int FieldOptions::ByteSize() const {
10111 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010112
Austin Schuh307af622015-06-05 22:46:01 -070010113 if (_has_bits_[0 / 32] & 63u) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010114 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
temporal40ee5512008-07-10 02:12:20 +000010115 if (has_ctype()) {
10116 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000010117 ::google::protobuf::internal::WireFormatLite::EnumSize(this->ctype());
temporal40ee5512008-07-10 02:12:20 +000010118 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010119
kenton@google.com2d6daa72009-01-22 01:27:00 +000010120 // optional bool packed = 2;
10121 if (has_packed()) {
10122 total_size += 1 + 1;
10123 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010124
Bo Yang5db21732015-05-21 14:28:59 -070010125 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10126 if (has_jstype()) {
10127 total_size += 1 +
10128 ::google::protobuf::internal::WireFormatLite::EnumSize(this->jstype());
10129 }
10130
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010131 // optional bool lazy = 5 [default = false];
10132 if (has_lazy()) {
10133 total_size += 1 + 1;
10134 }
10135
kenton@google.comd37d46d2009-04-25 02:53:47 +000010136 // optional bool deprecated = 3 [default = false];
10137 if (has_deprecated()) {
10138 total_size += 1 + 1;
10139 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010140
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010141 // optional bool weak = 10 [default = false];
10142 if (has_weak()) {
10143 total_size += 1 + 1;
10144 }
10145
temporal40ee5512008-07-10 02:12:20 +000010146 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010147 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000010148 total_size += 2 * this->uninterpreted_option_size();
10149 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010150 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000010151 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000010152 this->uninterpreted_option(i));
10153 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010154
kenton@google.comd37d46d2009-04-25 02:53:47 +000010155 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010156
Feng Xiao6ef984a2014-11-10 17:34:54 -080010157 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000010158 total_size +=
10159 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
10160 unknown_fields());
10161 }
kenton@google.comfccb1462009-12-18 02:11:36 +000010162 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000010163 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000010164 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000010165 return total_size;
10166}
10167
10168void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010169 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070010170 const FieldOptions* source =
10171 ::google::protobuf::internal::DynamicCastToGenerated<const FieldOptions>(
10172 &from);
temporal40ee5512008-07-10 02:12:20 +000010173 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +000010174 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +000010175 } else {
10176 MergeFrom(*source);
10177 }
10178}
10179
10180void FieldOptions::MergeFrom(const FieldOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010181 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010182 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +000010183 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000010184 if (from.has_ctype()) {
temporal40ee5512008-07-10 02:12:20 +000010185 set_ctype(from.ctype());
10186 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000010187 if (from.has_packed()) {
kenton@google.com2d6daa72009-01-22 01:27:00 +000010188 set_packed(from.packed());
10189 }
Bo Yang5db21732015-05-21 14:28:59 -070010190 if (from.has_jstype()) {
10191 set_jstype(from.jstype());
10192 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010193 if (from.has_lazy()) {
10194 set_lazy(from.lazy());
10195 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000010196 if (from.has_deprecated()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010197 set_deprecated(from.deprecated());
10198 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010199 if (from.has_weak()) {
10200 set_weak(from.weak());
10201 }
temporal40ee5512008-07-10 02:12:20 +000010202 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010203 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010204 if (from._internal_metadata_.have_unknown_fields()) {
10205 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
10206 }
temporal40ee5512008-07-10 02:12:20 +000010207}
10208
10209void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) {
10210 if (&from == this) return;
10211 Clear();
10212 MergeFrom(from);
10213}
10214
10215void FieldOptions::CopyFrom(const FieldOptions& from) {
10216 if (&from == this) return;
10217 Clear();
10218 MergeFrom(from);
10219}
10220
kenton@google.comceb561d2009-06-25 19:05:36 +000010221bool FieldOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010222
jieluo@google.com4de8f552014-07-18 00:47:59 +000010223 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010224
kenton@google.comceb561d2009-06-25 19:05:36 +000010225 if (!_extensions_.IsInitialized()) return false; return true;
10226}
10227
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010228void FieldOptions::Swap(FieldOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080010229 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080010230 InternalSwap(other);
10231}
10232void FieldOptions::InternalSwap(FieldOptions* other) {
10233 std::swap(ctype_, other->ctype_);
10234 std::swap(packed_, other->packed_);
Bo Yang5db21732015-05-21 14:28:59 -070010235 std::swap(jstype_, other->jstype_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010236 std::swap(lazy_, other->lazy_);
10237 std::swap(deprecated_, other->deprecated_);
10238 std::swap(weak_, other->weak_);
10239 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
10240 std::swap(_has_bits_[0], other->_has_bits_[0]);
10241 _internal_metadata_.Swap(&other->_internal_metadata_);
10242 std::swap(_cached_size_, other->_cached_size_);
10243 _extensions_.Swap(&other->_extensions_);
10244}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010245
kenton@google.com80b1d622009-07-29 01:13:20 +000010246::google::protobuf::Metadata FieldOptions::GetMetadata() const {
10247 protobuf_AssignDescriptorsOnce();
10248 ::google::protobuf::Metadata metadata;
10249 metadata.descriptor = FieldOptions_descriptor_;
10250 metadata.reflection = FieldOptions_reflection_;
10251 return metadata;
temporal40ee5512008-07-10 02:12:20 +000010252}
10253
Jisi Liu885b6122015-02-28 14:51:22 -080010254#if PROTOBUF_INLINE_NOT_IN_HEADERS
10255// FieldOptions
10256
10257// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
Bo Yang5db21732015-05-21 14:28:59 -070010258bool FieldOptions::has_ctype() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010259 return (_has_bits_[0] & 0x00000001u) != 0;
10260}
Bo Yang5db21732015-05-21 14:28:59 -070010261void FieldOptions::set_has_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010262 _has_bits_[0] |= 0x00000001u;
10263}
Bo Yang5db21732015-05-21 14:28:59 -070010264void FieldOptions::clear_has_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010265 _has_bits_[0] &= ~0x00000001u;
10266}
Bo Yang5db21732015-05-21 14:28:59 -070010267void FieldOptions::clear_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010268 ctype_ = 0;
10269 clear_has_ctype();
10270}
10271 ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const {
10272 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype)
10273 return static_cast< ::google::protobuf::FieldOptions_CType >(ctype_);
10274}
10275 void FieldOptions::set_ctype(::google::protobuf::FieldOptions_CType value) {
10276 assert(::google::protobuf::FieldOptions_CType_IsValid(value));
10277 set_has_ctype();
10278 ctype_ = value;
10279 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.ctype)
10280}
10281
10282// optional bool packed = 2;
Bo Yang5db21732015-05-21 14:28:59 -070010283bool FieldOptions::has_packed() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010284 return (_has_bits_[0] & 0x00000002u) != 0;
10285}
Bo Yang5db21732015-05-21 14:28:59 -070010286void FieldOptions::set_has_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010287 _has_bits_[0] |= 0x00000002u;
10288}
Bo Yang5db21732015-05-21 14:28:59 -070010289void FieldOptions::clear_has_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010290 _has_bits_[0] &= ~0x00000002u;
10291}
Bo Yang5db21732015-05-21 14:28:59 -070010292void FieldOptions::clear_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010293 packed_ = false;
10294 clear_has_packed();
10295}
10296 bool FieldOptions::packed() const {
10297 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed)
10298 return packed_;
10299}
10300 void FieldOptions::set_packed(bool value) {
10301 set_has_packed();
10302 packed_ = value;
10303 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.packed)
10304}
10305
Bo Yang5db21732015-05-21 14:28:59 -070010306// optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10307bool FieldOptions::has_jstype() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010308 return (_has_bits_[0] & 0x00000004u) != 0;
10309}
Bo Yang5db21732015-05-21 14:28:59 -070010310void FieldOptions::set_has_jstype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010311 _has_bits_[0] |= 0x00000004u;
10312}
Bo Yang5db21732015-05-21 14:28:59 -070010313void FieldOptions::clear_has_jstype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010314 _has_bits_[0] &= ~0x00000004u;
10315}
Bo Yang5db21732015-05-21 14:28:59 -070010316void FieldOptions::clear_jstype() {
10317 jstype_ = 0;
10318 clear_has_jstype();
10319}
10320 ::google::protobuf::FieldOptions_JSType FieldOptions::jstype() const {
10321 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype)
10322 return static_cast< ::google::protobuf::FieldOptions_JSType >(jstype_);
10323}
10324 void FieldOptions::set_jstype(::google::protobuf::FieldOptions_JSType value) {
10325 assert(::google::protobuf::FieldOptions_JSType_IsValid(value));
10326 set_has_jstype();
10327 jstype_ = value;
10328 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.jstype)
10329}
10330
10331// optional bool lazy = 5 [default = false];
10332bool FieldOptions::has_lazy() const {
10333 return (_has_bits_[0] & 0x00000008u) != 0;
10334}
10335void FieldOptions::set_has_lazy() {
10336 _has_bits_[0] |= 0x00000008u;
10337}
10338void FieldOptions::clear_has_lazy() {
10339 _has_bits_[0] &= ~0x00000008u;
10340}
10341void FieldOptions::clear_lazy() {
Jisi Liu885b6122015-02-28 14:51:22 -080010342 lazy_ = false;
10343 clear_has_lazy();
10344}
10345 bool FieldOptions::lazy() const {
10346 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.lazy)
10347 return lazy_;
10348}
10349 void FieldOptions::set_lazy(bool value) {
10350 set_has_lazy();
10351 lazy_ = value;
10352 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.lazy)
10353}
10354
10355// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010356bool FieldOptions::has_deprecated() const {
10357 return (_has_bits_[0] & 0x00000010u) != 0;
Jisi Liu885b6122015-02-28 14:51:22 -080010358}
Bo Yang5db21732015-05-21 14:28:59 -070010359void FieldOptions::set_has_deprecated() {
10360 _has_bits_[0] |= 0x00000010u;
Jisi Liu885b6122015-02-28 14:51:22 -080010361}
Bo Yang5db21732015-05-21 14:28:59 -070010362void FieldOptions::clear_has_deprecated() {
10363 _has_bits_[0] &= ~0x00000010u;
Jisi Liu885b6122015-02-28 14:51:22 -080010364}
Bo Yang5db21732015-05-21 14:28:59 -070010365void FieldOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010366 deprecated_ = false;
10367 clear_has_deprecated();
10368}
10369 bool FieldOptions::deprecated() const {
10370 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.deprecated)
10371 return deprecated_;
10372}
10373 void FieldOptions::set_deprecated(bool value) {
10374 set_has_deprecated();
10375 deprecated_ = value;
10376 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated)
10377}
10378
10379// optional bool weak = 10 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010380bool FieldOptions::has_weak() const {
10381 return (_has_bits_[0] & 0x00000020u) != 0;
Jisi Liu885b6122015-02-28 14:51:22 -080010382}
Bo Yang5db21732015-05-21 14:28:59 -070010383void FieldOptions::set_has_weak() {
10384 _has_bits_[0] |= 0x00000020u;
Jisi Liu885b6122015-02-28 14:51:22 -080010385}
Bo Yang5db21732015-05-21 14:28:59 -070010386void FieldOptions::clear_has_weak() {
10387 _has_bits_[0] &= ~0x00000020u;
Jisi Liu885b6122015-02-28 14:51:22 -080010388}
Bo Yang5db21732015-05-21 14:28:59 -070010389void FieldOptions::clear_weak() {
Jisi Liu885b6122015-02-28 14:51:22 -080010390 weak_ = false;
10391 clear_has_weak();
10392}
10393 bool FieldOptions::weak() const {
10394 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak)
10395 return weak_;
10396}
10397 void FieldOptions::set_weak(bool value) {
10398 set_has_weak();
10399 weak_ = value;
10400 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak)
10401}
10402
10403// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070010404int FieldOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010405 return uninterpreted_option_.size();
10406}
Bo Yang5db21732015-05-21 14:28:59 -070010407void FieldOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010408 uninterpreted_option_.Clear();
10409}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010410const ::google::protobuf::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080010411 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.uninterpreted_option)
10412 return uninterpreted_option_.Get(index);
10413}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010414::google::protobuf::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080010415 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.uninterpreted_option)
10416 return uninterpreted_option_.Mutable(index);
10417}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010418::google::protobuf::UninterpretedOption* FieldOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010419 // @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.uninterpreted_option)
10420 return uninterpreted_option_.Add();
10421}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010422::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080010423FieldOptions::mutable_uninterpreted_option() {
10424 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option)
10425 return &uninterpreted_option_;
10426}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010427const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
10428FieldOptions::uninterpreted_option() const {
10429 // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option)
10430 return uninterpreted_option_;
10431}
Jisi Liu885b6122015-02-28 14:51:22 -080010432
10433#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000010434
10435// ===================================================================
10436
Bruce Dawson86ba70e2015-10-29 12:41:29 -070010437#if !defined(_MSC_VER) || _MSC_VER >= 1900
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010438const int EnumOptions::kAllowAliasFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010439const int EnumOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000010440const int EnumOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070010441#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +000010442
kenton@google.com573989f2009-10-30 22:02:17 +000010443EnumOptions::EnumOptions()
Bo Yang5db21732015-05-21 14:28:59 -070010444 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010445 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010446 // @@protoc_insertion_point(constructor:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010447}
10448
kenton@google.com80b1d622009-07-29 01:13:20 +000010449void EnumOptions::InitAsDefaultInstance() {
10450}
kenton@google.com24bf56f2008-09-24 20:31:01 +000010451
kenton@google.com573989f2009-10-30 22:02:17 +000010452EnumOptions::EnumOptions(const EnumOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080010453 : ::google::protobuf::Message(),
10454 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010455 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000010456 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000010457 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010458}
10459
kenton@google.comd37d46d2009-04-25 02:53:47 +000010460void EnumOptions::SharedCtor() {
10461 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010462 allow_alias_ = false;
10463 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000010464 ::memset(_has_bits_, 0, sizeof(_has_bits_));
10465}
10466
temporal40ee5512008-07-10 02:12:20 +000010467EnumOptions::~EnumOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010468 // @@protoc_insertion_point(destructor:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010469 SharedDtor();
10470}
10471
10472void EnumOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010473 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000010474 }
10475}
10476
kenton@google.comfccb1462009-12-18 02:11:36 +000010477void EnumOptions::SetCachedSize(int size) const {
10478 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
10479 _cached_size_ = size;
10480 GOOGLE_SAFE_CONCURRENT_WRITES_END();
10481}
temporal40ee5512008-07-10 02:12:20 +000010482const ::google::protobuf::Descriptor* EnumOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010483 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000010484 return EnumOptions_descriptor_;
10485}
10486
kenton@google.com24bf56f2008-09-24 20:31:01 +000010487const EnumOptions& EnumOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000010488 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
10489 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010490}
10491
10492EnumOptions* EnumOptions::default_instance_ = NULL;
10493
Feng Xiao6ef984a2014-11-10 17:34:54 -080010494EnumOptions* EnumOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080010495 EnumOptions* n = new EnumOptions;
10496 if (arena != NULL) {
10497 arena->Own(n);
10498 }
10499 return n;
temporal40ee5512008-07-10 02:12:20 +000010500}
10501
10502void EnumOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010503 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -080010504#define ZR_HELPER_(f) reinterpret_cast<char*>(\
10505 &reinterpret_cast<EnumOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +000010506
Jisi Liu885b6122015-02-28 14:51:22 -080010507#define ZR_(first, last) do {\
10508 ::memset(&first, 0,\
10509 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
10510} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +000010511
10512 ZR_(allow_alias_, deprecated_);
10513
Jisi Liu885b6122015-02-28 14:51:22 -080010514#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +000010515#undef ZR_
10516
kenton@google.com24bf56f2008-09-24 20:31:01 +000010517 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000010518 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080010519 if (_internal_metadata_.have_unknown_fields()) {
10520 mutable_unknown_fields()->Clear();
10521 }
temporal40ee5512008-07-10 02:12:20 +000010522}
10523
10524bool EnumOptions::MergePartialFromCodedStream(
10525 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010526#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000010527 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010528 // @@protoc_insertion_point(parse_start:google.protobuf.EnumOptions)
10529 for (;;) {
10530 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
10531 tag = p.first;
10532 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000010533 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010534 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010535 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010536 if (tag == 16) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010537 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10538 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10539 input, &allow_alias_)));
10540 set_has_allow_alias();
10541 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010542 goto handle_unusual;
10543 }
10544 if (input->ExpectTag(24)) goto parse_deprecated;
10545 break;
10546 }
10547
10548 // optional bool deprecated = 3 [default = false];
10549 case 3: {
10550 if (tag == 24) {
10551 parse_deprecated:
10552 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10553 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10554 input, &deprecated_)));
10555 set_has_deprecated();
10556 } else {
10557 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010558 }
10559 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
10560 break;
10561 }
10562
kenton@google.com24bf56f2008-09-24 20:31:01 +000010563 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
10564 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010565 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010566 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070010567 DO_(input->IncrementRecursionDepth());
10568 parse_loop_uninterpreted_option:
10569 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000010570 input, add_uninterpreted_option()));
10571 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010572 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010573 }
Bo Yang5db21732015-05-21 14:28:59 -070010574 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
10575 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010576 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010577 break;
10578 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010579
kenton@google.com24bf56f2008-09-24 20:31:01 +000010580 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010581 handle_unusual:
10582 if (tag == 0 ||
10583 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000010584 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010585 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010586 }
10587 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010588 DO_(_extensions_.ParseField(tag, input, default_instance_,
10589 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000010590 continue;
10591 }
10592 DO_(::google::protobuf::internal::WireFormat::SkipField(
10593 input, tag, mutable_unknown_fields()));
10594 break;
10595 }
temporal40ee5512008-07-10 02:12:20 +000010596 }
temporal40ee5512008-07-10 02:12:20 +000010597 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010598success:
10599 // @@protoc_insertion_point(parse_success:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010600 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010601failure:
10602 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumOptions)
10603 return false;
temporal40ee5512008-07-10 02:12:20 +000010604#undef DO_
10605}
10606
kenton@google.comd37d46d2009-04-25 02:53:47 +000010607void EnumOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000010608 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010609 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumOptions)
10610 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010611 if (has_allow_alias()) {
10612 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->allow_alias(), output);
10613 }
10614
jieluo@google.com4de8f552014-07-18 00:47:59 +000010615 // optional bool deprecated = 3 [default = false];
10616 if (has_deprecated()) {
10617 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
10618 }
10619
kenton@google.com24bf56f2008-09-24 20:31:01 +000010620 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010621 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010622 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000010623 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010624 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010625
kenton@google.com24bf56f2008-09-24 20:31:01 +000010626 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010627 _extensions_.SerializeWithCachedSizes(
10628 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010629
Feng Xiao6ef984a2014-11-10 17:34:54 -080010630 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010631 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
10632 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000010633 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010634 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010635}
10636
10637::google::protobuf::uint8* EnumOptions::SerializeWithCachedSizesToArray(
10638 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010639 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions)
10640 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010641 if (has_allow_alias()) {
10642 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->allow_alias(), target);
10643 }
10644
jieluo@google.com4de8f552014-07-18 00:47:59 +000010645 // optional bool deprecated = 3 [default = false];
10646 if (has_deprecated()) {
10647 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
10648 }
10649
kenton@google.comd37d46d2009-04-25 02:53:47 +000010650 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010651 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010652 target = ::google::protobuf::internal::WireFormatLite::
10653 WriteMessageNoVirtualToArray(
10654 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010655 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010656
kenton@google.comd37d46d2009-04-25 02:53:47 +000010657 // Extension range [1000, 536870912)
10658 target = _extensions_.SerializeWithCachedSizesToArray(
10659 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010660
Feng Xiao6ef984a2014-11-10 17:34:54 -080010661 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010662 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
10663 unknown_fields(), target);
10664 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010665 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010666 return target;
temporal40ee5512008-07-10 02:12:20 +000010667}
10668
10669int EnumOptions::ByteSize() const {
10670 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010671
Austin Schuh307af622015-06-05 22:46:01 -070010672 if (_has_bits_[0 / 32] & 3u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010673 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010674 if (has_allow_alias()) {
10675 total_size += 1 + 1;
10676 }
10677
jieluo@google.com4de8f552014-07-18 00:47:59 +000010678 // optional bool deprecated = 3 [default = false];
10679 if (has_deprecated()) {
10680 total_size += 1 + 1;
10681 }
10682
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010683 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010684 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000010685 total_size += 2 * this->uninterpreted_option_size();
10686 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010687 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000010688 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000010689 this->uninterpreted_option(i));
10690 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010691
kenton@google.comd37d46d2009-04-25 02:53:47 +000010692 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010693
Feng Xiao6ef984a2014-11-10 17:34:54 -080010694 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000010695 total_size +=
10696 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
10697 unknown_fields());
10698 }
kenton@google.comfccb1462009-12-18 02:11:36 +000010699 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000010700 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000010701 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000010702 return total_size;
10703}
10704
10705void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010706 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070010707 const EnumOptions* source =
10708 ::google::protobuf::internal::DynamicCastToGenerated<const EnumOptions>(
10709 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010710 if (source == NULL) {
10711 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
10712 } else {
10713 MergeFrom(*source);
10714 }
temporal40ee5512008-07-10 02:12:20 +000010715}
10716
10717void EnumOptions::MergeFrom(const EnumOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010718 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010719 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010720 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
10721 if (from.has_allow_alias()) {
10722 set_allow_alias(from.allow_alias());
10723 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010724 if (from.has_deprecated()) {
10725 set_deprecated(from.deprecated());
10726 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010727 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010728 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010729 if (from._internal_metadata_.have_unknown_fields()) {
10730 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
10731 }
temporal40ee5512008-07-10 02:12:20 +000010732}
10733
10734void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) {
10735 if (&from == this) return;
10736 Clear();
10737 MergeFrom(from);
10738}
10739
10740void EnumOptions::CopyFrom(const EnumOptions& from) {
10741 if (&from == this) return;
10742 Clear();
10743 MergeFrom(from);
10744}
10745
kenton@google.comceb561d2009-06-25 19:05:36 +000010746bool EnumOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010747
jieluo@google.com4de8f552014-07-18 00:47:59 +000010748 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010749
kenton@google.comceb561d2009-06-25 19:05:36 +000010750 if (!_extensions_.IsInitialized()) return false; return true;
10751}
10752
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010753void EnumOptions::Swap(EnumOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080010754 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080010755 InternalSwap(other);
10756}
10757void EnumOptions::InternalSwap(EnumOptions* other) {
10758 std::swap(allow_alias_, other->allow_alias_);
10759 std::swap(deprecated_, other->deprecated_);
10760 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
10761 std::swap(_has_bits_[0], other->_has_bits_[0]);
10762 _internal_metadata_.Swap(&other->_internal_metadata_);
10763 std::swap(_cached_size_, other->_cached_size_);
10764 _extensions_.Swap(&other->_extensions_);
10765}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010766
kenton@google.com80b1d622009-07-29 01:13:20 +000010767::google::protobuf::Metadata EnumOptions::GetMetadata() const {
10768 protobuf_AssignDescriptorsOnce();
10769 ::google::protobuf::Metadata metadata;
10770 metadata.descriptor = EnumOptions_descriptor_;
10771 metadata.reflection = EnumOptions_reflection_;
10772 return metadata;
temporal40ee5512008-07-10 02:12:20 +000010773}
10774
Jisi Liu885b6122015-02-28 14:51:22 -080010775#if PROTOBUF_INLINE_NOT_IN_HEADERS
10776// EnumOptions
10777
10778// optional bool allow_alias = 2;
Bo Yang5db21732015-05-21 14:28:59 -070010779bool EnumOptions::has_allow_alias() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010780 return (_has_bits_[0] & 0x00000001u) != 0;
10781}
Bo Yang5db21732015-05-21 14:28:59 -070010782void EnumOptions::set_has_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010783 _has_bits_[0] |= 0x00000001u;
10784}
Bo Yang5db21732015-05-21 14:28:59 -070010785void EnumOptions::clear_has_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010786 _has_bits_[0] &= ~0x00000001u;
10787}
Bo Yang5db21732015-05-21 14:28:59 -070010788void EnumOptions::clear_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010789 allow_alias_ = false;
10790 clear_has_allow_alias();
10791}
10792 bool EnumOptions::allow_alias() const {
10793 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.allow_alias)
10794 return allow_alias_;
10795}
10796 void EnumOptions::set_allow_alias(bool value) {
10797 set_has_allow_alias();
10798 allow_alias_ = value;
10799 // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.allow_alias)
10800}
10801
10802// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010803bool EnumOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010804 return (_has_bits_[0] & 0x00000002u) != 0;
10805}
Bo Yang5db21732015-05-21 14:28:59 -070010806void EnumOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010807 _has_bits_[0] |= 0x00000002u;
10808}
Bo Yang5db21732015-05-21 14:28:59 -070010809void EnumOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010810 _has_bits_[0] &= ~0x00000002u;
10811}
Bo Yang5db21732015-05-21 14:28:59 -070010812void EnumOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010813 deprecated_ = false;
10814 clear_has_deprecated();
10815}
10816 bool EnumOptions::deprecated() const {
10817 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated)
10818 return deprecated_;
10819}
10820 void EnumOptions::set_deprecated(bool value) {
10821 set_has_deprecated();
10822 deprecated_ = value;
10823 // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated)
10824}
10825
10826// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070010827int EnumOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010828 return uninterpreted_option_.size();
10829}
Bo Yang5db21732015-05-21 14:28:59 -070010830void EnumOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010831 uninterpreted_option_.Clear();
10832}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010833const ::google::protobuf::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080010834 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.uninterpreted_option)
10835 return uninterpreted_option_.Get(index);
10836}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010837::google::protobuf::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080010838 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumOptions.uninterpreted_option)
10839 return uninterpreted_option_.Mutable(index);
10840}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010841::google::protobuf::UninterpretedOption* EnumOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010842 // @@protoc_insertion_point(field_add:google.protobuf.EnumOptions.uninterpreted_option)
10843 return uninterpreted_option_.Add();
10844}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010845::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080010846EnumOptions::mutable_uninterpreted_option() {
10847 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option)
10848 return &uninterpreted_option_;
10849}
Feng Xiaoeee38b02015-08-22 18:25:48 -070010850const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
10851EnumOptions::uninterpreted_option() const {
10852 // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option)
10853 return uninterpreted_option_;
10854}
Jisi Liu885b6122015-02-28 14:51:22 -080010855
10856#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000010857
10858// ===================================================================
10859
Bruce Dawson86ba70e2015-10-29 12:41:29 -070010860#if !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +000010861const int EnumValueOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000010862const int EnumValueOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070010863#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +000010864
kenton@google.com573989f2009-10-30 22:02:17 +000010865EnumValueOptions::EnumValueOptions()
Bo Yang5db21732015-05-21 14:28:59 -070010866 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010867 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010868 // @@protoc_insertion_point(constructor:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000010869}
10870
kenton@google.com80b1d622009-07-29 01:13:20 +000010871void EnumValueOptions::InitAsDefaultInstance() {
10872}
kenton@google.com24bf56f2008-09-24 20:31:01 +000010873
kenton@google.com573989f2009-10-30 22:02:17 +000010874EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080010875 : ::google::protobuf::Message(),
10876 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010877 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000010878 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000010879 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000010880}
10881
kenton@google.comd37d46d2009-04-25 02:53:47 +000010882void EnumValueOptions::SharedCtor() {
10883 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010884 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000010885 ::memset(_has_bits_, 0, sizeof(_has_bits_));
10886}
10887
temporal40ee5512008-07-10 02:12:20 +000010888EnumValueOptions::~EnumValueOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010889 // @@protoc_insertion_point(destructor:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010890 SharedDtor();
10891}
10892
10893void EnumValueOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010894 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000010895 }
10896}
10897
kenton@google.comfccb1462009-12-18 02:11:36 +000010898void EnumValueOptions::SetCachedSize(int size) const {
10899 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
10900 _cached_size_ = size;
10901 GOOGLE_SAFE_CONCURRENT_WRITES_END();
10902}
temporal40ee5512008-07-10 02:12:20 +000010903const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010904 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000010905 return EnumValueOptions_descriptor_;
10906}
10907
kenton@google.com24bf56f2008-09-24 20:31:01 +000010908const EnumValueOptions& EnumValueOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000010909 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
10910 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010911}
10912
10913EnumValueOptions* EnumValueOptions::default_instance_ = NULL;
10914
Feng Xiao6ef984a2014-11-10 17:34:54 -080010915EnumValueOptions* EnumValueOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080010916 EnumValueOptions* n = new EnumValueOptions;
10917 if (arena != NULL) {
10918 arena->Own(n);
10919 }
10920 return n;
temporal40ee5512008-07-10 02:12:20 +000010921}
10922
10923void EnumValueOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010924 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010925 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010926 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000010927 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080010928 if (_internal_metadata_.have_unknown_fields()) {
10929 mutable_unknown_fields()->Clear();
10930 }
temporal40ee5512008-07-10 02:12:20 +000010931}
10932
10933bool EnumValueOptions::MergePartialFromCodedStream(
10934 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010935#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000010936 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010937 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueOptions)
10938 for (;;) {
10939 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
10940 tag = p.first;
10941 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000010942 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010943 // optional bool deprecated = 1 [default = false];
10944 case 1: {
10945 if (tag == 8) {
10946 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10947 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10948 input, &deprecated_)));
10949 set_has_deprecated();
10950 } else {
10951 goto handle_unusual;
10952 }
10953 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
10954 break;
10955 }
10956
kenton@google.com24bf56f2008-09-24 20:31:01 +000010957 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
10958 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010959 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010960 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070010961 DO_(input->IncrementRecursionDepth());
10962 parse_loop_uninterpreted_option:
10963 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000010964 input, add_uninterpreted_option()));
10965 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010966 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010967 }
Bo Yang5db21732015-05-21 14:28:59 -070010968 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
10969 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010970 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010971 break;
10972 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010973
kenton@google.com24bf56f2008-09-24 20:31:01 +000010974 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010975 handle_unusual:
10976 if (tag == 0 ||
10977 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000010978 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010979 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010980 }
10981 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010982 DO_(_extensions_.ParseField(tag, input, default_instance_,
10983 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000010984 continue;
10985 }
10986 DO_(::google::protobuf::internal::WireFormat::SkipField(
10987 input, tag, mutable_unknown_fields()));
10988 break;
10989 }
temporal40ee5512008-07-10 02:12:20 +000010990 }
temporal40ee5512008-07-10 02:12:20 +000010991 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010992success:
10993 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000010994 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010995failure:
10996 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueOptions)
10997 return false;
temporal40ee5512008-07-10 02:12:20 +000010998#undef DO_
10999}
11000
kenton@google.comd37d46d2009-04-25 02:53:47 +000011001void EnumValueOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000011002 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011003 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueOptions)
11004 // optional bool deprecated = 1 [default = false];
11005 if (has_deprecated()) {
11006 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->deprecated(), output);
11007 }
11008
kenton@google.com24bf56f2008-09-24 20:31:01 +000011009 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011010 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011011 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000011012 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011013 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011014
kenton@google.com24bf56f2008-09-24 20:31:01 +000011015 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011016 _extensions_.SerializeWithCachedSizes(
11017 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011018
Feng Xiao6ef984a2014-11-10 17:34:54 -080011019 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011020 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11021 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000011022 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011023 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011024}
11025
11026::google::protobuf::uint8* EnumValueOptions::SerializeWithCachedSizesToArray(
11027 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011028 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions)
11029 // optional bool deprecated = 1 [default = false];
11030 if (has_deprecated()) {
11031 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->deprecated(), target);
11032 }
11033
kenton@google.comd37d46d2009-04-25 02:53:47 +000011034 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011035 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011036 target = ::google::protobuf::internal::WireFormatLite::
11037 WriteMessageNoVirtualToArray(
11038 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011039 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011040
kenton@google.comd37d46d2009-04-25 02:53:47 +000011041 // Extension range [1000, 536870912)
11042 target = _extensions_.SerializeWithCachedSizesToArray(
11043 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011044
Feng Xiao6ef984a2014-11-10 17:34:54 -080011045 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011046 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11047 unknown_fields(), target);
11048 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011049 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011050 return target;
temporal40ee5512008-07-10 02:12:20 +000011051}
11052
11053int EnumValueOptions::ByteSize() const {
11054 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011055
Feng Xiao6ef984a2014-11-10 17:34:54 -080011056 // optional bool deprecated = 1 [default = false];
11057 if (has_deprecated()) {
11058 total_size += 1 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011059 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080011060
kenton@google.com24bf56f2008-09-24 20:31:01 +000011061 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000011062 total_size += 2 * this->uninterpreted_option_size();
11063 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011064 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000011065 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011066 this->uninterpreted_option(i));
11067 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011068
kenton@google.comd37d46d2009-04-25 02:53:47 +000011069 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011070
Feng Xiao6ef984a2014-11-10 17:34:54 -080011071 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000011072 total_size +=
11073 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
11074 unknown_fields());
11075 }
kenton@google.comfccb1462009-12-18 02:11:36 +000011076 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000011077 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000011078 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000011079 return total_size;
11080}
11081
11082void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011083 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070011084 const EnumValueOptions* source =
11085 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueOptions>(
11086 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011087 if (source == NULL) {
11088 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
11089 } else {
11090 MergeFrom(*source);
11091 }
temporal40ee5512008-07-10 02:12:20 +000011092}
11093
11094void EnumValueOptions::MergeFrom(const EnumValueOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011095 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011096 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011097 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
11098 if (from.has_deprecated()) {
11099 set_deprecated(from.deprecated());
11100 }
11101 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011102 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080011103 if (from._internal_metadata_.have_unknown_fields()) {
11104 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
11105 }
temporal40ee5512008-07-10 02:12:20 +000011106}
11107
11108void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) {
11109 if (&from == this) return;
11110 Clear();
11111 MergeFrom(from);
11112}
11113
11114void EnumValueOptions::CopyFrom(const EnumValueOptions& from) {
11115 if (&from == this) return;
11116 Clear();
11117 MergeFrom(from);
11118}
11119
kenton@google.comceb561d2009-06-25 19:05:36 +000011120bool EnumValueOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011121
jieluo@google.com4de8f552014-07-18 00:47:59 +000011122 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011123
kenton@google.comceb561d2009-06-25 19:05:36 +000011124 if (!_extensions_.IsInitialized()) return false; return true;
11125}
11126
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011127void EnumValueOptions::Swap(EnumValueOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011128 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011129 InternalSwap(other);
11130}
11131void EnumValueOptions::InternalSwap(EnumValueOptions* other) {
11132 std::swap(deprecated_, other->deprecated_);
11133 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11134 std::swap(_has_bits_[0], other->_has_bits_[0]);
11135 _internal_metadata_.Swap(&other->_internal_metadata_);
11136 std::swap(_cached_size_, other->_cached_size_);
11137 _extensions_.Swap(&other->_extensions_);
11138}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011139
kenton@google.com80b1d622009-07-29 01:13:20 +000011140::google::protobuf::Metadata EnumValueOptions::GetMetadata() const {
11141 protobuf_AssignDescriptorsOnce();
11142 ::google::protobuf::Metadata metadata;
11143 metadata.descriptor = EnumValueOptions_descriptor_;
11144 metadata.reflection = EnumValueOptions_reflection_;
11145 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011146}
11147
Jisi Liu885b6122015-02-28 14:51:22 -080011148#if PROTOBUF_INLINE_NOT_IN_HEADERS
11149// EnumValueOptions
11150
11151// optional bool deprecated = 1 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011152bool EnumValueOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011153 return (_has_bits_[0] & 0x00000001u) != 0;
11154}
Bo Yang5db21732015-05-21 14:28:59 -070011155void EnumValueOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011156 _has_bits_[0] |= 0x00000001u;
11157}
Bo Yang5db21732015-05-21 14:28:59 -070011158void EnumValueOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011159 _has_bits_[0] &= ~0x00000001u;
11160}
Bo Yang5db21732015-05-21 14:28:59 -070011161void EnumValueOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011162 deprecated_ = false;
11163 clear_has_deprecated();
11164}
11165 bool EnumValueOptions::deprecated() const {
11166 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.deprecated)
11167 return deprecated_;
11168}
11169 void EnumValueOptions::set_deprecated(bool value) {
11170 set_has_deprecated();
11171 deprecated_ = value;
11172 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueOptions.deprecated)
11173}
11174
11175// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011176int EnumValueOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011177 return uninterpreted_option_.size();
11178}
Bo Yang5db21732015-05-21 14:28:59 -070011179void EnumValueOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011180 uninterpreted_option_.Clear();
11181}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011182const ::google::protobuf::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080011183 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.uninterpreted_option)
11184 return uninterpreted_option_.Get(index);
11185}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011186::google::protobuf::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080011187 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueOptions.uninterpreted_option)
11188 return uninterpreted_option_.Mutable(index);
11189}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011190::google::protobuf::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011191 // @@protoc_insertion_point(field_add:google.protobuf.EnumValueOptions.uninterpreted_option)
11192 return uninterpreted_option_.Add();
11193}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011194::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080011195EnumValueOptions::mutable_uninterpreted_option() {
11196 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option)
11197 return &uninterpreted_option_;
11198}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011199const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11200EnumValueOptions::uninterpreted_option() const {
11201 // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option)
11202 return uninterpreted_option_;
11203}
Jisi Liu885b6122015-02-28 14:51:22 -080011204
11205#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011206
11207// ===================================================================
11208
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011209#if !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +000011210const int ServiceOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011211const int ServiceOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011212#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +000011213
kenton@google.com573989f2009-10-30 22:02:17 +000011214ServiceOptions::ServiceOptions()
Bo Yang5db21732015-05-21 14:28:59 -070011215 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011216 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011217 // @@protoc_insertion_point(constructor:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011218}
11219
kenton@google.com80b1d622009-07-29 01:13:20 +000011220void ServiceOptions::InitAsDefaultInstance() {
11221}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011222
kenton@google.com573989f2009-10-30 22:02:17 +000011223ServiceOptions::ServiceOptions(const ServiceOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011224 : ::google::protobuf::Message(),
11225 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011226 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000011227 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011228 // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011229}
11230
kenton@google.comd37d46d2009-04-25 02:53:47 +000011231void ServiceOptions::SharedCtor() {
11232 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011233 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000011234 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11235}
11236
temporal40ee5512008-07-10 02:12:20 +000011237ServiceOptions::~ServiceOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011238 // @@protoc_insertion_point(destructor:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011239 SharedDtor();
11240}
11241
11242void ServiceOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011243 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000011244 }
11245}
11246
kenton@google.comfccb1462009-12-18 02:11:36 +000011247void ServiceOptions::SetCachedSize(int size) const {
11248 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
11249 _cached_size_ = size;
11250 GOOGLE_SAFE_CONCURRENT_WRITES_END();
11251}
temporal40ee5512008-07-10 02:12:20 +000011252const ::google::protobuf::Descriptor* ServiceOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011253 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000011254 return ServiceOptions_descriptor_;
11255}
11256
kenton@google.com24bf56f2008-09-24 20:31:01 +000011257const ServiceOptions& ServiceOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000011258 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
11259 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011260}
11261
11262ServiceOptions* ServiceOptions::default_instance_ = NULL;
11263
Feng Xiao6ef984a2014-11-10 17:34:54 -080011264ServiceOptions* ServiceOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080011265 ServiceOptions* n = new ServiceOptions;
11266 if (arena != NULL) {
11267 arena->Own(n);
11268 }
11269 return n;
temporal40ee5512008-07-10 02:12:20 +000011270}
11271
11272void ServiceOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011273 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011274 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011275 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000011276 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080011277 if (_internal_metadata_.have_unknown_fields()) {
11278 mutable_unknown_fields()->Clear();
11279 }
temporal40ee5512008-07-10 02:12:20 +000011280}
11281
11282bool ServiceOptions::MergePartialFromCodedStream(
11283 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011284#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000011285 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011286 // @@protoc_insertion_point(parse_start:google.protobuf.ServiceOptions)
11287 for (;;) {
11288 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
11289 tag = p.first;
11290 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011291 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011292 // optional bool deprecated = 33 [default = false];
11293 case 33: {
11294 if (tag == 264) {
11295 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
11296 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
11297 input, &deprecated_)));
11298 set_has_deprecated();
11299 } else {
11300 goto handle_unusual;
11301 }
11302 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
11303 break;
11304 }
11305
kenton@google.com24bf56f2008-09-24 20:31:01 +000011306 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
11307 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011308 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011309 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070011310 DO_(input->IncrementRecursionDepth());
11311 parse_loop_uninterpreted_option:
11312 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000011313 input, add_uninterpreted_option()));
11314 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011315 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011316 }
Bo Yang5db21732015-05-21 14:28:59 -070011317 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
11318 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011319 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011320 break;
11321 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011322
kenton@google.com24bf56f2008-09-24 20:31:01 +000011323 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011324 handle_unusual:
11325 if (tag == 0 ||
11326 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000011327 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011328 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011329 }
11330 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011331 DO_(_extensions_.ParseField(tag, input, default_instance_,
11332 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000011333 continue;
11334 }
11335 DO_(::google::protobuf::internal::WireFormat::SkipField(
11336 input, tag, mutable_unknown_fields()));
11337 break;
11338 }
temporal40ee5512008-07-10 02:12:20 +000011339 }
temporal40ee5512008-07-10 02:12:20 +000011340 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011341success:
11342 // @@protoc_insertion_point(parse_success:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011343 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011344failure:
11345 // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceOptions)
11346 return false;
temporal40ee5512008-07-10 02:12:20 +000011347#undef DO_
11348}
11349
kenton@google.comd37d46d2009-04-25 02:53:47 +000011350void ServiceOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000011351 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011352 // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceOptions)
11353 // optional bool deprecated = 33 [default = false];
11354 if (has_deprecated()) {
11355 ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output);
11356 }
11357
kenton@google.com24bf56f2008-09-24 20:31:01 +000011358 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011359 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011360 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000011361 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011362 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011363
kenton@google.com24bf56f2008-09-24 20:31:01 +000011364 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011365 _extensions_.SerializeWithCachedSizes(
11366 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011367
Feng Xiao6ef984a2014-11-10 17:34:54 -080011368 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011369 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11370 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000011371 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011372 // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011373}
11374
11375::google::protobuf::uint8* ServiceOptions::SerializeWithCachedSizesToArray(
11376 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011377 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions)
11378 // optional bool deprecated = 33 [default = false];
11379 if (has_deprecated()) {
11380 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target);
11381 }
11382
kenton@google.comd37d46d2009-04-25 02:53:47 +000011383 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011384 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011385 target = ::google::protobuf::internal::WireFormatLite::
11386 WriteMessageNoVirtualToArray(
11387 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011388 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011389
kenton@google.comd37d46d2009-04-25 02:53:47 +000011390 // Extension range [1000, 536870912)
11391 target = _extensions_.SerializeWithCachedSizesToArray(
11392 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011393
Feng Xiao6ef984a2014-11-10 17:34:54 -080011394 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011395 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11396 unknown_fields(), target);
11397 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011398 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011399 return target;
temporal40ee5512008-07-10 02:12:20 +000011400}
11401
11402int ServiceOptions::ByteSize() const {
11403 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011404
Feng Xiao6ef984a2014-11-10 17:34:54 -080011405 // optional bool deprecated = 33 [default = false];
11406 if (has_deprecated()) {
11407 total_size += 2 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011408 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080011409
kenton@google.com24bf56f2008-09-24 20:31:01 +000011410 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000011411 total_size += 2 * this->uninterpreted_option_size();
11412 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011413 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000011414 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011415 this->uninterpreted_option(i));
11416 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011417
kenton@google.comd37d46d2009-04-25 02:53:47 +000011418 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011419
Feng Xiao6ef984a2014-11-10 17:34:54 -080011420 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000011421 total_size +=
11422 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
11423 unknown_fields());
11424 }
kenton@google.comfccb1462009-12-18 02:11:36 +000011425 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000011426 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000011427 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000011428 return total_size;
11429}
11430
11431void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011432 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070011433 const ServiceOptions* source =
11434 ::google::protobuf::internal::DynamicCastToGenerated<const ServiceOptions>(
11435 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011436 if (source == NULL) {
11437 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
11438 } else {
11439 MergeFrom(*source);
11440 }
temporal40ee5512008-07-10 02:12:20 +000011441}
11442
11443void ServiceOptions::MergeFrom(const ServiceOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011444 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011445 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011446 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
11447 if (from.has_deprecated()) {
11448 set_deprecated(from.deprecated());
11449 }
11450 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011451 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080011452 if (from._internal_metadata_.have_unknown_fields()) {
11453 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
11454 }
temporal40ee5512008-07-10 02:12:20 +000011455}
11456
11457void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) {
11458 if (&from == this) return;
11459 Clear();
11460 MergeFrom(from);
11461}
11462
11463void ServiceOptions::CopyFrom(const ServiceOptions& from) {
11464 if (&from == this) return;
11465 Clear();
11466 MergeFrom(from);
11467}
11468
kenton@google.comceb561d2009-06-25 19:05:36 +000011469bool ServiceOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011470
jieluo@google.com4de8f552014-07-18 00:47:59 +000011471 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011472
kenton@google.comceb561d2009-06-25 19:05:36 +000011473 if (!_extensions_.IsInitialized()) return false; return true;
11474}
11475
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011476void ServiceOptions::Swap(ServiceOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011477 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011478 InternalSwap(other);
11479}
11480void ServiceOptions::InternalSwap(ServiceOptions* other) {
11481 std::swap(deprecated_, other->deprecated_);
11482 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11483 std::swap(_has_bits_[0], other->_has_bits_[0]);
11484 _internal_metadata_.Swap(&other->_internal_metadata_);
11485 std::swap(_cached_size_, other->_cached_size_);
11486 _extensions_.Swap(&other->_extensions_);
11487}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011488
kenton@google.com80b1d622009-07-29 01:13:20 +000011489::google::protobuf::Metadata ServiceOptions::GetMetadata() const {
11490 protobuf_AssignDescriptorsOnce();
11491 ::google::protobuf::Metadata metadata;
11492 metadata.descriptor = ServiceOptions_descriptor_;
11493 metadata.reflection = ServiceOptions_reflection_;
11494 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011495}
11496
Jisi Liu885b6122015-02-28 14:51:22 -080011497#if PROTOBUF_INLINE_NOT_IN_HEADERS
11498// ServiceOptions
11499
11500// optional bool deprecated = 33 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011501bool ServiceOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011502 return (_has_bits_[0] & 0x00000001u) != 0;
11503}
Bo Yang5db21732015-05-21 14:28:59 -070011504void ServiceOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011505 _has_bits_[0] |= 0x00000001u;
11506}
Bo Yang5db21732015-05-21 14:28:59 -070011507void ServiceOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011508 _has_bits_[0] &= ~0x00000001u;
11509}
Bo Yang5db21732015-05-21 14:28:59 -070011510void ServiceOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011511 deprecated_ = false;
11512 clear_has_deprecated();
11513}
11514 bool ServiceOptions::deprecated() const {
11515 // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.deprecated)
11516 return deprecated_;
11517}
11518 void ServiceOptions::set_deprecated(bool value) {
11519 set_has_deprecated();
11520 deprecated_ = value;
11521 // @@protoc_insertion_point(field_set:google.protobuf.ServiceOptions.deprecated)
11522}
11523
11524// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011525int ServiceOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011526 return uninterpreted_option_.size();
11527}
Bo Yang5db21732015-05-21 14:28:59 -070011528void ServiceOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011529 uninterpreted_option_.Clear();
11530}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011531const ::google::protobuf::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080011532 // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.uninterpreted_option)
11533 return uninterpreted_option_.Get(index);
11534}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011535::google::protobuf::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080011536 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceOptions.uninterpreted_option)
11537 return uninterpreted_option_.Mutable(index);
11538}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011539::google::protobuf::UninterpretedOption* ServiceOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011540 // @@protoc_insertion_point(field_add:google.protobuf.ServiceOptions.uninterpreted_option)
11541 return uninterpreted_option_.Add();
11542}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011543::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080011544ServiceOptions::mutable_uninterpreted_option() {
11545 // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option)
11546 return &uninterpreted_option_;
11547}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011548const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11549ServiceOptions::uninterpreted_option() const {
11550 // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option)
11551 return uninterpreted_option_;
11552}
Jisi Liu885b6122015-02-28 14:51:22 -080011553
11554#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011555
11556// ===================================================================
11557
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011558#if !defined(_MSC_VER) || _MSC_VER >= 1900
jieluo@google.com4de8f552014-07-18 00:47:59 +000011559const int MethodOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011560const int MethodOptions::kUninterpretedOptionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011561#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
temporal40ee5512008-07-10 02:12:20 +000011562
kenton@google.com573989f2009-10-30 22:02:17 +000011563MethodOptions::MethodOptions()
Bo Yang5db21732015-05-21 14:28:59 -070011564 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011565 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011566 // @@protoc_insertion_point(constructor:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011567}
11568
kenton@google.com80b1d622009-07-29 01:13:20 +000011569void MethodOptions::InitAsDefaultInstance() {
11570}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011571
kenton@google.com573989f2009-10-30 22:02:17 +000011572MethodOptions::MethodOptions(const MethodOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011573 : ::google::protobuf::Message(),
11574 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011575 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000011576 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011577 // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011578}
11579
kenton@google.comd37d46d2009-04-25 02:53:47 +000011580void MethodOptions::SharedCtor() {
11581 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011582 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000011583 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11584}
11585
temporal40ee5512008-07-10 02:12:20 +000011586MethodOptions::~MethodOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011587 // @@protoc_insertion_point(destructor:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011588 SharedDtor();
11589}
11590
11591void MethodOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011592 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000011593 }
11594}
11595
kenton@google.comfccb1462009-12-18 02:11:36 +000011596void MethodOptions::SetCachedSize(int size) const {
11597 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
11598 _cached_size_ = size;
11599 GOOGLE_SAFE_CONCURRENT_WRITES_END();
11600}
temporal40ee5512008-07-10 02:12:20 +000011601const ::google::protobuf::Descriptor* MethodOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011602 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000011603 return MethodOptions_descriptor_;
11604}
11605
kenton@google.com24bf56f2008-09-24 20:31:01 +000011606const MethodOptions& MethodOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000011607 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
11608 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011609}
11610
11611MethodOptions* MethodOptions::default_instance_ = NULL;
11612
Feng Xiao6ef984a2014-11-10 17:34:54 -080011613MethodOptions* MethodOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080011614 MethodOptions* n = new MethodOptions;
11615 if (arena != NULL) {
11616 arena->Own(n);
11617 }
11618 return n;
temporal40ee5512008-07-10 02:12:20 +000011619}
11620
11621void MethodOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011622 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011623 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011624 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000011625 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080011626 if (_internal_metadata_.have_unknown_fields()) {
11627 mutable_unknown_fields()->Clear();
11628 }
temporal40ee5512008-07-10 02:12:20 +000011629}
11630
11631bool MethodOptions::MergePartialFromCodedStream(
11632 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011633#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000011634 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011635 // @@protoc_insertion_point(parse_start:google.protobuf.MethodOptions)
11636 for (;;) {
11637 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
11638 tag = p.first;
11639 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011640 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011641 // optional bool deprecated = 33 [default = false];
11642 case 33: {
11643 if (tag == 264) {
11644 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
11645 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
11646 input, &deprecated_)));
11647 set_has_deprecated();
11648 } else {
11649 goto handle_unusual;
11650 }
11651 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
11652 break;
11653 }
11654
kenton@google.com24bf56f2008-09-24 20:31:01 +000011655 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
11656 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011657 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011658 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070011659 DO_(input->IncrementRecursionDepth());
11660 parse_loop_uninterpreted_option:
11661 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000011662 input, add_uninterpreted_option()));
11663 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011664 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011665 }
Bo Yang5db21732015-05-21 14:28:59 -070011666 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
11667 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011668 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011669 break;
11670 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011671
kenton@google.com24bf56f2008-09-24 20:31:01 +000011672 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011673 handle_unusual:
11674 if (tag == 0 ||
11675 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000011676 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011677 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011678 }
11679 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011680 DO_(_extensions_.ParseField(tag, input, default_instance_,
11681 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000011682 continue;
11683 }
11684 DO_(::google::protobuf::internal::WireFormat::SkipField(
11685 input, tag, mutable_unknown_fields()));
11686 break;
11687 }
temporal40ee5512008-07-10 02:12:20 +000011688 }
temporal40ee5512008-07-10 02:12:20 +000011689 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011690success:
11691 // @@protoc_insertion_point(parse_success:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011692 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011693failure:
11694 // @@protoc_insertion_point(parse_failure:google.protobuf.MethodOptions)
11695 return false;
temporal40ee5512008-07-10 02:12:20 +000011696#undef DO_
11697}
11698
kenton@google.comd37d46d2009-04-25 02:53:47 +000011699void MethodOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000011700 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011701 // @@protoc_insertion_point(serialize_start:google.protobuf.MethodOptions)
11702 // optional bool deprecated = 33 [default = false];
11703 if (has_deprecated()) {
11704 ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output);
11705 }
11706
kenton@google.com24bf56f2008-09-24 20:31:01 +000011707 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011708 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011709 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000011710 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011711 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011712
kenton@google.com24bf56f2008-09-24 20:31:01 +000011713 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011714 _extensions_.SerializeWithCachedSizes(
11715 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011716
Feng Xiao6ef984a2014-11-10 17:34:54 -080011717 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011718 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11719 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000011720 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011721 // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011722}
11723
11724::google::protobuf::uint8* MethodOptions::SerializeWithCachedSizesToArray(
11725 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011726 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions)
11727 // optional bool deprecated = 33 [default = false];
11728 if (has_deprecated()) {
11729 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target);
11730 }
11731
kenton@google.comd37d46d2009-04-25 02:53:47 +000011732 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011733 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011734 target = ::google::protobuf::internal::WireFormatLite::
11735 WriteMessageNoVirtualToArray(
11736 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011737 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011738
kenton@google.comd37d46d2009-04-25 02:53:47 +000011739 // Extension range [1000, 536870912)
11740 target = _extensions_.SerializeWithCachedSizesToArray(
11741 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011742
Feng Xiao6ef984a2014-11-10 17:34:54 -080011743 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011744 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11745 unknown_fields(), target);
11746 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011747 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011748 return target;
temporal40ee5512008-07-10 02:12:20 +000011749}
11750
11751int MethodOptions::ByteSize() const {
11752 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011753
Feng Xiao6ef984a2014-11-10 17:34:54 -080011754 // optional bool deprecated = 33 [default = false];
11755 if (has_deprecated()) {
11756 total_size += 2 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011757 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080011758
kenton@google.com24bf56f2008-09-24 20:31:01 +000011759 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000011760 total_size += 2 * this->uninterpreted_option_size();
11761 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011762 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000011763 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011764 this->uninterpreted_option(i));
11765 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011766
kenton@google.comd37d46d2009-04-25 02:53:47 +000011767 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011768
Feng Xiao6ef984a2014-11-10 17:34:54 -080011769 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000011770 total_size +=
11771 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
11772 unknown_fields());
11773 }
kenton@google.comfccb1462009-12-18 02:11:36 +000011774 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000011775 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000011776 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000011777 return total_size;
11778}
11779
11780void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011781 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070011782 const MethodOptions* source =
11783 ::google::protobuf::internal::DynamicCastToGenerated<const MethodOptions>(
11784 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011785 if (source == NULL) {
11786 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
11787 } else {
11788 MergeFrom(*source);
11789 }
temporal40ee5512008-07-10 02:12:20 +000011790}
11791
11792void MethodOptions::MergeFrom(const MethodOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011793 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011794 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011795 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
11796 if (from.has_deprecated()) {
11797 set_deprecated(from.deprecated());
11798 }
11799 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011800 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080011801 if (from._internal_metadata_.have_unknown_fields()) {
11802 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
11803 }
temporal40ee5512008-07-10 02:12:20 +000011804}
11805
11806void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) {
11807 if (&from == this) return;
11808 Clear();
11809 MergeFrom(from);
11810}
11811
11812void MethodOptions::CopyFrom(const MethodOptions& from) {
11813 if (&from == this) return;
11814 Clear();
11815 MergeFrom(from);
11816}
11817
kenton@google.comceb561d2009-06-25 19:05:36 +000011818bool MethodOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011819
jieluo@google.com4de8f552014-07-18 00:47:59 +000011820 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011821
kenton@google.comceb561d2009-06-25 19:05:36 +000011822 if (!_extensions_.IsInitialized()) return false; return true;
11823}
11824
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011825void MethodOptions::Swap(MethodOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011826 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011827 InternalSwap(other);
11828}
11829void MethodOptions::InternalSwap(MethodOptions* other) {
11830 std::swap(deprecated_, other->deprecated_);
11831 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11832 std::swap(_has_bits_[0], other->_has_bits_[0]);
11833 _internal_metadata_.Swap(&other->_internal_metadata_);
11834 std::swap(_cached_size_, other->_cached_size_);
11835 _extensions_.Swap(&other->_extensions_);
11836}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011837
kenton@google.com80b1d622009-07-29 01:13:20 +000011838::google::protobuf::Metadata MethodOptions::GetMetadata() const {
11839 protobuf_AssignDescriptorsOnce();
11840 ::google::protobuf::Metadata metadata;
11841 metadata.descriptor = MethodOptions_descriptor_;
11842 metadata.reflection = MethodOptions_reflection_;
11843 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011844}
11845
Jisi Liu885b6122015-02-28 14:51:22 -080011846#if PROTOBUF_INLINE_NOT_IN_HEADERS
11847// MethodOptions
11848
11849// optional bool deprecated = 33 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011850bool MethodOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011851 return (_has_bits_[0] & 0x00000001u) != 0;
11852}
Bo Yang5db21732015-05-21 14:28:59 -070011853void MethodOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011854 _has_bits_[0] |= 0x00000001u;
11855}
Bo Yang5db21732015-05-21 14:28:59 -070011856void MethodOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011857 _has_bits_[0] &= ~0x00000001u;
11858}
Bo Yang5db21732015-05-21 14:28:59 -070011859void MethodOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011860 deprecated_ = false;
11861 clear_has_deprecated();
11862}
11863 bool MethodOptions::deprecated() const {
11864 // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.deprecated)
11865 return deprecated_;
11866}
11867 void MethodOptions::set_deprecated(bool value) {
11868 set_has_deprecated();
11869 deprecated_ = value;
11870 // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.deprecated)
11871}
11872
11873// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011874int MethodOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011875 return uninterpreted_option_.size();
11876}
Bo Yang5db21732015-05-21 14:28:59 -070011877void MethodOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011878 uninterpreted_option_.Clear();
11879}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011880const ::google::protobuf::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080011881 // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.uninterpreted_option)
11882 return uninterpreted_option_.Get(index);
11883}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011884::google::protobuf::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080011885 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodOptions.uninterpreted_option)
11886 return uninterpreted_option_.Mutable(index);
11887}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011888::google::protobuf::UninterpretedOption* MethodOptions::add_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011889 // @@protoc_insertion_point(field_add:google.protobuf.MethodOptions.uninterpreted_option)
11890 return uninterpreted_option_.Add();
11891}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011892::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
Jisi Liu885b6122015-02-28 14:51:22 -080011893MethodOptions::mutable_uninterpreted_option() {
11894 // @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option)
11895 return &uninterpreted_option_;
11896}
Feng Xiaoeee38b02015-08-22 18:25:48 -070011897const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11898MethodOptions::uninterpreted_option() const {
11899 // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option)
11900 return uninterpreted_option_;
11901}
Jisi Liu885b6122015-02-28 14:51:22 -080011902
11903#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011904
kenton@google.com24bf56f2008-09-24 20:31:01 +000011905// ===================================================================
11906
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011907#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011908const int UninterpretedOption_NamePart::kNamePartFieldNumber;
11909const int UninterpretedOption_NamePart::kIsExtensionFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070011910#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.com24bf56f2008-09-24 20:31:01 +000011911
kenton@google.com573989f2009-10-30 22:02:17 +000011912UninterpretedOption_NamePart::UninterpretedOption_NamePart()
Bo Yang5db21732015-05-21 14:28:59 -070011913 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011914 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011915 // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000011916}
11917
kenton@google.com80b1d622009-07-29 01:13:20 +000011918void UninterpretedOption_NamePart::InitAsDefaultInstance() {
11919}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011920
kenton@google.com573989f2009-10-30 22:02:17 +000011921UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011922 : ::google::protobuf::Message(),
11923 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011924 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +000011925 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011926 // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000011927}
11928
kenton@google.comd37d46d2009-04-25 02:53:47 +000011929void UninterpretedOption_NamePart::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011930 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +000011931 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011932 name_part_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000011933 is_extension_ = false;
11934 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11935}
11936
kenton@google.com24bf56f2008-09-24 20:31:01 +000011937UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011938 // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011939 SharedDtor();
11940}
11941
11942void UninterpretedOption_NamePart::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080011943 name_part_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000011944 if (this != default_instance_) {
11945 }
11946}
11947
kenton@google.comfccb1462009-12-18 02:11:36 +000011948void UninterpretedOption_NamePart::SetCachedSize(int size) const {
11949 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
11950 _cached_size_ = size;
11951 GOOGLE_SAFE_CONCURRENT_WRITES_END();
11952}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011953const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011954 protobuf_AssignDescriptorsOnce();
kenton@google.com24bf56f2008-09-24 20:31:01 +000011955 return UninterpretedOption_NamePart_descriptor_;
11956}
11957
11958const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000011959 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
11960 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011961}
11962
11963UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL;
11964
Feng Xiao6ef984a2014-11-10 17:34:54 -080011965UninterpretedOption_NamePart* UninterpretedOption_NamePart::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080011966 UninterpretedOption_NamePart* n = new UninterpretedOption_NamePart;
11967 if (arena != NULL) {
11968 arena->Own(n);
11969 }
11970 return n;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011971}
11972
11973void UninterpretedOption_NamePart::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -070011974 if (_has_bits_[0 / 32] & 3u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000011975 if (has_name_part()) {
Feng Xiaof157a562014-11-14 11:50:31 -080011976 name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000011977 }
11978 is_extension_ = false;
11979 }
11980 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080011981 if (_internal_metadata_.have_unknown_fields()) {
11982 mutable_unknown_fields()->Clear();
11983 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011984}
11985
11986bool UninterpretedOption_NamePart::MergePartialFromCodedStream(
11987 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011988#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
kenton@google.com24bf56f2008-09-24 20:31:01 +000011989 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011990 // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption.NamePart)
11991 for (;;) {
11992 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
11993 tag = p.first;
11994 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011995 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011996 // required string name_part = 1;
11997 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011998 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011999 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
12000 input, this->mutable_name_part()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000012001 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +000012002 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012003 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012004 "google.protobuf.UninterpretedOption.NamePart.name_part");
kenton@google.comfccb1462009-12-18 02:11:36 +000012005 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012006 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012007 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012008 if (input->ExpectTag(16)) goto parse_is_extension;
12009 break;
12010 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012011
kenton@google.com24bf56f2008-09-24 20:31:01 +000012012 // required bool is_extension = 2;
12013 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012014 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012015 parse_is_extension:
12016 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12017 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
12018 input, &is_extension_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012019 set_has_is_extension();
kenton@google.comfccb1462009-12-18 02:11:36 +000012020 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012021 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012022 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012023 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012024 break;
12025 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012026
kenton@google.com24bf56f2008-09-24 20:31:01 +000012027 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012028 handle_unusual:
12029 if (tag == 0 ||
12030 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000012031 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012032 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012033 }
12034 DO_(::google::protobuf::internal::WireFormat::SkipField(
12035 input, tag, mutable_unknown_fields()));
12036 break;
12037 }
12038 }
12039 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012040success:
12041 // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012042 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012043failure:
12044 // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption.NamePart)
12045 return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012046#undef DO_
12047}
12048
kenton@google.comd37d46d2009-04-25 02:53:47 +000012049void UninterpretedOption_NamePart::SerializeWithCachedSizes(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012050 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012051 // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012052 // required string name_part = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012053 if (has_name_part()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012054 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012055 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012056 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012057 "google.protobuf.UninterpretedOption.NamePart.name_part");
jieluo@google.com4de8f552014-07-18 00:47:59 +000012058 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000012059 1, this->name_part(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012060 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012061
kenton@google.com24bf56f2008-09-24 20:31:01 +000012062 // required bool is_extension = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012063 if (has_is_extension()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012064 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_extension(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012065 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012066
Feng Xiao6ef984a2014-11-10 17:34:54 -080012067 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012068 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
12069 unknown_fields(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012070 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012071 // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012072}
12073
12074::google::protobuf::uint8* UninterpretedOption_NamePart::SerializeWithCachedSizesToArray(
12075 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012076 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012077 // required string name_part = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012078 if (has_name_part()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012079 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012080 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012081 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012082 "google.protobuf.UninterpretedOption.NamePart.name_part");
kenton@google.com80b1d622009-07-29 01:13:20 +000012083 target =
12084 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12085 1, this->name_part(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012086 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012087
kenton@google.comd37d46d2009-04-25 02:53:47 +000012088 // required bool is_extension = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012089 if (has_is_extension()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012090 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012091 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012092
Feng Xiao6ef984a2014-11-10 17:34:54 -080012093 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012094 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
12095 unknown_fields(), target);
12096 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012097 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012098 return target;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012099}
12100
Feng Xiao6ef984a2014-11-10 17:34:54 -080012101int UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const {
12102 int total_size = 0;
12103
12104 if (has_name_part()) {
12105 // required string name_part = 1;
12106 total_size += 1 +
12107 ::google::protobuf::internal::WireFormatLite::StringSize(
12108 this->name_part());
12109 }
12110
12111 if (has_is_extension()) {
12112 // required bool is_extension = 2;
12113 total_size += 1 + 1;
12114 }
12115
12116 return total_size;
12117}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012118int UninterpretedOption_NamePart::ByteSize() const {
12119 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012120
Feng Xiao6ef984a2014-11-10 17:34:54 -080012121 if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
kenton@google.com24bf56f2008-09-24 20:31:01 +000012122 // required string name_part = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012123 total_size += 1 +
12124 ::google::protobuf::internal::WireFormatLite::StringSize(
12125 this->name_part());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012126
kenton@google.com24bf56f2008-09-24 20:31:01 +000012127 // required bool is_extension = 2;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012128 total_size += 1 + 1;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012129
Feng Xiao6ef984a2014-11-10 17:34:54 -080012130 } else {
12131 total_size += RequiredFieldsByteSizeFallback();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012132 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012133 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012134 total_size +=
12135 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
12136 unknown_fields());
12137 }
kenton@google.comfccb1462009-12-18 02:11:36 +000012138 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012139 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000012140 GOOGLE_SAFE_CONCURRENT_WRITES_END();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012141 return total_size;
12142}
12143
12144void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012145 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070012146 const UninterpretedOption_NamePart* source =
12147 ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption_NamePart>(
12148 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012149 if (source == NULL) {
12150 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
12151 } else {
12152 MergeFrom(*source);
12153 }
12154}
12155
12156void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012157 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012158 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012159 if (from.has_name_part()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012160 set_has_name_part();
12161 name_part_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_part_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012162 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012163 if (from.has_is_extension()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012164 set_is_extension(from.is_extension());
12165 }
12166 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012167 if (from._internal_metadata_.have_unknown_fields()) {
12168 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
12169 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012170}
12171
12172void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) {
12173 if (&from == this) return;
12174 Clear();
12175 MergeFrom(from);
12176}
12177
12178void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) {
12179 if (&from == this) return;
12180 Clear();
12181 MergeFrom(from);
12182}
12183
kenton@google.comceb561d2009-06-25 19:05:36 +000012184bool UninterpretedOption_NamePart::IsInitialized() const {
12185 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012186
kenton@google.comceb561d2009-06-25 19:05:36 +000012187 return true;
12188}
12189
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012190void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080012191 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012192 InternalSwap(other);
12193}
12194void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) {
12195 name_part_.Swap(&other->name_part_);
12196 std::swap(is_extension_, other->is_extension_);
12197 std::swap(_has_bits_[0], other->_has_bits_[0]);
12198 _internal_metadata_.Swap(&other->_internal_metadata_);
12199 std::swap(_cached_size_, other->_cached_size_);
12200}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012201
kenton@google.com80b1d622009-07-29 01:13:20 +000012202::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const {
12203 protobuf_AssignDescriptorsOnce();
12204 ::google::protobuf::Metadata metadata;
12205 metadata.descriptor = UninterpretedOption_NamePart_descriptor_;
12206 metadata.reflection = UninterpretedOption_NamePart_reflection_;
12207 return metadata;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012208}
12209
kenton@google.com24bf56f2008-09-24 20:31:01 +000012210
12211// -------------------------------------------------------------------
12212
Bruce Dawson86ba70e2015-10-29 12:41:29 -070012213#if !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000012214const int UninterpretedOption::kNameFieldNumber;
12215const int UninterpretedOption::kIdentifierValueFieldNumber;
12216const int UninterpretedOption::kPositiveIntValueFieldNumber;
12217const int UninterpretedOption::kNegativeIntValueFieldNumber;
12218const int UninterpretedOption::kDoubleValueFieldNumber;
12219const int UninterpretedOption::kStringValueFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012220const int UninterpretedOption::kAggregateValueFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070012221#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000012222
kenton@google.com573989f2009-10-30 22:02:17 +000012223UninterpretedOption::UninterpretedOption()
Bo Yang5db21732015-05-21 14:28:59 -070012224 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012225 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000012226 // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012227}
12228
kenton@google.com80b1d622009-07-29 01:13:20 +000012229void UninterpretedOption::InitAsDefaultInstance() {
12230}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012231
kenton@google.com573989f2009-10-30 22:02:17 +000012232UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080012233 : ::google::protobuf::Message(),
12234 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012235 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012236 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000012237 // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012238}
12239
kenton@google.comd37d46d2009-04-25 02:53:47 +000012240void UninterpretedOption::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012241 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +000012242 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012243 identifier_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000012244 positive_int_value_ = GOOGLE_ULONGLONG(0);
12245 negative_int_value_ = GOOGLE_LONGLONG(0);
12246 double_value_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012247 string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12248 aggregate_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000012249 ::memset(_has_bits_, 0, sizeof(_has_bits_));
12250}
12251
kenton@google.com24bf56f2008-09-24 20:31:01 +000012252UninterpretedOption::~UninterpretedOption() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012253 // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012254 SharedDtor();
12255}
12256
12257void UninterpretedOption::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080012258 identifier_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12259 string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12260 aggregate_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012261 if (this != default_instance_) {
12262 }
12263}
12264
kenton@google.comfccb1462009-12-18 02:11:36 +000012265void UninterpretedOption::SetCachedSize(int size) const {
12266 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
12267 _cached_size_ = size;
12268 GOOGLE_SAFE_CONCURRENT_WRITES_END();
12269}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012270const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012271 protobuf_AssignDescriptorsOnce();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012272 return UninterpretedOption_descriptor_;
12273}
12274
12275const UninterpretedOption& UninterpretedOption::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000012276 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
12277 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012278}
12279
12280UninterpretedOption* UninterpretedOption::default_instance_ = NULL;
12281
Feng Xiao6ef984a2014-11-10 17:34:54 -080012282UninterpretedOption* UninterpretedOption::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080012283 UninterpretedOption* n = new UninterpretedOption;
12284 if (arena != NULL) {
12285 arena->Own(n);
12286 }
12287 return n;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012288}
12289
12290void UninterpretedOption::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -080012291#define ZR_HELPER_(f) reinterpret_cast<char*>(\
12292 &reinterpret_cast<UninterpretedOption*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +000012293
Jisi Liu885b6122015-02-28 14:51:22 -080012294#define ZR_(first, last) do {\
12295 ::memset(&first, 0,\
12296 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
12297} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +000012298
Austin Schuhe8268372015-05-19 23:22:20 -070012299 if (_has_bits_[0 / 32] & 126u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012300 ZR_(positive_int_value_, double_value_);
liujisi@google.com33165fe2010-11-02 13:14:58 +000012301 if (has_identifier_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012302 identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012303 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012304 if (has_string_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012305 string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012306 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012307 if (has_aggregate_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012308 aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000012309 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012310 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012311
Jisi Liu885b6122015-02-28 14:51:22 -080012312#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +000012313#undef ZR_
12314
kenton@google.com24bf56f2008-09-24 20:31:01 +000012315 name_.Clear();
12316 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080012317 if (_internal_metadata_.have_unknown_fields()) {
12318 mutable_unknown_fields()->Clear();
12319 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012320}
12321
12322bool UninterpretedOption::MergePartialFromCodedStream(
12323 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012324#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
kenton@google.com24bf56f2008-09-24 20:31:01 +000012325 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012326 // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption)
12327 for (;;) {
12328 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
12329 tag = p.first;
12330 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000012331 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012332 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
12333 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012334 if (tag == 18) {
Bo Yang5db21732015-05-21 14:28:59 -070012335 DO_(input->IncrementRecursionDepth());
12336 parse_loop_name:
12337 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000012338 input, add_name()));
12339 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012340 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012341 }
Bo Yang5db21732015-05-21 14:28:59 -070012342 if (input->ExpectTag(18)) goto parse_loop_name;
12343 input->UnsafeDecrementRecursionDepth();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012344 if (input->ExpectTag(26)) goto parse_identifier_value;
12345 break;
12346 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012347
kenton@google.com24bf56f2008-09-24 20:31:01 +000012348 // optional string identifier_value = 3;
12349 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012350 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012351 parse_identifier_value:
12352 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
12353 input, this->mutable_identifier_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000012354 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +000012355 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012356 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012357 "google.protobuf.UninterpretedOption.identifier_value");
kenton@google.comfccb1462009-12-18 02:11:36 +000012358 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012359 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012360 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012361 if (input->ExpectTag(32)) goto parse_positive_int_value;
12362 break;
12363 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012364
kenton@google.com24bf56f2008-09-24 20:31:01 +000012365 // optional uint64 positive_int_value = 4;
12366 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012367 if (tag == 32) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012368 parse_positive_int_value:
12369 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12370 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
12371 input, &positive_int_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012372 set_has_positive_int_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012373 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012374 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012375 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012376 if (input->ExpectTag(40)) goto parse_negative_int_value;
12377 break;
12378 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012379
kenton@google.com24bf56f2008-09-24 20:31:01 +000012380 // optional int64 negative_int_value = 5;
12381 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012382 if (tag == 40) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012383 parse_negative_int_value:
12384 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12385 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
12386 input, &negative_int_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012387 set_has_negative_int_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012388 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012389 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012390 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012391 if (input->ExpectTag(49)) goto parse_double_value;
12392 break;
12393 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012394
kenton@google.com24bf56f2008-09-24 20:31:01 +000012395 // optional double double_value = 6;
12396 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012397 if (tag == 49) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012398 parse_double_value:
12399 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12400 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
12401 input, &double_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012402 set_has_double_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012403 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012404 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012405 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012406 if (input->ExpectTag(58)) goto parse_string_value;
12407 break;
12408 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012409
kenton@google.com24bf56f2008-09-24 20:31:01 +000012410 // optional bytes string_value = 7;
12411 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012412 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012413 parse_string_value:
12414 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
12415 input, this->mutable_string_value()));
12416 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012417 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012418 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012419 if (input->ExpectTag(66)) goto parse_aggregate_value;
12420 break;
12421 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012422
liujisi@google.com33165fe2010-11-02 13:14:58 +000012423 // optional string aggregate_value = 8;
12424 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012425 if (tag == 66) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012426 parse_aggregate_value:
12427 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
12428 input, this->mutable_aggregate_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000012429 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012430 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012431 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012432 "google.protobuf.UninterpretedOption.aggregate_value");
liujisi@google.com33165fe2010-11-02 13:14:58 +000012433 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012434 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012435 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012436 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012437 break;
12438 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012439
kenton@google.com24bf56f2008-09-24 20:31:01 +000012440 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012441 handle_unusual:
12442 if (tag == 0 ||
12443 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000012444 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012445 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012446 }
12447 DO_(::google::protobuf::internal::WireFormat::SkipField(
12448 input, tag, mutable_unknown_fields()));
12449 break;
12450 }
12451 }
12452 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012453success:
12454 // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012455 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012456failure:
12457 // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption)
12458 return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012459#undef DO_
12460}
12461
kenton@google.comd37d46d2009-04-25 02:53:47 +000012462void UninterpretedOption::SerializeWithCachedSizes(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012463 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012464 // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012465 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Feng Xiaof157a562014-11-14 11:50:31 -080012466 for (unsigned int i = 0, n = this->name_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012467 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000012468 2, this->name(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012469 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012470
kenton@google.com24bf56f2008-09-24 20:31:01 +000012471 // optional string identifier_value = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012472 if (has_identifier_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012473 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012474 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012475 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012476 "google.protobuf.UninterpretedOption.identifier_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +000012477 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000012478 3, this->identifier_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012479 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012480
kenton@google.com24bf56f2008-09-24 20:31:01 +000012481 // optional uint64 positive_int_value = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012482 if (has_positive_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012483 ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012484 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012485
kenton@google.com24bf56f2008-09-24 20:31:01 +000012486 // optional int64 negative_int_value = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012487 if (has_negative_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012488 ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012489 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012490
kenton@google.com24bf56f2008-09-24 20:31:01 +000012491 // optional double double_value = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012492 if (has_double_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012493 ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->double_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012494 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012495
kenton@google.com24bf56f2008-09-24 20:31:01 +000012496 // optional bytes string_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012497 if (has_string_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012498 ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000012499 7, this->string_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012500 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012501
liujisi@google.com33165fe2010-11-02 13:14:58 +000012502 // optional string aggregate_value = 8;
12503 if (has_aggregate_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012504 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012505 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012506 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012507 "google.protobuf.UninterpretedOption.aggregate_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +000012508 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012509 8, this->aggregate_value(), output);
12510 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012511
Feng Xiao6ef984a2014-11-10 17:34:54 -080012512 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012513 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
12514 unknown_fields(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012515 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012516 // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012517}
12518
12519::google::protobuf::uint8* UninterpretedOption::SerializeWithCachedSizesToArray(
12520 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012521 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012522 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Feng Xiaof157a562014-11-14 11:50:31 -080012523 for (unsigned int i = 0, n = this->name_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012524 target = ::google::protobuf::internal::WireFormatLite::
12525 WriteMessageNoVirtualToArray(
12526 2, this->name(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012527 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012528
kenton@google.comd37d46d2009-04-25 02:53:47 +000012529 // optional string identifier_value = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012530 if (has_identifier_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012531 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012532 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012533 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012534 "google.protobuf.UninterpretedOption.identifier_value");
kenton@google.com80b1d622009-07-29 01:13:20 +000012535 target =
12536 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12537 3, this->identifier_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012538 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012539
kenton@google.comd37d46d2009-04-25 02:53:47 +000012540 // optional uint64 positive_int_value = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012541 if (has_positive_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012542 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012543 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012544
kenton@google.comd37d46d2009-04-25 02:53:47 +000012545 // optional int64 negative_int_value = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012546 if (has_negative_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012547 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012548 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012549
kenton@google.comd37d46d2009-04-25 02:53:47 +000012550 // optional double double_value = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012551 if (has_double_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012552 target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012553 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012554
kenton@google.comd37d46d2009-04-25 02:53:47 +000012555 // optional bytes string_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012556 if (has_string_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012557 target =
12558 ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
12559 7, this->string_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012560 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012561
liujisi@google.com33165fe2010-11-02 13:14:58 +000012562 // optional string aggregate_value = 8;
12563 if (has_aggregate_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012564 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012565 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012566 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012567 "google.protobuf.UninterpretedOption.aggregate_value");
liujisi@google.com33165fe2010-11-02 13:14:58 +000012568 target =
12569 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12570 8, this->aggregate_value(), target);
12571 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012572
Feng Xiao6ef984a2014-11-10 17:34:54 -080012573 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012574 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
12575 unknown_fields(), target);
12576 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012577 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012578 return target;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012579}
12580
12581int UninterpretedOption::ByteSize() const {
12582 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012583
Austin Schuh307af622015-06-05 22:46:01 -070012584 if (_has_bits_[1 / 32] & 126u) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012585 // optional string identifier_value = 3;
12586 if (has_identifier_value()) {
12587 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012588 ::google::protobuf::internal::WireFormatLite::StringSize(
12589 this->identifier_value());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012590 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012591
kenton@google.com24bf56f2008-09-24 20:31:01 +000012592 // optional uint64 positive_int_value = 4;
12593 if (has_positive_int_value()) {
12594 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012595 ::google::protobuf::internal::WireFormatLite::UInt64Size(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012596 this->positive_int_value());
12597 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012598
kenton@google.com24bf56f2008-09-24 20:31:01 +000012599 // optional int64 negative_int_value = 5;
12600 if (has_negative_int_value()) {
12601 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012602 ::google::protobuf::internal::WireFormatLite::Int64Size(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012603 this->negative_int_value());
12604 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012605
kenton@google.com24bf56f2008-09-24 20:31:01 +000012606 // optional double double_value = 6;
12607 if (has_double_value()) {
12608 total_size += 1 + 8;
12609 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012610
kenton@google.com24bf56f2008-09-24 20:31:01 +000012611 // optional bytes string_value = 7;
12612 if (has_string_value()) {
12613 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012614 ::google::protobuf::internal::WireFormatLite::BytesSize(
12615 this->string_value());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012616 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012617
liujisi@google.com33165fe2010-11-02 13:14:58 +000012618 // optional string aggregate_value = 8;
12619 if (has_aggregate_value()) {
12620 total_size += 1 +
12621 ::google::protobuf::internal::WireFormatLite::StringSize(
12622 this->aggregate_value());
12623 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012624
kenton@google.com24bf56f2008-09-24 20:31:01 +000012625 }
12626 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +000012627 total_size += 1 * this->name_size();
12628 for (int i = 0; i < this->name_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012629 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000012630 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012631 this->name(i));
12632 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012633
Feng Xiao6ef984a2014-11-10 17:34:54 -080012634 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012635 total_size +=
12636 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
12637 unknown_fields());
12638 }
kenton@google.comfccb1462009-12-18 02:11:36 +000012639 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012640 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000012641 GOOGLE_SAFE_CONCURRENT_WRITES_END();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012642 return total_size;
12643}
12644
12645void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012646 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070012647 const UninterpretedOption* source =
12648 ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption>(
12649 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012650 if (source == NULL) {
12651 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
12652 } else {
12653 MergeFrom(*source);
12654 }
12655}
12656
12657void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012658 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012659 name_.MergeFrom(from.name_);
12660 if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012661 if (from.has_identifier_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012662 set_has_identifier_value();
12663 identifier_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.identifier_value_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012664 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012665 if (from.has_positive_int_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012666 set_positive_int_value(from.positive_int_value());
12667 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012668 if (from.has_negative_int_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012669 set_negative_int_value(from.negative_int_value());
12670 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012671 if (from.has_double_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012672 set_double_value(from.double_value());
12673 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012674 if (from.has_string_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012675 set_has_string_value();
12676 string_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_value_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012677 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012678 if (from.has_aggregate_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012679 set_has_aggregate_value();
12680 aggregate_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.aggregate_value_);
liujisi@google.com33165fe2010-11-02 13:14:58 +000012681 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012682 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012683 if (from._internal_metadata_.have_unknown_fields()) {
12684 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
12685 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012686}
12687
12688void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) {
12689 if (&from == this) return;
12690 Clear();
12691 MergeFrom(from);
12692}
12693
12694void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
12695 if (&from == this) return;
12696 Clear();
12697 MergeFrom(from);
12698}
12699
kenton@google.comceb561d2009-06-25 19:05:36 +000012700bool UninterpretedOption::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012701
jieluo@google.com4de8f552014-07-18 00:47:59 +000012702 if (!::google::protobuf::internal::AllAreInitialized(this->name())) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +000012703 return true;
12704}
12705
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012706void UninterpretedOption::Swap(UninterpretedOption* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080012707 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012708 InternalSwap(other);
12709}
12710void UninterpretedOption::InternalSwap(UninterpretedOption* other) {
12711 name_.UnsafeArenaSwap(&other->name_);
12712 identifier_value_.Swap(&other->identifier_value_);
12713 std::swap(positive_int_value_, other->positive_int_value_);
12714 std::swap(negative_int_value_, other->negative_int_value_);
12715 std::swap(double_value_, other->double_value_);
12716 string_value_.Swap(&other->string_value_);
12717 aggregate_value_.Swap(&other->aggregate_value_);
12718 std::swap(_has_bits_[0], other->_has_bits_[0]);
12719 _internal_metadata_.Swap(&other->_internal_metadata_);
12720 std::swap(_cached_size_, other->_cached_size_);
12721}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012722
kenton@google.com80b1d622009-07-29 01:13:20 +000012723::google::protobuf::Metadata UninterpretedOption::GetMetadata() const {
12724 protobuf_AssignDescriptorsOnce();
12725 ::google::protobuf::Metadata metadata;
12726 metadata.descriptor = UninterpretedOption_descriptor_;
12727 metadata.reflection = UninterpretedOption_reflection_;
12728 return metadata;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012729}
12730
Jisi Liu885b6122015-02-28 14:51:22 -080012731#if PROTOBUF_INLINE_NOT_IN_HEADERS
12732// UninterpretedOption_NamePart
12733
12734// required string name_part = 1;
Bo Yang5db21732015-05-21 14:28:59 -070012735bool UninterpretedOption_NamePart::has_name_part() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012736 return (_has_bits_[0] & 0x00000001u) != 0;
12737}
Bo Yang5db21732015-05-21 14:28:59 -070012738void UninterpretedOption_NamePart::set_has_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012739 _has_bits_[0] |= 0x00000001u;
12740}
Bo Yang5db21732015-05-21 14:28:59 -070012741void UninterpretedOption_NamePart::clear_has_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012742 _has_bits_[0] &= ~0x00000001u;
12743}
Bo Yang5db21732015-05-21 14:28:59 -070012744void UninterpretedOption_NamePart::clear_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012745 name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12746 clear_has_name_part();
12747}
12748 const ::std::string& UninterpretedOption_NamePart::name_part() const {
12749 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part)
12750 return name_part_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12751}
12752 void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) {
12753 set_has_name_part();
12754 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12755 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part)
12756}
12757 void UninterpretedOption_NamePart::set_name_part(const char* value) {
12758 set_has_name_part();
12759 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12760 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.NamePart.name_part)
12761}
12762 void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) {
12763 set_has_name_part();
12764 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
12765 ::std::string(reinterpret_cast<const char*>(value), size));
12766 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part)
12767}
12768 ::std::string* UninterpretedOption_NamePart::mutable_name_part() {
12769 set_has_name_part();
12770 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part)
12771 return name_part_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12772}
12773 ::std::string* UninterpretedOption_NamePart::release_name_part() {
12774 clear_has_name_part();
12775 return name_part_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12776}
12777 void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) {
12778 if (name_part != NULL) {
12779 set_has_name_part();
12780 } else {
12781 clear_has_name_part();
12782 }
12783 name_part_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_part);
12784 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part)
12785}
12786
12787// required bool is_extension = 2;
Bo Yang5db21732015-05-21 14:28:59 -070012788bool UninterpretedOption_NamePart::has_is_extension() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012789 return (_has_bits_[0] & 0x00000002u) != 0;
12790}
Bo Yang5db21732015-05-21 14:28:59 -070012791void UninterpretedOption_NamePart::set_has_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012792 _has_bits_[0] |= 0x00000002u;
12793}
Bo Yang5db21732015-05-21 14:28:59 -070012794void UninterpretedOption_NamePart::clear_has_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012795 _has_bits_[0] &= ~0x00000002u;
12796}
Bo Yang5db21732015-05-21 14:28:59 -070012797void UninterpretedOption_NamePart::clear_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012798 is_extension_ = false;
12799 clear_has_is_extension();
12800}
12801 bool UninterpretedOption_NamePart::is_extension() const {
12802 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.is_extension)
12803 return is_extension_;
12804}
12805 void UninterpretedOption_NamePart::set_is_extension(bool value) {
12806 set_has_is_extension();
12807 is_extension_ = value;
12808 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.is_extension)
12809}
12810
12811// -------------------------------------------------------------------
12812
12813// UninterpretedOption
12814
12815// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Bo Yang5db21732015-05-21 14:28:59 -070012816int UninterpretedOption::name_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012817 return name_.size();
12818}
Bo Yang5db21732015-05-21 14:28:59 -070012819void UninterpretedOption::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -080012820 name_.Clear();
12821}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012822const ::google::protobuf::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080012823 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.name)
12824 return name_.Get(index);
12825}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012826::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080012827 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.name)
12828 return name_.Mutable(index);
12829}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012830::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::add_name() {
Jisi Liu885b6122015-02-28 14:51:22 -080012831 // @@protoc_insertion_point(field_add:google.protobuf.UninterpretedOption.name)
12832 return name_.Add();
12833}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012834::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >*
Jisi Liu885b6122015-02-28 14:51:22 -080012835UninterpretedOption::mutable_name() {
12836 // @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name)
12837 return &name_;
12838}
Feng Xiaoeee38b02015-08-22 18:25:48 -070012839const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >&
12840UninterpretedOption::name() const {
12841 // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name)
12842 return name_;
12843}
Jisi Liu885b6122015-02-28 14:51:22 -080012844
12845// optional string identifier_value = 3;
Bo Yang5db21732015-05-21 14:28:59 -070012846bool UninterpretedOption::has_identifier_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012847 return (_has_bits_[0] & 0x00000002u) != 0;
12848}
Bo Yang5db21732015-05-21 14:28:59 -070012849void UninterpretedOption::set_has_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012850 _has_bits_[0] |= 0x00000002u;
12851}
Bo Yang5db21732015-05-21 14:28:59 -070012852void UninterpretedOption::clear_has_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012853 _has_bits_[0] &= ~0x00000002u;
12854}
Bo Yang5db21732015-05-21 14:28:59 -070012855void UninterpretedOption::clear_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012856 identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12857 clear_has_identifier_value();
12858}
12859 const ::std::string& UninterpretedOption::identifier_value() const {
12860 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value)
12861 return identifier_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12862}
12863 void UninterpretedOption::set_identifier_value(const ::std::string& value) {
12864 set_has_identifier_value();
12865 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12866 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value)
12867}
12868 void UninterpretedOption::set_identifier_value(const char* value) {
12869 set_has_identifier_value();
12870 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12871 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value)
12872}
12873 void UninterpretedOption::set_identifier_value(const char* value, size_t size) {
12874 set_has_identifier_value();
12875 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
12876 ::std::string(reinterpret_cast<const char*>(value), size));
12877 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value)
12878}
12879 ::std::string* UninterpretedOption::mutable_identifier_value() {
12880 set_has_identifier_value();
12881 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value)
12882 return identifier_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12883}
12884 ::std::string* UninterpretedOption::release_identifier_value() {
12885 clear_has_identifier_value();
12886 return identifier_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12887}
12888 void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) {
12889 if (identifier_value != NULL) {
12890 set_has_identifier_value();
12891 } else {
12892 clear_has_identifier_value();
12893 }
12894 identifier_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), identifier_value);
12895 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value)
12896}
12897
12898// optional uint64 positive_int_value = 4;
Bo Yang5db21732015-05-21 14:28:59 -070012899bool UninterpretedOption::has_positive_int_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012900 return (_has_bits_[0] & 0x00000004u) != 0;
12901}
Bo Yang5db21732015-05-21 14:28:59 -070012902void UninterpretedOption::set_has_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012903 _has_bits_[0] |= 0x00000004u;
12904}
Bo Yang5db21732015-05-21 14:28:59 -070012905void UninterpretedOption::clear_has_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012906 _has_bits_[0] &= ~0x00000004u;
12907}
Bo Yang5db21732015-05-21 14:28:59 -070012908void UninterpretedOption::clear_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012909 positive_int_value_ = GOOGLE_ULONGLONG(0);
12910 clear_has_positive_int_value();
12911}
12912 ::google::protobuf::uint64 UninterpretedOption::positive_int_value() const {
12913 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value)
12914 return positive_int_value_;
12915}
12916 void UninterpretedOption::set_positive_int_value(::google::protobuf::uint64 value) {
12917 set_has_positive_int_value();
12918 positive_int_value_ = value;
12919 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value)
12920}
12921
12922// optional int64 negative_int_value = 5;
Bo Yang5db21732015-05-21 14:28:59 -070012923bool UninterpretedOption::has_negative_int_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012924 return (_has_bits_[0] & 0x00000008u) != 0;
12925}
Bo Yang5db21732015-05-21 14:28:59 -070012926void UninterpretedOption::set_has_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012927 _has_bits_[0] |= 0x00000008u;
12928}
Bo Yang5db21732015-05-21 14:28:59 -070012929void UninterpretedOption::clear_has_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012930 _has_bits_[0] &= ~0x00000008u;
12931}
Bo Yang5db21732015-05-21 14:28:59 -070012932void UninterpretedOption::clear_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012933 negative_int_value_ = GOOGLE_LONGLONG(0);
12934 clear_has_negative_int_value();
12935}
12936 ::google::protobuf::int64 UninterpretedOption::negative_int_value() const {
12937 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value)
12938 return negative_int_value_;
12939}
12940 void UninterpretedOption::set_negative_int_value(::google::protobuf::int64 value) {
12941 set_has_negative_int_value();
12942 negative_int_value_ = value;
12943 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value)
12944}
12945
12946// optional double double_value = 6;
Bo Yang5db21732015-05-21 14:28:59 -070012947bool UninterpretedOption::has_double_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012948 return (_has_bits_[0] & 0x00000010u) != 0;
12949}
Bo Yang5db21732015-05-21 14:28:59 -070012950void UninterpretedOption::set_has_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012951 _has_bits_[0] |= 0x00000010u;
12952}
Bo Yang5db21732015-05-21 14:28:59 -070012953void UninterpretedOption::clear_has_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012954 _has_bits_[0] &= ~0x00000010u;
12955}
Bo Yang5db21732015-05-21 14:28:59 -070012956void UninterpretedOption::clear_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012957 double_value_ = 0;
12958 clear_has_double_value();
12959}
12960 double UninterpretedOption::double_value() const {
12961 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.double_value)
12962 return double_value_;
12963}
12964 void UninterpretedOption::set_double_value(double value) {
12965 set_has_double_value();
12966 double_value_ = value;
12967 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.double_value)
12968}
12969
12970// optional bytes string_value = 7;
Bo Yang5db21732015-05-21 14:28:59 -070012971bool UninterpretedOption::has_string_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012972 return (_has_bits_[0] & 0x00000020u) != 0;
12973}
Bo Yang5db21732015-05-21 14:28:59 -070012974void UninterpretedOption::set_has_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012975 _has_bits_[0] |= 0x00000020u;
12976}
Bo Yang5db21732015-05-21 14:28:59 -070012977void UninterpretedOption::clear_has_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012978 _has_bits_[0] &= ~0x00000020u;
12979}
Bo Yang5db21732015-05-21 14:28:59 -070012980void UninterpretedOption::clear_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012981 string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12982 clear_has_string_value();
12983}
12984 const ::std::string& UninterpretedOption::string_value() const {
12985 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value)
12986 return string_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12987}
12988 void UninterpretedOption::set_string_value(const ::std::string& value) {
12989 set_has_string_value();
12990 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12991 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value)
12992}
12993 void UninterpretedOption::set_string_value(const char* value) {
12994 set_has_string_value();
12995 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12996 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value)
12997}
12998 void UninterpretedOption::set_string_value(const void* value, size_t size) {
12999 set_has_string_value();
13000 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13001 ::std::string(reinterpret_cast<const char*>(value), size));
13002 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value)
13003}
13004 ::std::string* UninterpretedOption::mutable_string_value() {
13005 set_has_string_value();
13006 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value)
13007 return string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13008}
13009 ::std::string* UninterpretedOption::release_string_value() {
13010 clear_has_string_value();
13011 return string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13012}
13013 void UninterpretedOption::set_allocated_string_value(::std::string* string_value) {
13014 if (string_value != NULL) {
13015 set_has_string_value();
13016 } else {
13017 clear_has_string_value();
13018 }
13019 string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value);
13020 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value)
13021}
13022
13023// optional string aggregate_value = 8;
Bo Yang5db21732015-05-21 14:28:59 -070013024bool UninterpretedOption::has_aggregate_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013025 return (_has_bits_[0] & 0x00000040u) != 0;
13026}
Bo Yang5db21732015-05-21 14:28:59 -070013027void UninterpretedOption::set_has_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013028 _has_bits_[0] |= 0x00000040u;
13029}
Bo Yang5db21732015-05-21 14:28:59 -070013030void UninterpretedOption::clear_has_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013031 _has_bits_[0] &= ~0x00000040u;
13032}
Bo Yang5db21732015-05-21 14:28:59 -070013033void UninterpretedOption::clear_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080013034 aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13035 clear_has_aggregate_value();
13036}
13037 const ::std::string& UninterpretedOption::aggregate_value() const {
13038 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value)
13039 return aggregate_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13040}
13041 void UninterpretedOption::set_aggregate_value(const ::std::string& value) {
13042 set_has_aggregate_value();
13043 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13044 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value)
13045}
13046 void UninterpretedOption::set_aggregate_value(const char* value) {
13047 set_has_aggregate_value();
13048 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13049 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value)
13050}
13051 void UninterpretedOption::set_aggregate_value(const char* value, size_t size) {
13052 set_has_aggregate_value();
13053 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13054 ::std::string(reinterpret_cast<const char*>(value), size));
13055 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value)
13056}
13057 ::std::string* UninterpretedOption::mutable_aggregate_value() {
13058 set_has_aggregate_value();
13059 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value)
13060 return aggregate_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13061}
13062 ::std::string* UninterpretedOption::release_aggregate_value() {
13063 clear_has_aggregate_value();
13064 return aggregate_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13065}
13066 void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) {
13067 if (aggregate_value != NULL) {
13068 set_has_aggregate_value();
13069 } else {
13070 clear_has_aggregate_value();
13071 }
13072 aggregate_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), aggregate_value);
13073 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value)
13074}
13075
13076#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
kenton@google.com24bf56f2008-09-24 20:31:01 +000013077
liujisi@google.com33165fe2010-11-02 13:14:58 +000013078// ===================================================================
13079
Bruce Dawson86ba70e2015-10-29 12:41:29 -070013080#if !defined(_MSC_VER) || _MSC_VER >= 1900
liujisi@google.com33165fe2010-11-02 13:14:58 +000013081const int SourceCodeInfo_Location::kPathFieldNumber;
13082const int SourceCodeInfo_Location::kSpanFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013083const int SourceCodeInfo_Location::kLeadingCommentsFieldNumber;
13084const int SourceCodeInfo_Location::kTrailingCommentsFieldNumber;
Jisi Liu885b6122015-02-28 14:51:22 -080013085const int SourceCodeInfo_Location::kLeadingDetachedCommentsFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070013086#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
liujisi@google.com33165fe2010-11-02 13:14:58 +000013087
13088SourceCodeInfo_Location::SourceCodeInfo_Location()
Bo Yang5db21732015-05-21 14:28:59 -070013089 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013090 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000013091 // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013092}
13093
13094void SourceCodeInfo_Location::InitAsDefaultInstance() {
13095}
13096
13097SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080013098 : ::google::protobuf::Message(),
13099 _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013100 SharedCtor();
13101 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000013102 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013103}
13104
13105void SourceCodeInfo_Location::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013106 ::google::protobuf::internal::GetEmptyString();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013107 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080013108 leading_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13109 trailing_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000013110 ::memset(_has_bits_, 0, sizeof(_has_bits_));
13111}
13112
13113SourceCodeInfo_Location::~SourceCodeInfo_Location() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013114 // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013115 SharedDtor();
13116}
13117
13118void SourceCodeInfo_Location::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080013119 leading_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13120 trailing_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000013121 if (this != default_instance_) {
13122 }
13123}
13124
13125void SourceCodeInfo_Location::SetCachedSize(int size) const {
13126 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13127 _cached_size_ = size;
13128 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13129}
13130const ::google::protobuf::Descriptor* SourceCodeInfo_Location::descriptor() {
13131 protobuf_AssignDescriptorsOnce();
13132 return SourceCodeInfo_Location_descriptor_;
13133}
13134
13135const SourceCodeInfo_Location& SourceCodeInfo_Location::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000013136 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
13137 return *default_instance_;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013138}
13139
13140SourceCodeInfo_Location* SourceCodeInfo_Location::default_instance_ = NULL;
13141
Feng Xiao6ef984a2014-11-10 17:34:54 -080013142SourceCodeInfo_Location* SourceCodeInfo_Location::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080013143 SourceCodeInfo_Location* n = new SourceCodeInfo_Location;
13144 if (arena != NULL) {
13145 arena->Own(n);
13146 }
13147 return n;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013148}
13149
13150void SourceCodeInfo_Location::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -070013151 if (_has_bits_[0 / 32] & 12u) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013152 if (has_leading_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013153 leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013154 }
13155 if (has_trailing_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013156 trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013157 }
13158 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013159 path_.Clear();
13160 span_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -080013161 leading_detached_comments_.Clear();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013162 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080013163 if (_internal_metadata_.have_unknown_fields()) {
13164 mutable_unknown_fields()->Clear();
13165 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013166}
13167
13168bool SourceCodeInfo_Location::MergePartialFromCodedStream(
13169 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013170#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
liujisi@google.com33165fe2010-11-02 13:14:58 +000013171 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013172 // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo.Location)
13173 for (;;) {
13174 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
13175 tag = p.first;
13176 if (!p.second) goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013177 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
13178 // repeated int32 path = 1 [packed = true];
13179 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013180 if (tag == 10) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013181 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
13182 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13183 input, this->mutable_path())));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013184 } else if (tag == 8) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013185 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
13186 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13187 1, 10, input, this->mutable_path())));
13188 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013189 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013190 }
13191 if (input->ExpectTag(18)) goto parse_span;
13192 break;
13193 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013194
liujisi@google.com33165fe2010-11-02 13:14:58 +000013195 // repeated int32 span = 2 [packed = true];
13196 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013197 if (tag == 18) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013198 parse_span:
13199 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
13200 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13201 input, this->mutable_span())));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013202 } else if (tag == 16) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013203 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
13204 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13205 1, 18, input, this->mutable_span())));
13206 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013207 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013208 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013209 if (input->ExpectTag(26)) goto parse_leading_comments;
13210 break;
13211 }
13212
13213 // optional string leading_comments = 3;
13214 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013215 if (tag == 26) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013216 parse_leading_comments:
13217 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13218 input, this->mutable_leading_comments()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013219 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013220 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013221 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013222 "google.protobuf.SourceCodeInfo.Location.leading_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013223 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013224 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013225 }
13226 if (input->ExpectTag(34)) goto parse_trailing_comments;
13227 break;
13228 }
13229
13230 // optional string trailing_comments = 4;
13231 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013232 if (tag == 34) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013233 parse_trailing_comments:
13234 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13235 input, this->mutable_trailing_comments()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013236 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013237 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013238 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013239 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013240 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013241 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013242 }
Jisi Liu885b6122015-02-28 14:51:22 -080013243 if (input->ExpectTag(50)) goto parse_leading_detached_comments;
13244 break;
13245 }
13246
13247 // repeated string leading_detached_comments = 6;
13248 case 6: {
13249 if (tag == 50) {
13250 parse_leading_detached_comments:
13251 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13252 input, this->add_leading_detached_comments()));
13253 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13254 this->leading_detached_comments(this->leading_detached_comments_size() - 1).data(),
13255 this->leading_detached_comments(this->leading_detached_comments_size() - 1).length(),
13256 ::google::protobuf::internal::WireFormat::PARSE,
13257 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
13258 } else {
13259 goto handle_unusual;
13260 }
13261 if (input->ExpectTag(50)) goto parse_leading_detached_comments;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013262 if (input->ExpectAtEnd()) goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013263 break;
13264 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013265
liujisi@google.com33165fe2010-11-02 13:14:58 +000013266 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013267 handle_unusual:
13268 if (tag == 0 ||
13269 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
liujisi@google.com33165fe2010-11-02 13:14:58 +000013270 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013271 goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013272 }
13273 DO_(::google::protobuf::internal::WireFormat::SkipField(
13274 input, tag, mutable_unknown_fields()));
13275 break;
13276 }
13277 }
13278 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013279success:
13280 // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013281 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013282failure:
13283 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo.Location)
13284 return false;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013285#undef DO_
13286}
13287
13288void SourceCodeInfo_Location::SerializeWithCachedSizes(
13289 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013290 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013291 // repeated int32 path = 1 [packed = true];
13292 if (this->path_size() > 0) {
13293 ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
13294 output->WriteVarint32(_path_cached_byte_size_);
13295 }
13296 for (int i = 0; i < this->path_size(); i++) {
13297 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
13298 this->path(i), output);
13299 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013300
liujisi@google.com33165fe2010-11-02 13:14:58 +000013301 // repeated int32 span = 2 [packed = true];
13302 if (this->span_size() > 0) {
13303 ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
13304 output->WriteVarint32(_span_cached_byte_size_);
13305 }
13306 for (int i = 0; i < this->span_size(); i++) {
13307 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
13308 this->span(i), output);
13309 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013310
13311 // optional string leading_comments = 3;
13312 if (has_leading_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013313 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013314 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013315 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013316 "google.protobuf.SourceCodeInfo.Location.leading_comments");
jieluo@google.com4de8f552014-07-18 00:47:59 +000013317 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013318 3, this->leading_comments(), output);
13319 }
13320
13321 // optional string trailing_comments = 4;
13322 if (has_trailing_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013323 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013324 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013325 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013326 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
jieluo@google.com4de8f552014-07-18 00:47:59 +000013327 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013328 4, this->trailing_comments(), output);
13329 }
13330
Jisi Liu885b6122015-02-28 14:51:22 -080013331 // repeated string leading_detached_comments = 6;
13332 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
Jisi Liu4c663d82015-08-25 17:03:05 -070013333 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13334 this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(),
13335 ::google::protobuf::internal::WireFormat::SERIALIZE,
13336 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
Jisi Liu885b6122015-02-28 14:51:22 -080013337 ::google::protobuf::internal::WireFormatLite::WriteString(
13338 6, this->leading_detached_comments(i), output);
13339 }
13340
Feng Xiao6ef984a2014-11-10 17:34:54 -080013341 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013342 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
13343 unknown_fields(), output);
13344 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013345 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013346}
13347
13348::google::protobuf::uint8* SourceCodeInfo_Location::SerializeWithCachedSizesToArray(
13349 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013350 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013351 // repeated int32 path = 1 [packed = true];
13352 if (this->path_size() > 0) {
13353 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
13354 1,
13355 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
13356 target);
13357 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
13358 _path_cached_byte_size_, target);
13359 }
13360 for (int i = 0; i < this->path_size(); i++) {
13361 target = ::google::protobuf::internal::WireFormatLite::
13362 WriteInt32NoTagToArray(this->path(i), target);
13363 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013364
liujisi@google.com33165fe2010-11-02 13:14:58 +000013365 // repeated int32 span = 2 [packed = true];
13366 if (this->span_size() > 0) {
13367 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
13368 2,
13369 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
13370 target);
13371 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
13372 _span_cached_byte_size_, target);
13373 }
13374 for (int i = 0; i < this->span_size(); i++) {
13375 target = ::google::protobuf::internal::WireFormatLite::
13376 WriteInt32NoTagToArray(this->span(i), target);
13377 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013378
13379 // optional string leading_comments = 3;
13380 if (has_leading_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013381 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013382 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013383 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013384 "google.protobuf.SourceCodeInfo.Location.leading_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013385 target =
13386 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
13387 3, this->leading_comments(), target);
13388 }
13389
13390 // optional string trailing_comments = 4;
13391 if (has_trailing_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013392 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013393 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013394 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013395 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013396 target =
13397 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
13398 4, this->trailing_comments(), target);
13399 }
13400
Jisi Liu885b6122015-02-28 14:51:22 -080013401 // repeated string leading_detached_comments = 6;
13402 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
13403 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13404 this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(),
13405 ::google::protobuf::internal::WireFormat::SERIALIZE,
13406 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
13407 target = ::google::protobuf::internal::WireFormatLite::
13408 WriteStringToArray(6, this->leading_detached_comments(i), target);
13409 }
13410
Feng Xiao6ef984a2014-11-10 17:34:54 -080013411 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013412 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
13413 unknown_fields(), target);
13414 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013415 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013416 return target;
13417}
13418
13419int SourceCodeInfo_Location::ByteSize() const {
13420 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013421
Austin Schuh307af622015-06-05 22:46:01 -070013422 if (_has_bits_[2 / 32] & 12u) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013423 // optional string leading_comments = 3;
13424 if (has_leading_comments()) {
13425 total_size += 1 +
13426 ::google::protobuf::internal::WireFormatLite::StringSize(
13427 this->leading_comments());
13428 }
13429
13430 // optional string trailing_comments = 4;
13431 if (has_trailing_comments()) {
13432 total_size += 1 +
13433 ::google::protobuf::internal::WireFormatLite::StringSize(
13434 this->trailing_comments());
13435 }
13436
13437 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013438 // repeated int32 path = 1 [packed = true];
13439 {
13440 int data_size = 0;
13441 for (int i = 0; i < this->path_size(); i++) {
13442 data_size += ::google::protobuf::internal::WireFormatLite::
13443 Int32Size(this->path(i));
13444 }
13445 if (data_size > 0) {
13446 total_size += 1 +
13447 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
13448 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013449 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013450 _path_cached_byte_size_ = data_size;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013451 GOOGLE_SAFE_CONCURRENT_WRITES_END();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013452 total_size += data_size;
13453 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013454
liujisi@google.com33165fe2010-11-02 13:14:58 +000013455 // repeated int32 span = 2 [packed = true];
13456 {
13457 int data_size = 0;
13458 for (int i = 0; i < this->span_size(); i++) {
13459 data_size += ::google::protobuf::internal::WireFormatLite::
13460 Int32Size(this->span(i));
13461 }
13462 if (data_size > 0) {
13463 total_size += 1 +
13464 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
13465 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013466 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013467 _span_cached_byte_size_ = data_size;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013468 GOOGLE_SAFE_CONCURRENT_WRITES_END();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013469 total_size += data_size;
13470 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013471
Jisi Liu885b6122015-02-28 14:51:22 -080013472 // repeated string leading_detached_comments = 6;
13473 total_size += 1 * this->leading_detached_comments_size();
13474 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
13475 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
13476 this->leading_detached_comments(i));
13477 }
13478
Feng Xiao6ef984a2014-11-10 17:34:54 -080013479 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013480 total_size +=
13481 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
13482 unknown_fields());
13483 }
13484 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13485 _cached_size_ = total_size;
13486 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13487 return total_size;
13488}
13489
13490void SourceCodeInfo_Location::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013491 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070013492 const SourceCodeInfo_Location* source =
13493 ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo_Location>(
13494 &from);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013495 if (source == NULL) {
13496 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
13497 } else {
13498 MergeFrom(*source);
13499 }
13500}
13501
13502void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013503 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013504 path_.MergeFrom(from.path_);
13505 span_.MergeFrom(from.span_);
Jisi Liu885b6122015-02-28 14:51:22 -080013506 leading_detached_comments_.MergeFrom(from.leading_detached_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013507 if (from._has_bits_[2 / 32] & (0xffu << (2 % 32))) {
13508 if (from.has_leading_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013509 set_has_leading_comments();
13510 leading_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.leading_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013511 }
13512 if (from.has_trailing_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013513 set_has_trailing_comments();
13514 trailing_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.trailing_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013515 }
13516 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080013517 if (from._internal_metadata_.have_unknown_fields()) {
13518 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
13519 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013520}
13521
13522void SourceCodeInfo_Location::CopyFrom(const ::google::protobuf::Message& from) {
13523 if (&from == this) return;
13524 Clear();
13525 MergeFrom(from);
13526}
13527
13528void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) {
13529 if (&from == this) return;
13530 Clear();
13531 MergeFrom(from);
13532}
13533
13534bool SourceCodeInfo_Location::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013535
liujisi@google.com33165fe2010-11-02 13:14:58 +000013536 return true;
13537}
13538
13539void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080013540 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080013541 InternalSwap(other);
13542}
13543void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) {
13544 path_.UnsafeArenaSwap(&other->path_);
13545 span_.UnsafeArenaSwap(&other->span_);
13546 leading_comments_.Swap(&other->leading_comments_);
13547 trailing_comments_.Swap(&other->trailing_comments_);
Jisi Liu885b6122015-02-28 14:51:22 -080013548 leading_detached_comments_.UnsafeArenaSwap(&other->leading_detached_comments_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080013549 std::swap(_has_bits_[0], other->_has_bits_[0]);
13550 _internal_metadata_.Swap(&other->_internal_metadata_);
13551 std::swap(_cached_size_, other->_cached_size_);
13552}
liujisi@google.com33165fe2010-11-02 13:14:58 +000013553
13554::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const {
13555 protobuf_AssignDescriptorsOnce();
13556 ::google::protobuf::Metadata metadata;
13557 metadata.descriptor = SourceCodeInfo_Location_descriptor_;
13558 metadata.reflection = SourceCodeInfo_Location_reflection_;
13559 return metadata;
13560}
13561
13562
13563// -------------------------------------------------------------------
13564
Bruce Dawson86ba70e2015-10-29 12:41:29 -070013565#if !defined(_MSC_VER) || _MSC_VER >= 1900
liujisi@google.com33165fe2010-11-02 13:14:58 +000013566const int SourceCodeInfo::kLocationFieldNumber;
Bruce Dawson86ba70e2015-10-29 12:41:29 -070013567#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
liujisi@google.com33165fe2010-11-02 13:14:58 +000013568
13569SourceCodeInfo::SourceCodeInfo()
Bo Yang5db21732015-05-21 14:28:59 -070013570 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013571 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000013572 // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013573}
13574
13575void SourceCodeInfo::InitAsDefaultInstance() {
13576}
13577
13578SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080013579 : ::google::protobuf::Message(),
13580 _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013581 SharedCtor();
13582 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000013583 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013584}
13585
13586void SourceCodeInfo::SharedCtor() {
13587 _cached_size_ = 0;
13588 ::memset(_has_bits_, 0, sizeof(_has_bits_));
13589}
13590
13591SourceCodeInfo::~SourceCodeInfo() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013592 // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013593 SharedDtor();
13594}
13595
13596void SourceCodeInfo::SharedDtor() {
13597 if (this != default_instance_) {
13598 }
13599}
13600
13601void SourceCodeInfo::SetCachedSize(int size) const {
13602 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13603 _cached_size_ = size;
13604 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13605}
13606const ::google::protobuf::Descriptor* SourceCodeInfo::descriptor() {
13607 protobuf_AssignDescriptorsOnce();
13608 return SourceCodeInfo_descriptor_;
13609}
13610
13611const SourceCodeInfo& SourceCodeInfo::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000013612 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
13613 return *default_instance_;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013614}
13615
13616SourceCodeInfo* SourceCodeInfo::default_instance_ = NULL;
13617
Feng Xiao6ef984a2014-11-10 17:34:54 -080013618SourceCodeInfo* SourceCodeInfo::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080013619 SourceCodeInfo* n = new SourceCodeInfo;
13620 if (arena != NULL) {
13621 arena->Own(n);
13622 }
13623 return n;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013624}
13625
13626void SourceCodeInfo::Clear() {
13627 location_.Clear();
13628 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080013629 if (_internal_metadata_.have_unknown_fields()) {
13630 mutable_unknown_fields()->Clear();
13631 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013632}
13633
13634bool SourceCodeInfo::MergePartialFromCodedStream(
13635 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013636#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
liujisi@google.com33165fe2010-11-02 13:14:58 +000013637 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013638 // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo)
13639 for (;;) {
13640 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
13641 tag = p.first;
13642 if (!p.second) goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013643 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
13644 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
13645 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013646 if (tag == 10) {
Bo Yang5db21732015-05-21 14:28:59 -070013647 DO_(input->IncrementRecursionDepth());
13648 parse_loop_location:
13649 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
liujisi@google.com33165fe2010-11-02 13:14:58 +000013650 input, add_location()));
13651 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013652 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013653 }
Bo Yang5db21732015-05-21 14:28:59 -070013654 if (input->ExpectTag(10)) goto parse_loop_location;
13655 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000013656 if (input->ExpectAtEnd()) goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013657 break;
13658 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013659
liujisi@google.com33165fe2010-11-02 13:14:58 +000013660 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013661 handle_unusual:
13662 if (tag == 0 ||
13663 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
liujisi@google.com33165fe2010-11-02 13:14:58 +000013664 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013665 goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013666 }
13667 DO_(::google::protobuf::internal::WireFormat::SkipField(
13668 input, tag, mutable_unknown_fields()));
13669 break;
13670 }
13671 }
13672 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013673success:
13674 // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013675 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013676failure:
13677 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo)
13678 return false;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013679#undef DO_
13680}
13681
13682void SourceCodeInfo::SerializeWithCachedSizes(
13683 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013684 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013685 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Feng Xiaof157a562014-11-14 11:50:31 -080013686 for (unsigned int i = 0, n = this->location_size(); i < n; i++) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013687 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
13688 1, this->location(i), output);
13689 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013690
Feng Xiao6ef984a2014-11-10 17:34:54 -080013691 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013692 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
13693 unknown_fields(), output);
13694 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013695 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013696}
13697
13698::google::protobuf::uint8* SourceCodeInfo::SerializeWithCachedSizesToArray(
13699 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013700 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013701 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Feng Xiaof157a562014-11-14 11:50:31 -080013702 for (unsigned int i = 0, n = this->location_size(); i < n; i++) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013703 target = ::google::protobuf::internal::WireFormatLite::
13704 WriteMessageNoVirtualToArray(
13705 1, this->location(i), target);
13706 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013707
Feng Xiao6ef984a2014-11-10 17:34:54 -080013708 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013709 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
13710 unknown_fields(), target);
13711 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013712 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013713 return target;
13714}
13715
13716int SourceCodeInfo::ByteSize() const {
13717 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013718
liujisi@google.com33165fe2010-11-02 13:14:58 +000013719 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
13720 total_size += 1 * this->location_size();
13721 for (int i = 0; i < this->location_size(); i++) {
13722 total_size +=
13723 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
13724 this->location(i));
13725 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013726
Feng Xiao6ef984a2014-11-10 17:34:54 -080013727 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013728 total_size +=
13729 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
13730 unknown_fields());
13731 }
13732 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13733 _cached_size_ = total_size;
13734 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13735 return total_size;
13736}
13737
13738void SourceCodeInfo::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013739 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070013740 const SourceCodeInfo* source =
13741 ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo>(
13742 &from);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013743 if (source == NULL) {
13744 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
13745 } else {
13746 MergeFrom(*source);
13747 }
13748}
13749
13750void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013751 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013752 location_.MergeFrom(from.location_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080013753 if (from._internal_metadata_.have_unknown_fields()) {
13754 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
13755 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013756}
13757
13758void SourceCodeInfo::CopyFrom(const ::google::protobuf::Message& from) {
13759 if (&from == this) return;
13760 Clear();
13761 MergeFrom(from);
13762}
13763
13764void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) {
13765 if (&from == this) return;
13766 Clear();
13767 MergeFrom(from);
13768}
13769
13770bool SourceCodeInfo::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013771
liujisi@google.com33165fe2010-11-02 13:14:58 +000013772 return true;
13773}
13774
13775void SourceCodeInfo::Swap(SourceCodeInfo* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080013776 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080013777 InternalSwap(other);
13778}
13779void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) {
13780 location_.UnsafeArenaSwap(&other->location_);
13781 std::swap(_has_bits_[0], other->_has_bits_[0]);
13782 _internal_metadata_.Swap(&other->_internal_metadata_);
13783 std::swap(_cached_size_, other->_cached_size_);
13784}
liujisi@google.com33165fe2010-11-02 13:14:58 +000013785
13786::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const {
13787 protobuf_AssignDescriptorsOnce();
13788 ::google::protobuf::Metadata metadata;
13789 metadata.descriptor = SourceCodeInfo_descriptor_;
13790 metadata.reflection = SourceCodeInfo_reflection_;
13791 return metadata;
13792}
13793
Jisi Liu885b6122015-02-28 14:51:22 -080013794#if PROTOBUF_INLINE_NOT_IN_HEADERS
13795// SourceCodeInfo_Location
13796
13797// repeated int32 path = 1 [packed = true];
Bo Yang5db21732015-05-21 14:28:59 -070013798int SourceCodeInfo_Location::path_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013799 return path_.size();
13800}
Bo Yang5db21732015-05-21 14:28:59 -070013801void SourceCodeInfo_Location::clear_path() {
Jisi Liu885b6122015-02-28 14:51:22 -080013802 path_.Clear();
13803}
13804 ::google::protobuf::int32 SourceCodeInfo_Location::path(int index) const {
13805 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path)
13806 return path_.Get(index);
13807}
13808 void SourceCodeInfo_Location::set_path(int index, ::google::protobuf::int32 value) {
13809 path_.Set(index, value);
13810 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path)
13811}
13812 void SourceCodeInfo_Location::add_path(::google::protobuf::int32 value) {
13813 path_.Add(value);
13814 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path)
13815}
13816 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
13817SourceCodeInfo_Location::path() const {
13818 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path)
13819 return path_;
13820}
13821 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
13822SourceCodeInfo_Location::mutable_path() {
13823 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path)
13824 return &path_;
13825}
13826
13827// repeated int32 span = 2 [packed = true];
Bo Yang5db21732015-05-21 14:28:59 -070013828int SourceCodeInfo_Location::span_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013829 return span_.size();
13830}
Bo Yang5db21732015-05-21 14:28:59 -070013831void SourceCodeInfo_Location::clear_span() {
Jisi Liu885b6122015-02-28 14:51:22 -080013832 span_.Clear();
13833}
13834 ::google::protobuf::int32 SourceCodeInfo_Location::span(int index) const {
13835 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span)
13836 return span_.Get(index);
13837}
13838 void SourceCodeInfo_Location::set_span(int index, ::google::protobuf::int32 value) {
13839 span_.Set(index, value);
13840 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span)
13841}
13842 void SourceCodeInfo_Location::add_span(::google::protobuf::int32 value) {
13843 span_.Add(value);
13844 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span)
13845}
13846 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
13847SourceCodeInfo_Location::span() const {
13848 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span)
13849 return span_;
13850}
13851 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
13852SourceCodeInfo_Location::mutable_span() {
13853 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span)
13854 return &span_;
13855}
13856
13857// optional string leading_comments = 3;
Bo Yang5db21732015-05-21 14:28:59 -070013858bool SourceCodeInfo_Location::has_leading_comments() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013859 return (_has_bits_[0] & 0x00000004u) != 0;
13860}
Bo Yang5db21732015-05-21 14:28:59 -070013861void SourceCodeInfo_Location::set_has_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013862 _has_bits_[0] |= 0x00000004u;
13863}
Bo Yang5db21732015-05-21 14:28:59 -070013864void SourceCodeInfo_Location::clear_has_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013865 _has_bits_[0] &= ~0x00000004u;
13866}
Bo Yang5db21732015-05-21 14:28:59 -070013867void SourceCodeInfo_Location::clear_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013868 leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13869 clear_has_leading_comments();
13870}
13871 const ::std::string& SourceCodeInfo_Location::leading_comments() const {
13872 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments)
13873 return leading_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13874}
13875 void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) {
13876 set_has_leading_comments();
13877 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13878 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments)
13879}
13880 void SourceCodeInfo_Location::set_leading_comments(const char* value) {
13881 set_has_leading_comments();
13882 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13883 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_comments)
13884}
13885 void SourceCodeInfo_Location::set_leading_comments(const char* value, size_t size) {
13886 set_has_leading_comments();
13887 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13888 ::std::string(reinterpret_cast<const char*>(value), size));
13889 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments)
13890}
13891 ::std::string* SourceCodeInfo_Location::mutable_leading_comments() {
13892 set_has_leading_comments();
13893 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments)
13894 return leading_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13895}
13896 ::std::string* SourceCodeInfo_Location::release_leading_comments() {
13897 clear_has_leading_comments();
13898 return leading_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13899}
13900 void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) {
13901 if (leading_comments != NULL) {
13902 set_has_leading_comments();
13903 } else {
13904 clear_has_leading_comments();
13905 }
13906 leading_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), leading_comments);
13907 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments)
13908}
13909
13910// optional string trailing_comments = 4;
Bo Yang5db21732015-05-21 14:28:59 -070013911bool SourceCodeInfo_Location::has_trailing_comments() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013912 return (_has_bits_[0] & 0x00000008u) != 0;
13913}
Bo Yang5db21732015-05-21 14:28:59 -070013914void SourceCodeInfo_Location::set_has_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013915 _has_bits_[0] |= 0x00000008u;
13916}
Bo Yang5db21732015-05-21 14:28:59 -070013917void SourceCodeInfo_Location::clear_has_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013918 _has_bits_[0] &= ~0x00000008u;
13919}
Bo Yang5db21732015-05-21 14:28:59 -070013920void SourceCodeInfo_Location::clear_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013921 trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13922 clear_has_trailing_comments();
13923}
13924 const ::std::string& SourceCodeInfo_Location::trailing_comments() const {
13925 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13926 return trailing_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13927}
13928 void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) {
13929 set_has_trailing_comments();
13930 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13931 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13932}
13933 void SourceCodeInfo_Location::set_trailing_comments(const char* value) {
13934 set_has_trailing_comments();
13935 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13936 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13937}
13938 void SourceCodeInfo_Location::set_trailing_comments(const char* value, size_t size) {
13939 set_has_trailing_comments();
13940 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13941 ::std::string(reinterpret_cast<const char*>(value), size));
13942 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13943}
13944 ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() {
13945 set_has_trailing_comments();
13946 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13947 return trailing_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13948}
13949 ::std::string* SourceCodeInfo_Location::release_trailing_comments() {
13950 clear_has_trailing_comments();
13951 return trailing_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13952}
13953 void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) {
13954 if (trailing_comments != NULL) {
13955 set_has_trailing_comments();
13956 } else {
13957 clear_has_trailing_comments();
13958 }
13959 trailing_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), trailing_comments);
13960 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13961}
13962
13963// repeated string leading_detached_comments = 6;
Bo Yang5db21732015-05-21 14:28:59 -070013964int SourceCodeInfo_Location::leading_detached_comments_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013965 return leading_detached_comments_.size();
13966}
Bo Yang5db21732015-05-21 14:28:59 -070013967void SourceCodeInfo_Location::clear_leading_detached_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013968 leading_detached_comments_.Clear();
13969}
13970 const ::std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const {
13971 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13972 return leading_detached_comments_.Get(index);
13973}
13974 ::std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) {
13975 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13976 return leading_detached_comments_.Mutable(index);
13977}
13978 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const ::std::string& value) {
13979 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13980 leading_detached_comments_.Mutable(index)->assign(value);
13981}
13982 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) {
13983 leading_detached_comments_.Mutable(index)->assign(value);
13984 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13985}
13986 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, size_t size) {
13987 leading_detached_comments_.Mutable(index)->assign(
13988 reinterpret_cast<const char*>(value), size);
13989 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13990}
13991 ::std::string* SourceCodeInfo_Location::add_leading_detached_comments() {
13992 return leading_detached_comments_.Add();
13993}
13994 void SourceCodeInfo_Location::add_leading_detached_comments(const ::std::string& value) {
13995 leading_detached_comments_.Add()->assign(value);
13996 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13997}
13998 void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) {
13999 leading_detached_comments_.Add()->assign(value);
14000 // @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14001}
14002 void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, size_t size) {
14003 leading_detached_comments_.Add()->assign(reinterpret_cast<const char*>(value), size);
14004 // @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14005}
14006 const ::google::protobuf::RepeatedPtrField< ::std::string>&
14007SourceCodeInfo_Location::leading_detached_comments() const {
14008 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14009 return leading_detached_comments_;
14010}
14011 ::google::protobuf::RepeatedPtrField< ::std::string>*
14012SourceCodeInfo_Location::mutable_leading_detached_comments() {
14013 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
14014 return &leading_detached_comments_;
14015}
14016
14017// -------------------------------------------------------------------
14018
14019// SourceCodeInfo
14020
14021// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Bo Yang5db21732015-05-21 14:28:59 -070014022int SourceCodeInfo::location_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080014023 return location_.size();
14024}
Bo Yang5db21732015-05-21 14:28:59 -070014025void SourceCodeInfo::clear_location() {
Jisi Liu885b6122015-02-28 14:51:22 -080014026 location_.Clear();
14027}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014028const ::google::protobuf::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const {
Jisi Liu885b6122015-02-28 14:51:22 -080014029 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.location)
14030 return location_.Get(index);
14031}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014032::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) {
Jisi Liu885b6122015-02-28 14:51:22 -080014033 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.location)
14034 return location_.Mutable(index);
14035}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014036::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::add_location() {
Jisi Liu885b6122015-02-28 14:51:22 -080014037 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.location)
14038 return location_.Add();
14039}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014040::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >*
Jisi Liu885b6122015-02-28 14:51:22 -080014041SourceCodeInfo::mutable_location() {
14042 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location)
14043 return &location_;
14044}
Feng Xiaoeee38b02015-08-22 18:25:48 -070014045const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >&
14046SourceCodeInfo::location() const {
14047 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location)
14048 return location_;
14049}
Jisi Liu885b6122015-02-28 14:51:22 -080014050
14051#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
liujisi@google.com33165fe2010-11-02 13:14:58 +000014052
Jisi Liu5221dcb2016-01-29 13:51:05 -080014053// ===================================================================
14054
14055#if !defined(_MSC_VER) || _MSC_VER >= 1900
14056const int GeneratedCodeInfo_Annotation::kPathFieldNumber;
14057const int GeneratedCodeInfo_Annotation::kSourceFileFieldNumber;
14058const int GeneratedCodeInfo_Annotation::kBeginFieldNumber;
14059const int GeneratedCodeInfo_Annotation::kEndFieldNumber;
14060#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
14061
14062GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation()
14063 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
14064 SharedCtor();
14065 // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo.Annotation)
14066}
14067
14068void GeneratedCodeInfo_Annotation::InitAsDefaultInstance() {
14069}
14070
14071GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from)
14072 : ::google::protobuf::Message(),
14073 _internal_metadata_(NULL) {
14074 SharedCtor();
14075 MergeFrom(from);
14076 // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation)
14077}
14078
14079void GeneratedCodeInfo_Annotation::SharedCtor() {
14080 ::google::protobuf::internal::GetEmptyString();
14081 _cached_size_ = 0;
14082 source_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14083 begin_ = 0;
14084 end_ = 0;
14085 ::memset(_has_bits_, 0, sizeof(_has_bits_));
14086}
14087
14088GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() {
14089 // @@protoc_insertion_point(destructor:google.protobuf.GeneratedCodeInfo.Annotation)
14090 SharedDtor();
14091}
14092
14093void GeneratedCodeInfo_Annotation::SharedDtor() {
14094 source_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14095 if (this != default_instance_) {
14096 }
14097}
14098
14099void GeneratedCodeInfo_Annotation::SetCachedSize(int size) const {
14100 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14101 _cached_size_ = size;
14102 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14103}
14104const ::google::protobuf::Descriptor* GeneratedCodeInfo_Annotation::descriptor() {
14105 protobuf_AssignDescriptorsOnce();
14106 return GeneratedCodeInfo_Annotation_descriptor_;
14107}
14108
14109const GeneratedCodeInfo_Annotation& GeneratedCodeInfo_Annotation::default_instance() {
14110 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
14111 return *default_instance_;
14112}
14113
14114GeneratedCodeInfo_Annotation* GeneratedCodeInfo_Annotation::default_instance_ = NULL;
14115
14116GeneratedCodeInfo_Annotation* GeneratedCodeInfo_Annotation::New(::google::protobuf::Arena* arena) const {
14117 GeneratedCodeInfo_Annotation* n = new GeneratedCodeInfo_Annotation;
14118 if (arena != NULL) {
14119 arena->Own(n);
14120 }
14121 return n;
14122}
14123
14124void GeneratedCodeInfo_Annotation::Clear() {
14125#define ZR_HELPER_(f) reinterpret_cast<char*>(\
14126 &reinterpret_cast<GeneratedCodeInfo_Annotation*>(16)->f)
14127
14128#define ZR_(first, last) do {\
14129 ::memset(&first, 0,\
14130 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
14131} while (0)
14132
14133 if (_has_bits_[0 / 32] & 14u) {
14134 ZR_(begin_, end_);
14135 if (has_source_file()) {
14136 source_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14137 }
14138 }
14139
14140#undef ZR_HELPER_
14141#undef ZR_
14142
14143 path_.Clear();
14144 ::memset(_has_bits_, 0, sizeof(_has_bits_));
14145 if (_internal_metadata_.have_unknown_fields()) {
14146 mutable_unknown_fields()->Clear();
14147 }
14148}
14149
14150bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream(
14151 ::google::protobuf::io::CodedInputStream* input) {
14152#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
14153 ::google::protobuf::uint32 tag;
14154 // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo.Annotation)
14155 for (;;) {
14156 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
14157 tag = p.first;
14158 if (!p.second) goto handle_unusual;
14159 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
14160 // repeated int32 path = 1 [packed = true];
14161 case 1: {
14162 if (tag == 10) {
14163 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
14164 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
14165 input, this->mutable_path())));
14166 } else if (tag == 8) {
14167 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
14168 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
14169 1, 10, input, this->mutable_path())));
14170 } else {
14171 goto handle_unusual;
14172 }
14173 if (input->ExpectTag(18)) goto parse_source_file;
14174 break;
14175 }
14176
14177 // optional string source_file = 2;
14178 case 2: {
14179 if (tag == 18) {
14180 parse_source_file:
14181 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
14182 input, this->mutable_source_file()));
14183 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
14184 this->source_file().data(), this->source_file().length(),
14185 ::google::protobuf::internal::WireFormat::PARSE,
14186 "google.protobuf.GeneratedCodeInfo.Annotation.source_file");
14187 } else {
14188 goto handle_unusual;
14189 }
14190 if (input->ExpectTag(24)) goto parse_begin;
14191 break;
14192 }
14193
14194 // optional int32 begin = 3;
14195 case 3: {
14196 if (tag == 24) {
14197 parse_begin:
14198 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
14199 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
14200 input, &begin_)));
14201 set_has_begin();
14202 } else {
14203 goto handle_unusual;
14204 }
14205 if (input->ExpectTag(32)) goto parse_end;
14206 break;
14207 }
14208
14209 // optional int32 end = 4;
14210 case 4: {
14211 if (tag == 32) {
14212 parse_end:
14213 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
14214 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
14215 input, &end_)));
14216 set_has_end();
14217 } else {
14218 goto handle_unusual;
14219 }
14220 if (input->ExpectAtEnd()) goto success;
14221 break;
14222 }
14223
14224 default: {
14225 handle_unusual:
14226 if (tag == 0 ||
14227 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
14228 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
14229 goto success;
14230 }
14231 DO_(::google::protobuf::internal::WireFormat::SkipField(
14232 input, tag, mutable_unknown_fields()));
14233 break;
14234 }
14235 }
14236 }
14237success:
14238 // @@protoc_insertion_point(parse_success:google.protobuf.GeneratedCodeInfo.Annotation)
14239 return true;
14240failure:
14241 // @@protoc_insertion_point(parse_failure:google.protobuf.GeneratedCodeInfo.Annotation)
14242 return false;
14243#undef DO_
14244}
14245
14246void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes(
14247 ::google::protobuf::io::CodedOutputStream* output) const {
14248 // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo.Annotation)
14249 // repeated int32 path = 1 [packed = true];
14250 if (this->path_size() > 0) {
14251 ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
14252 output->WriteVarint32(_path_cached_byte_size_);
14253 }
14254 for (int i = 0; i < this->path_size(); i++) {
14255 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
14256 this->path(i), output);
14257 }
14258
14259 // optional string source_file = 2;
14260 if (has_source_file()) {
14261 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
14262 this->source_file().data(), this->source_file().length(),
14263 ::google::protobuf::internal::WireFormat::SERIALIZE,
14264 "google.protobuf.GeneratedCodeInfo.Annotation.source_file");
14265 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
14266 2, this->source_file(), output);
14267 }
14268
14269 // optional int32 begin = 3;
14270 if (has_begin()) {
14271 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->begin(), output);
14272 }
14273
14274 // optional int32 end = 4;
14275 if (has_end()) {
14276 ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->end(), output);
14277 }
14278
14279 if (_internal_metadata_.have_unknown_fields()) {
14280 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
14281 unknown_fields(), output);
14282 }
14283 // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo.Annotation)
14284}
14285
14286::google::protobuf::uint8* GeneratedCodeInfo_Annotation::SerializeWithCachedSizesToArray(
14287 ::google::protobuf::uint8* target) const {
14288 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation)
14289 // repeated int32 path = 1 [packed = true];
14290 if (this->path_size() > 0) {
14291 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
14292 1,
14293 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
14294 target);
14295 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
14296 _path_cached_byte_size_, target);
14297 }
14298 for (int i = 0; i < this->path_size(); i++) {
14299 target = ::google::protobuf::internal::WireFormatLite::
14300 WriteInt32NoTagToArray(this->path(i), target);
14301 }
14302
14303 // optional string source_file = 2;
14304 if (has_source_file()) {
14305 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
14306 this->source_file().data(), this->source_file().length(),
14307 ::google::protobuf::internal::WireFormat::SERIALIZE,
14308 "google.protobuf.GeneratedCodeInfo.Annotation.source_file");
14309 target =
14310 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
14311 2, this->source_file(), target);
14312 }
14313
14314 // optional int32 begin = 3;
14315 if (has_begin()) {
14316 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->begin(), target);
14317 }
14318
14319 // optional int32 end = 4;
14320 if (has_end()) {
14321 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->end(), target);
14322 }
14323
14324 if (_internal_metadata_.have_unknown_fields()) {
14325 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
14326 unknown_fields(), target);
14327 }
14328 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo.Annotation)
14329 return target;
14330}
14331
14332int GeneratedCodeInfo_Annotation::ByteSize() const {
14333 int total_size = 0;
14334
14335 if (_has_bits_[1 / 32] & 14u) {
14336 // optional string source_file = 2;
14337 if (has_source_file()) {
14338 total_size += 1 +
14339 ::google::protobuf::internal::WireFormatLite::StringSize(
14340 this->source_file());
14341 }
14342
14343 // optional int32 begin = 3;
14344 if (has_begin()) {
14345 total_size += 1 +
14346 ::google::protobuf::internal::WireFormatLite::Int32Size(
14347 this->begin());
14348 }
14349
14350 // optional int32 end = 4;
14351 if (has_end()) {
14352 total_size += 1 +
14353 ::google::protobuf::internal::WireFormatLite::Int32Size(
14354 this->end());
14355 }
14356
14357 }
14358 // repeated int32 path = 1 [packed = true];
14359 {
14360 int data_size = 0;
14361 for (int i = 0; i < this->path_size(); i++) {
14362 data_size += ::google::protobuf::internal::WireFormatLite::
14363 Int32Size(this->path(i));
14364 }
14365 if (data_size > 0) {
14366 total_size += 1 +
14367 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
14368 }
14369 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14370 _path_cached_byte_size_ = data_size;
14371 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14372 total_size += data_size;
14373 }
14374
14375 if (_internal_metadata_.have_unknown_fields()) {
14376 total_size +=
14377 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
14378 unknown_fields());
14379 }
14380 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14381 _cached_size_ = total_size;
14382 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14383 return total_size;
14384}
14385
14386void GeneratedCodeInfo_Annotation::MergeFrom(const ::google::protobuf::Message& from) {
14387 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
14388 const GeneratedCodeInfo_Annotation* source =
14389 ::google::protobuf::internal::DynamicCastToGenerated<const GeneratedCodeInfo_Annotation>(
14390 &from);
14391 if (source == NULL) {
14392 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
14393 } else {
14394 MergeFrom(*source);
14395 }
14396}
14397
14398void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& from) {
14399 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
14400 path_.MergeFrom(from.path_);
14401 if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
14402 if (from.has_source_file()) {
14403 set_has_source_file();
14404 source_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_file_);
14405 }
14406 if (from.has_begin()) {
14407 set_begin(from.begin());
14408 }
14409 if (from.has_end()) {
14410 set_end(from.end());
14411 }
14412 }
14413 if (from._internal_metadata_.have_unknown_fields()) {
14414 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
14415 }
14416}
14417
14418void GeneratedCodeInfo_Annotation::CopyFrom(const ::google::protobuf::Message& from) {
14419 if (&from == this) return;
14420 Clear();
14421 MergeFrom(from);
14422}
14423
14424void GeneratedCodeInfo_Annotation::CopyFrom(const GeneratedCodeInfo_Annotation& from) {
14425 if (&from == this) return;
14426 Clear();
14427 MergeFrom(from);
14428}
14429
14430bool GeneratedCodeInfo_Annotation::IsInitialized() const {
14431
14432 return true;
14433}
14434
14435void GeneratedCodeInfo_Annotation::Swap(GeneratedCodeInfo_Annotation* other) {
14436 if (other == this) return;
14437 InternalSwap(other);
14438}
14439void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* other) {
14440 path_.UnsafeArenaSwap(&other->path_);
14441 source_file_.Swap(&other->source_file_);
14442 std::swap(begin_, other->begin_);
14443 std::swap(end_, other->end_);
14444 std::swap(_has_bits_[0], other->_has_bits_[0]);
14445 _internal_metadata_.Swap(&other->_internal_metadata_);
14446 std::swap(_cached_size_, other->_cached_size_);
14447}
14448
14449::google::protobuf::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const {
14450 protobuf_AssignDescriptorsOnce();
14451 ::google::protobuf::Metadata metadata;
14452 metadata.descriptor = GeneratedCodeInfo_Annotation_descriptor_;
14453 metadata.reflection = GeneratedCodeInfo_Annotation_reflection_;
14454 return metadata;
14455}
14456
14457
14458// -------------------------------------------------------------------
14459
14460#if !defined(_MSC_VER) || _MSC_VER >= 1900
14461const int GeneratedCodeInfo::kAnnotationFieldNumber;
14462#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
14463
14464GeneratedCodeInfo::GeneratedCodeInfo()
14465 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
14466 SharedCtor();
14467 // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo)
14468}
14469
14470void GeneratedCodeInfo::InitAsDefaultInstance() {
14471}
14472
14473GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from)
14474 : ::google::protobuf::Message(),
14475 _internal_metadata_(NULL) {
14476 SharedCtor();
14477 MergeFrom(from);
14478 // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo)
14479}
14480
14481void GeneratedCodeInfo::SharedCtor() {
14482 _cached_size_ = 0;
14483 ::memset(_has_bits_, 0, sizeof(_has_bits_));
14484}
14485
14486GeneratedCodeInfo::~GeneratedCodeInfo() {
14487 // @@protoc_insertion_point(destructor:google.protobuf.GeneratedCodeInfo)
14488 SharedDtor();
14489}
14490
14491void GeneratedCodeInfo::SharedDtor() {
14492 if (this != default_instance_) {
14493 }
14494}
14495
14496void GeneratedCodeInfo::SetCachedSize(int size) const {
14497 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14498 _cached_size_ = size;
14499 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14500}
14501const ::google::protobuf::Descriptor* GeneratedCodeInfo::descriptor() {
14502 protobuf_AssignDescriptorsOnce();
14503 return GeneratedCodeInfo_descriptor_;
14504}
14505
14506const GeneratedCodeInfo& GeneratedCodeInfo::default_instance() {
14507 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
14508 return *default_instance_;
14509}
14510
14511GeneratedCodeInfo* GeneratedCodeInfo::default_instance_ = NULL;
14512
14513GeneratedCodeInfo* GeneratedCodeInfo::New(::google::protobuf::Arena* arena) const {
14514 GeneratedCodeInfo* n = new GeneratedCodeInfo;
14515 if (arena != NULL) {
14516 arena->Own(n);
14517 }
14518 return n;
14519}
14520
14521void GeneratedCodeInfo::Clear() {
14522 annotation_.Clear();
14523 ::memset(_has_bits_, 0, sizeof(_has_bits_));
14524 if (_internal_metadata_.have_unknown_fields()) {
14525 mutable_unknown_fields()->Clear();
14526 }
14527}
14528
14529bool GeneratedCodeInfo::MergePartialFromCodedStream(
14530 ::google::protobuf::io::CodedInputStream* input) {
14531#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
14532 ::google::protobuf::uint32 tag;
14533 // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo)
14534 for (;;) {
14535 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
14536 tag = p.first;
14537 if (!p.second) goto handle_unusual;
14538 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
14539 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14540 case 1: {
14541 if (tag == 10) {
14542 DO_(input->IncrementRecursionDepth());
14543 parse_loop_annotation:
14544 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
14545 input, add_annotation()));
14546 } else {
14547 goto handle_unusual;
14548 }
14549 if (input->ExpectTag(10)) goto parse_loop_annotation;
14550 input->UnsafeDecrementRecursionDepth();
14551 if (input->ExpectAtEnd()) goto success;
14552 break;
14553 }
14554
14555 default: {
14556 handle_unusual:
14557 if (tag == 0 ||
14558 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
14559 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
14560 goto success;
14561 }
14562 DO_(::google::protobuf::internal::WireFormat::SkipField(
14563 input, tag, mutable_unknown_fields()));
14564 break;
14565 }
14566 }
14567 }
14568success:
14569 // @@protoc_insertion_point(parse_success:google.protobuf.GeneratedCodeInfo)
14570 return true;
14571failure:
14572 // @@protoc_insertion_point(parse_failure:google.protobuf.GeneratedCodeInfo)
14573 return false;
14574#undef DO_
14575}
14576
14577void GeneratedCodeInfo::SerializeWithCachedSizes(
14578 ::google::protobuf::io::CodedOutputStream* output) const {
14579 // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo)
14580 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14581 for (unsigned int i = 0, n = this->annotation_size(); i < n; i++) {
14582 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
14583 1, this->annotation(i), output);
14584 }
14585
14586 if (_internal_metadata_.have_unknown_fields()) {
14587 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
14588 unknown_fields(), output);
14589 }
14590 // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo)
14591}
14592
14593::google::protobuf::uint8* GeneratedCodeInfo::SerializeWithCachedSizesToArray(
14594 ::google::protobuf::uint8* target) const {
14595 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo)
14596 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14597 for (unsigned int i = 0, n = this->annotation_size(); i < n; i++) {
14598 target = ::google::protobuf::internal::WireFormatLite::
14599 WriteMessageNoVirtualToArray(
14600 1, this->annotation(i), target);
14601 }
14602
14603 if (_internal_metadata_.have_unknown_fields()) {
14604 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
14605 unknown_fields(), target);
14606 }
14607 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo)
14608 return target;
14609}
14610
14611int GeneratedCodeInfo::ByteSize() const {
14612 int total_size = 0;
14613
14614 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14615 total_size += 1 * this->annotation_size();
14616 for (int i = 0; i < this->annotation_size(); i++) {
14617 total_size +=
14618 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
14619 this->annotation(i));
14620 }
14621
14622 if (_internal_metadata_.have_unknown_fields()) {
14623 total_size +=
14624 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
14625 unknown_fields());
14626 }
14627 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
14628 _cached_size_ = total_size;
14629 GOOGLE_SAFE_CONCURRENT_WRITES_END();
14630 return total_size;
14631}
14632
14633void GeneratedCodeInfo::MergeFrom(const ::google::protobuf::Message& from) {
14634 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
14635 const GeneratedCodeInfo* source =
14636 ::google::protobuf::internal::DynamicCastToGenerated<const GeneratedCodeInfo>(
14637 &from);
14638 if (source == NULL) {
14639 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
14640 } else {
14641 MergeFrom(*source);
14642 }
14643}
14644
14645void GeneratedCodeInfo::MergeFrom(const GeneratedCodeInfo& from) {
14646 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
14647 annotation_.MergeFrom(from.annotation_);
14648 if (from._internal_metadata_.have_unknown_fields()) {
14649 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
14650 }
14651}
14652
14653void GeneratedCodeInfo::CopyFrom(const ::google::protobuf::Message& from) {
14654 if (&from == this) return;
14655 Clear();
14656 MergeFrom(from);
14657}
14658
14659void GeneratedCodeInfo::CopyFrom(const GeneratedCodeInfo& from) {
14660 if (&from == this) return;
14661 Clear();
14662 MergeFrom(from);
14663}
14664
14665bool GeneratedCodeInfo::IsInitialized() const {
14666
14667 return true;
14668}
14669
14670void GeneratedCodeInfo::Swap(GeneratedCodeInfo* other) {
14671 if (other == this) return;
14672 InternalSwap(other);
14673}
14674void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* other) {
14675 annotation_.UnsafeArenaSwap(&other->annotation_);
14676 std::swap(_has_bits_[0], other->_has_bits_[0]);
14677 _internal_metadata_.Swap(&other->_internal_metadata_);
14678 std::swap(_cached_size_, other->_cached_size_);
14679}
14680
14681::google::protobuf::Metadata GeneratedCodeInfo::GetMetadata() const {
14682 protobuf_AssignDescriptorsOnce();
14683 ::google::protobuf::Metadata metadata;
14684 metadata.descriptor = GeneratedCodeInfo_descriptor_;
14685 metadata.reflection = GeneratedCodeInfo_reflection_;
14686 return metadata;
14687}
14688
14689#if PROTOBUF_INLINE_NOT_IN_HEADERS
14690// GeneratedCodeInfo_Annotation
14691
14692// repeated int32 path = 1 [packed = true];
14693int GeneratedCodeInfo_Annotation::path_size() const {
14694 return path_.size();
14695}
14696void GeneratedCodeInfo_Annotation::clear_path() {
14697 path_.Clear();
14698}
14699 ::google::protobuf::int32 GeneratedCodeInfo_Annotation::path(int index) const {
14700 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.path)
14701 return path_.Get(index);
14702}
14703 void GeneratedCodeInfo_Annotation::set_path(int index, ::google::protobuf::int32 value) {
14704 path_.Set(index, value);
14705 // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path)
14706}
14707 void GeneratedCodeInfo_Annotation::add_path(::google::protobuf::int32 value) {
14708 path_.Add(value);
14709 // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.Annotation.path)
14710}
14711 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
14712GeneratedCodeInfo_Annotation::path() const {
14713 // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.Annotation.path)
14714 return path_;
14715}
14716 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
14717GeneratedCodeInfo_Annotation::mutable_path() {
14718 // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.Annotation.path)
14719 return &path_;
14720}
14721
14722// optional string source_file = 2;
14723bool GeneratedCodeInfo_Annotation::has_source_file() const {
14724 return (_has_bits_[0] & 0x00000002u) != 0;
14725}
14726void GeneratedCodeInfo_Annotation::set_has_source_file() {
14727 _has_bits_[0] |= 0x00000002u;
14728}
14729void GeneratedCodeInfo_Annotation::clear_has_source_file() {
14730 _has_bits_[0] &= ~0x00000002u;
14731}
14732void GeneratedCodeInfo_Annotation::clear_source_file() {
14733 source_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14734 clear_has_source_file();
14735}
14736 const ::std::string& GeneratedCodeInfo_Annotation::source_file() const {
14737 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14738 return source_file_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14739}
14740 void GeneratedCodeInfo_Annotation::set_source_file(const ::std::string& value) {
14741 set_has_source_file();
14742 source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
14743 // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14744}
14745 void GeneratedCodeInfo_Annotation::set_source_file(const char* value) {
14746 set_has_source_file();
14747 source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
14748 // @@protoc_insertion_point(field_set_char:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14749}
14750 void GeneratedCodeInfo_Annotation::set_source_file(const char* value, size_t size) {
14751 set_has_source_file();
14752 source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
14753 ::std::string(reinterpret_cast<const char*>(value), size));
14754 // @@protoc_insertion_point(field_set_pointer:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14755}
14756 ::std::string* GeneratedCodeInfo_Annotation::mutable_source_file() {
14757 set_has_source_file();
14758 // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14759 return source_file_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14760}
14761 ::std::string* GeneratedCodeInfo_Annotation::release_source_file() {
14762 clear_has_source_file();
14763 return source_file_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
14764}
14765 void GeneratedCodeInfo_Annotation::set_allocated_source_file(::std::string* source_file) {
14766 if (source_file != NULL) {
14767 set_has_source_file();
14768 } else {
14769 clear_has_source_file();
14770 }
14771 source_file_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source_file);
14772 // @@protoc_insertion_point(field_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file)
14773}
14774
14775// optional int32 begin = 3;
14776bool GeneratedCodeInfo_Annotation::has_begin() const {
14777 return (_has_bits_[0] & 0x00000004u) != 0;
14778}
14779void GeneratedCodeInfo_Annotation::set_has_begin() {
14780 _has_bits_[0] |= 0x00000004u;
14781}
14782void GeneratedCodeInfo_Annotation::clear_has_begin() {
14783 _has_bits_[0] &= ~0x00000004u;
14784}
14785void GeneratedCodeInfo_Annotation::clear_begin() {
14786 begin_ = 0;
14787 clear_has_begin();
14788}
14789 ::google::protobuf::int32 GeneratedCodeInfo_Annotation::begin() const {
14790 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.begin)
14791 return begin_;
14792}
14793 void GeneratedCodeInfo_Annotation::set_begin(::google::protobuf::int32 value) {
14794 set_has_begin();
14795 begin_ = value;
14796 // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.begin)
14797}
14798
14799// optional int32 end = 4;
14800bool GeneratedCodeInfo_Annotation::has_end() const {
14801 return (_has_bits_[0] & 0x00000008u) != 0;
14802}
14803void GeneratedCodeInfo_Annotation::set_has_end() {
14804 _has_bits_[0] |= 0x00000008u;
14805}
14806void GeneratedCodeInfo_Annotation::clear_has_end() {
14807 _has_bits_[0] &= ~0x00000008u;
14808}
14809void GeneratedCodeInfo_Annotation::clear_end() {
14810 end_ = 0;
14811 clear_has_end();
14812}
14813 ::google::protobuf::int32 GeneratedCodeInfo_Annotation::end() const {
14814 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.end)
14815 return end_;
14816}
14817 void GeneratedCodeInfo_Annotation::set_end(::google::protobuf::int32 value) {
14818 set_has_end();
14819 end_ = value;
14820 // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.end)
14821}
14822
14823// -------------------------------------------------------------------
14824
14825// GeneratedCodeInfo
14826
14827// repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
14828int GeneratedCodeInfo::annotation_size() const {
14829 return annotation_.size();
14830}
14831void GeneratedCodeInfo::clear_annotation() {
14832 annotation_.Clear();
14833}
14834const ::google::protobuf::GeneratedCodeInfo_Annotation& GeneratedCodeInfo::annotation(int index) const {
14835 // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.annotation)
14836 return annotation_.Get(index);
14837}
14838::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::mutable_annotation(int index) {
14839 // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.annotation)
14840 return annotation_.Mutable(index);
14841}
14842::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::add_annotation() {
14843 // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.annotation)
14844 return annotation_.Add();
14845}
14846::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >*
14847GeneratedCodeInfo::mutable_annotation() {
14848 // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.annotation)
14849 return &annotation_;
14850}
14851const ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >&
14852GeneratedCodeInfo::annotation() const {
14853 // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.annotation)
14854 return annotation_;
14855}
14856
14857#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
14858
kenton@google.comfccb1462009-12-18 02:11:36 +000014859// @@protoc_insertion_point(namespace_scope)
14860
temporal40ee5512008-07-10 02:12:20 +000014861} // namespace protobuf
14862} // namespace google
kenton@google.comfccb1462009-12-18 02:11:36 +000014863
14864// @@protoc_insertion_point(global_scope)