1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/api.proto
3
4 #include <google/protobuf/api.pb.h>
5
6 #include <algorithm>
7
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/generated_message_reflection.h>
13 #include <google/protobuf/reflection_ops.h>
14 #include <google/protobuf/wire_format.h>
15 // @@protoc_insertion_point(includes)
16 #include <google/protobuf/port_def.inc>
17
18 PROTOBUF_PRAGMA_INIT_SEG
19
20 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
21 namespace _pbi = _pb::internal;
22
23 PROTOBUF_NAMESPACE_OPEN
Api(::_pbi::ConstantInitialized)24 PROTOBUF_CONSTEXPR Api::Api(
25 ::_pbi::ConstantInitialized)
26 : methods_()
27 , options_()
28 , mixins_()
29 , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
30 , version_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
31 , source_context_(nullptr)
32 , syntax_(0)
33 {}
34 struct ApiDefaultTypeInternal {
ApiDefaultTypeInternalApiDefaultTypeInternal35 PROTOBUF_CONSTEXPR ApiDefaultTypeInternal()
36 : _instance(::_pbi::ConstantInitialized{}) {}
~ApiDefaultTypeInternalApiDefaultTypeInternal37 ~ApiDefaultTypeInternal() {}
38 union {
39 Api _instance;
40 };
41 };
42 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ApiDefaultTypeInternal _Api_default_instance_;
Method(::_pbi::ConstantInitialized)43 PROTOBUF_CONSTEXPR Method::Method(
44 ::_pbi::ConstantInitialized)
45 : options_()
46 , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
47 , request_type_url_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
48 , response_type_url_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
49 , request_streaming_(false)
50 , response_streaming_(false)
51 , syntax_(0)
52 {}
53 struct MethodDefaultTypeInternal {
MethodDefaultTypeInternalMethodDefaultTypeInternal54 PROTOBUF_CONSTEXPR MethodDefaultTypeInternal()
55 : _instance(::_pbi::ConstantInitialized{}) {}
~MethodDefaultTypeInternalMethodDefaultTypeInternal56 ~MethodDefaultTypeInternal() {}
57 union {
58 Method _instance;
59 };
60 };
61 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodDefaultTypeInternal _Method_default_instance_;
Mixin(::_pbi::ConstantInitialized)62 PROTOBUF_CONSTEXPR Mixin::Mixin(
63 ::_pbi::ConstantInitialized)
64 : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
65 , root_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
66 struct MixinDefaultTypeInternal {
MixinDefaultTypeInternalMixinDefaultTypeInternal67 PROTOBUF_CONSTEXPR MixinDefaultTypeInternal()
68 : _instance(::_pbi::ConstantInitialized{}) {}
~MixinDefaultTypeInternalMixinDefaultTypeInternal69 ~MixinDefaultTypeInternal() {}
70 union {
71 Mixin _instance;
72 };
73 };
74 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MixinDefaultTypeInternal _Mixin_default_instance_;
75 PROTOBUF_NAMESPACE_CLOSE
76 static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3];
77 static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
78 static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr;
79
80 const uint32_t TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
81 ~0u, // no _has_bits_
82 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, _internal_metadata_),
83 ~0u, // no _extensions_
84 ~0u, // no _oneof_case_
85 ~0u, // no _weak_field_map_
86 ~0u, // no _inlined_string_donated_
87 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, name_),
88 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, methods_),
89 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, options_),
90 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, version_),
91 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, source_context_),
92 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, mixins_),
93 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Api, syntax_),
94 ~0u, // no _has_bits_
95 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, _internal_metadata_),
96 ~0u, // no _extensions_
97 ~0u, // no _oneof_case_
98 ~0u, // no _weak_field_map_
99 ~0u, // no _inlined_string_donated_
100 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, name_),
101 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, request_type_url_),
102 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, request_streaming_),
103 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, response_type_url_),
104 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, response_streaming_),
105 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, options_),
106 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Method, syntax_),
107 ~0u, // no _has_bits_
108 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, _internal_metadata_),
109 ~0u, // no _extensions_
110 ~0u, // no _oneof_case_
111 ~0u, // no _weak_field_map_
112 ~0u, // no _inlined_string_donated_
113 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, name_),
114 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Mixin, root_),
115 };
116 static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
117 { 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Api)},
118 { 13, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Method)},
119 { 26, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Mixin)},
120 };
121
122 static const ::_pb::Message* const file_default_instances[] = {
123 &::PROTOBUF_NAMESPACE_ID::_Api_default_instance_._instance,
124 &::PROTOBUF_NAMESPACE_ID::_Method_default_instance_._instance,
125 &::PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_._instance,
126 };
127
128 const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
129 "\n\031google/protobuf/api.proto\022\017google.prot"
130 "obuf\032$google/protobuf/source_context.pro"
131 "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014"
132 "\n\004name\030\001 \001(\t\022(\n\007methods\030\002 \003(\0132\027.google.p"
133 "rotobuf.Method\022(\n\007options\030\003 \003(\0132\027.google"
134 ".protobuf.Option\022\017\n\007version\030\004 \001(\t\0226\n\016sou"
135 "rce_context\030\005 \001(\0132\036.google.protobuf.Sour"
136 "ceContext\022&\n\006mixins\030\006 \003(\0132\026.google.proto"
137 "buf.Mixin\022\'\n\006syntax\030\007 \001(\0162\027.google.proto"
138 "buf.Syntax\"\325\001\n\006Method\022\014\n\004name\030\001 \001(\t\022\030\n\020r"
139 "equest_type_url\030\002 \001(\t\022\031\n\021request_streami"
140 "ng\030\003 \001(\010\022\031\n\021response_type_url\030\004 \001(\t\022\032\n\022r"
141 "esponse_streaming\030\005 \001(\010\022(\n\007options\030\006 \003(\013"
142 "2\027.google.protobuf.Option\022\'\n\006syntax\030\007 \001("
143 "\0162\027.google.protobuf.Syntax\"#\n\005Mixin\022\014\n\004n"
144 "ame\030\001 \001(\t\022\014\n\004root\030\002 \001(\tBv\n\023com.google.pr"
145 "otobufB\010ApiProtoP\001Z,google.golang.org/pr"
146 "otobuf/types/known/apipb\242\002\003GPB\252\002\036Google."
147 "Protobuf.WellKnownTypesb\006proto3"
148 ;
149 static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2fapi_2eproto_deps[2] = {
150 &::descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto,
151 &::descriptor_table_google_2fprotobuf_2ftype_2eproto,
152 };
153 static ::_pbi::once_flag descriptor_table_google_2fprotobuf_2fapi_2eproto_once;
154 const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto = {
155 false, false, 751, descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto,
156 "google/protobuf/api.proto",
157 &descriptor_table_google_2fprotobuf_2fapi_2eproto_once, descriptor_table_google_2fprotobuf_2fapi_2eproto_deps, 2, 3,
158 schemas, file_default_instances, TableStruct_google_2fprotobuf_2fapi_2eproto::offsets,
159 file_level_metadata_google_2fprotobuf_2fapi_2eproto, file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto,
160 file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto,
161 };
descriptor_table_google_2fprotobuf_2fapi_2eproto_getter()162 PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fapi_2eproto_getter() {
163 return &descriptor_table_google_2fprotobuf_2fapi_2eproto;
164 }
165
166 // Force running AddDescriptors() at dynamic initialization time.
167 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fapi_2eproto(&descriptor_table_google_2fprotobuf_2fapi_2eproto);
168 PROTOBUF_NAMESPACE_OPEN
169
170 // ===================================================================
171
172 class Api::_Internal {
173 public:
174 static const ::PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Api* msg);
175 };
176
177 const ::PROTOBUF_NAMESPACE_ID::SourceContext&
source_context(const Api * msg)178 Api::_Internal::source_context(const Api* msg) {
179 return *msg->source_context_;
180 }
clear_options()181 void Api::clear_options() {
182 options_.Clear();
183 }
clear_source_context()184 void Api::clear_source_context() {
185 if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
186 delete source_context_;
187 }
188 source_context_ = nullptr;
189 }
Api(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)190 Api::Api(::PROTOBUF_NAMESPACE_ID::Arena* arena,
191 bool is_message_owned)
192 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
193 methods_(arena),
194 options_(arena),
195 mixins_(arena) {
196 SharedCtor();
197 // @@protoc_insertion_point(arena_constructor:google.protobuf.Api)
198 }
Api(const Api & from)199 Api::Api(const Api& from)
200 : ::PROTOBUF_NAMESPACE_ID::Message(),
201 methods_(from.methods_),
202 options_(from.options_),
203 mixins_(from.mixins_) {
204 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
205 name_.InitDefault();
206 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
207 name_.Set("", GetArenaForAllocation());
208 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
209 if (!from._internal_name().empty()) {
210 name_.Set(from._internal_name(),
211 GetArenaForAllocation());
212 }
213 version_.InitDefault();
214 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
215 version_.Set("", GetArenaForAllocation());
216 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
217 if (!from._internal_version().empty()) {
218 version_.Set(from._internal_version(),
219 GetArenaForAllocation());
220 }
221 if (from._internal_has_source_context()) {
222 source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_);
223 } else {
224 source_context_ = nullptr;
225 }
226 syntax_ = from.syntax_;
227 // @@protoc_insertion_point(copy_constructor:google.protobuf.Api)
228 }
229
SharedCtor()230 inline void Api::SharedCtor() {
231 name_.InitDefault();
232 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
233 name_.Set("", GetArenaForAllocation());
234 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
235 version_.InitDefault();
236 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
237 version_.Set("", GetArenaForAllocation());
238 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
239 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
240 reinterpret_cast<char*>(&source_context_) - reinterpret_cast<char*>(this)),
241 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
242 reinterpret_cast<char*>(&source_context_)) + sizeof(syntax_));
243 }
244
~Api()245 Api::~Api() {
246 // @@protoc_insertion_point(destructor:google.protobuf.Api)
247 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
248 (void)arena;
249 return;
250 }
251 SharedDtor();
252 }
253
SharedDtor()254 inline void Api::SharedDtor() {
255 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
256 name_.Destroy();
257 version_.Destroy();
258 if (this != internal_default_instance()) delete source_context_;
259 }
260
SetCachedSize(int size) const261 void Api::SetCachedSize(int size) const {
262 _cached_size_.Set(size);
263 }
264
Clear()265 void Api::Clear() {
266 // @@protoc_insertion_point(message_clear_start:google.protobuf.Api)
267 uint32_t cached_has_bits = 0;
268 // Prevent compiler warnings about cached_has_bits being unused
269 (void) cached_has_bits;
270
271 methods_.Clear();
272 options_.Clear();
273 mixins_.Clear();
274 name_.ClearToEmpty();
275 version_.ClearToEmpty();
276 if (GetArenaForAllocation() == nullptr && source_context_ != nullptr) {
277 delete source_context_;
278 }
279 source_context_ = nullptr;
280 syntax_ = 0;
281 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
282 }
283
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)284 const char* Api::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
285 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
286 while (!ctx->Done(&ptr)) {
287 uint32_t tag;
288 ptr = ::_pbi::ReadTag(ptr, &tag);
289 switch (tag >> 3) {
290 // string name = 1;
291 case 1:
292 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
293 auto str = _internal_mutable_name();
294 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
295 CHK_(ptr);
296 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Api.name"));
297 } else
298 goto handle_unusual;
299 continue;
300 // repeated .google.protobuf.Method methods = 2;
301 case 2:
302 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
303 ptr -= 1;
304 do {
305 ptr += 1;
306 ptr = ctx->ParseMessage(_internal_add_methods(), ptr);
307 CHK_(ptr);
308 if (!ctx->DataAvailable(ptr)) break;
309 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
310 } else
311 goto handle_unusual;
312 continue;
313 // repeated .google.protobuf.Option options = 3;
314 case 3:
315 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
316 ptr -= 1;
317 do {
318 ptr += 1;
319 ptr = ctx->ParseMessage(_internal_add_options(), ptr);
320 CHK_(ptr);
321 if (!ctx->DataAvailable(ptr)) break;
322 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
323 } else
324 goto handle_unusual;
325 continue;
326 // string version = 4;
327 case 4:
328 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
329 auto str = _internal_mutable_version();
330 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
331 CHK_(ptr);
332 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Api.version"));
333 } else
334 goto handle_unusual;
335 continue;
336 // .google.protobuf.SourceContext source_context = 5;
337 case 5:
338 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
339 ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr);
340 CHK_(ptr);
341 } else
342 goto handle_unusual;
343 continue;
344 // repeated .google.protobuf.Mixin mixins = 6;
345 case 6:
346 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
347 ptr -= 1;
348 do {
349 ptr += 1;
350 ptr = ctx->ParseMessage(_internal_add_mixins(), ptr);
351 CHK_(ptr);
352 if (!ctx->DataAvailable(ptr)) break;
353 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
354 } else
355 goto handle_unusual;
356 continue;
357 // .google.protobuf.Syntax syntax = 7;
358 case 7:
359 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
360 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
361 CHK_(ptr);
362 _internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
363 } else
364 goto handle_unusual;
365 continue;
366 default:
367 goto handle_unusual;
368 } // switch
369 handle_unusual:
370 if ((tag == 0) || ((tag & 7) == 4)) {
371 CHK_(ptr);
372 ctx->SetLastTag(tag);
373 goto message_done;
374 }
375 ptr = UnknownFieldParse(
376 tag,
377 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
378 ptr, ctx);
379 CHK_(ptr != nullptr);
380 } // while
381 message_done:
382 return ptr;
383 failure:
384 ptr = nullptr;
385 goto message_done;
386 #undef CHK_
387 }
388
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const389 uint8_t* Api::_InternalSerialize(
390 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
391 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api)
392 uint32_t cached_has_bits = 0;
393 (void) cached_has_bits;
394
395 // string name = 1;
396 if (!this->_internal_name().empty()) {
397 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
398 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
399 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
400 "google.protobuf.Api.name");
401 target = stream->WriteStringMaybeAliased(
402 1, this->_internal_name(), target);
403 }
404
405 // repeated .google.protobuf.Method methods = 2;
406 for (unsigned i = 0,
407 n = static_cast<unsigned>(this->_internal_methods_size()); i < n; i++) {
408 const auto& repfield = this->_internal_methods(i);
409 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
410 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
411 }
412
413 // repeated .google.protobuf.Option options = 3;
414 for (unsigned i = 0,
415 n = static_cast<unsigned>(this->_internal_options_size()); i < n; i++) {
416 const auto& repfield = this->_internal_options(i);
417 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
418 InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
419 }
420
421 // string version = 4;
422 if (!this->_internal_version().empty()) {
423 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
424 this->_internal_version().data(), static_cast<int>(this->_internal_version().length()),
425 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
426 "google.protobuf.Api.version");
427 target = stream->WriteStringMaybeAliased(
428 4, this->_internal_version(), target);
429 }
430
431 // .google.protobuf.SourceContext source_context = 5;
432 if (this->_internal_has_source_context()) {
433 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
434 InternalWriteMessage(5, _Internal::source_context(this),
435 _Internal::source_context(this).GetCachedSize(), target, stream);
436 }
437
438 // repeated .google.protobuf.Mixin mixins = 6;
439 for (unsigned i = 0,
440 n = static_cast<unsigned>(this->_internal_mixins_size()); i < n; i++) {
441 const auto& repfield = this->_internal_mixins(i);
442 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
443 InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
444 }
445
446 // .google.protobuf.Syntax syntax = 7;
447 if (this->_internal_syntax() != 0) {
448 target = stream->EnsureSpace(target);
449 target = ::_pbi::WireFormatLite::WriteEnumToArray(
450 7, this->_internal_syntax(), target);
451 }
452
453 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
454 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
455 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
456 }
457 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api)
458 return target;
459 }
460
ByteSizeLong() const461 size_t Api::ByteSizeLong() const {
462 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api)
463 size_t total_size = 0;
464
465 uint32_t cached_has_bits = 0;
466 // Prevent compiler warnings about cached_has_bits being unused
467 (void) cached_has_bits;
468
469 // repeated .google.protobuf.Method methods = 2;
470 total_size += 1UL * this->_internal_methods_size();
471 for (const auto& msg : this->methods_) {
472 total_size +=
473 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
474 }
475
476 // repeated .google.protobuf.Option options = 3;
477 total_size += 1UL * this->_internal_options_size();
478 for (const auto& msg : this->options_) {
479 total_size +=
480 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
481 }
482
483 // repeated .google.protobuf.Mixin mixins = 6;
484 total_size += 1UL * this->_internal_mixins_size();
485 for (const auto& msg : this->mixins_) {
486 total_size +=
487 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
488 }
489
490 // string name = 1;
491 if (!this->_internal_name().empty()) {
492 total_size += 1 +
493 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
494 this->_internal_name());
495 }
496
497 // string version = 4;
498 if (!this->_internal_version().empty()) {
499 total_size += 1 +
500 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
501 this->_internal_version());
502 }
503
504 // .google.protobuf.SourceContext source_context = 5;
505 if (this->_internal_has_source_context()) {
506 total_size += 1 +
507 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
508 *source_context_);
509 }
510
511 // .google.protobuf.Syntax syntax = 7;
512 if (this->_internal_syntax() != 0) {
513 total_size += 1 +
514 ::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
515 }
516
517 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
518 }
519
520 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Api::_class_data_ = {
521 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
522 Api::MergeImpl
523 };
GetClassData() const524 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Api::GetClassData() const { return &_class_data_; }
525
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)526 void Api::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
527 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
528 static_cast<Api *>(to)->MergeFrom(
529 static_cast<const Api &>(from));
530 }
531
532
MergeFrom(const Api & from)533 void Api::MergeFrom(const Api& from) {
534 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api)
535 GOOGLE_DCHECK_NE(&from, this);
536 uint32_t cached_has_bits = 0;
537 (void) cached_has_bits;
538
539 methods_.MergeFrom(from.methods_);
540 options_.MergeFrom(from.options_);
541 mixins_.MergeFrom(from.mixins_);
542 if (!from._internal_name().empty()) {
543 _internal_set_name(from._internal_name());
544 }
545 if (!from._internal_version().empty()) {
546 _internal_set_version(from._internal_version());
547 }
548 if (from._internal_has_source_context()) {
549 _internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context());
550 }
551 if (from._internal_syntax() != 0) {
552 _internal_set_syntax(from._internal_syntax());
553 }
554 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
555 }
556
CopyFrom(const Api & from)557 void Api::CopyFrom(const Api& from) {
558 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Api)
559 if (&from == this) return;
560 Clear();
561 MergeFrom(from);
562 }
563
IsInitialized() const564 bool Api::IsInitialized() const {
565 return true;
566 }
567
InternalSwap(Api * other)568 void Api::InternalSwap(Api* other) {
569 using std::swap;
570 auto* lhs_arena = GetArenaForAllocation();
571 auto* rhs_arena = other->GetArenaForAllocation();
572 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
573 methods_.InternalSwap(&other->methods_);
574 options_.InternalSwap(&other->options_);
575 mixins_.InternalSwap(&other->mixins_);
576 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
577 &name_, lhs_arena,
578 &other->name_, rhs_arena
579 );
580 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
581 &version_, lhs_arena,
582 &other->version_, rhs_arena
583 );
584 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
585 PROTOBUF_FIELD_OFFSET(Api, syntax_)
586 + sizeof(Api::syntax_)
587 - PROTOBUF_FIELD_OFFSET(Api, source_context_)>(
588 reinterpret_cast<char*>(&source_context_),
589 reinterpret_cast<char*>(&other->source_context_));
590 }
591
GetMetadata() const592 ::PROTOBUF_NAMESPACE_ID::Metadata Api::GetMetadata() const {
593 return ::_pbi::AssignDescriptors(
594 &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once,
595 file_level_metadata_google_2fprotobuf_2fapi_2eproto[0]);
596 }
597
598 // ===================================================================
599
600 class Method::_Internal {
601 public:
602 };
603
clear_options()604 void Method::clear_options() {
605 options_.Clear();
606 }
Method(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)607 Method::Method(::PROTOBUF_NAMESPACE_ID::Arena* arena,
608 bool is_message_owned)
609 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
610 options_(arena) {
611 SharedCtor();
612 // @@protoc_insertion_point(arena_constructor:google.protobuf.Method)
613 }
Method(const Method & from)614 Method::Method(const Method& from)
615 : ::PROTOBUF_NAMESPACE_ID::Message(),
616 options_(from.options_) {
617 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
618 name_.InitDefault();
619 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
620 name_.Set("", GetArenaForAllocation());
621 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
622 if (!from._internal_name().empty()) {
623 name_.Set(from._internal_name(),
624 GetArenaForAllocation());
625 }
626 request_type_url_.InitDefault();
627 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
628 request_type_url_.Set("", GetArenaForAllocation());
629 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
630 if (!from._internal_request_type_url().empty()) {
631 request_type_url_.Set(from._internal_request_type_url(),
632 GetArenaForAllocation());
633 }
634 response_type_url_.InitDefault();
635 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
636 response_type_url_.Set("", GetArenaForAllocation());
637 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
638 if (!from._internal_response_type_url().empty()) {
639 response_type_url_.Set(from._internal_response_type_url(),
640 GetArenaForAllocation());
641 }
642 ::memcpy(&request_streaming_, &from.request_streaming_,
643 static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
644 reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
645 // @@protoc_insertion_point(copy_constructor:google.protobuf.Method)
646 }
647
SharedCtor()648 inline void Method::SharedCtor() {
649 name_.InitDefault();
650 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
651 name_.Set("", GetArenaForAllocation());
652 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
653 request_type_url_.InitDefault();
654 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
655 request_type_url_.Set("", GetArenaForAllocation());
656 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
657 response_type_url_.InitDefault();
658 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
659 response_type_url_.Set("", GetArenaForAllocation());
660 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
661 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
662 reinterpret_cast<char*>(&request_streaming_) - reinterpret_cast<char*>(this)),
663 0, static_cast<size_t>(reinterpret_cast<char*>(&syntax_) -
664 reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
665 }
666
~Method()667 Method::~Method() {
668 // @@protoc_insertion_point(destructor:google.protobuf.Method)
669 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
670 (void)arena;
671 return;
672 }
673 SharedDtor();
674 }
675
SharedDtor()676 inline void Method::SharedDtor() {
677 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
678 name_.Destroy();
679 request_type_url_.Destroy();
680 response_type_url_.Destroy();
681 }
682
SetCachedSize(int size) const683 void Method::SetCachedSize(int size) const {
684 _cached_size_.Set(size);
685 }
686
Clear()687 void Method::Clear() {
688 // @@protoc_insertion_point(message_clear_start:google.protobuf.Method)
689 uint32_t cached_has_bits = 0;
690 // Prevent compiler warnings about cached_has_bits being unused
691 (void) cached_has_bits;
692
693 options_.Clear();
694 name_.ClearToEmpty();
695 request_type_url_.ClearToEmpty();
696 response_type_url_.ClearToEmpty();
697 ::memset(&request_streaming_, 0, static_cast<size_t>(
698 reinterpret_cast<char*>(&syntax_) -
699 reinterpret_cast<char*>(&request_streaming_)) + sizeof(syntax_));
700 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
701 }
702
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)703 const char* Method::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
704 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
705 while (!ctx->Done(&ptr)) {
706 uint32_t tag;
707 ptr = ::_pbi::ReadTag(ptr, &tag);
708 switch (tag >> 3) {
709 // string name = 1;
710 case 1:
711 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
712 auto str = _internal_mutable_name();
713 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
714 CHK_(ptr);
715 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Method.name"));
716 } else
717 goto handle_unusual;
718 continue;
719 // string request_type_url = 2;
720 case 2:
721 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
722 auto str = _internal_mutable_request_type_url();
723 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
724 CHK_(ptr);
725 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Method.request_type_url"));
726 } else
727 goto handle_unusual;
728 continue;
729 // bool request_streaming = 3;
730 case 3:
731 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
732 request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
733 CHK_(ptr);
734 } else
735 goto handle_unusual;
736 continue;
737 // string response_type_url = 4;
738 case 4:
739 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
740 auto str = _internal_mutable_response_type_url();
741 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
742 CHK_(ptr);
743 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Method.response_type_url"));
744 } else
745 goto handle_unusual;
746 continue;
747 // bool response_streaming = 5;
748 case 5:
749 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
750 response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
751 CHK_(ptr);
752 } else
753 goto handle_unusual;
754 continue;
755 // repeated .google.protobuf.Option options = 6;
756 case 6:
757 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
758 ptr -= 1;
759 do {
760 ptr += 1;
761 ptr = ctx->ParseMessage(_internal_add_options(), ptr);
762 CHK_(ptr);
763 if (!ctx->DataAvailable(ptr)) break;
764 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
765 } else
766 goto handle_unusual;
767 continue;
768 // .google.protobuf.Syntax syntax = 7;
769 case 7:
770 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
771 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
772 CHK_(ptr);
773 _internal_set_syntax(static_cast<::PROTOBUF_NAMESPACE_ID::Syntax>(val));
774 } else
775 goto handle_unusual;
776 continue;
777 default:
778 goto handle_unusual;
779 } // switch
780 handle_unusual:
781 if ((tag == 0) || ((tag & 7) == 4)) {
782 CHK_(ptr);
783 ctx->SetLastTag(tag);
784 goto message_done;
785 }
786 ptr = UnknownFieldParse(
787 tag,
788 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
789 ptr, ctx);
790 CHK_(ptr != nullptr);
791 } // while
792 message_done:
793 return ptr;
794 failure:
795 ptr = nullptr;
796 goto message_done;
797 #undef CHK_
798 }
799
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const800 uint8_t* Method::_InternalSerialize(
801 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
802 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method)
803 uint32_t cached_has_bits = 0;
804 (void) cached_has_bits;
805
806 // string name = 1;
807 if (!this->_internal_name().empty()) {
808 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
809 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
810 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
811 "google.protobuf.Method.name");
812 target = stream->WriteStringMaybeAliased(
813 1, this->_internal_name(), target);
814 }
815
816 // string request_type_url = 2;
817 if (!this->_internal_request_type_url().empty()) {
818 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
819 this->_internal_request_type_url().data(), static_cast<int>(this->_internal_request_type_url().length()),
820 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
821 "google.protobuf.Method.request_type_url");
822 target = stream->WriteStringMaybeAliased(
823 2, this->_internal_request_type_url(), target);
824 }
825
826 // bool request_streaming = 3;
827 if (this->_internal_request_streaming() != 0) {
828 target = stream->EnsureSpace(target);
829 target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_request_streaming(), target);
830 }
831
832 // string response_type_url = 4;
833 if (!this->_internal_response_type_url().empty()) {
834 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
835 this->_internal_response_type_url().data(), static_cast<int>(this->_internal_response_type_url().length()),
836 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
837 "google.protobuf.Method.response_type_url");
838 target = stream->WriteStringMaybeAliased(
839 4, this->_internal_response_type_url(), target);
840 }
841
842 // bool response_streaming = 5;
843 if (this->_internal_response_streaming() != 0) {
844 target = stream->EnsureSpace(target);
845 target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_response_streaming(), target);
846 }
847
848 // repeated .google.protobuf.Option options = 6;
849 for (unsigned i = 0,
850 n = static_cast<unsigned>(this->_internal_options_size()); i < n; i++) {
851 const auto& repfield = this->_internal_options(i);
852 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
853 InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
854 }
855
856 // .google.protobuf.Syntax syntax = 7;
857 if (this->_internal_syntax() != 0) {
858 target = stream->EnsureSpace(target);
859 target = ::_pbi::WireFormatLite::WriteEnumToArray(
860 7, this->_internal_syntax(), target);
861 }
862
863 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
864 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
865 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
866 }
867 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method)
868 return target;
869 }
870
ByteSizeLong() const871 size_t Method::ByteSizeLong() const {
872 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method)
873 size_t total_size = 0;
874
875 uint32_t cached_has_bits = 0;
876 // Prevent compiler warnings about cached_has_bits being unused
877 (void) cached_has_bits;
878
879 // repeated .google.protobuf.Option options = 6;
880 total_size += 1UL * this->_internal_options_size();
881 for (const auto& msg : this->options_) {
882 total_size +=
883 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
884 }
885
886 // string name = 1;
887 if (!this->_internal_name().empty()) {
888 total_size += 1 +
889 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
890 this->_internal_name());
891 }
892
893 // string request_type_url = 2;
894 if (!this->_internal_request_type_url().empty()) {
895 total_size += 1 +
896 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
897 this->_internal_request_type_url());
898 }
899
900 // string response_type_url = 4;
901 if (!this->_internal_response_type_url().empty()) {
902 total_size += 1 +
903 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
904 this->_internal_response_type_url());
905 }
906
907 // bool request_streaming = 3;
908 if (this->_internal_request_streaming() != 0) {
909 total_size += 1 + 1;
910 }
911
912 // bool response_streaming = 5;
913 if (this->_internal_response_streaming() != 0) {
914 total_size += 1 + 1;
915 }
916
917 // .google.protobuf.Syntax syntax = 7;
918 if (this->_internal_syntax() != 0) {
919 total_size += 1 +
920 ::_pbi::WireFormatLite::EnumSize(this->_internal_syntax());
921 }
922
923 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
924 }
925
926 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Method::_class_data_ = {
927 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
928 Method::MergeImpl
929 };
GetClassData() const930 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Method::GetClassData() const { return &_class_data_; }
931
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)932 void Method::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
933 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
934 static_cast<Method *>(to)->MergeFrom(
935 static_cast<const Method &>(from));
936 }
937
938
MergeFrom(const Method & from)939 void Method::MergeFrom(const Method& from) {
940 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method)
941 GOOGLE_DCHECK_NE(&from, this);
942 uint32_t cached_has_bits = 0;
943 (void) cached_has_bits;
944
945 options_.MergeFrom(from.options_);
946 if (!from._internal_name().empty()) {
947 _internal_set_name(from._internal_name());
948 }
949 if (!from._internal_request_type_url().empty()) {
950 _internal_set_request_type_url(from._internal_request_type_url());
951 }
952 if (!from._internal_response_type_url().empty()) {
953 _internal_set_response_type_url(from._internal_response_type_url());
954 }
955 if (from._internal_request_streaming() != 0) {
956 _internal_set_request_streaming(from._internal_request_streaming());
957 }
958 if (from._internal_response_streaming() != 0) {
959 _internal_set_response_streaming(from._internal_response_streaming());
960 }
961 if (from._internal_syntax() != 0) {
962 _internal_set_syntax(from._internal_syntax());
963 }
964 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
965 }
966
CopyFrom(const Method & from)967 void Method::CopyFrom(const Method& from) {
968 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Method)
969 if (&from == this) return;
970 Clear();
971 MergeFrom(from);
972 }
973
IsInitialized() const974 bool Method::IsInitialized() const {
975 return true;
976 }
977
InternalSwap(Method * other)978 void Method::InternalSwap(Method* other) {
979 using std::swap;
980 auto* lhs_arena = GetArenaForAllocation();
981 auto* rhs_arena = other->GetArenaForAllocation();
982 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
983 options_.InternalSwap(&other->options_);
984 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
985 &name_, lhs_arena,
986 &other->name_, rhs_arena
987 );
988 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
989 &request_type_url_, lhs_arena,
990 &other->request_type_url_, rhs_arena
991 );
992 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
993 &response_type_url_, lhs_arena,
994 &other->response_type_url_, rhs_arena
995 );
996 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
997 PROTOBUF_FIELD_OFFSET(Method, syntax_)
998 + sizeof(Method::syntax_)
999 - PROTOBUF_FIELD_OFFSET(Method, request_streaming_)>(
1000 reinterpret_cast<char*>(&request_streaming_),
1001 reinterpret_cast<char*>(&other->request_streaming_));
1002 }
1003
GetMetadata() const1004 ::PROTOBUF_NAMESPACE_ID::Metadata Method::GetMetadata() const {
1005 return ::_pbi::AssignDescriptors(
1006 &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once,
1007 file_level_metadata_google_2fprotobuf_2fapi_2eproto[1]);
1008 }
1009
1010 // ===================================================================
1011
1012 class Mixin::_Internal {
1013 public:
1014 };
1015
Mixin(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1016 Mixin::Mixin(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1017 bool is_message_owned)
1018 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
1019 SharedCtor();
1020 // @@protoc_insertion_point(arena_constructor:google.protobuf.Mixin)
1021 }
Mixin(const Mixin & from)1022 Mixin::Mixin(const Mixin& from)
1023 : ::PROTOBUF_NAMESPACE_ID::Message() {
1024 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1025 name_.InitDefault();
1026 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1027 name_.Set("", GetArenaForAllocation());
1028 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1029 if (!from._internal_name().empty()) {
1030 name_.Set(from._internal_name(),
1031 GetArenaForAllocation());
1032 }
1033 root_.InitDefault();
1034 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1035 root_.Set("", GetArenaForAllocation());
1036 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1037 if (!from._internal_root().empty()) {
1038 root_.Set(from._internal_root(),
1039 GetArenaForAllocation());
1040 }
1041 // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin)
1042 }
1043
SharedCtor()1044 inline void Mixin::SharedCtor() {
1045 name_.InitDefault();
1046 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1047 name_.Set("", GetArenaForAllocation());
1048 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1049 root_.InitDefault();
1050 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1051 root_.Set("", GetArenaForAllocation());
1052 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1053 }
1054
~Mixin()1055 Mixin::~Mixin() {
1056 // @@protoc_insertion_point(destructor:google.protobuf.Mixin)
1057 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
1058 (void)arena;
1059 return;
1060 }
1061 SharedDtor();
1062 }
1063
SharedDtor()1064 inline void Mixin::SharedDtor() {
1065 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1066 name_.Destroy();
1067 root_.Destroy();
1068 }
1069
SetCachedSize(int size) const1070 void Mixin::SetCachedSize(int size) const {
1071 _cached_size_.Set(size);
1072 }
1073
Clear()1074 void Mixin::Clear() {
1075 // @@protoc_insertion_point(message_clear_start:google.protobuf.Mixin)
1076 uint32_t cached_has_bits = 0;
1077 // Prevent compiler warnings about cached_has_bits being unused
1078 (void) cached_has_bits;
1079
1080 name_.ClearToEmpty();
1081 root_.ClearToEmpty();
1082 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1083 }
1084
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1085 const char* Mixin::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1086 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1087 while (!ctx->Done(&ptr)) {
1088 uint32_t tag;
1089 ptr = ::_pbi::ReadTag(ptr, &tag);
1090 switch (tag >> 3) {
1091 // string name = 1;
1092 case 1:
1093 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
1094 auto str = _internal_mutable_name();
1095 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1096 CHK_(ptr);
1097 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Mixin.name"));
1098 } else
1099 goto handle_unusual;
1100 continue;
1101 // string root = 2;
1102 case 2:
1103 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
1104 auto str = _internal_mutable_root();
1105 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1106 CHK_(ptr);
1107 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Mixin.root"));
1108 } else
1109 goto handle_unusual;
1110 continue;
1111 default:
1112 goto handle_unusual;
1113 } // switch
1114 handle_unusual:
1115 if ((tag == 0) || ((tag & 7) == 4)) {
1116 CHK_(ptr);
1117 ctx->SetLastTag(tag);
1118 goto message_done;
1119 }
1120 ptr = UnknownFieldParse(
1121 tag,
1122 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1123 ptr, ctx);
1124 CHK_(ptr != nullptr);
1125 } // while
1126 message_done:
1127 return ptr;
1128 failure:
1129 ptr = nullptr;
1130 goto message_done;
1131 #undef CHK_
1132 }
1133
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1134 uint8_t* Mixin::_InternalSerialize(
1135 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1136 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin)
1137 uint32_t cached_has_bits = 0;
1138 (void) cached_has_bits;
1139
1140 // string name = 1;
1141 if (!this->_internal_name().empty()) {
1142 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1143 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
1144 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1145 "google.protobuf.Mixin.name");
1146 target = stream->WriteStringMaybeAliased(
1147 1, this->_internal_name(), target);
1148 }
1149
1150 // string root = 2;
1151 if (!this->_internal_root().empty()) {
1152 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1153 this->_internal_root().data(), static_cast<int>(this->_internal_root().length()),
1154 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1155 "google.protobuf.Mixin.root");
1156 target = stream->WriteStringMaybeAliased(
1157 2, this->_internal_root(), target);
1158 }
1159
1160 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1161 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1162 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1163 }
1164 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin)
1165 return target;
1166 }
1167
ByteSizeLong() const1168 size_t Mixin::ByteSizeLong() const {
1169 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin)
1170 size_t total_size = 0;
1171
1172 uint32_t cached_has_bits = 0;
1173 // Prevent compiler warnings about cached_has_bits being unused
1174 (void) cached_has_bits;
1175
1176 // string name = 1;
1177 if (!this->_internal_name().empty()) {
1178 total_size += 1 +
1179 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1180 this->_internal_name());
1181 }
1182
1183 // string root = 2;
1184 if (!this->_internal_root().empty()) {
1185 total_size += 1 +
1186 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1187 this->_internal_root());
1188 }
1189
1190 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
1191 }
1192
1193 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Mixin::_class_data_ = {
1194 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
1195 Mixin::MergeImpl
1196 };
GetClassData() const1197 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Mixin::GetClassData() const { return &_class_data_; }
1198
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)1199 void Mixin::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
1200 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1201 static_cast<Mixin *>(to)->MergeFrom(
1202 static_cast<const Mixin &>(from));
1203 }
1204
1205
MergeFrom(const Mixin & from)1206 void Mixin::MergeFrom(const Mixin& from) {
1207 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin)
1208 GOOGLE_DCHECK_NE(&from, this);
1209 uint32_t cached_has_bits = 0;
1210 (void) cached_has_bits;
1211
1212 if (!from._internal_name().empty()) {
1213 _internal_set_name(from._internal_name());
1214 }
1215 if (!from._internal_root().empty()) {
1216 _internal_set_root(from._internal_root());
1217 }
1218 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1219 }
1220
CopyFrom(const Mixin & from)1221 void Mixin::CopyFrom(const Mixin& from) {
1222 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Mixin)
1223 if (&from == this) return;
1224 Clear();
1225 MergeFrom(from);
1226 }
1227
IsInitialized() const1228 bool Mixin::IsInitialized() const {
1229 return true;
1230 }
1231
InternalSwap(Mixin * other)1232 void Mixin::InternalSwap(Mixin* other) {
1233 using std::swap;
1234 auto* lhs_arena = GetArenaForAllocation();
1235 auto* rhs_arena = other->GetArenaForAllocation();
1236 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1237 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1238 &name_, lhs_arena,
1239 &other->name_, rhs_arena
1240 );
1241 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1242 &root_, lhs_arena,
1243 &other->root_, rhs_arena
1244 );
1245 }
1246
GetMetadata() const1247 ::PROTOBUF_NAMESPACE_ID::Metadata Mixin::GetMetadata() const {
1248 return ::_pbi::AssignDescriptors(
1249 &descriptor_table_google_2fprotobuf_2fapi_2eproto_getter, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once,
1250 file_level_metadata_google_2fprotobuf_2fapi_2eproto[2]);
1251 }
1252
1253 // @@protoc_insertion_point(namespace_scope)
1254 PROTOBUF_NAMESPACE_CLOSE
1255 PROTOBUF_NAMESPACE_OPEN
1256 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Api*
CreateMaybeMessage(Arena * arena)1257 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Api >(Arena* arena) {
1258 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Api >(arena);
1259 }
1260 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Method*
CreateMaybeMessage(Arena * arena)1261 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Method >(Arena* arena) {
1262 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Method >(arena);
1263 }
1264 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Mixin*
CreateMaybeMessage(Arena * arena)1265 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Mixin >(Arena* arena) {
1266 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Mixin >(arena);
1267 }
1268 PROTOBUF_NAMESPACE_CLOSE
1269
1270 // @@protoc_insertion_point(global_scope)
1271 #include <google/protobuf/port_undef.inc>
1272