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