1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/api.proto
3
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include <google/protobuf/api.pb.h>
6
7 #include <algorithm>
8
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/port.h>
11 #include <google/protobuf/stubs/once.h>
12 #include <google/protobuf/io/coded_stream.h>
13 #include <google/protobuf/wire_format_lite_inl.h>
14 #include <google/protobuf/descriptor.h>
15 #include <google/protobuf/generated_message_reflection.h>
16 #include <google/protobuf/reflection_ops.h>
17 #include <google/protobuf/wire_format.h>
18 // @@protoc_insertion_point(includes)
19
20 namespace google {
21 namespace protobuf {
22
23 namespace {
24
25 const ::google::protobuf::Descriptor* Api_descriptor_ = NULL;
26 const ::google::protobuf::internal::GeneratedMessageReflection*
27 Api_reflection_ = NULL;
28 const ::google::protobuf::Descriptor* Method_descriptor_ = NULL;
29 const ::google::protobuf::internal::GeneratedMessageReflection*
30 Method_reflection_ = NULL;
31 const ::google::protobuf::Descriptor* Mixin_descriptor_ = NULL;
32 const ::google::protobuf::internal::GeneratedMessageReflection*
33 Mixin_reflection_ = NULL;
34
35 } // namespace
36
37
protobuf_AssignDesc_google_2fprotobuf_2fapi_2eproto()38 void protobuf_AssignDesc_google_2fprotobuf_2fapi_2eproto() {
39 protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
40 const ::google::protobuf::FileDescriptor* file =
41 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
42 "google/protobuf/api.proto");
43 GOOGLE_CHECK(file != NULL);
44 Api_descriptor_ = file->message_type(0);
45 static const int Api_offsets_[7] = {
46 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, name_),
47 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, methods_),
48 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, options_),
49 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, version_),
50 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, source_context_),
51 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, mixins_),
52 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, syntax_),
53 };
54 Api_reflection_ =
55 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
56 Api_descriptor_,
57 Api::default_instance_,
58 Api_offsets_,
59 -1,
60 -1,
61 -1,
62 sizeof(Api),
63 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, _internal_metadata_),
64 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Api, _is_default_instance_));
65 Method_descriptor_ = file->message_type(1);
66 static const int Method_offsets_[7] = {
67 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, name_),
68 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, request_type_url_),
69 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, request_streaming_),
70 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, response_type_url_),
71 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, response_streaming_),
72 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, options_),
73 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, syntax_),
74 };
75 Method_reflection_ =
76 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
77 Method_descriptor_,
78 Method::default_instance_,
79 Method_offsets_,
80 -1,
81 -1,
82 -1,
83 sizeof(Method),
84 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, _internal_metadata_),
85 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Method, _is_default_instance_));
86 Mixin_descriptor_ = file->message_type(2);
87 static const int Mixin_offsets_[2] = {
88 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Mixin, name_),
89 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Mixin, root_),
90 };
91 Mixin_reflection_ =
92 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
93 Mixin_descriptor_,
94 Mixin::default_instance_,
95 Mixin_offsets_,
96 -1,
97 -1,
98 -1,
99 sizeof(Mixin),
100 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Mixin, _internal_metadata_),
101 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Mixin, _is_default_instance_));
102 }
103
104 namespace {
105
106 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
protobuf_AssignDescriptorsOnce()107 inline void protobuf_AssignDescriptorsOnce() {
108 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
109 &protobuf_AssignDesc_google_2fprotobuf_2fapi_2eproto);
110 }
111
protobuf_RegisterTypes(const::std::string &)112 void protobuf_RegisterTypes(const ::std::string&) {
113 protobuf_AssignDescriptorsOnce();
114 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
115 Api_descriptor_, &Api::default_instance());
116 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
117 Method_descriptor_, &Method::default_instance());
118 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
119 Mixin_descriptor_, &Mixin::default_instance());
120 }
121
122 } // namespace
123
protobuf_ShutdownFile_google_2fprotobuf_2fapi_2eproto()124 void protobuf_ShutdownFile_google_2fprotobuf_2fapi_2eproto() {
125 delete Api::default_instance_;
126 delete Api_reflection_;
127 delete Method::default_instance_;
128 delete Method_reflection_;
129 delete Mixin::default_instance_;
130 delete Mixin_reflection_;
131 }
132
protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto()133 void protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto() {
134 static bool already_here = false;
135 if (already_here) return;
136 already_here = true;
137 GOOGLE_PROTOBUF_VERIFY_VERSION;
138
139 ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
140 ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
141 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
142 "\n\031google/protobuf/api.proto\022\017google.prot"
143 "obuf\032$google/protobuf/source_context.pro"
144 "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014"
145 "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p"
146 "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google"
147 ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou"
148 "rce_context\030\005 \001(\0132\036.google.protobuf.Sour"
149 "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto"
150 "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto"
151 "buf.Syntax\"\325\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\030\n\020r"
152 "equest_type_url\030\002 \001(\t\022\031\n\021request_streami"
153 "ng\030\003 \001(\010\022\031\n\021response_type_url\030\004 \001(\t\022\032\n\022r"
154 "esponse_streaming\030\005 \001(\010\022(\n\007options\030\006 \003(\013"
155 "2\027.google.protobuf.Option\022\'\n\006syntax\030\007 \001("
156 "\0162\027.google.protobuf.Syntax\"#\n\005Mixin\022\014\n\004n"
157 "ame\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBK\n\023com.google.pr"
158 "otobufB\010ApiProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Pro"
159 "tobuf.WellKnownTypesb\006proto3", 708);
160 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
161 "google/protobuf/api.proto", &protobuf_RegisterTypes);
162 Api::default_instance_ = new Api();
163 Method::default_instance_ = new Method();
164 Mixin::default_instance_ = new Mixin();
165 Api::default_instance_->InitAsDefaultInstance();
166 Method::default_instance_->InitAsDefaultInstance();
167 Mixin::default_instance_->InitAsDefaultInstance();
168 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fapi_2eproto);
169 }
170
171 // Force AddDescriptors() to be called at static initialization time.
172 struct StaticDescriptorInitializer_google_2fprotobuf_2fapi_2eproto {
StaticDescriptorInitializer_google_2fprotobuf_2fapi_2eprotogoogle::protobuf::StaticDescriptorInitializer_google_2fprotobuf_2fapi_2eproto173 StaticDescriptorInitializer_google_2fprotobuf_2fapi_2eproto() {
174 protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
175 }
176 } static_descriptor_initializer_google_2fprotobuf_2fapi_2eproto_;
177
178 namespace {
179
180 static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;
MergeFromFail(int line)181 static void MergeFromFail(int line) {
182 GOOGLE_CHECK(false) << __FILE__ << ":" << line;
183 }
184
185 } // namespace
186
187
188 // ===================================================================
189
190 #if !defined(_MSC_VER) || _MSC_VER >= 1900
191 const int Api::kNameFieldNumber;
192 const int Api::kMethodsFieldNumber;
193 const int Api::kOptionsFieldNumber;
194 const int Api::kVersionFieldNumber;
195 const int Api::kSourceContextFieldNumber;
196 const int Api::kMixinsFieldNumber;
197 const int Api::kSyntaxFieldNumber;
198 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
199
Api()200 Api::Api()
201 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
202 SharedCtor();
203 // @@protoc_insertion_point(constructor:google.protobuf.Api)
204 }
205
InitAsDefaultInstance()206 void Api::InitAsDefaultInstance() {
207 _is_default_instance_ = true;
208 source_context_ = const_cast< ::google::protobuf::SourceContext*>(&::google::protobuf::SourceContext::default_instance());
209 }
210
Api(const Api & from)211 Api::Api(const Api& from)
212 : ::google::protobuf::Message(),
213 _internal_metadata_(NULL) {
214 SharedCtor();
215 MergeFrom(from);
216 // @@protoc_insertion_point(copy_constructor:google.protobuf.Api)
217 }
218
SharedCtor()219 void Api::SharedCtor() {
220 _is_default_instance_ = false;
221 ::google::protobuf::internal::GetEmptyString();
222 _cached_size_ = 0;
223 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
224 version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
225 source_context_ = NULL;
226 syntax_ = 0;
227 }
228
~Api()229 Api::~Api() {
230 // @@protoc_insertion_point(destructor:google.protobuf.Api)
231 SharedDtor();
232 }
233
SharedDtor()234 void Api::SharedDtor() {
235 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
236 version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
237 if (this != default_instance_) {
238 delete source_context_;
239 }
240 }
241
SetCachedSize(int size) const242 void Api::SetCachedSize(int size) const {
243 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
244 _cached_size_ = size;
245 GOOGLE_SAFE_CONCURRENT_WRITES_END();
246 }
descriptor()247 const ::google::protobuf::Descriptor* Api::descriptor() {
248 protobuf_AssignDescriptorsOnce();
249 return Api_descriptor_;
250 }
251
default_instance()252 const Api& Api::default_instance() {
253 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
254 return *default_instance_;
255 }
256
257 Api* Api::default_instance_ = NULL;
258
New(::google::protobuf::Arena * arena) const259 Api* Api::New(::google::protobuf::Arena* arena) const {
260 Api* n = new Api;
261 if (arena != NULL) {
262 arena->Own(n);
263 }
264 return n;
265 }
266
Clear()267 void Api::Clear() {
268 // @@protoc_insertion_point(message_clear_start:google.protobuf.Api)
269 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
270 version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
271 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
272 source_context_ = NULL;
273 syntax_ = 0;
274 methods_.Clear();
275 options_.Clear();
276 mixins_.Clear();
277 }
278
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)279 bool Api::MergePartialFromCodedStream(
280 ::google::protobuf::io::CodedInputStream* input) {
281 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
282 ::google::protobuf::uint32 tag;
283 // @@protoc_insertion_point(parse_start:google.protobuf.Api)
284 for (;;) {
285 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
286 tag = p.first;
287 if (!p.second) goto handle_unusual;
288 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
289 // optional string name = 1;
290 case 1: {
291 if (tag == 10) {
292 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
293 input, this->mutable_name()));
294 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
295 this->name().data(), this->name().length(),
296 ::google::protobuf::internal::WireFormatLite::PARSE,
297 "google.protobuf.Api.name"));
298 } else {
299 goto handle_unusual;
300 }
301 if (input->ExpectTag(18)) goto parse_methods;
302 break;
303 }
304
305 // repeated .google.protobuf.Method methods = 2;
306 case 2: {
307 if (tag == 18) {
308 parse_methods:
309 DO_(input->IncrementRecursionDepth());
310 parse_loop_methods:
311 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
312 input, add_methods()));
313 } else {
314 goto handle_unusual;
315 }
316 if (input->ExpectTag(18)) goto parse_loop_methods;
317 if (input->ExpectTag(26)) goto parse_loop_options;
318 input->UnsafeDecrementRecursionDepth();
319 break;
320 }
321
322 // repeated .google.protobuf.Option options = 3;
323 case 3: {
324 if (tag == 26) {
325 DO_(input->IncrementRecursionDepth());
326 parse_loop_options:
327 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
328 input, add_options()));
329 } else {
330 goto handle_unusual;
331 }
332 if (input->ExpectTag(26)) goto parse_loop_options;
333 input->UnsafeDecrementRecursionDepth();
334 if (input->ExpectTag(34)) goto parse_version;
335 break;
336 }
337
338 // optional string version = 4;
339 case 4: {
340 if (tag == 34) {
341 parse_version:
342 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
343 input, this->mutable_version()));
344 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
345 this->version().data(), this->version().length(),
346 ::google::protobuf::internal::WireFormatLite::PARSE,
347 "google.protobuf.Api.version"));
348 } else {
349 goto handle_unusual;
350 }
351 if (input->ExpectTag(42)) goto parse_source_context;
352 break;
353 }
354
355 // optional .google.protobuf.SourceContext source_context = 5;
356 case 5: {
357 if (tag == 42) {
358 parse_source_context:
359 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
360 input, mutable_source_context()));
361 } else {
362 goto handle_unusual;
363 }
364 if (input->ExpectTag(50)) goto parse_mixins;
365 break;
366 }
367
368 // repeated .google.protobuf.Mixin mixins = 6;
369 case 6: {
370 if (tag == 50) {
371 parse_mixins:
372 DO_(input->IncrementRecursionDepth());
373 parse_loop_mixins:
374 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
375 input, add_mixins()));
376 } else {
377 goto handle_unusual;
378 }
379 if (input->ExpectTag(50)) goto parse_loop_mixins;
380 input->UnsafeDecrementRecursionDepth();
381 if (input->ExpectTag(56)) goto parse_syntax;
382 break;
383 }
384
385 // optional .google.protobuf.Syntax syntax = 7;
386 case 7: {
387 if (tag == 56) {
388 parse_syntax:
389 int value;
390 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
391 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
392 input, &value)));
393 set_syntax(static_cast< ::google::protobuf::Syntax >(value));
394 } else {
395 goto handle_unusual;
396 }
397 if (input->ExpectAtEnd()) goto success;
398 break;
399 }
400
401 default: {
402 handle_unusual:
403 if (tag == 0 ||
404 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
405 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
406 goto success;
407 }
408 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
409 break;
410 }
411 }
412 }
413 success:
414 // @@protoc_insertion_point(parse_success:google.protobuf.Api)
415 return true;
416 failure:
417 // @@protoc_insertion_point(parse_failure:google.protobuf.Api)
418 return false;
419 #undef DO_
420 }
421
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const422 void Api::SerializeWithCachedSizes(
423 ::google::protobuf::io::CodedOutputStream* output) const {
424 // @@protoc_insertion_point(serialize_start:google.protobuf.Api)
425 // optional string name = 1;
426 if (this->name().size() > 0) {
427 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
428 this->name().data(), this->name().length(),
429 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
430 "google.protobuf.Api.name");
431 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
432 1, this->name(), output);
433 }
434
435 // repeated .google.protobuf.Method methods = 2;
436 for (unsigned int i = 0, n = this->methods_size(); i < n; i++) {
437 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
438 2, this->methods(i), output);
439 }
440
441 // repeated .google.protobuf.Option options = 3;
442 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
443 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
444 3, this->options(i), output);
445 }
446
447 // optional string version = 4;
448 if (this->version().size() > 0) {
449 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
450 this->version().data(), this->version().length(),
451 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
452 "google.protobuf.Api.version");
453 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
454 4, this->version(), output);
455 }
456
457 // optional .google.protobuf.SourceContext source_context = 5;
458 if (this->has_source_context()) {
459 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
460 5, *this->source_context_, output);
461 }
462
463 // repeated .google.protobuf.Mixin mixins = 6;
464 for (unsigned int i = 0, n = this->mixins_size(); i < n; i++) {
465 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
466 6, this->mixins(i), output);
467 }
468
469 // optional .google.protobuf.Syntax syntax = 7;
470 if (this->syntax() != 0) {
471 ::google::protobuf::internal::WireFormatLite::WriteEnum(
472 7, this->syntax(), output);
473 }
474
475 // @@protoc_insertion_point(serialize_end:google.protobuf.Api)
476 }
477
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const478 ::google::protobuf::uint8* Api::SerializeWithCachedSizesToArray(
479 ::google::protobuf::uint8* target) const {
480 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api)
481 // optional string name = 1;
482 if (this->name().size() > 0) {
483 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
484 this->name().data(), this->name().length(),
485 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
486 "google.protobuf.Api.name");
487 target =
488 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
489 1, this->name(), target);
490 }
491
492 // repeated .google.protobuf.Method methods = 2;
493 for (unsigned int i = 0, n = this->methods_size(); i < n; i++) {
494 target = ::google::protobuf::internal::WireFormatLite::
495 WriteMessageNoVirtualToArray(
496 2, this->methods(i), target);
497 }
498
499 // repeated .google.protobuf.Option options = 3;
500 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
501 target = ::google::protobuf::internal::WireFormatLite::
502 WriteMessageNoVirtualToArray(
503 3, this->options(i), target);
504 }
505
506 // optional string version = 4;
507 if (this->version().size() > 0) {
508 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
509 this->version().data(), this->version().length(),
510 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
511 "google.protobuf.Api.version");
512 target =
513 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
514 4, this->version(), target);
515 }
516
517 // optional .google.protobuf.SourceContext source_context = 5;
518 if (this->has_source_context()) {
519 target = ::google::protobuf::internal::WireFormatLite::
520 WriteMessageNoVirtualToArray(
521 5, *this->source_context_, target);
522 }
523
524 // repeated .google.protobuf.Mixin mixins = 6;
525 for (unsigned int i = 0, n = this->mixins_size(); i < n; i++) {
526 target = ::google::protobuf::internal::WireFormatLite::
527 WriteMessageNoVirtualToArray(
528 6, this->mixins(i), target);
529 }
530
531 // optional .google.protobuf.Syntax syntax = 7;
532 if (this->syntax() != 0) {
533 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
534 7, this->syntax(), target);
535 }
536
537 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api)
538 return target;
539 }
540
ByteSize() const541 int Api::ByteSize() const {
542 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api)
543 int total_size = 0;
544
545 // optional string name = 1;
546 if (this->name().size() > 0) {
547 total_size += 1 +
548 ::google::protobuf::internal::WireFormatLite::StringSize(
549 this->name());
550 }
551
552 // optional string version = 4;
553 if (this->version().size() > 0) {
554 total_size += 1 +
555 ::google::protobuf::internal::WireFormatLite::StringSize(
556 this->version());
557 }
558
559 // optional .google.protobuf.SourceContext source_context = 5;
560 if (this->has_source_context()) {
561 total_size += 1 +
562 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
563 *this->source_context_);
564 }
565
566 // optional .google.protobuf.Syntax syntax = 7;
567 if (this->syntax() != 0) {
568 total_size += 1 +
569 ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax());
570 }
571
572 // repeated .google.protobuf.Method methods = 2;
573 total_size += 1 * this->methods_size();
574 for (int i = 0; i < this->methods_size(); i++) {
575 total_size +=
576 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
577 this->methods(i));
578 }
579
580 // repeated .google.protobuf.Option options = 3;
581 total_size += 1 * this->options_size();
582 for (int i = 0; i < this->options_size(); i++) {
583 total_size +=
584 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
585 this->options(i));
586 }
587
588 // repeated .google.protobuf.Mixin mixins = 6;
589 total_size += 1 * this->mixins_size();
590 for (int i = 0; i < this->mixins_size(); i++) {
591 total_size +=
592 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
593 this->mixins(i));
594 }
595
596 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
597 _cached_size_ = total_size;
598 GOOGLE_SAFE_CONCURRENT_WRITES_END();
599 return total_size;
600 }
601
MergeFrom(const::google::protobuf::Message & from)602 void Api::MergeFrom(const ::google::protobuf::Message& from) {
603 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Api)
604 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
605 const Api* source =
606 ::google::protobuf::internal::DynamicCastToGenerated<const Api>(
607 &from);
608 if (source == NULL) {
609 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Api)
610 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
611 } else {
612 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Api)
613 MergeFrom(*source);
614 }
615 }
616
MergeFrom(const Api & from)617 void Api::MergeFrom(const Api& from) {
618 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api)
619 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
620 methods_.MergeFrom(from.methods_);
621 options_.MergeFrom(from.options_);
622 mixins_.MergeFrom(from.mixins_);
623 if (from.name().size() > 0) {
624
625 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
626 }
627 if (from.version().size() > 0) {
628
629 version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_);
630 }
631 if (from.has_source_context()) {
632 mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.source_context());
633 }
634 if (from.syntax() != 0) {
635 set_syntax(from.syntax());
636 }
637 }
638
CopyFrom(const::google::protobuf::Message & from)639 void Api::CopyFrom(const ::google::protobuf::Message& from) {
640 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Api)
641 if (&from == this) return;
642 Clear();
643 MergeFrom(from);
644 }
645
CopyFrom(const Api & from)646 void Api::CopyFrom(const Api& from) {
647 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Api)
648 if (&from == this) return;
649 Clear();
650 MergeFrom(from);
651 }
652
IsInitialized() const653 bool Api::IsInitialized() const {
654
655 return true;
656 }
657
Swap(Api * other)658 void Api::Swap(Api* other) {
659 if (other == this) return;
660 InternalSwap(other);
661 }
InternalSwap(Api * other)662 void Api::InternalSwap(Api* other) {
663 name_.Swap(&other->name_);
664 methods_.UnsafeArenaSwap(&other->methods_);
665 options_.UnsafeArenaSwap(&other->options_);
666 version_.Swap(&other->version_);
667 std::swap(source_context_, other->source_context_);
668 mixins_.UnsafeArenaSwap(&other->mixins_);
669 std::swap(syntax_, other->syntax_);
670 _internal_metadata_.Swap(&other->_internal_metadata_);
671 std::swap(_cached_size_, other->_cached_size_);
672 }
673
GetMetadata() const674 ::google::protobuf::Metadata Api::GetMetadata() const {
675 protobuf_AssignDescriptorsOnce();
676 ::google::protobuf::Metadata metadata;
677 metadata.descriptor = Api_descriptor_;
678 metadata.reflection = Api_reflection_;
679 return metadata;
680 }
681
682 #if PROTOBUF_INLINE_NOT_IN_HEADERS
683 // Api
684
685 // optional string name = 1;
clear_name()686 void Api::clear_name() {
687 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
688 }
name() const689 const ::std::string& Api::name() const {
690 // @@protoc_insertion_point(field_get:google.protobuf.Api.name)
691 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
692 }
set_name(const::std::string & value)693 void Api::set_name(const ::std::string& value) {
694
695 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
696 // @@protoc_insertion_point(field_set:google.protobuf.Api.name)
697 }
set_name(const char * value)698 void Api::set_name(const char* value) {
699
700 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
701 // @@protoc_insertion_point(field_set_char:google.protobuf.Api.name)
702 }
set_name(const char * value,size_t size)703 void Api::set_name(const char* value, size_t size) {
704
705 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
706 ::std::string(reinterpret_cast<const char*>(value), size));
707 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Api.name)
708 }
mutable_name()709 ::std::string* Api::mutable_name() {
710
711 // @@protoc_insertion_point(field_mutable:google.protobuf.Api.name)
712 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
713 }
release_name()714 ::std::string* Api::release_name() {
715 // @@protoc_insertion_point(field_release:google.protobuf.Api.name)
716
717 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
718 }
set_allocated_name(::std::string * name)719 void Api::set_allocated_name(::std::string* name) {
720 if (name != NULL) {
721
722 } else {
723
724 }
725 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
726 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.name)
727 }
728
729 // repeated .google.protobuf.Method methods = 2;
methods_size() const730 int Api::methods_size() const {
731 return methods_.size();
732 }
clear_methods()733 void Api::clear_methods() {
734 methods_.Clear();
735 }
methods(int index) const736 const ::google::protobuf::Method& Api::methods(int index) const {
737 // @@protoc_insertion_point(field_get:google.protobuf.Api.methods)
738 return methods_.Get(index);
739 }
mutable_methods(int index)740 ::google::protobuf::Method* Api::mutable_methods(int index) {
741 // @@protoc_insertion_point(field_mutable:google.protobuf.Api.methods)
742 return methods_.Mutable(index);
743 }
add_methods()744 ::google::protobuf::Method* Api::add_methods() {
745 // @@protoc_insertion_point(field_add:google.protobuf.Api.methods)
746 return methods_.Add();
747 }
748 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >*
mutable_methods()749 Api::mutable_methods() {
750 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods)
751 return &methods_;
752 }
753 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >&
methods() const754 Api::methods() const {
755 // @@protoc_insertion_point(field_list:google.protobuf.Api.methods)
756 return methods_;
757 }
758
759 // repeated .google.protobuf.Option options = 3;
options_size() const760 int Api::options_size() const {
761 return options_.size();
762 }
clear_options()763 void Api::clear_options() {
764 options_.Clear();
765 }
options(int index) const766 const ::google::protobuf::Option& Api::options(int index) const {
767 // @@protoc_insertion_point(field_get:google.protobuf.Api.options)
768 return options_.Get(index);
769 }
mutable_options(int index)770 ::google::protobuf::Option* Api::mutable_options(int index) {
771 // @@protoc_insertion_point(field_mutable:google.protobuf.Api.options)
772 return options_.Mutable(index);
773 }
add_options()774 ::google::protobuf::Option* Api::add_options() {
775 // @@protoc_insertion_point(field_add:google.protobuf.Api.options)
776 return options_.Add();
777 }
778 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options()779 Api::mutable_options() {
780 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options)
781 return &options_;
782 }
783 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const784 Api::options() const {
785 // @@protoc_insertion_point(field_list:google.protobuf.Api.options)
786 return options_;
787 }
788
789 // optional string version = 4;
clear_version()790 void Api::clear_version() {
791 version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
792 }
version() const793 const ::std::string& Api::version() const {
794 // @@protoc_insertion_point(field_get:google.protobuf.Api.version)
795 return version_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
796 }
set_version(const::std::string & value)797 void Api::set_version(const ::std::string& value) {
798
799 version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
800 // @@protoc_insertion_point(field_set:google.protobuf.Api.version)
801 }
set_version(const char * value)802 void Api::set_version(const char* value) {
803
804 version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
805 // @@protoc_insertion_point(field_set_char:google.protobuf.Api.version)
806 }
set_version(const char * value,size_t size)807 void Api::set_version(const char* value, size_t size) {
808
809 version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
810 ::std::string(reinterpret_cast<const char*>(value), size));
811 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Api.version)
812 }
mutable_version()813 ::std::string* Api::mutable_version() {
814
815 // @@protoc_insertion_point(field_mutable:google.protobuf.Api.version)
816 return version_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
817 }
release_version()818 ::std::string* Api::release_version() {
819 // @@protoc_insertion_point(field_release:google.protobuf.Api.version)
820
821 return version_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
822 }
set_allocated_version(::std::string * version)823 void Api::set_allocated_version(::std::string* version) {
824 if (version != NULL) {
825
826 } else {
827
828 }
829 version_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), version);
830 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.version)
831 }
832
833 // optional .google.protobuf.SourceContext source_context = 5;
has_source_context() const834 bool Api::has_source_context() const {
835 return !_is_default_instance_ && source_context_ != NULL;
836 }
clear_source_context()837 void Api::clear_source_context() {
838 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
839 source_context_ = NULL;
840 }
source_context() const841 const ::google::protobuf::SourceContext& Api::source_context() const {
842 // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context)
843 return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
844 }
mutable_source_context()845 ::google::protobuf::SourceContext* Api::mutable_source_context() {
846
847 if (source_context_ == NULL) {
848 source_context_ = new ::google::protobuf::SourceContext;
849 }
850 // @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context)
851 return source_context_;
852 }
release_source_context()853 ::google::protobuf::SourceContext* Api::release_source_context() {
854 // @@protoc_insertion_point(field_release:google.protobuf.Api.source_context)
855
856 ::google::protobuf::SourceContext* temp = source_context_;
857 source_context_ = NULL;
858 return temp;
859 }
set_allocated_source_context(::google::protobuf::SourceContext * source_context)860 void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
861 delete source_context_;
862 source_context_ = source_context;
863 if (source_context) {
864
865 } else {
866
867 }
868 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.source_context)
869 }
870
871 // repeated .google.protobuf.Mixin mixins = 6;
mixins_size() const872 int Api::mixins_size() const {
873 return mixins_.size();
874 }
clear_mixins()875 void Api::clear_mixins() {
876 mixins_.Clear();
877 }
mixins(int index) const878 const ::google::protobuf::Mixin& Api::mixins(int index) const {
879 // @@protoc_insertion_point(field_get:google.protobuf.Api.mixins)
880 return mixins_.Get(index);
881 }
mutable_mixins(int index)882 ::google::protobuf::Mixin* Api::mutable_mixins(int index) {
883 // @@protoc_insertion_point(field_mutable:google.protobuf.Api.mixins)
884 return mixins_.Mutable(index);
885 }
add_mixins()886 ::google::protobuf::Mixin* Api::add_mixins() {
887 // @@protoc_insertion_point(field_add:google.protobuf.Api.mixins)
888 return mixins_.Add();
889 }
890 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >*
mutable_mixins()891 Api::mutable_mixins() {
892 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins)
893 return &mixins_;
894 }
895 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >&
mixins() const896 Api::mixins() const {
897 // @@protoc_insertion_point(field_list:google.protobuf.Api.mixins)
898 return mixins_;
899 }
900
901 // optional .google.protobuf.Syntax syntax = 7;
clear_syntax()902 void Api::clear_syntax() {
903 syntax_ = 0;
904 }
syntax() const905 ::google::protobuf::Syntax Api::syntax() const {
906 // @@protoc_insertion_point(field_get:google.protobuf.Api.syntax)
907 return static_cast< ::google::protobuf::Syntax >(syntax_);
908 }
set_syntax(::google::protobuf::Syntax value)909 void Api::set_syntax(::google::protobuf::Syntax value) {
910
911 syntax_ = value;
912 // @@protoc_insertion_point(field_set:google.protobuf.Api.syntax)
913 }
914
915 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
916
917 // ===================================================================
918
919 #if !defined(_MSC_VER) || _MSC_VER >= 1900
920 const int Method::kNameFieldNumber;
921 const int Method::kRequestTypeUrlFieldNumber;
922 const int Method::kRequestStreamingFieldNumber;
923 const int Method::kResponseTypeUrlFieldNumber;
924 const int Method::kResponseStreamingFieldNumber;
925 const int Method::kOptionsFieldNumber;
926 const int Method::kSyntaxFieldNumber;
927 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
928
Method()929 Method::Method()
930 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
931 SharedCtor();
932 // @@protoc_insertion_point(constructor:google.protobuf.Method)
933 }
934
InitAsDefaultInstance()935 void Method::InitAsDefaultInstance() {
936 _is_default_instance_ = true;
937 }
938
Method(const Method & from)939 Method::Method(const Method& from)
940 : ::google::protobuf::Message(),
941 _internal_metadata_(NULL) {
942 SharedCtor();
943 MergeFrom(from);
944 // @@protoc_insertion_point(copy_constructor:google.protobuf.Method)
945 }
946
SharedCtor()947 void Method::SharedCtor() {
948 _is_default_instance_ = false;
949 ::google::protobuf::internal::GetEmptyString();
950 _cached_size_ = 0;
951 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
952 request_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
953 request_streaming_ = false;
954 response_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
955 response_streaming_ = false;
956 syntax_ = 0;
957 }
958
~Method()959 Method::~Method() {
960 // @@protoc_insertion_point(destructor:google.protobuf.Method)
961 SharedDtor();
962 }
963
SharedDtor()964 void Method::SharedDtor() {
965 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
966 request_type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
967 response_type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
968 if (this != default_instance_) {
969 }
970 }
971
SetCachedSize(int size) const972 void Method::SetCachedSize(int size) const {
973 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
974 _cached_size_ = size;
975 GOOGLE_SAFE_CONCURRENT_WRITES_END();
976 }
descriptor()977 const ::google::protobuf::Descriptor* Method::descriptor() {
978 protobuf_AssignDescriptorsOnce();
979 return Method_descriptor_;
980 }
981
default_instance()982 const Method& Method::default_instance() {
983 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
984 return *default_instance_;
985 }
986
987 Method* Method::default_instance_ = NULL;
988
New(::google::protobuf::Arena * arena) const989 Method* Method::New(::google::protobuf::Arena* arena) const {
990 Method* n = new Method;
991 if (arena != NULL) {
992 arena->Own(n);
993 }
994 return n;
995 }
996
Clear()997 void Method::Clear() {
998 // @@protoc_insertion_point(message_clear_start:google.protobuf.Method)
999 #if defined(__clang__)
1000 #define ZR_HELPER_(f) \
1001 _Pragma("clang diagnostic push") \
1002 _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
1003 __builtin_offsetof(Method, f) \
1004 _Pragma("clang diagnostic pop")
1005 #else
1006 #define ZR_HELPER_(f) reinterpret_cast<char*>(\
1007 &reinterpret_cast<Method*>(16)->f)
1008 #endif
1009
1010 #define ZR_(first, last) do {\
1011 ::memset(&first, 0,\
1012 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
1013 } while (0)
1014
1015 ZR_(request_streaming_, syntax_);
1016 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1017 request_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1018 response_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1019
1020 #undef ZR_HELPER_
1021 #undef ZR_
1022
1023 options_.Clear();
1024 }
1025
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)1026 bool Method::MergePartialFromCodedStream(
1027 ::google::protobuf::io::CodedInputStream* input) {
1028 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1029 ::google::protobuf::uint32 tag;
1030 // @@protoc_insertion_point(parse_start:google.protobuf.Method)
1031 for (;;) {
1032 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1033 tag = p.first;
1034 if (!p.second) goto handle_unusual;
1035 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1036 // optional string name = 1;
1037 case 1: {
1038 if (tag == 10) {
1039 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1040 input, this->mutable_name()));
1041 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1042 this->name().data(), this->name().length(),
1043 ::google::protobuf::internal::WireFormatLite::PARSE,
1044 "google.protobuf.Method.name"));
1045 } else {
1046 goto handle_unusual;
1047 }
1048 if (input->ExpectTag(18)) goto parse_request_type_url;
1049 break;
1050 }
1051
1052 // optional string request_type_url = 2;
1053 case 2: {
1054 if (tag == 18) {
1055 parse_request_type_url:
1056 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1057 input, this->mutable_request_type_url()));
1058 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1059 this->request_type_url().data(), this->request_type_url().length(),
1060 ::google::protobuf::internal::WireFormatLite::PARSE,
1061 "google.protobuf.Method.request_type_url"));
1062 } else {
1063 goto handle_unusual;
1064 }
1065 if (input->ExpectTag(24)) goto parse_request_streaming;
1066 break;
1067 }
1068
1069 // optional bool request_streaming = 3;
1070 case 3: {
1071 if (tag == 24) {
1072 parse_request_streaming:
1073 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1074 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
1075 input, &request_streaming_)));
1076
1077 } else {
1078 goto handle_unusual;
1079 }
1080 if (input->ExpectTag(34)) goto parse_response_type_url;
1081 break;
1082 }
1083
1084 // optional string response_type_url = 4;
1085 case 4: {
1086 if (tag == 34) {
1087 parse_response_type_url:
1088 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1089 input, this->mutable_response_type_url()));
1090 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1091 this->response_type_url().data(), this->response_type_url().length(),
1092 ::google::protobuf::internal::WireFormatLite::PARSE,
1093 "google.protobuf.Method.response_type_url"));
1094 } else {
1095 goto handle_unusual;
1096 }
1097 if (input->ExpectTag(40)) goto parse_response_streaming;
1098 break;
1099 }
1100
1101 // optional bool response_streaming = 5;
1102 case 5: {
1103 if (tag == 40) {
1104 parse_response_streaming:
1105 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1106 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
1107 input, &response_streaming_)));
1108
1109 } else {
1110 goto handle_unusual;
1111 }
1112 if (input->ExpectTag(50)) goto parse_options;
1113 break;
1114 }
1115
1116 // repeated .google.protobuf.Option options = 6;
1117 case 6: {
1118 if (tag == 50) {
1119 parse_options:
1120 DO_(input->IncrementRecursionDepth());
1121 parse_loop_options:
1122 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
1123 input, add_options()));
1124 } else {
1125 goto handle_unusual;
1126 }
1127 if (input->ExpectTag(50)) goto parse_loop_options;
1128 input->UnsafeDecrementRecursionDepth();
1129 if (input->ExpectTag(56)) goto parse_syntax;
1130 break;
1131 }
1132
1133 // optional .google.protobuf.Syntax syntax = 7;
1134 case 7: {
1135 if (tag == 56) {
1136 parse_syntax:
1137 int value;
1138 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1139 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
1140 input, &value)));
1141 set_syntax(static_cast< ::google::protobuf::Syntax >(value));
1142 } else {
1143 goto handle_unusual;
1144 }
1145 if (input->ExpectAtEnd()) goto success;
1146 break;
1147 }
1148
1149 default: {
1150 handle_unusual:
1151 if (tag == 0 ||
1152 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1153 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1154 goto success;
1155 }
1156 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
1157 break;
1158 }
1159 }
1160 }
1161 success:
1162 // @@protoc_insertion_point(parse_success:google.protobuf.Method)
1163 return true;
1164 failure:
1165 // @@protoc_insertion_point(parse_failure:google.protobuf.Method)
1166 return false;
1167 #undef DO_
1168 }
1169
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const1170 void Method::SerializeWithCachedSizes(
1171 ::google::protobuf::io::CodedOutputStream* output) const {
1172 // @@protoc_insertion_point(serialize_start:google.protobuf.Method)
1173 // optional string name = 1;
1174 if (this->name().size() > 0) {
1175 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1176 this->name().data(), this->name().length(),
1177 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1178 "google.protobuf.Method.name");
1179 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1180 1, this->name(), output);
1181 }
1182
1183 // optional string request_type_url = 2;
1184 if (this->request_type_url().size() > 0) {
1185 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1186 this->request_type_url().data(), this->request_type_url().length(),
1187 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1188 "google.protobuf.Method.request_type_url");
1189 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1190 2, this->request_type_url(), output);
1191 }
1192
1193 // optional bool request_streaming = 3;
1194 if (this->request_streaming() != 0) {
1195 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->request_streaming(), output);
1196 }
1197
1198 // optional string response_type_url = 4;
1199 if (this->response_type_url().size() > 0) {
1200 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1201 this->response_type_url().data(), this->response_type_url().length(),
1202 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1203 "google.protobuf.Method.response_type_url");
1204 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1205 4, this->response_type_url(), output);
1206 }
1207
1208 // optional bool response_streaming = 5;
1209 if (this->response_streaming() != 0) {
1210 ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->response_streaming(), output);
1211 }
1212
1213 // repeated .google.protobuf.Option options = 6;
1214 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
1215 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1216 6, this->options(i), output);
1217 }
1218
1219 // optional .google.protobuf.Syntax syntax = 7;
1220 if (this->syntax() != 0) {
1221 ::google::protobuf::internal::WireFormatLite::WriteEnum(
1222 7, this->syntax(), output);
1223 }
1224
1225 // @@protoc_insertion_point(serialize_end:google.protobuf.Method)
1226 }
1227
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const1228 ::google::protobuf::uint8* Method::SerializeWithCachedSizesToArray(
1229 ::google::protobuf::uint8* target) const {
1230 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method)
1231 // optional string name = 1;
1232 if (this->name().size() > 0) {
1233 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1234 this->name().data(), this->name().length(),
1235 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1236 "google.protobuf.Method.name");
1237 target =
1238 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1239 1, this->name(), target);
1240 }
1241
1242 // optional string request_type_url = 2;
1243 if (this->request_type_url().size() > 0) {
1244 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1245 this->request_type_url().data(), this->request_type_url().length(),
1246 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1247 "google.protobuf.Method.request_type_url");
1248 target =
1249 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1250 2, this->request_type_url(), target);
1251 }
1252
1253 // optional bool request_streaming = 3;
1254 if (this->request_streaming() != 0) {
1255 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->request_streaming(), target);
1256 }
1257
1258 // optional string response_type_url = 4;
1259 if (this->response_type_url().size() > 0) {
1260 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1261 this->response_type_url().data(), this->response_type_url().length(),
1262 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1263 "google.protobuf.Method.response_type_url");
1264 target =
1265 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1266 4, this->response_type_url(), target);
1267 }
1268
1269 // optional bool response_streaming = 5;
1270 if (this->response_streaming() != 0) {
1271 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->response_streaming(), target);
1272 }
1273
1274 // repeated .google.protobuf.Option options = 6;
1275 for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
1276 target = ::google::protobuf::internal::WireFormatLite::
1277 WriteMessageNoVirtualToArray(
1278 6, this->options(i), target);
1279 }
1280
1281 // optional .google.protobuf.Syntax syntax = 7;
1282 if (this->syntax() != 0) {
1283 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1284 7, this->syntax(), target);
1285 }
1286
1287 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method)
1288 return target;
1289 }
1290
ByteSize() const1291 int Method::ByteSize() const {
1292 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method)
1293 int total_size = 0;
1294
1295 // optional string name = 1;
1296 if (this->name().size() > 0) {
1297 total_size += 1 +
1298 ::google::protobuf::internal::WireFormatLite::StringSize(
1299 this->name());
1300 }
1301
1302 // optional string request_type_url = 2;
1303 if (this->request_type_url().size() > 0) {
1304 total_size += 1 +
1305 ::google::protobuf::internal::WireFormatLite::StringSize(
1306 this->request_type_url());
1307 }
1308
1309 // optional bool request_streaming = 3;
1310 if (this->request_streaming() != 0) {
1311 total_size += 1 + 1;
1312 }
1313
1314 // optional string response_type_url = 4;
1315 if (this->response_type_url().size() > 0) {
1316 total_size += 1 +
1317 ::google::protobuf::internal::WireFormatLite::StringSize(
1318 this->response_type_url());
1319 }
1320
1321 // optional bool response_streaming = 5;
1322 if (this->response_streaming() != 0) {
1323 total_size += 1 + 1;
1324 }
1325
1326 // optional .google.protobuf.Syntax syntax = 7;
1327 if (this->syntax() != 0) {
1328 total_size += 1 +
1329 ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax());
1330 }
1331
1332 // repeated .google.protobuf.Option options = 6;
1333 total_size += 1 * this->options_size();
1334 for (int i = 0; i < this->options_size(); i++) {
1335 total_size +=
1336 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
1337 this->options(i));
1338 }
1339
1340 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1341 _cached_size_ = total_size;
1342 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1343 return total_size;
1344 }
1345
MergeFrom(const::google::protobuf::Message & from)1346 void Method::MergeFrom(const ::google::protobuf::Message& from) {
1347 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Method)
1348 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
1349 const Method* source =
1350 ::google::protobuf::internal::DynamicCastToGenerated<const Method>(
1351 &from);
1352 if (source == NULL) {
1353 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Method)
1354 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1355 } else {
1356 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Method)
1357 MergeFrom(*source);
1358 }
1359 }
1360
MergeFrom(const Method & from)1361 void Method::MergeFrom(const Method& from) {
1362 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method)
1363 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
1364 options_.MergeFrom(from.options_);
1365 if (from.name().size() > 0) {
1366
1367 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
1368 }
1369 if (from.request_type_url().size() > 0) {
1370
1371 request_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_type_url_);
1372 }
1373 if (from.request_streaming() != 0) {
1374 set_request_streaming(from.request_streaming());
1375 }
1376 if (from.response_type_url().size() > 0) {
1377
1378 response_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_type_url_);
1379 }
1380 if (from.response_streaming() != 0) {
1381 set_response_streaming(from.response_streaming());
1382 }
1383 if (from.syntax() != 0) {
1384 set_syntax(from.syntax());
1385 }
1386 }
1387
CopyFrom(const::google::protobuf::Message & from)1388 void Method::CopyFrom(const ::google::protobuf::Message& from) {
1389 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Method)
1390 if (&from == this) return;
1391 Clear();
1392 MergeFrom(from);
1393 }
1394
CopyFrom(const Method & from)1395 void Method::CopyFrom(const Method& from) {
1396 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Method)
1397 if (&from == this) return;
1398 Clear();
1399 MergeFrom(from);
1400 }
1401
IsInitialized() const1402 bool Method::IsInitialized() const {
1403
1404 return true;
1405 }
1406
Swap(Method * other)1407 void Method::Swap(Method* other) {
1408 if (other == this) return;
1409 InternalSwap(other);
1410 }
InternalSwap(Method * other)1411 void Method::InternalSwap(Method* other) {
1412 name_.Swap(&other->name_);
1413 request_type_url_.Swap(&other->request_type_url_);
1414 std::swap(request_streaming_, other->request_streaming_);
1415 response_type_url_.Swap(&other->response_type_url_);
1416 std::swap(response_streaming_, other->response_streaming_);
1417 options_.UnsafeArenaSwap(&other->options_);
1418 std::swap(syntax_, other->syntax_);
1419 _internal_metadata_.Swap(&other->_internal_metadata_);
1420 std::swap(_cached_size_, other->_cached_size_);
1421 }
1422
GetMetadata() const1423 ::google::protobuf::Metadata Method::GetMetadata() const {
1424 protobuf_AssignDescriptorsOnce();
1425 ::google::protobuf::Metadata metadata;
1426 metadata.descriptor = Method_descriptor_;
1427 metadata.reflection = Method_reflection_;
1428 return metadata;
1429 }
1430
1431 #if PROTOBUF_INLINE_NOT_IN_HEADERS
1432 // Method
1433
1434 // optional string name = 1;
clear_name()1435 void Method::clear_name() {
1436 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1437 }
name() const1438 const ::std::string& Method::name() const {
1439 // @@protoc_insertion_point(field_get:google.protobuf.Method.name)
1440 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1441 }
set_name(const::std::string & value)1442 void Method::set_name(const ::std::string& value) {
1443
1444 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1445 // @@protoc_insertion_point(field_set:google.protobuf.Method.name)
1446 }
set_name(const char * value)1447 void Method::set_name(const char* value) {
1448
1449 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1450 // @@protoc_insertion_point(field_set_char:google.protobuf.Method.name)
1451 }
set_name(const char * value,size_t size)1452 void Method::set_name(const char* value, size_t size) {
1453
1454 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1455 ::std::string(reinterpret_cast<const char*>(value), size));
1456 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.name)
1457 }
mutable_name()1458 ::std::string* Method::mutable_name() {
1459
1460 // @@protoc_insertion_point(field_mutable:google.protobuf.Method.name)
1461 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1462 }
release_name()1463 ::std::string* Method::release_name() {
1464 // @@protoc_insertion_point(field_release:google.protobuf.Method.name)
1465
1466 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1467 }
set_allocated_name(::std::string * name)1468 void Method::set_allocated_name(::std::string* name) {
1469 if (name != NULL) {
1470
1471 } else {
1472
1473 }
1474 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
1475 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.name)
1476 }
1477
1478 // optional string request_type_url = 2;
clear_request_type_url()1479 void Method::clear_request_type_url() {
1480 request_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1481 }
request_type_url() const1482 const ::std::string& Method::request_type_url() const {
1483 // @@protoc_insertion_point(field_get:google.protobuf.Method.request_type_url)
1484 return request_type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1485 }
set_request_type_url(const::std::string & value)1486 void Method::set_request_type_url(const ::std::string& value) {
1487
1488 request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1489 // @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url)
1490 }
set_request_type_url(const char * value)1491 void Method::set_request_type_url(const char* value) {
1492
1493 request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1494 // @@protoc_insertion_point(field_set_char:google.protobuf.Method.request_type_url)
1495 }
set_request_type_url(const char * value,size_t size)1496 void Method::set_request_type_url(const char* value, size_t size) {
1497
1498 request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1499 ::std::string(reinterpret_cast<const char*>(value), size));
1500 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.request_type_url)
1501 }
mutable_request_type_url()1502 ::std::string* Method::mutable_request_type_url() {
1503
1504 // @@protoc_insertion_point(field_mutable:google.protobuf.Method.request_type_url)
1505 return request_type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1506 }
release_request_type_url()1507 ::std::string* Method::release_request_type_url() {
1508 // @@protoc_insertion_point(field_release:google.protobuf.Method.request_type_url)
1509
1510 return request_type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1511 }
set_allocated_request_type_url(::std::string * request_type_url)1512 void Method::set_allocated_request_type_url(::std::string* request_type_url) {
1513 if (request_type_url != NULL) {
1514
1515 } else {
1516
1517 }
1518 request_type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), request_type_url);
1519 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.request_type_url)
1520 }
1521
1522 // optional bool request_streaming = 3;
clear_request_streaming()1523 void Method::clear_request_streaming() {
1524 request_streaming_ = false;
1525 }
request_streaming() const1526 bool Method::request_streaming() const {
1527 // @@protoc_insertion_point(field_get:google.protobuf.Method.request_streaming)
1528 return request_streaming_;
1529 }
set_request_streaming(bool value)1530 void Method::set_request_streaming(bool value) {
1531
1532 request_streaming_ = value;
1533 // @@protoc_insertion_point(field_set:google.protobuf.Method.request_streaming)
1534 }
1535
1536 // optional string response_type_url = 4;
clear_response_type_url()1537 void Method::clear_response_type_url() {
1538 response_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1539 }
response_type_url() const1540 const ::std::string& Method::response_type_url() const {
1541 // @@protoc_insertion_point(field_get:google.protobuf.Method.response_type_url)
1542 return response_type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1543 }
set_response_type_url(const::std::string & value)1544 void Method::set_response_type_url(const ::std::string& value) {
1545
1546 response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1547 // @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url)
1548 }
set_response_type_url(const char * value)1549 void Method::set_response_type_url(const char* value) {
1550
1551 response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1552 // @@protoc_insertion_point(field_set_char:google.protobuf.Method.response_type_url)
1553 }
set_response_type_url(const char * value,size_t size)1554 void Method::set_response_type_url(const char* value, size_t size) {
1555
1556 response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1557 ::std::string(reinterpret_cast<const char*>(value), size));
1558 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.response_type_url)
1559 }
mutable_response_type_url()1560 ::std::string* Method::mutable_response_type_url() {
1561
1562 // @@protoc_insertion_point(field_mutable:google.protobuf.Method.response_type_url)
1563 return response_type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1564 }
release_response_type_url()1565 ::std::string* Method::release_response_type_url() {
1566 // @@protoc_insertion_point(field_release:google.protobuf.Method.response_type_url)
1567
1568 return response_type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1569 }
set_allocated_response_type_url(::std::string * response_type_url)1570 void Method::set_allocated_response_type_url(::std::string* response_type_url) {
1571 if (response_type_url != NULL) {
1572
1573 } else {
1574
1575 }
1576 response_type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), response_type_url);
1577 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.response_type_url)
1578 }
1579
1580 // optional bool response_streaming = 5;
clear_response_streaming()1581 void Method::clear_response_streaming() {
1582 response_streaming_ = false;
1583 }
response_streaming() const1584 bool Method::response_streaming() const {
1585 // @@protoc_insertion_point(field_get:google.protobuf.Method.response_streaming)
1586 return response_streaming_;
1587 }
set_response_streaming(bool value)1588 void Method::set_response_streaming(bool value) {
1589
1590 response_streaming_ = value;
1591 // @@protoc_insertion_point(field_set:google.protobuf.Method.response_streaming)
1592 }
1593
1594 // repeated .google.protobuf.Option options = 6;
options_size() const1595 int Method::options_size() const {
1596 return options_.size();
1597 }
clear_options()1598 void Method::clear_options() {
1599 options_.Clear();
1600 }
options(int index) const1601 const ::google::protobuf::Option& Method::options(int index) const {
1602 // @@protoc_insertion_point(field_get:google.protobuf.Method.options)
1603 return options_.Get(index);
1604 }
mutable_options(int index)1605 ::google::protobuf::Option* Method::mutable_options(int index) {
1606 // @@protoc_insertion_point(field_mutable:google.protobuf.Method.options)
1607 return options_.Mutable(index);
1608 }
add_options()1609 ::google::protobuf::Option* Method::add_options() {
1610 // @@protoc_insertion_point(field_add:google.protobuf.Method.options)
1611 return options_.Add();
1612 }
1613 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >*
mutable_options()1614 Method::mutable_options() {
1615 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options)
1616 return &options_;
1617 }
1618 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >&
options() const1619 Method::options() const {
1620 // @@protoc_insertion_point(field_list:google.protobuf.Method.options)
1621 return options_;
1622 }
1623
1624 // optional .google.protobuf.Syntax syntax = 7;
clear_syntax()1625 void Method::clear_syntax() {
1626 syntax_ = 0;
1627 }
syntax() const1628 ::google::protobuf::Syntax Method::syntax() const {
1629 // @@protoc_insertion_point(field_get:google.protobuf.Method.syntax)
1630 return static_cast< ::google::protobuf::Syntax >(syntax_);
1631 }
set_syntax(::google::protobuf::Syntax value)1632 void Method::set_syntax(::google::protobuf::Syntax value) {
1633
1634 syntax_ = value;
1635 // @@protoc_insertion_point(field_set:google.protobuf.Method.syntax)
1636 }
1637
1638 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
1639
1640 // ===================================================================
1641
1642 #if !defined(_MSC_VER) || _MSC_VER >= 1900
1643 const int Mixin::kNameFieldNumber;
1644 const int Mixin::kRootFieldNumber;
1645 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1646
Mixin()1647 Mixin::Mixin()
1648 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
1649 SharedCtor();
1650 // @@protoc_insertion_point(constructor:google.protobuf.Mixin)
1651 }
1652
InitAsDefaultInstance()1653 void Mixin::InitAsDefaultInstance() {
1654 _is_default_instance_ = true;
1655 }
1656
Mixin(const Mixin & from)1657 Mixin::Mixin(const Mixin& from)
1658 : ::google::protobuf::Message(),
1659 _internal_metadata_(NULL) {
1660 SharedCtor();
1661 MergeFrom(from);
1662 // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin)
1663 }
1664
SharedCtor()1665 void Mixin::SharedCtor() {
1666 _is_default_instance_ = false;
1667 ::google::protobuf::internal::GetEmptyString();
1668 _cached_size_ = 0;
1669 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1670 root_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1671 }
1672
~Mixin()1673 Mixin::~Mixin() {
1674 // @@protoc_insertion_point(destructor:google.protobuf.Mixin)
1675 SharedDtor();
1676 }
1677
SharedDtor()1678 void Mixin::SharedDtor() {
1679 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1680 root_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1681 if (this != default_instance_) {
1682 }
1683 }
1684
SetCachedSize(int size) const1685 void Mixin::SetCachedSize(int size) const {
1686 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1687 _cached_size_ = size;
1688 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1689 }
descriptor()1690 const ::google::protobuf::Descriptor* Mixin::descriptor() {
1691 protobuf_AssignDescriptorsOnce();
1692 return Mixin_descriptor_;
1693 }
1694
default_instance()1695 const Mixin& Mixin::default_instance() {
1696 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fapi_2eproto();
1697 return *default_instance_;
1698 }
1699
1700 Mixin* Mixin::default_instance_ = NULL;
1701
New(::google::protobuf::Arena * arena) const1702 Mixin* Mixin::New(::google::protobuf::Arena* arena) const {
1703 Mixin* n = new Mixin;
1704 if (arena != NULL) {
1705 arena->Own(n);
1706 }
1707 return n;
1708 }
1709
Clear()1710 void Mixin::Clear() {
1711 // @@protoc_insertion_point(message_clear_start:google.protobuf.Mixin)
1712 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1713 root_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1714 }
1715
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)1716 bool Mixin::MergePartialFromCodedStream(
1717 ::google::protobuf::io::CodedInputStream* input) {
1718 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1719 ::google::protobuf::uint32 tag;
1720 // @@protoc_insertion_point(parse_start:google.protobuf.Mixin)
1721 for (;;) {
1722 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1723 tag = p.first;
1724 if (!p.second) goto handle_unusual;
1725 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1726 // optional string name = 1;
1727 case 1: {
1728 if (tag == 10) {
1729 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1730 input, this->mutable_name()));
1731 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1732 this->name().data(), this->name().length(),
1733 ::google::protobuf::internal::WireFormatLite::PARSE,
1734 "google.protobuf.Mixin.name"));
1735 } else {
1736 goto handle_unusual;
1737 }
1738 if (input->ExpectTag(18)) goto parse_root;
1739 break;
1740 }
1741
1742 // optional string root = 2;
1743 case 2: {
1744 if (tag == 18) {
1745 parse_root:
1746 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1747 input, this->mutable_root()));
1748 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1749 this->root().data(), this->root().length(),
1750 ::google::protobuf::internal::WireFormatLite::PARSE,
1751 "google.protobuf.Mixin.root"));
1752 } else {
1753 goto handle_unusual;
1754 }
1755 if (input->ExpectAtEnd()) goto success;
1756 break;
1757 }
1758
1759 default: {
1760 handle_unusual:
1761 if (tag == 0 ||
1762 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1763 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1764 goto success;
1765 }
1766 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
1767 break;
1768 }
1769 }
1770 }
1771 success:
1772 // @@protoc_insertion_point(parse_success:google.protobuf.Mixin)
1773 return true;
1774 failure:
1775 // @@protoc_insertion_point(parse_failure:google.protobuf.Mixin)
1776 return false;
1777 #undef DO_
1778 }
1779
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const1780 void Mixin::SerializeWithCachedSizes(
1781 ::google::protobuf::io::CodedOutputStream* output) const {
1782 // @@protoc_insertion_point(serialize_start:google.protobuf.Mixin)
1783 // optional string name = 1;
1784 if (this->name().size() > 0) {
1785 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1786 this->name().data(), this->name().length(),
1787 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1788 "google.protobuf.Mixin.name");
1789 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1790 1, this->name(), output);
1791 }
1792
1793 // optional string root = 2;
1794 if (this->root().size() > 0) {
1795 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1796 this->root().data(), this->root().length(),
1797 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1798 "google.protobuf.Mixin.root");
1799 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1800 2, this->root(), output);
1801 }
1802
1803 // @@protoc_insertion_point(serialize_end:google.protobuf.Mixin)
1804 }
1805
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const1806 ::google::protobuf::uint8* Mixin::SerializeWithCachedSizesToArray(
1807 ::google::protobuf::uint8* target) const {
1808 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin)
1809 // optional string name = 1;
1810 if (this->name().size() > 0) {
1811 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1812 this->name().data(), this->name().length(),
1813 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1814 "google.protobuf.Mixin.name");
1815 target =
1816 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1817 1, this->name(), target);
1818 }
1819
1820 // optional string root = 2;
1821 if (this->root().size() > 0) {
1822 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1823 this->root().data(), this->root().length(),
1824 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1825 "google.protobuf.Mixin.root");
1826 target =
1827 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1828 2, this->root(), target);
1829 }
1830
1831 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin)
1832 return target;
1833 }
1834
ByteSize() const1835 int Mixin::ByteSize() const {
1836 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin)
1837 int total_size = 0;
1838
1839 // optional string name = 1;
1840 if (this->name().size() > 0) {
1841 total_size += 1 +
1842 ::google::protobuf::internal::WireFormatLite::StringSize(
1843 this->name());
1844 }
1845
1846 // optional string root = 2;
1847 if (this->root().size() > 0) {
1848 total_size += 1 +
1849 ::google::protobuf::internal::WireFormatLite::StringSize(
1850 this->root());
1851 }
1852
1853 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1854 _cached_size_ = total_size;
1855 GOOGLE_SAFE_CONCURRENT_WRITES_END();
1856 return total_size;
1857 }
1858
MergeFrom(const::google::protobuf::Message & from)1859 void Mixin::MergeFrom(const ::google::protobuf::Message& from) {
1860 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Mixin)
1861 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
1862 const Mixin* source =
1863 ::google::protobuf::internal::DynamicCastToGenerated<const Mixin>(
1864 &from);
1865 if (source == NULL) {
1866 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Mixin)
1867 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1868 } else {
1869 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Mixin)
1870 MergeFrom(*source);
1871 }
1872 }
1873
MergeFrom(const Mixin & from)1874 void Mixin::MergeFrom(const Mixin& from) {
1875 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin)
1876 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
1877 if (from.name().size() > 0) {
1878
1879 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
1880 }
1881 if (from.root().size() > 0) {
1882
1883 root_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.root_);
1884 }
1885 }
1886
CopyFrom(const::google::protobuf::Message & from)1887 void Mixin::CopyFrom(const ::google::protobuf::Message& from) {
1888 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Mixin)
1889 if (&from == this) return;
1890 Clear();
1891 MergeFrom(from);
1892 }
1893
CopyFrom(const Mixin & from)1894 void Mixin::CopyFrom(const Mixin& from) {
1895 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Mixin)
1896 if (&from == this) return;
1897 Clear();
1898 MergeFrom(from);
1899 }
1900
IsInitialized() const1901 bool Mixin::IsInitialized() const {
1902
1903 return true;
1904 }
1905
Swap(Mixin * other)1906 void Mixin::Swap(Mixin* other) {
1907 if (other == this) return;
1908 InternalSwap(other);
1909 }
InternalSwap(Mixin * other)1910 void Mixin::InternalSwap(Mixin* other) {
1911 name_.Swap(&other->name_);
1912 root_.Swap(&other->root_);
1913 _internal_metadata_.Swap(&other->_internal_metadata_);
1914 std::swap(_cached_size_, other->_cached_size_);
1915 }
1916
GetMetadata() const1917 ::google::protobuf::Metadata Mixin::GetMetadata() const {
1918 protobuf_AssignDescriptorsOnce();
1919 ::google::protobuf::Metadata metadata;
1920 metadata.descriptor = Mixin_descriptor_;
1921 metadata.reflection = Mixin_reflection_;
1922 return metadata;
1923 }
1924
1925 #if PROTOBUF_INLINE_NOT_IN_HEADERS
1926 // Mixin
1927
1928 // optional string name = 1;
clear_name()1929 void Mixin::clear_name() {
1930 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1931 }
name() const1932 const ::std::string& Mixin::name() const {
1933 // @@protoc_insertion_point(field_get:google.protobuf.Mixin.name)
1934 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1935 }
set_name(const::std::string & value)1936 void Mixin::set_name(const ::std::string& value) {
1937
1938 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1939 // @@protoc_insertion_point(field_set:google.protobuf.Mixin.name)
1940 }
set_name(const char * value)1941 void Mixin::set_name(const char* value) {
1942
1943 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1944 // @@protoc_insertion_point(field_set_char:google.protobuf.Mixin.name)
1945 }
set_name(const char * value,size_t size)1946 void Mixin::set_name(const char* value, size_t size) {
1947
1948 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1949 ::std::string(reinterpret_cast<const char*>(value), size));
1950 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Mixin.name)
1951 }
mutable_name()1952 ::std::string* Mixin::mutable_name() {
1953
1954 // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.name)
1955 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1956 }
release_name()1957 ::std::string* Mixin::release_name() {
1958 // @@protoc_insertion_point(field_release:google.protobuf.Mixin.name)
1959
1960 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1961 }
set_allocated_name(::std::string * name)1962 void Mixin::set_allocated_name(::std::string* name) {
1963 if (name != NULL) {
1964
1965 } else {
1966
1967 }
1968 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
1969 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.name)
1970 }
1971
1972 // optional string root = 2;
clear_root()1973 void Mixin::clear_root() {
1974 root_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1975 }
root() const1976 const ::std::string& Mixin::root() const {
1977 // @@protoc_insertion_point(field_get:google.protobuf.Mixin.root)
1978 return root_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1979 }
set_root(const::std::string & value)1980 void Mixin::set_root(const ::std::string& value) {
1981
1982 root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
1983 // @@protoc_insertion_point(field_set:google.protobuf.Mixin.root)
1984 }
set_root(const char * value)1985 void Mixin::set_root(const char* value) {
1986
1987 root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
1988 // @@protoc_insertion_point(field_set_char:google.protobuf.Mixin.root)
1989 }
set_root(const char * value,size_t size)1990 void Mixin::set_root(const char* value, size_t size) {
1991
1992 root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1993 ::std::string(reinterpret_cast<const char*>(value), size));
1994 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Mixin.root)
1995 }
mutable_root()1996 ::std::string* Mixin::mutable_root() {
1997
1998 // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.root)
1999 return root_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2000 }
release_root()2001 ::std::string* Mixin::release_root() {
2002 // @@protoc_insertion_point(field_release:google.protobuf.Mixin.root)
2003
2004 return root_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2005 }
set_allocated_root(::std::string * root)2006 void Mixin::set_allocated_root(::std::string* root) {
2007 if (root != NULL) {
2008
2009 } else {
2010
2011 }
2012 root_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), root);
2013 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.root)
2014 }
2015
2016 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
2017
2018 // @@protoc_insertion_point(namespace_scope)
2019
2020 } // namespace protobuf
2021 } // namespace google
2022
2023 // @@protoc_insertion_point(global_scope)
2024