blob: 5e7eeaa786dc7ff088add3892b4c7cb3244ceada [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
temporal40ee5512008-07-10 02:12:20 +00005#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>
kenton@google.comd37d46d2009-04-25 02:53:47 +000010#include <google/protobuf/stubs/once.h>
temporal40ee5512008-07-10 02:12:20 +000011#include <google/protobuf/io/coded_stream.h>
kenton@google.com80b1d622009-07-29 01:13:20 +000012#include <google/protobuf/wire_format_lite_inl.h>
13#include <google/protobuf/descriptor.h>
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000014#include <google/protobuf/generated_message_reflection.h>
temporal40ee5512008-07-10 02:12:20 +000015#include <google/protobuf/reflection_ops.h>
kenton@google.com80b1d622009-07-29 01:13:20 +000016#include <google/protobuf/wire_format.h>
kenton@google.comfccb1462009-12-18 02:11:36 +000017// @@protoc_insertion_point(includes)
temporal40ee5512008-07-10 02:12:20 +000018
19namespace google {
20namespace protobuf {
21
22namespace {
23
temporal779f61c2008-08-13 03:15:00 +000024const ::google::protobuf::Descriptor* FileDescriptorSet_descriptor_ = NULL;
25const ::google::protobuf::internal::GeneratedMessageReflection*
26 FileDescriptorSet_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000027const ::google::protobuf::Descriptor* FileDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000028const ::google::protobuf::internal::GeneratedMessageReflection*
29 FileDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000030const ::google::protobuf::Descriptor* DescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000031const ::google::protobuf::internal::GeneratedMessageReflection*
32 DescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000033const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000034const ::google::protobuf::internal::GeneratedMessageReflection*
35 DescriptorProto_ExtensionRange_reflection_ = NULL;
Bo Yang5db21732015-05-21 14:28:59 -070036const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange_descriptor_ = NULL;
37const ::google::protobuf::internal::GeneratedMessageReflection*
38 DescriptorProto_ReservedRange_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000039const ::google::protobuf::Descriptor* FieldDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000040const ::google::protobuf::internal::GeneratedMessageReflection*
41 FieldDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000042const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor_ = NULL;
43const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor_ = NULL;
jieluo@google.com4de8f552014-07-18 00:47:59 +000044const ::google::protobuf::Descriptor* OneofDescriptorProto_descriptor_ = NULL;
45const ::google::protobuf::internal::GeneratedMessageReflection*
46 OneofDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000047const ::google::protobuf::Descriptor* EnumDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000048const ::google::protobuf::internal::GeneratedMessageReflection*
49 EnumDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000050const ::google::protobuf::Descriptor* EnumValueDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000051const ::google::protobuf::internal::GeneratedMessageReflection*
52 EnumValueDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000053const ::google::protobuf::Descriptor* ServiceDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000054const ::google::protobuf::internal::GeneratedMessageReflection*
55 ServiceDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000056const ::google::protobuf::Descriptor* MethodDescriptorProto_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000057const ::google::protobuf::internal::GeneratedMessageReflection*
58 MethodDescriptorProto_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000059const ::google::protobuf::Descriptor* FileOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000060const ::google::protobuf::internal::GeneratedMessageReflection*
61 FileOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000062const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor_ = NULL;
63const ::google::protobuf::Descriptor* MessageOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000064const ::google::protobuf::internal::GeneratedMessageReflection*
65 MessageOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000066const ::google::protobuf::Descriptor* FieldOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000067const ::google::protobuf::internal::GeneratedMessageReflection*
68 FieldOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000069const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor_ = NULL;
Bo Yang5db21732015-05-21 14:28:59 -070070const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000071const ::google::protobuf::Descriptor* EnumOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000072const ::google::protobuf::internal::GeneratedMessageReflection*
73 EnumOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000074const ::google::protobuf::Descriptor* EnumValueOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000075const ::google::protobuf::internal::GeneratedMessageReflection*
76 EnumValueOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000077const ::google::protobuf::Descriptor* ServiceOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000078const ::google::protobuf::internal::GeneratedMessageReflection*
79 ServiceOptions_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000080const ::google::protobuf::Descriptor* MethodOptions_descriptor_ = NULL;
temporal779f61c2008-08-13 03:15:00 +000081const ::google::protobuf::internal::GeneratedMessageReflection*
82 MethodOptions_reflection_ = NULL;
kenton@google.com24bf56f2008-09-24 20:31:01 +000083const ::google::protobuf::Descriptor* UninterpretedOption_descriptor_ = NULL;
84const ::google::protobuf::internal::GeneratedMessageReflection*
85 UninterpretedOption_reflection_ = NULL;
86const ::google::protobuf::Descriptor* UninterpretedOption_NamePart_descriptor_ = NULL;
87const ::google::protobuf::internal::GeneratedMessageReflection*
88 UninterpretedOption_NamePart_reflection_ = NULL;
liujisi@google.com33165fe2010-11-02 13:14:58 +000089const ::google::protobuf::Descriptor* SourceCodeInfo_descriptor_ = NULL;
90const ::google::protobuf::internal::GeneratedMessageReflection*
91 SourceCodeInfo_reflection_ = NULL;
92const ::google::protobuf::Descriptor* SourceCodeInfo_Location_descriptor_ = NULL;
93const ::google::protobuf::internal::GeneratedMessageReflection*
94 SourceCodeInfo_Location_reflection_ = NULL;
temporal40ee5512008-07-10 02:12:20 +000095
96} // namespace
97
98
kenton@google.comd37d46d2009-04-25 02:53:47 +000099void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() {
100 protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
101 const ::google::protobuf::FileDescriptor* file =
102 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
103 "google/protobuf/descriptor.proto");
104 GOOGLE_CHECK(file != NULL);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000105 FileDescriptorSet_descriptor_ = file->message_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000106 static const int FileDescriptorSet_offsets_[1] = {
107 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_),
108 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000109 FileDescriptorSet_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800110 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000111 FileDescriptorSet_descriptor_,
112 FileDescriptorSet::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000113 FileDescriptorSet_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000114 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800115 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000116 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800117 sizeof(FileDescriptorSet),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800118 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _internal_metadata_),
119 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000120 FileDescriptorProto_descriptor_ = file->message_type(1);
Feng Xiao6ef984a2014-11-10 17:34:54 -0800121 static const int FileDescriptorProto_offsets_[12] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000122 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_),
123 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_),
124 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000125 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, public_dependency_),
126 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, weak_dependency_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000127 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_),
128 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_),
129 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_),
130 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_),
131 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000132 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, source_code_info_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800133 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, syntax_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000134 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000135 FileDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800136 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000137 FileDescriptorProto_descriptor_,
138 FileDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000139 FileDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000140 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800141 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000142 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800143 sizeof(FileDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800144 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _internal_metadata_),
145 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000146 DescriptorProto_descriptor_ = file->message_type(2);
Bo Yang5db21732015-05-21 14:28:59 -0700147 static const int DescriptorProto_offsets_[10] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000148 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_),
149 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_),
150 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_),
151 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_),
152 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_),
153 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000154 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, oneof_decl_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000155 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_),
Bo Yang5db21732015-05-21 14:28:59 -0700156 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, reserved_range_),
157 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, reserved_name_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000158 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000159 DescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800160 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000161 DescriptorProto_descriptor_,
162 DescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000163 DescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000164 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800165 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000166 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800167 sizeof(DescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800168 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _internal_metadata_),
169 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000170 DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000171 static const int DescriptorProto_ExtensionRange_offsets_[2] = {
172 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_),
173 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_),
174 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000175 DescriptorProto_ExtensionRange_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800176 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000177 DescriptorProto_ExtensionRange_descriptor_,
178 DescriptorProto_ExtensionRange::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000179 DescriptorProto_ExtensionRange_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000180 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800181 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000182 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800183 sizeof(DescriptorProto_ExtensionRange),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800184 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _internal_metadata_),
185 -1);
Bo Yang5db21732015-05-21 14:28:59 -0700186 DescriptorProto_ReservedRange_descriptor_ = DescriptorProto_descriptor_->nested_type(1);
187 static const int DescriptorProto_ReservedRange_offsets_[2] = {
188 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, start_),
189 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, end_),
190 };
191 DescriptorProto_ReservedRange_reflection_ =
192 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
193 DescriptorProto_ReservedRange_descriptor_,
194 DescriptorProto_ReservedRange::default_instance_,
195 DescriptorProto_ReservedRange_offsets_,
196 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, _has_bits_[0]),
197 -1,
198 -1,
199 sizeof(DescriptorProto_ReservedRange),
200 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, _internal_metadata_),
201 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000202 FieldDescriptorProto_descriptor_ = file->message_type(3);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000203 static const int FieldDescriptorProto_offsets_[9] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000204 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_),
205 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_),
206 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_),
207 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_),
208 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_),
209 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_),
210 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000211 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, oneof_index_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000212 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_),
213 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000214 FieldDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800215 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000216 FieldDescriptorProto_descriptor_,
217 FieldDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000218 FieldDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000219 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800220 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000221 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800222 sizeof(FieldDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800223 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _internal_metadata_),
224 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000225 FieldDescriptorProto_Type_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(0);
226 FieldDescriptorProto_Label_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000227 OneofDescriptorProto_descriptor_ = file->message_type(4);
228 static const int OneofDescriptorProto_offsets_[1] = {
229 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, name_),
230 };
231 OneofDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800232 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
jieluo@google.com4de8f552014-07-18 00:47:59 +0000233 OneofDescriptorProto_descriptor_,
234 OneofDescriptorProto::default_instance_,
235 OneofDescriptorProto_offsets_,
236 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800237 -1,
jieluo@google.com4de8f552014-07-18 00:47:59 +0000238 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800239 sizeof(OneofDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800240 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, _internal_metadata_),
241 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000242 EnumDescriptorProto_descriptor_ = file->message_type(5);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000243 static const int EnumDescriptorProto_offsets_[3] = {
244 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_),
245 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_),
246 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_),
247 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000248 EnumDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800249 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000250 EnumDescriptorProto_descriptor_,
251 EnumDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000252 EnumDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000253 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800254 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000255 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800256 sizeof(EnumDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800257 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _internal_metadata_),
258 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000259 EnumValueDescriptorProto_descriptor_ = file->message_type(6);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000260 static const int EnumValueDescriptorProto_offsets_[3] = {
261 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_),
262 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_),
263 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_),
264 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000265 EnumValueDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800266 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000267 EnumValueDescriptorProto_descriptor_,
268 EnumValueDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000269 EnumValueDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000270 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800271 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000272 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800273 sizeof(EnumValueDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800274 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _internal_metadata_),
275 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000276 ServiceDescriptorProto_descriptor_ = file->message_type(7);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000277 static const int ServiceDescriptorProto_offsets_[3] = {
278 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_),
279 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_),
280 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_),
281 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000282 ServiceDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800283 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000284 ServiceDescriptorProto_descriptor_,
285 ServiceDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000286 ServiceDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000287 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800288 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000289 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800290 sizeof(ServiceDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800291 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _internal_metadata_),
292 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000293 MethodDescriptorProto_descriptor_ = file->message_type(8);
Feng Xiao99aa0f92014-11-20 16:18:53 -0800294 static const int MethodDescriptorProto_offsets_[6] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000295 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_),
296 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_),
297 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_),
298 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_),
Feng Xiao99aa0f92014-11-20 16:18:53 -0800299 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, client_streaming_),
300 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, server_streaming_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000301 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000302 MethodDescriptorProto_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800303 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000304 MethodDescriptorProto_descriptor_,
305 MethodDescriptorProto::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000306 MethodDescriptorProto_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000307 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800308 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000309 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800310 sizeof(MethodDescriptorProto),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800311 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _internal_metadata_),
312 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000313 FileOptions_descriptor_ = file->message_type(9);
Xiao Hang801e9202015-07-27 17:46:22 -0700314 static const int FileOptions_offsets_[16] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000315 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_),
316 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_),
317 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000318 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generate_equals_and_hash_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000319 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_string_check_utf8_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000320 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000321 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, go_package_),
kenton@google.comfccb1462009-12-18 02:11:36 +0000322 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_generic_services_),
323 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generic_services_),
324 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, py_generic_services_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000325 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, deprecated_),
Feng Xiaof157a562014-11-14 11:50:31 -0800326 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_enable_arenas_),
Jisi Liu885b6122015-02-28 14:51:22 -0800327 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, objc_class_prefix_),
Jan Tattermusch685ae362015-03-16 19:07:16 -0700328 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, csharp_namespace_),
Xiao Hang801e9202015-07-27 17:46:22 -0700329 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, javanano_use_deprecated_package_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000330 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_),
331 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000332 FileOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800333 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000334 FileOptions_descriptor_,
335 FileOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000336 FileOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000337 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800338 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000339 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800340 sizeof(FileOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800341 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _internal_metadata_),
342 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000343 FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000344 MessageOptions_descriptor_ = file->message_type(10);
Feng Xiao6ef984a2014-11-10 17:34:54 -0800345 static const int MessageOptions_offsets_[5] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000346 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_),
kenton@google.com80b1d622009-07-29 01:13:20 +0000347 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, no_standard_descriptor_accessor_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000348 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, deprecated_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800349 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, map_entry_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000350 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_),
351 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000352 MessageOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800353 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000354 MessageOptions_descriptor_,
355 MessageOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000356 MessageOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000357 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800358 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000359 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800360 sizeof(MessageOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800361 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _internal_metadata_),
362 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000363 FieldOptions_descriptor_ = file->message_type(11);
Bo Yang5db21732015-05-21 14:28:59 -0700364 static const int FieldOptions_offsets_[7] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000365 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_),
kenton@google.com2d6daa72009-01-22 01:27:00 +0000366 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_),
Bo Yang5db21732015-05-21 14:28:59 -0700367 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, jstype_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000368 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, lazy_),
kenton@google.comd37d46d2009-04-25 02:53:47 +0000369 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, deprecated_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000370 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, weak_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000371 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_),
372 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000373 FieldOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800374 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000375 FieldOptions_descriptor_,
376 FieldOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000377 FieldOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000378 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800379 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000380 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800381 sizeof(FieldOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800382 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _internal_metadata_),
383 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000384 FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0);
Bo Yang5db21732015-05-21 14:28:59 -0700385 FieldOptions_JSType_descriptor_ = FieldOptions_descriptor_->enum_type(1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000386 EnumOptions_descriptor_ = file->message_type(12);
387 static const int EnumOptions_offsets_[3] = {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000388 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, allow_alias_),
jieluo@google.com4de8f552014-07-18 00:47:59 +0000389 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000390 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_),
391 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000392 EnumOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800393 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000394 EnumOptions_descriptor_,
395 EnumOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000396 EnumOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000397 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800398 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000399 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800400 sizeof(EnumOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800401 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _internal_metadata_),
402 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000403 EnumValueOptions_descriptor_ = file->message_type(13);
404 static const int EnumValueOptions_offsets_[2] = {
405 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000406 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_),
407 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000408 EnumValueOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800409 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000410 EnumValueOptions_descriptor_,
411 EnumValueOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000412 EnumValueOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000413 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800414 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000415 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800416 sizeof(EnumValueOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800417 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _internal_metadata_),
418 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000419 ServiceOptions_descriptor_ = file->message_type(14);
420 static const int ServiceOptions_offsets_[2] = {
421 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000422 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_),
423 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000424 ServiceOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800425 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000426 ServiceOptions_descriptor_,
427 ServiceOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000428 ServiceOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000429 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800430 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000431 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800432 sizeof(ServiceOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800433 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _internal_metadata_),
434 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000435 MethodOptions_descriptor_ = file->message_type(15);
436 static const int MethodOptions_offsets_[2] = {
437 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, deprecated_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000438 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_),
439 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000440 MethodOptions_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800441 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000442 MethodOptions_descriptor_,
443 MethodOptions::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000444 MethodOptions_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000445 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800446 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000447 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800448 sizeof(MethodOptions),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800449 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _internal_metadata_),
450 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000451 UninterpretedOption_descriptor_ = file->message_type(16);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000452 static const int UninterpretedOption_offsets_[7] = {
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000453 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_),
454 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_),
455 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_),
456 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_),
457 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_),
458 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000459 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, aggregate_value_),
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000460 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000461 UninterpretedOption_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800462 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000463 UninterpretedOption_descriptor_,
464 UninterpretedOption::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000465 UninterpretedOption_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000466 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800467 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000468 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800469 sizeof(UninterpretedOption),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800470 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _internal_metadata_),
471 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000472 UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0);
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000473 static const int UninterpretedOption_NamePart_offsets_[2] = {
474 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_),
475 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_),
476 };
kenton@google.com24bf56f2008-09-24 20:31:01 +0000477 UninterpretedOption_NamePart_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800478 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
kenton@google.com24bf56f2008-09-24 20:31:01 +0000479 UninterpretedOption_NamePart_descriptor_,
480 UninterpretedOption_NamePart::default_instance_,
kenton@google.com3e91fcd2008-11-06 04:37:30 +0000481 UninterpretedOption_NamePart_offsets_,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000482 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800483 -1,
kenton@google.com24bf56f2008-09-24 20:31:01 +0000484 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800485 sizeof(UninterpretedOption_NamePart),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800486 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _internal_metadata_),
487 -1);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000488 SourceCodeInfo_descriptor_ = file->message_type(17);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000489 static const int SourceCodeInfo_offsets_[1] = {
490 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, location_),
491 };
492 SourceCodeInfo_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800493 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
liujisi@google.com33165fe2010-11-02 13:14:58 +0000494 SourceCodeInfo_descriptor_,
495 SourceCodeInfo::default_instance_,
496 SourceCodeInfo_offsets_,
497 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800498 -1,
liujisi@google.com33165fe2010-11-02 13:14:58 +0000499 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800500 sizeof(SourceCodeInfo),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800501 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _internal_metadata_),
502 -1);
liujisi@google.com33165fe2010-11-02 13:14:58 +0000503 SourceCodeInfo_Location_descriptor_ = SourceCodeInfo_descriptor_->nested_type(0);
Jisi Liu885b6122015-02-28 14:51:22 -0800504 static const int SourceCodeInfo_Location_offsets_[5] = {
liujisi@google.com33165fe2010-11-02 13:14:58 +0000505 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, path_),
506 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, span_),
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000507 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_comments_),
508 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, trailing_comments_),
Jisi Liu885b6122015-02-28 14:51:22 -0800509 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_detached_comments_),
liujisi@google.com33165fe2010-11-02 13:14:58 +0000510 };
511 SourceCodeInfo_Location_reflection_ =
Feng Xiaof157a562014-11-14 11:50:31 -0800512 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
liujisi@google.com33165fe2010-11-02 13:14:58 +0000513 SourceCodeInfo_Location_descriptor_,
514 SourceCodeInfo_Location::default_instance_,
515 SourceCodeInfo_Location_offsets_,
516 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _has_bits_[0]),
Feng Xiao6ef984a2014-11-10 17:34:54 -0800517 -1,
liujisi@google.com33165fe2010-11-02 13:14:58 +0000518 -1,
Feng Xiao6ef984a2014-11-10 17:34:54 -0800519 sizeof(SourceCodeInfo_Location),
Feng Xiaoc25d9fe2014-11-26 16:15:29 -0800520 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _internal_metadata_),
521 -1);
kenton@google.com24bf56f2008-09-24 20:31:01 +0000522}
523
kenton@google.comd37d46d2009-04-25 02:53:47 +0000524namespace {
525
526GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
527inline void protobuf_AssignDescriptorsOnce() {
528 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
529 &protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto);
530}
531
kenton@google.com80b1d622009-07-29 01:13:20 +0000532void protobuf_RegisterTypes(const ::std::string&) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000533 protobuf_AssignDescriptorsOnce();
534 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800535 FileDescriptorSet_descriptor_, &FileDescriptorSet::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000536 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800537 FileDescriptorProto_descriptor_, &FileDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000538 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800539 DescriptorProto_descriptor_, &DescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000540 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800541 DescriptorProto_ExtensionRange_descriptor_, &DescriptorProto_ExtensionRange::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000542 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Bo Yang5db21732015-05-21 14:28:59 -0700543 DescriptorProto_ReservedRange_descriptor_, &DescriptorProto_ReservedRange::default_instance());
544 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800545 FieldDescriptorProto_descriptor_, &FieldDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000546 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800547 OneofDescriptorProto_descriptor_, &OneofDescriptorProto::default_instance());
jieluo@google.com4de8f552014-07-18 00:47:59 +0000548 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800549 EnumDescriptorProto_descriptor_, &EnumDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000550 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800551 EnumValueDescriptorProto_descriptor_, &EnumValueDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000552 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800553 ServiceDescriptorProto_descriptor_, &ServiceDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000554 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800555 MethodDescriptorProto_descriptor_, &MethodDescriptorProto::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000556 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800557 FileOptions_descriptor_, &FileOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000558 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800559 MessageOptions_descriptor_, &MessageOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000560 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800561 FieldOptions_descriptor_, &FieldOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000562 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800563 EnumOptions_descriptor_, &EnumOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000564 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800565 EnumValueOptions_descriptor_, &EnumValueOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000566 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800567 ServiceOptions_descriptor_, &ServiceOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000568 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800569 MethodOptions_descriptor_, &MethodOptions::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000570 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800571 UninterpretedOption_descriptor_, &UninterpretedOption::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000572 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800573 UninterpretedOption_NamePart_descriptor_, &UninterpretedOption_NamePart::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +0000574 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800575 SourceCodeInfo_descriptor_, &SourceCodeInfo::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +0000576 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Feng Xiaof157a562014-11-14 11:50:31 -0800577 SourceCodeInfo_Location_descriptor_, &SourceCodeInfo_Location::default_instance());
kenton@google.comd37d46d2009-04-25 02:53:47 +0000578}
579
580} // namespace
581
kenton@google.com63e646b2009-05-06 19:27:03 +0000582void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto() {
583 delete FileDescriptorSet::default_instance_;
584 delete FileDescriptorSet_reflection_;
585 delete FileDescriptorProto::default_instance_;
586 delete FileDescriptorProto_reflection_;
587 delete DescriptorProto::default_instance_;
588 delete DescriptorProto_reflection_;
589 delete DescriptorProto_ExtensionRange::default_instance_;
590 delete DescriptorProto_ExtensionRange_reflection_;
Bo Yang5db21732015-05-21 14:28:59 -0700591 delete DescriptorProto_ReservedRange::default_instance_;
592 delete DescriptorProto_ReservedRange_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000593 delete FieldDescriptorProto::default_instance_;
594 delete FieldDescriptorProto_reflection_;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000595 delete OneofDescriptorProto::default_instance_;
596 delete OneofDescriptorProto_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000597 delete EnumDescriptorProto::default_instance_;
598 delete EnumDescriptorProto_reflection_;
599 delete EnumValueDescriptorProto::default_instance_;
600 delete EnumValueDescriptorProto_reflection_;
601 delete ServiceDescriptorProto::default_instance_;
602 delete ServiceDescriptorProto_reflection_;
603 delete MethodDescriptorProto::default_instance_;
604 delete MethodDescriptorProto_reflection_;
605 delete FileOptions::default_instance_;
606 delete FileOptions_reflection_;
607 delete MessageOptions::default_instance_;
608 delete MessageOptions_reflection_;
609 delete FieldOptions::default_instance_;
610 delete FieldOptions_reflection_;
611 delete EnumOptions::default_instance_;
612 delete EnumOptions_reflection_;
613 delete EnumValueOptions::default_instance_;
614 delete EnumValueOptions_reflection_;
615 delete ServiceOptions::default_instance_;
616 delete ServiceOptions_reflection_;
617 delete MethodOptions::default_instance_;
618 delete MethodOptions_reflection_;
619 delete UninterpretedOption::default_instance_;
620 delete UninterpretedOption_reflection_;
621 delete UninterpretedOption_NamePart::default_instance_;
622 delete UninterpretedOption_NamePart_reflection_;
liujisi@google.com33165fe2010-11-02 13:14:58 +0000623 delete SourceCodeInfo::default_instance_;
624 delete SourceCodeInfo_reflection_;
625 delete SourceCodeInfo_Location::default_instance_;
626 delete SourceCodeInfo_Location_reflection_;
kenton@google.com63e646b2009-05-06 19:27:03 +0000627}
628
kenton@google.comd37d46d2009-04-25 02:53:47 +0000629void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
temporal40ee5512008-07-10 02:12:20 +0000630 static bool already_here = false;
631 if (already_here) return;
632 already_here = true;
633 GOOGLE_PROTOBUF_VERIFY_VERSION;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000634
kenton@google.comd37d46d2009-04-25 02:53:47 +0000635 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
temporal40ee5512008-07-10 02:12:20 +0000636 "\n google/protobuf/descriptor.proto\022\017goog"
temporal779f61c2008-08-13 03:15:00 +0000637 "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file"
638 "\030\001 \003(\0132$.google.protobuf.FileDescriptorP"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800639 "roto\"\333\003\n\023FileDescriptorProto\022\014\n\004name\030\001 \001"
temporal779f61c2008-08-13 03:15:00 +0000640 "(\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 +0000641 "\031\n\021public_dependency\030\n \003(\005\022\027\n\017weak_depen"
642 "dency\030\013 \003(\005\0226\n\014message_type\030\004 \003(\0132 .goog"
643 "le.protobuf.DescriptorProto\0227\n\tenum_type"
644 "\030\005 \003(\0132$.google.protobuf.EnumDescriptorP"
645 "roto\0228\n\007service\030\006 \003(\0132\'.google.protobuf."
646 "ServiceDescriptorProto\0228\n\textension\030\007 \003("
liujisi@google.com33165fe2010-11-02 13:14:58 +0000647 "\0132%.google.protobuf.FieldDescriptorProto"
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000648 "\022-\n\007options\030\010 \001(\0132\034.google.protobuf.File"
649 "Options\0229\n\020source_code_info\030\t \001(\0132\037.goog"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800650 "le.protobuf.SourceCodeInfo\022\016\n\006syntax\030\014 \001"
Bo Yang5db21732015-05-21 14:28:59 -0700651 "(\t\"\360\004\n\017DescriptorProto\022\014\n\004name\030\001 \001(\t\0224\n\005"
Feng Xiao6ef984a2014-11-10 17:34:54 -0800652 "field\030\002 \003(\0132%.google.protobuf.FieldDescr"
653 "iptorProto\0228\n\textension\030\006 \003(\0132%.google.p"
654 "rotobuf.FieldDescriptorProto\0225\n\013nested_t"
655 "ype\030\003 \003(\0132 .google.protobuf.DescriptorPr"
656 "oto\0227\n\tenum_type\030\004 \003(\0132$.google.protobuf"
657 ".EnumDescriptorProto\022H\n\017extension_range\030"
658 "\005 \003(\0132/.google.protobuf.DescriptorProto."
659 "ExtensionRange\0229\n\noneof_decl\030\010 \003(\0132%.goo"
660 "gle.protobuf.OneofDescriptorProto\0220\n\007opt"
661 "ions\030\007 \001(\0132\037.google.protobuf.MessageOpti"
Bo Yang5db21732015-05-21 14:28:59 -0700662 "ons\022F\n\016reserved_range\030\t \003(\0132..google.pro"
663 "tobuf.DescriptorProto.ReservedRange\022\025\n\rr"
664 "eserved_name\030\n \003(\t\032,\n\016ExtensionRange\022\r\n\005"
665 "start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\032+\n\rReservedRang"
666 "e\022\r\n\005start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\"\251\005\n\024FieldD"
667 "escriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\003"
668 " \001(\005\022:\n\005label\030\004 \001(\0162+.google.protobuf.Fi"
669 "eldDescriptorProto.Label\0228\n\004type\030\005 \001(\0162*"
670 ".google.protobuf.FieldDescriptorProto.Ty"
671 "pe\022\021\n\ttype_name\030\006 \001(\t\022\020\n\010extendee\030\002 \001(\t\022"
672 "\025\n\rdefault_value\030\007 \001(\t\022\023\n\013oneof_index\030\t "
673 "\001(\005\022.\n\007options\030\010 \001(\0132\035.google.protobuf.F"
674 "ieldOptions\"\266\002\n\004Type\022\017\n\013TYPE_DOUBLE\020\001\022\016\n"
675 "\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT64\020\003\022\017\n\013TYPE_UI"
676 "NT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014TYPE_FIXED64\020\006"
677 "\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE_BOOL\020\010\022\017\n\013TYP"
678 "E_STRING\020\t\022\016\n\nTYPE_GROUP\020\n\022\020\n\014TYPE_MESSA"
679 "GE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TYPE_UINT32\020\r\022\r\n"
680 "\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXED32\020\017\022\021\n\rTYPE_"
681 "SFIXED64\020\020\022\017\n\013TYPE_SINT32\020\021\022\017\n\013TYPE_SINT"
682 "64\020\022\"C\n\005Label\022\022\n\016LABEL_OPTIONAL\020\001\022\022\n\016LAB"
683 "EL_REQUIRED\020\002\022\022\n\016LABEL_REPEATED\020\003\"$\n\024One"
684 "ofDescriptorProto\022\014\n\004name\030\001 \001(\t\"\214\001\n\023Enum"
685 "DescriptorProto\022\014\n\004name\030\001 \001(\t\0228\n\005value\030\002"
686 " \003(\0132).google.protobuf.EnumValueDescript"
687 "orProto\022-\n\007options\030\003 \001(\0132\034.google.protob"
688 "uf.EnumOptions\"l\n\030EnumValueDescriptorPro"
689 "to\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\0222\n\007opti"
690 "ons\030\003 \001(\0132!.google.protobuf.EnumValueOpt"
691 "ions\"\220\001\n\026ServiceDescriptorProto\022\014\n\004name\030"
692 "\001 \001(\t\0226\n\006method\030\002 \003(\0132&.google.protobuf."
693 "MethodDescriptorProto\0220\n\007options\030\003 \001(\0132\037"
694 ".google.protobuf.ServiceOptions\"\301\001\n\025Meth"
695 "odDescriptorProto\022\014\n\004name\030\001 \001(\t\022\022\n\ninput"
696 "_type\030\002 \001(\t\022\023\n\013output_type\030\003 \001(\t\022/\n\007opti"
697 "ons\030\004 \001(\0132\036.google.protobuf.MethodOption"
698 "s\022\037\n\020client_streaming\030\005 \001(\010:\005false\022\037\n\020se"
Xiao Hang801e9202015-07-27 17:46:22 -0700699 "rver_streaming\030\006 \001(\010:\005false\"\252\005\n\013FileOpti"
Bo Yang5db21732015-05-21 14:28:59 -0700700 "ons\022\024\n\014java_package\030\001 \001(\t\022\034\n\024java_outer_"
701 "classname\030\010 \001(\t\022\"\n\023java_multiple_files\030\n"
702 " \001(\010:\005false\022,\n\035java_generate_equals_and_"
703 "hash\030\024 \001(\010:\005false\022%\n\026java_string_check_u"
704 "tf8\030\033 \001(\010:\005false\022F\n\014optimize_for\030\t \001(\0162)"
705 ".google.protobuf.FileOptions.OptimizeMod"
706 "e:\005SPEED\022\022\n\ngo_package\030\013 \001(\t\022\"\n\023cc_gener"
707 "ic_services\030\020 \001(\010:\005false\022$\n\025java_generic"
708 "_services\030\021 \001(\010:\005false\022\"\n\023py_generic_ser"
709 "vices\030\022 \001(\010:\005false\022\031\n\ndeprecated\030\027 \001(\010:\005"
710 "false\022\037\n\020cc_enable_arenas\030\037 \001(\010:\005false\022\031"
711 "\n\021objc_class_prefix\030$ \001(\t\022\030\n\020csharp_name"
Xiao Hang801e9202015-07-27 17:46:22 -0700712 "space\030% \001(\t\022\'\n\037javanano_use_deprecated_p"
713 "ackage\030& \001(\010\022C\n\024uninterpreted_option\030\347\007 "
714 "\003(\0132$.google.protobuf.UninterpretedOptio"
715 "n\":\n\014OptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZ"
716 "E\020\002\022\020\n\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\346\001\n\016Mes"
717 "sageOptions\022&\n\027message_set_wire_format\030\001"
718 " \001(\010:\005false\022.\n\037no_standard_descriptor_ac"
719 "cessor\030\002 \001(\010:\005false\022\031\n\ndeprecated\030\003 \001(\010:"
720 "\005false\022\021\n\tmap_entry\030\007 \001(\010\022C\n\024uninterpret"
721 "ed_option\030\347\007 \003(\0132$.google.protobuf.Unint"
722 "erpretedOption*\t\010\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOptio"
723 "ns\022:\n\005ctype\030\001 \001(\0162#.google.protobuf.Fiel"
724 "dOptions.CType:\006STRING\022\016\n\006packed\030\002 \001(\010\022\?"
725 "\n\006jstype\030\006 \001(\0162$.google.protobuf.FieldOp"
726 "tions.JSType:\tJS_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005f"
727 "alse\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\023\n\004weak\030"
728 "\n \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 "
729 "\003(\0132$.google.protobuf.UninterpretedOptio"
730 "n\"/\n\005CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRI"
731 "NG_PIECE\020\002\"5\n\006JSType\022\r\n\tJS_NORMAL\020\000\022\r\n\tJ"
732 "S_STRING\020\001\022\r\n\tJS_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n"
733 "\013EnumOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\ndep"
734 "recated\030\003 \001(\010:\005false\022C\n\024uninterpreted_op"
735 "tion\030\347\007 \003(\0132$.google.protobuf.Uninterpre"
736 "tedOption*\t\010\350\007\020\200\200\200\200\002\"}\n\020EnumValueOptions"
737 "\022\031\n\ndeprecated\030\001 \001(\010:\005false\022C\n\024uninterpr"
738 "eted_option\030\347\007 \003(\0132$.google.protobuf.Uni"
739 "nterpretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOp"
740 "tions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024unin"
741 "terpreted_option\030\347\007 \003(\0132$.google.protobu"
742 "f.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"z\n\rMeth"
743 "odOptions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024"
744 "uninterpreted_option\030\347\007 \003(\0132$.google.pro"
745 "tobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n"
746 "\023UninterpretedOption\022;\n\004name\030\002 \003(\0132-.goo"
747 "gle.protobuf.UninterpretedOption.NamePar"
748 "t\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positive_"
749 "int_value\030\004 \001(\004\022\032\n\022negative_int_value\030\005 "
750 "\001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_valu"
751 "e\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010Name"
752 "Part\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030"
753 "\002 \002(\010\"\325\001\n\016SourceCodeInfo\022:\n\010location\030\001 \003"
754 "(\0132(.google.protobuf.SourceCodeInfo.Loca"
755 "tion\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004s"
756 "pan\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022"
757 "\031\n\021trailing_comments\030\004 \001(\t\022!\n\031leading_de"
Xiao Hang9fd0f152015-08-04 15:07:44 -0700758 "tached_comments\030\006 \003(\tB[\n\023com.google.prot"
Xiao Hang801e9202015-07-27 17:46:22 -0700759 "obufB\020DescriptorProtosH\001Z\ndescriptor\242\002\003G"
Xiao Hang9fd0f152015-08-04 15:07:44 -0700760 "PB\252\002\032Google.Protobuf.Reflection\260\002\001", 4994);
kenton@google.comd37d46d2009-04-25 02:53:47 +0000761 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
762 "google/protobuf/descriptor.proto", &protobuf_RegisterTypes);
763 FileDescriptorSet::default_instance_ = new FileDescriptorSet();
764 FileDescriptorProto::default_instance_ = new FileDescriptorProto();
765 DescriptorProto::default_instance_ = new DescriptorProto();
766 DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange();
Bo Yang5db21732015-05-21 14:28:59 -0700767 DescriptorProto_ReservedRange::default_instance_ = new DescriptorProto_ReservedRange();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000768 FieldDescriptorProto::default_instance_ = new FieldDescriptorProto();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000769 OneofDescriptorProto::default_instance_ = new OneofDescriptorProto();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000770 EnumDescriptorProto::default_instance_ = new EnumDescriptorProto();
771 EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto();
772 ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto();
773 MethodDescriptorProto::default_instance_ = new MethodDescriptorProto();
774 FileOptions::default_instance_ = new FileOptions();
775 MessageOptions::default_instance_ = new MessageOptions();
776 FieldOptions::default_instance_ = new FieldOptions();
777 EnumOptions::default_instance_ = new EnumOptions();
778 EnumValueOptions::default_instance_ = new EnumValueOptions();
779 ServiceOptions::default_instance_ = new ServiceOptions();
780 MethodOptions::default_instance_ = new MethodOptions();
781 UninterpretedOption::default_instance_ = new UninterpretedOption();
782 UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart();
liujisi@google.com33165fe2010-11-02 13:14:58 +0000783 SourceCodeInfo::default_instance_ = new SourceCodeInfo();
784 SourceCodeInfo_Location::default_instance_ = new SourceCodeInfo_Location();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000785 FileDescriptorSet::default_instance_->InitAsDefaultInstance();
786 FileDescriptorProto::default_instance_->InitAsDefaultInstance();
787 DescriptorProto::default_instance_->InitAsDefaultInstance();
788 DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance();
Bo Yang5db21732015-05-21 14:28:59 -0700789 DescriptorProto_ReservedRange::default_instance_->InitAsDefaultInstance();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000790 FieldDescriptorProto::default_instance_->InitAsDefaultInstance();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000791 OneofDescriptorProto::default_instance_->InitAsDefaultInstance();
kenton@google.comd37d46d2009-04-25 02:53:47 +0000792 EnumDescriptorProto::default_instance_->InitAsDefaultInstance();
793 EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance();
794 ServiceDescriptorProto::default_instance_->InitAsDefaultInstance();
795 MethodDescriptorProto::default_instance_->InitAsDefaultInstance();
796 FileOptions::default_instance_->InitAsDefaultInstance();
797 MessageOptions::default_instance_->InitAsDefaultInstance();
798 FieldOptions::default_instance_->InitAsDefaultInstance();
799 EnumOptions::default_instance_->InitAsDefaultInstance();
800 EnumValueOptions::default_instance_->InitAsDefaultInstance();
801 ServiceOptions::default_instance_->InitAsDefaultInstance();
802 MethodOptions::default_instance_->InitAsDefaultInstance();
803 UninterpretedOption::default_instance_->InitAsDefaultInstance();
804 UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance();
liujisi@google.com33165fe2010-11-02 13:14:58 +0000805 SourceCodeInfo::default_instance_->InitAsDefaultInstance();
806 SourceCodeInfo_Location::default_instance_->InitAsDefaultInstance();
kenton@google.com63e646b2009-05-06 19:27:03 +0000807 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto);
temporal40ee5512008-07-10 02:12:20 +0000808}
809
kenton@google.comd37d46d2009-04-25 02:53:47 +0000810// Force AddDescriptors() to be called at static initialization time.
temporal40ee5512008-07-10 02:12:20 +0000811struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto {
812 StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000813 protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
temporal40ee5512008-07-10 02:12:20 +0000814 }
815} static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_;
816
Feng Xiaof157a562014-11-14 11:50:31 -0800817namespace {
818
819static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;
820static void MergeFromFail(int line) {
821 GOOGLE_CHECK(false) << __FILE__ << ":" << line;
822}
823
824} // namespace
825
826
temporal40ee5512008-07-10 02:12:20 +0000827// ===================================================================
828
kenton@google.comcfa2d8a2009-04-18 00:02:12 +0000829#ifndef _MSC_VER
830const int FileDescriptorSet::kFileFieldNumber;
831#endif // !_MSC_VER
temporal779f61c2008-08-13 03:15:00 +0000832
kenton@google.com573989f2009-10-30 22:02:17 +0000833FileDescriptorSet::FileDescriptorSet()
Bo Yang5db21732015-05-21 14:28:59 -0700834 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000835 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000836 // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000837}
838
kenton@google.com80b1d622009-07-29 01:13:20 +0000839void FileDescriptorSet::InitAsDefaultInstance() {
840}
kenton@google.com24bf56f2008-09-24 20:31:01 +0000841
kenton@google.com573989f2009-10-30 22:02:17 +0000842FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -0800843 : ::google::protobuf::Message(),
844 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000845 SharedCtor();
temporal779f61c2008-08-13 03:15:00 +0000846 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +0000847 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000848}
849
kenton@google.comd37d46d2009-04-25 02:53:47 +0000850void FileDescriptorSet::SharedCtor() {
851 _cached_size_ = 0;
852 ::memset(_has_bits_, 0, sizeof(_has_bits_));
853}
854
temporal779f61c2008-08-13 03:15:00 +0000855FileDescriptorSet::~FileDescriptorSet() {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000856 // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +0000857 SharedDtor();
858}
859
860void FileDescriptorSet::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +0000861 if (this != default_instance_) {
temporal779f61c2008-08-13 03:15:00 +0000862 }
863}
864
kenton@google.comfccb1462009-12-18 02:11:36 +0000865void FileDescriptorSet::SetCachedSize(int size) const {
866 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
867 _cached_size_ = size;
868 GOOGLE_SAFE_CONCURRENT_WRITES_END();
869}
temporal779f61c2008-08-13 03:15:00 +0000870const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000871 protobuf_AssignDescriptorsOnce();
temporal779f61c2008-08-13 03:15:00 +0000872 return FileDescriptorSet_descriptor_;
873}
874
kenton@google.com24bf56f2008-09-24 20:31:01 +0000875const FileDescriptorSet& FileDescriptorSet::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +0000876 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
877 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +0000878}
879
880FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL;
881
Feng Xiao6ef984a2014-11-10 17:34:54 -0800882FileDescriptorSet* FileDescriptorSet::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -0800883 FileDescriptorSet* n = new FileDescriptorSet;
884 if (arena != NULL) {
885 arena->Own(n);
886 }
887 return n;
temporal779f61c2008-08-13 03:15:00 +0000888}
889
890void FileDescriptorSet::Clear() {
891 file_.Clear();
892 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -0800893 if (_internal_metadata_.have_unknown_fields()) {
894 mutable_unknown_fields()->Clear();
895 }
temporal779f61c2008-08-13 03:15:00 +0000896}
897
898bool FileDescriptorSet::MergePartialFromCodedStream(
899 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000900#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal779f61c2008-08-13 03:15:00 +0000901 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000902 // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorSet)
903 for (;;) {
904 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
905 tag = p.first;
906 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +0000907 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal779f61c2008-08-13 03:15:00 +0000908 // repeated .google.protobuf.FileDescriptorProto file = 1;
909 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000910 if (tag == 10) {
Bo Yang5db21732015-05-21 14:28:59 -0700911 DO_(input->IncrementRecursionDepth());
912 parse_loop_file:
913 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +0000914 input, add_file()));
915 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000916 goto handle_unusual;
temporal779f61c2008-08-13 03:15:00 +0000917 }
Bo Yang5db21732015-05-21 14:28:59 -0700918 if (input->ExpectTag(10)) goto parse_loop_file;
919 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +0000920 if (input->ExpectAtEnd()) goto success;
temporal779f61c2008-08-13 03:15:00 +0000921 break;
922 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000923
temporal779f61c2008-08-13 03:15:00 +0000924 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000925 handle_unusual:
926 if (tag == 0 ||
927 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +0000928 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000929 goto success;
temporal779f61c2008-08-13 03:15:00 +0000930 }
931 DO_(::google::protobuf::internal::WireFormat::SkipField(
932 input, tag, mutable_unknown_fields()));
933 break;
934 }
935 }
936 }
jieluo@google.com4de8f552014-07-18 00:47:59 +0000937success:
938 // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000939 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +0000940failure:
941 // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorSet)
942 return false;
temporal779f61c2008-08-13 03:15:00 +0000943#undef DO_
944}
945
kenton@google.comd37d46d2009-04-25 02:53:47 +0000946void FileDescriptorSet::SerializeWithCachedSizes(
temporal779f61c2008-08-13 03:15:00 +0000947 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000948 // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorSet)
temporal779f61c2008-08-13 03:15:00 +0000949 // repeated .google.protobuf.FileDescriptorProto file = 1;
Feng Xiaof157a562014-11-14 11:50:31 -0800950 for (unsigned int i = 0, n = this->file_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +0000951 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +0000952 1, this->file(i), output);
temporal779f61c2008-08-13 03:15:00 +0000953 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000954
Feng Xiao6ef984a2014-11-10 17:34:54 -0800955 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000956 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
957 unknown_fields(), output);
temporal779f61c2008-08-13 03:15:00 +0000958 }
jieluo@google.com4de8f552014-07-18 00:47:59 +0000959 // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +0000960}
961
962::google::protobuf::uint8* FileDescriptorSet::SerializeWithCachedSizesToArray(
963 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +0000964 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +0000965 // repeated .google.protobuf.FileDescriptorProto file = 1;
Feng Xiaof157a562014-11-14 11:50:31 -0800966 for (unsigned int i = 0, n = this->file_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +0000967 target = ::google::protobuf::internal::WireFormatLite::
968 WriteMessageNoVirtualToArray(
969 1, this->file(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +0000970 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000971
Feng Xiao6ef984a2014-11-10 17:34:54 -0800972 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +0000973 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
974 unknown_fields(), target);
975 }
jieluo@google.com4de8f552014-07-18 00:47:59 +0000976 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet)
kenton@google.comd37d46d2009-04-25 02:53:47 +0000977 return target;
temporal779f61c2008-08-13 03:15:00 +0000978}
979
980int FileDescriptorSet::ByteSize() const {
981 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000982
temporal779f61c2008-08-13 03:15:00 +0000983 // repeated .google.protobuf.FileDescriptorProto file = 1;
kenton@google.com2d6daa72009-01-22 01:27:00 +0000984 total_size += 1 * this->file_size();
985 for (int i = 0; i < this->file_size(); i++) {
temporal779f61c2008-08-13 03:15:00 +0000986 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +0000987 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal779f61c2008-08-13 03:15:00 +0000988 this->file(i));
989 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000990
Feng Xiao6ef984a2014-11-10 17:34:54 -0800991 if (_internal_metadata_.have_unknown_fields()) {
temporal779f61c2008-08-13 03:15:00 +0000992 total_size +=
993 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
994 unknown_fields());
995 }
kenton@google.comfccb1462009-12-18 02:11:36 +0000996 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal779f61c2008-08-13 03:15:00 +0000997 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +0000998 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal779f61c2008-08-13 03:15:00 +0000999 return total_size;
1000}
1001
1002void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001003 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07001004 const FileDescriptorSet* source =
1005 ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorSet>(
1006 &from);
temporal779f61c2008-08-13 03:15:00 +00001007 if (source == NULL) {
1008 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1009 } else {
1010 MergeFrom(*source);
1011 }
1012}
1013
1014void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001015 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal779f61c2008-08-13 03:15:00 +00001016 file_.MergeFrom(from.file_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08001017 if (from._internal_metadata_.have_unknown_fields()) {
1018 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1019 }
temporal779f61c2008-08-13 03:15:00 +00001020}
1021
1022void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) {
1023 if (&from == this) return;
1024 Clear();
1025 MergeFrom(from);
1026}
1027
1028void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) {
1029 if (&from == this) return;
1030 Clear();
1031 MergeFrom(from);
1032}
1033
kenton@google.comceb561d2009-06-25 19:05:36 +00001034bool FileDescriptorSet::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001035
jieluo@google.com4de8f552014-07-18 00:47:59 +00001036 if (!::google::protobuf::internal::AllAreInitialized(this->file())) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00001037 return true;
1038}
1039
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001040void FileDescriptorSet::Swap(FileDescriptorSet* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08001041 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001042 InternalSwap(other);
1043}
1044void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) {
1045 file_.UnsafeArenaSwap(&other->file_);
1046 std::swap(_has_bits_[0], other->_has_bits_[0]);
1047 _internal_metadata_.Swap(&other->_internal_metadata_);
1048 std::swap(_cached_size_, other->_cached_size_);
1049}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00001050
kenton@google.com80b1d622009-07-29 01:13:20 +00001051::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const {
1052 protobuf_AssignDescriptorsOnce();
1053 ::google::protobuf::Metadata metadata;
1054 metadata.descriptor = FileDescriptorSet_descriptor_;
1055 metadata.reflection = FileDescriptorSet_reflection_;
1056 return metadata;
temporal779f61c2008-08-13 03:15:00 +00001057}
1058
Jisi Liu885b6122015-02-28 14:51:22 -08001059#if PROTOBUF_INLINE_NOT_IN_HEADERS
1060// FileDescriptorSet
1061
1062// repeated .google.protobuf.FileDescriptorProto file = 1;
Bo Yang5db21732015-05-21 14:28:59 -07001063int FileDescriptorSet::file_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001064 return file_.size();
1065}
Bo Yang5db21732015-05-21 14:28:59 -07001066void FileDescriptorSet::clear_file() {
Jisi Liu885b6122015-02-28 14:51:22 -08001067 file_.Clear();
1068}
1069 const ::google::protobuf::FileDescriptorProto& FileDescriptorSet::file(int index) const {
1070 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file)
1071 return file_.Get(index);
1072}
1073 ::google::protobuf::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) {
1074 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorSet.file)
1075 return file_.Mutable(index);
1076}
1077 ::google::protobuf::FileDescriptorProto* FileDescriptorSet::add_file() {
1078 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file)
1079 return file_.Add();
1080}
1081 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
1082FileDescriptorSet::file() const {
1083 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file)
1084 return file_;
1085}
1086 ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
1087FileDescriptorSet::mutable_file() {
1088 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file)
1089 return &file_;
1090}
1091
1092#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal779f61c2008-08-13 03:15:00 +00001093
1094// ===================================================================
1095
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001096#ifndef _MSC_VER
1097const int FileDescriptorProto::kNameFieldNumber;
1098const int FileDescriptorProto::kPackageFieldNumber;
1099const int FileDescriptorProto::kDependencyFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001100const int FileDescriptorProto::kPublicDependencyFieldNumber;
1101const int FileDescriptorProto::kWeakDependencyFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001102const int FileDescriptorProto::kMessageTypeFieldNumber;
1103const int FileDescriptorProto::kEnumTypeFieldNumber;
1104const int FileDescriptorProto::kServiceFieldNumber;
1105const int FileDescriptorProto::kExtensionFieldNumber;
1106const int FileDescriptorProto::kOptionsFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001107const int FileDescriptorProto::kSourceCodeInfoFieldNumber;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001108const int FileDescriptorProto::kSyntaxFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00001109#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00001110
kenton@google.com573989f2009-10-30 22:02:17 +00001111FileDescriptorProto::FileDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07001112 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001113 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00001114 // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00001115}
1116
kenton@google.com80b1d622009-07-29 01:13:20 +00001117void FileDescriptorProto::InitAsDefaultInstance() {
1118 options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance());
liujisi@google.com33165fe2010-11-02 13:14:58 +00001119 source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(&::google::protobuf::SourceCodeInfo::default_instance());
temporal40ee5512008-07-10 02:12:20 +00001120}
1121
kenton@google.com573989f2009-10-30 22:02:17 +00001122FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08001123 : ::google::protobuf::Message(),
1124 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001125 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00001126 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00001127 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001128}
1129
kenton@google.comd37d46d2009-04-25 02:53:47 +00001130void FileDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001131 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00001132 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001133 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1134 package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00001135 options_ = NULL;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001136 source_code_info_ = NULL;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001137 syntax_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00001138 ::memset(_has_bits_, 0, sizeof(_has_bits_));
1139}
1140
temporal40ee5512008-07-10 02:12:20 +00001141FileDescriptorProto::~FileDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001142 // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001143 SharedDtor();
1144}
1145
1146void FileDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08001147 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1148 package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1149 syntax_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00001150 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00001151 delete options_;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001152 delete source_code_info_;
temporal40ee5512008-07-10 02:12:20 +00001153 }
1154}
1155
kenton@google.comfccb1462009-12-18 02:11:36 +00001156void FileDescriptorProto::SetCachedSize(int size) const {
1157 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1158 _cached_size_ = size;
1159 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1160}
temporal40ee5512008-07-10 02:12:20 +00001161const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001162 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00001163 return FileDescriptorProto_descriptor_;
1164}
1165
kenton@google.com24bf56f2008-09-24 20:31:01 +00001166const FileDescriptorProto& FileDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00001167 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
1168 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001169}
1170
1171FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL;
1172
Feng Xiao6ef984a2014-11-10 17:34:54 -08001173FileDescriptorProto* FileDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08001174 FileDescriptorProto* n = new FileDescriptorProto;
1175 if (arena != NULL) {
1176 arena->Own(n);
1177 }
1178 return n;
temporal40ee5512008-07-10 02:12:20 +00001179}
1180
1181void FileDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07001182 if (_has_bits_[0 / 32] & 3u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001183 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001184 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00001185 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001186 if (has_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001187 package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00001188 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001189 }
Austin Schuhe8268372015-05-19 23:22:20 -07001190 if (_has_bits_[8 / 32] & 3584u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001191 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001192 if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear();
1193 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001194 if (has_source_code_info()) {
1195 if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear();
1196 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001197 if (has_syntax()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001198 syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Feng Xiao6ef984a2014-11-10 17:34:54 -08001199 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001200 }
temporal40ee5512008-07-10 02:12:20 +00001201 dependency_.Clear();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001202 public_dependency_.Clear();
1203 weak_dependency_.Clear();
temporal40ee5512008-07-10 02:12:20 +00001204 message_type_.Clear();
1205 enum_type_.Clear();
1206 service_.Clear();
1207 extension_.Clear();
1208 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08001209 if (_internal_metadata_.have_unknown_fields()) {
1210 mutable_unknown_fields()->Clear();
1211 }
temporal40ee5512008-07-10 02:12:20 +00001212}
1213
1214bool FileDescriptorProto::MergePartialFromCodedStream(
1215 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001216#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00001217 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00001218 // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorProto)
1219 for (;;) {
1220 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1221 tag = p.first;
1222 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00001223 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00001224 // optional string name = 1;
1225 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001226 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001227 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1228 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001229 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00001230 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001231 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001232 "google.protobuf.FileDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00001233 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001234 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001235 }
temporal40ee5512008-07-10 02:12:20 +00001236 if (input->ExpectTag(18)) goto parse_package;
1237 break;
1238 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001239
temporal40ee5512008-07-10 02:12:20 +00001240 // optional string package = 2;
1241 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001242 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001243 parse_package:
1244 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1245 input, this->mutable_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001246 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00001247 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001248 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001249 "google.protobuf.FileDescriptorProto.package");
kenton@google.comfccb1462009-12-18 02:11:36 +00001250 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001251 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001252 }
temporal40ee5512008-07-10 02:12:20 +00001253 if (input->ExpectTag(26)) goto parse_dependency;
1254 break;
1255 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001256
temporal40ee5512008-07-10 02:12:20 +00001257 // repeated string dependency = 3;
1258 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001259 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001260 parse_dependency:
1261 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1262 input, this->add_dependency()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001263 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.com20724212012-05-16 05:41:31 +00001264 this->dependency(this->dependency_size() - 1).data(),
1265 this->dependency(this->dependency_size() - 1).length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001266 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001267 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.comfccb1462009-12-18 02:11:36 +00001268 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001269 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001270 }
temporal40ee5512008-07-10 02:12:20 +00001271 if (input->ExpectTag(26)) goto parse_dependency;
1272 if (input->ExpectTag(34)) goto parse_message_type;
1273 break;
1274 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001275
temporal40ee5512008-07-10 02:12:20 +00001276 // repeated .google.protobuf.DescriptorProto message_type = 4;
1277 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001278 if (tag == 34) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001279 parse_message_type:
Bo Yang5db21732015-05-21 14:28:59 -07001280 DO_(input->IncrementRecursionDepth());
1281 parse_loop_message_type:
1282 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001283 input, add_message_type()));
1284 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001285 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001286 }
Bo Yang5db21732015-05-21 14:28:59 -07001287 if (input->ExpectTag(34)) goto parse_loop_message_type;
1288 if (input->ExpectTag(42)) goto parse_loop_enum_type;
1289 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001290 break;
1291 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001292
temporal40ee5512008-07-10 02:12:20 +00001293 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
1294 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001295 if (tag == 42) {
Bo Yang5db21732015-05-21 14:28:59 -07001296 DO_(input->IncrementRecursionDepth());
1297 parse_loop_enum_type:
1298 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001299 input, add_enum_type()));
1300 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001301 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001302 }
Bo Yang5db21732015-05-21 14:28:59 -07001303 if (input->ExpectTag(42)) goto parse_loop_enum_type;
1304 if (input->ExpectTag(50)) goto parse_loop_service;
1305 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001306 break;
1307 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001308
temporal40ee5512008-07-10 02:12:20 +00001309 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
1310 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001311 if (tag == 50) {
Bo Yang5db21732015-05-21 14:28:59 -07001312 DO_(input->IncrementRecursionDepth());
1313 parse_loop_service:
1314 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001315 input, add_service()));
1316 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001317 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001318 }
Bo Yang5db21732015-05-21 14:28:59 -07001319 if (input->ExpectTag(50)) goto parse_loop_service;
1320 if (input->ExpectTag(58)) goto parse_loop_extension;
1321 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001322 break;
1323 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001324
temporal40ee5512008-07-10 02:12:20 +00001325 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
1326 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001327 if (tag == 58) {
Bo Yang5db21732015-05-21 14:28:59 -07001328 DO_(input->IncrementRecursionDepth());
1329 parse_loop_extension:
1330 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00001331 input, add_extension()));
1332 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001333 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001334 }
Bo Yang5db21732015-05-21 14:28:59 -07001335 if (input->ExpectTag(58)) goto parse_loop_extension;
1336 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00001337 if (input->ExpectTag(66)) goto parse_options;
1338 break;
1339 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001340
temporal40ee5512008-07-10 02:12:20 +00001341 // optional .google.protobuf.FileOptions options = 8;
1342 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001343 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001344 parse_options:
1345 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1346 input, mutable_options()));
1347 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001348 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00001349 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001350 if (input->ExpectTag(74)) goto parse_source_code_info;
1351 break;
1352 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001353
liujisi@google.com33165fe2010-11-02 13:14:58 +00001354 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1355 case 9: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001356 if (tag == 74) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001357 parse_source_code_info:
1358 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1359 input, mutable_source_code_info()));
1360 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001361 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001362 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001363 if (input->ExpectTag(80)) goto parse_public_dependency;
1364 break;
1365 }
1366
1367 // repeated int32 public_dependency = 10;
1368 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001369 if (tag == 80) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001370 parse_public_dependency:
1371 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1372 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1373 1, 80, input, this->mutable_public_dependency())));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001374 } else if (tag == 82) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001375 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1376 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1377 input, this->mutable_public_dependency())));
1378 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001379 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001380 }
1381 if (input->ExpectTag(80)) goto parse_public_dependency;
1382 if (input->ExpectTag(88)) goto parse_weak_dependency;
1383 break;
1384 }
1385
1386 // repeated int32 weak_dependency = 11;
1387 case 11: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001388 if (tag == 88) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001389 parse_weak_dependency:
1390 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1391 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1392 1, 88, input, this->mutable_weak_dependency())));
jieluo@google.com4de8f552014-07-18 00:47:59 +00001393 } else if (tag == 90) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001394 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1395 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1396 input, this->mutable_weak_dependency())));
1397 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001398 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001399 }
1400 if (input->ExpectTag(88)) goto parse_weak_dependency;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001401 if (input->ExpectTag(98)) goto parse_syntax;
1402 break;
1403 }
1404
1405 // optional string syntax = 12;
1406 case 12: {
1407 if (tag == 98) {
1408 parse_syntax:
1409 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1410 input, this->mutable_syntax()));
1411 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1412 this->syntax().data(), this->syntax().length(),
1413 ::google::protobuf::internal::WireFormat::PARSE,
1414 "google.protobuf.FileDescriptorProto.syntax");
1415 } else {
1416 goto handle_unusual;
1417 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001418 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00001419 break;
1420 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001421
temporal40ee5512008-07-10 02:12:20 +00001422 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001423 handle_unusual:
1424 if (tag == 0 ||
1425 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00001426 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001427 goto success;
temporal40ee5512008-07-10 02:12:20 +00001428 }
1429 DO_(::google::protobuf::internal::WireFormat::SkipField(
1430 input, tag, mutable_unknown_fields()));
1431 break;
1432 }
1433 }
1434 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001435success:
1436 // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001437 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00001438failure:
1439 // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorProto)
1440 return false;
temporal40ee5512008-07-10 02:12:20 +00001441#undef DO_
1442}
1443
kenton@google.comd37d46d2009-04-25 02:53:47 +00001444void FileDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00001445 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001446 // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00001447 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001448 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001449 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001450 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001451 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001452 "google.protobuf.FileDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00001453 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00001454 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00001455 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001456
temporal40ee5512008-07-10 02:12:20 +00001457 // optional string package = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001458 if (has_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001459 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001460 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001461 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001462 "google.protobuf.FileDescriptorProto.package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00001463 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00001464 2, this->package(), output);
temporal40ee5512008-07-10 02:12:20 +00001465 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001466
temporal40ee5512008-07-10 02:12:20 +00001467 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001468 for (int i = 0; i < this->dependency_size(); i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001469 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001470 this->dependency(i).data(), this->dependency(i).length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001471 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001472 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.com80b1d622009-07-29 01:13:20 +00001473 ::google::protobuf::internal::WireFormatLite::WriteString(
1474 3, this->dependency(i), output);
temporal40ee5512008-07-10 02:12:20 +00001475 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001476
temporal40ee5512008-07-10 02:12:20 +00001477 // repeated .google.protobuf.DescriptorProto message_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08001478 for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001479 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001480 4, this->message_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001481 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001482
temporal40ee5512008-07-10 02:12:20 +00001483 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08001484 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001485 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001486 5, this->enum_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00001487 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001488
temporal40ee5512008-07-10 02:12:20 +00001489 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08001490 for (unsigned int i = 0, n = this->service_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001491 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001492 6, this->service(i), output);
temporal40ee5512008-07-10 02:12:20 +00001493 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001494
temporal40ee5512008-07-10 02:12:20 +00001495 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
Feng Xiaof157a562014-11-14 11:50:31 -08001496 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001497 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00001498 7, this->extension(i), output);
temporal40ee5512008-07-10 02:12:20 +00001499 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001500
temporal40ee5512008-07-10 02:12:20 +00001501 // optional .google.protobuf.FileOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001502 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00001503 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001504 8, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00001505 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001506
liujisi@google.com33165fe2010-11-02 13:14:58 +00001507 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1508 if (has_source_code_info()) {
1509 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001510 9, *this->source_code_info_, output);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001511 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001512
1513 // repeated int32 public_dependency = 10;
1514 for (int i = 0; i < this->public_dependency_size(); i++) {
1515 ::google::protobuf::internal::WireFormatLite::WriteInt32(
1516 10, this->public_dependency(i), output);
1517 }
1518
1519 // repeated int32 weak_dependency = 11;
1520 for (int i = 0; i < this->weak_dependency_size(); i++) {
1521 ::google::protobuf::internal::WireFormatLite::WriteInt32(
1522 11, this->weak_dependency(i), output);
1523 }
1524
Feng Xiao6ef984a2014-11-10 17:34:54 -08001525 // optional string syntax = 12;
1526 if (has_syntax()) {
1527 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1528 this->syntax().data(), this->syntax().length(),
1529 ::google::protobuf::internal::WireFormat::SERIALIZE,
1530 "google.protobuf.FileDescriptorProto.syntax");
1531 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1532 12, this->syntax(), output);
1533 }
1534
1535 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001536 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1537 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00001538 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001539 // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001540}
1541
1542::google::protobuf::uint8* FileDescriptorProto::SerializeWithCachedSizesToArray(
1543 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001544 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001545 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001546 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001547 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001548 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001549 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001550 "google.protobuf.FileDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00001551 target =
1552 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1553 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001554 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001555
kenton@google.comd37d46d2009-04-25 02:53:47 +00001556 // optional string package = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001557 if (has_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001558 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001559 this->package().data(), this->package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001560 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001561 "google.protobuf.FileDescriptorProto.package");
kenton@google.com80b1d622009-07-29 01:13:20 +00001562 target =
1563 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1564 2, this->package(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001565 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001566
kenton@google.comd37d46d2009-04-25 02:53:47 +00001567 // repeated string dependency = 3;
1568 for (int i = 0; i < this->dependency_size(); i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00001569 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00001570 this->dependency(i).data(), this->dependency(i).length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00001571 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08001572 "google.protobuf.FileDescriptorProto.dependency");
kenton@google.com80b1d622009-07-29 01:13:20 +00001573 target = ::google::protobuf::internal::WireFormatLite::
1574 WriteStringToArray(3, this->dependency(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001575 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001576
kenton@google.comd37d46d2009-04-25 02:53:47 +00001577 // repeated .google.protobuf.DescriptorProto message_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08001578 for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001579 target = ::google::protobuf::internal::WireFormatLite::
1580 WriteMessageNoVirtualToArray(
1581 4, this->message_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001582 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001583
kenton@google.comd37d46d2009-04-25 02:53:47 +00001584 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08001585 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001586 target = ::google::protobuf::internal::WireFormatLite::
1587 WriteMessageNoVirtualToArray(
1588 5, this->enum_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001589 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001590
kenton@google.comd37d46d2009-04-25 02:53:47 +00001591 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08001592 for (unsigned int i = 0, n = this->service_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001593 target = ::google::protobuf::internal::WireFormatLite::
1594 WriteMessageNoVirtualToArray(
1595 6, this->service(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001596 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001597
kenton@google.comd37d46d2009-04-25 02:53:47 +00001598 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
Feng Xiaof157a562014-11-14 11:50:31 -08001599 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001600 target = ::google::protobuf::internal::WireFormatLite::
1601 WriteMessageNoVirtualToArray(
1602 7, this->extension(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001603 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001604
kenton@google.comd37d46d2009-04-25 02:53:47 +00001605 // optional .google.protobuf.FileOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00001606 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001607 target = ::google::protobuf::internal::WireFormatLite::
1608 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001609 8, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00001610 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001611
liujisi@google.com33165fe2010-11-02 13:14:58 +00001612 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1613 if (has_source_code_info()) {
1614 target = ::google::protobuf::internal::WireFormatLite::
1615 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08001616 9, *this->source_code_info_, target);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001617 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001618
1619 // repeated int32 public_dependency = 10;
1620 for (int i = 0; i < this->public_dependency_size(); i++) {
1621 target = ::google::protobuf::internal::WireFormatLite::
1622 WriteInt32ToArray(10, this->public_dependency(i), target);
1623 }
1624
1625 // repeated int32 weak_dependency = 11;
1626 for (int i = 0; i < this->weak_dependency_size(); i++) {
1627 target = ::google::protobuf::internal::WireFormatLite::
1628 WriteInt32ToArray(11, this->weak_dependency(i), target);
1629 }
1630
Feng Xiao6ef984a2014-11-10 17:34:54 -08001631 // optional string syntax = 12;
1632 if (has_syntax()) {
1633 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1634 this->syntax().data(), this->syntax().length(),
1635 ::google::protobuf::internal::WireFormat::SERIALIZE,
1636 "google.protobuf.FileDescriptorProto.syntax");
1637 target =
1638 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1639 12, this->syntax(), target);
1640 }
1641
1642 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00001643 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1644 unknown_fields(), target);
1645 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00001646 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00001647 return target;
temporal40ee5512008-07-10 02:12:20 +00001648}
1649
1650int FileDescriptorProto::ByteSize() const {
1651 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001652
Austin Schuh307af622015-06-05 22:46:01 -07001653 if (_has_bits_[0 / 32] & 3u) {
temporal40ee5512008-07-10 02:12:20 +00001654 // optional string name = 1;
1655 if (has_name()) {
1656 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001657 ::google::protobuf::internal::WireFormatLite::StringSize(
1658 this->name());
temporal40ee5512008-07-10 02:12:20 +00001659 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001660
temporal40ee5512008-07-10 02:12:20 +00001661 // optional string package = 2;
1662 if (has_package()) {
1663 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001664 ::google::protobuf::internal::WireFormatLite::StringSize(
1665 this->package());
temporal40ee5512008-07-10 02:12:20 +00001666 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001667
1668 }
Austin Schuh307af622015-06-05 22:46:01 -07001669 if (_has_bits_[9 / 32] & 3584u) {
temporal40ee5512008-07-10 02:12:20 +00001670 // optional .google.protobuf.FileOptions options = 8;
1671 if (has_options()) {
1672 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00001673 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08001674 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00001675 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001676
liujisi@google.com33165fe2010-11-02 13:14:58 +00001677 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
1678 if (has_source_code_info()) {
1679 total_size += 1 +
1680 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08001681 *this->source_code_info_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00001682 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001683
Feng Xiao6ef984a2014-11-10 17:34:54 -08001684 // optional string syntax = 12;
1685 if (has_syntax()) {
1686 total_size += 1 +
1687 ::google::protobuf::internal::WireFormatLite::StringSize(
1688 this->syntax());
1689 }
1690
liujisi@google.com33165fe2010-11-02 13:14:58 +00001691 }
temporal40ee5512008-07-10 02:12:20 +00001692 // repeated string dependency = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001693 total_size += 1 * this->dependency_size();
1694 for (int i = 0; i < this->dependency_size(); i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00001695 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
temporal40ee5512008-07-10 02:12:20 +00001696 this->dependency(i));
1697 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001698
1699 // repeated int32 public_dependency = 10;
1700 {
1701 int data_size = 0;
1702 for (int i = 0; i < this->public_dependency_size(); i++) {
1703 data_size += ::google::protobuf::internal::WireFormatLite::
1704 Int32Size(this->public_dependency(i));
1705 }
1706 total_size += 1 * this->public_dependency_size() + data_size;
1707 }
1708
1709 // repeated int32 weak_dependency = 11;
1710 {
1711 int data_size = 0;
1712 for (int i = 0; i < this->weak_dependency_size(); i++) {
1713 data_size += ::google::protobuf::internal::WireFormatLite::
1714 Int32Size(this->weak_dependency(i));
1715 }
1716 total_size += 1 * this->weak_dependency_size() + data_size;
1717 }
1718
temporal40ee5512008-07-10 02:12:20 +00001719 // repeated .google.protobuf.DescriptorProto message_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001720 total_size += 1 * this->message_type_size();
1721 for (int i = 0; i < this->message_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001722 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001723 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001724 this->message_type(i));
1725 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001726
temporal40ee5512008-07-10 02:12:20 +00001727 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001728 total_size += 1 * this->enum_type_size();
1729 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001730 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001731 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001732 this->enum_type(i));
1733 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001734
temporal40ee5512008-07-10 02:12:20 +00001735 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001736 total_size += 1 * this->service_size();
1737 for (int i = 0; i < this->service_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001738 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001739 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001740 this->service(i));
1741 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001742
temporal40ee5512008-07-10 02:12:20 +00001743 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
kenton@google.com2d6daa72009-01-22 01:27:00 +00001744 total_size += 1 * this->extension_size();
1745 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00001746 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00001747 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00001748 this->extension(i));
1749 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001750
Feng Xiao6ef984a2014-11-10 17:34:54 -08001751 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00001752 total_size +=
1753 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1754 unknown_fields());
1755 }
kenton@google.comfccb1462009-12-18 02:11:36 +00001756 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00001757 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00001758 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00001759 return total_size;
1760}
1761
1762void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001763 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07001764 const FileDescriptorProto* source =
1765 ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorProto>(
1766 &from);
temporal40ee5512008-07-10 02:12:20 +00001767 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00001768 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00001769 } else {
1770 MergeFrom(*source);
1771 }
1772}
1773
1774void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08001775 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00001776 dependency_.MergeFrom(from.dependency_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001777 public_dependency_.MergeFrom(from.public_dependency_);
1778 weak_dependency_.MergeFrom(from.weak_dependency_);
temporal40ee5512008-07-10 02:12:20 +00001779 message_type_.MergeFrom(from.message_type_);
1780 enum_type_.MergeFrom(from.enum_type_);
1781 service_.MergeFrom(from.service_);
1782 extension_.MergeFrom(from.extension_);
1783 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001784 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001785 set_has_name();
1786 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00001787 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001788 if (from.has_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001789 set_has_package();
1790 package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.package_);
temporal40ee5512008-07-10 02:12:20 +00001791 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001792 }
1793 if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00001794 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00001795 mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options());
1796 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001797 if (from.has_source_code_info()) {
1798 mutable_source_code_info()->::google::protobuf::SourceCodeInfo::MergeFrom(from.source_code_info());
1799 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001800 if (from.has_syntax()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001801 set_has_syntax();
1802 syntax_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.syntax_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08001803 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00001804 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08001805 if (from._internal_metadata_.have_unknown_fields()) {
1806 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1807 }
temporal40ee5512008-07-10 02:12:20 +00001808}
1809
1810void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
1811 if (&from == this) return;
1812 Clear();
1813 MergeFrom(from);
1814}
1815
1816void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) {
1817 if (&from == this) return;
1818 Clear();
1819 MergeFrom(from);
1820}
1821
1822bool FileDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00001823
jieluo@google.com4de8f552014-07-18 00:47:59 +00001824 if (!::google::protobuf::internal::AllAreInitialized(this->message_type())) return false;
1825 if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false;
1826 if (!::google::protobuf::internal::AllAreInitialized(this->service())) return false;
1827 if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001828 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08001829 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00001830 }
temporal40ee5512008-07-10 02:12:20 +00001831 return true;
1832}
1833
kenton@google.comceb561d2009-06-25 19:05:36 +00001834void FileDescriptorProto::Swap(FileDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08001835 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08001836 InternalSwap(other);
1837}
1838void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) {
1839 name_.Swap(&other->name_);
1840 package_.Swap(&other->package_);
1841 dependency_.UnsafeArenaSwap(&other->dependency_);
1842 public_dependency_.UnsafeArenaSwap(&other->public_dependency_);
1843 weak_dependency_.UnsafeArenaSwap(&other->weak_dependency_);
1844 message_type_.UnsafeArenaSwap(&other->message_type_);
1845 enum_type_.UnsafeArenaSwap(&other->enum_type_);
1846 service_.UnsafeArenaSwap(&other->service_);
1847 extension_.UnsafeArenaSwap(&other->extension_);
1848 std::swap(options_, other->options_);
1849 std::swap(source_code_info_, other->source_code_info_);
1850 syntax_.Swap(&other->syntax_);
1851 std::swap(_has_bits_[0], other->_has_bits_[0]);
1852 _internal_metadata_.Swap(&other->_internal_metadata_);
1853 std::swap(_cached_size_, other->_cached_size_);
1854}
kenton@google.comceb561d2009-06-25 19:05:36 +00001855
kenton@google.com80b1d622009-07-29 01:13:20 +00001856::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const {
1857 protobuf_AssignDescriptorsOnce();
1858 ::google::protobuf::Metadata metadata;
1859 metadata.descriptor = FileDescriptorProto_descriptor_;
1860 metadata.reflection = FileDescriptorProto_reflection_;
1861 return metadata;
temporal40ee5512008-07-10 02:12:20 +00001862}
1863
Jisi Liu885b6122015-02-28 14:51:22 -08001864#if PROTOBUF_INLINE_NOT_IN_HEADERS
1865// FileDescriptorProto
1866
1867// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07001868bool FileDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001869 return (_has_bits_[0] & 0x00000001u) != 0;
1870}
Bo Yang5db21732015-05-21 14:28:59 -07001871void FileDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001872 _has_bits_[0] |= 0x00000001u;
1873}
Bo Yang5db21732015-05-21 14:28:59 -07001874void FileDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001875 _has_bits_[0] &= ~0x00000001u;
1876}
Bo Yang5db21732015-05-21 14:28:59 -07001877void FileDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08001878 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1879 clear_has_name();
1880}
1881 const ::std::string& FileDescriptorProto::name() const {
1882 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name)
1883 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1884}
1885 void FileDescriptorProto::set_name(const ::std::string& value) {
1886 set_has_name();
1887 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1888 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name)
1889}
1890 void FileDescriptorProto::set_name(const char* value) {
1891 set_has_name();
1892 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1893 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name)
1894}
1895 void FileDescriptorProto::set_name(const char* value, size_t size) {
1896 set_has_name();
1897 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1898 ::std::string(reinterpret_cast<const char*>(value), size));
1899 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name)
1900}
1901 ::std::string* FileDescriptorProto::mutable_name() {
1902 set_has_name();
1903 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name)
1904 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1905}
1906 ::std::string* FileDescriptorProto::release_name() {
1907 clear_has_name();
1908 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1909}
1910 void FileDescriptorProto::set_allocated_name(::std::string* name) {
1911 if (name != NULL) {
1912 set_has_name();
1913 } else {
1914 clear_has_name();
1915 }
1916 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
1917 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name)
1918}
1919
1920// optional string package = 2;
Bo Yang5db21732015-05-21 14:28:59 -07001921bool FileDescriptorProto::has_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001922 return (_has_bits_[0] & 0x00000002u) != 0;
1923}
Bo Yang5db21732015-05-21 14:28:59 -07001924void FileDescriptorProto::set_has_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001925 _has_bits_[0] |= 0x00000002u;
1926}
Bo Yang5db21732015-05-21 14:28:59 -07001927void FileDescriptorProto::clear_has_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001928 _has_bits_[0] &= ~0x00000002u;
1929}
Bo Yang5db21732015-05-21 14:28:59 -07001930void FileDescriptorProto::clear_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08001931 package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1932 clear_has_package();
1933}
1934 const ::std::string& FileDescriptorProto::package() const {
1935 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package)
1936 return package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1937}
1938 void FileDescriptorProto::set_package(const ::std::string& value) {
1939 set_has_package();
1940 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1941 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package)
1942}
1943 void FileDescriptorProto::set_package(const char* value) {
1944 set_has_package();
1945 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1946 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package)
1947}
1948 void FileDescriptorProto::set_package(const char* value, size_t size) {
1949 set_has_package();
1950 package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1951 ::std::string(reinterpret_cast<const char*>(value), size));
1952 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package)
1953}
1954 ::std::string* FileDescriptorProto::mutable_package() {
1955 set_has_package();
1956 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package)
1957 return package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1958}
1959 ::std::string* FileDescriptorProto::release_package() {
1960 clear_has_package();
1961 return package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1962}
1963 void FileDescriptorProto::set_allocated_package(::std::string* package) {
1964 if (package != NULL) {
1965 set_has_package();
1966 } else {
1967 clear_has_package();
1968 }
1969 package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), package);
1970 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package)
1971}
1972
1973// repeated string dependency = 3;
Bo Yang5db21732015-05-21 14:28:59 -07001974int FileDescriptorProto::dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08001975 return dependency_.size();
1976}
Bo Yang5db21732015-05-21 14:28:59 -07001977void FileDescriptorProto::clear_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08001978 dependency_.Clear();
1979}
1980 const ::std::string& FileDescriptorProto::dependency(int index) const {
1981 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency)
1982 return dependency_.Get(index);
1983}
1984 ::std::string* FileDescriptorProto::mutable_dependency(int index) {
1985 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency)
1986 return dependency_.Mutable(index);
1987}
1988 void FileDescriptorProto::set_dependency(int index, const ::std::string& value) {
1989 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency)
1990 dependency_.Mutable(index)->assign(value);
1991}
1992 void FileDescriptorProto::set_dependency(int index, const char* value) {
1993 dependency_.Mutable(index)->assign(value);
1994 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency)
1995}
1996 void FileDescriptorProto::set_dependency(int index, const char* value, size_t size) {
1997 dependency_.Mutable(index)->assign(
1998 reinterpret_cast<const char*>(value), size);
1999 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency)
2000}
2001 ::std::string* FileDescriptorProto::add_dependency() {
2002 return dependency_.Add();
2003}
2004 void FileDescriptorProto::add_dependency(const ::std::string& value) {
2005 dependency_.Add()->assign(value);
2006 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency)
2007}
2008 void FileDescriptorProto::add_dependency(const char* value) {
2009 dependency_.Add()->assign(value);
2010 // @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency)
2011}
2012 void FileDescriptorProto::add_dependency(const char* value, size_t size) {
2013 dependency_.Add()->assign(reinterpret_cast<const char*>(value), size);
2014 // @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency)
2015}
2016 const ::google::protobuf::RepeatedPtrField< ::std::string>&
2017FileDescriptorProto::dependency() const {
2018 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency)
2019 return dependency_;
2020}
2021 ::google::protobuf::RepeatedPtrField< ::std::string>*
2022FileDescriptorProto::mutable_dependency() {
2023 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency)
2024 return &dependency_;
2025}
2026
2027// repeated int32 public_dependency = 10;
Bo Yang5db21732015-05-21 14:28:59 -07002028int FileDescriptorProto::public_dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002029 return public_dependency_.size();
2030}
Bo Yang5db21732015-05-21 14:28:59 -07002031void FileDescriptorProto::clear_public_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08002032 public_dependency_.Clear();
2033}
2034 ::google::protobuf::int32 FileDescriptorProto::public_dependency(int index) const {
2035 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency)
2036 return public_dependency_.Get(index);
2037}
2038 void FileDescriptorProto::set_public_dependency(int index, ::google::protobuf::int32 value) {
2039 public_dependency_.Set(index, value);
2040 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency)
2041}
2042 void FileDescriptorProto::add_public_dependency(::google::protobuf::int32 value) {
2043 public_dependency_.Add(value);
2044 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency)
2045}
2046 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
2047FileDescriptorProto::public_dependency() const {
2048 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency)
2049 return public_dependency_;
2050}
2051 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
2052FileDescriptorProto::mutable_public_dependency() {
2053 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency)
2054 return &public_dependency_;
2055}
2056
2057// repeated int32 weak_dependency = 11;
Bo Yang5db21732015-05-21 14:28:59 -07002058int FileDescriptorProto::weak_dependency_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002059 return weak_dependency_.size();
2060}
Bo Yang5db21732015-05-21 14:28:59 -07002061void FileDescriptorProto::clear_weak_dependency() {
Jisi Liu885b6122015-02-28 14:51:22 -08002062 weak_dependency_.Clear();
2063}
2064 ::google::protobuf::int32 FileDescriptorProto::weak_dependency(int index) const {
2065 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency)
2066 return weak_dependency_.Get(index);
2067}
2068 void FileDescriptorProto::set_weak_dependency(int index, ::google::protobuf::int32 value) {
2069 weak_dependency_.Set(index, value);
2070 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency)
2071}
2072 void FileDescriptorProto::add_weak_dependency(::google::protobuf::int32 value) {
2073 weak_dependency_.Add(value);
2074 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency)
2075}
2076 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
2077FileDescriptorProto::weak_dependency() const {
2078 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency)
2079 return weak_dependency_;
2080}
2081 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
2082FileDescriptorProto::mutable_weak_dependency() {
2083 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency)
2084 return &weak_dependency_;
2085}
2086
2087// repeated .google.protobuf.DescriptorProto message_type = 4;
Bo Yang5db21732015-05-21 14:28:59 -07002088int FileDescriptorProto::message_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002089 return message_type_.size();
2090}
Bo Yang5db21732015-05-21 14:28:59 -07002091void FileDescriptorProto::clear_message_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002092 message_type_.Clear();
2093}
2094 const ::google::protobuf::DescriptorProto& FileDescriptorProto::message_type(int index) const {
2095 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.message_type)
2096 return message_type_.Get(index);
2097}
2098 ::google::protobuf::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) {
2099 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.message_type)
2100 return message_type_.Mutable(index);
2101}
2102 ::google::protobuf::DescriptorProto* FileDescriptorProto::add_message_type() {
2103 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.message_type)
2104 return message_type_.Add();
2105}
2106 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
2107FileDescriptorProto::message_type() const {
2108 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type)
2109 return message_type_;
2110}
2111 ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
2112FileDescriptorProto::mutable_message_type() {
2113 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type)
2114 return &message_type_;
2115}
2116
2117// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
Bo Yang5db21732015-05-21 14:28:59 -07002118int FileDescriptorProto::enum_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002119 return enum_type_.size();
2120}
Bo Yang5db21732015-05-21 14:28:59 -07002121void FileDescriptorProto::clear_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08002122 enum_type_.Clear();
2123}
2124 const ::google::protobuf::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const {
2125 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.enum_type)
2126 return enum_type_.Get(index);
2127}
2128 ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) {
2129 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.enum_type)
2130 return enum_type_.Mutable(index);
2131}
2132 ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::add_enum_type() {
2133 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.enum_type)
2134 return enum_type_.Add();
2135}
2136 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
2137FileDescriptorProto::enum_type() const {
2138 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type)
2139 return enum_type_;
2140}
2141 ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
2142FileDescriptorProto::mutable_enum_type() {
2143 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type)
2144 return &enum_type_;
2145}
2146
2147// repeated .google.protobuf.ServiceDescriptorProto service = 6;
Bo Yang5db21732015-05-21 14:28:59 -07002148int FileDescriptorProto::service_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002149 return service_.size();
2150}
Bo Yang5db21732015-05-21 14:28:59 -07002151void FileDescriptorProto::clear_service() {
Jisi Liu885b6122015-02-28 14:51:22 -08002152 service_.Clear();
2153}
2154 const ::google::protobuf::ServiceDescriptorProto& FileDescriptorProto::service(int index) const {
2155 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service)
2156 return service_.Get(index);
2157}
2158 ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) {
2159 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.service)
2160 return service_.Mutable(index);
2161}
2162 ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::add_service() {
2163 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service)
2164 return service_.Add();
2165}
2166 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >&
2167FileDescriptorProto::service() const {
2168 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service)
2169 return service_;
2170}
2171 ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >*
2172FileDescriptorProto::mutable_service() {
2173 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service)
2174 return &service_;
2175}
2176
2177// repeated .google.protobuf.FieldDescriptorProto extension = 7;
Bo Yang5db21732015-05-21 14:28:59 -07002178int FileDescriptorProto::extension_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002179 return extension_.size();
2180}
Bo Yang5db21732015-05-21 14:28:59 -07002181void FileDescriptorProto::clear_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08002182 extension_.Clear();
2183}
2184 const ::google::protobuf::FieldDescriptorProto& FileDescriptorProto::extension(int index) const {
2185 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension)
2186 return extension_.Get(index);
2187}
2188 ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) {
2189 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.extension)
2190 return extension_.Mutable(index);
2191}
2192 ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::add_extension() {
2193 // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension)
2194 return extension_.Add();
2195}
2196 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
2197FileDescriptorProto::extension() const {
2198 // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension)
2199 return extension_;
2200}
2201 ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
2202FileDescriptorProto::mutable_extension() {
2203 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension)
2204 return &extension_;
2205}
2206
2207// optional .google.protobuf.FileOptions options = 8;
Bo Yang5db21732015-05-21 14:28:59 -07002208bool FileDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002209 return (_has_bits_[0] & 0x00000200u) != 0;
2210}
Bo Yang5db21732015-05-21 14:28:59 -07002211void FileDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002212 _has_bits_[0] |= 0x00000200u;
2213}
Bo Yang5db21732015-05-21 14:28:59 -07002214void FileDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002215 _has_bits_[0] &= ~0x00000200u;
2216}
Bo Yang5db21732015-05-21 14:28:59 -07002217void FileDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08002218 if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear();
2219 clear_has_options();
2220}
2221 const ::google::protobuf::FileOptions& FileDescriptorProto::options() const {
2222 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options)
2223 return options_ != NULL ? *options_ : *default_instance_->options_;
2224}
2225 ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() {
2226 set_has_options();
2227 if (options_ == NULL) {
2228 options_ = new ::google::protobuf::FileOptions;
2229 }
2230 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options)
2231 return options_;
2232}
2233 ::google::protobuf::FileOptions* FileDescriptorProto::release_options() {
2234 clear_has_options();
2235 ::google::protobuf::FileOptions* temp = options_;
2236 options_ = NULL;
2237 return temp;
2238}
2239 void FileDescriptorProto::set_allocated_options(::google::protobuf::FileOptions* options) {
2240 delete options_;
2241 options_ = options;
2242 if (options) {
2243 set_has_options();
2244 } else {
2245 clear_has_options();
2246 }
2247 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.options)
2248}
2249
2250// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
Bo Yang5db21732015-05-21 14:28:59 -07002251bool FileDescriptorProto::has_source_code_info() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002252 return (_has_bits_[0] & 0x00000400u) != 0;
2253}
Bo Yang5db21732015-05-21 14:28:59 -07002254void FileDescriptorProto::set_has_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002255 _has_bits_[0] |= 0x00000400u;
2256}
Bo Yang5db21732015-05-21 14:28:59 -07002257void FileDescriptorProto::clear_has_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002258 _has_bits_[0] &= ~0x00000400u;
2259}
Bo Yang5db21732015-05-21 14:28:59 -07002260void FileDescriptorProto::clear_source_code_info() {
Jisi Liu885b6122015-02-28 14:51:22 -08002261 if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear();
2262 clear_has_source_code_info();
2263}
2264 const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const {
2265 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info)
2266 return source_code_info_ != NULL ? *source_code_info_ : *default_instance_->source_code_info_;
2267}
2268 ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() {
2269 set_has_source_code_info();
2270 if (source_code_info_ == NULL) {
2271 source_code_info_ = new ::google::protobuf::SourceCodeInfo;
2272 }
2273 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info)
2274 return source_code_info_;
2275}
2276 ::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() {
2277 clear_has_source_code_info();
2278 ::google::protobuf::SourceCodeInfo* temp = source_code_info_;
2279 source_code_info_ = NULL;
2280 return temp;
2281}
2282 void FileDescriptorProto::set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info) {
2283 delete source_code_info_;
2284 source_code_info_ = source_code_info;
2285 if (source_code_info) {
2286 set_has_source_code_info();
2287 } else {
2288 clear_has_source_code_info();
2289 }
2290 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info)
2291}
2292
2293// optional string syntax = 12;
Bo Yang5db21732015-05-21 14:28:59 -07002294bool FileDescriptorProto::has_syntax() const {
Jisi Liu885b6122015-02-28 14:51:22 -08002295 return (_has_bits_[0] & 0x00000800u) != 0;
2296}
Bo Yang5db21732015-05-21 14:28:59 -07002297void FileDescriptorProto::set_has_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002298 _has_bits_[0] |= 0x00000800u;
2299}
Bo Yang5db21732015-05-21 14:28:59 -07002300void FileDescriptorProto::clear_has_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002301 _has_bits_[0] &= ~0x00000800u;
2302}
Bo Yang5db21732015-05-21 14:28:59 -07002303void FileDescriptorProto::clear_syntax() {
Jisi Liu885b6122015-02-28 14:51:22 -08002304 syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2305 clear_has_syntax();
2306}
2307 const ::std::string& FileDescriptorProto::syntax() const {
2308 // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax)
2309 return syntax_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2310}
2311 void FileDescriptorProto::set_syntax(const ::std::string& value) {
2312 set_has_syntax();
2313 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
2314 // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax)
2315}
2316 void FileDescriptorProto::set_syntax(const char* value) {
2317 set_has_syntax();
2318 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
2319 // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax)
2320}
2321 void FileDescriptorProto::set_syntax(const char* value, size_t size) {
2322 set_has_syntax();
2323 syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2324 ::std::string(reinterpret_cast<const char*>(value), size));
2325 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax)
2326}
2327 ::std::string* FileDescriptorProto::mutable_syntax() {
2328 set_has_syntax();
2329 // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax)
2330 return syntax_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2331}
2332 ::std::string* FileDescriptorProto::release_syntax() {
2333 clear_has_syntax();
2334 return syntax_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2335}
2336 void FileDescriptorProto::set_allocated_syntax(::std::string* syntax) {
2337 if (syntax != NULL) {
2338 set_has_syntax();
2339 } else {
2340 clear_has_syntax();
2341 }
2342 syntax_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), syntax);
2343 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax)
2344}
2345
2346#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00002347
2348// ===================================================================
2349
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002350#ifndef _MSC_VER
2351const int DescriptorProto_ExtensionRange::kStartFieldNumber;
2352const int DescriptorProto_ExtensionRange::kEndFieldNumber;
2353#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00002354
kenton@google.com573989f2009-10-30 22:02:17 +00002355DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange()
Bo Yang5db21732015-05-21 14:28:59 -07002356 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002357 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00002358 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002359}
2360
kenton@google.com80b1d622009-07-29 01:13:20 +00002361void DescriptorProto_ExtensionRange::InitAsDefaultInstance() {
2362}
kenton@google.com24bf56f2008-09-24 20:31:01 +00002363
kenton@google.com573989f2009-10-30 22:02:17 +00002364DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08002365 : ::google::protobuf::Message(),
2366 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002367 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00002368 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00002369 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002370}
2371
kenton@google.comd37d46d2009-04-25 02:53:47 +00002372void DescriptorProto_ExtensionRange::SharedCtor() {
2373 _cached_size_ = 0;
2374 start_ = 0;
2375 end_ = 0;
2376 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2377}
2378
temporal40ee5512008-07-10 02:12:20 +00002379DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002380 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002381 SharedDtor();
2382}
2383
2384void DescriptorProto_ExtensionRange::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00002385 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002386 }
2387}
2388
kenton@google.comfccb1462009-12-18 02:11:36 +00002389void DescriptorProto_ExtensionRange::SetCachedSize(int size) const {
2390 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2391 _cached_size_ = size;
2392 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2393}
temporal40ee5512008-07-10 02:12:20 +00002394const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002395 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00002396 return DescriptorProto_ExtensionRange_descriptor_;
2397}
2398
kenton@google.com24bf56f2008-09-24 20:31:01 +00002399const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00002400 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
2401 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00002402}
2403
2404DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL;
2405
Feng Xiao6ef984a2014-11-10 17:34:54 -08002406DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08002407 DescriptorProto_ExtensionRange* n = new DescriptorProto_ExtensionRange;
2408 if (arena != NULL) {
2409 arena->Own(n);
2410 }
2411 return n;
temporal40ee5512008-07-10 02:12:20 +00002412}
2413
2414void DescriptorProto_ExtensionRange::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -08002415#define ZR_HELPER_(f) reinterpret_cast<char*>(\
2416 &reinterpret_cast<DescriptorProto_ExtensionRange*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00002417
Jisi Liu885b6122015-02-28 14:51:22 -08002418#define ZR_(first, last) do {\
2419 ::memset(&first, 0,\
2420 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
2421} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00002422
2423 ZR_(start_, end_);
2424
Jisi Liu885b6122015-02-28 14:51:22 -08002425#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00002426#undef ZR_
2427
temporal40ee5512008-07-10 02:12:20 +00002428 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08002429 if (_internal_metadata_.have_unknown_fields()) {
2430 mutable_unknown_fields()->Clear();
2431 }
temporal40ee5512008-07-10 02:12:20 +00002432}
2433
2434bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream(
2435 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002436#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00002437 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002438 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ExtensionRange)
2439 for (;;) {
2440 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2441 tag = p.first;
2442 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00002443 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00002444 // optional int32 start = 1;
2445 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002446 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002447 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2448 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2449 input, &start_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00002450 set_has_start();
kenton@google.comfccb1462009-12-18 02:11:36 +00002451 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002452 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00002453 }
temporal40ee5512008-07-10 02:12:20 +00002454 if (input->ExpectTag(16)) goto parse_end;
2455 break;
2456 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002457
temporal40ee5512008-07-10 02:12:20 +00002458 // optional int32 end = 2;
2459 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002460 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00002461 parse_end:
2462 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2463 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2464 input, &end_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00002465 set_has_end();
kenton@google.comfccb1462009-12-18 02:11:36 +00002466 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002467 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00002468 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002469 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00002470 break;
2471 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002472
temporal40ee5512008-07-10 02:12:20 +00002473 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002474 handle_unusual:
2475 if (tag == 0 ||
2476 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00002477 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002478 goto success;
temporal40ee5512008-07-10 02:12:20 +00002479 }
2480 DO_(::google::protobuf::internal::WireFormat::SkipField(
2481 input, tag, mutable_unknown_fields()));
2482 break;
2483 }
2484 }
2485 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002486success:
2487 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002488 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002489failure:
2490 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ExtensionRange)
2491 return false;
temporal40ee5512008-07-10 02:12:20 +00002492#undef DO_
2493}
2494
kenton@google.comd37d46d2009-04-25 02:53:47 +00002495void DescriptorProto_ExtensionRange::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00002496 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002497 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ExtensionRange)
temporal40ee5512008-07-10 02:12:20 +00002498 // optional int32 start = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002499 if (has_start()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002500 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output);
temporal40ee5512008-07-10 02:12:20 +00002501 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002502
temporal40ee5512008-07-10 02:12:20 +00002503 // optional int32 end = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002504 if (has_end()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002505 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output);
temporal40ee5512008-07-10 02:12:20 +00002506 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002507
Feng Xiao6ef984a2014-11-10 17:34:54 -08002508 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002509 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2510 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00002511 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002512 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002513}
2514
2515::google::protobuf::uint8* DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray(
2516 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002517 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002518 // optional int32 start = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002519 if (has_start()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002520 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002521 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002522
kenton@google.comd37d46d2009-04-25 02:53:47 +00002523 // optional int32 end = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00002524 if (has_end()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00002525 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00002526 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002527
Feng Xiao6ef984a2014-11-10 17:34:54 -08002528 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002529 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2530 unknown_fields(), target);
2531 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00002532 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002533 return target;
temporal40ee5512008-07-10 02:12:20 +00002534}
2535
2536int DescriptorProto_ExtensionRange::ByteSize() const {
2537 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002538
Austin Schuh307af622015-06-05 22:46:01 -07002539 if (_has_bits_[0 / 32] & 3u) {
temporal40ee5512008-07-10 02:12:20 +00002540 // optional int32 start = 1;
2541 if (has_start()) {
2542 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002543 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00002544 this->start());
2545 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002546
temporal40ee5512008-07-10 02:12:20 +00002547 // optional int32 end = 2;
2548 if (has_end()) {
2549 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00002550 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00002551 this->end());
2552 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002553
temporal40ee5512008-07-10 02:12:20 +00002554 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08002555 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00002556 total_size +=
2557 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2558 unknown_fields());
2559 }
kenton@google.comfccb1462009-12-18 02:11:36 +00002560 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00002561 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00002562 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00002563 return total_size;
2564}
2565
2566void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08002567 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07002568 const DescriptorProto_ExtensionRange* source =
2569 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ExtensionRange>(
2570 &from);
temporal40ee5512008-07-10 02:12:20 +00002571 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00002572 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00002573 } else {
2574 MergeFrom(*source);
2575 }
2576}
2577
2578void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08002579 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00002580 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002581 if (from.has_start()) {
temporal40ee5512008-07-10 02:12:20 +00002582 set_start(from.start());
2583 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002584 if (from.has_end()) {
temporal40ee5512008-07-10 02:12:20 +00002585 set_end(from.end());
2586 }
2587 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08002588 if (from._internal_metadata_.have_unknown_fields()) {
2589 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2590 }
temporal40ee5512008-07-10 02:12:20 +00002591}
2592
2593void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) {
2594 if (&from == this) return;
2595 Clear();
2596 MergeFrom(from);
2597}
2598
2599void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) {
2600 if (&from == this) return;
2601 Clear();
2602 MergeFrom(from);
2603}
2604
kenton@google.comceb561d2009-06-25 19:05:36 +00002605bool DescriptorProto_ExtensionRange::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00002606
kenton@google.comceb561d2009-06-25 19:05:36 +00002607 return true;
2608}
2609
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002610void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08002611 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08002612 InternalSwap(other);
2613}
2614void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) {
2615 std::swap(start_, other->start_);
2616 std::swap(end_, other->end_);
2617 std::swap(_has_bits_[0], other->_has_bits_[0]);
2618 _internal_metadata_.Swap(&other->_internal_metadata_);
2619 std::swap(_cached_size_, other->_cached_size_);
2620}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00002621
kenton@google.com80b1d622009-07-29 01:13:20 +00002622::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const {
2623 protobuf_AssignDescriptorsOnce();
2624 ::google::protobuf::Metadata metadata;
2625 metadata.descriptor = DescriptorProto_ExtensionRange_descriptor_;
2626 metadata.reflection = DescriptorProto_ExtensionRange_reflection_;
2627 return metadata;
temporal40ee5512008-07-10 02:12:20 +00002628}
2629
temporal40ee5512008-07-10 02:12:20 +00002630
2631// -------------------------------------------------------------------
2632
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002633#ifndef _MSC_VER
Bo Yang5db21732015-05-21 14:28:59 -07002634const int DescriptorProto_ReservedRange::kStartFieldNumber;
2635const int DescriptorProto_ReservedRange::kEndFieldNumber;
2636#endif // !_MSC_VER
2637
2638DescriptorProto_ReservedRange::DescriptorProto_ReservedRange()
2639 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
2640 SharedCtor();
2641 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ReservedRange)
2642}
2643
2644void DescriptorProto_ReservedRange::InitAsDefaultInstance() {
2645}
2646
2647DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from)
2648 : ::google::protobuf::Message(),
2649 _internal_metadata_(NULL) {
2650 SharedCtor();
2651 MergeFrom(from);
2652 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange)
2653}
2654
2655void DescriptorProto_ReservedRange::SharedCtor() {
2656 _cached_size_ = 0;
2657 start_ = 0;
2658 end_ = 0;
2659 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2660}
2661
2662DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() {
2663 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ReservedRange)
2664 SharedDtor();
2665}
2666
2667void DescriptorProto_ReservedRange::SharedDtor() {
2668 if (this != default_instance_) {
2669 }
2670}
2671
2672void DescriptorProto_ReservedRange::SetCachedSize(int size) const {
2673 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2674 _cached_size_ = size;
2675 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2676}
2677const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange::descriptor() {
2678 protobuf_AssignDescriptorsOnce();
2679 return DescriptorProto_ReservedRange_descriptor_;
2680}
2681
2682const DescriptorProto_ReservedRange& DescriptorProto_ReservedRange::default_instance() {
2683 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
2684 return *default_instance_;
2685}
2686
2687DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::default_instance_ = NULL;
2688
2689DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::New(::google::protobuf::Arena* arena) const {
2690 DescriptorProto_ReservedRange* n = new DescriptorProto_ReservedRange;
2691 if (arena != NULL) {
2692 arena->Own(n);
2693 }
2694 return n;
2695}
2696
2697void DescriptorProto_ReservedRange::Clear() {
2698#define ZR_HELPER_(f) reinterpret_cast<char*>(\
2699 &reinterpret_cast<DescriptorProto_ReservedRange*>(16)->f)
2700
2701#define ZR_(first, last) do {\
2702 ::memset(&first, 0,\
2703 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
2704} while (0)
2705
2706 ZR_(start_, end_);
2707
2708#undef ZR_HELPER_
2709#undef ZR_
2710
2711 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2712 if (_internal_metadata_.have_unknown_fields()) {
2713 mutable_unknown_fields()->Clear();
2714 }
2715}
2716
2717bool DescriptorProto_ReservedRange::MergePartialFromCodedStream(
2718 ::google::protobuf::io::CodedInputStream* input) {
2719#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
2720 ::google::protobuf::uint32 tag;
2721 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ReservedRange)
2722 for (;;) {
2723 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2724 tag = p.first;
2725 if (!p.second) goto handle_unusual;
2726 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2727 // optional int32 start = 1;
2728 case 1: {
2729 if (tag == 8) {
2730 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2731 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2732 input, &start_)));
2733 set_has_start();
2734 } else {
2735 goto handle_unusual;
2736 }
2737 if (input->ExpectTag(16)) goto parse_end;
2738 break;
2739 }
2740
2741 // optional int32 end = 2;
2742 case 2: {
2743 if (tag == 16) {
2744 parse_end:
2745 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2746 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
2747 input, &end_)));
2748 set_has_end();
2749 } else {
2750 goto handle_unusual;
2751 }
2752 if (input->ExpectAtEnd()) goto success;
2753 break;
2754 }
2755
2756 default: {
2757 handle_unusual:
2758 if (tag == 0 ||
2759 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2760 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2761 goto success;
2762 }
2763 DO_(::google::protobuf::internal::WireFormat::SkipField(
2764 input, tag, mutable_unknown_fields()));
2765 break;
2766 }
2767 }
2768 }
2769success:
2770 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ReservedRange)
2771 return true;
2772failure:
2773 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ReservedRange)
2774 return false;
2775#undef DO_
2776}
2777
2778void DescriptorProto_ReservedRange::SerializeWithCachedSizes(
2779 ::google::protobuf::io::CodedOutputStream* output) const {
2780 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ReservedRange)
2781 // optional int32 start = 1;
2782 if (has_start()) {
2783 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output);
2784 }
2785
2786 // optional int32 end = 2;
2787 if (has_end()) {
2788 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output);
2789 }
2790
2791 if (_internal_metadata_.have_unknown_fields()) {
2792 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2793 unknown_fields(), output);
2794 }
2795 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange)
2796}
2797
2798::google::protobuf::uint8* DescriptorProto_ReservedRange::SerializeWithCachedSizesToArray(
2799 ::google::protobuf::uint8* target) const {
2800 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange)
2801 // optional int32 start = 1;
2802 if (has_start()) {
2803 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target);
2804 }
2805
2806 // optional int32 end = 2;
2807 if (has_end()) {
2808 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target);
2809 }
2810
2811 if (_internal_metadata_.have_unknown_fields()) {
2812 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2813 unknown_fields(), target);
2814 }
2815 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange)
2816 return target;
2817}
2818
2819int DescriptorProto_ReservedRange::ByteSize() const {
2820 int total_size = 0;
2821
Austin Schuh307af622015-06-05 22:46:01 -07002822 if (_has_bits_[0 / 32] & 3u) {
Bo Yang5db21732015-05-21 14:28:59 -07002823 // optional int32 start = 1;
2824 if (has_start()) {
2825 total_size += 1 +
2826 ::google::protobuf::internal::WireFormatLite::Int32Size(
2827 this->start());
2828 }
2829
2830 // optional int32 end = 2;
2831 if (has_end()) {
2832 total_size += 1 +
2833 ::google::protobuf::internal::WireFormatLite::Int32Size(
2834 this->end());
2835 }
2836
2837 }
2838 if (_internal_metadata_.have_unknown_fields()) {
2839 total_size +=
2840 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2841 unknown_fields());
2842 }
2843 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2844 _cached_size_ = total_size;
2845 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2846 return total_size;
2847}
2848
2849void DescriptorProto_ReservedRange::MergeFrom(const ::google::protobuf::Message& from) {
2850 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2851 const DescriptorProto_ReservedRange* source =
2852 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ReservedRange>(
2853 &from);
2854 if (source == NULL) {
2855 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2856 } else {
2857 MergeFrom(*source);
2858 }
2859}
2860
2861void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) {
2862 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
2863 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2864 if (from.has_start()) {
2865 set_start(from.start());
2866 }
2867 if (from.has_end()) {
2868 set_end(from.end());
2869 }
2870 }
2871 if (from._internal_metadata_.have_unknown_fields()) {
2872 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2873 }
2874}
2875
2876void DescriptorProto_ReservedRange::CopyFrom(const ::google::protobuf::Message& from) {
2877 if (&from == this) return;
2878 Clear();
2879 MergeFrom(from);
2880}
2881
2882void DescriptorProto_ReservedRange::CopyFrom(const DescriptorProto_ReservedRange& from) {
2883 if (&from == this) return;
2884 Clear();
2885 MergeFrom(from);
2886}
2887
2888bool DescriptorProto_ReservedRange::IsInitialized() const {
2889
2890 return true;
2891}
2892
2893void DescriptorProto_ReservedRange::Swap(DescriptorProto_ReservedRange* other) {
2894 if (other == this) return;
2895 InternalSwap(other);
2896}
2897void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) {
2898 std::swap(start_, other->start_);
2899 std::swap(end_, other->end_);
2900 std::swap(_has_bits_[0], other->_has_bits_[0]);
2901 _internal_metadata_.Swap(&other->_internal_metadata_);
2902 std::swap(_cached_size_, other->_cached_size_);
2903}
2904
2905::google::protobuf::Metadata DescriptorProto_ReservedRange::GetMetadata() const {
2906 protobuf_AssignDescriptorsOnce();
2907 ::google::protobuf::Metadata metadata;
2908 metadata.descriptor = DescriptorProto_ReservedRange_descriptor_;
2909 metadata.reflection = DescriptorProto_ReservedRange_reflection_;
2910 return metadata;
2911}
2912
2913
2914// -------------------------------------------------------------------
2915
2916#ifndef _MSC_VER
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002917const int DescriptorProto::kNameFieldNumber;
2918const int DescriptorProto::kFieldFieldNumber;
2919const int DescriptorProto::kExtensionFieldNumber;
2920const int DescriptorProto::kNestedTypeFieldNumber;
2921const int DescriptorProto::kEnumTypeFieldNumber;
2922const int DescriptorProto::kExtensionRangeFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00002923const int DescriptorProto::kOneofDeclFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002924const int DescriptorProto::kOptionsFieldNumber;
Bo Yang5db21732015-05-21 14:28:59 -07002925const int DescriptorProto::kReservedRangeFieldNumber;
2926const int DescriptorProto::kReservedNameFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00002927#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00002928
kenton@google.com573989f2009-10-30 22:02:17 +00002929DescriptorProto::DescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07002930 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002931 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00002932 // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00002933}
2934
kenton@google.com80b1d622009-07-29 01:13:20 +00002935void DescriptorProto::InitAsDefaultInstance() {
2936 options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00002937}
2938
kenton@google.com573989f2009-10-30 22:02:17 +00002939DescriptorProto::DescriptorProto(const DescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08002940 : ::google::protobuf::Message(),
2941 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002942 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00002943 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00002944 // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00002945}
2946
kenton@google.comd37d46d2009-04-25 02:53:47 +00002947void DescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002948 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00002949 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08002950 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00002951 options_ = NULL;
2952 ::memset(_has_bits_, 0, sizeof(_has_bits_));
2953}
2954
temporal40ee5512008-07-10 02:12:20 +00002955DescriptorProto::~DescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00002956 // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00002957 SharedDtor();
2958}
2959
2960void DescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08002961 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00002962 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00002963 delete options_;
2964 }
2965}
2966
kenton@google.comfccb1462009-12-18 02:11:36 +00002967void DescriptorProto::SetCachedSize(int size) const {
2968 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2969 _cached_size_ = size;
2970 GOOGLE_SAFE_CONCURRENT_WRITES_END();
2971}
temporal40ee5512008-07-10 02:12:20 +00002972const ::google::protobuf::Descriptor* DescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00002973 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00002974 return DescriptorProto_descriptor_;
2975}
2976
kenton@google.com24bf56f2008-09-24 20:31:01 +00002977const DescriptorProto& DescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00002978 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
2979 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00002980}
2981
2982DescriptorProto* DescriptorProto::default_instance_ = NULL;
2983
Feng Xiao6ef984a2014-11-10 17:34:54 -08002984DescriptorProto* DescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08002985 DescriptorProto* n = new DescriptorProto;
2986 if (arena != NULL) {
2987 arena->Own(n);
2988 }
2989 return n;
temporal40ee5512008-07-10 02:12:20 +00002990}
2991
2992void DescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07002993 if (_has_bits_[0 / 32] & 129u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00002994 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08002995 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00002996 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00002997 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00002998 if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
2999 }
3000 }
3001 field_.Clear();
3002 extension_.Clear();
3003 nested_type_.Clear();
3004 enum_type_.Clear();
3005 extension_range_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +00003006 oneof_decl_.Clear();
Bo Yang5db21732015-05-21 14:28:59 -07003007 reserved_range_.Clear();
3008 reserved_name_.Clear();
temporal40ee5512008-07-10 02:12:20 +00003009 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08003010 if (_internal_metadata_.have_unknown_fields()) {
3011 mutable_unknown_fields()->Clear();
3012 }
temporal40ee5512008-07-10 02:12:20 +00003013}
3014
3015bool DescriptorProto::MergePartialFromCodedStream(
3016 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003017#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00003018 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003019 // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto)
3020 for (;;) {
3021 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
3022 tag = p.first;
3023 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00003024 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00003025 // optional string name = 1;
3026 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003027 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003028 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3029 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00003030 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00003031 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003032 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003033 "google.protobuf.DescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00003034 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003035 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003036 }
temporal40ee5512008-07-10 02:12:20 +00003037 if (input->ExpectTag(18)) goto parse_field;
3038 break;
3039 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003040
temporal40ee5512008-07-10 02:12:20 +00003041 // repeated .google.protobuf.FieldDescriptorProto field = 2;
3042 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003043 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003044 parse_field:
Bo Yang5db21732015-05-21 14:28:59 -07003045 DO_(input->IncrementRecursionDepth());
3046 parse_loop_field:
3047 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003048 input, add_field()));
3049 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003050 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003051 }
Bo Yang5db21732015-05-21 14:28:59 -07003052 if (input->ExpectTag(18)) goto parse_loop_field;
3053 if (input->ExpectTag(26)) goto parse_loop_nested_type;
3054 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003055 break;
3056 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003057
temporal40ee5512008-07-10 02:12:20 +00003058 // repeated .google.protobuf.DescriptorProto nested_type = 3;
3059 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003060 if (tag == 26) {
Bo Yang5db21732015-05-21 14:28:59 -07003061 DO_(input->IncrementRecursionDepth());
3062 parse_loop_nested_type:
3063 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003064 input, add_nested_type()));
3065 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003066 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003067 }
Bo Yang5db21732015-05-21 14:28:59 -07003068 if (input->ExpectTag(26)) goto parse_loop_nested_type;
3069 if (input->ExpectTag(34)) goto parse_loop_enum_type;
3070 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003071 break;
3072 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003073
temporal40ee5512008-07-10 02:12:20 +00003074 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
3075 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003076 if (tag == 34) {
Bo Yang5db21732015-05-21 14:28:59 -07003077 DO_(input->IncrementRecursionDepth());
3078 parse_loop_enum_type:
3079 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003080 input, add_enum_type()));
3081 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003082 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003083 }
Bo Yang5db21732015-05-21 14:28:59 -07003084 if (input->ExpectTag(34)) goto parse_loop_enum_type;
3085 if (input->ExpectTag(42)) goto parse_loop_extension_range;
3086 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003087 break;
3088 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003089
temporal40ee5512008-07-10 02:12:20 +00003090 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
3091 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003092 if (tag == 42) {
Bo Yang5db21732015-05-21 14:28:59 -07003093 DO_(input->IncrementRecursionDepth());
3094 parse_loop_extension_range:
3095 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003096 input, add_extension_range()));
3097 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003098 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003099 }
Bo Yang5db21732015-05-21 14:28:59 -07003100 if (input->ExpectTag(42)) goto parse_loop_extension_range;
3101 if (input->ExpectTag(50)) goto parse_loop_extension;
3102 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003103 break;
3104 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003105
temporal40ee5512008-07-10 02:12:20 +00003106 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
3107 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003108 if (tag == 50) {
Bo Yang5db21732015-05-21 14:28:59 -07003109 DO_(input->IncrementRecursionDepth());
3110 parse_loop_extension:
3111 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00003112 input, add_extension()));
3113 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003114 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003115 }
Bo Yang5db21732015-05-21 14:28:59 -07003116 if (input->ExpectTag(50)) goto parse_loop_extension;
3117 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00003118 if (input->ExpectTag(58)) goto parse_options;
3119 break;
3120 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003121
temporal40ee5512008-07-10 02:12:20 +00003122 // optional .google.protobuf.MessageOptions options = 7;
3123 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003124 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003125 parse_options:
3126 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3127 input, mutable_options()));
3128 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003129 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00003130 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003131 if (input->ExpectTag(66)) goto parse_oneof_decl;
3132 break;
3133 }
3134
3135 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
3136 case 8: {
3137 if (tag == 66) {
3138 parse_oneof_decl:
Bo Yang5db21732015-05-21 14:28:59 -07003139 DO_(input->IncrementRecursionDepth());
3140 parse_loop_oneof_decl:
3141 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
jieluo@google.com4de8f552014-07-18 00:47:59 +00003142 input, add_oneof_decl()));
3143 } else {
3144 goto handle_unusual;
3145 }
Bo Yang5db21732015-05-21 14:28:59 -07003146 if (input->ExpectTag(66)) goto parse_loop_oneof_decl;
3147 if (input->ExpectTag(74)) goto parse_loop_reserved_range;
3148 input->UnsafeDecrementRecursionDepth();
3149 break;
3150 }
3151
3152 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3153 case 9: {
3154 if (tag == 74) {
3155 DO_(input->IncrementRecursionDepth());
3156 parse_loop_reserved_range:
3157 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
3158 input, add_reserved_range()));
3159 } else {
3160 goto handle_unusual;
3161 }
3162 if (input->ExpectTag(74)) goto parse_loop_reserved_range;
3163 input->UnsafeDecrementRecursionDepth();
3164 if (input->ExpectTag(82)) goto parse_reserved_name;
3165 break;
3166 }
3167
3168 // repeated string reserved_name = 10;
3169 case 10: {
3170 if (tag == 82) {
3171 parse_reserved_name:
3172 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3173 input, this->add_reserved_name()));
3174 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3175 this->reserved_name(this->reserved_name_size() - 1).data(),
3176 this->reserved_name(this->reserved_name_size() - 1).length(),
3177 ::google::protobuf::internal::WireFormat::PARSE,
3178 "google.protobuf.DescriptorProto.reserved_name");
3179 } else {
3180 goto handle_unusual;
3181 }
3182 if (input->ExpectTag(82)) goto parse_reserved_name;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003183 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00003184 break;
3185 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003186
temporal40ee5512008-07-10 02:12:20 +00003187 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003188 handle_unusual:
3189 if (tag == 0 ||
3190 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00003191 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003192 goto success;
temporal40ee5512008-07-10 02:12:20 +00003193 }
3194 DO_(::google::protobuf::internal::WireFormat::SkipField(
3195 input, tag, mutable_unknown_fields()));
3196 break;
3197 }
3198 }
3199 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003200success:
3201 // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00003202 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00003203failure:
3204 // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto)
3205 return false;
temporal40ee5512008-07-10 02:12:20 +00003206#undef DO_
3207}
3208
kenton@google.comd37d46d2009-04-25 02:53:47 +00003209void DescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00003210 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003211 // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00003212 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003213 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003214 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00003215 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003216 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003217 "google.protobuf.DescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00003218 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00003219 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00003220 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003221
temporal40ee5512008-07-10 02:12:20 +00003222 // repeated .google.protobuf.FieldDescriptorProto field = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08003223 for (unsigned int i = 0, n = this->field_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003224 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003225 2, this->field(i), output);
temporal40ee5512008-07-10 02:12:20 +00003226 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003227
temporal40ee5512008-07-10 02:12:20 +00003228 // repeated .google.protobuf.DescriptorProto nested_type = 3;
Feng Xiaof157a562014-11-14 11:50:31 -08003229 for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003230 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003231 3, this->nested_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00003232 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003233
temporal40ee5512008-07-10 02:12:20 +00003234 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08003235 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003236 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003237 4, this->enum_type(i), output);
temporal40ee5512008-07-10 02:12:20 +00003238 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003239
temporal40ee5512008-07-10 02:12:20 +00003240 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08003241 for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003242 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003243 5, this->extension_range(i), output);
temporal40ee5512008-07-10 02:12:20 +00003244 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003245
temporal40ee5512008-07-10 02:12:20 +00003246 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08003247 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003248 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00003249 6, this->extension(i), output);
temporal40ee5512008-07-10 02:12:20 +00003250 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003251
temporal40ee5512008-07-10 02:12:20 +00003252 // optional .google.protobuf.MessageOptions options = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003253 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00003254 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08003255 7, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00003256 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003257
jieluo@google.com4de8f552014-07-18 00:47:59 +00003258 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Feng Xiaof157a562014-11-14 11:50:31 -08003259 for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003260 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3261 8, this->oneof_decl(i), output);
3262 }
3263
Bo Yang5db21732015-05-21 14:28:59 -07003264 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3265 for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) {
3266 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3267 9, this->reserved_range(i), output);
3268 }
3269
3270 // repeated string reserved_name = 10;
3271 for (int i = 0; i < this->reserved_name_size(); i++) {
3272 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3273 this->reserved_name(i).data(), this->reserved_name(i).length(),
3274 ::google::protobuf::internal::WireFormat::SERIALIZE,
3275 "google.protobuf.DescriptorProto.reserved_name");
3276 ::google::protobuf::internal::WireFormatLite::WriteString(
3277 10, this->reserved_name(i), output);
3278 }
3279
Feng Xiao6ef984a2014-11-10 17:34:54 -08003280 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003281 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3282 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00003283 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003284 // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003285}
3286
3287::google::protobuf::uint8* DescriptorProto::SerializeWithCachedSizesToArray(
3288 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003289 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003290 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003291 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003292 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00003293 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00003294 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08003295 "google.protobuf.DescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00003296 target =
3297 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3298 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003299 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003300
kenton@google.comd37d46d2009-04-25 02:53:47 +00003301 // repeated .google.protobuf.FieldDescriptorProto field = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08003302 for (unsigned int i = 0, n = this->field_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003303 target = ::google::protobuf::internal::WireFormatLite::
3304 WriteMessageNoVirtualToArray(
3305 2, this->field(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003306 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003307
kenton@google.comd37d46d2009-04-25 02:53:47 +00003308 // repeated .google.protobuf.DescriptorProto nested_type = 3;
Feng Xiaof157a562014-11-14 11:50:31 -08003309 for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003310 target = ::google::protobuf::internal::WireFormatLite::
3311 WriteMessageNoVirtualToArray(
3312 3, this->nested_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003313 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003314
kenton@google.comd37d46d2009-04-25 02:53:47 +00003315 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Feng Xiaof157a562014-11-14 11:50:31 -08003316 for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003317 target = ::google::protobuf::internal::WireFormatLite::
3318 WriteMessageNoVirtualToArray(
3319 4, this->enum_type(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003320 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003321
kenton@google.comd37d46d2009-04-25 02:53:47 +00003322 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Feng Xiaof157a562014-11-14 11:50:31 -08003323 for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003324 target = ::google::protobuf::internal::WireFormatLite::
3325 WriteMessageNoVirtualToArray(
3326 5, this->extension_range(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003327 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003328
kenton@google.comd37d46d2009-04-25 02:53:47 +00003329 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
Feng Xiaof157a562014-11-14 11:50:31 -08003330 for (unsigned int i = 0, n = this->extension_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003331 target = ::google::protobuf::internal::WireFormatLite::
3332 WriteMessageNoVirtualToArray(
3333 6, this->extension(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003334 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003335
kenton@google.comd37d46d2009-04-25 02:53:47 +00003336 // optional .google.protobuf.MessageOptions options = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00003337 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00003338 target = ::google::protobuf::internal::WireFormatLite::
3339 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08003340 7, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00003341 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003342
jieluo@google.com4de8f552014-07-18 00:47:59 +00003343 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Feng Xiaof157a562014-11-14 11:50:31 -08003344 for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00003345 target = ::google::protobuf::internal::WireFormatLite::
3346 WriteMessageNoVirtualToArray(
3347 8, this->oneof_decl(i), target);
3348 }
3349
Bo Yang5db21732015-05-21 14:28:59 -07003350 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3351 for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) {
3352 target = ::google::protobuf::internal::WireFormatLite::
3353 WriteMessageNoVirtualToArray(
3354 9, this->reserved_range(i), target);
3355 }
3356
3357 // repeated string reserved_name = 10;
3358 for (int i = 0; i < this->reserved_name_size(); i++) {
3359 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3360 this->reserved_name(i).data(), this->reserved_name(i).length(),
3361 ::google::protobuf::internal::WireFormat::SERIALIZE,
3362 "google.protobuf.DescriptorProto.reserved_name");
3363 target = ::google::protobuf::internal::WireFormatLite::
3364 WriteStringToArray(10, this->reserved_name(i), target);
3365 }
3366
Feng Xiao6ef984a2014-11-10 17:34:54 -08003367 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00003368 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3369 unknown_fields(), target);
3370 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00003371 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00003372 return target;
temporal40ee5512008-07-10 02:12:20 +00003373}
3374
3375int DescriptorProto::ByteSize() const {
3376 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003377
Austin Schuh307af622015-06-05 22:46:01 -07003378 if (_has_bits_[0 / 32] & 129u) {
temporal40ee5512008-07-10 02:12:20 +00003379 // optional string name = 1;
3380 if (has_name()) {
3381 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003382 ::google::protobuf::internal::WireFormatLite::StringSize(
3383 this->name());
temporal40ee5512008-07-10 02:12:20 +00003384 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003385
temporal40ee5512008-07-10 02:12:20 +00003386 // optional .google.protobuf.MessageOptions options = 7;
3387 if (has_options()) {
3388 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00003389 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08003390 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00003391 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003392
temporal40ee5512008-07-10 02:12:20 +00003393 }
3394 // repeated .google.protobuf.FieldDescriptorProto field = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003395 total_size += 1 * this->field_size();
3396 for (int i = 0; i < this->field_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003397 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003398 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003399 this->field(i));
3400 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003401
temporal40ee5512008-07-10 02:12:20 +00003402 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003403 total_size += 1 * this->extension_size();
3404 for (int i = 0; i < this->extension_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003405 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003406 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003407 this->extension(i));
3408 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003409
temporal40ee5512008-07-10 02:12:20 +00003410 // repeated .google.protobuf.DescriptorProto nested_type = 3;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003411 total_size += 1 * this->nested_type_size();
3412 for (int i = 0; i < this->nested_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003413 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003414 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003415 this->nested_type(i));
3416 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003417
temporal40ee5512008-07-10 02:12:20 +00003418 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003419 total_size += 1 * this->enum_type_size();
3420 for (int i = 0; i < this->enum_type_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003421 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003422 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003423 this->enum_type(i));
3424 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003425
temporal40ee5512008-07-10 02:12:20 +00003426 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
kenton@google.com2d6daa72009-01-22 01:27:00 +00003427 total_size += 1 * this->extension_range_size();
3428 for (int i = 0; i < this->extension_range_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00003429 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00003430 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00003431 this->extension_range(i));
3432 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003433
jieluo@google.com4de8f552014-07-18 00:47:59 +00003434 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
3435 total_size += 1 * this->oneof_decl_size();
3436 for (int i = 0; i < this->oneof_decl_size(); i++) {
3437 total_size +=
3438 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
3439 this->oneof_decl(i));
3440 }
3441
Bo Yang5db21732015-05-21 14:28:59 -07003442 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3443 total_size += 1 * this->reserved_range_size();
3444 for (int i = 0; i < this->reserved_range_size(); i++) {
3445 total_size +=
3446 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
3447 this->reserved_range(i));
3448 }
3449
3450 // repeated string reserved_name = 10;
3451 total_size += 1 * this->reserved_name_size();
3452 for (int i = 0; i < this->reserved_name_size(); i++) {
3453 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
3454 this->reserved_name(i));
3455 }
3456
Feng Xiao6ef984a2014-11-10 17:34:54 -08003457 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00003458 total_size +=
3459 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3460 unknown_fields());
3461 }
kenton@google.comfccb1462009-12-18 02:11:36 +00003462 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00003463 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00003464 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00003465 return total_size;
3466}
3467
3468void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08003469 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07003470 const DescriptorProto* source =
3471 ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto>(
3472 &from);
temporal40ee5512008-07-10 02:12:20 +00003473 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00003474 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00003475 } else {
3476 MergeFrom(*source);
3477 }
3478}
3479
3480void DescriptorProto::MergeFrom(const DescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08003481 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00003482 field_.MergeFrom(from.field_);
3483 extension_.MergeFrom(from.extension_);
3484 nested_type_.MergeFrom(from.nested_type_);
3485 enum_type_.MergeFrom(from.enum_type_);
3486 extension_range_.MergeFrom(from.extension_range_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00003487 oneof_decl_.MergeFrom(from.oneof_decl_);
Bo Yang5db21732015-05-21 14:28:59 -07003488 reserved_range_.MergeFrom(from.reserved_range_);
3489 reserved_name_.MergeFrom(from.reserved_name_);
temporal40ee5512008-07-10 02:12:20 +00003490 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00003491 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08003492 set_has_name();
3493 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00003494 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00003495 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00003496 mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options());
3497 }
3498 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08003499 if (from._internal_metadata_.have_unknown_fields()) {
3500 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3501 }
temporal40ee5512008-07-10 02:12:20 +00003502}
3503
3504void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
3505 if (&from == this) return;
3506 Clear();
3507 MergeFrom(from);
3508}
3509
3510void DescriptorProto::CopyFrom(const DescriptorProto& from) {
3511 if (&from == this) return;
3512 Clear();
3513 MergeFrom(from);
3514}
3515
3516bool DescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00003517
jieluo@google.com4de8f552014-07-18 00:47:59 +00003518 if (!::google::protobuf::internal::AllAreInitialized(this->field())) return false;
3519 if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false;
3520 if (!::google::protobuf::internal::AllAreInitialized(this->nested_type())) return false;
3521 if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003522 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08003523 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00003524 }
temporal40ee5512008-07-10 02:12:20 +00003525 return true;
3526}
3527
kenton@google.comceb561d2009-06-25 19:05:36 +00003528void DescriptorProto::Swap(DescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08003529 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08003530 InternalSwap(other);
3531}
3532void DescriptorProto::InternalSwap(DescriptorProto* other) {
3533 name_.Swap(&other->name_);
3534 field_.UnsafeArenaSwap(&other->field_);
3535 extension_.UnsafeArenaSwap(&other->extension_);
3536 nested_type_.UnsafeArenaSwap(&other->nested_type_);
3537 enum_type_.UnsafeArenaSwap(&other->enum_type_);
3538 extension_range_.UnsafeArenaSwap(&other->extension_range_);
3539 oneof_decl_.UnsafeArenaSwap(&other->oneof_decl_);
3540 std::swap(options_, other->options_);
Bo Yang5db21732015-05-21 14:28:59 -07003541 reserved_range_.UnsafeArenaSwap(&other->reserved_range_);
3542 reserved_name_.UnsafeArenaSwap(&other->reserved_name_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08003543 std::swap(_has_bits_[0], other->_has_bits_[0]);
3544 _internal_metadata_.Swap(&other->_internal_metadata_);
3545 std::swap(_cached_size_, other->_cached_size_);
3546}
kenton@google.comceb561d2009-06-25 19:05:36 +00003547
kenton@google.com80b1d622009-07-29 01:13:20 +00003548::google::protobuf::Metadata DescriptorProto::GetMetadata() const {
3549 protobuf_AssignDescriptorsOnce();
3550 ::google::protobuf::Metadata metadata;
3551 metadata.descriptor = DescriptorProto_descriptor_;
3552 metadata.reflection = DescriptorProto_reflection_;
3553 return metadata;
temporal40ee5512008-07-10 02:12:20 +00003554}
3555
Jisi Liu885b6122015-02-28 14:51:22 -08003556#if PROTOBUF_INLINE_NOT_IN_HEADERS
3557// DescriptorProto_ExtensionRange
3558
3559// optional int32 start = 1;
Bo Yang5db21732015-05-21 14:28:59 -07003560bool DescriptorProto_ExtensionRange::has_start() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003561 return (_has_bits_[0] & 0x00000001u) != 0;
3562}
Bo Yang5db21732015-05-21 14:28:59 -07003563void DescriptorProto_ExtensionRange::set_has_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003564 _has_bits_[0] |= 0x00000001u;
3565}
Bo Yang5db21732015-05-21 14:28:59 -07003566void DescriptorProto_ExtensionRange::clear_has_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003567 _has_bits_[0] &= ~0x00000001u;
3568}
Bo Yang5db21732015-05-21 14:28:59 -07003569void DescriptorProto_ExtensionRange::clear_start() {
Jisi Liu885b6122015-02-28 14:51:22 -08003570 start_ = 0;
3571 clear_has_start();
3572}
3573 ::google::protobuf::int32 DescriptorProto_ExtensionRange::start() const {
3574 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start)
3575 return start_;
3576}
3577 void DescriptorProto_ExtensionRange::set_start(::google::protobuf::int32 value) {
3578 set_has_start();
3579 start_ = value;
3580 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start)
3581}
3582
3583// optional int32 end = 2;
Bo Yang5db21732015-05-21 14:28:59 -07003584bool DescriptorProto_ExtensionRange::has_end() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003585 return (_has_bits_[0] & 0x00000002u) != 0;
3586}
Bo Yang5db21732015-05-21 14:28:59 -07003587void DescriptorProto_ExtensionRange::set_has_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003588 _has_bits_[0] |= 0x00000002u;
3589}
Bo Yang5db21732015-05-21 14:28:59 -07003590void DescriptorProto_ExtensionRange::clear_has_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003591 _has_bits_[0] &= ~0x00000002u;
3592}
Bo Yang5db21732015-05-21 14:28:59 -07003593void DescriptorProto_ExtensionRange::clear_end() {
Jisi Liu885b6122015-02-28 14:51:22 -08003594 end_ = 0;
3595 clear_has_end();
3596}
3597 ::google::protobuf::int32 DescriptorProto_ExtensionRange::end() const {
3598 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end)
3599 return end_;
3600}
3601 void DescriptorProto_ExtensionRange::set_end(::google::protobuf::int32 value) {
3602 set_has_end();
3603 end_ = value;
3604 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end)
3605}
3606
3607// -------------------------------------------------------------------
3608
Bo Yang5db21732015-05-21 14:28:59 -07003609// DescriptorProto_ReservedRange
3610
3611// optional int32 start = 1;
3612bool DescriptorProto_ReservedRange::has_start() const {
3613 return (_has_bits_[0] & 0x00000001u) != 0;
3614}
3615void DescriptorProto_ReservedRange::set_has_start() {
3616 _has_bits_[0] |= 0x00000001u;
3617}
3618void DescriptorProto_ReservedRange::clear_has_start() {
3619 _has_bits_[0] &= ~0x00000001u;
3620}
3621void DescriptorProto_ReservedRange::clear_start() {
3622 start_ = 0;
3623 clear_has_start();
3624}
3625 ::google::protobuf::int32 DescriptorProto_ReservedRange::start() const {
3626 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start)
3627 return start_;
3628}
3629 void DescriptorProto_ReservedRange::set_start(::google::protobuf::int32 value) {
3630 set_has_start();
3631 start_ = value;
3632 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start)
3633}
3634
3635// optional int32 end = 2;
3636bool DescriptorProto_ReservedRange::has_end() const {
3637 return (_has_bits_[0] & 0x00000002u) != 0;
3638}
3639void DescriptorProto_ReservedRange::set_has_end() {
3640 _has_bits_[0] |= 0x00000002u;
3641}
3642void DescriptorProto_ReservedRange::clear_has_end() {
3643 _has_bits_[0] &= ~0x00000002u;
3644}
3645void DescriptorProto_ReservedRange::clear_end() {
3646 end_ = 0;
3647 clear_has_end();
3648}
3649 ::google::protobuf::int32 DescriptorProto_ReservedRange::end() const {
3650 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end)
3651 return end_;
3652}
3653 void DescriptorProto_ReservedRange::set_end(::google::protobuf::int32 value) {
3654 set_has_end();
3655 end_ = value;
3656 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end)
3657}
3658
3659// -------------------------------------------------------------------
3660
Jisi Liu885b6122015-02-28 14:51:22 -08003661// DescriptorProto
3662
3663// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07003664bool DescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003665 return (_has_bits_[0] & 0x00000001u) != 0;
3666}
Bo Yang5db21732015-05-21 14:28:59 -07003667void DescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003668 _has_bits_[0] |= 0x00000001u;
3669}
Bo Yang5db21732015-05-21 14:28:59 -07003670void DescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003671 _has_bits_[0] &= ~0x00000001u;
3672}
Bo Yang5db21732015-05-21 14:28:59 -07003673void DescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08003674 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3675 clear_has_name();
3676}
3677 const ::std::string& DescriptorProto::name() const {
3678 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name)
3679 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3680}
3681 void DescriptorProto::set_name(const ::std::string& value) {
3682 set_has_name();
3683 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
3684 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name)
3685}
3686 void DescriptorProto::set_name(const char* value) {
3687 set_has_name();
3688 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
3689 // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name)
3690}
3691 void DescriptorProto::set_name(const char* value, size_t size) {
3692 set_has_name();
3693 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
3694 ::std::string(reinterpret_cast<const char*>(value), size));
3695 // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name)
3696}
3697 ::std::string* DescriptorProto::mutable_name() {
3698 set_has_name();
3699 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name)
3700 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3701}
3702 ::std::string* DescriptorProto::release_name() {
3703 clear_has_name();
3704 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3705}
3706 void DescriptorProto::set_allocated_name(::std::string* name) {
3707 if (name != NULL) {
3708 set_has_name();
3709 } else {
3710 clear_has_name();
3711 }
3712 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
3713 // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name)
3714}
3715
3716// repeated .google.protobuf.FieldDescriptorProto field = 2;
Bo Yang5db21732015-05-21 14:28:59 -07003717int DescriptorProto::field_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003718 return field_.size();
3719}
Bo Yang5db21732015-05-21 14:28:59 -07003720void DescriptorProto::clear_field() {
Jisi Liu885b6122015-02-28 14:51:22 -08003721 field_.Clear();
3722}
3723 const ::google::protobuf::FieldDescriptorProto& DescriptorProto::field(int index) const {
3724 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field)
3725 return field_.Get(index);
3726}
3727 ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_field(int index) {
3728 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.field)
3729 return field_.Mutable(index);
3730}
3731 ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_field() {
3732 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field)
3733 return field_.Add();
3734}
3735 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
3736DescriptorProto::field() const {
3737 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field)
3738 return field_;
3739}
3740 ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
3741DescriptorProto::mutable_field() {
3742 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field)
3743 return &field_;
3744}
3745
3746// repeated .google.protobuf.FieldDescriptorProto extension = 6;
Bo Yang5db21732015-05-21 14:28:59 -07003747int DescriptorProto::extension_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003748 return extension_.size();
3749}
Bo Yang5db21732015-05-21 14:28:59 -07003750void DescriptorProto::clear_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -08003751 extension_.Clear();
3752}
3753 const ::google::protobuf::FieldDescriptorProto& DescriptorProto::extension(int index) const {
3754 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension)
3755 return extension_.Get(index);
3756}
3757 ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) {
3758 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension)
3759 return extension_.Mutable(index);
3760}
3761 ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_extension() {
3762 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension)
3763 return extension_.Add();
3764}
3765 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >&
3766DescriptorProto::extension() const {
3767 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension)
3768 return extension_;
3769}
3770 ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >*
3771DescriptorProto::mutable_extension() {
3772 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension)
3773 return &extension_;
3774}
3775
3776// repeated .google.protobuf.DescriptorProto nested_type = 3;
Bo Yang5db21732015-05-21 14:28:59 -07003777int DescriptorProto::nested_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003778 return nested_type_.size();
3779}
Bo Yang5db21732015-05-21 14:28:59 -07003780void DescriptorProto::clear_nested_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003781 nested_type_.Clear();
3782}
3783 const ::google::protobuf::DescriptorProto& DescriptorProto::nested_type(int index) const {
3784 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.nested_type)
3785 return nested_type_.Get(index);
3786}
3787 ::google::protobuf::DescriptorProto* DescriptorProto::mutable_nested_type(int index) {
3788 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.nested_type)
3789 return nested_type_.Mutable(index);
3790}
3791 ::google::protobuf::DescriptorProto* DescriptorProto::add_nested_type() {
3792 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.nested_type)
3793 return nested_type_.Add();
3794}
3795 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >&
3796DescriptorProto::nested_type() const {
3797 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type)
3798 return nested_type_;
3799}
3800 ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >*
3801DescriptorProto::mutable_nested_type() {
3802 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type)
3803 return &nested_type_;
3804}
3805
3806// repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
Bo Yang5db21732015-05-21 14:28:59 -07003807int DescriptorProto::enum_type_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003808 return enum_type_.size();
3809}
Bo Yang5db21732015-05-21 14:28:59 -07003810void DescriptorProto::clear_enum_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08003811 enum_type_.Clear();
3812}
3813 const ::google::protobuf::EnumDescriptorProto& DescriptorProto::enum_type(int index) const {
3814 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.enum_type)
3815 return enum_type_.Get(index);
3816}
3817 ::google::protobuf::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) {
3818 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.enum_type)
3819 return enum_type_.Mutable(index);
3820}
3821 ::google::protobuf::EnumDescriptorProto* DescriptorProto::add_enum_type() {
3822 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.enum_type)
3823 return enum_type_.Add();
3824}
3825 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >&
3826DescriptorProto::enum_type() const {
3827 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type)
3828 return enum_type_;
3829}
3830 ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >*
3831DescriptorProto::mutable_enum_type() {
3832 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type)
3833 return &enum_type_;
3834}
3835
3836// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
Bo Yang5db21732015-05-21 14:28:59 -07003837int DescriptorProto::extension_range_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003838 return extension_range_.size();
3839}
Bo Yang5db21732015-05-21 14:28:59 -07003840void DescriptorProto::clear_extension_range() {
Jisi Liu885b6122015-02-28 14:51:22 -08003841 extension_range_.Clear();
3842}
3843 const ::google::protobuf::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const {
3844 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension_range)
3845 return extension_range_.Get(index);
3846}
3847 ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) {
3848 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension_range)
3849 return extension_range_.Mutable(index);
3850}
3851 ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() {
3852 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension_range)
3853 return extension_range_.Add();
3854}
3855 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >&
3856DescriptorProto::extension_range() const {
3857 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range)
3858 return extension_range_;
3859}
3860 ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >*
3861DescriptorProto::mutable_extension_range() {
3862 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range)
3863 return &extension_range_;
3864}
3865
3866// repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
Bo Yang5db21732015-05-21 14:28:59 -07003867int DescriptorProto::oneof_decl_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003868 return oneof_decl_.size();
3869}
Bo Yang5db21732015-05-21 14:28:59 -07003870void DescriptorProto::clear_oneof_decl() {
Jisi Liu885b6122015-02-28 14:51:22 -08003871 oneof_decl_.Clear();
3872}
3873 const ::google::protobuf::OneofDescriptorProto& DescriptorProto::oneof_decl(int index) const {
3874 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.oneof_decl)
3875 return oneof_decl_.Get(index);
3876}
3877 ::google::protobuf::OneofDescriptorProto* DescriptorProto::mutable_oneof_decl(int index) {
3878 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.oneof_decl)
3879 return oneof_decl_.Mutable(index);
3880}
3881 ::google::protobuf::OneofDescriptorProto* DescriptorProto::add_oneof_decl() {
3882 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.oneof_decl)
3883 return oneof_decl_.Add();
3884}
3885 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >&
3886DescriptorProto::oneof_decl() const {
3887 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl)
3888 return oneof_decl_;
3889}
3890 ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >*
3891DescriptorProto::mutable_oneof_decl() {
3892 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl)
3893 return &oneof_decl_;
3894}
3895
3896// optional .google.protobuf.MessageOptions options = 7;
Bo Yang5db21732015-05-21 14:28:59 -07003897bool DescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08003898 return (_has_bits_[0] & 0x00000080u) != 0;
3899}
Bo Yang5db21732015-05-21 14:28:59 -07003900void DescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003901 _has_bits_[0] |= 0x00000080u;
3902}
Bo Yang5db21732015-05-21 14:28:59 -07003903void DescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003904 _has_bits_[0] &= ~0x00000080u;
3905}
Bo Yang5db21732015-05-21 14:28:59 -07003906void DescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08003907 if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear();
3908 clear_has_options();
3909}
3910 const ::google::protobuf::MessageOptions& DescriptorProto::options() const {
3911 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options)
3912 return options_ != NULL ? *options_ : *default_instance_->options_;
3913}
3914 ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() {
3915 set_has_options();
3916 if (options_ == NULL) {
3917 options_ = new ::google::protobuf::MessageOptions;
3918 }
3919 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options)
3920 return options_;
3921}
3922 ::google::protobuf::MessageOptions* DescriptorProto::release_options() {
3923 clear_has_options();
3924 ::google::protobuf::MessageOptions* temp = options_;
3925 options_ = NULL;
3926 return temp;
3927}
3928 void DescriptorProto::set_allocated_options(::google::protobuf::MessageOptions* options) {
3929 delete options_;
3930 options_ = options;
3931 if (options) {
3932 set_has_options();
3933 } else {
3934 clear_has_options();
3935 }
3936 // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options)
3937}
3938
Bo Yang5db21732015-05-21 14:28:59 -07003939// repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
3940int DescriptorProto::reserved_range_size() const {
3941 return reserved_range_.size();
3942}
3943void DescriptorProto::clear_reserved_range() {
3944 reserved_range_.Clear();
3945}
3946 const ::google::protobuf::DescriptorProto_ReservedRange& DescriptorProto::reserved_range(int index) const {
3947 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_range)
3948 return reserved_range_.Get(index);
3949}
3950 ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::mutable_reserved_range(int index) {
3951 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_range)
3952 return reserved_range_.Mutable(index);
3953}
3954 ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() {
3955 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_range)
3956 return reserved_range_.Add();
3957}
3958 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >&
3959DescriptorProto::reserved_range() const {
3960 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_range)
3961 return reserved_range_;
3962}
3963 ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >*
3964DescriptorProto::mutable_reserved_range() {
3965 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range)
3966 return &reserved_range_;
3967}
3968
3969// repeated string reserved_name = 10;
3970int DescriptorProto::reserved_name_size() const {
3971 return reserved_name_.size();
3972}
3973void DescriptorProto::clear_reserved_name() {
3974 reserved_name_.Clear();
3975}
3976 const ::std::string& DescriptorProto::reserved_name(int index) const {
3977 // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name)
3978 return reserved_name_.Get(index);
3979}
3980 ::std::string* DescriptorProto::mutable_reserved_name(int index) {
3981 // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name)
3982 return reserved_name_.Mutable(index);
3983}
3984 void DescriptorProto::set_reserved_name(int index, const ::std::string& value) {
3985 // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name)
3986 reserved_name_.Mutable(index)->assign(value);
3987}
3988 void DescriptorProto::set_reserved_name(int index, const char* value) {
3989 reserved_name_.Mutable(index)->assign(value);
3990 // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name)
3991}
3992 void DescriptorProto::set_reserved_name(int index, const char* value, size_t size) {
3993 reserved_name_.Mutable(index)->assign(
3994 reinterpret_cast<const char*>(value), size);
3995 // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name)
3996}
3997 ::std::string* DescriptorProto::add_reserved_name() {
3998 return reserved_name_.Add();
3999}
4000 void DescriptorProto::add_reserved_name(const ::std::string& value) {
4001 reserved_name_.Add()->assign(value);
4002 // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name)
4003}
4004 void DescriptorProto::add_reserved_name(const char* value) {
4005 reserved_name_.Add()->assign(value);
4006 // @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name)
4007}
4008 void DescriptorProto::add_reserved_name(const char* value, size_t size) {
4009 reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size);
4010 // @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name)
4011}
4012 const ::google::protobuf::RepeatedPtrField< ::std::string>&
4013DescriptorProto::reserved_name() const {
4014 // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name)
4015 return reserved_name_;
4016}
4017 ::google::protobuf::RepeatedPtrField< ::std::string>*
4018DescriptorProto::mutable_reserved_name() {
4019 // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name)
4020 return &reserved_name_;
4021}
4022
Jisi Liu885b6122015-02-28 14:51:22 -08004023#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00004024
4025// ===================================================================
4026
4027const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004028 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004029 return FieldDescriptorProto_Type_descriptor_;
4030}
4031bool FieldDescriptorProto_Type_IsValid(int value) {
4032 switch(value) {
4033 case 1:
4034 case 2:
4035 case 3:
4036 case 4:
4037 case 5:
4038 case 6:
4039 case 7:
4040 case 8:
4041 case 9:
4042 case 10:
4043 case 11:
4044 case 12:
4045 case 13:
4046 case 14:
4047 case 15:
4048 case 16:
4049 case 17:
4050 case 18:
4051 return true;
4052 default:
4053 return false;
4054 }
4055}
4056
4057#ifndef _MSC_VER
4058const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE;
4059const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT;
4060const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64;
4061const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64;
4062const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32;
4063const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64;
4064const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32;
4065const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL;
4066const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING;
4067const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP;
4068const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE;
4069const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES;
4070const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32;
4071const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM;
4072const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32;
4073const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64;
4074const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32;
4075const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64;
4076const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN;
4077const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00004078const int FieldDescriptorProto::Type_ARRAYSIZE;
temporal40ee5512008-07-10 02:12:20 +00004079#endif // _MSC_VER
4080const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004081 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004082 return FieldDescriptorProto_Label_descriptor_;
4083}
4084bool FieldDescriptorProto_Label_IsValid(int value) {
4085 switch(value) {
4086 case 1:
4087 case 2:
4088 case 3:
4089 return true;
4090 default:
4091 return false;
4092 }
4093}
4094
4095#ifndef _MSC_VER
4096const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL;
4097const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED;
4098const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED;
4099const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN;
4100const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00004101const int FieldDescriptorProto::Label_ARRAYSIZE;
temporal40ee5512008-07-10 02:12:20 +00004102#endif // _MSC_VER
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004103#ifndef _MSC_VER
4104const int FieldDescriptorProto::kNameFieldNumber;
4105const int FieldDescriptorProto::kNumberFieldNumber;
4106const int FieldDescriptorProto::kLabelFieldNumber;
4107const int FieldDescriptorProto::kTypeFieldNumber;
4108const int FieldDescriptorProto::kTypeNameFieldNumber;
4109const int FieldDescriptorProto::kExtendeeFieldNumber;
4110const int FieldDescriptorProto::kDefaultValueFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004111const int FieldDescriptorProto::kOneofIndexFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00004112const int FieldDescriptorProto::kOptionsFieldNumber;
4113#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00004114
kenton@google.com573989f2009-10-30 22:02:17 +00004115FieldDescriptorProto::FieldDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07004116 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004117 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00004118 // @@protoc_insertion_point(constructor:google.protobuf.FieldDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00004119}
4120
kenton@google.com80b1d622009-07-29 01:13:20 +00004121void FieldDescriptorProto::InitAsDefaultInstance() {
4122 options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00004123}
4124
kenton@google.com573989f2009-10-30 22:02:17 +00004125FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08004126 : ::google::protobuf::Message(),
4127 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004128 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00004129 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00004130 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004131}
4132
kenton@google.comd37d46d2009-04-25 02:53:47 +00004133void FieldDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004134 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00004135 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004136 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00004137 number_ = 0;
4138 label_ = 1;
4139 type_ = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004140 type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4141 extendee_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4142 default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00004143 oneof_index_ = 0;
kenton@google.comd37d46d2009-04-25 02:53:47 +00004144 options_ = NULL;
4145 ::memset(_has_bits_, 0, sizeof(_has_bits_));
4146}
4147
temporal40ee5512008-07-10 02:12:20 +00004148FieldDescriptorProto::~FieldDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004149 // @@protoc_insertion_point(destructor:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004150 SharedDtor();
4151}
4152
4153void FieldDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08004154 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4155 type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4156 extendee_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4157 default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00004158 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00004159 delete options_;
4160 }
4161}
4162
kenton@google.comfccb1462009-12-18 02:11:36 +00004163void FieldDescriptorProto::SetCachedSize(int size) const {
4164 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4165 _cached_size_ = size;
4166 GOOGLE_SAFE_CONCURRENT_WRITES_END();
4167}
temporal40ee5512008-07-10 02:12:20 +00004168const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004169 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00004170 return FieldDescriptorProto_descriptor_;
4171}
4172
kenton@google.com24bf56f2008-09-24 20:31:01 +00004173const FieldDescriptorProto& FieldDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00004174 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
4175 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00004176}
4177
4178FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL;
4179
Feng Xiao6ef984a2014-11-10 17:34:54 -08004180FieldDescriptorProto* FieldDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08004181 FieldDescriptorProto* n = new FieldDescriptorProto;
4182 if (arena != NULL) {
4183 arena->Own(n);
4184 }
4185 return n;
temporal40ee5512008-07-10 02:12:20 +00004186}
4187
4188void FieldDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07004189 if (_has_bits_[0 / 32] & 255u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004190 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004191 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004192 }
4193 number_ = 0;
4194 label_ = 1;
4195 type_ = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004196 if (has_type_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004197 type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004198 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004199 if (has_extendee()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004200 extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004201 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004202 if (has_default_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004203 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00004204 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004205 oneof_index_ = 0;
4206 }
4207 if (has_options()) {
4208 if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
temporal40ee5512008-07-10 02:12:20 +00004209 }
4210 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08004211 if (_internal_metadata_.have_unknown_fields()) {
4212 mutable_unknown_fields()->Clear();
4213 }
temporal40ee5512008-07-10 02:12:20 +00004214}
4215
4216bool FieldDescriptorProto::MergePartialFromCodedStream(
4217 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004218#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00004219 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004220 // @@protoc_insertion_point(parse_start:google.protobuf.FieldDescriptorProto)
4221 for (;;) {
4222 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
4223 tag = p.first;
4224 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00004225 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00004226 // optional string name = 1;
4227 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004228 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004229 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4230 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004231 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004232 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004233 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004234 "google.protobuf.FieldDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00004235 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004236 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004237 }
temporal40ee5512008-07-10 02:12:20 +00004238 if (input->ExpectTag(18)) goto parse_extendee;
4239 break;
4240 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004241
temporal40ee5512008-07-10 02:12:20 +00004242 // optional string extendee = 2;
4243 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004244 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004245 parse_extendee:
4246 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4247 input, this->mutable_extendee()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004248 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004249 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004250 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004251 "google.protobuf.FieldDescriptorProto.extendee");
kenton@google.comfccb1462009-12-18 02:11:36 +00004252 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004253 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004254 }
temporal40ee5512008-07-10 02:12:20 +00004255 if (input->ExpectTag(24)) goto parse_number;
4256 break;
4257 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004258
temporal40ee5512008-07-10 02:12:20 +00004259 // optional int32 number = 3;
4260 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004261 if (tag == 24) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004262 parse_number:
4263 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4264 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
4265 input, &number_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00004266 set_has_number();
kenton@google.comfccb1462009-12-18 02:11:36 +00004267 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004268 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004269 }
temporal40ee5512008-07-10 02:12:20 +00004270 if (input->ExpectTag(32)) goto parse_label;
4271 break;
4272 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004273
temporal40ee5512008-07-10 02:12:20 +00004274 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
4275 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004276 if (tag == 32) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004277 parse_label:
4278 int value;
4279 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4280 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
4281 input, &value)));
4282 if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) {
4283 set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value));
4284 } else {
4285 mutable_unknown_fields()->AddVarint(4, value);
4286 }
temporal40ee5512008-07-10 02:12:20 +00004287 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004288 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004289 }
4290 if (input->ExpectTag(40)) goto parse_type;
4291 break;
4292 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004293
temporal40ee5512008-07-10 02:12:20 +00004294 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
4295 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004296 if (tag == 40) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004297 parse_type:
4298 int value;
4299 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4300 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
4301 input, &value)));
4302 if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) {
4303 set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value));
4304 } else {
4305 mutable_unknown_fields()->AddVarint(5, value);
4306 }
temporal40ee5512008-07-10 02:12:20 +00004307 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004308 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004309 }
4310 if (input->ExpectTag(50)) goto parse_type_name;
4311 break;
4312 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004313
temporal40ee5512008-07-10 02:12:20 +00004314 // optional string type_name = 6;
4315 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004316 if (tag == 50) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004317 parse_type_name:
4318 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4319 input, this->mutable_type_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004320 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004321 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004322 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004323 "google.protobuf.FieldDescriptorProto.type_name");
kenton@google.comfccb1462009-12-18 02:11:36 +00004324 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004325 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004326 }
temporal40ee5512008-07-10 02:12:20 +00004327 if (input->ExpectTag(58)) goto parse_default_value;
4328 break;
4329 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004330
temporal40ee5512008-07-10 02:12:20 +00004331 // optional string default_value = 7;
4332 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004333 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004334 parse_default_value:
4335 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4336 input, this->mutable_default_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00004337 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00004338 this->default_value().data(), this->default_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004339 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004340 "google.protobuf.FieldDescriptorProto.default_value");
kenton@google.comfccb1462009-12-18 02:11:36 +00004341 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004342 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004343 }
temporal40ee5512008-07-10 02:12:20 +00004344 if (input->ExpectTag(66)) goto parse_options;
4345 break;
4346 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004347
temporal40ee5512008-07-10 02:12:20 +00004348 // optional .google.protobuf.FieldOptions options = 8;
4349 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004350 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004351 parse_options:
4352 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
4353 input, mutable_options()));
4354 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004355 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00004356 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004357 if (input->ExpectTag(72)) goto parse_oneof_index;
4358 break;
4359 }
4360
4361 // optional int32 oneof_index = 9;
4362 case 9: {
4363 if (tag == 72) {
4364 parse_oneof_index:
4365 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4366 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
4367 input, &oneof_index_)));
4368 set_has_oneof_index();
4369 } else {
4370 goto handle_unusual;
4371 }
4372 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00004373 break;
4374 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004375
temporal40ee5512008-07-10 02:12:20 +00004376 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004377 handle_unusual:
4378 if (tag == 0 ||
4379 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00004380 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004381 goto success;
temporal40ee5512008-07-10 02:12:20 +00004382 }
4383 DO_(::google::protobuf::internal::WireFormat::SkipField(
4384 input, tag, mutable_unknown_fields()));
4385 break;
4386 }
4387 }
4388 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004389success:
4390 // @@protoc_insertion_point(parse_success:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004391 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00004392failure:
4393 // @@protoc_insertion_point(parse_failure:google.protobuf.FieldDescriptorProto)
4394 return false;
temporal40ee5512008-07-10 02:12:20 +00004395#undef DO_
4396}
4397
kenton@google.comd37d46d2009-04-25 02:53:47 +00004398void FieldDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00004399 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004400 // @@protoc_insertion_point(serialize_start:google.protobuf.FieldDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00004401 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004402 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004403 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004404 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004405 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004406 "google.protobuf.FieldDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004407 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004408 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00004409 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004410
temporal40ee5512008-07-10 02:12:20 +00004411 // optional string extendee = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004412 if (has_extendee()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004413 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004414 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004415 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004416 "google.protobuf.FieldDescriptorProto.extendee");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004417 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004418 2, this->extendee(), output);
temporal40ee5512008-07-10 02:12:20 +00004419 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004420
temporal40ee5512008-07-10 02:12:20 +00004421 // optional int32 number = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004422 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004423 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output);
temporal40ee5512008-07-10 02:12:20 +00004424 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004425
temporal40ee5512008-07-10 02:12:20 +00004426 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004427 if (has_label()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004428 ::google::protobuf::internal::WireFormatLite::WriteEnum(
4429 4, this->label(), output);
temporal40ee5512008-07-10 02:12:20 +00004430 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004431
temporal40ee5512008-07-10 02:12:20 +00004432 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004433 if (has_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004434 ::google::protobuf::internal::WireFormatLite::WriteEnum(
4435 5, this->type(), output);
temporal40ee5512008-07-10 02:12:20 +00004436 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004437
temporal40ee5512008-07-10 02:12:20 +00004438 // optional string type_name = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004439 if (has_type_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004440 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004441 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004442 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004443 "google.protobuf.FieldDescriptorProto.type_name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004444 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004445 6, this->type_name(), output);
temporal40ee5512008-07-10 02:12:20 +00004446 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004447
temporal40ee5512008-07-10 02:12:20 +00004448 // optional string default_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004449 if (has_default_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004450 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004451 this->default_value().data(), this->default_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004452 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004453 "google.protobuf.FieldDescriptorProto.default_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +00004454 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00004455 7, this->default_value(), output);
temporal40ee5512008-07-10 02:12:20 +00004456 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004457
temporal40ee5512008-07-10 02:12:20 +00004458 // optional .google.protobuf.FieldOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004459 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00004460 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08004461 8, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00004462 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004463
jieluo@google.com4de8f552014-07-18 00:47:59 +00004464 // optional int32 oneof_index = 9;
4465 if (has_oneof_index()) {
4466 ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->oneof_index(), output);
4467 }
4468
Feng Xiao6ef984a2014-11-10 17:34:54 -08004469 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004470 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4471 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00004472 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004473 // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004474}
4475
4476::google::protobuf::uint8* FieldDescriptorProto::SerializeWithCachedSizesToArray(
4477 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004478 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004479 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004480 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004481 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004482 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004483 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004484 "google.protobuf.FieldDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00004485 target =
4486 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4487 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004488 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004489
kenton@google.comd37d46d2009-04-25 02:53:47 +00004490 // optional string extendee = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004491 if (has_extendee()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004492 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004493 this->extendee().data(), this->extendee().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004494 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004495 "google.protobuf.FieldDescriptorProto.extendee");
kenton@google.com80b1d622009-07-29 01:13:20 +00004496 target =
4497 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4498 2, this->extendee(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004499 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004500
kenton@google.comd37d46d2009-04-25 02:53:47 +00004501 // optional int32 number = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004502 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004503 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004504 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004505
kenton@google.comd37d46d2009-04-25 02:53:47 +00004506 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004507 if (has_label()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004508 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4509 4, this->label(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004510 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004511
kenton@google.comd37d46d2009-04-25 02:53:47 +00004512 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004513 if (has_type()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004514 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4515 5, this->type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004516 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004517
kenton@google.comd37d46d2009-04-25 02:53:47 +00004518 // optional string type_name = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004519 if (has_type_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00004520 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00004521 this->type_name().data(), this->type_name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00004522 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08004523 "google.protobuf.FieldDescriptorProto.type_name");
kenton@google.com80b1d622009-07-29 01:13:20 +00004524 target =
4525 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4526 6, this->type_name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004527 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004528
kenton@google.comd37d46d2009-04-25 02:53:47 +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");
kenton@google.com80b1d622009-07-29 01:13:20 +00004535 target =
4536 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4537 7, this->default_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004538 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004539
kenton@google.comd37d46d2009-04-25 02:53:47 +00004540 // optional .google.protobuf.FieldOptions options = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00004541 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00004542 target = ::google::protobuf::internal::WireFormatLite::
4543 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08004544 8, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00004545 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004546
jieluo@google.com4de8f552014-07-18 00:47:59 +00004547 // optional int32 oneof_index = 9;
4548 if (has_oneof_index()) {
4549 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->oneof_index(), target);
4550 }
4551
Feng Xiao6ef984a2014-11-10 17:34:54 -08004552 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00004553 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
4554 unknown_fields(), target);
4555 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004556 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00004557 return target;
temporal40ee5512008-07-10 02:12:20 +00004558}
4559
4560int FieldDescriptorProto::ByteSize() const {
4561 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004562
Austin Schuh307af622015-06-05 22:46:01 -07004563 if (_has_bits_[0 / 32] & 255u) {
temporal40ee5512008-07-10 02:12:20 +00004564 // optional string name = 1;
4565 if (has_name()) {
4566 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004567 ::google::protobuf::internal::WireFormatLite::StringSize(
4568 this->name());
temporal40ee5512008-07-10 02:12:20 +00004569 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004570
temporal40ee5512008-07-10 02:12:20 +00004571 // optional int32 number = 3;
4572 if (has_number()) {
4573 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004574 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00004575 this->number());
4576 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004577
temporal40ee5512008-07-10 02:12:20 +00004578 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
4579 if (has_label()) {
4580 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004581 ::google::protobuf::internal::WireFormatLite::EnumSize(this->label());
temporal40ee5512008-07-10 02:12:20 +00004582 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004583
temporal40ee5512008-07-10 02:12:20 +00004584 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
4585 if (has_type()) {
4586 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004587 ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
temporal40ee5512008-07-10 02:12:20 +00004588 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004589
temporal40ee5512008-07-10 02:12:20 +00004590 // optional string type_name = 6;
4591 if (has_type_name()) {
4592 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004593 ::google::protobuf::internal::WireFormatLite::StringSize(
4594 this->type_name());
temporal40ee5512008-07-10 02:12:20 +00004595 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004596
temporal40ee5512008-07-10 02:12:20 +00004597 // optional string extendee = 2;
4598 if (has_extendee()) {
4599 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004600 ::google::protobuf::internal::WireFormatLite::StringSize(
4601 this->extendee());
temporal40ee5512008-07-10 02:12:20 +00004602 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004603
temporal40ee5512008-07-10 02:12:20 +00004604 // optional string default_value = 7;
4605 if (has_default_value()) {
4606 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00004607 ::google::protobuf::internal::WireFormatLite::StringSize(
4608 this->default_value());
temporal40ee5512008-07-10 02:12:20 +00004609 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004610
jieluo@google.com4de8f552014-07-18 00:47:59 +00004611 // optional int32 oneof_index = 9;
4612 if (has_oneof_index()) {
4613 total_size += 1 +
4614 ::google::protobuf::internal::WireFormatLite::Int32Size(
4615 this->oneof_index());
4616 }
4617
4618 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004619 // optional .google.protobuf.FieldOptions options = 8;
4620 if (has_options()) {
4621 total_size += 1 +
4622 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08004623 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00004624 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004625
4626 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00004627 total_size +=
4628 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4629 unknown_fields());
4630 }
kenton@google.comfccb1462009-12-18 02:11:36 +00004631 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00004632 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00004633 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00004634 return total_size;
4635}
4636
4637void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08004638 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07004639 const FieldDescriptorProto* source =
4640 ::google::protobuf::internal::DynamicCastToGenerated<const FieldDescriptorProto>(
4641 &from);
temporal40ee5512008-07-10 02:12:20 +00004642 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00004643 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00004644 } else {
4645 MergeFrom(*source);
4646 }
4647}
4648
4649void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08004650 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00004651 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004652 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004653 set_has_name();
4654 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00004655 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004656 if (from.has_number()) {
temporal40ee5512008-07-10 02:12:20 +00004657 set_number(from.number());
4658 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004659 if (from.has_label()) {
temporal40ee5512008-07-10 02:12:20 +00004660 set_label(from.label());
4661 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004662 if (from.has_type()) {
temporal40ee5512008-07-10 02:12:20 +00004663 set_type(from.type());
4664 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004665 if (from.has_type_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004666 set_has_type_name();
4667 type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_name_);
temporal40ee5512008-07-10 02:12:20 +00004668 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004669 if (from.has_extendee()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004670 set_has_extendee();
4671 extendee_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extendee_);
temporal40ee5512008-07-10 02:12:20 +00004672 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00004673 if (from.has_default_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004674 set_has_default_value();
4675 default_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value_);
temporal40ee5512008-07-10 02:12:20 +00004676 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00004677 if (from.has_oneof_index()) {
4678 set_oneof_index(from.oneof_index());
4679 }
4680 }
4681 if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00004682 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00004683 mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options());
4684 }
4685 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08004686 if (from._internal_metadata_.have_unknown_fields()) {
4687 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
4688 }
temporal40ee5512008-07-10 02:12:20 +00004689}
4690
4691void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
4692 if (&from == this) return;
4693 Clear();
4694 MergeFrom(from);
4695}
4696
4697void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) {
4698 if (&from == this) return;
4699 Clear();
4700 MergeFrom(from);
4701}
4702
kenton@google.comceb561d2009-06-25 19:05:36 +00004703bool FieldDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00004704
kenton@google.comceb561d2009-06-25 19:05:36 +00004705 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08004706 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00004707 }
4708 return true;
4709}
4710
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004711void FieldDescriptorProto::Swap(FieldDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08004712 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08004713 InternalSwap(other);
4714}
4715void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) {
4716 name_.Swap(&other->name_);
4717 std::swap(number_, other->number_);
4718 std::swap(label_, other->label_);
4719 std::swap(type_, other->type_);
4720 type_name_.Swap(&other->type_name_);
4721 extendee_.Swap(&other->extendee_);
4722 default_value_.Swap(&other->default_value_);
4723 std::swap(oneof_index_, other->oneof_index_);
4724 std::swap(options_, other->options_);
4725 std::swap(_has_bits_[0], other->_has_bits_[0]);
4726 _internal_metadata_.Swap(&other->_internal_metadata_);
4727 std::swap(_cached_size_, other->_cached_size_);
4728}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00004729
kenton@google.com80b1d622009-07-29 01:13:20 +00004730::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const {
4731 protobuf_AssignDescriptorsOnce();
4732 ::google::protobuf::Metadata metadata;
4733 metadata.descriptor = FieldDescriptorProto_descriptor_;
4734 metadata.reflection = FieldDescriptorProto_reflection_;
4735 return metadata;
temporal40ee5512008-07-10 02:12:20 +00004736}
4737
Jisi Liu885b6122015-02-28 14:51:22 -08004738#if PROTOBUF_INLINE_NOT_IN_HEADERS
4739// FieldDescriptorProto
4740
4741// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07004742bool FieldDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004743 return (_has_bits_[0] & 0x00000001u) != 0;
4744}
Bo Yang5db21732015-05-21 14:28:59 -07004745void FieldDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004746 _has_bits_[0] |= 0x00000001u;
4747}
Bo Yang5db21732015-05-21 14:28:59 -07004748void FieldDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004749 _has_bits_[0] &= ~0x00000001u;
4750}
Bo Yang5db21732015-05-21 14:28:59 -07004751void FieldDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004752 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4753 clear_has_name();
4754}
4755 const ::std::string& FieldDescriptorProto::name() const {
4756 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name)
4757 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4758}
4759 void FieldDescriptorProto::set_name(const ::std::string& value) {
4760 set_has_name();
4761 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
4762 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name)
4763}
4764 void FieldDescriptorProto::set_name(const char* value) {
4765 set_has_name();
4766 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
4767 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name)
4768}
4769 void FieldDescriptorProto::set_name(const char* value, size_t size) {
4770 set_has_name();
4771 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
4772 ::std::string(reinterpret_cast<const char*>(value), size));
4773 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name)
4774}
4775 ::std::string* FieldDescriptorProto::mutable_name() {
4776 set_has_name();
4777 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name)
4778 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4779}
4780 ::std::string* FieldDescriptorProto::release_name() {
4781 clear_has_name();
4782 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4783}
4784 void FieldDescriptorProto::set_allocated_name(::std::string* name) {
4785 if (name != NULL) {
4786 set_has_name();
4787 } else {
4788 clear_has_name();
4789 }
4790 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
4791 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name)
4792}
4793
4794// optional int32 number = 3;
Bo Yang5db21732015-05-21 14:28:59 -07004795bool FieldDescriptorProto::has_number() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004796 return (_has_bits_[0] & 0x00000002u) != 0;
4797}
Bo Yang5db21732015-05-21 14:28:59 -07004798void FieldDescriptorProto::set_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004799 _has_bits_[0] |= 0x00000002u;
4800}
Bo Yang5db21732015-05-21 14:28:59 -07004801void FieldDescriptorProto::clear_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004802 _has_bits_[0] &= ~0x00000002u;
4803}
Bo Yang5db21732015-05-21 14:28:59 -07004804void FieldDescriptorProto::clear_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08004805 number_ = 0;
4806 clear_has_number();
4807}
4808 ::google::protobuf::int32 FieldDescriptorProto::number() const {
4809 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number)
4810 return number_;
4811}
4812 void FieldDescriptorProto::set_number(::google::protobuf::int32 value) {
4813 set_has_number();
4814 number_ = value;
4815 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number)
4816}
4817
4818// optional .google.protobuf.FieldDescriptorProto.Label label = 4;
Bo Yang5db21732015-05-21 14:28:59 -07004819bool FieldDescriptorProto::has_label() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004820 return (_has_bits_[0] & 0x00000004u) != 0;
4821}
Bo Yang5db21732015-05-21 14:28:59 -07004822void FieldDescriptorProto::set_has_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004823 _has_bits_[0] |= 0x00000004u;
4824}
Bo Yang5db21732015-05-21 14:28:59 -07004825void FieldDescriptorProto::clear_has_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004826 _has_bits_[0] &= ~0x00000004u;
4827}
Bo Yang5db21732015-05-21 14:28:59 -07004828void FieldDescriptorProto::clear_label() {
Jisi Liu885b6122015-02-28 14:51:22 -08004829 label_ = 1;
4830 clear_has_label();
4831}
4832 ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const {
4833 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label)
4834 return static_cast< ::google::protobuf::FieldDescriptorProto_Label >(label_);
4835}
4836 void FieldDescriptorProto::set_label(::google::protobuf::FieldDescriptorProto_Label value) {
4837 assert(::google::protobuf::FieldDescriptorProto_Label_IsValid(value));
4838 set_has_label();
4839 label_ = value;
4840 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.label)
4841}
4842
4843// optional .google.protobuf.FieldDescriptorProto.Type type = 5;
Bo Yang5db21732015-05-21 14:28:59 -07004844bool FieldDescriptorProto::has_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004845 return (_has_bits_[0] & 0x00000008u) != 0;
4846}
Bo Yang5db21732015-05-21 14:28:59 -07004847void FieldDescriptorProto::set_has_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004848 _has_bits_[0] |= 0x00000008u;
4849}
Bo Yang5db21732015-05-21 14:28:59 -07004850void FieldDescriptorProto::clear_has_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004851 _has_bits_[0] &= ~0x00000008u;
4852}
Bo Yang5db21732015-05-21 14:28:59 -07004853void FieldDescriptorProto::clear_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08004854 type_ = 1;
4855 clear_has_type();
4856}
4857 ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const {
4858 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type)
4859 return static_cast< ::google::protobuf::FieldDescriptorProto_Type >(type_);
4860}
4861 void FieldDescriptorProto::set_type(::google::protobuf::FieldDescriptorProto_Type value) {
4862 assert(::google::protobuf::FieldDescriptorProto_Type_IsValid(value));
4863 set_has_type();
4864 type_ = value;
4865 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type)
4866}
4867
4868// optional string type_name = 6;
Bo Yang5db21732015-05-21 14:28:59 -07004869bool FieldDescriptorProto::has_type_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004870 return (_has_bits_[0] & 0x00000010u) != 0;
4871}
Bo Yang5db21732015-05-21 14:28:59 -07004872void FieldDescriptorProto::set_has_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004873 _has_bits_[0] |= 0x00000010u;
4874}
Bo Yang5db21732015-05-21 14:28:59 -07004875void FieldDescriptorProto::clear_has_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004876 _has_bits_[0] &= ~0x00000010u;
4877}
Bo Yang5db21732015-05-21 14:28:59 -07004878void FieldDescriptorProto::clear_type_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08004879 type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4880 clear_has_type_name();
4881}
4882 const ::std::string& FieldDescriptorProto::type_name() const {
4883 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name)
4884 return type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4885}
4886 void FieldDescriptorProto::set_type_name(const ::std::string& value) {
4887 set_has_type_name();
4888 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
4889 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name)
4890}
4891 void FieldDescriptorProto::set_type_name(const char* value) {
4892 set_has_type_name();
4893 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
4894 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name)
4895}
4896 void FieldDescriptorProto::set_type_name(const char* value, size_t size) {
4897 set_has_type_name();
4898 type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
4899 ::std::string(reinterpret_cast<const char*>(value), size));
4900 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name)
4901}
4902 ::std::string* FieldDescriptorProto::mutable_type_name() {
4903 set_has_type_name();
4904 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name)
4905 return type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4906}
4907 ::std::string* FieldDescriptorProto::release_type_name() {
4908 clear_has_type_name();
4909 return type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4910}
4911 void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) {
4912 if (type_name != NULL) {
4913 set_has_type_name();
4914 } else {
4915 clear_has_type_name();
4916 }
4917 type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_name);
4918 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name)
4919}
4920
4921// optional string extendee = 2;
Bo Yang5db21732015-05-21 14:28:59 -07004922bool FieldDescriptorProto::has_extendee() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004923 return (_has_bits_[0] & 0x00000020u) != 0;
4924}
Bo Yang5db21732015-05-21 14:28:59 -07004925void FieldDescriptorProto::set_has_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08004926 _has_bits_[0] |= 0x00000020u;
4927}
Bo Yang5db21732015-05-21 14:28:59 -07004928void FieldDescriptorProto::clear_has_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08004929 _has_bits_[0] &= ~0x00000020u;
4930}
Bo Yang5db21732015-05-21 14:28:59 -07004931void FieldDescriptorProto::clear_extendee() {
Jisi Liu885b6122015-02-28 14:51:22 -08004932 extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4933 clear_has_extendee();
4934}
4935 const ::std::string& FieldDescriptorProto::extendee() const {
4936 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee)
4937 return extendee_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4938}
4939 void FieldDescriptorProto::set_extendee(const ::std::string& value) {
4940 set_has_extendee();
4941 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
4942 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee)
4943}
4944 void FieldDescriptorProto::set_extendee(const char* value) {
4945 set_has_extendee();
4946 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
4947 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee)
4948}
4949 void FieldDescriptorProto::set_extendee(const char* value, size_t size) {
4950 set_has_extendee();
4951 extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
4952 ::std::string(reinterpret_cast<const char*>(value), size));
4953 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee)
4954}
4955 ::std::string* FieldDescriptorProto::mutable_extendee() {
4956 set_has_extendee();
4957 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee)
4958 return extendee_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4959}
4960 ::std::string* FieldDescriptorProto::release_extendee() {
4961 clear_has_extendee();
4962 return extendee_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4963}
4964 void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) {
4965 if (extendee != NULL) {
4966 set_has_extendee();
4967 } else {
4968 clear_has_extendee();
4969 }
4970 extendee_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extendee);
4971 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee)
4972}
4973
4974// optional string default_value = 7;
Bo Yang5db21732015-05-21 14:28:59 -07004975bool FieldDescriptorProto::has_default_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -08004976 return (_has_bits_[0] & 0x00000040u) != 0;
4977}
Bo Yang5db21732015-05-21 14:28:59 -07004978void FieldDescriptorProto::set_has_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08004979 _has_bits_[0] |= 0x00000040u;
4980}
Bo Yang5db21732015-05-21 14:28:59 -07004981void FieldDescriptorProto::clear_has_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08004982 _has_bits_[0] &= ~0x00000040u;
4983}
Bo Yang5db21732015-05-21 14:28:59 -07004984void FieldDescriptorProto::clear_default_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08004985 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4986 clear_has_default_value();
4987}
4988 const ::std::string& FieldDescriptorProto::default_value() const {
4989 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value)
4990 return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4991}
4992 void FieldDescriptorProto::set_default_value(const ::std::string& value) {
4993 set_has_default_value();
4994 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
4995 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value)
4996}
4997 void FieldDescriptorProto::set_default_value(const char* value) {
4998 set_has_default_value();
4999 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5000 // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value)
5001}
5002 void FieldDescriptorProto::set_default_value(const char* value, size_t size) {
5003 set_has_default_value();
5004 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5005 ::std::string(reinterpret_cast<const char*>(value), size));
5006 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value)
5007}
5008 ::std::string* FieldDescriptorProto::mutable_default_value() {
5009 set_has_default_value();
5010 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value)
5011 return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5012}
5013 ::std::string* FieldDescriptorProto::release_default_value() {
5014 clear_has_default_value();
5015 return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5016}
5017 void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) {
5018 if (default_value != NULL) {
5019 set_has_default_value();
5020 } else {
5021 clear_has_default_value();
5022 }
5023 default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value);
5024 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value)
5025}
5026
5027// optional int32 oneof_index = 9;
Bo Yang5db21732015-05-21 14:28:59 -07005028bool FieldDescriptorProto::has_oneof_index() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005029 return (_has_bits_[0] & 0x00000080u) != 0;
5030}
Bo Yang5db21732015-05-21 14:28:59 -07005031void FieldDescriptorProto::set_has_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005032 _has_bits_[0] |= 0x00000080u;
5033}
Bo Yang5db21732015-05-21 14:28:59 -07005034void FieldDescriptorProto::clear_has_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005035 _has_bits_[0] &= ~0x00000080u;
5036}
Bo Yang5db21732015-05-21 14:28:59 -07005037void FieldDescriptorProto::clear_oneof_index() {
Jisi Liu885b6122015-02-28 14:51:22 -08005038 oneof_index_ = 0;
5039 clear_has_oneof_index();
5040}
5041 ::google::protobuf::int32 FieldDescriptorProto::oneof_index() const {
5042 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index)
5043 return oneof_index_;
5044}
5045 void FieldDescriptorProto::set_oneof_index(::google::protobuf::int32 value) {
5046 set_has_oneof_index();
5047 oneof_index_ = value;
5048 // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index)
5049}
5050
5051// optional .google.protobuf.FieldOptions options = 8;
Bo Yang5db21732015-05-21 14:28:59 -07005052bool FieldDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005053 return (_has_bits_[0] & 0x00000100u) != 0;
5054}
Bo Yang5db21732015-05-21 14:28:59 -07005055void FieldDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005056 _has_bits_[0] |= 0x00000100u;
5057}
Bo Yang5db21732015-05-21 14:28:59 -07005058void FieldDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005059 _has_bits_[0] &= ~0x00000100u;
5060}
Bo Yang5db21732015-05-21 14:28:59 -07005061void FieldDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005062 if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear();
5063 clear_has_options();
5064}
5065 const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const {
5066 // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options)
5067 return options_ != NULL ? *options_ : *default_instance_->options_;
5068}
5069 ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() {
5070 set_has_options();
5071 if (options_ == NULL) {
5072 options_ = new ::google::protobuf::FieldOptions;
5073 }
5074 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options)
5075 return options_;
5076}
5077 ::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() {
5078 clear_has_options();
5079 ::google::protobuf::FieldOptions* temp = options_;
5080 options_ = NULL;
5081 return temp;
5082}
5083 void FieldDescriptorProto::set_allocated_options(::google::protobuf::FieldOptions* options) {
5084 delete options_;
5085 options_ = options;
5086 if (options) {
5087 set_has_options();
5088 } else {
5089 clear_has_options();
5090 }
5091 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.options)
5092}
5093
5094#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00005095
5096// ===================================================================
5097
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005098#ifndef _MSC_VER
jieluo@google.com4de8f552014-07-18 00:47:59 +00005099const int OneofDescriptorProto::kNameFieldNumber;
5100#endif // !_MSC_VER
5101
5102OneofDescriptorProto::OneofDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07005103 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005104 SharedCtor();
5105 // @@protoc_insertion_point(constructor:google.protobuf.OneofDescriptorProto)
5106}
5107
5108void OneofDescriptorProto::InitAsDefaultInstance() {
5109}
5110
5111OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08005112 : ::google::protobuf::Message(),
5113 _internal_metadata_(NULL) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005114 SharedCtor();
5115 MergeFrom(from);
5116 // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto)
5117}
5118
5119void OneofDescriptorProto::SharedCtor() {
5120 ::google::protobuf::internal::GetEmptyString();
5121 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005122 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005123 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5124}
5125
5126OneofDescriptorProto::~OneofDescriptorProto() {
5127 // @@protoc_insertion_point(destructor:google.protobuf.OneofDescriptorProto)
5128 SharedDtor();
5129}
5130
5131void OneofDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08005132 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005133 if (this != default_instance_) {
5134 }
5135}
5136
5137void OneofDescriptorProto::SetCachedSize(int size) const {
5138 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5139 _cached_size_ = size;
5140 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5141}
5142const ::google::protobuf::Descriptor* OneofDescriptorProto::descriptor() {
5143 protobuf_AssignDescriptorsOnce();
5144 return OneofDescriptorProto_descriptor_;
5145}
5146
5147const OneofDescriptorProto& OneofDescriptorProto::default_instance() {
5148 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
5149 return *default_instance_;
5150}
5151
5152OneofDescriptorProto* OneofDescriptorProto::default_instance_ = NULL;
5153
Feng Xiao6ef984a2014-11-10 17:34:54 -08005154OneofDescriptorProto* OneofDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08005155 OneofDescriptorProto* n = new OneofDescriptorProto;
5156 if (arena != NULL) {
5157 arena->Own(n);
5158 }
5159 return n;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005160}
5161
5162void OneofDescriptorProto::Clear() {
5163 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005164 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005165 }
5166 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08005167 if (_internal_metadata_.have_unknown_fields()) {
5168 mutable_unknown_fields()->Clear();
5169 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005170}
5171
5172bool OneofDescriptorProto::MergePartialFromCodedStream(
5173 ::google::protobuf::io::CodedInputStream* input) {
5174#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
5175 ::google::protobuf::uint32 tag;
5176 // @@protoc_insertion_point(parse_start:google.protobuf.OneofDescriptorProto)
5177 for (;;) {
5178 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
5179 tag = p.first;
5180 if (!p.second) goto handle_unusual;
5181 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
5182 // optional string name = 1;
5183 case 1: {
5184 if (tag == 10) {
5185 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5186 input, this->mutable_name()));
5187 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5188 this->name().data(), this->name().length(),
5189 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005190 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005191 } else {
5192 goto handle_unusual;
5193 }
5194 if (input->ExpectAtEnd()) goto success;
5195 break;
5196 }
5197
5198 default: {
5199 handle_unusual:
5200 if (tag == 0 ||
5201 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
5202 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
5203 goto success;
5204 }
5205 DO_(::google::protobuf::internal::WireFormat::SkipField(
5206 input, tag, mutable_unknown_fields()));
5207 break;
5208 }
5209 }
5210 }
5211success:
5212 // @@protoc_insertion_point(parse_success:google.protobuf.OneofDescriptorProto)
5213 return true;
5214failure:
5215 // @@protoc_insertion_point(parse_failure:google.protobuf.OneofDescriptorProto)
5216 return false;
5217#undef DO_
5218}
5219
5220void OneofDescriptorProto::SerializeWithCachedSizes(
5221 ::google::protobuf::io::CodedOutputStream* output) const {
5222 // @@protoc_insertion_point(serialize_start:google.protobuf.OneofDescriptorProto)
5223 // optional string name = 1;
5224 if (has_name()) {
5225 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5226 this->name().data(), this->name().length(),
5227 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005228 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005229 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5230 1, this->name(), output);
5231 }
5232
Feng Xiao6ef984a2014-11-10 17:34:54 -08005233 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005234 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5235 unknown_fields(), output);
5236 }
5237 // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto)
5238}
5239
5240::google::protobuf::uint8* OneofDescriptorProto::SerializeWithCachedSizesToArray(
5241 ::google::protobuf::uint8* target) const {
5242 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto)
5243 // optional string name = 1;
5244 if (has_name()) {
5245 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5246 this->name().data(), this->name().length(),
5247 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005248 "google.protobuf.OneofDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005249 target =
5250 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5251 1, this->name(), target);
5252 }
5253
Feng Xiao6ef984a2014-11-10 17:34:54 -08005254 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005255 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5256 unknown_fields(), target);
5257 }
5258 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto)
5259 return target;
5260}
5261
5262int OneofDescriptorProto::ByteSize() const {
5263 int total_size = 0;
5264
Feng Xiao6ef984a2014-11-10 17:34:54 -08005265 // optional string name = 1;
5266 if (has_name()) {
5267 total_size += 1 +
5268 ::google::protobuf::internal::WireFormatLite::StringSize(
5269 this->name());
jieluo@google.com4de8f552014-07-18 00:47:59 +00005270 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005271
5272 if (_internal_metadata_.have_unknown_fields()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005273 total_size +=
5274 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5275 unknown_fields());
5276 }
5277 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5278 _cached_size_ = total_size;
5279 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5280 return total_size;
5281}
5282
5283void OneofDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005284 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07005285 const OneofDescriptorProto* source =
5286 ::google::protobuf::internal::DynamicCastToGenerated<const OneofDescriptorProto>(
5287 &from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005288 if (source == NULL) {
5289 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
5290 } else {
5291 MergeFrom(*source);
5292 }
5293}
5294
5295void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005296 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005297 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
5298 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005299 set_has_name();
5300 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005301 }
5302 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005303 if (from._internal_metadata_.have_unknown_fields()) {
5304 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5305 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005306}
5307
5308void OneofDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
5309 if (&from == this) return;
5310 Clear();
5311 MergeFrom(from);
5312}
5313
5314void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) {
5315 if (&from == this) return;
5316 Clear();
5317 MergeFrom(from);
5318}
5319
5320bool OneofDescriptorProto::IsInitialized() const {
5321
5322 return true;
5323}
5324
5325void OneofDescriptorProto::Swap(OneofDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08005326 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005327 InternalSwap(other);
5328}
5329void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
5330 name_.Swap(&other->name_);
5331 std::swap(_has_bits_[0], other->_has_bits_[0]);
5332 _internal_metadata_.Swap(&other->_internal_metadata_);
5333 std::swap(_cached_size_, other->_cached_size_);
5334}
jieluo@google.com4de8f552014-07-18 00:47:59 +00005335
5336::google::protobuf::Metadata OneofDescriptorProto::GetMetadata() const {
5337 protobuf_AssignDescriptorsOnce();
5338 ::google::protobuf::Metadata metadata;
5339 metadata.descriptor = OneofDescriptorProto_descriptor_;
5340 metadata.reflection = OneofDescriptorProto_reflection_;
5341 return metadata;
5342}
5343
Jisi Liu885b6122015-02-28 14:51:22 -08005344#if PROTOBUF_INLINE_NOT_IN_HEADERS
5345// OneofDescriptorProto
5346
5347// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07005348bool OneofDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005349 return (_has_bits_[0] & 0x00000001u) != 0;
5350}
Bo Yang5db21732015-05-21 14:28:59 -07005351void OneofDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005352 _has_bits_[0] |= 0x00000001u;
5353}
Bo Yang5db21732015-05-21 14:28:59 -07005354void OneofDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005355 _has_bits_[0] &= ~0x00000001u;
5356}
Bo Yang5db21732015-05-21 14:28:59 -07005357void OneofDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005358 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5359 clear_has_name();
5360}
5361 const ::std::string& OneofDescriptorProto::name() const {
5362 // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name)
5363 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5364}
5365 void OneofDescriptorProto::set_name(const ::std::string& value) {
5366 set_has_name();
5367 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5368 // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name)
5369}
5370 void OneofDescriptorProto::set_name(const char* value) {
5371 set_has_name();
5372 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5373 // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name)
5374}
5375 void OneofDescriptorProto::set_name(const char* value, size_t size) {
5376 set_has_name();
5377 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5378 ::std::string(reinterpret_cast<const char*>(value), size));
5379 // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name)
5380}
5381 ::std::string* OneofDescriptorProto::mutable_name() {
5382 set_has_name();
5383 // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name)
5384 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5385}
5386 ::std::string* OneofDescriptorProto::release_name() {
5387 clear_has_name();
5388 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5389}
5390 void OneofDescriptorProto::set_allocated_name(::std::string* name) {
5391 if (name != NULL) {
5392 set_has_name();
5393 } else {
5394 clear_has_name();
5395 }
5396 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
5397 // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name)
5398}
5399
5400#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
jieluo@google.com4de8f552014-07-18 00:47:59 +00005401
5402// ===================================================================
5403
5404#ifndef _MSC_VER
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005405const int EnumDescriptorProto::kNameFieldNumber;
5406const int EnumDescriptorProto::kValueFieldNumber;
5407const int EnumDescriptorProto::kOptionsFieldNumber;
5408#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00005409
kenton@google.com573989f2009-10-30 22:02:17 +00005410EnumDescriptorProto::EnumDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07005411 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005412 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00005413 // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00005414}
5415
kenton@google.com80b1d622009-07-29 01:13:20 +00005416void EnumDescriptorProto::InitAsDefaultInstance() {
5417 options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00005418}
5419
kenton@google.com573989f2009-10-30 22:02:17 +00005420EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08005421 : ::google::protobuf::Message(),
5422 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005423 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005424 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005425 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005426}
5427
kenton@google.comd37d46d2009-04-25 02:53:47 +00005428void EnumDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005429 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00005430 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005431 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00005432 options_ = NULL;
5433 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5434}
5435
temporal40ee5512008-07-10 02:12:20 +00005436EnumDescriptorProto::~EnumDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005437 // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005438 SharedDtor();
5439}
5440
5441void EnumDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08005442 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00005443 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00005444 delete options_;
5445 }
5446}
5447
kenton@google.comfccb1462009-12-18 02:11:36 +00005448void EnumDescriptorProto::SetCachedSize(int size) const {
5449 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5450 _cached_size_ = size;
5451 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5452}
temporal40ee5512008-07-10 02:12:20 +00005453const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005454 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00005455 return EnumDescriptorProto_descriptor_;
5456}
5457
kenton@google.com24bf56f2008-09-24 20:31:01 +00005458const EnumDescriptorProto& EnumDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00005459 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
5460 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005461}
5462
5463EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL;
5464
Feng Xiao6ef984a2014-11-10 17:34:54 -08005465EnumDescriptorProto* EnumDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08005466 EnumDescriptorProto* n = new EnumDescriptorProto;
5467 if (arena != NULL) {
5468 arena->Own(n);
5469 }
5470 return n;
temporal40ee5512008-07-10 02:12:20 +00005471}
5472
5473void EnumDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07005474 if (_has_bits_[0 / 32] & 5u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005475 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005476 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00005477 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005478 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00005479 if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear();
5480 }
5481 }
5482 value_.Clear();
5483 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08005484 if (_internal_metadata_.have_unknown_fields()) {
5485 mutable_unknown_fields()->Clear();
5486 }
temporal40ee5512008-07-10 02:12:20 +00005487}
5488
5489bool EnumDescriptorProto::MergePartialFromCodedStream(
5490 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005491#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00005492 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005493 // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto)
5494 for (;;) {
5495 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
5496 tag = p.first;
5497 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00005498 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00005499 // optional string name = 1;
5500 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005501 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005502 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5503 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00005504 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00005505 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005506 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005507 "google.protobuf.EnumDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00005508 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005509 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005510 }
temporal40ee5512008-07-10 02:12:20 +00005511 if (input->ExpectTag(18)) goto parse_value;
5512 break;
5513 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005514
temporal40ee5512008-07-10 02:12:20 +00005515 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
5516 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005517 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005518 parse_value:
Bo Yang5db21732015-05-21 14:28:59 -07005519 DO_(input->IncrementRecursionDepth());
5520 parse_loop_value:
5521 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00005522 input, add_value()));
5523 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005524 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005525 }
Bo Yang5db21732015-05-21 14:28:59 -07005526 if (input->ExpectTag(18)) goto parse_loop_value;
5527 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00005528 if (input->ExpectTag(26)) goto parse_options;
5529 break;
5530 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005531
temporal40ee5512008-07-10 02:12:20 +00005532 // optional .google.protobuf.EnumOptions options = 3;
5533 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005534 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005535 parse_options:
5536 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
5537 input, mutable_options()));
5538 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005539 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005540 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005541 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00005542 break;
5543 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005544
temporal40ee5512008-07-10 02:12:20 +00005545 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005546 handle_unusual:
5547 if (tag == 0 ||
5548 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00005549 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005550 goto success;
temporal40ee5512008-07-10 02:12:20 +00005551 }
5552 DO_(::google::protobuf::internal::WireFormat::SkipField(
5553 input, tag, mutable_unknown_fields()));
5554 break;
5555 }
5556 }
5557 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005558success:
5559 // @@protoc_insertion_point(parse_success:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005560 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005561failure:
5562 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumDescriptorProto)
5563 return false;
temporal40ee5512008-07-10 02:12:20 +00005564#undef DO_
5565}
5566
kenton@google.comd37d46d2009-04-25 02:53:47 +00005567void EnumDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00005568 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005569 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005570 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005571 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005572 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00005573 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005574 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005575 "google.protobuf.EnumDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00005576 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00005577 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00005578 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005579
temporal40ee5512008-07-10 02:12:20 +00005580 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08005581 for (unsigned int i = 0, n = this->value_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005582 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00005583 2, this->value(i), output);
temporal40ee5512008-07-10 02:12:20 +00005584 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005585
temporal40ee5512008-07-10 02:12:20 +00005586 // optional .google.protobuf.EnumOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005587 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005588 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08005589 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00005590 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005591
Feng Xiao6ef984a2014-11-10 17:34:54 -08005592 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005593 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5594 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00005595 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005596 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005597}
5598
5599::google::protobuf::uint8* EnumDescriptorProto::SerializeWithCachedSizesToArray(
5600 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005601 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005602 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005603 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005604 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00005605 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005606 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005607 "google.protobuf.EnumDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00005608 target =
5609 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5610 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005611 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005612
kenton@google.comd37d46d2009-04-25 02:53:47 +00005613 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08005614 for (unsigned int i = 0, n = this->value_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005615 target = ::google::protobuf::internal::WireFormatLite::
5616 WriteMessageNoVirtualToArray(
5617 2, this->value(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005618 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005619
kenton@google.comd37d46d2009-04-25 02:53:47 +00005620 // optional .google.protobuf.EnumOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005621 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00005622 target = ::google::protobuf::internal::WireFormatLite::
5623 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08005624 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00005625 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005626
Feng Xiao6ef984a2014-11-10 17:34:54 -08005627 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005628 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5629 unknown_fields(), target);
5630 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00005631 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005632 return target;
temporal40ee5512008-07-10 02:12:20 +00005633}
5634
5635int EnumDescriptorProto::ByteSize() const {
5636 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005637
Austin Schuh307af622015-06-05 22:46:01 -07005638 if (_has_bits_[0 / 32] & 5u) {
temporal40ee5512008-07-10 02:12:20 +00005639 // optional string name = 1;
5640 if (has_name()) {
5641 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00005642 ::google::protobuf::internal::WireFormatLite::StringSize(
5643 this->name());
temporal40ee5512008-07-10 02:12:20 +00005644 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005645
temporal40ee5512008-07-10 02:12:20 +00005646 // optional .google.protobuf.EnumOptions options = 3;
5647 if (has_options()) {
5648 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00005649 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08005650 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00005651 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005652
temporal40ee5512008-07-10 02:12:20 +00005653 }
5654 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00005655 total_size += 1 * this->value_size();
5656 for (int i = 0; i < this->value_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00005657 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00005658 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00005659 this->value(i));
5660 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005661
Feng Xiao6ef984a2014-11-10 17:34:54 -08005662 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00005663 total_size +=
5664 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5665 unknown_fields());
5666 }
kenton@google.comfccb1462009-12-18 02:11:36 +00005667 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00005668 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00005669 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00005670 return total_size;
5671}
5672
5673void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005674 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07005675 const EnumDescriptorProto* source =
5676 ::google::protobuf::internal::DynamicCastToGenerated<const EnumDescriptorProto>(
5677 &from);
temporal40ee5512008-07-10 02:12:20 +00005678 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00005679 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00005680 } else {
5681 MergeFrom(*source);
5682 }
5683}
5684
5685void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08005686 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00005687 value_.MergeFrom(from.value_);
5688 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005689 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005690 set_has_name();
5691 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00005692 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00005693 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00005694 mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options());
5695 }
5696 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08005697 if (from._internal_metadata_.have_unknown_fields()) {
5698 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
5699 }
temporal40ee5512008-07-10 02:12:20 +00005700}
5701
5702void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
5703 if (&from == this) return;
5704 Clear();
5705 MergeFrom(from);
5706}
5707
5708void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) {
5709 if (&from == this) return;
5710 Clear();
5711 MergeFrom(from);
5712}
5713
5714bool EnumDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005715
jieluo@google.com4de8f552014-07-18 00:47:59 +00005716 if (!::google::protobuf::internal::AllAreInitialized(this->value())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005717 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005718 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005719 }
temporal40ee5512008-07-10 02:12:20 +00005720 return true;
5721}
5722
kenton@google.comceb561d2009-06-25 19:05:36 +00005723void EnumDescriptorProto::Swap(EnumDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08005724 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005725 InternalSwap(other);
5726}
5727void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) {
5728 name_.Swap(&other->name_);
5729 value_.UnsafeArenaSwap(&other->value_);
5730 std::swap(options_, other->options_);
5731 std::swap(_has_bits_[0], other->_has_bits_[0]);
5732 _internal_metadata_.Swap(&other->_internal_metadata_);
5733 std::swap(_cached_size_, other->_cached_size_);
5734}
kenton@google.comceb561d2009-06-25 19:05:36 +00005735
kenton@google.com80b1d622009-07-29 01:13:20 +00005736::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const {
5737 protobuf_AssignDescriptorsOnce();
5738 ::google::protobuf::Metadata metadata;
5739 metadata.descriptor = EnumDescriptorProto_descriptor_;
5740 metadata.reflection = EnumDescriptorProto_reflection_;
5741 return metadata;
temporal40ee5512008-07-10 02:12:20 +00005742}
5743
Jisi Liu885b6122015-02-28 14:51:22 -08005744#if PROTOBUF_INLINE_NOT_IN_HEADERS
5745// EnumDescriptorProto
5746
5747// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07005748bool EnumDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005749 return (_has_bits_[0] & 0x00000001u) != 0;
5750}
Bo Yang5db21732015-05-21 14:28:59 -07005751void EnumDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005752 _has_bits_[0] |= 0x00000001u;
5753}
Bo Yang5db21732015-05-21 14:28:59 -07005754void EnumDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005755 _has_bits_[0] &= ~0x00000001u;
5756}
Bo Yang5db21732015-05-21 14:28:59 -07005757void EnumDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08005758 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5759 clear_has_name();
5760}
5761 const ::std::string& EnumDescriptorProto::name() const {
5762 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name)
5763 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5764}
5765 void EnumDescriptorProto::set_name(const ::std::string& value) {
5766 set_has_name();
5767 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
5768 // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name)
5769}
5770 void EnumDescriptorProto::set_name(const char* value) {
5771 set_has_name();
5772 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
5773 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name)
5774}
5775 void EnumDescriptorProto::set_name(const char* value, size_t size) {
5776 set_has_name();
5777 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
5778 ::std::string(reinterpret_cast<const char*>(value), size));
5779 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name)
5780}
5781 ::std::string* EnumDescriptorProto::mutable_name() {
5782 set_has_name();
5783 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name)
5784 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5785}
5786 ::std::string* EnumDescriptorProto::release_name() {
5787 clear_has_name();
5788 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5789}
5790 void EnumDescriptorProto::set_allocated_name(::std::string* name) {
5791 if (name != NULL) {
5792 set_has_name();
5793 } else {
5794 clear_has_name();
5795 }
5796 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
5797 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name)
5798}
5799
5800// repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Bo Yang5db21732015-05-21 14:28:59 -07005801int EnumDescriptorProto::value_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005802 return value_.size();
5803}
Bo Yang5db21732015-05-21 14:28:59 -07005804void EnumDescriptorProto::clear_value() {
Jisi Liu885b6122015-02-28 14:51:22 -08005805 value_.Clear();
5806}
5807 const ::google::protobuf::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const {
5808 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value)
5809 return value_.Get(index);
5810}
5811 ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) {
5812 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.value)
5813 return value_.Mutable(index);
5814}
5815 ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::add_value() {
5816 // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value)
5817 return value_.Add();
5818}
5819 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >&
5820EnumDescriptorProto::value() const {
5821 // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value)
5822 return value_;
5823}
5824 ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >*
5825EnumDescriptorProto::mutable_value() {
5826 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value)
5827 return &value_;
5828}
5829
5830// optional .google.protobuf.EnumOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07005831bool EnumDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08005832 return (_has_bits_[0] & 0x00000004u) != 0;
5833}
Bo Yang5db21732015-05-21 14:28:59 -07005834void EnumDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005835 _has_bits_[0] |= 0x00000004u;
5836}
Bo Yang5db21732015-05-21 14:28:59 -07005837void EnumDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005838 _has_bits_[0] &= ~0x00000004u;
5839}
Bo Yang5db21732015-05-21 14:28:59 -07005840void EnumDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08005841 if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear();
5842 clear_has_options();
5843}
5844 const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const {
5845 // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options)
5846 return options_ != NULL ? *options_ : *default_instance_->options_;
5847}
5848 ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() {
5849 set_has_options();
5850 if (options_ == NULL) {
5851 options_ = new ::google::protobuf::EnumOptions;
5852 }
5853 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options)
5854 return options_;
5855}
5856 ::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() {
5857 clear_has_options();
5858 ::google::protobuf::EnumOptions* temp = options_;
5859 options_ = NULL;
5860 return temp;
5861}
5862 void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumOptions* options) {
5863 delete options_;
5864 options_ = options;
5865 if (options) {
5866 set_has_options();
5867 } else {
5868 clear_has_options();
5869 }
5870 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.options)
5871}
5872
5873#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00005874
5875// ===================================================================
5876
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00005877#ifndef _MSC_VER
5878const int EnumValueDescriptorProto::kNameFieldNumber;
5879const int EnumValueDescriptorProto::kNumberFieldNumber;
5880const int EnumValueDescriptorProto::kOptionsFieldNumber;
5881#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00005882
kenton@google.com573989f2009-10-30 22:02:17 +00005883EnumValueDescriptorProto::EnumValueDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07005884 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005885 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00005886 // @@protoc_insertion_point(constructor:google.protobuf.EnumValueDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00005887}
5888
kenton@google.com80b1d622009-07-29 01:13:20 +00005889void EnumValueDescriptorProto::InitAsDefaultInstance() {
5890 options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00005891}
5892
kenton@google.com573989f2009-10-30 22:02:17 +00005893EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08005894 : ::google::protobuf::Message(),
5895 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005896 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00005897 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00005898 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00005899}
5900
kenton@google.comd37d46d2009-04-25 02:53:47 +00005901void EnumValueDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005902 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00005903 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08005904 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00005905 number_ = 0;
5906 options_ = NULL;
5907 ::memset(_has_bits_, 0, sizeof(_has_bits_));
5908}
5909
temporal40ee5512008-07-10 02:12:20 +00005910EnumValueDescriptorProto::~EnumValueDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005911 // @@protoc_insertion_point(destructor:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00005912 SharedDtor();
5913}
5914
5915void EnumValueDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08005916 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00005917 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00005918 delete options_;
5919 }
5920}
5921
kenton@google.comfccb1462009-12-18 02:11:36 +00005922void EnumValueDescriptorProto::SetCachedSize(int size) const {
5923 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5924 _cached_size_ = size;
5925 GOOGLE_SAFE_CONCURRENT_WRITES_END();
5926}
temporal40ee5512008-07-10 02:12:20 +00005927const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00005928 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00005929 return EnumValueDescriptorProto_descriptor_;
5930}
5931
kenton@google.com24bf56f2008-09-24 20:31:01 +00005932const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00005933 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
5934 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00005935}
5936
5937EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL;
5938
Feng Xiao6ef984a2014-11-10 17:34:54 -08005939EnumValueDescriptorProto* EnumValueDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08005940 EnumValueDescriptorProto* n = new EnumValueDescriptorProto;
5941 if (arena != NULL) {
5942 arena->Own(n);
5943 }
5944 return n;
temporal40ee5512008-07-10 02:12:20 +00005945}
5946
5947void EnumValueDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07005948 if (_has_bits_[0 / 32] & 7u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00005949 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08005950 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00005951 }
5952 number_ = 0;
liujisi@google.com33165fe2010-11-02 13:14:58 +00005953 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00005954 if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear();
5955 }
5956 }
5957 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08005958 if (_internal_metadata_.have_unknown_fields()) {
5959 mutable_unknown_fields()->Clear();
5960 }
temporal40ee5512008-07-10 02:12:20 +00005961}
5962
5963bool EnumValueDescriptorProto::MergePartialFromCodedStream(
5964 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005965#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00005966 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00005967 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueDescriptorProto)
5968 for (;;) {
5969 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
5970 tag = p.first;
5971 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00005972 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00005973 // optional string name = 1;
5974 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005975 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005976 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5977 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00005978 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00005979 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00005980 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08005981 "google.protobuf.EnumValueDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00005982 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005983 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005984 }
temporal40ee5512008-07-10 02:12:20 +00005985 if (input->ExpectTag(16)) goto parse_number;
5986 break;
5987 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00005988
temporal40ee5512008-07-10 02:12:20 +00005989 // optional int32 number = 2;
5990 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005991 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00005992 parse_number:
5993 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
5994 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
5995 input, &number_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00005996 set_has_number();
kenton@google.comfccb1462009-12-18 02:11:36 +00005997 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00005998 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00005999 }
temporal40ee5512008-07-10 02:12:20 +00006000 if (input->ExpectTag(26)) goto parse_options;
6001 break;
6002 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006003
temporal40ee5512008-07-10 02:12:20 +00006004 // optional .google.protobuf.EnumValueOptions options = 3;
6005 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006006 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006007 parse_options:
6008 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6009 input, mutable_options()));
6010 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006011 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006012 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006013 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00006014 break;
6015 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006016
temporal40ee5512008-07-10 02:12:20 +00006017 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006018 handle_unusual:
6019 if (tag == 0 ||
6020 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006021 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006022 goto success;
temporal40ee5512008-07-10 02:12:20 +00006023 }
6024 DO_(::google::protobuf::internal::WireFormat::SkipField(
6025 input, tag, mutable_unknown_fields()));
6026 break;
6027 }
6028 }
6029 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006030success:
6031 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006032 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006033failure:
6034 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueDescriptorProto)
6035 return false;
temporal40ee5512008-07-10 02:12:20 +00006036#undef DO_
6037}
6038
kenton@google.comd37d46d2009-04-25 02:53:47 +00006039void EnumValueDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00006040 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006041 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006042 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006043 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006044 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006045 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006046 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006047 "google.protobuf.EnumValueDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00006048 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00006049 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00006050 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006051
temporal40ee5512008-07-10 02:12:20 +00006052 // optional int32 number = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006053 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006054 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output);
temporal40ee5512008-07-10 02:12:20 +00006055 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006056
temporal40ee5512008-07-10 02:12:20 +00006057 // optional .google.protobuf.EnumValueOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006058 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006059 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006060 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00006061 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006062
Feng Xiao6ef984a2014-11-10 17:34:54 -08006063 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006064 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6065 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00006066 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006067 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006068}
6069
6070::google::protobuf::uint8* EnumValueDescriptorProto::SerializeWithCachedSizesToArray(
6071 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006072 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006073 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006074 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006075 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006076 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006077 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006078 "google.protobuf.EnumValueDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00006079 target =
6080 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6081 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006082 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006083
kenton@google.comd37d46d2009-04-25 02:53:47 +00006084 // optional int32 number = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006085 if (has_number()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006086 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006087 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006088
kenton@google.comd37d46d2009-04-25 02:53:47 +00006089 // optional .google.protobuf.EnumValueOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006090 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006091 target = ::google::protobuf::internal::WireFormatLite::
6092 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006093 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006094 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006095
Feng Xiao6ef984a2014-11-10 17:34:54 -08006096 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006097 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6098 unknown_fields(), target);
6099 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006100 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006101 return target;
temporal40ee5512008-07-10 02:12:20 +00006102}
6103
6104int EnumValueDescriptorProto::ByteSize() const {
6105 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006106
Austin Schuh307af622015-06-05 22:46:01 -07006107 if (_has_bits_[0 / 32] & 7u) {
temporal40ee5512008-07-10 02:12:20 +00006108 // optional string name = 1;
6109 if (has_name()) {
6110 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006111 ::google::protobuf::internal::WireFormatLite::StringSize(
6112 this->name());
temporal40ee5512008-07-10 02:12:20 +00006113 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006114
temporal40ee5512008-07-10 02:12:20 +00006115 // optional int32 number = 2;
6116 if (has_number()) {
6117 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006118 ::google::protobuf::internal::WireFormatLite::Int32Size(
temporal40ee5512008-07-10 02:12:20 +00006119 this->number());
6120 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006121
temporal40ee5512008-07-10 02:12:20 +00006122 // optional .google.protobuf.EnumValueOptions options = 3;
6123 if (has_options()) {
6124 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006125 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08006126 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00006127 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006128
temporal40ee5512008-07-10 02:12:20 +00006129 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006130 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00006131 total_size +=
6132 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6133 unknown_fields());
6134 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006135 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00006136 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006137 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00006138 return total_size;
6139}
6140
6141void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006142 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07006143 const EnumValueDescriptorProto* source =
6144 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueDescriptorProto>(
6145 &from);
temporal40ee5512008-07-10 02:12:20 +00006146 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00006147 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00006148 } else {
6149 MergeFrom(*source);
6150 }
6151}
6152
6153void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006154 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00006155 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006156 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006157 set_has_name();
6158 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00006159 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006160 if (from.has_number()) {
temporal40ee5512008-07-10 02:12:20 +00006161 set_number(from.number());
6162 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006163 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006164 mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options());
6165 }
6166 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006167 if (from._internal_metadata_.have_unknown_fields()) {
6168 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6169 }
temporal40ee5512008-07-10 02:12:20 +00006170}
6171
6172void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
6173 if (&from == this) return;
6174 Clear();
6175 MergeFrom(from);
6176}
6177
6178void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) {
6179 if (&from == this) return;
6180 Clear();
6181 MergeFrom(from);
6182}
6183
kenton@google.comceb561d2009-06-25 19:05:36 +00006184bool EnumValueDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006185
kenton@google.comceb561d2009-06-25 19:05:36 +00006186 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006187 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00006188 }
6189 return true;
6190}
6191
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006192void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08006193 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006194 InternalSwap(other);
6195}
6196void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) {
6197 name_.Swap(&other->name_);
6198 std::swap(number_, other->number_);
6199 std::swap(options_, other->options_);
6200 std::swap(_has_bits_[0], other->_has_bits_[0]);
6201 _internal_metadata_.Swap(&other->_internal_metadata_);
6202 std::swap(_cached_size_, other->_cached_size_);
6203}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00006204
kenton@google.com80b1d622009-07-29 01:13:20 +00006205::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const {
6206 protobuf_AssignDescriptorsOnce();
6207 ::google::protobuf::Metadata metadata;
6208 metadata.descriptor = EnumValueDescriptorProto_descriptor_;
6209 metadata.reflection = EnumValueDescriptorProto_reflection_;
6210 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006211}
6212
Jisi Liu885b6122015-02-28 14:51:22 -08006213#if PROTOBUF_INLINE_NOT_IN_HEADERS
6214// EnumValueDescriptorProto
6215
6216// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07006217bool EnumValueDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006218 return (_has_bits_[0] & 0x00000001u) != 0;
6219}
Bo Yang5db21732015-05-21 14:28:59 -07006220void EnumValueDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006221 _has_bits_[0] |= 0x00000001u;
6222}
Bo Yang5db21732015-05-21 14:28:59 -07006223void EnumValueDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006224 _has_bits_[0] &= ~0x00000001u;
6225}
Bo Yang5db21732015-05-21 14:28:59 -07006226void EnumValueDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006227 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6228 clear_has_name();
6229}
6230 const ::std::string& EnumValueDescriptorProto::name() const {
6231 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name)
6232 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6233}
6234 void EnumValueDescriptorProto::set_name(const ::std::string& value) {
6235 set_has_name();
6236 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
6237 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name)
6238}
6239 void EnumValueDescriptorProto::set_name(const char* value) {
6240 set_has_name();
6241 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
6242 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name)
6243}
6244 void EnumValueDescriptorProto::set_name(const char* value, size_t size) {
6245 set_has_name();
6246 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
6247 ::std::string(reinterpret_cast<const char*>(value), size));
6248 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name)
6249}
6250 ::std::string* EnumValueDescriptorProto::mutable_name() {
6251 set_has_name();
6252 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name)
6253 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6254}
6255 ::std::string* EnumValueDescriptorProto::release_name() {
6256 clear_has_name();
6257 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6258}
6259 void EnumValueDescriptorProto::set_allocated_name(::std::string* name) {
6260 if (name != NULL) {
6261 set_has_name();
6262 } else {
6263 clear_has_name();
6264 }
6265 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
6266 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name)
6267}
6268
6269// optional int32 number = 2;
Bo Yang5db21732015-05-21 14:28:59 -07006270bool EnumValueDescriptorProto::has_number() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006271 return (_has_bits_[0] & 0x00000002u) != 0;
6272}
Bo Yang5db21732015-05-21 14:28:59 -07006273void EnumValueDescriptorProto::set_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006274 _has_bits_[0] |= 0x00000002u;
6275}
Bo Yang5db21732015-05-21 14:28:59 -07006276void EnumValueDescriptorProto::clear_has_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006277 _has_bits_[0] &= ~0x00000002u;
6278}
Bo Yang5db21732015-05-21 14:28:59 -07006279void EnumValueDescriptorProto::clear_number() {
Jisi Liu885b6122015-02-28 14:51:22 -08006280 number_ = 0;
6281 clear_has_number();
6282}
6283 ::google::protobuf::int32 EnumValueDescriptorProto::number() const {
6284 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number)
6285 return number_;
6286}
6287 void EnumValueDescriptorProto::set_number(::google::protobuf::int32 value) {
6288 set_has_number();
6289 number_ = value;
6290 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number)
6291}
6292
6293// optional .google.protobuf.EnumValueOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07006294bool EnumValueDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006295 return (_has_bits_[0] & 0x00000004u) != 0;
6296}
Bo Yang5db21732015-05-21 14:28:59 -07006297void EnumValueDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006298 _has_bits_[0] |= 0x00000004u;
6299}
Bo Yang5db21732015-05-21 14:28:59 -07006300void EnumValueDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006301 _has_bits_[0] &= ~0x00000004u;
6302}
Bo Yang5db21732015-05-21 14:28:59 -07006303void EnumValueDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006304 if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear();
6305 clear_has_options();
6306}
6307 const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const {
6308 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options)
6309 return options_ != NULL ? *options_ : *default_instance_->options_;
6310}
6311 ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() {
6312 set_has_options();
6313 if (options_ == NULL) {
6314 options_ = new ::google::protobuf::EnumValueOptions;
6315 }
6316 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options)
6317 return options_;
6318}
6319 ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() {
6320 clear_has_options();
6321 ::google::protobuf::EnumValueOptions* temp = options_;
6322 options_ = NULL;
6323 return temp;
6324}
6325 void EnumValueDescriptorProto::set_allocated_options(::google::protobuf::EnumValueOptions* options) {
6326 delete options_;
6327 options_ = options;
6328 if (options) {
6329 set_has_options();
6330 } else {
6331 clear_has_options();
6332 }
6333 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.options)
6334}
6335
6336#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00006337
6338// ===================================================================
6339
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006340#ifndef _MSC_VER
6341const int ServiceDescriptorProto::kNameFieldNumber;
6342const int ServiceDescriptorProto::kMethodFieldNumber;
6343const int ServiceDescriptorProto::kOptionsFieldNumber;
6344#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00006345
kenton@google.com573989f2009-10-30 22:02:17 +00006346ServiceDescriptorProto::ServiceDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07006347 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006348 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00006349 // @@protoc_insertion_point(constructor:google.protobuf.ServiceDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00006350}
6351
kenton@google.com80b1d622009-07-29 01:13:20 +00006352void ServiceDescriptorProto::InitAsDefaultInstance() {
6353 options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00006354}
6355
kenton@google.com573989f2009-10-30 22:02:17 +00006356ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08006357 : ::google::protobuf::Message(),
6358 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006359 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006360 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00006361 // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006362}
6363
kenton@google.comd37d46d2009-04-25 02:53:47 +00006364void ServiceDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006365 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00006366 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006367 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00006368 options_ = NULL;
6369 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6370}
6371
temporal40ee5512008-07-10 02:12:20 +00006372ServiceDescriptorProto::~ServiceDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006373 // @@protoc_insertion_point(destructor:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006374 SharedDtor();
6375}
6376
6377void ServiceDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08006378 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00006379 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00006380 delete options_;
6381 }
6382}
6383
kenton@google.comfccb1462009-12-18 02:11:36 +00006384void ServiceDescriptorProto::SetCachedSize(int size) const {
6385 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6386 _cached_size_ = size;
6387 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6388}
temporal40ee5512008-07-10 02:12:20 +00006389const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006390 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00006391 return ServiceDescriptorProto_descriptor_;
6392}
6393
kenton@google.com24bf56f2008-09-24 20:31:01 +00006394const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00006395 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
6396 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006397}
6398
6399ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL;
6400
Feng Xiao6ef984a2014-11-10 17:34:54 -08006401ServiceDescriptorProto* ServiceDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08006402 ServiceDescriptorProto* n = new ServiceDescriptorProto;
6403 if (arena != NULL) {
6404 arena->Own(n);
6405 }
6406 return n;
temporal40ee5512008-07-10 02:12:20 +00006407}
6408
6409void ServiceDescriptorProto::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -07006410 if (_has_bits_[0 / 32] & 5u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006411 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006412 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00006413 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006414 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006415 if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear();
6416 }
6417 }
6418 method_.Clear();
6419 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08006420 if (_internal_metadata_.have_unknown_fields()) {
6421 mutable_unknown_fields()->Clear();
6422 }
temporal40ee5512008-07-10 02:12:20 +00006423}
6424
6425bool ServiceDescriptorProto::MergePartialFromCodedStream(
6426 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006427#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00006428 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006429 // @@protoc_insertion_point(parse_start:google.protobuf.ServiceDescriptorProto)
6430 for (;;) {
6431 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
6432 tag = p.first;
6433 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00006434 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00006435 // optional string name = 1;
6436 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006437 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006438 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6439 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00006440 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00006441 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006442 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006443 "google.protobuf.ServiceDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00006444 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006445 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006446 }
temporal40ee5512008-07-10 02:12:20 +00006447 if (input->ExpectTag(18)) goto parse_method;
6448 break;
6449 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006450
temporal40ee5512008-07-10 02:12:20 +00006451 // repeated .google.protobuf.MethodDescriptorProto method = 2;
6452 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006453 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006454 parse_method:
Bo Yang5db21732015-05-21 14:28:59 -07006455 DO_(input->IncrementRecursionDepth());
6456 parse_loop_method:
6457 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00006458 input, add_method()));
6459 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006460 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006461 }
Bo Yang5db21732015-05-21 14:28:59 -07006462 if (input->ExpectTag(18)) goto parse_loop_method;
6463 input->UnsafeDecrementRecursionDepth();
temporal40ee5512008-07-10 02:12:20 +00006464 if (input->ExpectTag(26)) goto parse_options;
6465 break;
6466 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006467
temporal40ee5512008-07-10 02:12:20 +00006468 // optional .google.protobuf.ServiceOptions options = 3;
6469 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006470 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006471 parse_options:
6472 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6473 input, mutable_options()));
6474 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006475 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006476 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006477 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00006478 break;
6479 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006480
temporal40ee5512008-07-10 02:12:20 +00006481 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006482 handle_unusual:
6483 if (tag == 0 ||
6484 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00006485 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006486 goto success;
temporal40ee5512008-07-10 02:12:20 +00006487 }
6488 DO_(::google::protobuf::internal::WireFormat::SkipField(
6489 input, tag, mutable_unknown_fields()));
6490 break;
6491 }
6492 }
6493 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006494success:
6495 // @@protoc_insertion_point(parse_success:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006496 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006497failure:
6498 // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceDescriptorProto)
6499 return false;
temporal40ee5512008-07-10 02:12:20 +00006500#undef DO_
6501}
6502
kenton@google.comd37d46d2009-04-25 02:53:47 +00006503void ServiceDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00006504 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006505 // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006506 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006507 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006508 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006509 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006510 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006511 "google.protobuf.ServiceDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00006512 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00006513 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00006514 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006515
temporal40ee5512008-07-10 02:12:20 +00006516 // repeated .google.protobuf.MethodDescriptorProto method = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08006517 for (unsigned int i = 0, n = this->method_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006518 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00006519 2, this->method(i), output);
temporal40ee5512008-07-10 02:12:20 +00006520 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006521
temporal40ee5512008-07-10 02:12:20 +00006522 // optional .google.protobuf.ServiceOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006523 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006524 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006525 3, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00006526 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006527
Feng Xiao6ef984a2014-11-10 17:34:54 -08006528 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006529 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6530 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00006531 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006532 // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006533}
6534
6535::google::protobuf::uint8* ServiceDescriptorProto::SerializeWithCachedSizesToArray(
6536 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006537 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006538 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006539 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006540 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00006541 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006542 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006543 "google.protobuf.ServiceDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00006544 target =
6545 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6546 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006547 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006548
kenton@google.comd37d46d2009-04-25 02:53:47 +00006549 // repeated .google.protobuf.MethodDescriptorProto method = 2;
Feng Xiaof157a562014-11-14 11:50:31 -08006550 for (unsigned int i = 0, n = this->method_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006551 target = ::google::protobuf::internal::WireFormatLite::
6552 WriteMessageNoVirtualToArray(
6553 2, this->method(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006554 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006555
kenton@google.comd37d46d2009-04-25 02:53:47 +00006556 // optional .google.protobuf.ServiceOptions options = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00006557 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00006558 target = ::google::protobuf::internal::WireFormatLite::
6559 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08006560 3, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00006561 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006562
Feng Xiao6ef984a2014-11-10 17:34:54 -08006563 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006564 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6565 unknown_fields(), target);
6566 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00006567 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006568 return target;
temporal40ee5512008-07-10 02:12:20 +00006569}
6570
6571int ServiceDescriptorProto::ByteSize() const {
6572 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006573
Austin Schuh307af622015-06-05 22:46:01 -07006574 if (_has_bits_[0 / 32] & 5u) {
temporal40ee5512008-07-10 02:12:20 +00006575 // optional string name = 1;
6576 if (has_name()) {
6577 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006578 ::google::protobuf::internal::WireFormatLite::StringSize(
6579 this->name());
temporal40ee5512008-07-10 02:12:20 +00006580 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006581
temporal40ee5512008-07-10 02:12:20 +00006582 // optional .google.protobuf.ServiceOptions options = 3;
6583 if (has_options()) {
6584 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00006585 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08006586 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00006587 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006588
temporal40ee5512008-07-10 02:12:20 +00006589 }
6590 // repeated .google.protobuf.MethodDescriptorProto method = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +00006591 total_size += 1 * this->method_size();
6592 for (int i = 0; i < this->method_size(); i++) {
temporal40ee5512008-07-10 02:12:20 +00006593 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00006594 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
temporal40ee5512008-07-10 02:12:20 +00006595 this->method(i));
6596 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006597
Feng Xiao6ef984a2014-11-10 17:34:54 -08006598 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00006599 total_size +=
6600 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6601 unknown_fields());
6602 }
kenton@google.comfccb1462009-12-18 02:11:36 +00006603 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00006604 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00006605 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00006606 return total_size;
6607}
6608
6609void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006610 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07006611 const ServiceDescriptorProto* source =
6612 ::google::protobuf::internal::DynamicCastToGenerated<const ServiceDescriptorProto>(
6613 &from);
temporal40ee5512008-07-10 02:12:20 +00006614 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00006615 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00006616 } else {
6617 MergeFrom(*source);
6618 }
6619}
6620
6621void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08006622 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00006623 method_.MergeFrom(from.method_);
6624 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00006625 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006626 set_has_name();
6627 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00006628 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006629 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006630 mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options());
6631 }
6632 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08006633 if (from._internal_metadata_.have_unknown_fields()) {
6634 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
6635 }
temporal40ee5512008-07-10 02:12:20 +00006636}
6637
6638void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
6639 if (&from == this) return;
6640 Clear();
6641 MergeFrom(from);
6642}
6643
6644void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) {
6645 if (&from == this) return;
6646 Clear();
6647 MergeFrom(from);
6648}
6649
6650bool ServiceDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006651
jieluo@google.com4de8f552014-07-18 00:47:59 +00006652 if (!::google::protobuf::internal::AllAreInitialized(this->method())) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006653 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006654 if (!this->options_->IsInitialized()) return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006655 }
temporal40ee5512008-07-10 02:12:20 +00006656 return true;
6657}
6658
kenton@google.comceb561d2009-06-25 19:05:36 +00006659void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08006660 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006661 InternalSwap(other);
6662}
6663void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) {
6664 name_.Swap(&other->name_);
6665 method_.UnsafeArenaSwap(&other->method_);
6666 std::swap(options_, other->options_);
6667 std::swap(_has_bits_[0], other->_has_bits_[0]);
6668 _internal_metadata_.Swap(&other->_internal_metadata_);
6669 std::swap(_cached_size_, other->_cached_size_);
6670}
kenton@google.comceb561d2009-06-25 19:05:36 +00006671
kenton@google.com80b1d622009-07-29 01:13:20 +00006672::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const {
6673 protobuf_AssignDescriptorsOnce();
6674 ::google::protobuf::Metadata metadata;
6675 metadata.descriptor = ServiceDescriptorProto_descriptor_;
6676 metadata.reflection = ServiceDescriptorProto_reflection_;
6677 return metadata;
temporal40ee5512008-07-10 02:12:20 +00006678}
6679
Jisi Liu885b6122015-02-28 14:51:22 -08006680#if PROTOBUF_INLINE_NOT_IN_HEADERS
6681// ServiceDescriptorProto
6682
6683// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07006684bool ServiceDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006685 return (_has_bits_[0] & 0x00000001u) != 0;
6686}
Bo Yang5db21732015-05-21 14:28:59 -07006687void ServiceDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006688 _has_bits_[0] |= 0x00000001u;
6689}
Bo Yang5db21732015-05-21 14:28:59 -07006690void ServiceDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006691 _has_bits_[0] &= ~0x00000001u;
6692}
Bo Yang5db21732015-05-21 14:28:59 -07006693void ServiceDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08006694 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6695 clear_has_name();
6696}
6697 const ::std::string& ServiceDescriptorProto::name() const {
6698 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name)
6699 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6700}
6701 void ServiceDescriptorProto::set_name(const ::std::string& value) {
6702 set_has_name();
6703 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
6704 // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name)
6705}
6706 void ServiceDescriptorProto::set_name(const char* value) {
6707 set_has_name();
6708 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
6709 // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name)
6710}
6711 void ServiceDescriptorProto::set_name(const char* value, size_t size) {
6712 set_has_name();
6713 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
6714 ::std::string(reinterpret_cast<const char*>(value), size));
6715 // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name)
6716}
6717 ::std::string* ServiceDescriptorProto::mutable_name() {
6718 set_has_name();
6719 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name)
6720 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6721}
6722 ::std::string* ServiceDescriptorProto::release_name() {
6723 clear_has_name();
6724 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6725}
6726 void ServiceDescriptorProto::set_allocated_name(::std::string* name) {
6727 if (name != NULL) {
6728 set_has_name();
6729 } else {
6730 clear_has_name();
6731 }
6732 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
6733 // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name)
6734}
6735
6736// repeated .google.protobuf.MethodDescriptorProto method = 2;
Bo Yang5db21732015-05-21 14:28:59 -07006737int ServiceDescriptorProto::method_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006738 return method_.size();
6739}
Bo Yang5db21732015-05-21 14:28:59 -07006740void ServiceDescriptorProto::clear_method() {
Jisi Liu885b6122015-02-28 14:51:22 -08006741 method_.Clear();
6742}
6743 const ::google::protobuf::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const {
6744 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method)
6745 return method_.Get(index);
6746}
6747 ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) {
6748 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.method)
6749 return method_.Mutable(index);
6750}
6751 ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::add_method() {
6752 // @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method)
6753 return method_.Add();
6754}
6755 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >&
6756ServiceDescriptorProto::method() const {
6757 // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method)
6758 return method_;
6759}
6760 ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >*
6761ServiceDescriptorProto::mutable_method() {
6762 // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method)
6763 return &method_;
6764}
6765
6766// optional .google.protobuf.ServiceOptions options = 3;
Bo Yang5db21732015-05-21 14:28:59 -07006767bool ServiceDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08006768 return (_has_bits_[0] & 0x00000004u) != 0;
6769}
Bo Yang5db21732015-05-21 14:28:59 -07006770void ServiceDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006771 _has_bits_[0] |= 0x00000004u;
6772}
Bo Yang5db21732015-05-21 14:28:59 -07006773void ServiceDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006774 _has_bits_[0] &= ~0x00000004u;
6775}
Bo Yang5db21732015-05-21 14:28:59 -07006776void ServiceDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08006777 if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear();
6778 clear_has_options();
6779}
6780 const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const {
6781 // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options)
6782 return options_ != NULL ? *options_ : *default_instance_->options_;
6783}
6784 ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() {
6785 set_has_options();
6786 if (options_ == NULL) {
6787 options_ = new ::google::protobuf::ServiceOptions;
6788 }
6789 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options)
6790 return options_;
6791}
6792 ::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() {
6793 clear_has_options();
6794 ::google::protobuf::ServiceOptions* temp = options_;
6795 options_ = NULL;
6796 return temp;
6797}
6798 void ServiceDescriptorProto::set_allocated_options(::google::protobuf::ServiceOptions* options) {
6799 delete options_;
6800 options_ = options;
6801 if (options) {
6802 set_has_options();
6803 } else {
6804 clear_has_options();
6805 }
6806 // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.options)
6807}
6808
6809#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00006810
6811// ===================================================================
6812
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006813#ifndef _MSC_VER
6814const int MethodDescriptorProto::kNameFieldNumber;
6815const int MethodDescriptorProto::kInputTypeFieldNumber;
6816const int MethodDescriptorProto::kOutputTypeFieldNumber;
6817const int MethodDescriptorProto::kOptionsFieldNumber;
Feng Xiao99aa0f92014-11-20 16:18:53 -08006818const int MethodDescriptorProto::kClientStreamingFieldNumber;
6819const int MethodDescriptorProto::kServerStreamingFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00006820#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00006821
kenton@google.com573989f2009-10-30 22:02:17 +00006822MethodDescriptorProto::MethodDescriptorProto()
Bo Yang5db21732015-05-21 14:28:59 -07006823 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006824 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00006825 // @@protoc_insertion_point(constructor:google.protobuf.MethodDescriptorProto)
kenton@google.com24bf56f2008-09-24 20:31:01 +00006826}
6827
kenton@google.com80b1d622009-07-29 01:13:20 +00006828void MethodDescriptorProto::InitAsDefaultInstance() {
6829 options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance());
temporal40ee5512008-07-10 02:12:20 +00006830}
6831
kenton@google.com573989f2009-10-30 22:02:17 +00006832MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08006833 : ::google::protobuf::Message(),
6834 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006835 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00006836 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00006837 // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00006838}
6839
kenton@google.comd37d46d2009-04-25 02:53:47 +00006840void MethodDescriptorProto::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006841 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00006842 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08006843 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6844 input_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6845 output_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00006846 options_ = NULL;
Feng Xiao99aa0f92014-11-20 16:18:53 -08006847 client_streaming_ = false;
6848 server_streaming_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00006849 ::memset(_has_bits_, 0, sizeof(_has_bits_));
6850}
6851
temporal40ee5512008-07-10 02:12:20 +00006852MethodDescriptorProto::~MethodDescriptorProto() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006853 // @@protoc_insertion_point(destructor:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00006854 SharedDtor();
6855}
6856
6857void MethodDescriptorProto::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08006858 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6859 input_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6860 output_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00006861 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00006862 delete options_;
6863 }
6864}
6865
kenton@google.comfccb1462009-12-18 02:11:36 +00006866void MethodDescriptorProto::SetCachedSize(int size) const {
6867 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6868 _cached_size_ = size;
6869 GOOGLE_SAFE_CONCURRENT_WRITES_END();
6870}
temporal40ee5512008-07-10 02:12:20 +00006871const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00006872 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00006873 return MethodDescriptorProto_descriptor_;
6874}
6875
kenton@google.com24bf56f2008-09-24 20:31:01 +00006876const MethodDescriptorProto& MethodDescriptorProto::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00006877 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
6878 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00006879}
6880
6881MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL;
6882
Feng Xiao6ef984a2014-11-10 17:34:54 -08006883MethodDescriptorProto* MethodDescriptorProto::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08006884 MethodDescriptorProto* n = new MethodDescriptorProto;
6885 if (arena != NULL) {
6886 arena->Own(n);
6887 }
6888 return n;
temporal40ee5512008-07-10 02:12:20 +00006889}
6890
6891void MethodDescriptorProto::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -08006892#define ZR_HELPER_(f) reinterpret_cast<char*>(\
6893 &reinterpret_cast<MethodDescriptorProto*>(16)->f)
Feng Xiao99aa0f92014-11-20 16:18:53 -08006894
Jisi Liu885b6122015-02-28 14:51:22 -08006895#define ZR_(first, last) do {\
6896 ::memset(&first, 0,\
6897 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
6898} while (0)
Feng Xiao99aa0f92014-11-20 16:18:53 -08006899
Austin Schuhe8268372015-05-19 23:22:20 -07006900 if (_has_bits_[0 / 32] & 63u) {
Feng Xiao99aa0f92014-11-20 16:18:53 -08006901 ZR_(client_streaming_, server_streaming_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00006902 if (has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006903 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00006904 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006905 if (has_input_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006906 input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00006907 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006908 if (has_output_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08006909 output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00006910 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00006911 if (has_options()) {
temporal40ee5512008-07-10 02:12:20 +00006912 if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear();
6913 }
6914 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08006915
Jisi Liu885b6122015-02-28 14:51:22 -08006916#undef ZR_HELPER_
Feng Xiao99aa0f92014-11-20 16:18:53 -08006917#undef ZR_
6918
temporal40ee5512008-07-10 02:12:20 +00006919 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08006920 if (_internal_metadata_.have_unknown_fields()) {
6921 mutable_unknown_fields()->Clear();
6922 }
temporal40ee5512008-07-10 02:12:20 +00006923}
6924
6925bool MethodDescriptorProto::MergePartialFromCodedStream(
6926 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006927#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00006928 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00006929 // @@protoc_insertion_point(parse_start:google.protobuf.MethodDescriptorProto)
6930 for (;;) {
6931 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
6932 tag = p.first;
6933 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00006934 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00006935 // optional string name = 1;
6936 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006937 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006938 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6939 input, this->mutable_name()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00006940 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00006941 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006942 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006943 "google.protobuf.MethodDescriptorProto.name");
kenton@google.comfccb1462009-12-18 02:11:36 +00006944 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006945 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006946 }
temporal40ee5512008-07-10 02:12:20 +00006947 if (input->ExpectTag(18)) goto parse_input_type;
6948 break;
6949 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006950
temporal40ee5512008-07-10 02:12:20 +00006951 // optional string input_type = 2;
6952 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006953 if (tag == 18) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006954 parse_input_type:
6955 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6956 input, this->mutable_input_type()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00006957 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00006958 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006959 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006960 "google.protobuf.MethodDescriptorProto.input_type");
kenton@google.comfccb1462009-12-18 02:11:36 +00006961 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006962 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006963 }
temporal40ee5512008-07-10 02:12:20 +00006964 if (input->ExpectTag(26)) goto parse_output_type;
6965 break;
6966 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006967
temporal40ee5512008-07-10 02:12:20 +00006968 // optional string output_type = 3;
6969 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006970 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006971 parse_output_type:
6972 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6973 input, this->mutable_output_type()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00006974 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00006975 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00006976 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08006977 "google.protobuf.MethodDescriptorProto.output_type");
kenton@google.comfccb1462009-12-18 02:11:36 +00006978 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006979 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006980 }
temporal40ee5512008-07-10 02:12:20 +00006981 if (input->ExpectTag(34)) goto parse_options;
6982 break;
6983 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00006984
temporal40ee5512008-07-10 02:12:20 +00006985 // optional .google.protobuf.MethodOptions options = 4;
6986 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006987 if (tag == 34) {
kenton@google.comfccb1462009-12-18 02:11:36 +00006988 parse_options:
6989 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
6990 input, mutable_options()));
6991 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00006992 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00006993 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08006994 if (input->ExpectTag(40)) goto parse_client_streaming;
6995 break;
6996 }
6997
6998 // optional bool client_streaming = 5 [default = false];
6999 case 5: {
7000 if (tag == 40) {
7001 parse_client_streaming:
7002 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7003 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7004 input, &client_streaming_)));
7005 set_has_client_streaming();
7006 } else {
7007 goto handle_unusual;
7008 }
7009 if (input->ExpectTag(48)) goto parse_server_streaming;
7010 break;
7011 }
7012
7013 // optional bool server_streaming = 6 [default = false];
7014 case 6: {
7015 if (tag == 48) {
7016 parse_server_streaming:
7017 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7018 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7019 input, &server_streaming_)));
7020 set_has_server_streaming();
7021 } else {
7022 goto handle_unusual;
7023 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007024 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00007025 break;
7026 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007027
temporal40ee5512008-07-10 02:12:20 +00007028 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007029 handle_unusual:
7030 if (tag == 0 ||
7031 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00007032 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007033 goto success;
temporal40ee5512008-07-10 02:12:20 +00007034 }
7035 DO_(::google::protobuf::internal::WireFormat::SkipField(
7036 input, tag, mutable_unknown_fields()));
7037 break;
7038 }
7039 }
7040 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007041success:
7042 // @@protoc_insertion_point(parse_success:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00007043 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007044failure:
7045 // @@protoc_insertion_point(parse_failure:google.protobuf.MethodDescriptorProto)
7046 return false;
temporal40ee5512008-07-10 02:12:20 +00007047#undef DO_
7048}
7049
kenton@google.comd37d46d2009-04-25 02:53:47 +00007050void MethodDescriptorProto::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00007051 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007052 // @@protoc_insertion_point(serialize_start:google.protobuf.MethodDescriptorProto)
temporal40ee5512008-07-10 02:12:20 +00007053 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007054 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007055 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007056 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007057 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007058 "google.protobuf.MethodDescriptorProto.name");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007059 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007060 1, this->name(), output);
temporal40ee5512008-07-10 02:12:20 +00007061 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007062
temporal40ee5512008-07-10 02:12:20 +00007063 // optional string input_type = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007064 if (has_input_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007065 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007066 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007067 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007068 "google.protobuf.MethodDescriptorProto.input_type");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007069 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007070 2, this->input_type(), output);
temporal40ee5512008-07-10 02:12:20 +00007071 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007072
temporal40ee5512008-07-10 02:12:20 +00007073 // optional string output_type = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007074 if (has_output_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007075 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007076 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007077 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007078 "google.protobuf.MethodDescriptorProto.output_type");
jieluo@google.com4de8f552014-07-18 00:47:59 +00007079 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00007080 3, this->output_type(), output);
temporal40ee5512008-07-10 02:12:20 +00007081 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007082
temporal40ee5512008-07-10 02:12:20 +00007083 // optional .google.protobuf.MethodOptions options = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007084 if (has_options()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007085 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08007086 4, *this->options_, output);
temporal40ee5512008-07-10 02:12:20 +00007087 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007088
Feng Xiao99aa0f92014-11-20 16:18:53 -08007089 // optional bool client_streaming = 5 [default = false];
7090 if (has_client_streaming()) {
7091 ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->client_streaming(), output);
7092 }
7093
7094 // optional bool server_streaming = 6 [default = false];
7095 if (has_server_streaming()) {
7096 ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->server_streaming(), output);
7097 }
7098
Feng Xiao6ef984a2014-11-10 17:34:54 -08007099 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007100 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
7101 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00007102 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007103 // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007104}
7105
7106::google::protobuf::uint8* MethodDescriptorProto::SerializeWithCachedSizesToArray(
7107 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007108 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007109 // optional string name = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007110 if (has_name()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007111 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007112 this->name().data(), this->name().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007113 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007114 "google.protobuf.MethodDescriptorProto.name");
kenton@google.com80b1d622009-07-29 01:13:20 +00007115 target =
7116 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7117 1, this->name(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007118 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007119
kenton@google.comd37d46d2009-04-25 02:53:47 +00007120 // optional string input_type = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007121 if (has_input_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007122 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007123 this->input_type().data(), this->input_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007124 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007125 "google.protobuf.MethodDescriptorProto.input_type");
kenton@google.com80b1d622009-07-29 01:13:20 +00007126 target =
7127 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7128 2, this->input_type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007129 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007130
kenton@google.comd37d46d2009-04-25 02:53:47 +00007131 // optional string output_type = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007132 if (has_output_type()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007133 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00007134 this->output_type().data(), this->output_type().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007135 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007136 "google.protobuf.MethodDescriptorProto.output_type");
kenton@google.com80b1d622009-07-29 01:13:20 +00007137 target =
7138 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7139 3, this->output_type(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007140 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007141
kenton@google.comd37d46d2009-04-25 02:53:47 +00007142 // optional .google.protobuf.MethodOptions options = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007143 if (has_options()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00007144 target = ::google::protobuf::internal::WireFormatLite::
7145 WriteMessageNoVirtualToArray(
Feng Xiaof157a562014-11-14 11:50:31 -08007146 4, *this->options_, target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00007147 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007148
Feng Xiao99aa0f92014-11-20 16:18:53 -08007149 // optional bool client_streaming = 5 [default = false];
7150 if (has_client_streaming()) {
7151 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->client_streaming(), target);
7152 }
7153
7154 // optional bool server_streaming = 6 [default = false];
7155 if (has_server_streaming()) {
7156 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->server_streaming(), target);
7157 }
7158
Feng Xiao6ef984a2014-11-10 17:34:54 -08007159 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007160 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
7161 unknown_fields(), target);
7162 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007163 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007164 return target;
temporal40ee5512008-07-10 02:12:20 +00007165}
7166
7167int MethodDescriptorProto::ByteSize() const {
7168 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007169
Austin Schuh307af622015-06-05 22:46:01 -07007170 if (_has_bits_[0 / 32] & 63u) {
temporal40ee5512008-07-10 02:12:20 +00007171 // optional string name = 1;
7172 if (has_name()) {
7173 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007174 ::google::protobuf::internal::WireFormatLite::StringSize(
7175 this->name());
temporal40ee5512008-07-10 02:12:20 +00007176 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007177
temporal40ee5512008-07-10 02:12:20 +00007178 // optional string input_type = 2;
7179 if (has_input_type()) {
7180 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007181 ::google::protobuf::internal::WireFormatLite::StringSize(
7182 this->input_type());
temporal40ee5512008-07-10 02:12:20 +00007183 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007184
temporal40ee5512008-07-10 02:12:20 +00007185 // optional string output_type = 3;
7186 if (has_output_type()) {
7187 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007188 ::google::protobuf::internal::WireFormatLite::StringSize(
7189 this->output_type());
temporal40ee5512008-07-10 02:12:20 +00007190 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007191
temporal40ee5512008-07-10 02:12:20 +00007192 // optional .google.protobuf.MethodOptions options = 4;
7193 if (has_options()) {
7194 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00007195 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
Feng Xiaof157a562014-11-14 11:50:31 -08007196 *this->options_);
temporal40ee5512008-07-10 02:12:20 +00007197 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007198
Feng Xiao99aa0f92014-11-20 16:18:53 -08007199 // optional bool client_streaming = 5 [default = false];
7200 if (has_client_streaming()) {
7201 total_size += 1 + 1;
7202 }
7203
7204 // optional bool server_streaming = 6 [default = false];
7205 if (has_server_streaming()) {
7206 total_size += 1 + 1;
7207 }
7208
temporal40ee5512008-07-10 02:12:20 +00007209 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08007210 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00007211 total_size +=
7212 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
7213 unknown_fields());
7214 }
kenton@google.comfccb1462009-12-18 02:11:36 +00007215 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00007216 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00007217 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00007218 return total_size;
7219}
7220
7221void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08007222 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07007223 const MethodDescriptorProto* source =
7224 ::google::protobuf::internal::DynamicCastToGenerated<const MethodDescriptorProto>(
7225 &from);
temporal40ee5512008-07-10 02:12:20 +00007226 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00007227 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00007228 } else {
7229 MergeFrom(*source);
7230 }
7231}
7232
7233void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08007234 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
temporal40ee5512008-07-10 02:12:20 +00007235 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00007236 if (from.has_name()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007237 set_has_name();
7238 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
temporal40ee5512008-07-10 02:12:20 +00007239 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007240 if (from.has_input_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007241 set_has_input_type();
7242 input_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.input_type_);
temporal40ee5512008-07-10 02:12:20 +00007243 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007244 if (from.has_output_type()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007245 set_has_output_type();
7246 output_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.output_type_);
temporal40ee5512008-07-10 02:12:20 +00007247 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007248 if (from.has_options()) {
temporal40ee5512008-07-10 02:12:20 +00007249 mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options());
7250 }
Feng Xiao99aa0f92014-11-20 16:18:53 -08007251 if (from.has_client_streaming()) {
7252 set_client_streaming(from.client_streaming());
7253 }
7254 if (from.has_server_streaming()) {
7255 set_server_streaming(from.server_streaming());
7256 }
temporal40ee5512008-07-10 02:12:20 +00007257 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08007258 if (from._internal_metadata_.have_unknown_fields()) {
7259 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
7260 }
temporal40ee5512008-07-10 02:12:20 +00007261}
7262
7263void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) {
7264 if (&from == this) return;
7265 Clear();
7266 MergeFrom(from);
7267}
7268
7269void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) {
7270 if (&from == this) return;
7271 Clear();
7272 MergeFrom(from);
7273}
7274
kenton@google.comceb561d2009-06-25 19:05:36 +00007275bool MethodDescriptorProto::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007276
kenton@google.comceb561d2009-06-25 19:05:36 +00007277 if (has_options()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007278 if (!this->options_->IsInitialized()) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +00007279 }
7280 return true;
7281}
7282
kenton@google.com26bd9ee2008-11-21 00:06:27 +00007283void MethodDescriptorProto::Swap(MethodDescriptorProto* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08007284 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007285 InternalSwap(other);
7286}
7287void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) {
7288 name_.Swap(&other->name_);
7289 input_type_.Swap(&other->input_type_);
7290 output_type_.Swap(&other->output_type_);
7291 std::swap(options_, other->options_);
Feng Xiao99aa0f92014-11-20 16:18:53 -08007292 std::swap(client_streaming_, other->client_streaming_);
7293 std::swap(server_streaming_, other->server_streaming_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08007294 std::swap(_has_bits_[0], other->_has_bits_[0]);
7295 _internal_metadata_.Swap(&other->_internal_metadata_);
7296 std::swap(_cached_size_, other->_cached_size_);
7297}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00007298
kenton@google.com80b1d622009-07-29 01:13:20 +00007299::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const {
7300 protobuf_AssignDescriptorsOnce();
7301 ::google::protobuf::Metadata metadata;
7302 metadata.descriptor = MethodDescriptorProto_descriptor_;
7303 metadata.reflection = MethodDescriptorProto_reflection_;
7304 return metadata;
temporal40ee5512008-07-10 02:12:20 +00007305}
7306
Jisi Liu885b6122015-02-28 14:51:22 -08007307#if PROTOBUF_INLINE_NOT_IN_HEADERS
7308// MethodDescriptorProto
7309
7310// optional string name = 1;
Bo Yang5db21732015-05-21 14:28:59 -07007311bool MethodDescriptorProto::has_name() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007312 return (_has_bits_[0] & 0x00000001u) != 0;
7313}
Bo Yang5db21732015-05-21 14:28:59 -07007314void MethodDescriptorProto::set_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007315 _has_bits_[0] |= 0x00000001u;
7316}
Bo Yang5db21732015-05-21 14:28:59 -07007317void MethodDescriptorProto::clear_has_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007318 _has_bits_[0] &= ~0x00000001u;
7319}
Bo Yang5db21732015-05-21 14:28:59 -07007320void MethodDescriptorProto::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -08007321 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7322 clear_has_name();
7323}
7324 const ::std::string& MethodDescriptorProto::name() const {
7325 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name)
7326 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7327}
7328 void MethodDescriptorProto::set_name(const ::std::string& value) {
7329 set_has_name();
7330 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7331 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name)
7332}
7333 void MethodDescriptorProto::set_name(const char* value) {
7334 set_has_name();
7335 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7336 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name)
7337}
7338 void MethodDescriptorProto::set_name(const char* value, size_t size) {
7339 set_has_name();
7340 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7341 ::std::string(reinterpret_cast<const char*>(value), size));
7342 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name)
7343}
7344 ::std::string* MethodDescriptorProto::mutable_name() {
7345 set_has_name();
7346 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name)
7347 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7348}
7349 ::std::string* MethodDescriptorProto::release_name() {
7350 clear_has_name();
7351 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7352}
7353 void MethodDescriptorProto::set_allocated_name(::std::string* name) {
7354 if (name != NULL) {
7355 set_has_name();
7356 } else {
7357 clear_has_name();
7358 }
7359 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
7360 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name)
7361}
7362
7363// optional string input_type = 2;
Bo Yang5db21732015-05-21 14:28:59 -07007364bool MethodDescriptorProto::has_input_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007365 return (_has_bits_[0] & 0x00000002u) != 0;
7366}
Bo Yang5db21732015-05-21 14:28:59 -07007367void MethodDescriptorProto::set_has_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007368 _has_bits_[0] |= 0x00000002u;
7369}
Bo Yang5db21732015-05-21 14:28:59 -07007370void MethodDescriptorProto::clear_has_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007371 _has_bits_[0] &= ~0x00000002u;
7372}
Bo Yang5db21732015-05-21 14:28:59 -07007373void MethodDescriptorProto::clear_input_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007374 input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7375 clear_has_input_type();
7376}
7377 const ::std::string& MethodDescriptorProto::input_type() const {
7378 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type)
7379 return input_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7380}
7381 void MethodDescriptorProto::set_input_type(const ::std::string& value) {
7382 set_has_input_type();
7383 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7384 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type)
7385}
7386 void MethodDescriptorProto::set_input_type(const char* value) {
7387 set_has_input_type();
7388 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7389 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type)
7390}
7391 void MethodDescriptorProto::set_input_type(const char* value, size_t size) {
7392 set_has_input_type();
7393 input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7394 ::std::string(reinterpret_cast<const char*>(value), size));
7395 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type)
7396}
7397 ::std::string* MethodDescriptorProto::mutable_input_type() {
7398 set_has_input_type();
7399 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type)
7400 return input_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7401}
7402 ::std::string* MethodDescriptorProto::release_input_type() {
7403 clear_has_input_type();
7404 return input_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7405}
7406 void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) {
7407 if (input_type != NULL) {
7408 set_has_input_type();
7409 } else {
7410 clear_has_input_type();
7411 }
7412 input_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), input_type);
7413 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type)
7414}
7415
7416// optional string output_type = 3;
Bo Yang5db21732015-05-21 14:28:59 -07007417bool MethodDescriptorProto::has_output_type() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007418 return (_has_bits_[0] & 0x00000004u) != 0;
7419}
Bo Yang5db21732015-05-21 14:28:59 -07007420void MethodDescriptorProto::set_has_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007421 _has_bits_[0] |= 0x00000004u;
7422}
Bo Yang5db21732015-05-21 14:28:59 -07007423void MethodDescriptorProto::clear_has_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007424 _has_bits_[0] &= ~0x00000004u;
7425}
Bo Yang5db21732015-05-21 14:28:59 -07007426void MethodDescriptorProto::clear_output_type() {
Jisi Liu885b6122015-02-28 14:51:22 -08007427 output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7428 clear_has_output_type();
7429}
7430 const ::std::string& MethodDescriptorProto::output_type() const {
7431 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type)
7432 return output_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7433}
7434 void MethodDescriptorProto::set_output_type(const ::std::string& value) {
7435 set_has_output_type();
7436 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
7437 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type)
7438}
7439 void MethodDescriptorProto::set_output_type(const char* value) {
7440 set_has_output_type();
7441 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
7442 // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type)
7443}
7444 void MethodDescriptorProto::set_output_type(const char* value, size_t size) {
7445 set_has_output_type();
7446 output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
7447 ::std::string(reinterpret_cast<const char*>(value), size));
7448 // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type)
7449}
7450 ::std::string* MethodDescriptorProto::mutable_output_type() {
7451 set_has_output_type();
7452 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type)
7453 return output_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7454}
7455 ::std::string* MethodDescriptorProto::release_output_type() {
7456 clear_has_output_type();
7457 return output_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7458}
7459 void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) {
7460 if (output_type != NULL) {
7461 set_has_output_type();
7462 } else {
7463 clear_has_output_type();
7464 }
7465 output_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), output_type);
7466 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type)
7467}
7468
7469// optional .google.protobuf.MethodOptions options = 4;
Bo Yang5db21732015-05-21 14:28:59 -07007470bool MethodDescriptorProto::has_options() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007471 return (_has_bits_[0] & 0x00000008u) != 0;
7472}
Bo Yang5db21732015-05-21 14:28:59 -07007473void MethodDescriptorProto::set_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007474 _has_bits_[0] |= 0x00000008u;
7475}
Bo Yang5db21732015-05-21 14:28:59 -07007476void MethodDescriptorProto::clear_has_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007477 _has_bits_[0] &= ~0x00000008u;
7478}
Bo Yang5db21732015-05-21 14:28:59 -07007479void MethodDescriptorProto::clear_options() {
Jisi Liu885b6122015-02-28 14:51:22 -08007480 if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear();
7481 clear_has_options();
7482}
7483 const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const {
7484 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options)
7485 return options_ != NULL ? *options_ : *default_instance_->options_;
7486}
7487 ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() {
7488 set_has_options();
7489 if (options_ == NULL) {
7490 options_ = new ::google::protobuf::MethodOptions;
7491 }
7492 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options)
7493 return options_;
7494}
7495 ::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() {
7496 clear_has_options();
7497 ::google::protobuf::MethodOptions* temp = options_;
7498 options_ = NULL;
7499 return temp;
7500}
7501 void MethodDescriptorProto::set_allocated_options(::google::protobuf::MethodOptions* options) {
7502 delete options_;
7503 options_ = options;
7504 if (options) {
7505 set_has_options();
7506 } else {
7507 clear_has_options();
7508 }
7509 // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options)
7510}
7511
7512// optional bool client_streaming = 5 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07007513bool MethodDescriptorProto::has_client_streaming() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007514 return (_has_bits_[0] & 0x00000010u) != 0;
7515}
Bo Yang5db21732015-05-21 14:28:59 -07007516void MethodDescriptorProto::set_has_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007517 _has_bits_[0] |= 0x00000010u;
7518}
Bo Yang5db21732015-05-21 14:28:59 -07007519void MethodDescriptorProto::clear_has_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007520 _has_bits_[0] &= ~0x00000010u;
7521}
Bo Yang5db21732015-05-21 14:28:59 -07007522void MethodDescriptorProto::clear_client_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007523 client_streaming_ = false;
7524 clear_has_client_streaming();
7525}
7526 bool MethodDescriptorProto::client_streaming() const {
7527 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.client_streaming)
7528 return client_streaming_;
7529}
7530 void MethodDescriptorProto::set_client_streaming(bool value) {
7531 set_has_client_streaming();
7532 client_streaming_ = value;
7533 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.client_streaming)
7534}
7535
7536// optional bool server_streaming = 6 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07007537bool MethodDescriptorProto::has_server_streaming() const {
Jisi Liu885b6122015-02-28 14:51:22 -08007538 return (_has_bits_[0] & 0x00000020u) != 0;
7539}
Bo Yang5db21732015-05-21 14:28:59 -07007540void MethodDescriptorProto::set_has_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007541 _has_bits_[0] |= 0x00000020u;
7542}
Bo Yang5db21732015-05-21 14:28:59 -07007543void MethodDescriptorProto::clear_has_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007544 _has_bits_[0] &= ~0x00000020u;
7545}
Bo Yang5db21732015-05-21 14:28:59 -07007546void MethodDescriptorProto::clear_server_streaming() {
Jisi Liu885b6122015-02-28 14:51:22 -08007547 server_streaming_ = false;
7548 clear_has_server_streaming();
7549}
7550 bool MethodDescriptorProto::server_streaming() const {
7551 // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.server_streaming)
7552 return server_streaming_;
7553}
7554 void MethodDescriptorProto::set_server_streaming(bool value) {
7555 set_has_server_streaming();
7556 server_streaming_ = value;
7557 // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.server_streaming)
7558}
7559
7560#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00007561
7562// ===================================================================
7563
7564const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007565 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00007566 return FileOptions_OptimizeMode_descriptor_;
7567}
7568bool FileOptions_OptimizeMode_IsValid(int value) {
7569 switch(value) {
7570 case 1:
7571 case 2:
kenton@google.com80b1d622009-07-29 01:13:20 +00007572 case 3:
temporal40ee5512008-07-10 02:12:20 +00007573 return true;
7574 default:
7575 return false;
7576 }
7577}
7578
7579#ifndef _MSC_VER
7580const FileOptions_OptimizeMode FileOptions::SPEED;
7581const FileOptions_OptimizeMode FileOptions::CODE_SIZE;
kenton@google.com80b1d622009-07-29 01:13:20 +00007582const FileOptions_OptimizeMode FileOptions::LITE_RUNTIME;
temporal40ee5512008-07-10 02:12:20 +00007583const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN;
7584const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00007585const int FileOptions::OptimizeMode_ARRAYSIZE;
temporal40ee5512008-07-10 02:12:20 +00007586#endif // _MSC_VER
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007587#ifndef _MSC_VER
7588const int FileOptions::kJavaPackageFieldNumber;
7589const int FileOptions::kJavaOuterClassnameFieldNumber;
7590const int FileOptions::kJavaMultipleFilesFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007591const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007592const int FileOptions::kJavaStringCheckUtf8FieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007593const int FileOptions::kOptimizeForFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007594const int FileOptions::kGoPackageFieldNumber;
kenton@google.comfccb1462009-12-18 02:11:36 +00007595const int FileOptions::kCcGenericServicesFieldNumber;
7596const int FileOptions::kJavaGenericServicesFieldNumber;
7597const int FileOptions::kPyGenericServicesFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007598const int FileOptions::kDeprecatedFieldNumber;
Feng Xiaof157a562014-11-14 11:50:31 -08007599const int FileOptions::kCcEnableArenasFieldNumber;
Jisi Liu885b6122015-02-28 14:51:22 -08007600const int FileOptions::kObjcClassPrefixFieldNumber;
Jan Tattermusch685ae362015-03-16 19:07:16 -07007601const int FileOptions::kCsharpNamespaceFieldNumber;
Xiao Hang801e9202015-07-27 17:46:22 -07007602const int FileOptions::kJavananoUseDeprecatedPackageFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00007603const int FileOptions::kUninterpretedOptionFieldNumber;
7604#endif // !_MSC_VER
kenton@google.com24bf56f2008-09-24 20:31:01 +00007605
kenton@google.com573989f2009-10-30 22:02:17 +00007606FileOptions::FileOptions()
Bo Yang5db21732015-05-21 14:28:59 -07007607 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007608 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00007609 // @@protoc_insertion_point(constructor:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00007610}
7611
kenton@google.com80b1d622009-07-29 01:13:20 +00007612void FileOptions::InitAsDefaultInstance() {
7613}
kenton@google.com24bf56f2008-09-24 20:31:01 +00007614
kenton@google.com573989f2009-10-30 22:02:17 +00007615FileOptions::FileOptions(const FileOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08007616 : ::google::protobuf::Message(),
7617 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007618 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00007619 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00007620 // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00007621}
7622
kenton@google.comd37d46d2009-04-25 02:53:47 +00007623void FileOptions::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007624 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +00007625 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007626 java_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7627 java_outer_classname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +00007628 java_multiple_files_ = false;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007629 java_generate_equals_and_hash_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007630 java_string_check_utf8_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00007631 optimize_for_ = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -08007632 go_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +00007633 cc_generic_services_ = false;
7634 java_generic_services_ = false;
7635 py_generic_services_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007636 deprecated_ = false;
Feng Xiaof157a562014-11-14 11:50:31 -08007637 cc_enable_arenas_ = false;
Jisi Liu885b6122015-02-28 14:51:22 -08007638 objc_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jan Tattermusch685ae362015-03-16 19:07:16 -07007639 csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Xiao Hang801e9202015-07-27 17:46:22 -07007640 javanano_use_deprecated_package_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00007641 ::memset(_has_bits_, 0, sizeof(_has_bits_));
7642}
7643
temporal40ee5512008-07-10 02:12:20 +00007644FileOptions::~FileOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007645 // @@protoc_insertion_point(destructor:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00007646 SharedDtor();
7647}
7648
7649void FileOptions::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -08007650 java_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7651 java_outer_classname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7652 go_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jisi Liu885b6122015-02-28 14:51:22 -08007653 objc_class_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
Jan Tattermusch685ae362015-03-16 19:07:16 -07007654 csharp_namespace_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +00007655 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00007656 }
7657}
7658
kenton@google.comfccb1462009-12-18 02:11:36 +00007659void FileOptions::SetCachedSize(int size) const {
7660 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
7661 _cached_size_ = size;
7662 GOOGLE_SAFE_CONCURRENT_WRITES_END();
7663}
temporal40ee5512008-07-10 02:12:20 +00007664const ::google::protobuf::Descriptor* FileOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00007665 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00007666 return FileOptions_descriptor_;
7667}
7668
kenton@google.com24bf56f2008-09-24 20:31:01 +00007669const FileOptions& FileOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00007670 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
7671 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00007672}
7673
7674FileOptions* FileOptions::default_instance_ = NULL;
7675
Feng Xiao6ef984a2014-11-10 17:34:54 -08007676FileOptions* FileOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08007677 FileOptions* n = new FileOptions;
7678 if (arena != NULL) {
7679 arena->Own(n);
7680 }
7681 return n;
temporal40ee5512008-07-10 02:12:20 +00007682}
7683
7684void FileOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00007685 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08007686#define ZR_HELPER_(f) reinterpret_cast<char*>(\
7687 &reinterpret_cast<FileOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00007688
Jisi Liu885b6122015-02-28 14:51:22 -08007689#define ZR_(first, last) do {\
7690 ::memset(&first, 0,\
7691 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
7692} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00007693
Austin Schuhe8268372015-05-19 23:22:20 -07007694 if (_has_bits_[0 / 32] & 255u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007695 ZR_(java_multiple_files_, cc_generic_services_);
liujisi@google.com33165fe2010-11-02 13:14:58 +00007696 if (has_java_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007697 java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007698 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00007699 if (has_java_outer_classname()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007700 java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
temporal40ee5512008-07-10 02:12:20 +00007701 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00007702 optimize_for_ = 1;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007703 if (has_go_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08007704 go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007705 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007706 }
Xiao Hang801e9202015-07-27 17:46:22 -07007707 if (_has_bits_[8 / 32] & 32512u) {
7708 ZR_(java_generic_services_, javanano_use_deprecated_package_);
Jisi Liu885b6122015-02-28 14:51:22 -08007709 if (has_objc_class_prefix()) {
7710 objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7711 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07007712 if (has_csharp_namespace()) {
7713 csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
7714 }
Jisi Liu885b6122015-02-28 14:51:22 -08007715 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00007716
Jisi Liu885b6122015-02-28 14:51:22 -08007717#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00007718#undef ZR_
7719
kenton@google.com24bf56f2008-09-24 20:31:01 +00007720 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00007721 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08007722 if (_internal_metadata_.have_unknown_fields()) {
7723 mutable_unknown_fields()->Clear();
7724 }
temporal40ee5512008-07-10 02:12:20 +00007725}
7726
7727bool FileOptions::MergePartialFromCodedStream(
7728 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007729#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00007730 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00007731 // @@protoc_insertion_point(parse_start:google.protobuf.FileOptions)
7732 for (;;) {
7733 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
7734 tag = p.first;
7735 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00007736 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00007737 // optional string java_package = 1;
7738 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007739 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007740 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7741 input, this->mutable_java_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007742 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007743 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007744 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007745 "google.protobuf.FileOptions.java_package");
kenton@google.comfccb1462009-12-18 02:11:36 +00007746 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007747 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007748 }
temporal40ee5512008-07-10 02:12:20 +00007749 if (input->ExpectTag(66)) goto parse_java_outer_classname;
7750 break;
7751 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007752
temporal40ee5512008-07-10 02:12:20 +00007753 // optional string java_outer_classname = 8;
7754 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007755 if (tag == 66) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007756 parse_java_outer_classname:
7757 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7758 input, this->mutable_java_outer_classname()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007759 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +00007760 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007761 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007762 "google.protobuf.FileOptions.java_outer_classname");
kenton@google.comfccb1462009-12-18 02:11:36 +00007763 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007764 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007765 }
temporal40ee5512008-07-10 02:12:20 +00007766 if (input->ExpectTag(72)) goto parse_optimize_for;
7767 break;
7768 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007769
kenton@google.comd37d46d2009-04-25 02:53:47 +00007770 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
temporal40ee5512008-07-10 02:12:20 +00007771 case 9: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007772 if (tag == 72) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007773 parse_optimize_for:
7774 int value;
7775 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7776 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
7777 input, &value)));
7778 if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) {
7779 set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value));
7780 } else {
7781 mutable_unknown_fields()->AddVarint(9, value);
7782 }
temporal40ee5512008-07-10 02:12:20 +00007783 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007784 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007785 }
7786 if (input->ExpectTag(80)) goto parse_java_multiple_files;
7787 break;
7788 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007789
temporal40ee5512008-07-10 02:12:20 +00007790 // optional bool java_multiple_files = 10 [default = false];
7791 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007792 if (tag == 80) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007793 parse_java_multiple_files:
7794 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7795 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7796 input, &java_multiple_files_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00007797 set_has_java_multiple_files();
kenton@google.comfccb1462009-12-18 02:11:36 +00007798 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007799 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00007800 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007801 if (input->ExpectTag(90)) goto parse_go_package;
7802 break;
7803 }
7804
7805 // optional string go_package = 11;
7806 case 11: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007807 if (tag == 90) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007808 parse_go_package:
7809 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7810 input, this->mutable_go_package()));
jieluo@google.com4de8f552014-07-18 00:47:59 +00007811 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007812 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00007813 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08007814 "google.protobuf.FileOptions.go_package");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007815 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007816 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007817 }
kenton@google.comfccb1462009-12-18 02:11:36 +00007818 if (input->ExpectTag(128)) goto parse_cc_generic_services;
7819 break;
7820 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007821
liujisi@google.com33165fe2010-11-02 13:14:58 +00007822 // optional bool cc_generic_services = 16 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00007823 case 16: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007824 if (tag == 128) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007825 parse_cc_generic_services:
7826 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7827 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7828 input, &cc_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00007829 set_has_cc_generic_services();
kenton@google.comfccb1462009-12-18 02:11:36 +00007830 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007831 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00007832 }
7833 if (input->ExpectTag(136)) goto parse_java_generic_services;
7834 break;
7835 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007836
liujisi@google.com33165fe2010-11-02 13:14:58 +00007837 // optional bool java_generic_services = 17 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00007838 case 17: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007839 if (tag == 136) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007840 parse_java_generic_services:
7841 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7842 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7843 input, &java_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00007844 set_has_java_generic_services();
kenton@google.comfccb1462009-12-18 02:11:36 +00007845 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007846 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00007847 }
7848 if (input->ExpectTag(144)) goto parse_py_generic_services;
7849 break;
7850 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007851
liujisi@google.com33165fe2010-11-02 13:14:58 +00007852 // optional bool py_generic_services = 18 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00007853 case 18: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007854 if (tag == 144) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007855 parse_py_generic_services:
7856 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7857 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7858 input, &py_generic_services_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00007859 set_has_py_generic_services();
7860 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007861 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +00007862 }
7863 if (input->ExpectTag(160)) goto parse_java_generate_equals_and_hash;
7864 break;
7865 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007866
liujisi@google.com33165fe2010-11-02 13:14:58 +00007867 // optional bool java_generate_equals_and_hash = 20 [default = false];
7868 case 20: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007869 if (tag == 160) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00007870 parse_java_generate_equals_and_hash:
7871 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7872 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7873 input, &java_generate_equals_and_hash_)));
7874 set_has_java_generate_equals_and_hash();
kenton@google.comfccb1462009-12-18 02:11:36 +00007875 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007876 goto handle_unusual;
7877 }
7878 if (input->ExpectTag(184)) goto parse_deprecated;
7879 break;
7880 }
7881
7882 // optional bool deprecated = 23 [default = false];
7883 case 23: {
7884 if (tag == 184) {
7885 parse_deprecated:
7886 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7887 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7888 input, &deprecated_)));
7889 set_has_deprecated();
7890 } else {
7891 goto handle_unusual;
7892 }
7893 if (input->ExpectTag(216)) goto parse_java_string_check_utf8;
7894 break;
7895 }
7896
7897 // optional bool java_string_check_utf8 = 27 [default = false];
7898 case 27: {
7899 if (tag == 216) {
7900 parse_java_string_check_utf8:
7901 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7902 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7903 input, &java_string_check_utf8_)));
7904 set_has_java_string_check_utf8();
7905 } else {
7906 goto handle_unusual;
kenton@google.comfccb1462009-12-18 02:11:36 +00007907 }
Feng Xiaof157a562014-11-14 11:50:31 -08007908 if (input->ExpectTag(248)) goto parse_cc_enable_arenas;
7909 break;
7910 }
7911
7912 // optional bool cc_enable_arenas = 31 [default = false];
7913 case 31: {
7914 if (tag == 248) {
7915 parse_cc_enable_arenas:
7916 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7917 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7918 input, &cc_enable_arenas_)));
7919 set_has_cc_enable_arenas();
7920 } else {
7921 goto handle_unusual;
7922 }
Jisi Liu885b6122015-02-28 14:51:22 -08007923 if (input->ExpectTag(290)) goto parse_objc_class_prefix;
7924 break;
7925 }
7926
7927 // optional string objc_class_prefix = 36;
7928 case 36: {
7929 if (tag == 290) {
7930 parse_objc_class_prefix:
7931 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7932 input, this->mutable_objc_class_prefix()));
7933 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
7934 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
7935 ::google::protobuf::internal::WireFormat::PARSE,
7936 "google.protobuf.FileOptions.objc_class_prefix");
7937 } else {
7938 goto handle_unusual;
7939 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07007940 if (input->ExpectTag(298)) goto parse_csharp_namespace;
7941 break;
7942 }
7943
7944 // optional string csharp_namespace = 37;
7945 case 37: {
7946 if (tag == 298) {
7947 parse_csharp_namespace:
7948 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
7949 input, this->mutable_csharp_namespace()));
7950 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
7951 this->csharp_namespace().data(), this->csharp_namespace().length(),
7952 ::google::protobuf::internal::WireFormat::PARSE,
7953 "google.protobuf.FileOptions.csharp_namespace");
7954 } else {
7955 goto handle_unusual;
7956 }
Xiao Hang801e9202015-07-27 17:46:22 -07007957 if (input->ExpectTag(304)) goto parse_javanano_use_deprecated_package;
7958 break;
7959 }
7960
7961 // optional bool javanano_use_deprecated_package = 38;
7962 case 38: {
7963 if (tag == 304) {
7964 parse_javanano_use_deprecated_package:
7965 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
7966 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
7967 input, &javanano_use_deprecated_package_)));
7968 set_has_javanano_use_deprecated_package();
7969 } else {
7970 goto handle_unusual;
7971 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00007972 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
7973 break;
7974 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007975
kenton@google.com24bf56f2008-09-24 20:31:01 +00007976 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
7977 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007978 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +00007979 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -07007980 DO_(input->IncrementRecursionDepth());
7981 parse_loop_uninterpreted_option:
7982 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00007983 input, add_uninterpreted_option()));
7984 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007985 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +00007986 }
Bo Yang5db21732015-05-21 14:28:59 -07007987 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
7988 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +00007989 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00007990 break;
7991 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00007992
temporal40ee5512008-07-10 02:12:20 +00007993 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007994 handle_unusual:
7995 if (tag == 0 ||
7996 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00007997 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00007998 goto success;
temporal40ee5512008-07-10 02:12:20 +00007999 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008000 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008001 DO_(_extensions_.ParseField(tag, input, default_instance_,
8002 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00008003 continue;
8004 }
temporal40ee5512008-07-10 02:12:20 +00008005 DO_(::google::protobuf::internal::WireFormat::SkipField(
8006 input, tag, mutable_unknown_fields()));
8007 break;
8008 }
8009 }
8010 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008011success:
8012 // @@protoc_insertion_point(parse_success:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00008013 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00008014failure:
8015 // @@protoc_insertion_point(parse_failure:google.protobuf.FileOptions)
8016 return false;
temporal40ee5512008-07-10 02:12:20 +00008017#undef DO_
8018}
8019
kenton@google.comd37d46d2009-04-25 02:53:47 +00008020void FileOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00008021 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008022 // @@protoc_insertion_point(serialize_start:google.protobuf.FileOptions)
temporal40ee5512008-07-10 02:12:20 +00008023 // optional string java_package = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008024 if (has_java_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008025 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008026 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008027 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008028 "google.protobuf.FileOptions.java_package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008029 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00008030 1, this->java_package(), output);
temporal40ee5512008-07-10 02:12:20 +00008031 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008032
temporal40ee5512008-07-10 02:12:20 +00008033 // optional string java_outer_classname = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008034 if (has_java_outer_classname()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008035 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008036 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008037 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008038 "google.protobuf.FileOptions.java_outer_classname");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008039 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +00008040 8, this->java_outer_classname(), output);
temporal40ee5512008-07-10 02:12:20 +00008041 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008042
kenton@google.comd37d46d2009-04-25 02:53:47 +00008043 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008044 if (has_optimize_for()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008045 ::google::protobuf::internal::WireFormatLite::WriteEnum(
8046 9, this->optimize_for(), output);
temporal40ee5512008-07-10 02:12:20 +00008047 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008048
temporal40ee5512008-07-10 02:12:20 +00008049 // optional bool java_multiple_files = 10 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008050 if (has_java_multiple_files()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008051 ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output);
temporal40ee5512008-07-10 02:12:20 +00008052 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008053
8054 // optional string go_package = 11;
8055 if (has_go_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008056 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008057 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008058 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008059 "google.protobuf.FileOptions.go_package");
jieluo@google.com4de8f552014-07-18 00:47:59 +00008060 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008061 11, this->go_package(), output);
8062 }
8063
liujisi@google.com33165fe2010-11-02 13:14:58 +00008064 // optional bool cc_generic_services = 16 [default = false];
8065 if (has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008066 ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output);
8067 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008068
liujisi@google.com33165fe2010-11-02 13:14:58 +00008069 // optional bool java_generic_services = 17 [default = false];
8070 if (has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008071 ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output);
8072 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008073
liujisi@google.com33165fe2010-11-02 13:14:58 +00008074 // optional bool py_generic_services = 18 [default = false];
8075 if (has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008076 ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output);
8077 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008078
liujisi@google.com33165fe2010-11-02 13:14:58 +00008079 // optional bool java_generate_equals_and_hash = 20 [default = false];
8080 if (has_java_generate_equals_and_hash()) {
8081 ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output);
8082 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008083
jieluo@google.com4de8f552014-07-18 00:47:59 +00008084 // optional bool deprecated = 23 [default = false];
8085 if (has_deprecated()) {
8086 ::google::protobuf::internal::WireFormatLite::WriteBool(23, this->deprecated(), output);
8087 }
8088
8089 // optional bool java_string_check_utf8 = 27 [default = false];
8090 if (has_java_string_check_utf8()) {
8091 ::google::protobuf::internal::WireFormatLite::WriteBool(27, this->java_string_check_utf8(), output);
8092 }
8093
Feng Xiaof157a562014-11-14 11:50:31 -08008094 // optional bool cc_enable_arenas = 31 [default = false];
8095 if (has_cc_enable_arenas()) {
8096 ::google::protobuf::internal::WireFormatLite::WriteBool(31, this->cc_enable_arenas(), output);
8097 }
8098
Jisi Liu885b6122015-02-28 14:51:22 -08008099 // optional string objc_class_prefix = 36;
8100 if (has_objc_class_prefix()) {
8101 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8102 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
8103 ::google::protobuf::internal::WireFormat::SERIALIZE,
8104 "google.protobuf.FileOptions.objc_class_prefix");
8105 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
8106 36, this->objc_class_prefix(), output);
8107 }
8108
Jan Tattermusch685ae362015-03-16 19:07:16 -07008109 // optional string csharp_namespace = 37;
8110 if (has_csharp_namespace()) {
8111 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8112 this->csharp_namespace().data(), this->csharp_namespace().length(),
8113 ::google::protobuf::internal::WireFormat::SERIALIZE,
8114 "google.protobuf.FileOptions.csharp_namespace");
8115 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
8116 37, this->csharp_namespace(), output);
8117 }
8118
Xiao Hang801e9202015-07-27 17:46:22 -07008119 // optional bool javanano_use_deprecated_package = 38;
8120 if (has_javanano_use_deprecated_package()) {
8121 ::google::protobuf::internal::WireFormatLite::WriteBool(38, this->javanano_use_deprecated_package(), output);
8122 }
8123
kenton@google.com24bf56f2008-09-24 20:31:01 +00008124 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08008125 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008126 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00008127 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00008128 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008129
kenton@google.com24bf56f2008-09-24 20:31:01 +00008130 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008131 _extensions_.SerializeWithCachedSizes(
8132 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008133
Feng Xiao6ef984a2014-11-10 17:34:54 -08008134 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008135 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
8136 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00008137 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008138 // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008139}
8140
8141::google::protobuf::uint8* FileOptions::SerializeWithCachedSizesToArray(
8142 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008143 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008144 // optional string java_package = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008145 if (has_java_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008146 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008147 this->java_package().data(), this->java_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008148 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008149 "google.protobuf.FileOptions.java_package");
kenton@google.com80b1d622009-07-29 01:13:20 +00008150 target =
8151 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8152 1, this->java_package(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008153 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008154
kenton@google.comd37d46d2009-04-25 02:53:47 +00008155 // optional string java_outer_classname = 8;
liujisi@google.com33165fe2010-11-02 13:14:58 +00008156 if (has_java_outer_classname()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008157 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +00008158 this->java_outer_classname().data(), this->java_outer_classname().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008159 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008160 "google.protobuf.FileOptions.java_outer_classname");
kenton@google.com80b1d622009-07-29 01:13:20 +00008161 target =
8162 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8163 8, this->java_outer_classname(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008164 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008165
kenton@google.comd37d46d2009-04-25 02:53:47 +00008166 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008167 if (has_optimize_for()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008168 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
8169 9, this->optimize_for(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008170 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008171
kenton@google.comd37d46d2009-04-25 02:53:47 +00008172 // optional bool java_multiple_files = 10 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00008173 if (has_java_multiple_files()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008174 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008175 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008176
8177 // optional string go_package = 11;
8178 if (has_go_package()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00008179 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008180 this->go_package().data(), this->go_package().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +00008181 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -08008182 "google.protobuf.FileOptions.go_package");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008183 target =
8184 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8185 11, this->go_package(), target);
8186 }
8187
liujisi@google.com33165fe2010-11-02 13:14:58 +00008188 // optional bool cc_generic_services = 16 [default = false];
8189 if (has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008190 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target);
8191 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008192
liujisi@google.com33165fe2010-11-02 13:14:58 +00008193 // optional bool java_generic_services = 17 [default = false];
8194 if (has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008195 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target);
8196 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008197
liujisi@google.com33165fe2010-11-02 13:14:58 +00008198 // optional bool py_generic_services = 18 [default = false];
8199 if (has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008200 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target);
8201 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008202
liujisi@google.com33165fe2010-11-02 13:14:58 +00008203 // optional bool java_generate_equals_and_hash = 20 [default = false];
8204 if (has_java_generate_equals_and_hash()) {
8205 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target);
8206 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008207
jieluo@google.com4de8f552014-07-18 00:47:59 +00008208 // optional bool deprecated = 23 [default = false];
8209 if (has_deprecated()) {
8210 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(23, this->deprecated(), target);
8211 }
8212
8213 // optional bool java_string_check_utf8 = 27 [default = false];
8214 if (has_java_string_check_utf8()) {
8215 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(27, this->java_string_check_utf8(), target);
8216 }
8217
Feng Xiaof157a562014-11-14 11:50:31 -08008218 // optional bool cc_enable_arenas = 31 [default = false];
8219 if (has_cc_enable_arenas()) {
8220 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(31, this->cc_enable_arenas(), target);
8221 }
8222
Jisi Liu885b6122015-02-28 14:51:22 -08008223 // optional string objc_class_prefix = 36;
8224 if (has_objc_class_prefix()) {
8225 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8226 this->objc_class_prefix().data(), this->objc_class_prefix().length(),
8227 ::google::protobuf::internal::WireFormat::SERIALIZE,
8228 "google.protobuf.FileOptions.objc_class_prefix");
8229 target =
8230 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8231 36, this->objc_class_prefix(), target);
8232 }
8233
Jan Tattermusch685ae362015-03-16 19:07:16 -07008234 // optional string csharp_namespace = 37;
8235 if (has_csharp_namespace()) {
8236 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
8237 this->csharp_namespace().data(), this->csharp_namespace().length(),
8238 ::google::protobuf::internal::WireFormat::SERIALIZE,
8239 "google.protobuf.FileOptions.csharp_namespace");
8240 target =
8241 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8242 37, this->csharp_namespace(), target);
8243 }
8244
Xiao Hang801e9202015-07-27 17:46:22 -07008245 // optional bool javanano_use_deprecated_package = 38;
8246 if (has_javanano_use_deprecated_package()) {
8247 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(38, this->javanano_use_deprecated_package(), target);
8248 }
8249
kenton@google.comd37d46d2009-04-25 02:53:47 +00008250 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08008251 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00008252 target = ::google::protobuf::internal::WireFormatLite::
8253 WriteMessageNoVirtualToArray(
8254 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00008255 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008256
kenton@google.comd37d46d2009-04-25 02:53:47 +00008257 // Extension range [1000, 536870912)
8258 target = _extensions_.SerializeWithCachedSizesToArray(
8259 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008260
Feng Xiao6ef984a2014-11-10 17:34:54 -08008261 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00008262 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
8263 unknown_fields(), target);
8264 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008265 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00008266 return target;
temporal40ee5512008-07-10 02:12:20 +00008267}
8268
8269int FileOptions::ByteSize() const {
8270 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008271
Austin Schuh307af622015-06-05 22:46:01 -07008272 if (_has_bits_[0 / 32] & 255u) {
temporal40ee5512008-07-10 02:12:20 +00008273 // optional string java_package = 1;
8274 if (has_java_package()) {
8275 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008276 ::google::protobuf::internal::WireFormatLite::StringSize(
8277 this->java_package());
temporal40ee5512008-07-10 02:12:20 +00008278 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008279
temporal40ee5512008-07-10 02:12:20 +00008280 // optional string java_outer_classname = 8;
8281 if (has_java_outer_classname()) {
8282 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008283 ::google::protobuf::internal::WireFormatLite::StringSize(
8284 this->java_outer_classname());
temporal40ee5512008-07-10 02:12:20 +00008285 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008286
temporal40ee5512008-07-10 02:12:20 +00008287 // optional bool java_multiple_files = 10 [default = false];
8288 if (has_java_multiple_files()) {
8289 total_size += 1 + 1;
8290 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008291
liujisi@google.com33165fe2010-11-02 13:14:58 +00008292 // optional bool java_generate_equals_and_hash = 20 [default = false];
8293 if (has_java_generate_equals_and_hash()) {
8294 total_size += 2 + 1;
8295 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008296
jieluo@google.com4de8f552014-07-18 00:47:59 +00008297 // optional bool java_string_check_utf8 = 27 [default = false];
8298 if (has_java_string_check_utf8()) {
8299 total_size += 2 + 1;
8300 }
8301
kenton@google.comd37d46d2009-04-25 02:53:47 +00008302 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
temporal40ee5512008-07-10 02:12:20 +00008303 if (has_optimize_for()) {
8304 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +00008305 ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for());
temporal40ee5512008-07-10 02:12:20 +00008306 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008307
8308 // optional string go_package = 11;
8309 if (has_go_package()) {
8310 total_size += 1 +
8311 ::google::protobuf::internal::WireFormatLite::StringSize(
8312 this->go_package());
8313 }
8314
liujisi@google.com33165fe2010-11-02 13:14:58 +00008315 // optional bool cc_generic_services = 16 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008316 if (has_cc_generic_services()) {
8317 total_size += 2 + 1;
8318 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008319
jieluo@google.com4de8f552014-07-18 00:47:59 +00008320 }
Xiao Hang801e9202015-07-27 17:46:22 -07008321 if (_has_bits_[8 / 32] & 32512u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008322 // optional bool java_generic_services = 17 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008323 if (has_java_generic_services()) {
8324 total_size += 2 + 1;
8325 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008326
liujisi@google.com33165fe2010-11-02 13:14:58 +00008327 // optional bool py_generic_services = 18 [default = false];
kenton@google.comfccb1462009-12-18 02:11:36 +00008328 if (has_py_generic_services()) {
8329 total_size += 2 + 1;
8330 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008331
jieluo@google.com4de8f552014-07-18 00:47:59 +00008332 // optional bool deprecated = 23 [default = false];
8333 if (has_deprecated()) {
8334 total_size += 2 + 1;
8335 }
8336
Feng Xiaof157a562014-11-14 11:50:31 -08008337 // optional bool cc_enable_arenas = 31 [default = false];
8338 if (has_cc_enable_arenas()) {
8339 total_size += 2 + 1;
8340 }
8341
Jisi Liu885b6122015-02-28 14:51:22 -08008342 // optional string objc_class_prefix = 36;
8343 if (has_objc_class_prefix()) {
8344 total_size += 2 +
8345 ::google::protobuf::internal::WireFormatLite::StringSize(
8346 this->objc_class_prefix());
8347 }
8348
Jan Tattermusch685ae362015-03-16 19:07:16 -07008349 // optional string csharp_namespace = 37;
8350 if (has_csharp_namespace()) {
8351 total_size += 2 +
8352 ::google::protobuf::internal::WireFormatLite::StringSize(
8353 this->csharp_namespace());
8354 }
8355
Xiao Hang801e9202015-07-27 17:46:22 -07008356 // optional bool javanano_use_deprecated_package = 38;
8357 if (has_javanano_use_deprecated_package()) {
8358 total_size += 2 + 1;
8359 }
8360
temporal40ee5512008-07-10 02:12:20 +00008361 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008362 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00008363 total_size += 2 * this->uninterpreted_option_size();
8364 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00008365 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00008366 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00008367 this->uninterpreted_option(i));
8368 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008369
kenton@google.comd37d46d2009-04-25 02:53:47 +00008370 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008371
Feng Xiao6ef984a2014-11-10 17:34:54 -08008372 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00008373 total_size +=
8374 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
8375 unknown_fields());
8376 }
kenton@google.comfccb1462009-12-18 02:11:36 +00008377 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00008378 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00008379 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00008380 return total_size;
8381}
8382
8383void FileOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08008384 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07008385 const FileOptions* source =
8386 ::google::protobuf::internal::DynamicCastToGenerated<const FileOptions>(
8387 &from);
temporal40ee5512008-07-10 02:12:20 +00008388 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00008389 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00008390 } else {
8391 MergeFrom(*source);
8392 }
8393}
8394
8395void FileOptions::MergeFrom(const FileOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08008396 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +00008397 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00008398 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008399 if (from.has_java_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008400 set_has_java_package();
8401 java_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_package_);
temporal40ee5512008-07-10 02:12:20 +00008402 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008403 if (from.has_java_outer_classname()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008404 set_has_java_outer_classname();
8405 java_outer_classname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_outer_classname_);
temporal40ee5512008-07-10 02:12:20 +00008406 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008407 if (from.has_java_multiple_files()) {
temporal40ee5512008-07-10 02:12:20 +00008408 set_java_multiple_files(from.java_multiple_files());
8409 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008410 if (from.has_java_generate_equals_and_hash()) {
8411 set_java_generate_equals_and_hash(from.java_generate_equals_and_hash());
8412 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008413 if (from.has_java_string_check_utf8()) {
8414 set_java_string_check_utf8(from.java_string_check_utf8());
8415 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008416 if (from.has_optimize_for()) {
temporal40ee5512008-07-10 02:12:20 +00008417 set_optimize_for(from.optimize_for());
8418 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008419 if (from.has_go_package()) {
Feng Xiaof157a562014-11-14 11:50:31 -08008420 set_has_go_package();
8421 go_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.go_package_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008422 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008423 if (from.has_cc_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008424 set_cc_generic_services(from.cc_generic_services());
8425 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008426 }
8427 if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00008428 if (from.has_java_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008429 set_java_generic_services(from.java_generic_services());
8430 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00008431 if (from.has_py_generic_services()) {
kenton@google.comfccb1462009-12-18 02:11:36 +00008432 set_py_generic_services(from.py_generic_services());
8433 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00008434 if (from.has_deprecated()) {
8435 set_deprecated(from.deprecated());
8436 }
Feng Xiaof157a562014-11-14 11:50:31 -08008437 if (from.has_cc_enable_arenas()) {
8438 set_cc_enable_arenas(from.cc_enable_arenas());
8439 }
Jisi Liu885b6122015-02-28 14:51:22 -08008440 if (from.has_objc_class_prefix()) {
8441 set_has_objc_class_prefix();
8442 objc_class_prefix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.objc_class_prefix_);
8443 }
Jan Tattermusch685ae362015-03-16 19:07:16 -07008444 if (from.has_csharp_namespace()) {
8445 set_has_csharp_namespace();
8446 csharp_namespace_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace_);
8447 }
Xiao Hang801e9202015-07-27 17:46:22 -07008448 if (from.has_javanano_use_deprecated_package()) {
8449 set_javanano_use_deprecated_package(from.javanano_use_deprecated_package());
8450 }
temporal40ee5512008-07-10 02:12:20 +00008451 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00008452 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08008453 if (from._internal_metadata_.have_unknown_fields()) {
8454 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
8455 }
temporal40ee5512008-07-10 02:12:20 +00008456}
8457
8458void FileOptions::CopyFrom(const ::google::protobuf::Message& from) {
8459 if (&from == this) return;
8460 Clear();
8461 MergeFrom(from);
8462}
8463
8464void FileOptions::CopyFrom(const FileOptions& from) {
8465 if (&from == this) return;
8466 Clear();
8467 MergeFrom(from);
8468}
8469
kenton@google.comceb561d2009-06-25 19:05:36 +00008470bool FileOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008471
jieluo@google.com4de8f552014-07-18 00:47:59 +00008472 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00008473
kenton@google.comceb561d2009-06-25 19:05:36 +00008474 if (!_extensions_.IsInitialized()) return false; return true;
8475}
8476
kenton@google.com26bd9ee2008-11-21 00:06:27 +00008477void FileOptions::Swap(FileOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08008478 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08008479 InternalSwap(other);
8480}
8481void FileOptions::InternalSwap(FileOptions* other) {
8482 java_package_.Swap(&other->java_package_);
8483 java_outer_classname_.Swap(&other->java_outer_classname_);
8484 std::swap(java_multiple_files_, other->java_multiple_files_);
8485 std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_);
8486 std::swap(java_string_check_utf8_, other->java_string_check_utf8_);
8487 std::swap(optimize_for_, other->optimize_for_);
8488 go_package_.Swap(&other->go_package_);
8489 std::swap(cc_generic_services_, other->cc_generic_services_);
8490 std::swap(java_generic_services_, other->java_generic_services_);
8491 std::swap(py_generic_services_, other->py_generic_services_);
8492 std::swap(deprecated_, other->deprecated_);
Feng Xiaof157a562014-11-14 11:50:31 -08008493 std::swap(cc_enable_arenas_, other->cc_enable_arenas_);
Jisi Liu885b6122015-02-28 14:51:22 -08008494 objc_class_prefix_.Swap(&other->objc_class_prefix_);
Jan Tattermusch685ae362015-03-16 19:07:16 -07008495 csharp_namespace_.Swap(&other->csharp_namespace_);
Xiao Hang801e9202015-07-27 17:46:22 -07008496 std::swap(javanano_use_deprecated_package_, other->javanano_use_deprecated_package_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08008497 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
8498 std::swap(_has_bits_[0], other->_has_bits_[0]);
8499 _internal_metadata_.Swap(&other->_internal_metadata_);
8500 std::swap(_cached_size_, other->_cached_size_);
8501 _extensions_.Swap(&other->_extensions_);
8502}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00008503
kenton@google.com80b1d622009-07-29 01:13:20 +00008504::google::protobuf::Metadata FileOptions::GetMetadata() const {
8505 protobuf_AssignDescriptorsOnce();
8506 ::google::protobuf::Metadata metadata;
8507 metadata.descriptor = FileOptions_descriptor_;
8508 metadata.reflection = FileOptions_reflection_;
8509 return metadata;
temporal40ee5512008-07-10 02:12:20 +00008510}
8511
Jisi Liu885b6122015-02-28 14:51:22 -08008512#if PROTOBUF_INLINE_NOT_IN_HEADERS
8513// FileOptions
8514
8515// optional string java_package = 1;
Bo Yang5db21732015-05-21 14:28:59 -07008516bool FileOptions::has_java_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008517 return (_has_bits_[0] & 0x00000001u) != 0;
8518}
Bo Yang5db21732015-05-21 14:28:59 -07008519void FileOptions::set_has_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008520 _has_bits_[0] |= 0x00000001u;
8521}
Bo Yang5db21732015-05-21 14:28:59 -07008522void FileOptions::clear_has_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008523 _has_bits_[0] &= ~0x00000001u;
8524}
Bo Yang5db21732015-05-21 14:28:59 -07008525void FileOptions::clear_java_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008526 java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8527 clear_has_java_package();
8528}
8529 const ::std::string& FileOptions::java_package() const {
8530 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package)
8531 return java_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8532}
8533 void FileOptions::set_java_package(const ::std::string& value) {
8534 set_has_java_package();
8535 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8536 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package)
8537}
8538 void FileOptions::set_java_package(const char* value) {
8539 set_has_java_package();
8540 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8541 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package)
8542}
8543 void FileOptions::set_java_package(const char* value, size_t size) {
8544 set_has_java_package();
8545 java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8546 ::std::string(reinterpret_cast<const char*>(value), size));
8547 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package)
8548}
8549 ::std::string* FileOptions::mutable_java_package() {
8550 set_has_java_package();
8551 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package)
8552 return java_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8553}
8554 ::std::string* FileOptions::release_java_package() {
8555 clear_has_java_package();
8556 return java_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8557}
8558 void FileOptions::set_allocated_java_package(::std::string* java_package) {
8559 if (java_package != NULL) {
8560 set_has_java_package();
8561 } else {
8562 clear_has_java_package();
8563 }
8564 java_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_package);
8565 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package)
8566}
8567
8568// optional string java_outer_classname = 8;
Bo Yang5db21732015-05-21 14:28:59 -07008569bool FileOptions::has_java_outer_classname() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008570 return (_has_bits_[0] & 0x00000002u) != 0;
8571}
Bo Yang5db21732015-05-21 14:28:59 -07008572void FileOptions::set_has_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008573 _has_bits_[0] |= 0x00000002u;
8574}
Bo Yang5db21732015-05-21 14:28:59 -07008575void FileOptions::clear_has_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008576 _has_bits_[0] &= ~0x00000002u;
8577}
Bo Yang5db21732015-05-21 14:28:59 -07008578void FileOptions::clear_java_outer_classname() {
Jisi Liu885b6122015-02-28 14:51:22 -08008579 java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8580 clear_has_java_outer_classname();
8581}
8582 const ::std::string& FileOptions::java_outer_classname() const {
8583 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname)
8584 return java_outer_classname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8585}
8586 void FileOptions::set_java_outer_classname(const ::std::string& value) {
8587 set_has_java_outer_classname();
8588 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8589 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname)
8590}
8591 void FileOptions::set_java_outer_classname(const char* value) {
8592 set_has_java_outer_classname();
8593 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8594 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_outer_classname)
8595}
8596 void FileOptions::set_java_outer_classname(const char* value, size_t size) {
8597 set_has_java_outer_classname();
8598 java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8599 ::std::string(reinterpret_cast<const char*>(value), size));
8600 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname)
8601}
8602 ::std::string* FileOptions::mutable_java_outer_classname() {
8603 set_has_java_outer_classname();
8604 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname)
8605 return java_outer_classname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8606}
8607 ::std::string* FileOptions::release_java_outer_classname() {
8608 clear_has_java_outer_classname();
8609 return java_outer_classname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8610}
8611 void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) {
8612 if (java_outer_classname != NULL) {
8613 set_has_java_outer_classname();
8614 } else {
8615 clear_has_java_outer_classname();
8616 }
8617 java_outer_classname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_outer_classname);
8618 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname)
8619}
8620
8621// optional bool java_multiple_files = 10 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008622bool FileOptions::has_java_multiple_files() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008623 return (_has_bits_[0] & 0x00000004u) != 0;
8624}
Bo Yang5db21732015-05-21 14:28:59 -07008625void FileOptions::set_has_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008626 _has_bits_[0] |= 0x00000004u;
8627}
Bo Yang5db21732015-05-21 14:28:59 -07008628void FileOptions::clear_has_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008629 _has_bits_[0] &= ~0x00000004u;
8630}
Bo Yang5db21732015-05-21 14:28:59 -07008631void FileOptions::clear_java_multiple_files() {
Jisi Liu885b6122015-02-28 14:51:22 -08008632 java_multiple_files_ = false;
8633 clear_has_java_multiple_files();
8634}
8635 bool FileOptions::java_multiple_files() const {
8636 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_multiple_files)
8637 return java_multiple_files_;
8638}
8639 void FileOptions::set_java_multiple_files(bool value) {
8640 set_has_java_multiple_files();
8641 java_multiple_files_ = value;
8642 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files)
8643}
8644
8645// optional bool java_generate_equals_and_hash = 20 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008646bool FileOptions::has_java_generate_equals_and_hash() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008647 return (_has_bits_[0] & 0x00000008u) != 0;
8648}
Bo Yang5db21732015-05-21 14:28:59 -07008649void FileOptions::set_has_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008650 _has_bits_[0] |= 0x00000008u;
8651}
Bo Yang5db21732015-05-21 14:28:59 -07008652void FileOptions::clear_has_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008653 _has_bits_[0] &= ~0x00000008u;
8654}
Bo Yang5db21732015-05-21 14:28:59 -07008655void FileOptions::clear_java_generate_equals_and_hash() {
Jisi Liu885b6122015-02-28 14:51:22 -08008656 java_generate_equals_and_hash_ = false;
8657 clear_has_java_generate_equals_and_hash();
8658}
8659 bool FileOptions::java_generate_equals_and_hash() const {
8660 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash)
8661 return java_generate_equals_and_hash_;
8662}
8663 void FileOptions::set_java_generate_equals_and_hash(bool value) {
8664 set_has_java_generate_equals_and_hash();
8665 java_generate_equals_and_hash_ = value;
8666 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generate_equals_and_hash)
8667}
8668
8669// optional bool java_string_check_utf8 = 27 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008670bool FileOptions::has_java_string_check_utf8() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008671 return (_has_bits_[0] & 0x00000010u) != 0;
8672}
Bo Yang5db21732015-05-21 14:28:59 -07008673void FileOptions::set_has_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008674 _has_bits_[0] |= 0x00000010u;
8675}
Bo Yang5db21732015-05-21 14:28:59 -07008676void FileOptions::clear_has_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008677 _has_bits_[0] &= ~0x00000010u;
8678}
Bo Yang5db21732015-05-21 14:28:59 -07008679void FileOptions::clear_java_string_check_utf8() {
Jisi Liu885b6122015-02-28 14:51:22 -08008680 java_string_check_utf8_ = false;
8681 clear_has_java_string_check_utf8();
8682}
8683 bool FileOptions::java_string_check_utf8() const {
8684 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_string_check_utf8)
8685 return java_string_check_utf8_;
8686}
8687 void FileOptions::set_java_string_check_utf8(bool value) {
8688 set_has_java_string_check_utf8();
8689 java_string_check_utf8_ = value;
8690 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_string_check_utf8)
8691}
8692
8693// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
Bo Yang5db21732015-05-21 14:28:59 -07008694bool FileOptions::has_optimize_for() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008695 return (_has_bits_[0] & 0x00000020u) != 0;
8696}
Bo Yang5db21732015-05-21 14:28:59 -07008697void FileOptions::set_has_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008698 _has_bits_[0] |= 0x00000020u;
8699}
Bo Yang5db21732015-05-21 14:28:59 -07008700void FileOptions::clear_has_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008701 _has_bits_[0] &= ~0x00000020u;
8702}
Bo Yang5db21732015-05-21 14:28:59 -07008703void FileOptions::clear_optimize_for() {
Jisi Liu885b6122015-02-28 14:51:22 -08008704 optimize_for_ = 1;
8705 clear_has_optimize_for();
8706}
8707 ::google::protobuf::FileOptions_OptimizeMode FileOptions::optimize_for() const {
8708 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.optimize_for)
8709 return static_cast< ::google::protobuf::FileOptions_OptimizeMode >(optimize_for_);
8710}
8711 void FileOptions::set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value) {
8712 assert(::google::protobuf::FileOptions_OptimizeMode_IsValid(value));
8713 set_has_optimize_for();
8714 optimize_for_ = value;
8715 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.optimize_for)
8716}
8717
8718// optional string go_package = 11;
Bo Yang5db21732015-05-21 14:28:59 -07008719bool FileOptions::has_go_package() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008720 return (_has_bits_[0] & 0x00000040u) != 0;
8721}
Bo Yang5db21732015-05-21 14:28:59 -07008722void FileOptions::set_has_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008723 _has_bits_[0] |= 0x00000040u;
8724}
Bo Yang5db21732015-05-21 14:28:59 -07008725void FileOptions::clear_has_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008726 _has_bits_[0] &= ~0x00000040u;
8727}
Bo Yang5db21732015-05-21 14:28:59 -07008728void FileOptions::clear_go_package() {
Jisi Liu885b6122015-02-28 14:51:22 -08008729 go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8730 clear_has_go_package();
8731}
8732 const ::std::string& FileOptions::go_package() const {
8733 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package)
8734 return go_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8735}
8736 void FileOptions::set_go_package(const ::std::string& value) {
8737 set_has_go_package();
8738 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8739 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package)
8740}
8741 void FileOptions::set_go_package(const char* value) {
8742 set_has_go_package();
8743 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8744 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package)
8745}
8746 void FileOptions::set_go_package(const char* value, size_t size) {
8747 set_has_go_package();
8748 go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8749 ::std::string(reinterpret_cast<const char*>(value), size));
8750 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package)
8751}
8752 ::std::string* FileOptions::mutable_go_package() {
8753 set_has_go_package();
8754 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package)
8755 return go_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8756}
8757 ::std::string* FileOptions::release_go_package() {
8758 clear_has_go_package();
8759 return go_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8760}
8761 void FileOptions::set_allocated_go_package(::std::string* go_package) {
8762 if (go_package != NULL) {
8763 set_has_go_package();
8764 } else {
8765 clear_has_go_package();
8766 }
8767 go_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), go_package);
8768 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package)
8769}
8770
8771// optional bool cc_generic_services = 16 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008772bool FileOptions::has_cc_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008773 return (_has_bits_[0] & 0x00000080u) != 0;
8774}
Bo Yang5db21732015-05-21 14:28:59 -07008775void FileOptions::set_has_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008776 _has_bits_[0] |= 0x00000080u;
8777}
Bo Yang5db21732015-05-21 14:28:59 -07008778void FileOptions::clear_has_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008779 _has_bits_[0] &= ~0x00000080u;
8780}
Bo Yang5db21732015-05-21 14:28:59 -07008781void FileOptions::clear_cc_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008782 cc_generic_services_ = false;
8783 clear_has_cc_generic_services();
8784}
8785 bool FileOptions::cc_generic_services() const {
8786 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services)
8787 return cc_generic_services_;
8788}
8789 void FileOptions::set_cc_generic_services(bool value) {
8790 set_has_cc_generic_services();
8791 cc_generic_services_ = value;
8792 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_generic_services)
8793}
8794
8795// optional bool java_generic_services = 17 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008796bool FileOptions::has_java_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008797 return (_has_bits_[0] & 0x00000100u) != 0;
8798}
Bo Yang5db21732015-05-21 14:28:59 -07008799void FileOptions::set_has_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008800 _has_bits_[0] |= 0x00000100u;
8801}
Bo Yang5db21732015-05-21 14:28:59 -07008802void FileOptions::clear_has_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008803 _has_bits_[0] &= ~0x00000100u;
8804}
Bo Yang5db21732015-05-21 14:28:59 -07008805void FileOptions::clear_java_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008806 java_generic_services_ = false;
8807 clear_has_java_generic_services();
8808}
8809 bool FileOptions::java_generic_services() const {
8810 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generic_services)
8811 return java_generic_services_;
8812}
8813 void FileOptions::set_java_generic_services(bool value) {
8814 set_has_java_generic_services();
8815 java_generic_services_ = value;
8816 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generic_services)
8817}
8818
8819// optional bool py_generic_services = 18 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008820bool FileOptions::has_py_generic_services() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008821 return (_has_bits_[0] & 0x00000200u) != 0;
8822}
Bo Yang5db21732015-05-21 14:28:59 -07008823void FileOptions::set_has_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008824 _has_bits_[0] |= 0x00000200u;
8825}
Bo Yang5db21732015-05-21 14:28:59 -07008826void FileOptions::clear_has_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008827 _has_bits_[0] &= ~0x00000200u;
8828}
Bo Yang5db21732015-05-21 14:28:59 -07008829void FileOptions::clear_py_generic_services() {
Jisi Liu885b6122015-02-28 14:51:22 -08008830 py_generic_services_ = false;
8831 clear_has_py_generic_services();
8832}
8833 bool FileOptions::py_generic_services() const {
8834 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.py_generic_services)
8835 return py_generic_services_;
8836}
8837 void FileOptions::set_py_generic_services(bool value) {
8838 set_has_py_generic_services();
8839 py_generic_services_ = value;
8840 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.py_generic_services)
8841}
8842
8843// optional bool deprecated = 23 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008844bool FileOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008845 return (_has_bits_[0] & 0x00000400u) != 0;
8846}
Bo Yang5db21732015-05-21 14:28:59 -07008847void FileOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08008848 _has_bits_[0] |= 0x00000400u;
8849}
Bo Yang5db21732015-05-21 14:28:59 -07008850void FileOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08008851 _has_bits_[0] &= ~0x00000400u;
8852}
Bo Yang5db21732015-05-21 14:28:59 -07008853void FileOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08008854 deprecated_ = false;
8855 clear_has_deprecated();
8856}
8857 bool FileOptions::deprecated() const {
8858 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.deprecated)
8859 return deprecated_;
8860}
8861 void FileOptions::set_deprecated(bool value) {
8862 set_has_deprecated();
8863 deprecated_ = value;
8864 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.deprecated)
8865}
8866
8867// optional bool cc_enable_arenas = 31 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07008868bool FileOptions::has_cc_enable_arenas() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008869 return (_has_bits_[0] & 0x00000800u) != 0;
8870}
Bo Yang5db21732015-05-21 14:28:59 -07008871void FileOptions::set_has_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08008872 _has_bits_[0] |= 0x00000800u;
8873}
Bo Yang5db21732015-05-21 14:28:59 -07008874void FileOptions::clear_has_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08008875 _has_bits_[0] &= ~0x00000800u;
8876}
Bo Yang5db21732015-05-21 14:28:59 -07008877void FileOptions::clear_cc_enable_arenas() {
Jisi Liu885b6122015-02-28 14:51:22 -08008878 cc_enable_arenas_ = false;
8879 clear_has_cc_enable_arenas();
8880}
8881 bool FileOptions::cc_enable_arenas() const {
8882 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_enable_arenas)
8883 return cc_enable_arenas_;
8884}
8885 void FileOptions::set_cc_enable_arenas(bool value) {
8886 set_has_cc_enable_arenas();
8887 cc_enable_arenas_ = value;
8888 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_enable_arenas)
8889}
8890
8891// optional string objc_class_prefix = 36;
Bo Yang5db21732015-05-21 14:28:59 -07008892bool FileOptions::has_objc_class_prefix() const {
Jisi Liu885b6122015-02-28 14:51:22 -08008893 return (_has_bits_[0] & 0x00001000u) != 0;
8894}
Bo Yang5db21732015-05-21 14:28:59 -07008895void FileOptions::set_has_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08008896 _has_bits_[0] |= 0x00001000u;
8897}
Bo Yang5db21732015-05-21 14:28:59 -07008898void FileOptions::clear_has_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08008899 _has_bits_[0] &= ~0x00001000u;
8900}
Bo Yang5db21732015-05-21 14:28:59 -07008901void FileOptions::clear_objc_class_prefix() {
Jisi Liu885b6122015-02-28 14:51:22 -08008902 objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8903 clear_has_objc_class_prefix();
8904}
8905 const ::std::string& FileOptions::objc_class_prefix() const {
8906 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix)
8907 return objc_class_prefix_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8908}
8909 void FileOptions::set_objc_class_prefix(const ::std::string& value) {
8910 set_has_objc_class_prefix();
8911 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8912 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix)
8913}
8914 void FileOptions::set_objc_class_prefix(const char* value) {
8915 set_has_objc_class_prefix();
8916 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8917 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.objc_class_prefix)
8918}
8919 void FileOptions::set_objc_class_prefix(const char* value, size_t size) {
8920 set_has_objc_class_prefix();
8921 objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8922 ::std::string(reinterpret_cast<const char*>(value), size));
8923 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.objc_class_prefix)
8924}
8925 ::std::string* FileOptions::mutable_objc_class_prefix() {
8926 set_has_objc_class_prefix();
8927 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix)
8928 return objc_class_prefix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8929}
8930 ::std::string* FileOptions::release_objc_class_prefix() {
8931 clear_has_objc_class_prefix();
8932 return objc_class_prefix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8933}
8934 void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_class_prefix) {
8935 if (objc_class_prefix != NULL) {
8936 set_has_objc_class_prefix();
8937 } else {
8938 clear_has_objc_class_prefix();
8939 }
8940 objc_class_prefix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), objc_class_prefix);
8941 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix)
8942}
8943
Jan Tattermusch685ae362015-03-16 19:07:16 -07008944// optional string csharp_namespace = 37;
Bo Yang5db21732015-05-21 14:28:59 -07008945bool FileOptions::has_csharp_namespace() const {
Jan Tattermusch685ae362015-03-16 19:07:16 -07008946 return (_has_bits_[0] & 0x00002000u) != 0;
8947}
Bo Yang5db21732015-05-21 14:28:59 -07008948void FileOptions::set_has_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07008949 _has_bits_[0] |= 0x00002000u;
8950}
Bo Yang5db21732015-05-21 14:28:59 -07008951void FileOptions::clear_has_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07008952 _has_bits_[0] &= ~0x00002000u;
8953}
Bo Yang5db21732015-05-21 14:28:59 -07008954void FileOptions::clear_csharp_namespace() {
Jan Tattermusch685ae362015-03-16 19:07:16 -07008955 csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8956 clear_has_csharp_namespace();
8957}
8958 const ::std::string& FileOptions::csharp_namespace() const {
8959 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace)
8960 return csharp_namespace_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8961}
8962 void FileOptions::set_csharp_namespace(const ::std::string& value) {
8963 set_has_csharp_namespace();
8964 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
8965 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace)
8966}
8967 void FileOptions::set_csharp_namespace(const char* value) {
8968 set_has_csharp_namespace();
8969 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
8970 // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.csharp_namespace)
8971}
8972 void FileOptions::set_csharp_namespace(const char* value, size_t size) {
8973 set_has_csharp_namespace();
8974 csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
8975 ::std::string(reinterpret_cast<const char*>(value), size));
8976 // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.csharp_namespace)
8977}
8978 ::std::string* FileOptions::mutable_csharp_namespace() {
8979 set_has_csharp_namespace();
8980 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace)
8981 return csharp_namespace_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8982}
8983 ::std::string* FileOptions::release_csharp_namespace() {
8984 clear_has_csharp_namespace();
8985 return csharp_namespace_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
8986}
8987 void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_namespace) {
8988 if (csharp_namespace != NULL) {
8989 set_has_csharp_namespace();
8990 } else {
8991 clear_has_csharp_namespace();
8992 }
8993 csharp_namespace_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), csharp_namespace);
8994 // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace)
8995}
8996
Xiao Hang801e9202015-07-27 17:46:22 -07008997// optional bool javanano_use_deprecated_package = 38;
8998bool FileOptions::has_javanano_use_deprecated_package() const {
8999 return (_has_bits_[0] & 0x00004000u) != 0;
9000}
9001void FileOptions::set_has_javanano_use_deprecated_package() {
9002 _has_bits_[0] |= 0x00004000u;
9003}
9004void FileOptions::clear_has_javanano_use_deprecated_package() {
9005 _has_bits_[0] &= ~0x00004000u;
9006}
9007void FileOptions::clear_javanano_use_deprecated_package() {
9008 javanano_use_deprecated_package_ = false;
9009 clear_has_javanano_use_deprecated_package();
9010}
9011 bool FileOptions::javanano_use_deprecated_package() const {
9012 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.javanano_use_deprecated_package)
9013 return javanano_use_deprecated_package_;
9014}
9015 void FileOptions::set_javanano_use_deprecated_package(bool value) {
9016 set_has_javanano_use_deprecated_package();
9017 javanano_use_deprecated_package_ = value;
9018 // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.javanano_use_deprecated_package)
9019}
9020
Jisi Liu885b6122015-02-28 14:51:22 -08009021// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -07009022int FileOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009023 return uninterpreted_option_.size();
9024}
Bo Yang5db21732015-05-21 14:28:59 -07009025void FileOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009026 uninterpreted_option_.Clear();
9027}
9028 const ::google::protobuf::UninterpretedOption& FileOptions::uninterpreted_option(int index) const {
9029 // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.uninterpreted_option)
9030 return uninterpreted_option_.Get(index);
9031}
9032 ::google::protobuf::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) {
9033 // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.uninterpreted_option)
9034 return uninterpreted_option_.Mutable(index);
9035}
9036 ::google::protobuf::UninterpretedOption* FileOptions::add_uninterpreted_option() {
9037 // @@protoc_insertion_point(field_add:google.protobuf.FileOptions.uninterpreted_option)
9038 return uninterpreted_option_.Add();
9039}
9040 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
9041FileOptions::uninterpreted_option() const {
9042 // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option)
9043 return uninterpreted_option_;
9044}
9045 ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
9046FileOptions::mutable_uninterpreted_option() {
9047 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option)
9048 return &uninterpreted_option_;
9049}
9050
9051#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00009052
9053// ===================================================================
9054
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009055#ifndef _MSC_VER
9056const int MessageOptions::kMessageSetWireFormatFieldNumber;
kenton@google.com80b1d622009-07-29 01:13:20 +00009057const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009058const int MessageOptions::kDeprecatedFieldNumber;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009059const int MessageOptions::kMapEntryFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009060const int MessageOptions::kUninterpretedOptionFieldNumber;
9061#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +00009062
kenton@google.com573989f2009-10-30 22:02:17 +00009063MessageOptions::MessageOptions()
Bo Yang5db21732015-05-21 14:28:59 -07009064 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009065 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009066 // @@protoc_insertion_point(constructor:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009067}
9068
kenton@google.com80b1d622009-07-29 01:13:20 +00009069void MessageOptions::InitAsDefaultInstance() {
9070}
kenton@google.com24bf56f2008-09-24 20:31:01 +00009071
kenton@google.com573989f2009-10-30 22:02:17 +00009072MessageOptions::MessageOptions(const MessageOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08009073 : ::google::protobuf::Message(),
9074 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009075 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00009076 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009077 // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009078}
9079
kenton@google.comd37d46d2009-04-25 02:53:47 +00009080void MessageOptions::SharedCtor() {
9081 _cached_size_ = 0;
9082 message_set_wire_format_ = false;
kenton@google.com80b1d622009-07-29 01:13:20 +00009083 no_standard_descriptor_accessor_ = false;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009084 deprecated_ = false;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009085 map_entry_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009086 ::memset(_has_bits_, 0, sizeof(_has_bits_));
9087}
9088
temporal40ee5512008-07-10 02:12:20 +00009089MessageOptions::~MessageOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009090 // @@protoc_insertion_point(destructor:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009091 SharedDtor();
9092}
9093
9094void MessageOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009095 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00009096 }
9097}
9098
kenton@google.comfccb1462009-12-18 02:11:36 +00009099void MessageOptions::SetCachedSize(int size) const {
9100 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
9101 _cached_size_ = size;
9102 GOOGLE_SAFE_CONCURRENT_WRITES_END();
9103}
temporal40ee5512008-07-10 02:12:20 +00009104const ::google::protobuf::Descriptor* MessageOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009105 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009106 return MessageOptions_descriptor_;
9107}
9108
kenton@google.com24bf56f2008-09-24 20:31:01 +00009109const MessageOptions& MessageOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00009110 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
9111 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009112}
9113
9114MessageOptions* MessageOptions::default_instance_ = NULL;
9115
Feng Xiao6ef984a2014-11-10 17:34:54 -08009116MessageOptions* MessageOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08009117 MessageOptions* n = new MessageOptions;
9118 if (arena != NULL) {
9119 arena->Own(n);
9120 }
9121 return n;
temporal40ee5512008-07-10 02:12:20 +00009122}
9123
9124void MessageOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009125 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08009126#define ZR_HELPER_(f) reinterpret_cast<char*>(\
9127 &reinterpret_cast<MessageOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009128
Jisi Liu885b6122015-02-28 14:51:22 -08009129#define ZR_(first, last) do {\
9130 ::memset(&first, 0,\
9131 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
9132} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009133
Feng Xiao6ef984a2014-11-10 17:34:54 -08009134 ZR_(message_set_wire_format_, map_entry_);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009135
Jisi Liu885b6122015-02-28 14:51:22 -08009136#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00009137#undef ZR_
9138
kenton@google.com24bf56f2008-09-24 20:31:01 +00009139 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00009140 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08009141 if (_internal_metadata_.have_unknown_fields()) {
9142 mutable_unknown_fields()->Clear();
9143 }
temporal40ee5512008-07-10 02:12:20 +00009144}
9145
9146bool MessageOptions::MergePartialFromCodedStream(
9147 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009148#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00009149 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009150 // @@protoc_insertion_point(parse_start:google.protobuf.MessageOptions)
9151 for (;;) {
9152 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
9153 tag = p.first;
9154 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009155 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
temporal40ee5512008-07-10 02:12:20 +00009156 // optional bool message_set_wire_format = 1 [default = false];
9157 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009158 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009159 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9160 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9161 input, &message_set_wire_format_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009162 set_has_message_set_wire_format();
kenton@google.comfccb1462009-12-18 02:11:36 +00009163 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009164 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00009165 }
kenton@google.com80b1d622009-07-29 01:13:20 +00009166 if (input->ExpectTag(16)) goto parse_no_standard_descriptor_accessor;
9167 break;
9168 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009169
kenton@google.com80b1d622009-07-29 01:13:20 +00009170 // optional bool no_standard_descriptor_accessor = 2 [default = false];
9171 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009172 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009173 parse_no_standard_descriptor_accessor:
9174 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9175 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9176 input, &no_standard_descriptor_accessor_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009177 set_has_no_standard_descriptor_accessor();
kenton@google.comfccb1462009-12-18 02:11:36 +00009178 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009179 goto handle_unusual;
9180 }
9181 if (input->ExpectTag(24)) goto parse_deprecated;
9182 break;
9183 }
9184
9185 // optional bool deprecated = 3 [default = false];
9186 case 3: {
9187 if (tag == 24) {
9188 parse_deprecated:
9189 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9190 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9191 input, &deprecated_)));
9192 set_has_deprecated();
9193 } else {
9194 goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009195 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08009196 if (input->ExpectTag(56)) goto parse_map_entry;
9197 break;
9198 }
9199
9200 // optional bool map_entry = 7;
9201 case 7: {
9202 if (tag == 56) {
9203 parse_map_entry:
9204 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9205 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9206 input, &map_entry_)));
9207 set_has_map_entry();
9208 } else {
9209 goto handle_unusual;
9210 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009211 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
9212 break;
9213 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009214
kenton@google.com24bf56f2008-09-24 20:31:01 +00009215 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
9216 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009217 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009218 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -07009219 DO_(input->IncrementRecursionDepth());
9220 parse_loop_uninterpreted_option:
9221 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00009222 input, add_uninterpreted_option()));
9223 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009224 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009225 }
Bo Yang5db21732015-05-21 14:28:59 -07009226 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
9227 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009228 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00009229 break;
9230 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009231
temporal40ee5512008-07-10 02:12:20 +00009232 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009233 handle_unusual:
9234 if (tag == 0 ||
9235 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00009236 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009237 goto success;
temporal40ee5512008-07-10 02:12:20 +00009238 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009239 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009240 DO_(_extensions_.ParseField(tag, input, default_instance_,
9241 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00009242 continue;
9243 }
temporal40ee5512008-07-10 02:12:20 +00009244 DO_(::google::protobuf::internal::WireFormat::SkipField(
9245 input, tag, mutable_unknown_fields()));
9246 break;
9247 }
9248 }
9249 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009250success:
9251 // @@protoc_insertion_point(parse_success:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009252 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009253failure:
9254 // @@protoc_insertion_point(parse_failure:google.protobuf.MessageOptions)
9255 return false;
temporal40ee5512008-07-10 02:12:20 +00009256#undef DO_
9257}
9258
kenton@google.comd37d46d2009-04-25 02:53:47 +00009259void MessageOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00009260 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009261 // @@protoc_insertion_point(serialize_start:google.protobuf.MessageOptions)
temporal40ee5512008-07-10 02:12:20 +00009262 // optional bool message_set_wire_format = 1 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009263 if (has_message_set_wire_format()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009264 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output);
9265 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009266
kenton@google.com80b1d622009-07-29 01:13:20 +00009267 // optional bool no_standard_descriptor_accessor = 2 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009268 if (has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009269 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output);
temporal40ee5512008-07-10 02:12:20 +00009270 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009271
jieluo@google.com4de8f552014-07-18 00:47:59 +00009272 // optional bool deprecated = 3 [default = false];
9273 if (has_deprecated()) {
9274 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
9275 }
9276
Feng Xiao6ef984a2014-11-10 17:34:54 -08009277 // optional bool map_entry = 7;
9278 if (has_map_entry()) {
9279 ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->map_entry(), output);
9280 }
9281
kenton@google.com24bf56f2008-09-24 20:31:01 +00009282 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08009283 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009284 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00009285 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00009286 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009287
kenton@google.com24bf56f2008-09-24 20:31:01 +00009288 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009289 _extensions_.SerializeWithCachedSizes(
9290 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009291
Feng Xiao6ef984a2014-11-10 17:34:54 -08009292 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009293 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
9294 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00009295 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009296 // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009297}
9298
9299::google::protobuf::uint8* MessageOptions::SerializeWithCachedSizesToArray(
9300 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009301 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009302 // optional bool message_set_wire_format = 1 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009303 if (has_message_set_wire_format()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009304 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target);
9305 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009306
kenton@google.com80b1d622009-07-29 01:13:20 +00009307 // optional bool no_standard_descriptor_accessor = 2 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009308 if (has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009309 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009310 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009311
jieluo@google.com4de8f552014-07-18 00:47:59 +00009312 // optional bool deprecated = 3 [default = false];
9313 if (has_deprecated()) {
9314 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
9315 }
9316
Feng Xiao6ef984a2014-11-10 17:34:54 -08009317 // optional bool map_entry = 7;
9318 if (has_map_entry()) {
9319 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->map_entry(), target);
9320 }
9321
kenton@google.comd37d46d2009-04-25 02:53:47 +00009322 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08009323 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009324 target = ::google::protobuf::internal::WireFormatLite::
9325 WriteMessageNoVirtualToArray(
9326 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009327 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009328
kenton@google.comd37d46d2009-04-25 02:53:47 +00009329 // Extension range [1000, 536870912)
9330 target = _extensions_.SerializeWithCachedSizesToArray(
9331 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009332
Feng Xiao6ef984a2014-11-10 17:34:54 -08009333 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009334 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
9335 unknown_fields(), target);
9336 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009337 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009338 return target;
temporal40ee5512008-07-10 02:12:20 +00009339}
9340
9341int MessageOptions::ByteSize() const {
9342 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009343
Austin Schuh307af622015-06-05 22:46:01 -07009344 if (_has_bits_[0 / 32] & 15u) {
temporal40ee5512008-07-10 02:12:20 +00009345 // optional bool message_set_wire_format = 1 [default = false];
9346 if (has_message_set_wire_format()) {
9347 total_size += 1 + 1;
9348 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009349
kenton@google.com80b1d622009-07-29 01:13:20 +00009350 // optional bool no_standard_descriptor_accessor = 2 [default = false];
9351 if (has_no_standard_descriptor_accessor()) {
9352 total_size += 1 + 1;
9353 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009354
jieluo@google.com4de8f552014-07-18 00:47:59 +00009355 // optional bool deprecated = 3 [default = false];
9356 if (has_deprecated()) {
9357 total_size += 1 + 1;
9358 }
9359
Feng Xiao6ef984a2014-11-10 17:34:54 -08009360 // optional bool map_entry = 7;
9361 if (has_map_entry()) {
9362 total_size += 1 + 1;
9363 }
9364
temporal40ee5512008-07-10 02:12:20 +00009365 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009366 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +00009367 total_size += 2 * this->uninterpreted_option_size();
9368 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009369 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +00009370 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +00009371 this->uninterpreted_option(i));
9372 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009373
kenton@google.comd37d46d2009-04-25 02:53:47 +00009374 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009375
Feng Xiao6ef984a2014-11-10 17:34:54 -08009376 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +00009377 total_size +=
9378 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
9379 unknown_fields());
9380 }
kenton@google.comfccb1462009-12-18 02:11:36 +00009381 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +00009382 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +00009383 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +00009384 return total_size;
9385}
9386
9387void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08009388 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -07009389 const MessageOptions* source =
9390 ::google::protobuf::internal::DynamicCastToGenerated<const MessageOptions>(
9391 &from);
temporal40ee5512008-07-10 02:12:20 +00009392 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +00009393 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +00009394 } else {
9395 MergeFrom(*source);
9396 }
9397}
9398
9399void MessageOptions::MergeFrom(const MessageOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -08009400 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +00009401 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +00009402 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +00009403 if (from.has_message_set_wire_format()) {
temporal40ee5512008-07-10 02:12:20 +00009404 set_message_set_wire_format(from.message_set_wire_format());
9405 }
liujisi@google.com33165fe2010-11-02 13:14:58 +00009406 if (from.has_no_standard_descriptor_accessor()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009407 set_no_standard_descriptor_accessor(from.no_standard_descriptor_accessor());
9408 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009409 if (from.has_deprecated()) {
9410 set_deprecated(from.deprecated());
9411 }
Feng Xiao6ef984a2014-11-10 17:34:54 -08009412 if (from.has_map_entry()) {
9413 set_map_entry(from.map_entry());
9414 }
temporal40ee5512008-07-10 02:12:20 +00009415 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009416 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -08009417 if (from._internal_metadata_.have_unknown_fields()) {
9418 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
9419 }
temporal40ee5512008-07-10 02:12:20 +00009420}
9421
9422void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) {
9423 if (&from == this) return;
9424 Clear();
9425 MergeFrom(from);
9426}
9427
9428void MessageOptions::CopyFrom(const MessageOptions& from) {
9429 if (&from == this) return;
9430 Clear();
9431 MergeFrom(from);
9432}
9433
kenton@google.comceb561d2009-06-25 19:05:36 +00009434bool MessageOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009435
jieluo@google.com4de8f552014-07-18 00:47:59 +00009436 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009437
kenton@google.comceb561d2009-06-25 19:05:36 +00009438 if (!_extensions_.IsInitialized()) return false; return true;
9439}
9440
kenton@google.com26bd9ee2008-11-21 00:06:27 +00009441void MessageOptions::Swap(MessageOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -08009442 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -08009443 InternalSwap(other);
9444}
9445void MessageOptions::InternalSwap(MessageOptions* other) {
9446 std::swap(message_set_wire_format_, other->message_set_wire_format_);
9447 std::swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_);
9448 std::swap(deprecated_, other->deprecated_);
9449 std::swap(map_entry_, other->map_entry_);
9450 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
9451 std::swap(_has_bits_[0], other->_has_bits_[0]);
9452 _internal_metadata_.Swap(&other->_internal_metadata_);
9453 std::swap(_cached_size_, other->_cached_size_);
9454 _extensions_.Swap(&other->_extensions_);
9455}
kenton@google.com26bd9ee2008-11-21 00:06:27 +00009456
kenton@google.com80b1d622009-07-29 01:13:20 +00009457::google::protobuf::Metadata MessageOptions::GetMetadata() const {
9458 protobuf_AssignDescriptorsOnce();
9459 ::google::protobuf::Metadata metadata;
9460 metadata.descriptor = MessageOptions_descriptor_;
9461 metadata.reflection = MessageOptions_reflection_;
9462 return metadata;
temporal40ee5512008-07-10 02:12:20 +00009463}
9464
Jisi Liu885b6122015-02-28 14:51:22 -08009465#if PROTOBUF_INLINE_NOT_IN_HEADERS
9466// MessageOptions
9467
9468// optional bool message_set_wire_format = 1 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009469bool MessageOptions::has_message_set_wire_format() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009470 return (_has_bits_[0] & 0x00000001u) != 0;
9471}
Bo Yang5db21732015-05-21 14:28:59 -07009472void MessageOptions::set_has_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009473 _has_bits_[0] |= 0x00000001u;
9474}
Bo Yang5db21732015-05-21 14:28:59 -07009475void MessageOptions::clear_has_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009476 _has_bits_[0] &= ~0x00000001u;
9477}
Bo Yang5db21732015-05-21 14:28:59 -07009478void MessageOptions::clear_message_set_wire_format() {
Jisi Liu885b6122015-02-28 14:51:22 -08009479 message_set_wire_format_ = false;
9480 clear_has_message_set_wire_format();
9481}
9482 bool MessageOptions::message_set_wire_format() const {
9483 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.message_set_wire_format)
9484 return message_set_wire_format_;
9485}
9486 void MessageOptions::set_message_set_wire_format(bool value) {
9487 set_has_message_set_wire_format();
9488 message_set_wire_format_ = value;
9489 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.message_set_wire_format)
9490}
9491
9492// optional bool no_standard_descriptor_accessor = 2 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009493bool MessageOptions::has_no_standard_descriptor_accessor() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009494 return (_has_bits_[0] & 0x00000002u) != 0;
9495}
Bo Yang5db21732015-05-21 14:28:59 -07009496void MessageOptions::set_has_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009497 _has_bits_[0] |= 0x00000002u;
9498}
Bo Yang5db21732015-05-21 14:28:59 -07009499void MessageOptions::clear_has_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009500 _has_bits_[0] &= ~0x00000002u;
9501}
Bo Yang5db21732015-05-21 14:28:59 -07009502void MessageOptions::clear_no_standard_descriptor_accessor() {
Jisi Liu885b6122015-02-28 14:51:22 -08009503 no_standard_descriptor_accessor_ = false;
9504 clear_has_no_standard_descriptor_accessor();
9505}
9506 bool MessageOptions::no_standard_descriptor_accessor() const {
9507 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
9508 return no_standard_descriptor_accessor_;
9509}
9510 void MessageOptions::set_no_standard_descriptor_accessor(bool value) {
9511 set_has_no_standard_descriptor_accessor();
9512 no_standard_descriptor_accessor_ = value;
9513 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.no_standard_descriptor_accessor)
9514}
9515
9516// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -07009517bool MessageOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009518 return (_has_bits_[0] & 0x00000004u) != 0;
9519}
Bo Yang5db21732015-05-21 14:28:59 -07009520void MessageOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009521 _has_bits_[0] |= 0x00000004u;
9522}
Bo Yang5db21732015-05-21 14:28:59 -07009523void MessageOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009524 _has_bits_[0] &= ~0x00000004u;
9525}
Bo Yang5db21732015-05-21 14:28:59 -07009526void MessageOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -08009527 deprecated_ = false;
9528 clear_has_deprecated();
9529}
9530 bool MessageOptions::deprecated() const {
9531 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated)
9532 return deprecated_;
9533}
9534 void MessageOptions::set_deprecated(bool value) {
9535 set_has_deprecated();
9536 deprecated_ = value;
9537 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated)
9538}
9539
9540// optional bool map_entry = 7;
Bo Yang5db21732015-05-21 14:28:59 -07009541bool MessageOptions::has_map_entry() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009542 return (_has_bits_[0] & 0x00000008u) != 0;
9543}
Bo Yang5db21732015-05-21 14:28:59 -07009544void MessageOptions::set_has_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009545 _has_bits_[0] |= 0x00000008u;
9546}
Bo Yang5db21732015-05-21 14:28:59 -07009547void MessageOptions::clear_has_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009548 _has_bits_[0] &= ~0x00000008u;
9549}
Bo Yang5db21732015-05-21 14:28:59 -07009550void MessageOptions::clear_map_entry() {
Jisi Liu885b6122015-02-28 14:51:22 -08009551 map_entry_ = false;
9552 clear_has_map_entry();
9553}
9554 bool MessageOptions::map_entry() const {
9555 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry)
9556 return map_entry_;
9557}
9558 void MessageOptions::set_map_entry(bool value) {
9559 set_has_map_entry();
9560 map_entry_ = value;
9561 // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry)
9562}
9563
9564// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -07009565int MessageOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -08009566 return uninterpreted_option_.size();
9567}
Bo Yang5db21732015-05-21 14:28:59 -07009568void MessageOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -08009569 uninterpreted_option_.Clear();
9570}
9571 const ::google::protobuf::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const {
9572 // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.uninterpreted_option)
9573 return uninterpreted_option_.Get(index);
9574}
9575 ::google::protobuf::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) {
9576 // @@protoc_insertion_point(field_mutable:google.protobuf.MessageOptions.uninterpreted_option)
9577 return uninterpreted_option_.Mutable(index);
9578}
9579 ::google::protobuf::UninterpretedOption* MessageOptions::add_uninterpreted_option() {
9580 // @@protoc_insertion_point(field_add:google.protobuf.MessageOptions.uninterpreted_option)
9581 return uninterpreted_option_.Add();
9582}
9583 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
9584MessageOptions::uninterpreted_option() const {
9585 // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option)
9586 return uninterpreted_option_;
9587}
9588 ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
9589MessageOptions::mutable_uninterpreted_option() {
9590 // @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option)
9591 return &uninterpreted_option_;
9592}
9593
9594#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +00009595
9596// ===================================================================
9597
9598const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009599 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009600 return FieldOptions_CType_descriptor_;
9601}
9602bool FieldOptions_CType_IsValid(int value) {
9603 switch(value) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009604 case 0:
temporal40ee5512008-07-10 02:12:20 +00009605 case 1:
9606 case 2:
9607 return true;
9608 default:
9609 return false;
9610 }
9611}
9612
9613#ifndef _MSC_VER
kenton@google.comfccb1462009-12-18 02:11:36 +00009614const FieldOptions_CType FieldOptions::STRING;
temporal40ee5512008-07-10 02:12:20 +00009615const FieldOptions_CType FieldOptions::CORD;
9616const FieldOptions_CType FieldOptions::STRING_PIECE;
9617const FieldOptions_CType FieldOptions::CType_MIN;
9618const FieldOptions_CType FieldOptions::CType_MAX;
kenton@google.comfccb1462009-12-18 02:11:36 +00009619const int FieldOptions::CType_ARRAYSIZE;
temporal40ee5512008-07-10 02:12:20 +00009620#endif // _MSC_VER
Bo Yang5db21732015-05-21 14:28:59 -07009621const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor() {
9622 protobuf_AssignDescriptorsOnce();
9623 return FieldOptions_JSType_descriptor_;
9624}
9625bool FieldOptions_JSType_IsValid(int value) {
9626 switch(value) {
9627 case 0:
9628 case 1:
9629 case 2:
9630 return true;
9631 default:
9632 return false;
9633 }
9634}
9635
9636#ifndef _MSC_VER
9637const FieldOptions_JSType FieldOptions::JS_NORMAL;
9638const FieldOptions_JSType FieldOptions::JS_STRING;
9639const FieldOptions_JSType FieldOptions::JS_NUMBER;
9640const FieldOptions_JSType FieldOptions::JSType_MIN;
9641const FieldOptions_JSType FieldOptions::JSType_MAX;
9642const int FieldOptions::JSType_ARRAYSIZE;
9643#endif // _MSC_VER
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009644#ifndef _MSC_VER
9645const int FieldOptions::kCtypeFieldNumber;
9646const int FieldOptions::kPackedFieldNumber;
Bo Yang5db21732015-05-21 14:28:59 -07009647const int FieldOptions::kJstypeFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009648const int FieldOptions::kLazyFieldNumber;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009649const int FieldOptions::kDeprecatedFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009650const int FieldOptions::kWeakFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +00009651const int FieldOptions::kUninterpretedOptionFieldNumber;
9652#endif // !_MSC_VER
kenton@google.com24bf56f2008-09-24 20:31:01 +00009653
kenton@google.com573989f2009-10-30 22:02:17 +00009654FieldOptions::FieldOptions()
Bo Yang5db21732015-05-21 14:28:59 -07009655 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009656 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009657 // @@protoc_insertion_point(constructor:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +00009658}
9659
kenton@google.com80b1d622009-07-29 01:13:20 +00009660void FieldOptions::InitAsDefaultInstance() {
9661}
kenton@google.com24bf56f2008-09-24 20:31:01 +00009662
kenton@google.com573989f2009-10-30 22:02:17 +00009663FieldOptions::FieldOptions(const FieldOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -08009664 : ::google::protobuf::Message(),
9665 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009666 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +00009667 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +00009668 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +00009669}
9670
kenton@google.comd37d46d2009-04-25 02:53:47 +00009671void FieldOptions::SharedCtor() {
9672 _cached_size_ = 0;
kenton@google.comfccb1462009-12-18 02:11:36 +00009673 ctype_ = 0;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009674 packed_ = false;
Bo Yang5db21732015-05-21 14:28:59 -07009675 jstype_ = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009676 lazy_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009677 deprecated_ = false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009678 weak_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009679 ::memset(_has_bits_, 0, sizeof(_has_bits_));
9680}
9681
temporal40ee5512008-07-10 02:12:20 +00009682FieldOptions::~FieldOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009683 // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009684 SharedDtor();
9685}
9686
9687void FieldOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009688 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +00009689 }
9690}
9691
kenton@google.comfccb1462009-12-18 02:11:36 +00009692void FieldOptions::SetCachedSize(int size) const {
9693 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
9694 _cached_size_ = size;
9695 GOOGLE_SAFE_CONCURRENT_WRITES_END();
9696}
temporal40ee5512008-07-10 02:12:20 +00009697const ::google::protobuf::Descriptor* FieldOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009698 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +00009699 return FieldOptions_descriptor_;
9700}
9701
kenton@google.com24bf56f2008-09-24 20:31:01 +00009702const FieldOptions& FieldOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +00009703 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
9704 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009705}
9706
9707FieldOptions* FieldOptions::default_instance_ = NULL;
9708
Feng Xiao6ef984a2014-11-10 17:34:54 -08009709FieldOptions* FieldOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -08009710 FieldOptions* n = new FieldOptions;
9711 if (arena != NULL) {
9712 arena->Own(n);
9713 }
9714 return n;
temporal40ee5512008-07-10 02:12:20 +00009715}
9716
9717void FieldOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +00009718 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -08009719#define ZR_HELPER_(f) reinterpret_cast<char*>(\
9720 &reinterpret_cast<FieldOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009721
Jisi Liu885b6122015-02-28 14:51:22 -08009722#define ZR_(first, last) do {\
9723 ::memset(&first, 0,\
9724 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
9725} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +00009726
Bo Yang5db21732015-05-21 14:28:59 -07009727 if (_has_bits_[0 / 32] & 63u) {
9728 ZR_(ctype_, jstype_);
9729 ZR_(packed_, weak_);
temporal40ee5512008-07-10 02:12:20 +00009730 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009731
Jisi Liu885b6122015-02-28 14:51:22 -08009732#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +00009733#undef ZR_
9734
kenton@google.com24bf56f2008-09-24 20:31:01 +00009735 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +00009736 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -08009737 if (_internal_metadata_.have_unknown_fields()) {
9738 mutable_unknown_fields()->Clear();
9739 }
temporal40ee5512008-07-10 02:12:20 +00009740}
9741
9742bool FieldOptions::MergePartialFromCodedStream(
9743 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009744#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +00009745 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009746 // @@protoc_insertion_point(parse_start:google.protobuf.FieldOptions)
9747 for (;;) {
9748 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
9749 tag = p.first;
9750 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +00009751 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009752 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
temporal40ee5512008-07-10 02:12:20 +00009753 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009754 if (tag == 8) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009755 int value;
9756 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9757 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
9758 input, &value)));
9759 if (::google::protobuf::FieldOptions_CType_IsValid(value)) {
9760 set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value));
9761 } else {
9762 mutable_unknown_fields()->AddVarint(1, value);
9763 }
temporal40ee5512008-07-10 02:12:20 +00009764 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009765 goto handle_unusual;
temporal40ee5512008-07-10 02:12:20 +00009766 }
kenton@google.com2d6daa72009-01-22 01:27:00 +00009767 if (input->ExpectTag(16)) goto parse_packed;
9768 break;
9769 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009770
kenton@google.com2d6daa72009-01-22 01:27:00 +00009771 // optional bool packed = 2;
9772 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009773 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009774 parse_packed:
9775 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9776 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9777 input, &packed_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009778 set_has_packed();
kenton@google.comfccb1462009-12-18 02:11:36 +00009779 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009780 goto handle_unusual;
kenton@google.com2d6daa72009-01-22 01:27:00 +00009781 }
kenton@google.comd37d46d2009-04-25 02:53:47 +00009782 if (input->ExpectTag(24)) goto parse_deprecated;
9783 break;
9784 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009785
kenton@google.comd37d46d2009-04-25 02:53:47 +00009786 // optional bool deprecated = 3 [default = false];
9787 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009788 if (tag == 24) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009789 parse_deprecated:
9790 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9791 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9792 input, &deprecated_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +00009793 set_has_deprecated();
kenton@google.comfccb1462009-12-18 02:11:36 +00009794 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009795 goto handle_unusual;
kenton@google.comd37d46d2009-04-25 02:53:47 +00009796 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009797 if (input->ExpectTag(40)) goto parse_lazy;
9798 break;
9799 }
9800
9801 // optional bool lazy = 5 [default = false];
9802 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009803 if (tag == 40) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009804 parse_lazy:
9805 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9806 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9807 input, &lazy_)));
9808 set_has_lazy();
9809 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009810 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009811 }
Bo Yang5db21732015-05-21 14:28:59 -07009812 if (input->ExpectTag(48)) goto parse_jstype;
9813 break;
9814 }
9815
9816 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
9817 case 6: {
9818 if (tag == 48) {
9819 parse_jstype:
9820 int value;
9821 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9822 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
9823 input, &value)));
9824 if (::google::protobuf::FieldOptions_JSType_IsValid(value)) {
9825 set_jstype(static_cast< ::google::protobuf::FieldOptions_JSType >(value));
9826 } else {
9827 mutable_unknown_fields()->AddVarint(6, value);
9828 }
9829 } else {
9830 goto handle_unusual;
9831 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009832 if (input->ExpectTag(80)) goto parse_weak;
9833 break;
9834 }
9835
9836 // optional bool weak = 10 [default = false];
9837 case 10: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009838 if (tag == 80) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009839 parse_weak:
9840 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
9841 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
9842 input, &weak_)));
9843 set_has_weak();
9844 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009845 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009846 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009847 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
9848 break;
9849 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009850
kenton@google.com24bf56f2008-09-24 20:31:01 +00009851 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
9852 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009853 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009854 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -07009855 DO_(input->IncrementRecursionDepth());
9856 parse_loop_uninterpreted_option:
9857 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +00009858 input, add_uninterpreted_option()));
9859 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009860 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +00009861 }
Bo Yang5db21732015-05-21 14:28:59 -07009862 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
9863 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +00009864 if (input->ExpectAtEnd()) goto success;
temporal40ee5512008-07-10 02:12:20 +00009865 break;
9866 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009867
temporal40ee5512008-07-10 02:12:20 +00009868 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009869 handle_unusual:
9870 if (tag == 0 ||
9871 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +00009872 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009873 goto success;
temporal40ee5512008-07-10 02:12:20 +00009874 }
kenton@google.com24bf56f2008-09-24 20:31:01 +00009875 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009876 DO_(_extensions_.ParseField(tag, input, default_instance_,
9877 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +00009878 continue;
9879 }
temporal40ee5512008-07-10 02:12:20 +00009880 DO_(::google::protobuf::internal::WireFormat::SkipField(
9881 input, tag, mutable_unknown_fields()));
9882 break;
9883 }
9884 }
9885 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009886success:
9887 // @@protoc_insertion_point(parse_success:google.protobuf.FieldOptions)
temporal40ee5512008-07-10 02:12:20 +00009888 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +00009889failure:
9890 // @@protoc_insertion_point(parse_failure:google.protobuf.FieldOptions)
9891 return false;
temporal40ee5512008-07-10 02:12:20 +00009892#undef DO_
9893}
9894
kenton@google.comd37d46d2009-04-25 02:53:47 +00009895void FieldOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +00009896 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009897 // @@protoc_insertion_point(serialize_start:google.protobuf.FieldOptions)
kenton@google.comfccb1462009-12-18 02:11:36 +00009898 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009899 if (has_ctype()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009900 ::google::protobuf::internal::WireFormatLite::WriteEnum(
9901 1, this->ctype(), output);
temporal40ee5512008-07-10 02:12:20 +00009902 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009903
kenton@google.com2d6daa72009-01-22 01:27:00 +00009904 // optional bool packed = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00009905 if (has_packed()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009906 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->packed(), output);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009907 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009908
kenton@google.comd37d46d2009-04-25 02:53:47 +00009909 // optional bool deprecated = 3 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009910 if (has_deprecated()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009911 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
kenton@google.com2d6daa72009-01-22 01:27:00 +00009912 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009913
9914 // optional bool lazy = 5 [default = false];
9915 if (has_lazy()) {
9916 ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->lazy(), output);
9917 }
9918
Bo Yang5db21732015-05-21 14:28:59 -07009919 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
9920 if (has_jstype()) {
9921 ::google::protobuf::internal::WireFormatLite::WriteEnum(
9922 6, this->jstype(), output);
9923 }
9924
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009925 // optional bool weak = 10 [default = false];
9926 if (has_weak()) {
9927 ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->weak(), output);
9928 }
9929
kenton@google.com24bf56f2008-09-24 20:31:01 +00009930 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08009931 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +00009932 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +00009933 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +00009934 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009935
kenton@google.com24bf56f2008-09-24 20:31:01 +00009936 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009937 _extensions_.SerializeWithCachedSizes(
9938 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009939
Feng Xiao6ef984a2014-11-10 17:34:54 -08009940 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009941 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
9942 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +00009943 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009944 // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009945}
9946
9947::google::protobuf::uint8* FieldOptions::SerializeWithCachedSizesToArray(
9948 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +00009949 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions)
kenton@google.comfccb1462009-12-18 02:11:36 +00009950 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009951 if (has_ctype()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009952 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
9953 1, this->ctype(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009954 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009955
kenton@google.comd37d46d2009-04-25 02:53:47 +00009956 // optional bool packed = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +00009957 if (has_packed()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009958 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009959 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009960
kenton@google.comd37d46d2009-04-25 02:53:47 +00009961 // optional bool deprecated = 3 [default = false];
liujisi@google.com33165fe2010-11-02 13:14:58 +00009962 if (has_deprecated()) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009963 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009964 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009965
9966 // optional bool lazy = 5 [default = false];
9967 if (has_lazy()) {
9968 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->lazy(), target);
9969 }
9970
Bo Yang5db21732015-05-21 14:28:59 -07009971 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
9972 if (has_jstype()) {
9973 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
9974 6, this->jstype(), target);
9975 }
9976
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009977 // optional bool weak = 10 [default = false];
9978 if (has_weak()) {
9979 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->weak(), target);
9980 }
9981
kenton@google.comd37d46d2009-04-25 02:53:47 +00009982 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -08009983 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +00009984 target = ::google::protobuf::internal::WireFormatLite::
9985 WriteMessageNoVirtualToArray(
9986 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +00009987 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009988
kenton@google.comd37d46d2009-04-25 02:53:47 +00009989 // Extension range [1000, 536870912)
9990 target = _extensions_.SerializeWithCachedSizesToArray(
9991 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +00009992
Feng Xiao6ef984a2014-11-10 17:34:54 -08009993 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +00009994 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
9995 unknown_fields(), target);
9996 }
jieluo@google.com4de8f552014-07-18 00:47:59 +00009997 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +00009998 return target;
temporal40ee5512008-07-10 02:12:20 +00009999}
10000
10001int FieldOptions::ByteSize() const {
10002 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010003
Austin Schuh307af622015-06-05 22:46:01 -070010004 if (_has_bits_[0 / 32] & 63u) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010005 // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
temporal40ee5512008-07-10 02:12:20 +000010006 if (has_ctype()) {
10007 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000010008 ::google::protobuf::internal::WireFormatLite::EnumSize(this->ctype());
temporal40ee5512008-07-10 02:12:20 +000010009 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010010
kenton@google.com2d6daa72009-01-22 01:27:00 +000010011 // optional bool packed = 2;
10012 if (has_packed()) {
10013 total_size += 1 + 1;
10014 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010015
Bo Yang5db21732015-05-21 14:28:59 -070010016 // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10017 if (has_jstype()) {
10018 total_size += 1 +
10019 ::google::protobuf::internal::WireFormatLite::EnumSize(this->jstype());
10020 }
10021
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010022 // optional bool lazy = 5 [default = false];
10023 if (has_lazy()) {
10024 total_size += 1 + 1;
10025 }
10026
kenton@google.comd37d46d2009-04-25 02:53:47 +000010027 // optional bool deprecated = 3 [default = false];
10028 if (has_deprecated()) {
10029 total_size += 1 + 1;
10030 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010031
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010032 // optional bool weak = 10 [default = false];
10033 if (has_weak()) {
10034 total_size += 1 + 1;
10035 }
10036
temporal40ee5512008-07-10 02:12:20 +000010037 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010038 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000010039 total_size += 2 * this->uninterpreted_option_size();
10040 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010041 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000010042 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000010043 this->uninterpreted_option(i));
10044 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010045
kenton@google.comd37d46d2009-04-25 02:53:47 +000010046 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010047
Feng Xiao6ef984a2014-11-10 17:34:54 -080010048 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000010049 total_size +=
10050 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
10051 unknown_fields());
10052 }
kenton@google.comfccb1462009-12-18 02:11:36 +000010053 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000010054 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000010055 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000010056 return total_size;
10057}
10058
10059void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010060 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070010061 const FieldOptions* source =
10062 ::google::protobuf::internal::DynamicCastToGenerated<const FieldOptions>(
10063 &from);
temporal40ee5512008-07-10 02:12:20 +000010064 if (source == NULL) {
temporal779f61c2008-08-13 03:15:00 +000010065 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
temporal40ee5512008-07-10 02:12:20 +000010066 } else {
10067 MergeFrom(*source);
10068 }
10069}
10070
10071void FieldOptions::MergeFrom(const FieldOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010072 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010073 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
temporal40ee5512008-07-10 02:12:20 +000010074 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000010075 if (from.has_ctype()) {
temporal40ee5512008-07-10 02:12:20 +000010076 set_ctype(from.ctype());
10077 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000010078 if (from.has_packed()) {
kenton@google.com2d6daa72009-01-22 01:27:00 +000010079 set_packed(from.packed());
10080 }
Bo Yang5db21732015-05-21 14:28:59 -070010081 if (from.has_jstype()) {
10082 set_jstype(from.jstype());
10083 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010084 if (from.has_lazy()) {
10085 set_lazy(from.lazy());
10086 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000010087 if (from.has_deprecated()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010088 set_deprecated(from.deprecated());
10089 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010090 if (from.has_weak()) {
10091 set_weak(from.weak());
10092 }
temporal40ee5512008-07-10 02:12:20 +000010093 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010094 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010095 if (from._internal_metadata_.have_unknown_fields()) {
10096 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
10097 }
temporal40ee5512008-07-10 02:12:20 +000010098}
10099
10100void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) {
10101 if (&from == this) return;
10102 Clear();
10103 MergeFrom(from);
10104}
10105
10106void FieldOptions::CopyFrom(const FieldOptions& from) {
10107 if (&from == this) return;
10108 Clear();
10109 MergeFrom(from);
10110}
10111
kenton@google.comceb561d2009-06-25 19:05:36 +000010112bool FieldOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010113
jieluo@google.com4de8f552014-07-18 00:47:59 +000010114 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010115
kenton@google.comceb561d2009-06-25 19:05:36 +000010116 if (!_extensions_.IsInitialized()) return false; return true;
10117}
10118
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010119void FieldOptions::Swap(FieldOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080010120 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080010121 InternalSwap(other);
10122}
10123void FieldOptions::InternalSwap(FieldOptions* other) {
10124 std::swap(ctype_, other->ctype_);
10125 std::swap(packed_, other->packed_);
Bo Yang5db21732015-05-21 14:28:59 -070010126 std::swap(jstype_, other->jstype_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010127 std::swap(lazy_, other->lazy_);
10128 std::swap(deprecated_, other->deprecated_);
10129 std::swap(weak_, other->weak_);
10130 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
10131 std::swap(_has_bits_[0], other->_has_bits_[0]);
10132 _internal_metadata_.Swap(&other->_internal_metadata_);
10133 std::swap(_cached_size_, other->_cached_size_);
10134 _extensions_.Swap(&other->_extensions_);
10135}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010136
kenton@google.com80b1d622009-07-29 01:13:20 +000010137::google::protobuf::Metadata FieldOptions::GetMetadata() const {
10138 protobuf_AssignDescriptorsOnce();
10139 ::google::protobuf::Metadata metadata;
10140 metadata.descriptor = FieldOptions_descriptor_;
10141 metadata.reflection = FieldOptions_reflection_;
10142 return metadata;
temporal40ee5512008-07-10 02:12:20 +000010143}
10144
Jisi Liu885b6122015-02-28 14:51:22 -080010145#if PROTOBUF_INLINE_NOT_IN_HEADERS
10146// FieldOptions
10147
10148// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
Bo Yang5db21732015-05-21 14:28:59 -070010149bool FieldOptions::has_ctype() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010150 return (_has_bits_[0] & 0x00000001u) != 0;
10151}
Bo Yang5db21732015-05-21 14:28:59 -070010152void FieldOptions::set_has_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010153 _has_bits_[0] |= 0x00000001u;
10154}
Bo Yang5db21732015-05-21 14:28:59 -070010155void FieldOptions::clear_has_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010156 _has_bits_[0] &= ~0x00000001u;
10157}
Bo Yang5db21732015-05-21 14:28:59 -070010158void FieldOptions::clear_ctype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010159 ctype_ = 0;
10160 clear_has_ctype();
10161}
10162 ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const {
10163 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype)
10164 return static_cast< ::google::protobuf::FieldOptions_CType >(ctype_);
10165}
10166 void FieldOptions::set_ctype(::google::protobuf::FieldOptions_CType value) {
10167 assert(::google::protobuf::FieldOptions_CType_IsValid(value));
10168 set_has_ctype();
10169 ctype_ = value;
10170 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.ctype)
10171}
10172
10173// optional bool packed = 2;
Bo Yang5db21732015-05-21 14:28:59 -070010174bool FieldOptions::has_packed() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010175 return (_has_bits_[0] & 0x00000002u) != 0;
10176}
Bo Yang5db21732015-05-21 14:28:59 -070010177void FieldOptions::set_has_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010178 _has_bits_[0] |= 0x00000002u;
10179}
Bo Yang5db21732015-05-21 14:28:59 -070010180void FieldOptions::clear_has_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010181 _has_bits_[0] &= ~0x00000002u;
10182}
Bo Yang5db21732015-05-21 14:28:59 -070010183void FieldOptions::clear_packed() {
Jisi Liu885b6122015-02-28 14:51:22 -080010184 packed_ = false;
10185 clear_has_packed();
10186}
10187 bool FieldOptions::packed() const {
10188 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed)
10189 return packed_;
10190}
10191 void FieldOptions::set_packed(bool value) {
10192 set_has_packed();
10193 packed_ = value;
10194 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.packed)
10195}
10196
Bo Yang5db21732015-05-21 14:28:59 -070010197// optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10198bool FieldOptions::has_jstype() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010199 return (_has_bits_[0] & 0x00000004u) != 0;
10200}
Bo Yang5db21732015-05-21 14:28:59 -070010201void FieldOptions::set_has_jstype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010202 _has_bits_[0] |= 0x00000004u;
10203}
Bo Yang5db21732015-05-21 14:28:59 -070010204void FieldOptions::clear_has_jstype() {
Jisi Liu885b6122015-02-28 14:51:22 -080010205 _has_bits_[0] &= ~0x00000004u;
10206}
Bo Yang5db21732015-05-21 14:28:59 -070010207void FieldOptions::clear_jstype() {
10208 jstype_ = 0;
10209 clear_has_jstype();
10210}
10211 ::google::protobuf::FieldOptions_JSType FieldOptions::jstype() const {
10212 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype)
10213 return static_cast< ::google::protobuf::FieldOptions_JSType >(jstype_);
10214}
10215 void FieldOptions::set_jstype(::google::protobuf::FieldOptions_JSType value) {
10216 assert(::google::protobuf::FieldOptions_JSType_IsValid(value));
10217 set_has_jstype();
10218 jstype_ = value;
10219 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.jstype)
10220}
10221
10222// optional bool lazy = 5 [default = false];
10223bool FieldOptions::has_lazy() const {
10224 return (_has_bits_[0] & 0x00000008u) != 0;
10225}
10226void FieldOptions::set_has_lazy() {
10227 _has_bits_[0] |= 0x00000008u;
10228}
10229void FieldOptions::clear_has_lazy() {
10230 _has_bits_[0] &= ~0x00000008u;
10231}
10232void FieldOptions::clear_lazy() {
Jisi Liu885b6122015-02-28 14:51:22 -080010233 lazy_ = false;
10234 clear_has_lazy();
10235}
10236 bool FieldOptions::lazy() const {
10237 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.lazy)
10238 return lazy_;
10239}
10240 void FieldOptions::set_lazy(bool value) {
10241 set_has_lazy();
10242 lazy_ = value;
10243 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.lazy)
10244}
10245
10246// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010247bool FieldOptions::has_deprecated() const {
10248 return (_has_bits_[0] & 0x00000010u) != 0;
Jisi Liu885b6122015-02-28 14:51:22 -080010249}
Bo Yang5db21732015-05-21 14:28:59 -070010250void FieldOptions::set_has_deprecated() {
10251 _has_bits_[0] |= 0x00000010u;
Jisi Liu885b6122015-02-28 14:51:22 -080010252}
Bo Yang5db21732015-05-21 14:28:59 -070010253void FieldOptions::clear_has_deprecated() {
10254 _has_bits_[0] &= ~0x00000010u;
Jisi Liu885b6122015-02-28 14:51:22 -080010255}
Bo Yang5db21732015-05-21 14:28:59 -070010256void FieldOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010257 deprecated_ = false;
10258 clear_has_deprecated();
10259}
10260 bool FieldOptions::deprecated() const {
10261 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.deprecated)
10262 return deprecated_;
10263}
10264 void FieldOptions::set_deprecated(bool value) {
10265 set_has_deprecated();
10266 deprecated_ = value;
10267 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated)
10268}
10269
10270// optional bool weak = 10 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010271bool FieldOptions::has_weak() const {
10272 return (_has_bits_[0] & 0x00000020u) != 0;
Jisi Liu885b6122015-02-28 14:51:22 -080010273}
Bo Yang5db21732015-05-21 14:28:59 -070010274void FieldOptions::set_has_weak() {
10275 _has_bits_[0] |= 0x00000020u;
Jisi Liu885b6122015-02-28 14:51:22 -080010276}
Bo Yang5db21732015-05-21 14:28:59 -070010277void FieldOptions::clear_has_weak() {
10278 _has_bits_[0] &= ~0x00000020u;
Jisi Liu885b6122015-02-28 14:51:22 -080010279}
Bo Yang5db21732015-05-21 14:28:59 -070010280void FieldOptions::clear_weak() {
Jisi Liu885b6122015-02-28 14:51:22 -080010281 weak_ = false;
10282 clear_has_weak();
10283}
10284 bool FieldOptions::weak() const {
10285 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak)
10286 return weak_;
10287}
10288 void FieldOptions::set_weak(bool value) {
10289 set_has_weak();
10290 weak_ = value;
10291 // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak)
10292}
10293
10294// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070010295int FieldOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010296 return uninterpreted_option_.size();
10297}
Bo Yang5db21732015-05-21 14:28:59 -070010298void FieldOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010299 uninterpreted_option_.Clear();
10300}
10301 const ::google::protobuf::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const {
10302 // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.uninterpreted_option)
10303 return uninterpreted_option_.Get(index);
10304}
10305 ::google::protobuf::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) {
10306 // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.uninterpreted_option)
10307 return uninterpreted_option_.Mutable(index);
10308}
10309 ::google::protobuf::UninterpretedOption* FieldOptions::add_uninterpreted_option() {
10310 // @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.uninterpreted_option)
10311 return uninterpreted_option_.Add();
10312}
10313 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
10314FieldOptions::uninterpreted_option() const {
10315 // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option)
10316 return uninterpreted_option_;
10317}
10318 ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
10319FieldOptions::mutable_uninterpreted_option() {
10320 // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option)
10321 return &uninterpreted_option_;
10322}
10323
10324#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000010325
10326// ===================================================================
10327
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000010328#ifndef _MSC_VER
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010329const int EnumOptions::kAllowAliasFieldNumber;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010330const int EnumOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000010331const int EnumOptions::kUninterpretedOptionFieldNumber;
10332#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +000010333
kenton@google.com573989f2009-10-30 22:02:17 +000010334EnumOptions::EnumOptions()
Bo Yang5db21732015-05-21 14:28:59 -070010335 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010336 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010337 // @@protoc_insertion_point(constructor:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010338}
10339
kenton@google.com80b1d622009-07-29 01:13:20 +000010340void EnumOptions::InitAsDefaultInstance() {
10341}
kenton@google.com24bf56f2008-09-24 20:31:01 +000010342
kenton@google.com573989f2009-10-30 22:02:17 +000010343EnumOptions::EnumOptions(const EnumOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080010344 : ::google::protobuf::Message(),
10345 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010346 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000010347 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000010348 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010349}
10350
kenton@google.comd37d46d2009-04-25 02:53:47 +000010351void EnumOptions::SharedCtor() {
10352 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010353 allow_alias_ = false;
10354 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000010355 ::memset(_has_bits_, 0, sizeof(_has_bits_));
10356}
10357
temporal40ee5512008-07-10 02:12:20 +000010358EnumOptions::~EnumOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010359 // @@protoc_insertion_point(destructor:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010360 SharedDtor();
10361}
10362
10363void EnumOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010364 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000010365 }
10366}
10367
kenton@google.comfccb1462009-12-18 02:11:36 +000010368void EnumOptions::SetCachedSize(int size) const {
10369 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
10370 _cached_size_ = size;
10371 GOOGLE_SAFE_CONCURRENT_WRITES_END();
10372}
temporal40ee5512008-07-10 02:12:20 +000010373const ::google::protobuf::Descriptor* EnumOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010374 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000010375 return EnumOptions_descriptor_;
10376}
10377
kenton@google.com24bf56f2008-09-24 20:31:01 +000010378const EnumOptions& EnumOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000010379 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
10380 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010381}
10382
10383EnumOptions* EnumOptions::default_instance_ = NULL;
10384
Feng Xiao6ef984a2014-11-10 17:34:54 -080010385EnumOptions* EnumOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080010386 EnumOptions* n = new EnumOptions;
10387 if (arena != NULL) {
10388 arena->Own(n);
10389 }
10390 return n;
temporal40ee5512008-07-10 02:12:20 +000010391}
10392
10393void EnumOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010394 _extensions_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -080010395#define ZR_HELPER_(f) reinterpret_cast<char*>(\
10396 &reinterpret_cast<EnumOptions*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +000010397
Jisi Liu885b6122015-02-28 14:51:22 -080010398#define ZR_(first, last) do {\
10399 ::memset(&first, 0,\
10400 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
10401} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +000010402
10403 ZR_(allow_alias_, deprecated_);
10404
Jisi Liu885b6122015-02-28 14:51:22 -080010405#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +000010406#undef ZR_
10407
kenton@google.com24bf56f2008-09-24 20:31:01 +000010408 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000010409 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080010410 if (_internal_metadata_.have_unknown_fields()) {
10411 mutable_unknown_fields()->Clear();
10412 }
temporal40ee5512008-07-10 02:12:20 +000010413}
10414
10415bool EnumOptions::MergePartialFromCodedStream(
10416 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010417#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000010418 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010419 // @@protoc_insertion_point(parse_start:google.protobuf.EnumOptions)
10420 for (;;) {
10421 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
10422 tag = p.first;
10423 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000010424 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010425 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010426 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010427 if (tag == 16) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010428 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10429 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10430 input, &allow_alias_)));
10431 set_has_allow_alias();
10432 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010433 goto handle_unusual;
10434 }
10435 if (input->ExpectTag(24)) goto parse_deprecated;
10436 break;
10437 }
10438
10439 // optional bool deprecated = 3 [default = false];
10440 case 3: {
10441 if (tag == 24) {
10442 parse_deprecated:
10443 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10444 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10445 input, &deprecated_)));
10446 set_has_deprecated();
10447 } else {
10448 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010449 }
10450 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
10451 break;
10452 }
10453
kenton@google.com24bf56f2008-09-24 20:31:01 +000010454 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
10455 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010456 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010457 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070010458 DO_(input->IncrementRecursionDepth());
10459 parse_loop_uninterpreted_option:
10460 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000010461 input, add_uninterpreted_option()));
10462 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010463 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010464 }
Bo Yang5db21732015-05-21 14:28:59 -070010465 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
10466 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010467 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010468 break;
10469 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010470
kenton@google.com24bf56f2008-09-24 20:31:01 +000010471 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010472 handle_unusual:
10473 if (tag == 0 ||
10474 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000010475 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010476 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010477 }
10478 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010479 DO_(_extensions_.ParseField(tag, input, default_instance_,
10480 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000010481 continue;
10482 }
10483 DO_(::google::protobuf::internal::WireFormat::SkipField(
10484 input, tag, mutable_unknown_fields()));
10485 break;
10486 }
temporal40ee5512008-07-10 02:12:20 +000010487 }
temporal40ee5512008-07-10 02:12:20 +000010488 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010489success:
10490 // @@protoc_insertion_point(parse_success:google.protobuf.EnumOptions)
temporal40ee5512008-07-10 02:12:20 +000010491 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010492failure:
10493 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumOptions)
10494 return false;
temporal40ee5512008-07-10 02:12:20 +000010495#undef DO_
10496}
10497
kenton@google.comd37d46d2009-04-25 02:53:47 +000010498void EnumOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000010499 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010500 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumOptions)
10501 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010502 if (has_allow_alias()) {
10503 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->allow_alias(), output);
10504 }
10505
jieluo@google.com4de8f552014-07-18 00:47:59 +000010506 // optional bool deprecated = 3 [default = false];
10507 if (has_deprecated()) {
10508 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output);
10509 }
10510
kenton@google.com24bf56f2008-09-24 20:31:01 +000010511 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010512 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010513 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000010514 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010515 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010516
kenton@google.com24bf56f2008-09-24 20:31:01 +000010517 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010518 _extensions_.SerializeWithCachedSizes(
10519 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010520
Feng Xiao6ef984a2014-11-10 17:34:54 -080010521 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010522 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
10523 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000010524 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010525 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010526}
10527
10528::google::protobuf::uint8* EnumOptions::SerializeWithCachedSizesToArray(
10529 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010530 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions)
10531 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010532 if (has_allow_alias()) {
10533 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->allow_alias(), target);
10534 }
10535
jieluo@google.com4de8f552014-07-18 00:47:59 +000010536 // optional bool deprecated = 3 [default = false];
10537 if (has_deprecated()) {
10538 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target);
10539 }
10540
kenton@google.comd37d46d2009-04-25 02:53:47 +000010541 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010542 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010543 target = ::google::protobuf::internal::WireFormatLite::
10544 WriteMessageNoVirtualToArray(
10545 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010546 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010547
kenton@google.comd37d46d2009-04-25 02:53:47 +000010548 // Extension range [1000, 536870912)
10549 target = _extensions_.SerializeWithCachedSizesToArray(
10550 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010551
Feng Xiao6ef984a2014-11-10 17:34:54 -080010552 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010553 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
10554 unknown_fields(), target);
10555 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010556 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010557 return target;
temporal40ee5512008-07-10 02:12:20 +000010558}
10559
10560int EnumOptions::ByteSize() const {
10561 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010562
Austin Schuh307af622015-06-05 22:46:01 -070010563 if (_has_bits_[0 / 32] & 3u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010564 // optional bool allow_alias = 2;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010565 if (has_allow_alias()) {
10566 total_size += 1 + 1;
10567 }
10568
jieluo@google.com4de8f552014-07-18 00:47:59 +000010569 // optional bool deprecated = 3 [default = false];
10570 if (has_deprecated()) {
10571 total_size += 1 + 1;
10572 }
10573
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010574 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010575 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000010576 total_size += 2 * this->uninterpreted_option_size();
10577 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010578 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000010579 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000010580 this->uninterpreted_option(i));
10581 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010582
kenton@google.comd37d46d2009-04-25 02:53:47 +000010583 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010584
Feng Xiao6ef984a2014-11-10 17:34:54 -080010585 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000010586 total_size +=
10587 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
10588 unknown_fields());
10589 }
kenton@google.comfccb1462009-12-18 02:11:36 +000010590 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000010591 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000010592 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000010593 return total_size;
10594}
10595
10596void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010597 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070010598 const EnumOptions* source =
10599 ::google::protobuf::internal::DynamicCastToGenerated<const EnumOptions>(
10600 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010601 if (source == NULL) {
10602 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
10603 } else {
10604 MergeFrom(*source);
10605 }
temporal40ee5512008-07-10 02:12:20 +000010606}
10607
10608void EnumOptions::MergeFrom(const EnumOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010609 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010610 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010611 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
10612 if (from.has_allow_alias()) {
10613 set_allow_alias(from.allow_alias());
10614 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010615 if (from.has_deprecated()) {
10616 set_deprecated(from.deprecated());
10617 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010618 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010619 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010620 if (from._internal_metadata_.have_unknown_fields()) {
10621 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
10622 }
temporal40ee5512008-07-10 02:12:20 +000010623}
10624
10625void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) {
10626 if (&from == this) return;
10627 Clear();
10628 MergeFrom(from);
10629}
10630
10631void EnumOptions::CopyFrom(const EnumOptions& from) {
10632 if (&from == this) return;
10633 Clear();
10634 MergeFrom(from);
10635}
10636
kenton@google.comceb561d2009-06-25 19:05:36 +000010637bool EnumOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010638
jieluo@google.com4de8f552014-07-18 00:47:59 +000010639 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010640
kenton@google.comceb561d2009-06-25 19:05:36 +000010641 if (!_extensions_.IsInitialized()) return false; return true;
10642}
10643
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010644void EnumOptions::Swap(EnumOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080010645 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080010646 InternalSwap(other);
10647}
10648void EnumOptions::InternalSwap(EnumOptions* other) {
10649 std::swap(allow_alias_, other->allow_alias_);
10650 std::swap(deprecated_, other->deprecated_);
10651 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
10652 std::swap(_has_bits_[0], other->_has_bits_[0]);
10653 _internal_metadata_.Swap(&other->_internal_metadata_);
10654 std::swap(_cached_size_, other->_cached_size_);
10655 _extensions_.Swap(&other->_extensions_);
10656}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000010657
kenton@google.com80b1d622009-07-29 01:13:20 +000010658::google::protobuf::Metadata EnumOptions::GetMetadata() const {
10659 protobuf_AssignDescriptorsOnce();
10660 ::google::protobuf::Metadata metadata;
10661 metadata.descriptor = EnumOptions_descriptor_;
10662 metadata.reflection = EnumOptions_reflection_;
10663 return metadata;
temporal40ee5512008-07-10 02:12:20 +000010664}
10665
Jisi Liu885b6122015-02-28 14:51:22 -080010666#if PROTOBUF_INLINE_NOT_IN_HEADERS
10667// EnumOptions
10668
10669// optional bool allow_alias = 2;
Bo Yang5db21732015-05-21 14:28:59 -070010670bool EnumOptions::has_allow_alias() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010671 return (_has_bits_[0] & 0x00000001u) != 0;
10672}
Bo Yang5db21732015-05-21 14:28:59 -070010673void EnumOptions::set_has_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010674 _has_bits_[0] |= 0x00000001u;
10675}
Bo Yang5db21732015-05-21 14:28:59 -070010676void EnumOptions::clear_has_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010677 _has_bits_[0] &= ~0x00000001u;
10678}
Bo Yang5db21732015-05-21 14:28:59 -070010679void EnumOptions::clear_allow_alias() {
Jisi Liu885b6122015-02-28 14:51:22 -080010680 allow_alias_ = false;
10681 clear_has_allow_alias();
10682}
10683 bool EnumOptions::allow_alias() const {
10684 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.allow_alias)
10685 return allow_alias_;
10686}
10687 void EnumOptions::set_allow_alias(bool value) {
10688 set_has_allow_alias();
10689 allow_alias_ = value;
10690 // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.allow_alias)
10691}
10692
10693// optional bool deprecated = 3 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070010694bool EnumOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010695 return (_has_bits_[0] & 0x00000002u) != 0;
10696}
Bo Yang5db21732015-05-21 14:28:59 -070010697void EnumOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010698 _has_bits_[0] |= 0x00000002u;
10699}
Bo Yang5db21732015-05-21 14:28:59 -070010700void EnumOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010701 _has_bits_[0] &= ~0x00000002u;
10702}
Bo Yang5db21732015-05-21 14:28:59 -070010703void EnumOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080010704 deprecated_ = false;
10705 clear_has_deprecated();
10706}
10707 bool EnumOptions::deprecated() const {
10708 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated)
10709 return deprecated_;
10710}
10711 void EnumOptions::set_deprecated(bool value) {
10712 set_has_deprecated();
10713 deprecated_ = value;
10714 // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated)
10715}
10716
10717// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070010718int EnumOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080010719 return uninterpreted_option_.size();
10720}
Bo Yang5db21732015-05-21 14:28:59 -070010721void EnumOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080010722 uninterpreted_option_.Clear();
10723}
10724 const ::google::protobuf::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const {
10725 // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.uninterpreted_option)
10726 return uninterpreted_option_.Get(index);
10727}
10728 ::google::protobuf::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) {
10729 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumOptions.uninterpreted_option)
10730 return uninterpreted_option_.Mutable(index);
10731}
10732 ::google::protobuf::UninterpretedOption* EnumOptions::add_uninterpreted_option() {
10733 // @@protoc_insertion_point(field_add:google.protobuf.EnumOptions.uninterpreted_option)
10734 return uninterpreted_option_.Add();
10735}
10736 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
10737EnumOptions::uninterpreted_option() const {
10738 // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option)
10739 return uninterpreted_option_;
10740}
10741 ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
10742EnumOptions::mutable_uninterpreted_option() {
10743 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option)
10744 return &uninterpreted_option_;
10745}
10746
10747#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000010748
10749// ===================================================================
10750
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000010751#ifndef _MSC_VER
jieluo@google.com4de8f552014-07-18 00:47:59 +000010752const int EnumValueOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000010753const int EnumValueOptions::kUninterpretedOptionFieldNumber;
10754#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +000010755
kenton@google.com573989f2009-10-30 22:02:17 +000010756EnumValueOptions::EnumValueOptions()
Bo Yang5db21732015-05-21 14:28:59 -070010757 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010758 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010759 // @@protoc_insertion_point(constructor:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000010760}
10761
kenton@google.com80b1d622009-07-29 01:13:20 +000010762void EnumValueOptions::InitAsDefaultInstance() {
10763}
kenton@google.com24bf56f2008-09-24 20:31:01 +000010764
kenton@google.com573989f2009-10-30 22:02:17 +000010765EnumValueOptions::EnumValueOptions(const EnumValueOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080010766 : ::google::protobuf::Message(),
10767 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010768 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000010769 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000010770 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000010771}
10772
kenton@google.comd37d46d2009-04-25 02:53:47 +000010773void EnumValueOptions::SharedCtor() {
10774 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010775 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000010776 ::memset(_has_bits_, 0, sizeof(_has_bits_));
10777}
10778
temporal40ee5512008-07-10 02:12:20 +000010779EnumValueOptions::~EnumValueOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010780 // @@protoc_insertion_point(destructor:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010781 SharedDtor();
10782}
10783
10784void EnumValueOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010785 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000010786 }
10787}
10788
kenton@google.comfccb1462009-12-18 02:11:36 +000010789void EnumValueOptions::SetCachedSize(int size) const {
10790 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
10791 _cached_size_ = size;
10792 GOOGLE_SAFE_CONCURRENT_WRITES_END();
10793}
temporal40ee5512008-07-10 02:12:20 +000010794const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010795 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000010796 return EnumValueOptions_descriptor_;
10797}
10798
kenton@google.com24bf56f2008-09-24 20:31:01 +000010799const EnumValueOptions& EnumValueOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000010800 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
10801 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010802}
10803
10804EnumValueOptions* EnumValueOptions::default_instance_ = NULL;
10805
Feng Xiao6ef984a2014-11-10 17:34:54 -080010806EnumValueOptions* EnumValueOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080010807 EnumValueOptions* n = new EnumValueOptions;
10808 if (arena != NULL) {
10809 arena->Own(n);
10810 }
10811 return n;
temporal40ee5512008-07-10 02:12:20 +000010812}
10813
10814void EnumValueOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010815 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010816 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010817 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000010818 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080010819 if (_internal_metadata_.have_unknown_fields()) {
10820 mutable_unknown_fields()->Clear();
10821 }
temporal40ee5512008-07-10 02:12:20 +000010822}
10823
10824bool EnumValueOptions::MergePartialFromCodedStream(
10825 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010826#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000010827 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010828 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueOptions)
10829 for (;;) {
10830 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
10831 tag = p.first;
10832 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000010833 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010834 // optional bool deprecated = 1 [default = false];
10835 case 1: {
10836 if (tag == 8) {
10837 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
10838 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
10839 input, &deprecated_)));
10840 set_has_deprecated();
10841 } else {
10842 goto handle_unusual;
10843 }
10844 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
10845 break;
10846 }
10847
kenton@google.com24bf56f2008-09-24 20:31:01 +000010848 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
10849 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010850 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010851 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070010852 DO_(input->IncrementRecursionDepth());
10853 parse_loop_uninterpreted_option:
10854 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000010855 input, add_uninterpreted_option()));
10856 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010857 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010858 }
Bo Yang5db21732015-05-21 14:28:59 -070010859 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
10860 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000010861 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010862 break;
10863 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010864
kenton@google.com24bf56f2008-09-24 20:31:01 +000010865 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010866 handle_unusual:
10867 if (tag == 0 ||
10868 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000010869 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010870 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000010871 }
10872 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010873 DO_(_extensions_.ParseField(tag, input, default_instance_,
10874 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000010875 continue;
10876 }
10877 DO_(::google::protobuf::internal::WireFormat::SkipField(
10878 input, tag, mutable_unknown_fields()));
10879 break;
10880 }
temporal40ee5512008-07-10 02:12:20 +000010881 }
temporal40ee5512008-07-10 02:12:20 +000010882 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010883success:
10884 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueOptions)
temporal40ee5512008-07-10 02:12:20 +000010885 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010886failure:
10887 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueOptions)
10888 return false;
temporal40ee5512008-07-10 02:12:20 +000010889#undef DO_
10890}
10891
kenton@google.comd37d46d2009-04-25 02:53:47 +000010892void EnumValueOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000010893 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010894 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueOptions)
10895 // optional bool deprecated = 1 [default = false];
10896 if (has_deprecated()) {
10897 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->deprecated(), output);
10898 }
10899
kenton@google.com24bf56f2008-09-24 20:31:01 +000010900 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010901 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000010902 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000010903 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010904 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010905
kenton@google.com24bf56f2008-09-24 20:31:01 +000010906 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010907 _extensions_.SerializeWithCachedSizes(
10908 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010909
Feng Xiao6ef984a2014-11-10 17:34:54 -080010910 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010911 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
10912 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000010913 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010914 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010915}
10916
10917::google::protobuf::uint8* EnumValueOptions::SerializeWithCachedSizesToArray(
10918 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000010919 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions)
10920 // optional bool deprecated = 1 [default = false];
10921 if (has_deprecated()) {
10922 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->deprecated(), target);
10923 }
10924
kenton@google.comd37d46d2009-04-25 02:53:47 +000010925 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080010926 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000010927 target = ::google::protobuf::internal::WireFormatLite::
10928 WriteMessageNoVirtualToArray(
10929 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000010930 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010931
kenton@google.comd37d46d2009-04-25 02:53:47 +000010932 // Extension range [1000, 536870912)
10933 target = _extensions_.SerializeWithCachedSizesToArray(
10934 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010935
Feng Xiao6ef984a2014-11-10 17:34:54 -080010936 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000010937 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
10938 unknown_fields(), target);
10939 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000010940 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000010941 return target;
temporal40ee5512008-07-10 02:12:20 +000010942}
10943
10944int EnumValueOptions::ByteSize() const {
10945 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010946
Feng Xiao6ef984a2014-11-10 17:34:54 -080010947 // optional bool deprecated = 1 [default = false];
10948 if (has_deprecated()) {
10949 total_size += 1 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000010950 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080010951
kenton@google.com24bf56f2008-09-24 20:31:01 +000010952 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000010953 total_size += 2 * this->uninterpreted_option_size();
10954 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000010955 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000010956 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000010957 this->uninterpreted_option(i));
10958 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010959
kenton@google.comd37d46d2009-04-25 02:53:47 +000010960 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000010961
Feng Xiao6ef984a2014-11-10 17:34:54 -080010962 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000010963 total_size +=
10964 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
10965 unknown_fields());
10966 }
kenton@google.comfccb1462009-12-18 02:11:36 +000010967 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000010968 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000010969 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000010970 return total_size;
10971}
10972
10973void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010974 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070010975 const EnumValueOptions* source =
10976 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueOptions>(
10977 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010978 if (source == NULL) {
10979 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
10980 } else {
10981 MergeFrom(*source);
10982 }
temporal40ee5512008-07-10 02:12:20 +000010983}
10984
10985void EnumValueOptions::MergeFrom(const EnumValueOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080010986 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000010987 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000010988 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
10989 if (from.has_deprecated()) {
10990 set_deprecated(from.deprecated());
10991 }
10992 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000010993 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080010994 if (from._internal_metadata_.have_unknown_fields()) {
10995 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
10996 }
temporal40ee5512008-07-10 02:12:20 +000010997}
10998
10999void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) {
11000 if (&from == this) return;
11001 Clear();
11002 MergeFrom(from);
11003}
11004
11005void EnumValueOptions::CopyFrom(const EnumValueOptions& from) {
11006 if (&from == this) return;
11007 Clear();
11008 MergeFrom(from);
11009}
11010
kenton@google.comceb561d2009-06-25 19:05:36 +000011011bool EnumValueOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011012
jieluo@google.com4de8f552014-07-18 00:47:59 +000011013 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011014
kenton@google.comceb561d2009-06-25 19:05:36 +000011015 if (!_extensions_.IsInitialized()) return false; return true;
11016}
11017
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011018void EnumValueOptions::Swap(EnumValueOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011019 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011020 InternalSwap(other);
11021}
11022void EnumValueOptions::InternalSwap(EnumValueOptions* other) {
11023 std::swap(deprecated_, other->deprecated_);
11024 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11025 std::swap(_has_bits_[0], other->_has_bits_[0]);
11026 _internal_metadata_.Swap(&other->_internal_metadata_);
11027 std::swap(_cached_size_, other->_cached_size_);
11028 _extensions_.Swap(&other->_extensions_);
11029}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011030
kenton@google.com80b1d622009-07-29 01:13:20 +000011031::google::protobuf::Metadata EnumValueOptions::GetMetadata() const {
11032 protobuf_AssignDescriptorsOnce();
11033 ::google::protobuf::Metadata metadata;
11034 metadata.descriptor = EnumValueOptions_descriptor_;
11035 metadata.reflection = EnumValueOptions_reflection_;
11036 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011037}
11038
Jisi Liu885b6122015-02-28 14:51:22 -080011039#if PROTOBUF_INLINE_NOT_IN_HEADERS
11040// EnumValueOptions
11041
11042// optional bool deprecated = 1 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011043bool EnumValueOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011044 return (_has_bits_[0] & 0x00000001u) != 0;
11045}
Bo Yang5db21732015-05-21 14:28:59 -070011046void EnumValueOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011047 _has_bits_[0] |= 0x00000001u;
11048}
Bo Yang5db21732015-05-21 14:28:59 -070011049void EnumValueOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011050 _has_bits_[0] &= ~0x00000001u;
11051}
Bo Yang5db21732015-05-21 14:28:59 -070011052void EnumValueOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011053 deprecated_ = false;
11054 clear_has_deprecated();
11055}
11056 bool EnumValueOptions::deprecated() const {
11057 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.deprecated)
11058 return deprecated_;
11059}
11060 void EnumValueOptions::set_deprecated(bool value) {
11061 set_has_deprecated();
11062 deprecated_ = value;
11063 // @@protoc_insertion_point(field_set:google.protobuf.EnumValueOptions.deprecated)
11064}
11065
11066// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011067int EnumValueOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011068 return uninterpreted_option_.size();
11069}
Bo Yang5db21732015-05-21 14:28:59 -070011070void EnumValueOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011071 uninterpreted_option_.Clear();
11072}
11073 const ::google::protobuf::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const {
11074 // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.uninterpreted_option)
11075 return uninterpreted_option_.Get(index);
11076}
11077 ::google::protobuf::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) {
11078 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueOptions.uninterpreted_option)
11079 return uninterpreted_option_.Mutable(index);
11080}
11081 ::google::protobuf::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() {
11082 // @@protoc_insertion_point(field_add:google.protobuf.EnumValueOptions.uninterpreted_option)
11083 return uninterpreted_option_.Add();
11084}
11085 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11086EnumValueOptions::uninterpreted_option() const {
11087 // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option)
11088 return uninterpreted_option_;
11089}
11090 ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
11091EnumValueOptions::mutable_uninterpreted_option() {
11092 // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option)
11093 return &uninterpreted_option_;
11094}
11095
11096#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011097
11098// ===================================================================
11099
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011100#ifndef _MSC_VER
jieluo@google.com4de8f552014-07-18 00:47:59 +000011101const int ServiceOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011102const int ServiceOptions::kUninterpretedOptionFieldNumber;
11103#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +000011104
kenton@google.com573989f2009-10-30 22:02:17 +000011105ServiceOptions::ServiceOptions()
Bo Yang5db21732015-05-21 14:28:59 -070011106 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011107 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011108 // @@protoc_insertion_point(constructor:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011109}
11110
kenton@google.com80b1d622009-07-29 01:13:20 +000011111void ServiceOptions::InitAsDefaultInstance() {
11112}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011113
kenton@google.com573989f2009-10-30 22:02:17 +000011114ServiceOptions::ServiceOptions(const ServiceOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011115 : ::google::protobuf::Message(),
11116 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011117 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000011118 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011119 // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011120}
11121
kenton@google.comd37d46d2009-04-25 02:53:47 +000011122void ServiceOptions::SharedCtor() {
11123 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011124 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000011125 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11126}
11127
temporal40ee5512008-07-10 02:12:20 +000011128ServiceOptions::~ServiceOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011129 // @@protoc_insertion_point(destructor:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011130 SharedDtor();
11131}
11132
11133void ServiceOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011134 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000011135 }
11136}
11137
kenton@google.comfccb1462009-12-18 02:11:36 +000011138void ServiceOptions::SetCachedSize(int size) const {
11139 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
11140 _cached_size_ = size;
11141 GOOGLE_SAFE_CONCURRENT_WRITES_END();
11142}
temporal40ee5512008-07-10 02:12:20 +000011143const ::google::protobuf::Descriptor* ServiceOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011144 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000011145 return ServiceOptions_descriptor_;
11146}
11147
kenton@google.com24bf56f2008-09-24 20:31:01 +000011148const ServiceOptions& ServiceOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000011149 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
11150 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011151}
11152
11153ServiceOptions* ServiceOptions::default_instance_ = NULL;
11154
Feng Xiao6ef984a2014-11-10 17:34:54 -080011155ServiceOptions* ServiceOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080011156 ServiceOptions* n = new ServiceOptions;
11157 if (arena != NULL) {
11158 arena->Own(n);
11159 }
11160 return n;
temporal40ee5512008-07-10 02:12:20 +000011161}
11162
11163void ServiceOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011164 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011165 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011166 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000011167 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080011168 if (_internal_metadata_.have_unknown_fields()) {
11169 mutable_unknown_fields()->Clear();
11170 }
temporal40ee5512008-07-10 02:12:20 +000011171}
11172
11173bool ServiceOptions::MergePartialFromCodedStream(
11174 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011175#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000011176 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011177 // @@protoc_insertion_point(parse_start:google.protobuf.ServiceOptions)
11178 for (;;) {
11179 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
11180 tag = p.first;
11181 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011182 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011183 // optional bool deprecated = 33 [default = false];
11184 case 33: {
11185 if (tag == 264) {
11186 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
11187 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
11188 input, &deprecated_)));
11189 set_has_deprecated();
11190 } else {
11191 goto handle_unusual;
11192 }
11193 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
11194 break;
11195 }
11196
kenton@google.com24bf56f2008-09-24 20:31:01 +000011197 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
11198 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011199 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011200 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070011201 DO_(input->IncrementRecursionDepth());
11202 parse_loop_uninterpreted_option:
11203 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000011204 input, add_uninterpreted_option()));
11205 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011206 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011207 }
Bo Yang5db21732015-05-21 14:28:59 -070011208 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
11209 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011210 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011211 break;
11212 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011213
kenton@google.com24bf56f2008-09-24 20:31:01 +000011214 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011215 handle_unusual:
11216 if (tag == 0 ||
11217 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000011218 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011219 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011220 }
11221 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011222 DO_(_extensions_.ParseField(tag, input, default_instance_,
11223 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000011224 continue;
11225 }
11226 DO_(::google::protobuf::internal::WireFormat::SkipField(
11227 input, tag, mutable_unknown_fields()));
11228 break;
11229 }
temporal40ee5512008-07-10 02:12:20 +000011230 }
temporal40ee5512008-07-10 02:12:20 +000011231 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011232success:
11233 // @@protoc_insertion_point(parse_success:google.protobuf.ServiceOptions)
temporal40ee5512008-07-10 02:12:20 +000011234 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011235failure:
11236 // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceOptions)
11237 return false;
temporal40ee5512008-07-10 02:12:20 +000011238#undef DO_
11239}
11240
kenton@google.comd37d46d2009-04-25 02:53:47 +000011241void ServiceOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000011242 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011243 // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceOptions)
11244 // optional bool deprecated = 33 [default = false];
11245 if (has_deprecated()) {
11246 ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output);
11247 }
11248
kenton@google.com24bf56f2008-09-24 20:31:01 +000011249 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011250 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011251 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000011252 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011253 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011254
kenton@google.com24bf56f2008-09-24 20:31:01 +000011255 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011256 _extensions_.SerializeWithCachedSizes(
11257 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011258
Feng Xiao6ef984a2014-11-10 17:34:54 -080011259 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011260 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11261 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000011262 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011263 // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011264}
11265
11266::google::protobuf::uint8* ServiceOptions::SerializeWithCachedSizesToArray(
11267 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011268 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions)
11269 // optional bool deprecated = 33 [default = false];
11270 if (has_deprecated()) {
11271 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target);
11272 }
11273
kenton@google.comd37d46d2009-04-25 02:53:47 +000011274 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011275 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011276 target = ::google::protobuf::internal::WireFormatLite::
11277 WriteMessageNoVirtualToArray(
11278 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011279 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011280
kenton@google.comd37d46d2009-04-25 02:53:47 +000011281 // Extension range [1000, 536870912)
11282 target = _extensions_.SerializeWithCachedSizesToArray(
11283 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011284
Feng Xiao6ef984a2014-11-10 17:34:54 -080011285 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011286 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11287 unknown_fields(), target);
11288 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011289 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011290 return target;
temporal40ee5512008-07-10 02:12:20 +000011291}
11292
11293int ServiceOptions::ByteSize() const {
11294 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011295
Feng Xiao6ef984a2014-11-10 17:34:54 -080011296 // optional bool deprecated = 33 [default = false];
11297 if (has_deprecated()) {
11298 total_size += 2 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011299 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080011300
kenton@google.com24bf56f2008-09-24 20:31:01 +000011301 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000011302 total_size += 2 * this->uninterpreted_option_size();
11303 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011304 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000011305 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011306 this->uninterpreted_option(i));
11307 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011308
kenton@google.comd37d46d2009-04-25 02:53:47 +000011309 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011310
Feng Xiao6ef984a2014-11-10 17:34:54 -080011311 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000011312 total_size +=
11313 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
11314 unknown_fields());
11315 }
kenton@google.comfccb1462009-12-18 02:11:36 +000011316 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000011317 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000011318 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000011319 return total_size;
11320}
11321
11322void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011323 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070011324 const ServiceOptions* source =
11325 ::google::protobuf::internal::DynamicCastToGenerated<const ServiceOptions>(
11326 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011327 if (source == NULL) {
11328 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
11329 } else {
11330 MergeFrom(*source);
11331 }
temporal40ee5512008-07-10 02:12:20 +000011332}
11333
11334void ServiceOptions::MergeFrom(const ServiceOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011335 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011336 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011337 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
11338 if (from.has_deprecated()) {
11339 set_deprecated(from.deprecated());
11340 }
11341 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011342 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080011343 if (from._internal_metadata_.have_unknown_fields()) {
11344 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
11345 }
temporal40ee5512008-07-10 02:12:20 +000011346}
11347
11348void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) {
11349 if (&from == this) return;
11350 Clear();
11351 MergeFrom(from);
11352}
11353
11354void ServiceOptions::CopyFrom(const ServiceOptions& from) {
11355 if (&from == this) return;
11356 Clear();
11357 MergeFrom(from);
11358}
11359
kenton@google.comceb561d2009-06-25 19:05:36 +000011360bool ServiceOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011361
jieluo@google.com4de8f552014-07-18 00:47:59 +000011362 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011363
kenton@google.comceb561d2009-06-25 19:05:36 +000011364 if (!_extensions_.IsInitialized()) return false; return true;
11365}
11366
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011367void ServiceOptions::Swap(ServiceOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011368 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011369 InternalSwap(other);
11370}
11371void ServiceOptions::InternalSwap(ServiceOptions* other) {
11372 std::swap(deprecated_, other->deprecated_);
11373 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11374 std::swap(_has_bits_[0], other->_has_bits_[0]);
11375 _internal_metadata_.Swap(&other->_internal_metadata_);
11376 std::swap(_cached_size_, other->_cached_size_);
11377 _extensions_.Swap(&other->_extensions_);
11378}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011379
kenton@google.com80b1d622009-07-29 01:13:20 +000011380::google::protobuf::Metadata ServiceOptions::GetMetadata() const {
11381 protobuf_AssignDescriptorsOnce();
11382 ::google::protobuf::Metadata metadata;
11383 metadata.descriptor = ServiceOptions_descriptor_;
11384 metadata.reflection = ServiceOptions_reflection_;
11385 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011386}
11387
Jisi Liu885b6122015-02-28 14:51:22 -080011388#if PROTOBUF_INLINE_NOT_IN_HEADERS
11389// ServiceOptions
11390
11391// optional bool deprecated = 33 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011392bool ServiceOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011393 return (_has_bits_[0] & 0x00000001u) != 0;
11394}
Bo Yang5db21732015-05-21 14:28:59 -070011395void ServiceOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011396 _has_bits_[0] |= 0x00000001u;
11397}
Bo Yang5db21732015-05-21 14:28:59 -070011398void ServiceOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011399 _has_bits_[0] &= ~0x00000001u;
11400}
Bo Yang5db21732015-05-21 14:28:59 -070011401void ServiceOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011402 deprecated_ = false;
11403 clear_has_deprecated();
11404}
11405 bool ServiceOptions::deprecated() const {
11406 // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.deprecated)
11407 return deprecated_;
11408}
11409 void ServiceOptions::set_deprecated(bool value) {
11410 set_has_deprecated();
11411 deprecated_ = value;
11412 // @@protoc_insertion_point(field_set:google.protobuf.ServiceOptions.deprecated)
11413}
11414
11415// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011416int ServiceOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011417 return uninterpreted_option_.size();
11418}
Bo Yang5db21732015-05-21 14:28:59 -070011419void ServiceOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011420 uninterpreted_option_.Clear();
11421}
11422 const ::google::protobuf::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const {
11423 // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.uninterpreted_option)
11424 return uninterpreted_option_.Get(index);
11425}
11426 ::google::protobuf::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) {
11427 // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceOptions.uninterpreted_option)
11428 return uninterpreted_option_.Mutable(index);
11429}
11430 ::google::protobuf::UninterpretedOption* ServiceOptions::add_uninterpreted_option() {
11431 // @@protoc_insertion_point(field_add:google.protobuf.ServiceOptions.uninterpreted_option)
11432 return uninterpreted_option_.Add();
11433}
11434 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11435ServiceOptions::uninterpreted_option() const {
11436 // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option)
11437 return uninterpreted_option_;
11438}
11439 ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
11440ServiceOptions::mutable_uninterpreted_option() {
11441 // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option)
11442 return &uninterpreted_option_;
11443}
11444
11445#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011446
11447// ===================================================================
11448
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011449#ifndef _MSC_VER
jieluo@google.com4de8f552014-07-18 00:47:59 +000011450const int MethodOptions::kDeprecatedFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011451const int MethodOptions::kUninterpretedOptionFieldNumber;
11452#endif // !_MSC_VER
temporal40ee5512008-07-10 02:12:20 +000011453
kenton@google.com573989f2009-10-30 22:02:17 +000011454MethodOptions::MethodOptions()
Bo Yang5db21732015-05-21 14:28:59 -070011455 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011456 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011457 // @@protoc_insertion_point(constructor:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011458}
11459
kenton@google.com80b1d622009-07-29 01:13:20 +000011460void MethodOptions::InitAsDefaultInstance() {
11461}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011462
kenton@google.com573989f2009-10-30 22:02:17 +000011463MethodOptions::MethodOptions(const MethodOptions& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011464 : ::google::protobuf::Message(),
11465 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011466 SharedCtor();
temporal40ee5512008-07-10 02:12:20 +000011467 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011468 // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011469}
11470
kenton@google.comd37d46d2009-04-25 02:53:47 +000011471void MethodOptions::SharedCtor() {
11472 _cached_size_ = 0;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011473 deprecated_ = false;
kenton@google.comd37d46d2009-04-25 02:53:47 +000011474 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11475}
11476
temporal40ee5512008-07-10 02:12:20 +000011477MethodOptions::~MethodOptions() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011478 // @@protoc_insertion_point(destructor:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011479 SharedDtor();
11480}
11481
11482void MethodOptions::SharedDtor() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011483 if (this != default_instance_) {
temporal40ee5512008-07-10 02:12:20 +000011484 }
11485}
11486
kenton@google.comfccb1462009-12-18 02:11:36 +000011487void MethodOptions::SetCachedSize(int size) const {
11488 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
11489 _cached_size_ = size;
11490 GOOGLE_SAFE_CONCURRENT_WRITES_END();
11491}
temporal40ee5512008-07-10 02:12:20 +000011492const ::google::protobuf::Descriptor* MethodOptions::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011493 protobuf_AssignDescriptorsOnce();
temporal40ee5512008-07-10 02:12:20 +000011494 return MethodOptions_descriptor_;
11495}
11496
kenton@google.com24bf56f2008-09-24 20:31:01 +000011497const MethodOptions& MethodOptions::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000011498 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
11499 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011500}
11501
11502MethodOptions* MethodOptions::default_instance_ = NULL;
11503
Feng Xiao6ef984a2014-11-10 17:34:54 -080011504MethodOptions* MethodOptions::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080011505 MethodOptions* n = new MethodOptions;
11506 if (arena != NULL) {
11507 arena->Own(n);
11508 }
11509 return n;
temporal40ee5512008-07-10 02:12:20 +000011510}
11511
11512void MethodOptions::Clear() {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011513 _extensions_.Clear();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011514 deprecated_ = false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011515 uninterpreted_option_.Clear();
temporal40ee5512008-07-10 02:12:20 +000011516 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080011517 if (_internal_metadata_.have_unknown_fields()) {
11518 mutable_unknown_fields()->Clear();
11519 }
temporal40ee5512008-07-10 02:12:20 +000011520}
11521
11522bool MethodOptions::MergePartialFromCodedStream(
11523 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011524#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
temporal40ee5512008-07-10 02:12:20 +000011525 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011526 // @@protoc_insertion_point(parse_start:google.protobuf.MethodOptions)
11527 for (;;) {
11528 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
11529 tag = p.first;
11530 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011531 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011532 // optional bool deprecated = 33 [default = false];
11533 case 33: {
11534 if (tag == 264) {
11535 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
11536 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
11537 input, &deprecated_)));
11538 set_has_deprecated();
11539 } else {
11540 goto handle_unusual;
11541 }
11542 if (input->ExpectTag(7994)) goto parse_uninterpreted_option;
11543 break;
11544 }
11545
kenton@google.com24bf56f2008-09-24 20:31:01 +000011546 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
11547 case 999: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011548 if (tag == 7994) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011549 parse_uninterpreted_option:
Bo Yang5db21732015-05-21 14:28:59 -070011550 DO_(input->IncrementRecursionDepth());
11551 parse_loop_uninterpreted_option:
11552 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000011553 input, add_uninterpreted_option()));
11554 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011555 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011556 }
Bo Yang5db21732015-05-21 14:28:59 -070011557 if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option;
11558 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011559 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011560 break;
11561 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011562
kenton@google.com24bf56f2008-09-24 20:31:01 +000011563 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011564 handle_unusual:
11565 if (tag == 0 ||
11566 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000011567 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011568 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011569 }
11570 if ((8000u <= tag)) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011571 DO_(_extensions_.ParseField(tag, input, default_instance_,
11572 mutable_unknown_fields()));
kenton@google.com24bf56f2008-09-24 20:31:01 +000011573 continue;
11574 }
11575 DO_(::google::protobuf::internal::WireFormat::SkipField(
11576 input, tag, mutable_unknown_fields()));
11577 break;
11578 }
temporal40ee5512008-07-10 02:12:20 +000011579 }
temporal40ee5512008-07-10 02:12:20 +000011580 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011581success:
11582 // @@protoc_insertion_point(parse_success:google.protobuf.MethodOptions)
temporal40ee5512008-07-10 02:12:20 +000011583 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011584failure:
11585 // @@protoc_insertion_point(parse_failure:google.protobuf.MethodOptions)
11586 return false;
temporal40ee5512008-07-10 02:12:20 +000011587#undef DO_
11588}
11589
kenton@google.comd37d46d2009-04-25 02:53:47 +000011590void MethodOptions::SerializeWithCachedSizes(
temporal40ee5512008-07-10 02:12:20 +000011591 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011592 // @@protoc_insertion_point(serialize_start:google.protobuf.MethodOptions)
11593 // optional bool deprecated = 33 [default = false];
11594 if (has_deprecated()) {
11595 ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output);
11596 }
11597
kenton@google.com24bf56f2008-09-24 20:31:01 +000011598 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011599 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011600 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000011601 999, this->uninterpreted_option(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011602 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011603
kenton@google.com24bf56f2008-09-24 20:31:01 +000011604 // Extension range [1000, 536870912)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011605 _extensions_.SerializeWithCachedSizes(
11606 1000, 536870912, output);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011607
Feng Xiao6ef984a2014-11-10 17:34:54 -080011608 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011609 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11610 unknown_fields(), output);
temporal40ee5512008-07-10 02:12:20 +000011611 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011612 // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011613}
11614
11615::google::protobuf::uint8* MethodOptions::SerializeWithCachedSizesToArray(
11616 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011617 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions)
11618 // optional bool deprecated = 33 [default = false];
11619 if (has_deprecated()) {
11620 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target);
11621 }
11622
kenton@google.comd37d46d2009-04-25 02:53:47 +000011623 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Feng Xiaof157a562014-11-14 11:50:31 -080011624 for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011625 target = ::google::protobuf::internal::WireFormatLite::
11626 WriteMessageNoVirtualToArray(
11627 999, this->uninterpreted_option(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011628 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011629
kenton@google.comd37d46d2009-04-25 02:53:47 +000011630 // Extension range [1000, 536870912)
11631 target = _extensions_.SerializeWithCachedSizesToArray(
11632 1000, 536870912, target);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011633
Feng Xiao6ef984a2014-11-10 17:34:54 -080011634 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011635 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11636 unknown_fields(), target);
11637 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011638 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011639 return target;
temporal40ee5512008-07-10 02:12:20 +000011640}
11641
11642int MethodOptions::ByteSize() const {
11643 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011644
Feng Xiao6ef984a2014-11-10 17:34:54 -080011645 // optional bool deprecated = 33 [default = false];
11646 if (has_deprecated()) {
11647 total_size += 2 + 1;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011648 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080011649
kenton@google.com24bf56f2008-09-24 20:31:01 +000011650 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
kenton@google.com2d6daa72009-01-22 01:27:00 +000011651 total_size += 2 * this->uninterpreted_option_size();
11652 for (int i = 0; i < this->uninterpreted_option_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011653 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000011654 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011655 this->uninterpreted_option(i));
11656 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011657
kenton@google.comd37d46d2009-04-25 02:53:47 +000011658 total_size += _extensions_.ByteSize();
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011659
Feng Xiao6ef984a2014-11-10 17:34:54 -080011660 if (_internal_metadata_.have_unknown_fields()) {
temporal40ee5512008-07-10 02:12:20 +000011661 total_size +=
11662 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
11663 unknown_fields());
11664 }
kenton@google.comfccb1462009-12-18 02:11:36 +000011665 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
temporal40ee5512008-07-10 02:12:20 +000011666 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000011667 GOOGLE_SAFE_CONCURRENT_WRITES_END();
temporal40ee5512008-07-10 02:12:20 +000011668 return total_size;
11669}
11670
11671void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011672 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070011673 const MethodOptions* source =
11674 ::google::protobuf::internal::DynamicCastToGenerated<const MethodOptions>(
11675 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011676 if (source == NULL) {
11677 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
11678 } else {
11679 MergeFrom(*source);
11680 }
temporal40ee5512008-07-10 02:12:20 +000011681}
11682
11683void MethodOptions::MergeFrom(const MethodOptions& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080011684 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011685 uninterpreted_option_.MergeFrom(from.uninterpreted_option_);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011686 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
11687 if (from.has_deprecated()) {
11688 set_deprecated(from.deprecated());
11689 }
11690 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011691 _extensions_.MergeFrom(from._extensions_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080011692 if (from._internal_metadata_.have_unknown_fields()) {
11693 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
11694 }
temporal40ee5512008-07-10 02:12:20 +000011695}
11696
11697void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) {
11698 if (&from == this) return;
11699 Clear();
11700 MergeFrom(from);
11701}
11702
11703void MethodOptions::CopyFrom(const MethodOptions& from) {
11704 if (&from == this) return;
11705 Clear();
11706 MergeFrom(from);
11707}
11708
kenton@google.comceb561d2009-06-25 19:05:36 +000011709bool MethodOptions::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011710
jieluo@google.com4de8f552014-07-18 00:47:59 +000011711 if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011712
kenton@google.comceb561d2009-06-25 19:05:36 +000011713 if (!_extensions_.IsInitialized()) return false; return true;
11714}
11715
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011716void MethodOptions::Swap(MethodOptions* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080011717 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011718 InternalSwap(other);
11719}
11720void MethodOptions::InternalSwap(MethodOptions* other) {
11721 std::swap(deprecated_, other->deprecated_);
11722 uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_);
11723 std::swap(_has_bits_[0], other->_has_bits_[0]);
11724 _internal_metadata_.Swap(&other->_internal_metadata_);
11725 std::swap(_cached_size_, other->_cached_size_);
11726 _extensions_.Swap(&other->_extensions_);
11727}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000011728
kenton@google.com80b1d622009-07-29 01:13:20 +000011729::google::protobuf::Metadata MethodOptions::GetMetadata() const {
11730 protobuf_AssignDescriptorsOnce();
11731 ::google::protobuf::Metadata metadata;
11732 metadata.descriptor = MethodOptions_descriptor_;
11733 metadata.reflection = MethodOptions_reflection_;
11734 return metadata;
temporal40ee5512008-07-10 02:12:20 +000011735}
11736
Jisi Liu885b6122015-02-28 14:51:22 -080011737#if PROTOBUF_INLINE_NOT_IN_HEADERS
11738// MethodOptions
11739
11740// optional bool deprecated = 33 [default = false];
Bo Yang5db21732015-05-21 14:28:59 -070011741bool MethodOptions::has_deprecated() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011742 return (_has_bits_[0] & 0x00000001u) != 0;
11743}
Bo Yang5db21732015-05-21 14:28:59 -070011744void MethodOptions::set_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011745 _has_bits_[0] |= 0x00000001u;
11746}
Bo Yang5db21732015-05-21 14:28:59 -070011747void MethodOptions::clear_has_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011748 _has_bits_[0] &= ~0x00000001u;
11749}
Bo Yang5db21732015-05-21 14:28:59 -070011750void MethodOptions::clear_deprecated() {
Jisi Liu885b6122015-02-28 14:51:22 -080011751 deprecated_ = false;
11752 clear_has_deprecated();
11753}
11754 bool MethodOptions::deprecated() const {
11755 // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.deprecated)
11756 return deprecated_;
11757}
11758 void MethodOptions::set_deprecated(bool value) {
11759 set_has_deprecated();
11760 deprecated_ = value;
11761 // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.deprecated)
11762}
11763
11764// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
Bo Yang5db21732015-05-21 14:28:59 -070011765int MethodOptions::uninterpreted_option_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080011766 return uninterpreted_option_.size();
11767}
Bo Yang5db21732015-05-21 14:28:59 -070011768void MethodOptions::clear_uninterpreted_option() {
Jisi Liu885b6122015-02-28 14:51:22 -080011769 uninterpreted_option_.Clear();
11770}
11771 const ::google::protobuf::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const {
11772 // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.uninterpreted_option)
11773 return uninterpreted_option_.Get(index);
11774}
11775 ::google::protobuf::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) {
11776 // @@protoc_insertion_point(field_mutable:google.protobuf.MethodOptions.uninterpreted_option)
11777 return uninterpreted_option_.Mutable(index);
11778}
11779 ::google::protobuf::UninterpretedOption* MethodOptions::add_uninterpreted_option() {
11780 // @@protoc_insertion_point(field_add:google.protobuf.MethodOptions.uninterpreted_option)
11781 return uninterpreted_option_.Add();
11782}
11783 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >&
11784MethodOptions::uninterpreted_option() const {
11785 // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option)
11786 return uninterpreted_option_;
11787}
11788 ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >*
11789MethodOptions::mutable_uninterpreted_option() {
11790 // @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option)
11791 return &uninterpreted_option_;
11792}
11793
11794#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
temporal40ee5512008-07-10 02:12:20 +000011795
kenton@google.com24bf56f2008-09-24 20:31:01 +000011796// ===================================================================
11797
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000011798#ifndef _MSC_VER
11799const int UninterpretedOption_NamePart::kNamePartFieldNumber;
11800const int UninterpretedOption_NamePart::kIsExtensionFieldNumber;
11801#endif // !_MSC_VER
kenton@google.com24bf56f2008-09-24 20:31:01 +000011802
kenton@google.com573989f2009-10-30 22:02:17 +000011803UninterpretedOption_NamePart::UninterpretedOption_NamePart()
Bo Yang5db21732015-05-21 14:28:59 -070011804 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011805 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000011806 // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000011807}
11808
kenton@google.com80b1d622009-07-29 01:13:20 +000011809void UninterpretedOption_NamePart::InitAsDefaultInstance() {
11810}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011811
kenton@google.com573989f2009-10-30 22:02:17 +000011812UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080011813 : ::google::protobuf::Message(),
11814 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011815 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +000011816 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000011817 // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000011818}
11819
kenton@google.comd37d46d2009-04-25 02:53:47 +000011820void UninterpretedOption_NamePart::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011821 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +000011822 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080011823 name_part_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000011824 is_extension_ = false;
11825 ::memset(_has_bits_, 0, sizeof(_has_bits_));
11826}
11827
kenton@google.com24bf56f2008-09-24 20:31:01 +000011828UninterpretedOption_NamePart::~UninterpretedOption_NamePart() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011829 // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011830 SharedDtor();
11831}
11832
11833void UninterpretedOption_NamePart::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080011834 name_part_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000011835 if (this != default_instance_) {
11836 }
11837}
11838
kenton@google.comfccb1462009-12-18 02:11:36 +000011839void UninterpretedOption_NamePart::SetCachedSize(int size) const {
11840 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
11841 _cached_size_ = size;
11842 GOOGLE_SAFE_CONCURRENT_WRITES_END();
11843}
kenton@google.com24bf56f2008-09-24 20:31:01 +000011844const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011845 protobuf_AssignDescriptorsOnce();
kenton@google.com24bf56f2008-09-24 20:31:01 +000011846 return UninterpretedOption_NamePart_descriptor_;
11847}
11848
11849const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000011850 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
11851 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011852}
11853
11854UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL;
11855
Feng Xiao6ef984a2014-11-10 17:34:54 -080011856UninterpretedOption_NamePart* UninterpretedOption_NamePart::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080011857 UninterpretedOption_NamePart* n = new UninterpretedOption_NamePart;
11858 if (arena != NULL) {
11859 arena->Own(n);
11860 }
11861 return n;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011862}
11863
11864void UninterpretedOption_NamePart::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -070011865 if (_has_bits_[0 / 32] & 3u) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000011866 if (has_name_part()) {
Feng Xiaof157a562014-11-14 11:50:31 -080011867 name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000011868 }
11869 is_extension_ = false;
11870 }
11871 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080011872 if (_internal_metadata_.have_unknown_fields()) {
11873 mutable_unknown_fields()->Clear();
11874 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011875}
11876
11877bool UninterpretedOption_NamePart::MergePartialFromCodedStream(
11878 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011879#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
kenton@google.com24bf56f2008-09-24 20:31:01 +000011880 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011881 // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption.NamePart)
11882 for (;;) {
11883 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
11884 tag = p.first;
11885 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000011886 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000011887 // required string name_part = 1;
11888 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011889 if (tag == 10) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011890 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
11891 input, this->mutable_name_part()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000011892 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +000011893 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000011894 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080011895 "google.protobuf.UninterpretedOption.NamePart.name_part");
kenton@google.comfccb1462009-12-18 02:11:36 +000011896 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011897 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011898 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000011899 if (input->ExpectTag(16)) goto parse_is_extension;
11900 break;
11901 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011902
kenton@google.com24bf56f2008-09-24 20:31:01 +000011903 // required bool is_extension = 2;
11904 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011905 if (tag == 16) {
kenton@google.comfccb1462009-12-18 02:11:36 +000011906 parse_is_extension:
11907 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
11908 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
11909 input, &is_extension_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000011910 set_has_is_extension();
kenton@google.comfccb1462009-12-18 02:11:36 +000011911 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011912 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011913 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011914 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011915 break;
11916 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011917
kenton@google.com24bf56f2008-09-24 20:31:01 +000011918 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011919 handle_unusual:
11920 if (tag == 0 ||
11921 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000011922 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011923 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011924 }
11925 DO_(::google::protobuf::internal::WireFormat::SkipField(
11926 input, tag, mutable_unknown_fields()));
11927 break;
11928 }
11929 }
11930 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011931success:
11932 // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000011933 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000011934failure:
11935 // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption.NamePart)
11936 return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011937#undef DO_
11938}
11939
kenton@google.comd37d46d2009-04-25 02:53:47 +000011940void UninterpretedOption_NamePart::SerializeWithCachedSizes(
kenton@google.com24bf56f2008-09-24 20:31:01 +000011941 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011942 // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption.NamePart)
kenton@google.com24bf56f2008-09-24 20:31:01 +000011943 // required string name_part = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +000011944 if (has_name_part()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011945 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000011946 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000011947 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080011948 "google.protobuf.UninterpretedOption.NamePart.name_part");
jieluo@google.com4de8f552014-07-18 00:47:59 +000011949 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000011950 1, this->name_part(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011951 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011952
kenton@google.com24bf56f2008-09-24 20:31:01 +000011953 // required bool is_extension = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000011954 if (has_is_extension()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011955 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_extension(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011956 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011957
Feng Xiao6ef984a2014-11-10 17:34:54 -080011958 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011959 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
11960 unknown_fields(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000011961 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011962 // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011963}
11964
11965::google::protobuf::uint8* UninterpretedOption_NamePart::SerializeWithCachedSizesToArray(
11966 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011967 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011968 // required string name_part = 1;
liujisi@google.com33165fe2010-11-02 13:14:58 +000011969 if (has_name_part()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000011970 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000011971 this->name_part().data(), this->name_part().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000011972 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080011973 "google.protobuf.UninterpretedOption.NamePart.name_part");
kenton@google.com80b1d622009-07-29 01:13:20 +000011974 target =
11975 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
11976 1, this->name_part(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011977 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011978
kenton@google.comd37d46d2009-04-25 02:53:47 +000011979 // required bool is_extension = 2;
liujisi@google.com33165fe2010-11-02 13:14:58 +000011980 if (has_is_extension()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000011981 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000011982 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000011983
Feng Xiao6ef984a2014-11-10 17:34:54 -080011984 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000011985 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
11986 unknown_fields(), target);
11987 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000011988 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart)
kenton@google.comd37d46d2009-04-25 02:53:47 +000011989 return target;
kenton@google.com24bf56f2008-09-24 20:31:01 +000011990}
11991
Feng Xiao6ef984a2014-11-10 17:34:54 -080011992int UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const {
11993 int total_size = 0;
11994
11995 if (has_name_part()) {
11996 // required string name_part = 1;
11997 total_size += 1 +
11998 ::google::protobuf::internal::WireFormatLite::StringSize(
11999 this->name_part());
12000 }
12001
12002 if (has_is_extension()) {
12003 // required bool is_extension = 2;
12004 total_size += 1 + 1;
12005 }
12006
12007 return total_size;
12008}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012009int UninterpretedOption_NamePart::ByteSize() const {
12010 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012011
Feng Xiao6ef984a2014-11-10 17:34:54 -080012012 if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
kenton@google.com24bf56f2008-09-24 20:31:01 +000012013 // required string name_part = 1;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012014 total_size += 1 +
12015 ::google::protobuf::internal::WireFormatLite::StringSize(
12016 this->name_part());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012017
kenton@google.com24bf56f2008-09-24 20:31:01 +000012018 // required bool is_extension = 2;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012019 total_size += 1 + 1;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012020
Feng Xiao6ef984a2014-11-10 17:34:54 -080012021 } else {
12022 total_size += RequiredFieldsByteSizeFallback();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012023 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012024 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012025 total_size +=
12026 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
12027 unknown_fields());
12028 }
kenton@google.comfccb1462009-12-18 02:11:36 +000012029 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012030 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000012031 GOOGLE_SAFE_CONCURRENT_WRITES_END();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012032 return total_size;
12033}
12034
12035void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012036 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070012037 const UninterpretedOption_NamePart* source =
12038 ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption_NamePart>(
12039 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012040 if (source == NULL) {
12041 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
12042 } else {
12043 MergeFrom(*source);
12044 }
12045}
12046
12047void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012048 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012049 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012050 if (from.has_name_part()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012051 set_has_name_part();
12052 name_part_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_part_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012053 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012054 if (from.has_is_extension()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012055 set_is_extension(from.is_extension());
12056 }
12057 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012058 if (from._internal_metadata_.have_unknown_fields()) {
12059 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
12060 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012061}
12062
12063void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) {
12064 if (&from == this) return;
12065 Clear();
12066 MergeFrom(from);
12067}
12068
12069void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) {
12070 if (&from == this) return;
12071 Clear();
12072 MergeFrom(from);
12073}
12074
kenton@google.comceb561d2009-06-25 19:05:36 +000012075bool UninterpretedOption_NamePart::IsInitialized() const {
12076 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012077
kenton@google.comceb561d2009-06-25 19:05:36 +000012078 return true;
12079}
12080
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012081void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080012082 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012083 InternalSwap(other);
12084}
12085void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) {
12086 name_part_.Swap(&other->name_part_);
12087 std::swap(is_extension_, other->is_extension_);
12088 std::swap(_has_bits_[0], other->_has_bits_[0]);
12089 _internal_metadata_.Swap(&other->_internal_metadata_);
12090 std::swap(_cached_size_, other->_cached_size_);
12091}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012092
kenton@google.com80b1d622009-07-29 01:13:20 +000012093::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const {
12094 protobuf_AssignDescriptorsOnce();
12095 ::google::protobuf::Metadata metadata;
12096 metadata.descriptor = UninterpretedOption_NamePart_descriptor_;
12097 metadata.reflection = UninterpretedOption_NamePart_reflection_;
12098 return metadata;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012099}
12100
kenton@google.com24bf56f2008-09-24 20:31:01 +000012101
12102// -------------------------------------------------------------------
12103
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000012104#ifndef _MSC_VER
12105const int UninterpretedOption::kNameFieldNumber;
12106const int UninterpretedOption::kIdentifierValueFieldNumber;
12107const int UninterpretedOption::kPositiveIntValueFieldNumber;
12108const int UninterpretedOption::kNegativeIntValueFieldNumber;
12109const int UninterpretedOption::kDoubleValueFieldNumber;
12110const int UninterpretedOption::kStringValueFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012111const int UninterpretedOption::kAggregateValueFieldNumber;
kenton@google.comcfa2d8a2009-04-18 00:02:12 +000012112#endif // !_MSC_VER
12113
kenton@google.com573989f2009-10-30 22:02:17 +000012114UninterpretedOption::UninterpretedOption()
Bo Yang5db21732015-05-21 14:28:59 -070012115 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012116 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000012117 // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012118}
12119
kenton@google.com80b1d622009-07-29 01:13:20 +000012120void UninterpretedOption::InitAsDefaultInstance() {
12121}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012122
kenton@google.com573989f2009-10-30 22:02:17 +000012123UninterpretedOption::UninterpretedOption(const UninterpretedOption& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080012124 : ::google::protobuf::Message(),
12125 _internal_metadata_(NULL) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012126 SharedCtor();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012127 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000012128 // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012129}
12130
kenton@google.comd37d46d2009-04-25 02:53:47 +000012131void UninterpretedOption::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012132 ::google::protobuf::internal::GetEmptyString();
kenton@google.comd37d46d2009-04-25 02:53:47 +000012133 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012134 identifier_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000012135 positive_int_value_ = GOOGLE_ULONGLONG(0);
12136 negative_int_value_ = GOOGLE_LONGLONG(0);
12137 double_value_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012138 string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12139 aggregate_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.comd37d46d2009-04-25 02:53:47 +000012140 ::memset(_has_bits_, 0, sizeof(_has_bits_));
12141}
12142
kenton@google.com24bf56f2008-09-24 20:31:01 +000012143UninterpretedOption::~UninterpretedOption() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012144 // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012145 SharedDtor();
12146}
12147
12148void UninterpretedOption::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080012149 identifier_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12150 string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12151 aggregate_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012152 if (this != default_instance_) {
12153 }
12154}
12155
kenton@google.comfccb1462009-12-18 02:11:36 +000012156void UninterpretedOption::SetCachedSize(int size) const {
12157 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
12158 _cached_size_ = size;
12159 GOOGLE_SAFE_CONCURRENT_WRITES_END();
12160}
kenton@google.com24bf56f2008-09-24 20:31:01 +000012161const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012162 protobuf_AssignDescriptorsOnce();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012163 return UninterpretedOption_descriptor_;
12164}
12165
12166const UninterpretedOption& UninterpretedOption::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000012167 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
12168 return *default_instance_;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012169}
12170
12171UninterpretedOption* UninterpretedOption::default_instance_ = NULL;
12172
Feng Xiao6ef984a2014-11-10 17:34:54 -080012173UninterpretedOption* UninterpretedOption::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080012174 UninterpretedOption* n = new UninterpretedOption;
12175 if (arena != NULL) {
12176 arena->Own(n);
12177 }
12178 return n;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012179}
12180
12181void UninterpretedOption::Clear() {
Jisi Liu885b6122015-02-28 14:51:22 -080012182#define ZR_HELPER_(f) reinterpret_cast<char*>(\
12183 &reinterpret_cast<UninterpretedOption*>(16)->f)
jieluo@google.com4de8f552014-07-18 00:47:59 +000012184
Jisi Liu885b6122015-02-28 14:51:22 -080012185#define ZR_(first, last) do {\
12186 ::memset(&first, 0,\
12187 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
12188} while (0)
jieluo@google.com4de8f552014-07-18 00:47:59 +000012189
Austin Schuhe8268372015-05-19 23:22:20 -070012190 if (_has_bits_[0 / 32] & 126u) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012191 ZR_(positive_int_value_, double_value_);
liujisi@google.com33165fe2010-11-02 13:14:58 +000012192 if (has_identifier_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012193 identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012194 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012195 if (has_string_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012196 string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012197 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012198 if (has_aggregate_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012199 aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000012200 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012201 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012202
Jisi Liu885b6122015-02-28 14:51:22 -080012203#undef ZR_HELPER_
jieluo@google.com4de8f552014-07-18 00:47:59 +000012204#undef ZR_
12205
kenton@google.com24bf56f2008-09-24 20:31:01 +000012206 name_.Clear();
12207 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080012208 if (_internal_metadata_.have_unknown_fields()) {
12209 mutable_unknown_fields()->Clear();
12210 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012211}
12212
12213bool UninterpretedOption::MergePartialFromCodedStream(
12214 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012215#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
kenton@google.com24bf56f2008-09-24 20:31:01 +000012216 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012217 // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption)
12218 for (;;) {
12219 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
12220 tag = p.first;
12221 if (!p.second) goto handle_unusual;
kenton@google.com80b1d622009-07-29 01:13:20 +000012222 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012223 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
12224 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012225 if (tag == 18) {
Bo Yang5db21732015-05-21 14:28:59 -070012226 DO_(input->IncrementRecursionDepth());
12227 parse_loop_name:
12228 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
kenton@google.comfccb1462009-12-18 02:11:36 +000012229 input, add_name()));
12230 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012231 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012232 }
Bo Yang5db21732015-05-21 14:28:59 -070012233 if (input->ExpectTag(18)) goto parse_loop_name;
12234 input->UnsafeDecrementRecursionDepth();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012235 if (input->ExpectTag(26)) goto parse_identifier_value;
12236 break;
12237 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012238
kenton@google.com24bf56f2008-09-24 20:31:01 +000012239 // optional string identifier_value = 3;
12240 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012241 if (tag == 26) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012242 parse_identifier_value:
12243 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
12244 input, this->mutable_identifier_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000012245 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.comfccb1462009-12-18 02:11:36 +000012246 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012247 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012248 "google.protobuf.UninterpretedOption.identifier_value");
kenton@google.comfccb1462009-12-18 02:11:36 +000012249 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012250 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012251 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012252 if (input->ExpectTag(32)) goto parse_positive_int_value;
12253 break;
12254 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012255
kenton@google.com24bf56f2008-09-24 20:31:01 +000012256 // optional uint64 positive_int_value = 4;
12257 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012258 if (tag == 32) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012259 parse_positive_int_value:
12260 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12261 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
12262 input, &positive_int_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012263 set_has_positive_int_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012264 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012265 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012266 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012267 if (input->ExpectTag(40)) goto parse_negative_int_value;
12268 break;
12269 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012270
kenton@google.com24bf56f2008-09-24 20:31:01 +000012271 // optional int64 negative_int_value = 5;
12272 case 5: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012273 if (tag == 40) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012274 parse_negative_int_value:
12275 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12276 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
12277 input, &negative_int_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012278 set_has_negative_int_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012279 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012280 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012281 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012282 if (input->ExpectTag(49)) goto parse_double_value;
12283 break;
12284 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012285
kenton@google.com24bf56f2008-09-24 20:31:01 +000012286 // optional double double_value = 6;
12287 case 6: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012288 if (tag == 49) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012289 parse_double_value:
12290 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
12291 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
12292 input, &double_value_)));
liujisi@google.com33165fe2010-11-02 13:14:58 +000012293 set_has_double_value();
kenton@google.comfccb1462009-12-18 02:11:36 +000012294 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012295 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012296 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012297 if (input->ExpectTag(58)) goto parse_string_value;
12298 break;
12299 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012300
kenton@google.com24bf56f2008-09-24 20:31:01 +000012301 // optional bytes string_value = 7;
12302 case 7: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012303 if (tag == 58) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012304 parse_string_value:
12305 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
12306 input, this->mutable_string_value()));
12307 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012308 goto handle_unusual;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012309 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012310 if (input->ExpectTag(66)) goto parse_aggregate_value;
12311 break;
12312 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012313
liujisi@google.com33165fe2010-11-02 13:14:58 +000012314 // optional string aggregate_value = 8;
12315 case 8: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012316 if (tag == 66) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012317 parse_aggregate_value:
12318 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
12319 input, this->mutable_aggregate_value()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000012320 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012321 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012322 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012323 "google.protobuf.UninterpretedOption.aggregate_value");
liujisi@google.com33165fe2010-11-02 13:14:58 +000012324 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012325 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012326 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012327 if (input->ExpectAtEnd()) goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012328 break;
12329 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012330
kenton@google.com24bf56f2008-09-24 20:31:01 +000012331 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012332 handle_unusual:
12333 if (tag == 0 ||
12334 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
kenton@google.com80b1d622009-07-29 01:13:20 +000012335 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012336 goto success;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012337 }
12338 DO_(::google::protobuf::internal::WireFormat::SkipField(
12339 input, tag, mutable_unknown_fields()));
12340 break;
12341 }
12342 }
12343 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012344success:
12345 // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012346 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000012347failure:
12348 // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption)
12349 return false;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012350#undef DO_
12351}
12352
kenton@google.comd37d46d2009-04-25 02:53:47 +000012353void UninterpretedOption::SerializeWithCachedSizes(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012354 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012355 // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption)
kenton@google.com24bf56f2008-09-24 20:31:01 +000012356 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Feng Xiaof157a562014-11-14 11:50:31 -080012357 for (unsigned int i = 0, n = this->name_size(); i < n; i++) {
kenton@google.comfccb1462009-12-18 02:11:36 +000012358 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
kenton@google.com80b1d622009-07-29 01:13:20 +000012359 2, this->name(i), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012360 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012361
kenton@google.com24bf56f2008-09-24 20:31:01 +000012362 // optional string identifier_value = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012363 if (has_identifier_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012364 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012365 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012366 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012367 "google.protobuf.UninterpretedOption.identifier_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +000012368 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000012369 3, this->identifier_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012370 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012371
kenton@google.com24bf56f2008-09-24 20:31:01 +000012372 // optional uint64 positive_int_value = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012373 if (has_positive_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012374 ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012375 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012376
kenton@google.com24bf56f2008-09-24 20:31:01 +000012377 // optional int64 negative_int_value = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012378 if (has_negative_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012379 ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012380 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012381
kenton@google.com24bf56f2008-09-24 20:31:01 +000012382 // optional double double_value = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012383 if (has_double_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012384 ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->double_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012385 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012386
kenton@google.com24bf56f2008-09-24 20:31:01 +000012387 // optional bytes string_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012388 if (has_string_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012389 ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
kenton@google.com80b1d622009-07-29 01:13:20 +000012390 7, this->string_value(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012391 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012392
liujisi@google.com33165fe2010-11-02 13:14:58 +000012393 // optional string aggregate_value = 8;
12394 if (has_aggregate_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012395 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012396 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012397 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012398 "google.protobuf.UninterpretedOption.aggregate_value");
jieluo@google.com4de8f552014-07-18 00:47:59 +000012399 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012400 8, this->aggregate_value(), output);
12401 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012402
Feng Xiao6ef984a2014-11-10 17:34:54 -080012403 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012404 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
12405 unknown_fields(), output);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012406 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012407 // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012408}
12409
12410::google::protobuf::uint8* UninterpretedOption::SerializeWithCachedSizesToArray(
12411 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012412 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012413 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Feng Xiaof157a562014-11-14 11:50:31 -080012414 for (unsigned int i = 0, n = this->name_size(); i < n; i++) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012415 target = ::google::protobuf::internal::WireFormatLite::
12416 WriteMessageNoVirtualToArray(
12417 2, this->name(i), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012418 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012419
kenton@google.comd37d46d2009-04-25 02:53:47 +000012420 // optional string identifier_value = 3;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012421 if (has_identifier_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012422 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
kenton@google.com80b1d622009-07-29 01:13:20 +000012423 this->identifier_value().data(), this->identifier_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012424 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012425 "google.protobuf.UninterpretedOption.identifier_value");
kenton@google.com80b1d622009-07-29 01:13:20 +000012426 target =
12427 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12428 3, this->identifier_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012429 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012430
kenton@google.comd37d46d2009-04-25 02:53:47 +000012431 // optional uint64 positive_int_value = 4;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012432 if (has_positive_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012433 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012434 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012435
kenton@google.comd37d46d2009-04-25 02:53:47 +000012436 // optional int64 negative_int_value = 5;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012437 if (has_negative_int_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012438 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012439 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012440
kenton@google.comd37d46d2009-04-25 02:53:47 +000012441 // optional double double_value = 6;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012442 if (has_double_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012443 target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012444 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012445
kenton@google.comd37d46d2009-04-25 02:53:47 +000012446 // optional bytes string_value = 7;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012447 if (has_string_value()) {
kenton@google.com80b1d622009-07-29 01:13:20 +000012448 target =
12449 ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
12450 7, this->string_value(), target);
kenton@google.comd37d46d2009-04-25 02:53:47 +000012451 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012452
liujisi@google.com33165fe2010-11-02 13:14:58 +000012453 // optional string aggregate_value = 8;
12454 if (has_aggregate_value()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012455 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
liujisi@google.com33165fe2010-11-02 13:14:58 +000012456 this->aggregate_value().data(), this->aggregate_value().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000012457 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080012458 "google.protobuf.UninterpretedOption.aggregate_value");
liujisi@google.com33165fe2010-11-02 13:14:58 +000012459 target =
12460 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12461 8, this->aggregate_value(), target);
12462 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012463
Feng Xiao6ef984a2014-11-10 17:34:54 -080012464 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.comd37d46d2009-04-25 02:53:47 +000012465 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
12466 unknown_fields(), target);
12467 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000012468 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption)
kenton@google.comd37d46d2009-04-25 02:53:47 +000012469 return target;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012470}
12471
12472int UninterpretedOption::ByteSize() const {
12473 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012474
Austin Schuh307af622015-06-05 22:46:01 -070012475 if (_has_bits_[1 / 32] & 126u) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012476 // optional string identifier_value = 3;
12477 if (has_identifier_value()) {
12478 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012479 ::google::protobuf::internal::WireFormatLite::StringSize(
12480 this->identifier_value());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012481 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012482
kenton@google.com24bf56f2008-09-24 20:31:01 +000012483 // optional uint64 positive_int_value = 4;
12484 if (has_positive_int_value()) {
12485 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012486 ::google::protobuf::internal::WireFormatLite::UInt64Size(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012487 this->positive_int_value());
12488 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012489
kenton@google.com24bf56f2008-09-24 20:31:01 +000012490 // optional int64 negative_int_value = 5;
12491 if (has_negative_int_value()) {
12492 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012493 ::google::protobuf::internal::WireFormatLite::Int64Size(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012494 this->negative_int_value());
12495 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012496
kenton@google.com24bf56f2008-09-24 20:31:01 +000012497 // optional double double_value = 6;
12498 if (has_double_value()) {
12499 total_size += 1 + 8;
12500 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012501
kenton@google.com24bf56f2008-09-24 20:31:01 +000012502 // optional bytes string_value = 7;
12503 if (has_string_value()) {
12504 total_size += 1 +
kenton@google.com80b1d622009-07-29 01:13:20 +000012505 ::google::protobuf::internal::WireFormatLite::BytesSize(
12506 this->string_value());
kenton@google.com24bf56f2008-09-24 20:31:01 +000012507 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012508
liujisi@google.com33165fe2010-11-02 13:14:58 +000012509 // optional string aggregate_value = 8;
12510 if (has_aggregate_value()) {
12511 total_size += 1 +
12512 ::google::protobuf::internal::WireFormatLite::StringSize(
12513 this->aggregate_value());
12514 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012515
kenton@google.com24bf56f2008-09-24 20:31:01 +000012516 }
12517 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
kenton@google.com2d6daa72009-01-22 01:27:00 +000012518 total_size += 1 * this->name_size();
12519 for (int i = 0; i < this->name_size(); i++) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012520 total_size +=
kenton@google.com80b1d622009-07-29 01:13:20 +000012521 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
kenton@google.com24bf56f2008-09-24 20:31:01 +000012522 this->name(i));
12523 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012524
Feng Xiao6ef984a2014-11-10 17:34:54 -080012525 if (_internal_metadata_.have_unknown_fields()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012526 total_size +=
12527 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
12528 unknown_fields());
12529 }
kenton@google.comfccb1462009-12-18 02:11:36 +000012530 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012531 _cached_size_ = total_size;
kenton@google.comfccb1462009-12-18 02:11:36 +000012532 GOOGLE_SAFE_CONCURRENT_WRITES_END();
kenton@google.com24bf56f2008-09-24 20:31:01 +000012533 return total_size;
12534}
12535
12536void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012537 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070012538 const UninterpretedOption* source =
12539 ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption>(
12540 &from);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012541 if (source == NULL) {
12542 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
12543 } else {
12544 MergeFrom(*source);
12545 }
12546}
12547
12548void UninterpretedOption::MergeFrom(const UninterpretedOption& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080012549 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012550 name_.MergeFrom(from.name_);
12551 if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012552 if (from.has_identifier_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012553 set_has_identifier_value();
12554 identifier_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.identifier_value_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012555 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012556 if (from.has_positive_int_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012557 set_positive_int_value(from.positive_int_value());
12558 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012559 if (from.has_negative_int_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012560 set_negative_int_value(from.negative_int_value());
12561 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012562 if (from.has_double_value()) {
kenton@google.com24bf56f2008-09-24 20:31:01 +000012563 set_double_value(from.double_value());
12564 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012565 if (from.has_string_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012566 set_has_string_value();
12567 string_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_value_);
kenton@google.com24bf56f2008-09-24 20:31:01 +000012568 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000012569 if (from.has_aggregate_value()) {
Feng Xiaof157a562014-11-14 11:50:31 -080012570 set_has_aggregate_value();
12571 aggregate_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.aggregate_value_);
liujisi@google.com33165fe2010-11-02 13:14:58 +000012572 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012573 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080012574 if (from._internal_metadata_.have_unknown_fields()) {
12575 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
12576 }
kenton@google.com24bf56f2008-09-24 20:31:01 +000012577}
12578
12579void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) {
12580 if (&from == this) return;
12581 Clear();
12582 MergeFrom(from);
12583}
12584
12585void UninterpretedOption::CopyFrom(const UninterpretedOption& from) {
12586 if (&from == this) return;
12587 Clear();
12588 MergeFrom(from);
12589}
12590
kenton@google.comceb561d2009-06-25 19:05:36 +000012591bool UninterpretedOption::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012592
jieluo@google.com4de8f552014-07-18 00:47:59 +000012593 if (!::google::protobuf::internal::AllAreInitialized(this->name())) return false;
kenton@google.comceb561d2009-06-25 19:05:36 +000012594 return true;
12595}
12596
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012597void UninterpretedOption::Swap(UninterpretedOption* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080012598 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012599 InternalSwap(other);
12600}
12601void UninterpretedOption::InternalSwap(UninterpretedOption* other) {
12602 name_.UnsafeArenaSwap(&other->name_);
12603 identifier_value_.Swap(&other->identifier_value_);
12604 std::swap(positive_int_value_, other->positive_int_value_);
12605 std::swap(negative_int_value_, other->negative_int_value_);
12606 std::swap(double_value_, other->double_value_);
12607 string_value_.Swap(&other->string_value_);
12608 aggregate_value_.Swap(&other->aggregate_value_);
12609 std::swap(_has_bits_[0], other->_has_bits_[0]);
12610 _internal_metadata_.Swap(&other->_internal_metadata_);
12611 std::swap(_cached_size_, other->_cached_size_);
12612}
kenton@google.com26bd9ee2008-11-21 00:06:27 +000012613
kenton@google.com80b1d622009-07-29 01:13:20 +000012614::google::protobuf::Metadata UninterpretedOption::GetMetadata() const {
12615 protobuf_AssignDescriptorsOnce();
12616 ::google::protobuf::Metadata metadata;
12617 metadata.descriptor = UninterpretedOption_descriptor_;
12618 metadata.reflection = UninterpretedOption_reflection_;
12619 return metadata;
kenton@google.com24bf56f2008-09-24 20:31:01 +000012620}
12621
Jisi Liu885b6122015-02-28 14:51:22 -080012622#if PROTOBUF_INLINE_NOT_IN_HEADERS
12623// UninterpretedOption_NamePart
12624
12625// required string name_part = 1;
Bo Yang5db21732015-05-21 14:28:59 -070012626bool UninterpretedOption_NamePart::has_name_part() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012627 return (_has_bits_[0] & 0x00000001u) != 0;
12628}
Bo Yang5db21732015-05-21 14:28:59 -070012629void UninterpretedOption_NamePart::set_has_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012630 _has_bits_[0] |= 0x00000001u;
12631}
Bo Yang5db21732015-05-21 14:28:59 -070012632void UninterpretedOption_NamePart::clear_has_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012633 _has_bits_[0] &= ~0x00000001u;
12634}
Bo Yang5db21732015-05-21 14:28:59 -070012635void UninterpretedOption_NamePart::clear_name_part() {
Jisi Liu885b6122015-02-28 14:51:22 -080012636 name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12637 clear_has_name_part();
12638}
12639 const ::std::string& UninterpretedOption_NamePart::name_part() const {
12640 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part)
12641 return name_part_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12642}
12643 void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) {
12644 set_has_name_part();
12645 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12646 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part)
12647}
12648 void UninterpretedOption_NamePart::set_name_part(const char* value) {
12649 set_has_name_part();
12650 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12651 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.NamePart.name_part)
12652}
12653 void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) {
12654 set_has_name_part();
12655 name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
12656 ::std::string(reinterpret_cast<const char*>(value), size));
12657 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part)
12658}
12659 ::std::string* UninterpretedOption_NamePart::mutable_name_part() {
12660 set_has_name_part();
12661 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part)
12662 return name_part_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12663}
12664 ::std::string* UninterpretedOption_NamePart::release_name_part() {
12665 clear_has_name_part();
12666 return name_part_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12667}
12668 void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) {
12669 if (name_part != NULL) {
12670 set_has_name_part();
12671 } else {
12672 clear_has_name_part();
12673 }
12674 name_part_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_part);
12675 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part)
12676}
12677
12678// required bool is_extension = 2;
Bo Yang5db21732015-05-21 14:28:59 -070012679bool UninterpretedOption_NamePart::has_is_extension() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012680 return (_has_bits_[0] & 0x00000002u) != 0;
12681}
Bo Yang5db21732015-05-21 14:28:59 -070012682void UninterpretedOption_NamePart::set_has_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012683 _has_bits_[0] |= 0x00000002u;
12684}
Bo Yang5db21732015-05-21 14:28:59 -070012685void UninterpretedOption_NamePart::clear_has_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012686 _has_bits_[0] &= ~0x00000002u;
12687}
Bo Yang5db21732015-05-21 14:28:59 -070012688void UninterpretedOption_NamePart::clear_is_extension() {
Jisi Liu885b6122015-02-28 14:51:22 -080012689 is_extension_ = false;
12690 clear_has_is_extension();
12691}
12692 bool UninterpretedOption_NamePart::is_extension() const {
12693 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.is_extension)
12694 return is_extension_;
12695}
12696 void UninterpretedOption_NamePart::set_is_extension(bool value) {
12697 set_has_is_extension();
12698 is_extension_ = value;
12699 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.is_extension)
12700}
12701
12702// -------------------------------------------------------------------
12703
12704// UninterpretedOption
12705
12706// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
Bo Yang5db21732015-05-21 14:28:59 -070012707int UninterpretedOption::name_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012708 return name_.size();
12709}
Bo Yang5db21732015-05-21 14:28:59 -070012710void UninterpretedOption::clear_name() {
Jisi Liu885b6122015-02-28 14:51:22 -080012711 name_.Clear();
12712}
12713 const ::google::protobuf::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const {
12714 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.name)
12715 return name_.Get(index);
12716}
12717 ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) {
12718 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.name)
12719 return name_.Mutable(index);
12720}
12721 ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::add_name() {
12722 // @@protoc_insertion_point(field_add:google.protobuf.UninterpretedOption.name)
12723 return name_.Add();
12724}
12725 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >&
12726UninterpretedOption::name() const {
12727 // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name)
12728 return name_;
12729}
12730 ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >*
12731UninterpretedOption::mutable_name() {
12732 // @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name)
12733 return &name_;
12734}
12735
12736// optional string identifier_value = 3;
Bo Yang5db21732015-05-21 14:28:59 -070012737bool UninterpretedOption::has_identifier_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012738 return (_has_bits_[0] & 0x00000002u) != 0;
12739}
Bo Yang5db21732015-05-21 14:28:59 -070012740void UninterpretedOption::set_has_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012741 _has_bits_[0] |= 0x00000002u;
12742}
Bo Yang5db21732015-05-21 14:28:59 -070012743void UninterpretedOption::clear_has_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012744 _has_bits_[0] &= ~0x00000002u;
12745}
Bo Yang5db21732015-05-21 14:28:59 -070012746void UninterpretedOption::clear_identifier_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012747 identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12748 clear_has_identifier_value();
12749}
12750 const ::std::string& UninterpretedOption::identifier_value() const {
12751 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value)
12752 return identifier_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12753}
12754 void UninterpretedOption::set_identifier_value(const ::std::string& value) {
12755 set_has_identifier_value();
12756 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12757 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value)
12758}
12759 void UninterpretedOption::set_identifier_value(const char* value) {
12760 set_has_identifier_value();
12761 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12762 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value)
12763}
12764 void UninterpretedOption::set_identifier_value(const char* value, size_t size) {
12765 set_has_identifier_value();
12766 identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
12767 ::std::string(reinterpret_cast<const char*>(value), size));
12768 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value)
12769}
12770 ::std::string* UninterpretedOption::mutable_identifier_value() {
12771 set_has_identifier_value();
12772 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value)
12773 return identifier_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12774}
12775 ::std::string* UninterpretedOption::release_identifier_value() {
12776 clear_has_identifier_value();
12777 return identifier_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12778}
12779 void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) {
12780 if (identifier_value != NULL) {
12781 set_has_identifier_value();
12782 } else {
12783 clear_has_identifier_value();
12784 }
12785 identifier_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), identifier_value);
12786 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value)
12787}
12788
12789// optional uint64 positive_int_value = 4;
Bo Yang5db21732015-05-21 14:28:59 -070012790bool UninterpretedOption::has_positive_int_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012791 return (_has_bits_[0] & 0x00000004u) != 0;
12792}
Bo Yang5db21732015-05-21 14:28:59 -070012793void UninterpretedOption::set_has_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012794 _has_bits_[0] |= 0x00000004u;
12795}
Bo Yang5db21732015-05-21 14:28:59 -070012796void UninterpretedOption::clear_has_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012797 _has_bits_[0] &= ~0x00000004u;
12798}
Bo Yang5db21732015-05-21 14:28:59 -070012799void UninterpretedOption::clear_positive_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012800 positive_int_value_ = GOOGLE_ULONGLONG(0);
12801 clear_has_positive_int_value();
12802}
12803 ::google::protobuf::uint64 UninterpretedOption::positive_int_value() const {
12804 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value)
12805 return positive_int_value_;
12806}
12807 void UninterpretedOption::set_positive_int_value(::google::protobuf::uint64 value) {
12808 set_has_positive_int_value();
12809 positive_int_value_ = value;
12810 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value)
12811}
12812
12813// optional int64 negative_int_value = 5;
Bo Yang5db21732015-05-21 14:28:59 -070012814bool UninterpretedOption::has_negative_int_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012815 return (_has_bits_[0] & 0x00000008u) != 0;
12816}
Bo Yang5db21732015-05-21 14:28:59 -070012817void UninterpretedOption::set_has_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012818 _has_bits_[0] |= 0x00000008u;
12819}
Bo Yang5db21732015-05-21 14:28:59 -070012820void UninterpretedOption::clear_has_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012821 _has_bits_[0] &= ~0x00000008u;
12822}
Bo Yang5db21732015-05-21 14:28:59 -070012823void UninterpretedOption::clear_negative_int_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012824 negative_int_value_ = GOOGLE_LONGLONG(0);
12825 clear_has_negative_int_value();
12826}
12827 ::google::protobuf::int64 UninterpretedOption::negative_int_value() const {
12828 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value)
12829 return negative_int_value_;
12830}
12831 void UninterpretedOption::set_negative_int_value(::google::protobuf::int64 value) {
12832 set_has_negative_int_value();
12833 negative_int_value_ = value;
12834 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value)
12835}
12836
12837// optional double double_value = 6;
Bo Yang5db21732015-05-21 14:28:59 -070012838bool UninterpretedOption::has_double_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012839 return (_has_bits_[0] & 0x00000010u) != 0;
12840}
Bo Yang5db21732015-05-21 14:28:59 -070012841void UninterpretedOption::set_has_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012842 _has_bits_[0] |= 0x00000010u;
12843}
Bo Yang5db21732015-05-21 14:28:59 -070012844void UninterpretedOption::clear_has_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012845 _has_bits_[0] &= ~0x00000010u;
12846}
Bo Yang5db21732015-05-21 14:28:59 -070012847void UninterpretedOption::clear_double_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012848 double_value_ = 0;
12849 clear_has_double_value();
12850}
12851 double UninterpretedOption::double_value() const {
12852 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.double_value)
12853 return double_value_;
12854}
12855 void UninterpretedOption::set_double_value(double value) {
12856 set_has_double_value();
12857 double_value_ = value;
12858 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.double_value)
12859}
12860
12861// optional bytes string_value = 7;
Bo Yang5db21732015-05-21 14:28:59 -070012862bool UninterpretedOption::has_string_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012863 return (_has_bits_[0] & 0x00000020u) != 0;
12864}
Bo Yang5db21732015-05-21 14:28:59 -070012865void UninterpretedOption::set_has_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012866 _has_bits_[0] |= 0x00000020u;
12867}
Bo Yang5db21732015-05-21 14:28:59 -070012868void UninterpretedOption::clear_has_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012869 _has_bits_[0] &= ~0x00000020u;
12870}
Bo Yang5db21732015-05-21 14:28:59 -070012871void UninterpretedOption::clear_string_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012872 string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12873 clear_has_string_value();
12874}
12875 const ::std::string& UninterpretedOption::string_value() const {
12876 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value)
12877 return string_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12878}
12879 void UninterpretedOption::set_string_value(const ::std::string& value) {
12880 set_has_string_value();
12881 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12882 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value)
12883}
12884 void UninterpretedOption::set_string_value(const char* value) {
12885 set_has_string_value();
12886 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12887 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value)
12888}
12889 void UninterpretedOption::set_string_value(const void* value, size_t size) {
12890 set_has_string_value();
12891 string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
12892 ::std::string(reinterpret_cast<const char*>(value), size));
12893 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value)
12894}
12895 ::std::string* UninterpretedOption::mutable_string_value() {
12896 set_has_string_value();
12897 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value)
12898 return string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12899}
12900 ::std::string* UninterpretedOption::release_string_value() {
12901 clear_has_string_value();
12902 return string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12903}
12904 void UninterpretedOption::set_allocated_string_value(::std::string* string_value) {
12905 if (string_value != NULL) {
12906 set_has_string_value();
12907 } else {
12908 clear_has_string_value();
12909 }
12910 string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value);
12911 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value)
12912}
12913
12914// optional string aggregate_value = 8;
Bo Yang5db21732015-05-21 14:28:59 -070012915bool UninterpretedOption::has_aggregate_value() const {
Jisi Liu885b6122015-02-28 14:51:22 -080012916 return (_has_bits_[0] & 0x00000040u) != 0;
12917}
Bo Yang5db21732015-05-21 14:28:59 -070012918void UninterpretedOption::set_has_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012919 _has_bits_[0] |= 0x00000040u;
12920}
Bo Yang5db21732015-05-21 14:28:59 -070012921void UninterpretedOption::clear_has_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012922 _has_bits_[0] &= ~0x00000040u;
12923}
Bo Yang5db21732015-05-21 14:28:59 -070012924void UninterpretedOption::clear_aggregate_value() {
Jisi Liu885b6122015-02-28 14:51:22 -080012925 aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12926 clear_has_aggregate_value();
12927}
12928 const ::std::string& UninterpretedOption::aggregate_value() const {
12929 // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value)
12930 return aggregate_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12931}
12932 void UninterpretedOption::set_aggregate_value(const ::std::string& value) {
12933 set_has_aggregate_value();
12934 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
12935 // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value)
12936}
12937 void UninterpretedOption::set_aggregate_value(const char* value) {
12938 set_has_aggregate_value();
12939 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
12940 // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value)
12941}
12942 void UninterpretedOption::set_aggregate_value(const char* value, size_t size) {
12943 set_has_aggregate_value();
12944 aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
12945 ::std::string(reinterpret_cast<const char*>(value), size));
12946 // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value)
12947}
12948 ::std::string* UninterpretedOption::mutable_aggregate_value() {
12949 set_has_aggregate_value();
12950 // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value)
12951 return aggregate_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12952}
12953 ::std::string* UninterpretedOption::release_aggregate_value() {
12954 clear_has_aggregate_value();
12955 return aggregate_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
12956}
12957 void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) {
12958 if (aggregate_value != NULL) {
12959 set_has_aggregate_value();
12960 } else {
12961 clear_has_aggregate_value();
12962 }
12963 aggregate_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), aggregate_value);
12964 // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value)
12965}
12966
12967#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
kenton@google.com24bf56f2008-09-24 20:31:01 +000012968
liujisi@google.com33165fe2010-11-02 13:14:58 +000012969// ===================================================================
12970
12971#ifndef _MSC_VER
12972const int SourceCodeInfo_Location::kPathFieldNumber;
12973const int SourceCodeInfo_Location::kSpanFieldNumber;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000012974const int SourceCodeInfo_Location::kLeadingCommentsFieldNumber;
12975const int SourceCodeInfo_Location::kTrailingCommentsFieldNumber;
Jisi Liu885b6122015-02-28 14:51:22 -080012976const int SourceCodeInfo_Location::kLeadingDetachedCommentsFieldNumber;
liujisi@google.com33165fe2010-11-02 13:14:58 +000012977#endif // !_MSC_VER
12978
12979SourceCodeInfo_Location::SourceCodeInfo_Location()
Bo Yang5db21732015-05-21 14:28:59 -070012980 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012981 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000012982 // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000012983}
12984
12985void SourceCodeInfo_Location::InitAsDefaultInstance() {
12986}
12987
12988SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080012989 : ::google::protobuf::Message(),
12990 _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000012991 SharedCtor();
12992 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000012993 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000012994}
12995
12996void SourceCodeInfo_Location::SharedCtor() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000012997 ::google::protobuf::internal::GetEmptyString();
liujisi@google.com33165fe2010-11-02 13:14:58 +000012998 _cached_size_ = 0;
Feng Xiao6ef984a2014-11-10 17:34:54 -080012999 leading_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13000 trailing_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000013001 ::memset(_has_bits_, 0, sizeof(_has_bits_));
13002}
13003
13004SourceCodeInfo_Location::~SourceCodeInfo_Location() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013005 // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013006 SharedDtor();
13007}
13008
13009void SourceCodeInfo_Location::SharedDtor() {
Feng Xiaof157a562014-11-14 11:50:31 -080013010 leading_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13011 trailing_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
liujisi@google.com33165fe2010-11-02 13:14:58 +000013012 if (this != default_instance_) {
13013 }
13014}
13015
13016void SourceCodeInfo_Location::SetCachedSize(int size) const {
13017 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13018 _cached_size_ = size;
13019 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13020}
13021const ::google::protobuf::Descriptor* SourceCodeInfo_Location::descriptor() {
13022 protobuf_AssignDescriptorsOnce();
13023 return SourceCodeInfo_Location_descriptor_;
13024}
13025
13026const SourceCodeInfo_Location& SourceCodeInfo_Location::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000013027 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
13028 return *default_instance_;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013029}
13030
13031SourceCodeInfo_Location* SourceCodeInfo_Location::default_instance_ = NULL;
13032
Feng Xiao6ef984a2014-11-10 17:34:54 -080013033SourceCodeInfo_Location* SourceCodeInfo_Location::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080013034 SourceCodeInfo_Location* n = new SourceCodeInfo_Location;
13035 if (arena != NULL) {
13036 arena->Own(n);
13037 }
13038 return n;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013039}
13040
13041void SourceCodeInfo_Location::Clear() {
Austin Schuhe8268372015-05-19 23:22:20 -070013042 if (_has_bits_[0 / 32] & 12u) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013043 if (has_leading_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013044 leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013045 }
13046 if (has_trailing_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013047 trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013048 }
13049 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013050 path_.Clear();
13051 span_.Clear();
Jisi Liu885b6122015-02-28 14:51:22 -080013052 leading_detached_comments_.Clear();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013053 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080013054 if (_internal_metadata_.have_unknown_fields()) {
13055 mutable_unknown_fields()->Clear();
13056 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013057}
13058
13059bool SourceCodeInfo_Location::MergePartialFromCodedStream(
13060 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013061#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
liujisi@google.com33165fe2010-11-02 13:14:58 +000013062 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013063 // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo.Location)
13064 for (;;) {
13065 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
13066 tag = p.first;
13067 if (!p.second) goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013068 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
13069 // repeated int32 path = 1 [packed = true];
13070 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013071 if (tag == 10) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013072 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
13073 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13074 input, this->mutable_path())));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013075 } else if (tag == 8) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013076 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
13077 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13078 1, 10, input, this->mutable_path())));
13079 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013080 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013081 }
13082 if (input->ExpectTag(18)) goto parse_span;
13083 break;
13084 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013085
liujisi@google.com33165fe2010-11-02 13:14:58 +000013086 // repeated int32 span = 2 [packed = true];
13087 case 2: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013088 if (tag == 18) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013089 parse_span:
13090 DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
13091 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13092 input, this->mutable_span())));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013093 } else if (tag == 16) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013094 DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
13095 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
13096 1, 18, input, this->mutable_span())));
13097 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013098 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013099 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013100 if (input->ExpectTag(26)) goto parse_leading_comments;
13101 break;
13102 }
13103
13104 // optional string leading_comments = 3;
13105 case 3: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013106 if (tag == 26) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013107 parse_leading_comments:
13108 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13109 input, this->mutable_leading_comments()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013110 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013111 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013112 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013113 "google.protobuf.SourceCodeInfo.Location.leading_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013114 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013115 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013116 }
13117 if (input->ExpectTag(34)) goto parse_trailing_comments;
13118 break;
13119 }
13120
13121 // optional string trailing_comments = 4;
13122 case 4: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013123 if (tag == 34) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013124 parse_trailing_comments:
13125 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13126 input, this->mutable_trailing_comments()));
jieluo@google.com4de8f552014-07-18 00:47:59 +000013127 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013128 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013129 ::google::protobuf::internal::WireFormat::PARSE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013130 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013131 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013132 goto handle_unusual;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013133 }
Jisi Liu885b6122015-02-28 14:51:22 -080013134 if (input->ExpectTag(50)) goto parse_leading_detached_comments;
13135 break;
13136 }
13137
13138 // repeated string leading_detached_comments = 6;
13139 case 6: {
13140 if (tag == 50) {
13141 parse_leading_detached_comments:
13142 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
13143 input, this->add_leading_detached_comments()));
13144 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13145 this->leading_detached_comments(this->leading_detached_comments_size() - 1).data(),
13146 this->leading_detached_comments(this->leading_detached_comments_size() - 1).length(),
13147 ::google::protobuf::internal::WireFormat::PARSE,
13148 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
13149 } else {
13150 goto handle_unusual;
13151 }
13152 if (input->ExpectTag(50)) goto parse_leading_detached_comments;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013153 if (input->ExpectAtEnd()) goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013154 break;
13155 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013156
liujisi@google.com33165fe2010-11-02 13:14:58 +000013157 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013158 handle_unusual:
13159 if (tag == 0 ||
13160 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
liujisi@google.com33165fe2010-11-02 13:14:58 +000013161 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013162 goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013163 }
13164 DO_(::google::protobuf::internal::WireFormat::SkipField(
13165 input, tag, mutable_unknown_fields()));
13166 break;
13167 }
13168 }
13169 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013170success:
13171 // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013172 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013173failure:
13174 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo.Location)
13175 return false;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013176#undef DO_
13177}
13178
13179void SourceCodeInfo_Location::SerializeWithCachedSizes(
13180 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013181 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013182 // repeated int32 path = 1 [packed = true];
13183 if (this->path_size() > 0) {
13184 ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
13185 output->WriteVarint32(_path_cached_byte_size_);
13186 }
13187 for (int i = 0; i < this->path_size(); i++) {
13188 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
13189 this->path(i), output);
13190 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013191
liujisi@google.com33165fe2010-11-02 13:14:58 +000013192 // repeated int32 span = 2 [packed = true];
13193 if (this->span_size() > 0) {
13194 ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
13195 output->WriteVarint32(_span_cached_byte_size_);
13196 }
13197 for (int i = 0; i < this->span_size(); i++) {
13198 ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
13199 this->span(i), output);
13200 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013201
13202 // optional string leading_comments = 3;
13203 if (has_leading_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013204 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013205 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013206 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013207 "google.protobuf.SourceCodeInfo.Location.leading_comments");
jieluo@google.com4de8f552014-07-18 00:47:59 +000013208 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013209 3, this->leading_comments(), output);
13210 }
13211
13212 // optional string trailing_comments = 4;
13213 if (has_trailing_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013214 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013215 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013216 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013217 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
jieluo@google.com4de8f552014-07-18 00:47:59 +000013218 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013219 4, this->trailing_comments(), output);
13220 }
13221
Jisi Liu885b6122015-02-28 14:51:22 -080013222 // repeated string leading_detached_comments = 6;
13223 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
13224 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13225 this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(),
13226 ::google::protobuf::internal::WireFormat::SERIALIZE,
13227 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
13228 ::google::protobuf::internal::WireFormatLite::WriteString(
13229 6, this->leading_detached_comments(i), output);
13230 }
13231
Feng Xiao6ef984a2014-11-10 17:34:54 -080013232 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013233 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
13234 unknown_fields(), output);
13235 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013236 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013237}
13238
13239::google::protobuf::uint8* SourceCodeInfo_Location::SerializeWithCachedSizesToArray(
13240 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013241 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013242 // repeated int32 path = 1 [packed = true];
13243 if (this->path_size() > 0) {
13244 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
13245 1,
13246 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
13247 target);
13248 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
13249 _path_cached_byte_size_, target);
13250 }
13251 for (int i = 0; i < this->path_size(); i++) {
13252 target = ::google::protobuf::internal::WireFormatLite::
13253 WriteInt32NoTagToArray(this->path(i), target);
13254 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013255
liujisi@google.com33165fe2010-11-02 13:14:58 +000013256 // repeated int32 span = 2 [packed = true];
13257 if (this->span_size() > 0) {
13258 target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
13259 2,
13260 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
13261 target);
13262 target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
13263 _span_cached_byte_size_, target);
13264 }
13265 for (int i = 0; i < this->span_size(); i++) {
13266 target = ::google::protobuf::internal::WireFormatLite::
13267 WriteInt32NoTagToArray(this->span(i), target);
13268 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013269
13270 // optional string leading_comments = 3;
13271 if (has_leading_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013272 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013273 this->leading_comments().data(), this->leading_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013274 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013275 "google.protobuf.SourceCodeInfo.Location.leading_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013276 target =
13277 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
13278 3, this->leading_comments(), target);
13279 }
13280
13281 // optional string trailing_comments = 4;
13282 if (has_trailing_comments()) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013283 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013284 this->trailing_comments().data(), this->trailing_comments().length(),
jieluo@google.com4de8f552014-07-18 00:47:59 +000013285 ::google::protobuf::internal::WireFormat::SERIALIZE,
Feng Xiao6ef984a2014-11-10 17:34:54 -080013286 "google.protobuf.SourceCodeInfo.Location.trailing_comments");
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013287 target =
13288 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
13289 4, this->trailing_comments(), target);
13290 }
13291
Jisi Liu885b6122015-02-28 14:51:22 -080013292 // repeated string leading_detached_comments = 6;
13293 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
13294 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
13295 this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(),
13296 ::google::protobuf::internal::WireFormat::SERIALIZE,
13297 "google.protobuf.SourceCodeInfo.Location.leading_detached_comments");
13298 target = ::google::protobuf::internal::WireFormatLite::
13299 WriteStringToArray(6, this->leading_detached_comments(i), target);
13300 }
13301
Feng Xiao6ef984a2014-11-10 17:34:54 -080013302 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013303 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
13304 unknown_fields(), target);
13305 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013306 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013307 return target;
13308}
13309
13310int SourceCodeInfo_Location::ByteSize() const {
13311 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013312
Austin Schuh307af622015-06-05 22:46:01 -070013313 if (_has_bits_[2 / 32] & 12u) {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013314 // optional string leading_comments = 3;
13315 if (has_leading_comments()) {
13316 total_size += 1 +
13317 ::google::protobuf::internal::WireFormatLite::StringSize(
13318 this->leading_comments());
13319 }
13320
13321 // optional string trailing_comments = 4;
13322 if (has_trailing_comments()) {
13323 total_size += 1 +
13324 ::google::protobuf::internal::WireFormatLite::StringSize(
13325 this->trailing_comments());
13326 }
13327
13328 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013329 // repeated int32 path = 1 [packed = true];
13330 {
13331 int data_size = 0;
13332 for (int i = 0; i < this->path_size(); i++) {
13333 data_size += ::google::protobuf::internal::WireFormatLite::
13334 Int32Size(this->path(i));
13335 }
13336 if (data_size > 0) {
13337 total_size += 1 +
13338 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
13339 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013340 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013341 _path_cached_byte_size_ = data_size;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013342 GOOGLE_SAFE_CONCURRENT_WRITES_END();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013343 total_size += data_size;
13344 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013345
liujisi@google.com33165fe2010-11-02 13:14:58 +000013346 // repeated int32 span = 2 [packed = true];
13347 {
13348 int data_size = 0;
13349 for (int i = 0; i < this->span_size(); i++) {
13350 data_size += ::google::protobuf::internal::WireFormatLite::
13351 Int32Size(this->span(i));
13352 }
13353 if (data_size > 0) {
13354 total_size += 1 +
13355 ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
13356 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013357 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013358 _span_cached_byte_size_ = data_size;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013359 GOOGLE_SAFE_CONCURRENT_WRITES_END();
liujisi@google.com33165fe2010-11-02 13:14:58 +000013360 total_size += data_size;
13361 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013362
Jisi Liu885b6122015-02-28 14:51:22 -080013363 // repeated string leading_detached_comments = 6;
13364 total_size += 1 * this->leading_detached_comments_size();
13365 for (int i = 0; i < this->leading_detached_comments_size(); i++) {
13366 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
13367 this->leading_detached_comments(i));
13368 }
13369
Feng Xiao6ef984a2014-11-10 17:34:54 -080013370 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013371 total_size +=
13372 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
13373 unknown_fields());
13374 }
13375 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13376 _cached_size_ = total_size;
13377 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13378 return total_size;
13379}
13380
13381void SourceCodeInfo_Location::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013382 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070013383 const SourceCodeInfo_Location* source =
13384 ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo_Location>(
13385 &from);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013386 if (source == NULL) {
13387 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
13388 } else {
13389 MergeFrom(*source);
13390 }
13391}
13392
13393void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013394 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013395 path_.MergeFrom(from.path_);
13396 span_.MergeFrom(from.span_);
Jisi Liu885b6122015-02-28 14:51:22 -080013397 leading_detached_comments_.MergeFrom(from.leading_detached_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013398 if (from._has_bits_[2 / 32] & (0xffu << (2 % 32))) {
13399 if (from.has_leading_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013400 set_has_leading_comments();
13401 leading_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.leading_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013402 }
13403 if (from.has_trailing_comments()) {
Feng Xiaof157a562014-11-14 11:50:31 -080013404 set_has_trailing_comments();
13405 trailing_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.trailing_comments_);
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013406 }
13407 }
Feng Xiao6ef984a2014-11-10 17:34:54 -080013408 if (from._internal_metadata_.have_unknown_fields()) {
13409 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
13410 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013411}
13412
13413void SourceCodeInfo_Location::CopyFrom(const ::google::protobuf::Message& from) {
13414 if (&from == this) return;
13415 Clear();
13416 MergeFrom(from);
13417}
13418
13419void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) {
13420 if (&from == this) return;
13421 Clear();
13422 MergeFrom(from);
13423}
13424
13425bool SourceCodeInfo_Location::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013426
liujisi@google.com33165fe2010-11-02 13:14:58 +000013427 return true;
13428}
13429
13430void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080013431 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080013432 InternalSwap(other);
13433}
13434void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) {
13435 path_.UnsafeArenaSwap(&other->path_);
13436 span_.UnsafeArenaSwap(&other->span_);
13437 leading_comments_.Swap(&other->leading_comments_);
13438 trailing_comments_.Swap(&other->trailing_comments_);
Jisi Liu885b6122015-02-28 14:51:22 -080013439 leading_detached_comments_.UnsafeArenaSwap(&other->leading_detached_comments_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080013440 std::swap(_has_bits_[0], other->_has_bits_[0]);
13441 _internal_metadata_.Swap(&other->_internal_metadata_);
13442 std::swap(_cached_size_, other->_cached_size_);
13443}
liujisi@google.com33165fe2010-11-02 13:14:58 +000013444
13445::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const {
13446 protobuf_AssignDescriptorsOnce();
13447 ::google::protobuf::Metadata metadata;
13448 metadata.descriptor = SourceCodeInfo_Location_descriptor_;
13449 metadata.reflection = SourceCodeInfo_Location_reflection_;
13450 return metadata;
13451}
13452
13453
13454// -------------------------------------------------------------------
13455
13456#ifndef _MSC_VER
13457const int SourceCodeInfo::kLocationFieldNumber;
13458#endif // !_MSC_VER
13459
13460SourceCodeInfo::SourceCodeInfo()
Bo Yang5db21732015-05-21 14:28:59 -070013461 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013462 SharedCtor();
jieluo@google.com4de8f552014-07-18 00:47:59 +000013463 // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013464}
13465
13466void SourceCodeInfo::InitAsDefaultInstance() {
13467}
13468
13469SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from)
Feng Xiao6ef984a2014-11-10 17:34:54 -080013470 : ::google::protobuf::Message(),
13471 _internal_metadata_(NULL) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013472 SharedCtor();
13473 MergeFrom(from);
jieluo@google.com4de8f552014-07-18 00:47:59 +000013474 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013475}
13476
13477void SourceCodeInfo::SharedCtor() {
13478 _cached_size_ = 0;
13479 ::memset(_has_bits_, 0, sizeof(_has_bits_));
13480}
13481
13482SourceCodeInfo::~SourceCodeInfo() {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013483 // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013484 SharedDtor();
13485}
13486
13487void SourceCodeInfo::SharedDtor() {
13488 if (this != default_instance_) {
13489 }
13490}
13491
13492void SourceCodeInfo::SetCachedSize(int size) const {
13493 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13494 _cached_size_ = size;
13495 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13496}
13497const ::google::protobuf::Descriptor* SourceCodeInfo::descriptor() {
13498 protobuf_AssignDescriptorsOnce();
13499 return SourceCodeInfo_descriptor_;
13500}
13501
13502const SourceCodeInfo& SourceCodeInfo::default_instance() {
pliard@google.com6103d4e2012-05-04 11:16:09 +000013503 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
13504 return *default_instance_;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013505}
13506
13507SourceCodeInfo* SourceCodeInfo::default_instance_ = NULL;
13508
Feng Xiao6ef984a2014-11-10 17:34:54 -080013509SourceCodeInfo* SourceCodeInfo::New(::google::protobuf::Arena* arena) const {
Feng Xiaof157a562014-11-14 11:50:31 -080013510 SourceCodeInfo* n = new SourceCodeInfo;
13511 if (arena != NULL) {
13512 arena->Own(n);
13513 }
13514 return n;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013515}
13516
13517void SourceCodeInfo::Clear() {
13518 location_.Clear();
13519 ::memset(_has_bits_, 0, sizeof(_has_bits_));
Feng Xiao6ef984a2014-11-10 17:34:54 -080013520 if (_internal_metadata_.have_unknown_fields()) {
13521 mutable_unknown_fields()->Clear();
13522 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013523}
13524
13525bool SourceCodeInfo::MergePartialFromCodedStream(
13526 ::google::protobuf::io::CodedInputStream* input) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013527#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
liujisi@google.com33165fe2010-11-02 13:14:58 +000013528 ::google::protobuf::uint32 tag;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013529 // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo)
13530 for (;;) {
13531 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
13532 tag = p.first;
13533 if (!p.second) goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013534 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
13535 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
13536 case 1: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013537 if (tag == 10) {
Bo Yang5db21732015-05-21 14:28:59 -070013538 DO_(input->IncrementRecursionDepth());
13539 parse_loop_location:
13540 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
liujisi@google.com33165fe2010-11-02 13:14:58 +000013541 input, add_location()));
13542 } else {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013543 goto handle_unusual;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013544 }
Bo Yang5db21732015-05-21 14:28:59 -070013545 if (input->ExpectTag(10)) goto parse_loop_location;
13546 input->UnsafeDecrementRecursionDepth();
jieluo@google.com4de8f552014-07-18 00:47:59 +000013547 if (input->ExpectAtEnd()) goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013548 break;
13549 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013550
liujisi@google.com33165fe2010-11-02 13:14:58 +000013551 default: {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013552 handle_unusual:
13553 if (tag == 0 ||
13554 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
liujisi@google.com33165fe2010-11-02 13:14:58 +000013555 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013556 goto success;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013557 }
13558 DO_(::google::protobuf::internal::WireFormat::SkipField(
13559 input, tag, mutable_unknown_fields()));
13560 break;
13561 }
13562 }
13563 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013564success:
13565 // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013566 return true;
jieluo@google.com4de8f552014-07-18 00:47:59 +000013567failure:
13568 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo)
13569 return false;
liujisi@google.com33165fe2010-11-02 13:14:58 +000013570#undef DO_
13571}
13572
13573void SourceCodeInfo::SerializeWithCachedSizes(
13574 ::google::protobuf::io::CodedOutputStream* output) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013575 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013576 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Feng Xiaof157a562014-11-14 11:50:31 -080013577 for (unsigned int i = 0, n = this->location_size(); i < n; i++) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013578 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
13579 1, this->location(i), output);
13580 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013581
Feng Xiao6ef984a2014-11-10 17:34:54 -080013582 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013583 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
13584 unknown_fields(), output);
13585 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013586 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013587}
13588
13589::google::protobuf::uint8* SourceCodeInfo::SerializeWithCachedSizesToArray(
13590 ::google::protobuf::uint8* target) const {
jieluo@google.com4de8f552014-07-18 00:47:59 +000013591 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013592 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Feng Xiaof157a562014-11-14 11:50:31 -080013593 for (unsigned int i = 0, n = this->location_size(); i < n; i++) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013594 target = ::google::protobuf::internal::WireFormatLite::
13595 WriteMessageNoVirtualToArray(
13596 1, this->location(i), target);
13597 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013598
Feng Xiao6ef984a2014-11-10 17:34:54 -080013599 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013600 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
13601 unknown_fields(), target);
13602 }
jieluo@google.com4de8f552014-07-18 00:47:59 +000013603 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo)
liujisi@google.com33165fe2010-11-02 13:14:58 +000013604 return target;
13605}
13606
13607int SourceCodeInfo::ByteSize() const {
13608 int total_size = 0;
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013609
liujisi@google.com33165fe2010-11-02 13:14:58 +000013610 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
13611 total_size += 1 * this->location_size();
13612 for (int i = 0; i < this->location_size(); i++) {
13613 total_size +=
13614 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
13615 this->location(i));
13616 }
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013617
Feng Xiao6ef984a2014-11-10 17:34:54 -080013618 if (_internal_metadata_.have_unknown_fields()) {
liujisi@google.com33165fe2010-11-02 13:14:58 +000013619 total_size +=
13620 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
13621 unknown_fields());
13622 }
13623 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
13624 _cached_size_ = total_size;
13625 GOOGLE_SAFE_CONCURRENT_WRITES_END();
13626 return total_size;
13627}
13628
13629void SourceCodeInfo::MergeFrom(const ::google::protobuf::Message& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013630 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
Bo Yang5db21732015-05-21 14:28:59 -070013631 const SourceCodeInfo* source =
13632 ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo>(
13633 &from);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013634 if (source == NULL) {
13635 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
13636 } else {
13637 MergeFrom(*source);
13638 }
13639}
13640
13641void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) {
Feng Xiaof157a562014-11-14 11:50:31 -080013642 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
liujisi@google.com33165fe2010-11-02 13:14:58 +000013643 location_.MergeFrom(from.location_);
Feng Xiao6ef984a2014-11-10 17:34:54 -080013644 if (from._internal_metadata_.have_unknown_fields()) {
13645 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
13646 }
liujisi@google.com33165fe2010-11-02 13:14:58 +000013647}
13648
13649void SourceCodeInfo::CopyFrom(const ::google::protobuf::Message& from) {
13650 if (&from == this) return;
13651 Clear();
13652 MergeFrom(from);
13653}
13654
13655void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) {
13656 if (&from == this) return;
13657 Clear();
13658 MergeFrom(from);
13659}
13660
13661bool SourceCodeInfo::IsInitialized() const {
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +000013662
liujisi@google.com33165fe2010-11-02 13:14:58 +000013663 return true;
13664}
13665
13666void SourceCodeInfo::Swap(SourceCodeInfo* other) {
Feng Xiao6ef984a2014-11-10 17:34:54 -080013667 if (other == this) return;
Feng Xiao6ef984a2014-11-10 17:34:54 -080013668 InternalSwap(other);
13669}
13670void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) {
13671 location_.UnsafeArenaSwap(&other->location_);
13672 std::swap(_has_bits_[0], other->_has_bits_[0]);
13673 _internal_metadata_.Swap(&other->_internal_metadata_);
13674 std::swap(_cached_size_, other->_cached_size_);
13675}
liujisi@google.com33165fe2010-11-02 13:14:58 +000013676
13677::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const {
13678 protobuf_AssignDescriptorsOnce();
13679 ::google::protobuf::Metadata metadata;
13680 metadata.descriptor = SourceCodeInfo_descriptor_;
13681 metadata.reflection = SourceCodeInfo_reflection_;
13682 return metadata;
13683}
13684
Jisi Liu885b6122015-02-28 14:51:22 -080013685#if PROTOBUF_INLINE_NOT_IN_HEADERS
13686// SourceCodeInfo_Location
13687
13688// repeated int32 path = 1 [packed = true];
Bo Yang5db21732015-05-21 14:28:59 -070013689int SourceCodeInfo_Location::path_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013690 return path_.size();
13691}
Bo Yang5db21732015-05-21 14:28:59 -070013692void SourceCodeInfo_Location::clear_path() {
Jisi Liu885b6122015-02-28 14:51:22 -080013693 path_.Clear();
13694}
13695 ::google::protobuf::int32 SourceCodeInfo_Location::path(int index) const {
13696 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path)
13697 return path_.Get(index);
13698}
13699 void SourceCodeInfo_Location::set_path(int index, ::google::protobuf::int32 value) {
13700 path_.Set(index, value);
13701 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path)
13702}
13703 void SourceCodeInfo_Location::add_path(::google::protobuf::int32 value) {
13704 path_.Add(value);
13705 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path)
13706}
13707 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
13708SourceCodeInfo_Location::path() const {
13709 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path)
13710 return path_;
13711}
13712 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
13713SourceCodeInfo_Location::mutable_path() {
13714 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path)
13715 return &path_;
13716}
13717
13718// repeated int32 span = 2 [packed = true];
Bo Yang5db21732015-05-21 14:28:59 -070013719int SourceCodeInfo_Location::span_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013720 return span_.size();
13721}
Bo Yang5db21732015-05-21 14:28:59 -070013722void SourceCodeInfo_Location::clear_span() {
Jisi Liu885b6122015-02-28 14:51:22 -080013723 span_.Clear();
13724}
13725 ::google::protobuf::int32 SourceCodeInfo_Location::span(int index) const {
13726 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span)
13727 return span_.Get(index);
13728}
13729 void SourceCodeInfo_Location::set_span(int index, ::google::protobuf::int32 value) {
13730 span_.Set(index, value);
13731 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span)
13732}
13733 void SourceCodeInfo_Location::add_span(::google::protobuf::int32 value) {
13734 span_.Add(value);
13735 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span)
13736}
13737 const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
13738SourceCodeInfo_Location::span() const {
13739 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span)
13740 return span_;
13741}
13742 ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
13743SourceCodeInfo_Location::mutable_span() {
13744 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span)
13745 return &span_;
13746}
13747
13748// optional string leading_comments = 3;
Bo Yang5db21732015-05-21 14:28:59 -070013749bool SourceCodeInfo_Location::has_leading_comments() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013750 return (_has_bits_[0] & 0x00000004u) != 0;
13751}
Bo Yang5db21732015-05-21 14:28:59 -070013752void SourceCodeInfo_Location::set_has_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013753 _has_bits_[0] |= 0x00000004u;
13754}
Bo Yang5db21732015-05-21 14:28:59 -070013755void SourceCodeInfo_Location::clear_has_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013756 _has_bits_[0] &= ~0x00000004u;
13757}
Bo Yang5db21732015-05-21 14:28:59 -070013758void SourceCodeInfo_Location::clear_leading_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013759 leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13760 clear_has_leading_comments();
13761}
13762 const ::std::string& SourceCodeInfo_Location::leading_comments() const {
13763 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments)
13764 return leading_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13765}
13766 void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) {
13767 set_has_leading_comments();
13768 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13769 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments)
13770}
13771 void SourceCodeInfo_Location::set_leading_comments(const char* value) {
13772 set_has_leading_comments();
13773 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13774 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_comments)
13775}
13776 void SourceCodeInfo_Location::set_leading_comments(const char* value, size_t size) {
13777 set_has_leading_comments();
13778 leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13779 ::std::string(reinterpret_cast<const char*>(value), size));
13780 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments)
13781}
13782 ::std::string* SourceCodeInfo_Location::mutable_leading_comments() {
13783 set_has_leading_comments();
13784 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments)
13785 return leading_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13786}
13787 ::std::string* SourceCodeInfo_Location::release_leading_comments() {
13788 clear_has_leading_comments();
13789 return leading_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13790}
13791 void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) {
13792 if (leading_comments != NULL) {
13793 set_has_leading_comments();
13794 } else {
13795 clear_has_leading_comments();
13796 }
13797 leading_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), leading_comments);
13798 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments)
13799}
13800
13801// optional string trailing_comments = 4;
Bo Yang5db21732015-05-21 14:28:59 -070013802bool SourceCodeInfo_Location::has_trailing_comments() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013803 return (_has_bits_[0] & 0x00000008u) != 0;
13804}
Bo Yang5db21732015-05-21 14:28:59 -070013805void SourceCodeInfo_Location::set_has_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013806 _has_bits_[0] |= 0x00000008u;
13807}
Bo Yang5db21732015-05-21 14:28:59 -070013808void SourceCodeInfo_Location::clear_has_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013809 _has_bits_[0] &= ~0x00000008u;
13810}
Bo Yang5db21732015-05-21 14:28:59 -070013811void SourceCodeInfo_Location::clear_trailing_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013812 trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13813 clear_has_trailing_comments();
13814}
13815 const ::std::string& SourceCodeInfo_Location::trailing_comments() const {
13816 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13817 return trailing_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13818}
13819 void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) {
13820 set_has_trailing_comments();
13821 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
13822 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13823}
13824 void SourceCodeInfo_Location::set_trailing_comments(const char* value) {
13825 set_has_trailing_comments();
13826 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
13827 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13828}
13829 void SourceCodeInfo_Location::set_trailing_comments(const char* value, size_t size) {
13830 set_has_trailing_comments();
13831 trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
13832 ::std::string(reinterpret_cast<const char*>(value), size));
13833 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13834}
13835 ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() {
13836 set_has_trailing_comments();
13837 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13838 return trailing_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13839}
13840 ::std::string* SourceCodeInfo_Location::release_trailing_comments() {
13841 clear_has_trailing_comments();
13842 return trailing_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
13843}
13844 void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) {
13845 if (trailing_comments != NULL) {
13846 set_has_trailing_comments();
13847 } else {
13848 clear_has_trailing_comments();
13849 }
13850 trailing_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), trailing_comments);
13851 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments)
13852}
13853
13854// repeated string leading_detached_comments = 6;
Bo Yang5db21732015-05-21 14:28:59 -070013855int SourceCodeInfo_Location::leading_detached_comments_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013856 return leading_detached_comments_.size();
13857}
Bo Yang5db21732015-05-21 14:28:59 -070013858void SourceCodeInfo_Location::clear_leading_detached_comments() {
Jisi Liu885b6122015-02-28 14:51:22 -080013859 leading_detached_comments_.Clear();
13860}
13861 const ::std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const {
13862 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13863 return leading_detached_comments_.Get(index);
13864}
13865 ::std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) {
13866 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13867 return leading_detached_comments_.Mutable(index);
13868}
13869 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const ::std::string& value) {
13870 // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13871 leading_detached_comments_.Mutable(index)->assign(value);
13872}
13873 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) {
13874 leading_detached_comments_.Mutable(index)->assign(value);
13875 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13876}
13877 void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, size_t size) {
13878 leading_detached_comments_.Mutable(index)->assign(
13879 reinterpret_cast<const char*>(value), size);
13880 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13881}
13882 ::std::string* SourceCodeInfo_Location::add_leading_detached_comments() {
13883 return leading_detached_comments_.Add();
13884}
13885 void SourceCodeInfo_Location::add_leading_detached_comments(const ::std::string& value) {
13886 leading_detached_comments_.Add()->assign(value);
13887 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13888}
13889 void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) {
13890 leading_detached_comments_.Add()->assign(value);
13891 // @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13892}
13893 void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, size_t size) {
13894 leading_detached_comments_.Add()->assign(reinterpret_cast<const char*>(value), size);
13895 // @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13896}
13897 const ::google::protobuf::RepeatedPtrField< ::std::string>&
13898SourceCodeInfo_Location::leading_detached_comments() const {
13899 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13900 return leading_detached_comments_;
13901}
13902 ::google::protobuf::RepeatedPtrField< ::std::string>*
13903SourceCodeInfo_Location::mutable_leading_detached_comments() {
13904 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments)
13905 return &leading_detached_comments_;
13906}
13907
13908// -------------------------------------------------------------------
13909
13910// SourceCodeInfo
13911
13912// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
Bo Yang5db21732015-05-21 14:28:59 -070013913int SourceCodeInfo::location_size() const {
Jisi Liu885b6122015-02-28 14:51:22 -080013914 return location_.size();
13915}
Bo Yang5db21732015-05-21 14:28:59 -070013916void SourceCodeInfo::clear_location() {
Jisi Liu885b6122015-02-28 14:51:22 -080013917 location_.Clear();
13918}
13919 const ::google::protobuf::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const {
13920 // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.location)
13921 return location_.Get(index);
13922}
13923 ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) {
13924 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.location)
13925 return location_.Mutable(index);
13926}
13927 ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::add_location() {
13928 // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.location)
13929 return location_.Add();
13930}
13931 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >&
13932SourceCodeInfo::location() const {
13933 // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location)
13934 return location_;
13935}
13936 ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >*
13937SourceCodeInfo::mutable_location() {
13938 // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location)
13939 return &location_;
13940}
13941
13942#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
liujisi@google.com33165fe2010-11-02 13:14:58 +000013943
kenton@google.comfccb1462009-12-18 02:11:36 +000013944// @@protoc_insertion_point(namespace_scope)
13945
temporal40ee5512008-07-10 02:12:20 +000013946} // namespace protobuf
13947} // namespace google
kenton@google.comfccb1462009-12-18 02:11:36 +000013948
13949// @@protoc_insertion_point(global_scope)