1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/compiler/plugin.proto
3
4 #include <google/protobuf/compiler/plugin.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
24 namespace compiler {
Version(::_pbi::ConstantInitialized)25 PROTOBUF_CONSTEXPR Version::Version(
26 ::_pbi::ConstantInitialized)
27 : suffix_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
28 , major_(0)
29 , minor_(0)
30 , patch_(0){}
31 struct VersionDefaultTypeInternal {
VersionDefaultTypeInternalcompiler::VersionDefaultTypeInternal32 PROTOBUF_CONSTEXPR VersionDefaultTypeInternal()
33 : _instance(::_pbi::ConstantInitialized{}) {}
~VersionDefaultTypeInternalcompiler::VersionDefaultTypeInternal34 ~VersionDefaultTypeInternal() {}
35 union {
36 Version _instance;
37 };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VersionDefaultTypeInternal _Version_default_instance_;
CodeGeneratorRequest(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR CodeGeneratorRequest::CodeGeneratorRequest(
41 ::_pbi::ConstantInitialized)
42 : file_to_generate_()
43 , proto_file_()
44 , parameter_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
45 , compiler_version_(nullptr){}
46 struct CodeGeneratorRequestDefaultTypeInternal {
CodeGeneratorRequestDefaultTypeInternalcompiler::CodeGeneratorRequestDefaultTypeInternal47 PROTOBUF_CONSTEXPR CodeGeneratorRequestDefaultTypeInternal()
48 : _instance(::_pbi::ConstantInitialized{}) {}
~CodeGeneratorRequestDefaultTypeInternalcompiler::CodeGeneratorRequestDefaultTypeInternal49 ~CodeGeneratorRequestDefaultTypeInternal() {}
50 union {
51 CodeGeneratorRequest _instance;
52 };
53 };
54 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeGeneratorRequestDefaultTypeInternal _CodeGeneratorRequest_default_instance_;
CodeGeneratorResponse_File(::_pbi::ConstantInitialized)55 PROTOBUF_CONSTEXPR CodeGeneratorResponse_File::CodeGeneratorResponse_File(
56 ::_pbi::ConstantInitialized)
57 : name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
58 , insertion_point_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
59 , content_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
60 , generated_code_info_(nullptr){}
61 struct CodeGeneratorResponse_FileDefaultTypeInternal {
CodeGeneratorResponse_FileDefaultTypeInternalcompiler::CodeGeneratorResponse_FileDefaultTypeInternal62 PROTOBUF_CONSTEXPR CodeGeneratorResponse_FileDefaultTypeInternal()
63 : _instance(::_pbi::ConstantInitialized{}) {}
~CodeGeneratorResponse_FileDefaultTypeInternalcompiler::CodeGeneratorResponse_FileDefaultTypeInternal64 ~CodeGeneratorResponse_FileDefaultTypeInternal() {}
65 union {
66 CodeGeneratorResponse_File _instance;
67 };
68 };
69 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeGeneratorResponse_FileDefaultTypeInternal _CodeGeneratorResponse_File_default_instance_;
CodeGeneratorResponse(::_pbi::ConstantInitialized)70 PROTOBUF_CONSTEXPR CodeGeneratorResponse::CodeGeneratorResponse(
71 ::_pbi::ConstantInitialized)
72 : file_()
73 , error_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
74 , supported_features_(uint64_t{0u}){}
75 struct CodeGeneratorResponseDefaultTypeInternal {
CodeGeneratorResponseDefaultTypeInternalcompiler::CodeGeneratorResponseDefaultTypeInternal76 PROTOBUF_CONSTEXPR CodeGeneratorResponseDefaultTypeInternal()
77 : _instance(::_pbi::ConstantInitialized{}) {}
~CodeGeneratorResponseDefaultTypeInternalcompiler::CodeGeneratorResponseDefaultTypeInternal78 ~CodeGeneratorResponseDefaultTypeInternal() {}
79 union {
80 CodeGeneratorResponse _instance;
81 };
82 };
83 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeGeneratorResponseDefaultTypeInternal _CodeGeneratorResponse_default_instance_;
84 } // namespace compiler
85 PROTOBUF_NAMESPACE_CLOSE
86 static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[4];
87 static const ::_pb::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto[1];
88 static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr;
89
90 const uint32_t TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
91 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _has_bits_),
92 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, _internal_metadata_),
93 ~0u, // no _extensions_
94 ~0u, // no _oneof_case_
95 ~0u, // no _weak_field_map_
96 ~0u, // no _inlined_string_donated_
97 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, major_),
98 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, minor_),
99 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, patch_),
100 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::Version, suffix_),
101 1,
102 2,
103 3,
104 0,
105 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _has_bits_),
106 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _internal_metadata_),
107 ~0u, // no _extensions_
108 ~0u, // no _oneof_case_
109 ~0u, // no _weak_field_map_
110 ~0u, // no _inlined_string_donated_
111 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, file_to_generate_),
112 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, parameter_),
113 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, proto_file_),
114 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, compiler_version_),
115 ~0u,
116 0,
117 ~0u,
118 1,
119 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _has_bits_),
120 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _internal_metadata_),
121 ~0u, // no _extensions_
122 ~0u, // no _oneof_case_
123 ~0u, // no _weak_field_map_
124 ~0u, // no _inlined_string_donated_
125 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, name_),
126 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, insertion_point_),
127 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, content_),
128 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, generated_code_info_),
129 0,
130 1,
131 2,
132 3,
133 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _has_bits_),
134 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _internal_metadata_),
135 ~0u, // no _extensions_
136 ~0u, // no _oneof_case_
137 ~0u, // no _weak_field_map_
138 ~0u, // no _inlined_string_donated_
139 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, error_),
140 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, supported_features_),
141 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, file_),
142 0,
143 1,
144 ~0u,
145 };
146 static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
147 { 0, 10, -1, sizeof(::PROTOBUF_NAMESPACE_ID::compiler::Version)},
148 { 14, 24, -1, sizeof(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest)},
149 { 28, 38, -1, sizeof(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File)},
150 { 42, 51, -1, sizeof(::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse)},
151 };
152
153 static const ::_pb::Message* const file_default_instances[] = {
154 &::PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_._instance,
155 &::PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_._instance,
156 &::PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_File_default_instance_._instance,
157 &::PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_._instance,
158 };
159
160 const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
161 "\n%google/protobuf/compiler/plugin.proto\022"
162 "\030google.protobuf.compiler\032 google/protob"
163 "uf/descriptor.proto\"F\n\007Version\022\r\n\005major\030"
164 "\001 \001(\005\022\r\n\005minor\030\002 \001(\005\022\r\n\005patch\030\003 \001(\005\022\016\n\006s"
165 "uffix\030\004 \001(\t\"\272\001\n\024CodeGeneratorRequest\022\030\n\020"
166 "file_to_generate\030\001 \003(\t\022\021\n\tparameter\030\002 \001("
167 "\t\0228\n\nproto_file\030\017 \003(\0132$.google.protobuf."
168 "FileDescriptorProto\022;\n\020compiler_version\030"
169 "\003 \001(\0132!.google.protobuf.compiler.Version"
170 "\"\301\002\n\025CodeGeneratorResponse\022\r\n\005error\030\001 \001("
171 "\t\022\032\n\022supported_features\030\002 \001(\004\022B\n\004file\030\017 "
172 "\003(\01324.google.protobuf.compiler.CodeGener"
173 "atorResponse.File\032\177\n\004File\022\014\n\004name\030\001 \001(\t\022"
174 "\027\n\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001("
175 "\t\022\?\n\023generated_code_info\030\020 \001(\0132\".google."
176 "protobuf.GeneratedCodeInfo\"8\n\007Feature\022\020\n"
177 "\014FEATURE_NONE\020\000\022\033\n\027FEATURE_PROTO3_OPTION"
178 "AL\020\001BW\n\034com.google.protobuf.compilerB\014Pl"
179 "uginProtosZ)google.golang.org/protobuf/t"
180 "ypes/pluginpb"
181 ;
182 static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_deps[1] = {
183 &::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto,
184 };
185 static ::_pbi::once_flag descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once;
186 const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = {
187 false, false, 773, descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
188 "google/protobuf/compiler/plugin.proto",
189 &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once, descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_deps, 1, 4,
190 schemas, file_default_instances, TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets,
191 file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto, file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
192 file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
193 };
descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter()194 PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter() {
195 return &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
196 }
197
198 // Force running AddDescriptors() at dynamic initialization time.
199 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fcompiler_2fplugin_2eproto(&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
200 PROTOBUF_NAMESPACE_OPEN
201 namespace compiler {
CodeGeneratorResponse_Feature_descriptor()202 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CodeGeneratorResponse_Feature_descriptor() {
203 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
204 return file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto[0];
205 }
CodeGeneratorResponse_Feature_IsValid(int value)206 bool CodeGeneratorResponse_Feature_IsValid(int value) {
207 switch (value) {
208 case 0:
209 case 1:
210 return true;
211 default:
212 return false;
213 }
214 }
215
216 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
217 constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::FEATURE_NONE;
218 constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::FEATURE_PROTO3_OPTIONAL;
219 constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::Feature_MIN;
220 constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::Feature_MAX;
221 constexpr int CodeGeneratorResponse::Feature_ARRAYSIZE;
222 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
223
224 // ===================================================================
225
226 class Version::_Internal {
227 public:
228 using HasBits = decltype(std::declval<Version>()._has_bits_);
set_has_major(HasBits * has_bits)229 static void set_has_major(HasBits* has_bits) {
230 (*has_bits)[0] |= 2u;
231 }
set_has_minor(HasBits * has_bits)232 static void set_has_minor(HasBits* has_bits) {
233 (*has_bits)[0] |= 4u;
234 }
set_has_patch(HasBits * has_bits)235 static void set_has_patch(HasBits* has_bits) {
236 (*has_bits)[0] |= 8u;
237 }
set_has_suffix(HasBits * has_bits)238 static void set_has_suffix(HasBits* has_bits) {
239 (*has_bits)[0] |= 1u;
240 }
241 };
242
Version(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)243 Version::Version(::PROTOBUF_NAMESPACE_ID::Arena* arena,
244 bool is_message_owned)
245 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
246 SharedCtor();
247 // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.Version)
248 }
Version(const Version & from)249 Version::Version(const Version& from)
250 : ::PROTOBUF_NAMESPACE_ID::Message(),
251 _has_bits_(from._has_bits_) {
252 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
253 suffix_.InitDefault();
254 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
255 suffix_.Set("", GetArenaForAllocation());
256 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
257 if (from._internal_has_suffix()) {
258 suffix_.Set(from._internal_suffix(),
259 GetArenaForAllocation());
260 }
261 ::memcpy(&major_, &from.major_,
262 static_cast<size_t>(reinterpret_cast<char*>(&patch_) -
263 reinterpret_cast<char*>(&major_)) + sizeof(patch_));
264 // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version)
265 }
266
SharedCtor()267 inline void Version::SharedCtor() {
268 suffix_.InitDefault();
269 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
270 suffix_.Set("", GetArenaForAllocation());
271 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
272 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
273 reinterpret_cast<char*>(&major_) - reinterpret_cast<char*>(this)),
274 0, static_cast<size_t>(reinterpret_cast<char*>(&patch_) -
275 reinterpret_cast<char*>(&major_)) + sizeof(patch_));
276 }
277
~Version()278 Version::~Version() {
279 // @@protoc_insertion_point(destructor:google.protobuf.compiler.Version)
280 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
281 (void)arena;
282 return;
283 }
284 SharedDtor();
285 }
286
SharedDtor()287 inline void Version::SharedDtor() {
288 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
289 suffix_.Destroy();
290 }
291
SetCachedSize(int size) const292 void Version::SetCachedSize(int size) const {
293 _cached_size_.Set(size);
294 }
295
Clear()296 void Version::Clear() {
297 // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.Version)
298 uint32_t cached_has_bits = 0;
299 // Prevent compiler warnings about cached_has_bits being unused
300 (void) cached_has_bits;
301
302 cached_has_bits = _has_bits_[0];
303 if (cached_has_bits & 0x00000001u) {
304 suffix_.ClearNonDefaultToEmpty();
305 }
306 if (cached_has_bits & 0x0000000eu) {
307 ::memset(&major_, 0, static_cast<size_t>(
308 reinterpret_cast<char*>(&patch_) -
309 reinterpret_cast<char*>(&major_)) + sizeof(patch_));
310 }
311 _has_bits_.Clear();
312 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
313 }
314
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)315 const char* Version::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
316 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
317 _Internal::HasBits has_bits{};
318 while (!ctx->Done(&ptr)) {
319 uint32_t tag;
320 ptr = ::_pbi::ReadTag(ptr, &tag);
321 switch (tag >> 3) {
322 // optional int32 major = 1;
323 case 1:
324 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
325 _Internal::set_has_major(&has_bits);
326 major_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
327 CHK_(ptr);
328 } else
329 goto handle_unusual;
330 continue;
331 // optional int32 minor = 2;
332 case 2:
333 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
334 _Internal::set_has_minor(&has_bits);
335 minor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
336 CHK_(ptr);
337 } else
338 goto handle_unusual;
339 continue;
340 // optional int32 patch = 3;
341 case 3:
342 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
343 _Internal::set_has_patch(&has_bits);
344 patch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
345 CHK_(ptr);
346 } else
347 goto handle_unusual;
348 continue;
349 // optional string suffix = 4;
350 case 4:
351 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
352 auto str = _internal_mutable_suffix();
353 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
354 CHK_(ptr);
355 #ifndef NDEBUG
356 ::_pbi::VerifyUTF8(str, "google.protobuf.compiler.Version.suffix");
357 #endif // !NDEBUG
358 } else
359 goto handle_unusual;
360 continue;
361 default:
362 goto handle_unusual;
363 } // switch
364 handle_unusual:
365 if ((tag == 0) || ((tag & 7) == 4)) {
366 CHK_(ptr);
367 ctx->SetLastTag(tag);
368 goto message_done;
369 }
370 ptr = UnknownFieldParse(
371 tag,
372 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
373 ptr, ctx);
374 CHK_(ptr != nullptr);
375 } // while
376 message_done:
377 _has_bits_.Or(has_bits);
378 return ptr;
379 failure:
380 ptr = nullptr;
381 goto message_done;
382 #undef CHK_
383 }
384
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const385 uint8_t* Version::_InternalSerialize(
386 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
387 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version)
388 uint32_t cached_has_bits = 0;
389 (void) cached_has_bits;
390
391 cached_has_bits = _has_bits_[0];
392 // optional int32 major = 1;
393 if (cached_has_bits & 0x00000002u) {
394 target = stream->EnsureSpace(target);
395 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_major(), target);
396 }
397
398 // optional int32 minor = 2;
399 if (cached_has_bits & 0x00000004u) {
400 target = stream->EnsureSpace(target);
401 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_minor(), target);
402 }
403
404 // optional int32 patch = 3;
405 if (cached_has_bits & 0x00000008u) {
406 target = stream->EnsureSpace(target);
407 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_patch(), target);
408 }
409
410 // optional string suffix = 4;
411 if (cached_has_bits & 0x00000001u) {
412 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
413 this->_internal_suffix().data(), static_cast<int>(this->_internal_suffix().length()),
414 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
415 "google.protobuf.compiler.Version.suffix");
416 target = stream->WriteStringMaybeAliased(
417 4, this->_internal_suffix(), target);
418 }
419
420 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
421 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
422 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
423 }
424 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.Version)
425 return target;
426 }
427
ByteSizeLong() const428 size_t Version::ByteSizeLong() const {
429 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version)
430 size_t total_size = 0;
431
432 uint32_t cached_has_bits = 0;
433 // Prevent compiler warnings about cached_has_bits being unused
434 (void) cached_has_bits;
435
436 cached_has_bits = _has_bits_[0];
437 if (cached_has_bits & 0x0000000fu) {
438 // optional string suffix = 4;
439 if (cached_has_bits & 0x00000001u) {
440 total_size += 1 +
441 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
442 this->_internal_suffix());
443 }
444
445 // optional int32 major = 1;
446 if (cached_has_bits & 0x00000002u) {
447 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_major());
448 }
449
450 // optional int32 minor = 2;
451 if (cached_has_bits & 0x00000004u) {
452 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_minor());
453 }
454
455 // optional int32 patch = 3;
456 if (cached_has_bits & 0x00000008u) {
457 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_patch());
458 }
459
460 }
461 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
462 }
463
464 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Version::_class_data_ = {
465 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
466 Version::MergeImpl
467 };
GetClassData() const468 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Version::GetClassData() const { return &_class_data_; }
469
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)470 void Version::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
471 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
472 static_cast<Version *>(to)->MergeFrom(
473 static_cast<const Version &>(from));
474 }
475
476
MergeFrom(const Version & from)477 void Version::MergeFrom(const Version& from) {
478 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
479 GOOGLE_DCHECK_NE(&from, this);
480 uint32_t cached_has_bits = 0;
481 (void) cached_has_bits;
482
483 cached_has_bits = from._has_bits_[0];
484 if (cached_has_bits & 0x0000000fu) {
485 if (cached_has_bits & 0x00000001u) {
486 _internal_set_suffix(from._internal_suffix());
487 }
488 if (cached_has_bits & 0x00000002u) {
489 major_ = from.major_;
490 }
491 if (cached_has_bits & 0x00000004u) {
492 minor_ = from.minor_;
493 }
494 if (cached_has_bits & 0x00000008u) {
495 patch_ = from.patch_;
496 }
497 _has_bits_[0] |= cached_has_bits;
498 }
499 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
500 }
501
CopyFrom(const Version & from)502 void Version::CopyFrom(const Version& from) {
503 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.Version)
504 if (&from == this) return;
505 Clear();
506 MergeFrom(from);
507 }
508
IsInitialized() const509 bool Version::IsInitialized() const {
510 return true;
511 }
512
InternalSwap(Version * other)513 void Version::InternalSwap(Version* other) {
514 using std::swap;
515 auto* lhs_arena = GetArenaForAllocation();
516 auto* rhs_arena = other->GetArenaForAllocation();
517 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
518 swap(_has_bits_[0], other->_has_bits_[0]);
519 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
520 &suffix_, lhs_arena,
521 &other->suffix_, rhs_arena
522 );
523 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
524 PROTOBUF_FIELD_OFFSET(Version, patch_)
525 + sizeof(Version::patch_)
526 - PROTOBUF_FIELD_OFFSET(Version, major_)>(
527 reinterpret_cast<char*>(&major_),
528 reinterpret_cast<char*>(&other->major_));
529 }
530
GetMetadata() const531 ::PROTOBUF_NAMESPACE_ID::Metadata Version::GetMetadata() const {
532 return ::_pbi::AssignDescriptors(
533 &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
534 file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[0]);
535 }
536
537 // ===================================================================
538
539 class CodeGeneratorRequest::_Internal {
540 public:
541 using HasBits = decltype(std::declval<CodeGeneratorRequest>()._has_bits_);
set_has_parameter(HasBits * has_bits)542 static void set_has_parameter(HasBits* has_bits) {
543 (*has_bits)[0] |= 1u;
544 }
545 static const ::PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version(const CodeGeneratorRequest* msg);
set_has_compiler_version(HasBits * has_bits)546 static void set_has_compiler_version(HasBits* has_bits) {
547 (*has_bits)[0] |= 2u;
548 }
549 };
550
551 const ::PROTOBUF_NAMESPACE_ID::compiler::Version&
compiler_version(const CodeGeneratorRequest * msg)552 CodeGeneratorRequest::_Internal::compiler_version(const CodeGeneratorRequest* msg) {
553 return *msg->compiler_version_;
554 }
clear_proto_file()555 void CodeGeneratorRequest::clear_proto_file() {
556 proto_file_.Clear();
557 }
CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)558 CodeGeneratorRequest::CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
559 bool is_message_owned)
560 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
561 file_to_generate_(arena),
562 proto_file_(arena) {
563 SharedCtor();
564 // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorRequest)
565 }
CodeGeneratorRequest(const CodeGeneratorRequest & from)566 CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
567 : ::PROTOBUF_NAMESPACE_ID::Message(),
568 _has_bits_(from._has_bits_),
569 file_to_generate_(from.file_to_generate_),
570 proto_file_(from.proto_file_) {
571 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
572 parameter_.InitDefault();
573 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
574 parameter_.Set("", GetArenaForAllocation());
575 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
576 if (from._internal_has_parameter()) {
577 parameter_.Set(from._internal_parameter(),
578 GetArenaForAllocation());
579 }
580 if (from._internal_has_compiler_version()) {
581 compiler_version_ = new ::PROTOBUF_NAMESPACE_ID::compiler::Version(*from.compiler_version_);
582 } else {
583 compiler_version_ = nullptr;
584 }
585 // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
586 }
587
SharedCtor()588 inline void CodeGeneratorRequest::SharedCtor() {
589 parameter_.InitDefault();
590 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
591 parameter_.Set("", GetArenaForAllocation());
592 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
593 compiler_version_ = nullptr;
594 }
595
~CodeGeneratorRequest()596 CodeGeneratorRequest::~CodeGeneratorRequest() {
597 // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorRequest)
598 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
599 (void)arena;
600 return;
601 }
602 SharedDtor();
603 }
604
SharedDtor()605 inline void CodeGeneratorRequest::SharedDtor() {
606 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
607 parameter_.Destroy();
608 if (this != internal_default_instance()) delete compiler_version_;
609 }
610
SetCachedSize(int size) const611 void CodeGeneratorRequest::SetCachedSize(int size) const {
612 _cached_size_.Set(size);
613 }
614
Clear()615 void CodeGeneratorRequest::Clear() {
616 // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest)
617 uint32_t cached_has_bits = 0;
618 // Prevent compiler warnings about cached_has_bits being unused
619 (void) cached_has_bits;
620
621 file_to_generate_.Clear();
622 proto_file_.Clear();
623 cached_has_bits = _has_bits_[0];
624 if (cached_has_bits & 0x00000003u) {
625 if (cached_has_bits & 0x00000001u) {
626 parameter_.ClearNonDefaultToEmpty();
627 }
628 if (cached_has_bits & 0x00000002u) {
629 GOOGLE_DCHECK(compiler_version_ != nullptr);
630 compiler_version_->Clear();
631 }
632 }
633 _has_bits_.Clear();
634 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
635 }
636
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)637 const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
638 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
639 _Internal::HasBits has_bits{};
640 while (!ctx->Done(&ptr)) {
641 uint32_t tag;
642 ptr = ::_pbi::ReadTag(ptr, &tag);
643 switch (tag >> 3) {
644 // repeated string file_to_generate = 1;
645 case 1:
646 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
647 ptr -= 1;
648 do {
649 ptr += 1;
650 auto str = _internal_add_file_to_generate();
651 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
652 CHK_(ptr);
653 #ifndef NDEBUG
654 ::_pbi::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
655 #endif // !NDEBUG
656 if (!ctx->DataAvailable(ptr)) break;
657 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
658 } else
659 goto handle_unusual;
660 continue;
661 // optional string parameter = 2;
662 case 2:
663 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
664 auto str = _internal_mutable_parameter();
665 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
666 CHK_(ptr);
667 #ifndef NDEBUG
668 ::_pbi::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorRequest.parameter");
669 #endif // !NDEBUG
670 } else
671 goto handle_unusual;
672 continue;
673 // optional .google.protobuf.compiler.Version compiler_version = 3;
674 case 3:
675 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
676 ptr = ctx->ParseMessage(_internal_mutable_compiler_version(), ptr);
677 CHK_(ptr);
678 } else
679 goto handle_unusual;
680 continue;
681 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
682 case 15:
683 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
684 ptr -= 1;
685 do {
686 ptr += 1;
687 ptr = ctx->ParseMessage(_internal_add_proto_file(), ptr);
688 CHK_(ptr);
689 if (!ctx->DataAvailable(ptr)) break;
690 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr));
691 } else
692 goto handle_unusual;
693 continue;
694 default:
695 goto handle_unusual;
696 } // switch
697 handle_unusual:
698 if ((tag == 0) || ((tag & 7) == 4)) {
699 CHK_(ptr);
700 ctx->SetLastTag(tag);
701 goto message_done;
702 }
703 ptr = UnknownFieldParse(
704 tag,
705 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
706 ptr, ctx);
707 CHK_(ptr != nullptr);
708 } // while
709 message_done:
710 _has_bits_.Or(has_bits);
711 return ptr;
712 failure:
713 ptr = nullptr;
714 goto message_done;
715 #undef CHK_
716 }
717
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const718 uint8_t* CodeGeneratorRequest::_InternalSerialize(
719 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
720 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest)
721 uint32_t cached_has_bits = 0;
722 (void) cached_has_bits;
723
724 // repeated string file_to_generate = 1;
725 for (int i = 0, n = this->_internal_file_to_generate_size(); i < n; i++) {
726 const auto& s = this->_internal_file_to_generate(i);
727 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
728 s.data(), static_cast<int>(s.length()),
729 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
730 "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
731 target = stream->WriteString(1, s, target);
732 }
733
734 cached_has_bits = _has_bits_[0];
735 // optional string parameter = 2;
736 if (cached_has_bits & 0x00000001u) {
737 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
738 this->_internal_parameter().data(), static_cast<int>(this->_internal_parameter().length()),
739 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
740 "google.protobuf.compiler.CodeGeneratorRequest.parameter");
741 target = stream->WriteStringMaybeAliased(
742 2, this->_internal_parameter(), target);
743 }
744
745 // optional .google.protobuf.compiler.Version compiler_version = 3;
746 if (cached_has_bits & 0x00000002u) {
747 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
748 InternalWriteMessage(3, _Internal::compiler_version(this),
749 _Internal::compiler_version(this).GetCachedSize(), target, stream);
750 }
751
752 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
753 for (unsigned i = 0,
754 n = static_cast<unsigned>(this->_internal_proto_file_size()); i < n; i++) {
755 const auto& repfield = this->_internal_proto_file(i);
756 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
757 InternalWriteMessage(15, repfield, repfield.GetCachedSize(), target, stream);
758 }
759
760 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
761 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
762 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
763 }
764 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorRequest)
765 return target;
766 }
767
ByteSizeLong() const768 size_t CodeGeneratorRequest::ByteSizeLong() const {
769 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorRequest)
770 size_t total_size = 0;
771
772 uint32_t cached_has_bits = 0;
773 // Prevent compiler warnings about cached_has_bits being unused
774 (void) cached_has_bits;
775
776 // repeated string file_to_generate = 1;
777 total_size += 1 *
778 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(file_to_generate_.size());
779 for (int i = 0, n = file_to_generate_.size(); i < n; i++) {
780 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
781 file_to_generate_.Get(i));
782 }
783
784 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
785 total_size += 1UL * this->_internal_proto_file_size();
786 for (const auto& msg : this->proto_file_) {
787 total_size +=
788 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
789 }
790
791 cached_has_bits = _has_bits_[0];
792 if (cached_has_bits & 0x00000003u) {
793 // optional string parameter = 2;
794 if (cached_has_bits & 0x00000001u) {
795 total_size += 1 +
796 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
797 this->_internal_parameter());
798 }
799
800 // optional .google.protobuf.compiler.Version compiler_version = 3;
801 if (cached_has_bits & 0x00000002u) {
802 total_size += 1 +
803 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
804 *compiler_version_);
805 }
806
807 }
808 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
809 }
810
811 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CodeGeneratorRequest::_class_data_ = {
812 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
813 CodeGeneratorRequest::MergeImpl
814 };
GetClassData() const815 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CodeGeneratorRequest::GetClassData() const { return &_class_data_; }
816
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)817 void CodeGeneratorRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
818 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
819 static_cast<CodeGeneratorRequest *>(to)->MergeFrom(
820 static_cast<const CodeGeneratorRequest &>(from));
821 }
822
823
MergeFrom(const CodeGeneratorRequest & from)824 void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
825 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
826 GOOGLE_DCHECK_NE(&from, this);
827 uint32_t cached_has_bits = 0;
828 (void) cached_has_bits;
829
830 file_to_generate_.MergeFrom(from.file_to_generate_);
831 proto_file_.MergeFrom(from.proto_file_);
832 cached_has_bits = from._has_bits_[0];
833 if (cached_has_bits & 0x00000003u) {
834 if (cached_has_bits & 0x00000001u) {
835 _internal_set_parameter(from._internal_parameter());
836 }
837 if (cached_has_bits & 0x00000002u) {
838 _internal_mutable_compiler_version()->::PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(from._internal_compiler_version());
839 }
840 }
841 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
842 }
843
CopyFrom(const CodeGeneratorRequest & from)844 void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) {
845 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorRequest)
846 if (&from == this) return;
847 Clear();
848 MergeFrom(from);
849 }
850
IsInitialized() const851 bool CodeGeneratorRequest::IsInitialized() const {
852 if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(proto_file_))
853 return false;
854 return true;
855 }
856
InternalSwap(CodeGeneratorRequest * other)857 void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
858 using std::swap;
859 auto* lhs_arena = GetArenaForAllocation();
860 auto* rhs_arena = other->GetArenaForAllocation();
861 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
862 swap(_has_bits_[0], other->_has_bits_[0]);
863 file_to_generate_.InternalSwap(&other->file_to_generate_);
864 proto_file_.InternalSwap(&other->proto_file_);
865 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
866 ¶meter_, lhs_arena,
867 &other->parameter_, rhs_arena
868 );
869 swap(compiler_version_, other->compiler_version_);
870 }
871
GetMetadata() const872 ::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorRequest::GetMetadata() const {
873 return ::_pbi::AssignDescriptors(
874 &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
875 file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[1]);
876 }
877
878 // ===================================================================
879
880 class CodeGeneratorResponse_File::_Internal {
881 public:
882 using HasBits = decltype(std::declval<CodeGeneratorResponse_File>()._has_bits_);
set_has_name(HasBits * has_bits)883 static void set_has_name(HasBits* has_bits) {
884 (*has_bits)[0] |= 1u;
885 }
set_has_insertion_point(HasBits * has_bits)886 static void set_has_insertion_point(HasBits* has_bits) {
887 (*has_bits)[0] |= 2u;
888 }
set_has_content(HasBits * has_bits)889 static void set_has_content(HasBits* has_bits) {
890 (*has_bits)[0] |= 4u;
891 }
892 static const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo& generated_code_info(const CodeGeneratorResponse_File* msg);
set_has_generated_code_info(HasBits * has_bits)893 static void set_has_generated_code_info(HasBits* has_bits) {
894 (*has_bits)[0] |= 8u;
895 }
896 };
897
898 const ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo&
generated_code_info(const CodeGeneratorResponse_File * msg)899 CodeGeneratorResponse_File::_Internal::generated_code_info(const CodeGeneratorResponse_File* msg) {
900 return *msg->generated_code_info_;
901 }
clear_generated_code_info()902 void CodeGeneratorResponse_File::clear_generated_code_info() {
903 if (generated_code_info_ != nullptr) generated_code_info_->Clear();
904 _has_bits_[0] &= ~0x00000008u;
905 }
CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)906 CodeGeneratorResponse_File::CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena* arena,
907 bool is_message_owned)
908 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
909 SharedCtor();
910 // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
911 }
CodeGeneratorResponse_File(const CodeGeneratorResponse_File & from)912 CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from)
913 : ::PROTOBUF_NAMESPACE_ID::Message(),
914 _has_bits_(from._has_bits_) {
915 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
916 name_.InitDefault();
917 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
918 name_.Set("", GetArenaForAllocation());
919 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
920 if (from._internal_has_name()) {
921 name_.Set(from._internal_name(),
922 GetArenaForAllocation());
923 }
924 insertion_point_.InitDefault();
925 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
926 insertion_point_.Set("", GetArenaForAllocation());
927 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
928 if (from._internal_has_insertion_point()) {
929 insertion_point_.Set(from._internal_insertion_point(),
930 GetArenaForAllocation());
931 }
932 content_.InitDefault();
933 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
934 content_.Set("", GetArenaForAllocation());
935 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
936 if (from._internal_has_content()) {
937 content_.Set(from._internal_content(),
938 GetArenaForAllocation());
939 }
940 if (from._internal_has_generated_code_info()) {
941 generated_code_info_ = new ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo(*from.generated_code_info_);
942 } else {
943 generated_code_info_ = nullptr;
944 }
945 // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
946 }
947
SharedCtor()948 inline void CodeGeneratorResponse_File::SharedCtor() {
949 name_.InitDefault();
950 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
951 name_.Set("", GetArenaForAllocation());
952 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
953 insertion_point_.InitDefault();
954 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
955 insertion_point_.Set("", GetArenaForAllocation());
956 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
957 content_.InitDefault();
958 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
959 content_.Set("", GetArenaForAllocation());
960 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
961 generated_code_info_ = nullptr;
962 }
963
~CodeGeneratorResponse_File()964 CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
965 // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse.File)
966 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
967 (void)arena;
968 return;
969 }
970 SharedDtor();
971 }
972
SharedDtor()973 inline void CodeGeneratorResponse_File::SharedDtor() {
974 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
975 name_.Destroy();
976 insertion_point_.Destroy();
977 content_.Destroy();
978 if (this != internal_default_instance()) delete generated_code_info_;
979 }
980
SetCachedSize(int size) const981 void CodeGeneratorResponse_File::SetCachedSize(int size) const {
982 _cached_size_.Set(size);
983 }
984
Clear()985 void CodeGeneratorResponse_File::Clear() {
986 // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse.File)
987 uint32_t cached_has_bits = 0;
988 // Prevent compiler warnings about cached_has_bits being unused
989 (void) cached_has_bits;
990
991 cached_has_bits = _has_bits_[0];
992 if (cached_has_bits & 0x0000000fu) {
993 if (cached_has_bits & 0x00000001u) {
994 name_.ClearNonDefaultToEmpty();
995 }
996 if (cached_has_bits & 0x00000002u) {
997 insertion_point_.ClearNonDefaultToEmpty();
998 }
999 if (cached_has_bits & 0x00000004u) {
1000 content_.ClearNonDefaultToEmpty();
1001 }
1002 if (cached_has_bits & 0x00000008u) {
1003 GOOGLE_DCHECK(generated_code_info_ != nullptr);
1004 generated_code_info_->Clear();
1005 }
1006 }
1007 _has_bits_.Clear();
1008 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1009 }
1010
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1011 const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1012 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1013 _Internal::HasBits has_bits{};
1014 while (!ctx->Done(&ptr)) {
1015 uint32_t tag;
1016 ptr = ::_pbi::ReadTag(ptr, &tag);
1017 switch (tag >> 3) {
1018 // optional string name = 1;
1019 case 1:
1020 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
1021 auto str = _internal_mutable_name();
1022 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1023 CHK_(ptr);
1024 #ifndef NDEBUG
1025 ::_pbi::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorResponse.File.name");
1026 #endif // !NDEBUG
1027 } else
1028 goto handle_unusual;
1029 continue;
1030 // optional string insertion_point = 2;
1031 case 2:
1032 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
1033 auto str = _internal_mutable_insertion_point();
1034 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1035 CHK_(ptr);
1036 #ifndef NDEBUG
1037 ::_pbi::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
1038 #endif // !NDEBUG
1039 } else
1040 goto handle_unusual;
1041 continue;
1042 // optional string content = 15;
1043 case 15:
1044 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
1045 auto str = _internal_mutable_content();
1046 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1047 CHK_(ptr);
1048 #ifndef NDEBUG
1049 ::_pbi::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorResponse.File.content");
1050 #endif // !NDEBUG
1051 } else
1052 goto handle_unusual;
1053 continue;
1054 // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16;
1055 case 16:
1056 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
1057 ptr = ctx->ParseMessage(_internal_mutable_generated_code_info(), ptr);
1058 CHK_(ptr);
1059 } else
1060 goto handle_unusual;
1061 continue;
1062 default:
1063 goto handle_unusual;
1064 } // switch
1065 handle_unusual:
1066 if ((tag == 0) || ((tag & 7) == 4)) {
1067 CHK_(ptr);
1068 ctx->SetLastTag(tag);
1069 goto message_done;
1070 }
1071 ptr = UnknownFieldParse(
1072 tag,
1073 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1074 ptr, ctx);
1075 CHK_(ptr != nullptr);
1076 } // while
1077 message_done:
1078 _has_bits_.Or(has_bits);
1079 return ptr;
1080 failure:
1081 ptr = nullptr;
1082 goto message_done;
1083 #undef CHK_
1084 }
1085
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1086 uint8_t* CodeGeneratorResponse_File::_InternalSerialize(
1087 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1088 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1089 uint32_t cached_has_bits = 0;
1090 (void) cached_has_bits;
1091
1092 cached_has_bits = _has_bits_[0];
1093 // optional string name = 1;
1094 if (cached_has_bits & 0x00000001u) {
1095 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1096 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
1097 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1098 "google.protobuf.compiler.CodeGeneratorResponse.File.name");
1099 target = stream->WriteStringMaybeAliased(
1100 1, this->_internal_name(), target);
1101 }
1102
1103 // optional string insertion_point = 2;
1104 if (cached_has_bits & 0x00000002u) {
1105 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1106 this->_internal_insertion_point().data(), static_cast<int>(this->_internal_insertion_point().length()),
1107 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1108 "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
1109 target = stream->WriteStringMaybeAliased(
1110 2, this->_internal_insertion_point(), target);
1111 }
1112
1113 // optional string content = 15;
1114 if (cached_has_bits & 0x00000004u) {
1115 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1116 this->_internal_content().data(), static_cast<int>(this->_internal_content().length()),
1117 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1118 "google.protobuf.compiler.CodeGeneratorResponse.File.content");
1119 target = stream->WriteStringMaybeAliased(
1120 15, this->_internal_content(), target);
1121 }
1122
1123 // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16;
1124 if (cached_has_bits & 0x00000008u) {
1125 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1126 InternalWriteMessage(16, _Internal::generated_code_info(this),
1127 _Internal::generated_code_info(this).GetCachedSize(), target, stream);
1128 }
1129
1130 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1131 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1132 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1133 }
1134 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse.File)
1135 return target;
1136 }
1137
ByteSizeLong() const1138 size_t CodeGeneratorResponse_File::ByteSizeLong() const {
1139 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1140 size_t total_size = 0;
1141
1142 uint32_t cached_has_bits = 0;
1143 // Prevent compiler warnings about cached_has_bits being unused
1144 (void) cached_has_bits;
1145
1146 cached_has_bits = _has_bits_[0];
1147 if (cached_has_bits & 0x0000000fu) {
1148 // optional string name = 1;
1149 if (cached_has_bits & 0x00000001u) {
1150 total_size += 1 +
1151 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1152 this->_internal_name());
1153 }
1154
1155 // optional string insertion_point = 2;
1156 if (cached_has_bits & 0x00000002u) {
1157 total_size += 1 +
1158 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1159 this->_internal_insertion_point());
1160 }
1161
1162 // optional string content = 15;
1163 if (cached_has_bits & 0x00000004u) {
1164 total_size += 1 +
1165 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1166 this->_internal_content());
1167 }
1168
1169 // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16;
1170 if (cached_has_bits & 0x00000008u) {
1171 total_size += 2 +
1172 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1173 *generated_code_info_);
1174 }
1175
1176 }
1177 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
1178 }
1179
1180 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CodeGeneratorResponse_File::_class_data_ = {
1181 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
1182 CodeGeneratorResponse_File::MergeImpl
1183 };
GetClassData() const1184 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CodeGeneratorResponse_File::GetClassData() const { return &_class_data_; }
1185
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)1186 void CodeGeneratorResponse_File::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
1187 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1188 static_cast<CodeGeneratorResponse_File *>(to)->MergeFrom(
1189 static_cast<const CodeGeneratorResponse_File &>(from));
1190 }
1191
1192
MergeFrom(const CodeGeneratorResponse_File & from)1193 void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) {
1194 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1195 GOOGLE_DCHECK_NE(&from, this);
1196 uint32_t cached_has_bits = 0;
1197 (void) cached_has_bits;
1198
1199 cached_has_bits = from._has_bits_[0];
1200 if (cached_has_bits & 0x0000000fu) {
1201 if (cached_has_bits & 0x00000001u) {
1202 _internal_set_name(from._internal_name());
1203 }
1204 if (cached_has_bits & 0x00000002u) {
1205 _internal_set_insertion_point(from._internal_insertion_point());
1206 }
1207 if (cached_has_bits & 0x00000004u) {
1208 _internal_set_content(from._internal_content());
1209 }
1210 if (cached_has_bits & 0x00000008u) {
1211 _internal_mutable_generated_code_info()->::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo::MergeFrom(from._internal_generated_code_info());
1212 }
1213 }
1214 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1215 }
1216
CopyFrom(const CodeGeneratorResponse_File & from)1217 void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) {
1218 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1219 if (&from == this) return;
1220 Clear();
1221 MergeFrom(from);
1222 }
1223
IsInitialized() const1224 bool CodeGeneratorResponse_File::IsInitialized() const {
1225 return true;
1226 }
1227
InternalSwap(CodeGeneratorResponse_File * other)1228 void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) {
1229 using std::swap;
1230 auto* lhs_arena = GetArenaForAllocation();
1231 auto* rhs_arena = other->GetArenaForAllocation();
1232 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1233 swap(_has_bits_[0], other->_has_bits_[0]);
1234 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1235 &name_, lhs_arena,
1236 &other->name_, rhs_arena
1237 );
1238 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1239 &insertion_point_, lhs_arena,
1240 &other->insertion_point_, rhs_arena
1241 );
1242 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1243 &content_, lhs_arena,
1244 &other->content_, rhs_arena
1245 );
1246 swap(generated_code_info_, other->generated_code_info_);
1247 }
1248
GetMetadata() const1249 ::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse_File::GetMetadata() const {
1250 return ::_pbi::AssignDescriptors(
1251 &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
1252 file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[2]);
1253 }
1254
1255 // ===================================================================
1256
1257 class CodeGeneratorResponse::_Internal {
1258 public:
1259 using HasBits = decltype(std::declval<CodeGeneratorResponse>()._has_bits_);
set_has_error(HasBits * has_bits)1260 static void set_has_error(HasBits* has_bits) {
1261 (*has_bits)[0] |= 1u;
1262 }
set_has_supported_features(HasBits * has_bits)1263 static void set_has_supported_features(HasBits* has_bits) {
1264 (*has_bits)[0] |= 2u;
1265 }
1266 };
1267
CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1268 CodeGeneratorResponse::CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1269 bool is_message_owned)
1270 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
1271 file_(arena) {
1272 SharedCtor();
1273 // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse)
1274 }
CodeGeneratorResponse(const CodeGeneratorResponse & from)1275 CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
1276 : ::PROTOBUF_NAMESPACE_ID::Message(),
1277 _has_bits_(from._has_bits_),
1278 file_(from.file_) {
1279 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1280 error_.InitDefault();
1281 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1282 error_.Set("", GetArenaForAllocation());
1283 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1284 if (from._internal_has_error()) {
1285 error_.Set(from._internal_error(),
1286 GetArenaForAllocation());
1287 }
1288 supported_features_ = from.supported_features_;
1289 // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse)
1290 }
1291
SharedCtor()1292 inline void CodeGeneratorResponse::SharedCtor() {
1293 error_.InitDefault();
1294 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1295 error_.Set("", GetArenaForAllocation());
1296 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1297 supported_features_ = uint64_t{0u};
1298 }
1299
~CodeGeneratorResponse()1300 CodeGeneratorResponse::~CodeGeneratorResponse() {
1301 // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse)
1302 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
1303 (void)arena;
1304 return;
1305 }
1306 SharedDtor();
1307 }
1308
SharedDtor()1309 inline void CodeGeneratorResponse::SharedDtor() {
1310 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1311 error_.Destroy();
1312 }
1313
SetCachedSize(int size) const1314 void CodeGeneratorResponse::SetCachedSize(int size) const {
1315 _cached_size_.Set(size);
1316 }
1317
Clear()1318 void CodeGeneratorResponse::Clear() {
1319 // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse)
1320 uint32_t cached_has_bits = 0;
1321 // Prevent compiler warnings about cached_has_bits being unused
1322 (void) cached_has_bits;
1323
1324 file_.Clear();
1325 cached_has_bits = _has_bits_[0];
1326 if (cached_has_bits & 0x00000001u) {
1327 error_.ClearNonDefaultToEmpty();
1328 }
1329 supported_features_ = uint64_t{0u};
1330 _has_bits_.Clear();
1331 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1332 }
1333
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1334 const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1335 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1336 _Internal::HasBits has_bits{};
1337 while (!ctx->Done(&ptr)) {
1338 uint32_t tag;
1339 ptr = ::_pbi::ReadTag(ptr, &tag);
1340 switch (tag >> 3) {
1341 // optional string error = 1;
1342 case 1:
1343 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
1344 auto str = _internal_mutable_error();
1345 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1346 CHK_(ptr);
1347 #ifndef NDEBUG
1348 ::_pbi::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorResponse.error");
1349 #endif // !NDEBUG
1350 } else
1351 goto handle_unusual;
1352 continue;
1353 // optional uint64 supported_features = 2;
1354 case 2:
1355 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
1356 _Internal::set_has_supported_features(&has_bits);
1357 supported_features_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1358 CHK_(ptr);
1359 } else
1360 goto handle_unusual;
1361 continue;
1362 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
1363 case 15:
1364 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
1365 ptr -= 1;
1366 do {
1367 ptr += 1;
1368 ptr = ctx->ParseMessage(_internal_add_file(), ptr);
1369 CHK_(ptr);
1370 if (!ctx->DataAvailable(ptr)) break;
1371 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr));
1372 } else
1373 goto handle_unusual;
1374 continue;
1375 default:
1376 goto handle_unusual;
1377 } // switch
1378 handle_unusual:
1379 if ((tag == 0) || ((tag & 7) == 4)) {
1380 CHK_(ptr);
1381 ctx->SetLastTag(tag);
1382 goto message_done;
1383 }
1384 ptr = UnknownFieldParse(
1385 tag,
1386 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1387 ptr, ctx);
1388 CHK_(ptr != nullptr);
1389 } // while
1390 message_done:
1391 _has_bits_.Or(has_bits);
1392 return ptr;
1393 failure:
1394 ptr = nullptr;
1395 goto message_done;
1396 #undef CHK_
1397 }
1398
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1399 uint8_t* CodeGeneratorResponse::_InternalSerialize(
1400 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1401 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse)
1402 uint32_t cached_has_bits = 0;
1403 (void) cached_has_bits;
1404
1405 cached_has_bits = _has_bits_[0];
1406 // optional string error = 1;
1407 if (cached_has_bits & 0x00000001u) {
1408 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1409 this->_internal_error().data(), static_cast<int>(this->_internal_error().length()),
1410 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1411 "google.protobuf.compiler.CodeGeneratorResponse.error");
1412 target = stream->WriteStringMaybeAliased(
1413 1, this->_internal_error(), target);
1414 }
1415
1416 // optional uint64 supported_features = 2;
1417 if (cached_has_bits & 0x00000002u) {
1418 target = stream->EnsureSpace(target);
1419 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_supported_features(), target);
1420 }
1421
1422 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
1423 for (unsigned i = 0,
1424 n = static_cast<unsigned>(this->_internal_file_size()); i < n; i++) {
1425 const auto& repfield = this->_internal_file(i);
1426 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1427 InternalWriteMessage(15, repfield, repfield.GetCachedSize(), target, stream);
1428 }
1429
1430 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1431 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1432 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1433 }
1434 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse)
1435 return target;
1436 }
1437
ByteSizeLong() const1438 size_t CodeGeneratorResponse::ByteSizeLong() const {
1439 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse)
1440 size_t total_size = 0;
1441
1442 uint32_t cached_has_bits = 0;
1443 // Prevent compiler warnings about cached_has_bits being unused
1444 (void) cached_has_bits;
1445
1446 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
1447 total_size += 1UL * this->_internal_file_size();
1448 for (const auto& msg : this->file_) {
1449 total_size +=
1450 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1451 }
1452
1453 cached_has_bits = _has_bits_[0];
1454 if (cached_has_bits & 0x00000003u) {
1455 // optional string error = 1;
1456 if (cached_has_bits & 0x00000001u) {
1457 total_size += 1 +
1458 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1459 this->_internal_error());
1460 }
1461
1462 // optional uint64 supported_features = 2;
1463 if (cached_has_bits & 0x00000002u) {
1464 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_supported_features());
1465 }
1466
1467 }
1468 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
1469 }
1470
1471 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CodeGeneratorResponse::_class_data_ = {
1472 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
1473 CodeGeneratorResponse::MergeImpl
1474 };
GetClassData() const1475 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CodeGeneratorResponse::GetClassData() const { return &_class_data_; }
1476
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)1477 void CodeGeneratorResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
1478 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1479 static_cast<CodeGeneratorResponse *>(to)->MergeFrom(
1480 static_cast<const CodeGeneratorResponse &>(from));
1481 }
1482
1483
MergeFrom(const CodeGeneratorResponse & from)1484 void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
1485 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
1486 GOOGLE_DCHECK_NE(&from, this);
1487 uint32_t cached_has_bits = 0;
1488 (void) cached_has_bits;
1489
1490 file_.MergeFrom(from.file_);
1491 cached_has_bits = from._has_bits_[0];
1492 if (cached_has_bits & 0x00000003u) {
1493 if (cached_has_bits & 0x00000001u) {
1494 _internal_set_error(from._internal_error());
1495 }
1496 if (cached_has_bits & 0x00000002u) {
1497 supported_features_ = from.supported_features_;
1498 }
1499 _has_bits_[0] |= cached_has_bits;
1500 }
1501 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1502 }
1503
CopyFrom(const CodeGeneratorResponse & from)1504 void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) {
1505 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse)
1506 if (&from == this) return;
1507 Clear();
1508 MergeFrom(from);
1509 }
1510
IsInitialized() const1511 bool CodeGeneratorResponse::IsInitialized() const {
1512 return true;
1513 }
1514
InternalSwap(CodeGeneratorResponse * other)1515 void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
1516 using std::swap;
1517 auto* lhs_arena = GetArenaForAllocation();
1518 auto* rhs_arena = other->GetArenaForAllocation();
1519 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1520 swap(_has_bits_[0], other->_has_bits_[0]);
1521 file_.InternalSwap(&other->file_);
1522 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1523 &error_, lhs_arena,
1524 &other->error_, rhs_arena
1525 );
1526 swap(supported_features_, other->supported_features_);
1527 }
1528
GetMetadata() const1529 ::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse::GetMetadata() const {
1530 return ::_pbi::AssignDescriptors(
1531 &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_getter, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once,
1532 file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[3]);
1533 }
1534
1535 // @@protoc_insertion_point(namespace_scope)
1536 } // namespace compiler
1537 PROTOBUF_NAMESPACE_CLOSE
1538 PROTOBUF_NAMESPACE_OPEN
1539 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::Version*
CreateMaybeMessage(Arena * arena)1540 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::Version >(Arena* arena) {
1541 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::Version >(arena);
1542 }
1543 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest*
CreateMaybeMessage(Arena * arena)1544 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(Arena* arena) {
1545 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(arena);
1546 }
1547 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File*
CreateMaybeMessage(Arena * arena)1548 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(Arena* arena) {
1549 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(arena);
1550 }
1551 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse*
CreateMaybeMessage(Arena * arena)1552 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(Arena* arena) {
1553 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(arena);
1554 }
1555 PROTOBUF_NAMESPACE_CLOSE
1556
1557 // @@protoc_insertion_point(global_scope)
1558 #include <google/protobuf/port_undef.inc>
1559