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/stubs/common.h>
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/descriptor.h>
13 #include <google/protobuf/generated_message_reflection.h>
14 #include <google/protobuf/reflection_ops.h>
15 #include <google/protobuf/wire_format.h>
16 // @@protoc_insertion_point(includes)
17 #include <google/protobuf/port_def.inc>
18 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto;
19 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
20 extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto;
21 PROTOBUF_NAMESPACE_OPEN
22 namespace compiler {
23 class VersionDefaultTypeInternal {
24 public:
25 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Version> _instance;
26 } _Version_default_instance_;
27 class CodeGeneratorRequestDefaultTypeInternal {
28 public:
29 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CodeGeneratorRequest> _instance;
30 } _CodeGeneratorRequest_default_instance_;
31 class CodeGeneratorResponse_FileDefaultTypeInternal {
32 public:
33 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CodeGeneratorResponse_File> _instance;
34 } _CodeGeneratorResponse_File_default_instance_;
35 class CodeGeneratorResponseDefaultTypeInternal {
36 public:
37 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CodeGeneratorResponse> _instance;
38 } _CodeGeneratorResponse_default_instance_;
39 } // namespace compiler
40 PROTOBUF_NAMESPACE_CLOSE
InitDefaultsscc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto()41 static void InitDefaultsscc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
42 GOOGLE_PROTOBUF_VERIFY_VERSION;
43
44 {
45 void* ptr = &PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_;
46 new (ptr) PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest();
47 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
48 }
49 PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest::InitAsDefaultInstance();
50 }
51
52 PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto =
53 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {
54 &scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base,
55 &scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,}};
56
InitDefaultsscc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto()57 static void InitDefaultsscc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
58 GOOGLE_PROTOBUF_VERIFY_VERSION;
59
60 {
61 void* ptr = &PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_;
62 new (ptr) PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse();
63 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
64 }
65 PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse::InitAsDefaultInstance();
66 }
67
68 PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto =
69 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {
70 &scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,}};
71
InitDefaultsscc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto()72 static void InitDefaultsscc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
73 GOOGLE_PROTOBUF_VERIFY_VERSION;
74
75 {
76 void* ptr = &PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_File_default_instance_;
77 new (ptr) PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File();
78 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
79 }
80 PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File::InitAsDefaultInstance();
81 }
82
83 PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto =
84 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}};
85
InitDefaultsscc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto()86 static void InitDefaultsscc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
87 GOOGLE_PROTOBUF_VERIFY_VERSION;
88
89 {
90 void* ptr = &PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_;
91 new (ptr) PROTOBUF_NAMESPACE_ID::compiler::Version();
92 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
93 }
94 PROTOBUF_NAMESPACE_ID::compiler::Version::InitAsDefaultInstance();
95 }
96
97 PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto =
98 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}};
99
100 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[4];
101 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr;
102 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr;
103
104 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
105 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, _has_bits_),
106 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, _internal_metadata_),
107 ~0u, // no _extensions_
108 ~0u, // no _oneof_case_
109 ~0u, // no _weak_field_map_
110 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, major_),
111 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, minor_),
112 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, patch_),
113 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, suffix_),
114 1,
115 2,
116 3,
117 0,
118 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _has_bits_),
119 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _internal_metadata_),
120 ~0u, // no _extensions_
121 ~0u, // no _oneof_case_
122 ~0u, // no _weak_field_map_
123 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, file_to_generate_),
124 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, parameter_),
125 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, proto_file_),
126 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, compiler_version_),
127 ~0u,
128 0,
129 ~0u,
130 1,
131 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _has_bits_),
132 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _internal_metadata_),
133 ~0u, // no _extensions_
134 ~0u, // no _oneof_case_
135 ~0u, // no _weak_field_map_
136 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, name_),
137 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, insertion_point_),
138 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, content_),
139 0,
140 1,
141 2,
142 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _has_bits_),
143 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _internal_metadata_),
144 ~0u, // no _extensions_
145 ~0u, // no _oneof_case_
146 ~0u, // no _weak_field_map_
147 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, error_),
148 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, file_),
149 0,
150 ~0u,
151 };
152 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
153 { 0, 9, sizeof(PROTOBUF_NAMESPACE_ID::compiler::Version)},
154 { 13, 22, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest)},
155 { 26, 34, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File)},
156 { 37, 44, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse)},
157 };
158
159 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
160 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_),
161 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_),
162 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_File_default_instance_),
163 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_),
164 };
165
166 const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
167 "\n%google/protobuf/compiler/plugin.proto\022"
168 "\030google.protobuf.compiler\032 google/protob"
169 "uf/descriptor.proto\"F\n\007Version\022\r\n\005major\030"
170 "\001 \001(\005\022\r\n\005minor\030\002 \001(\005\022\r\n\005patch\030\003 \001(\005\022\016\n\006s"
171 "uffix\030\004 \001(\t\"\272\001\n\024CodeGeneratorRequest\022\030\n\020"
172 "file_to_generate\030\001 \003(\t\022\021\n\tparameter\030\002 \001("
173 "\t\0228\n\nproto_file\030\017 \003(\0132$.google.protobuf."
174 "FileDescriptorProto\022;\n\020compiler_version\030"
175 "\003 \001(\0132!.google.protobuf.compiler.Version"
176 "\"\252\001\n\025CodeGeneratorResponse\022\r\n\005error\030\001 \001("
177 "\t\022B\n\004file\030\017 \003(\01324.google.protobuf.compil"
178 "er.CodeGeneratorResponse.File\032>\n\004File\022\014\n"
179 "\004name\030\001 \001(\t\022\027\n\017insertion_point\030\002 \001(\t\022\017\n\007"
180 "content\030\017 \001(\tBg\n\034com.google.protobuf.com"
181 "pilerB\014PluginProtosZ9github.com/golang/p"
182 "rotobuf/protoc-gen-go/plugin;plugin_go"
183 ;
184 static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_deps[1] = {
185 &::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto,
186 };
187 static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_sccs[4] = {
188 &scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,
189 &scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,
190 &scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,
191 &scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,
192 };
193 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once;
194 static bool descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_initialized = false;
195 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = {
196 &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto, "google/protobuf/compiler/plugin.proto", 638,
197 &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once, descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_sccs, descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_deps, 4, 1,
198 schemas, file_default_instances, TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets,
199 file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto,
200 };
201
202 // Force running AddDescriptors() at dynamic initialization time.
203 static bool dynamic_init_dummy_google_2fprotobuf_2fcompiler_2fplugin_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto), true);
204 PROTOBUF_NAMESPACE_OPEN
205 namespace compiler {
206
207 // ===================================================================
208
InitAsDefaultInstance()209 void Version::InitAsDefaultInstance() {
210 }
211 class Version::_Internal {
212 public:
213 using HasBits = decltype(std::declval<Version>()._has_bits_);
set_has_major(HasBits * has_bits)214 static void set_has_major(HasBits* has_bits) {
215 (*has_bits)[0] |= 2u;
216 }
set_has_minor(HasBits * has_bits)217 static void set_has_minor(HasBits* has_bits) {
218 (*has_bits)[0] |= 4u;
219 }
set_has_patch(HasBits * has_bits)220 static void set_has_patch(HasBits* has_bits) {
221 (*has_bits)[0] |= 8u;
222 }
set_has_suffix(HasBits * has_bits)223 static void set_has_suffix(HasBits* has_bits) {
224 (*has_bits)[0] |= 1u;
225 }
226 };
227
Version()228 Version::Version()
229 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
230 SharedCtor();
231 // @@protoc_insertion_point(constructor:google.protobuf.compiler.Version)
232 }
Version(const Version & from)233 Version::Version(const Version& from)
234 : ::PROTOBUF_NAMESPACE_ID::Message(),
235 _internal_metadata_(nullptr),
236 _has_bits_(from._has_bits_) {
237 _internal_metadata_.MergeFrom(from._internal_metadata_);
238 suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
239 if (from.has_suffix()) {
240 suffix_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.suffix_);
241 }
242 ::memcpy(&major_, &from.major_,
243 static_cast<size_t>(reinterpret_cast<char*>(&patch_) -
244 reinterpret_cast<char*>(&major_)) + sizeof(patch_));
245 // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version)
246 }
247
SharedCtor()248 void Version::SharedCtor() {
249 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
250 suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
251 ::memset(&major_, 0, static_cast<size_t>(
252 reinterpret_cast<char*>(&patch_) -
253 reinterpret_cast<char*>(&major_)) + sizeof(patch_));
254 }
255
~Version()256 Version::~Version() {
257 // @@protoc_insertion_point(destructor:google.protobuf.compiler.Version)
258 SharedDtor();
259 }
260
SharedDtor()261 void Version::SharedDtor() {
262 suffix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
263 }
264
SetCachedSize(int size) const265 void Version::SetCachedSize(int size) const {
266 _cached_size_.Set(size);
267 }
default_instance()268 const Version& Version::default_instance() {
269 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
270 return *internal_default_instance();
271 }
272
273
Clear()274 void Version::Clear() {
275 // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.Version)
276 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
277 // Prevent compiler warnings about cached_has_bits being unused
278 (void) cached_has_bits;
279
280 cached_has_bits = _has_bits_[0];
281 if (cached_has_bits & 0x00000001u) {
282 suffix_.ClearNonDefaultToEmptyNoArena();
283 }
284 if (cached_has_bits & 0x0000000eu) {
285 ::memset(&major_, 0, static_cast<size_t>(
286 reinterpret_cast<char*>(&patch_) -
287 reinterpret_cast<char*>(&major_)) + sizeof(patch_));
288 }
289 _has_bits_.Clear();
290 _internal_metadata_.Clear();
291 }
292
293 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)294 const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
295 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
296 _Internal::HasBits has_bits{};
297 while (!ctx->Done(&ptr)) {
298 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
299 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
300 CHK_(ptr);
301 switch (tag >> 3) {
302 // optional int32 major = 1;
303 case 1:
304 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
305 _Internal::set_has_major(&has_bits);
306 major_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
307 CHK_(ptr);
308 } else goto handle_unusual;
309 continue;
310 // optional int32 minor = 2;
311 case 2:
312 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
313 _Internal::set_has_minor(&has_bits);
314 minor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
315 CHK_(ptr);
316 } else goto handle_unusual;
317 continue;
318 // optional int32 patch = 3;
319 case 3:
320 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
321 _Internal::set_has_patch(&has_bits);
322 patch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
323 CHK_(ptr);
324 } else goto handle_unusual;
325 continue;
326 // optional string suffix = 4;
327 case 4:
328 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
329 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_suffix(), ptr, ctx, "google.protobuf.compiler.Version.suffix");
330 CHK_(ptr);
331 } else goto handle_unusual;
332 continue;
333 default: {
334 handle_unusual:
335 if ((tag & 7) == 4 || tag == 0) {
336 ctx->SetLastTag(tag);
337 goto success;
338 }
339 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
340 CHK_(ptr != nullptr);
341 continue;
342 }
343 } // switch
344 } // while
345 success:
346 _has_bits_.Or(has_bits);
347 return ptr;
348 failure:
349 ptr = nullptr;
350 goto success;
351 #undef CHK_
352 }
353 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)354 bool Version::MergePartialFromCodedStream(
355 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
356 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
357 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
358 // @@protoc_insertion_point(parse_start:google.protobuf.compiler.Version)
359 for (;;) {
360 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
361 tag = p.first;
362 if (!p.second) goto handle_unusual;
363 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
364 // optional int32 major = 1;
365 case 1: {
366 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
367 _Internal::set_has_major(&_has_bits_);
368 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
369 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
370 input, &major_)));
371 } else {
372 goto handle_unusual;
373 }
374 break;
375 }
376
377 // optional int32 minor = 2;
378 case 2: {
379 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
380 _Internal::set_has_minor(&_has_bits_);
381 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
382 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
383 input, &minor_)));
384 } else {
385 goto handle_unusual;
386 }
387 break;
388 }
389
390 // optional int32 patch = 3;
391 case 3: {
392 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
393 _Internal::set_has_patch(&_has_bits_);
394 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
395 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
396 input, &patch_)));
397 } else {
398 goto handle_unusual;
399 }
400 break;
401 }
402
403 // optional string suffix = 4;
404 case 4: {
405 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
406 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
407 input, this->mutable_suffix()));
408 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
409 this->suffix().data(), static_cast<int>(this->suffix().length()),
410 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE,
411 "google.protobuf.compiler.Version.suffix");
412 } else {
413 goto handle_unusual;
414 }
415 break;
416 }
417
418 default: {
419 handle_unusual:
420 if (tag == 0) {
421 goto success;
422 }
423 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
424 input, tag, _internal_metadata_.mutable_unknown_fields()));
425 break;
426 }
427 }
428 }
429 success:
430 // @@protoc_insertion_point(parse_success:google.protobuf.compiler.Version)
431 return true;
432 failure:
433 // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.Version)
434 return false;
435 #undef DO_
436 }
437 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
438
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const439 void Version::SerializeWithCachedSizes(
440 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
441 // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.Version)
442 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
443 (void) cached_has_bits;
444
445 cached_has_bits = _has_bits_[0];
446 // optional int32 major = 1;
447 if (cached_has_bits & 0x00000002u) {
448 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->major(), output);
449 }
450
451 // optional int32 minor = 2;
452 if (cached_has_bits & 0x00000004u) {
453 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->minor(), output);
454 }
455
456 // optional int32 patch = 3;
457 if (cached_has_bits & 0x00000008u) {
458 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->patch(), output);
459 }
460
461 // optional string suffix = 4;
462 if (cached_has_bits & 0x00000001u) {
463 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
464 this->suffix().data(), static_cast<int>(this->suffix().length()),
465 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
466 "google.protobuf.compiler.Version.suffix");
467 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
468 4, this->suffix(), output);
469 }
470
471 if (_internal_metadata_.have_unknown_fields()) {
472 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
473 _internal_metadata_.unknown_fields(), output);
474 }
475 // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.Version)
476 }
477
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const478 ::PROTOBUF_NAMESPACE_ID::uint8* Version::InternalSerializeWithCachedSizesToArray(
479 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
480 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version)
481 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
482 (void) cached_has_bits;
483
484 cached_has_bits = _has_bits_[0];
485 // optional int32 major = 1;
486 if (cached_has_bits & 0x00000002u) {
487 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->major(), target);
488 }
489
490 // optional int32 minor = 2;
491 if (cached_has_bits & 0x00000004u) {
492 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->minor(), target);
493 }
494
495 // optional int32 patch = 3;
496 if (cached_has_bits & 0x00000008u) {
497 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->patch(), target);
498 }
499
500 // optional string suffix = 4;
501 if (cached_has_bits & 0x00000001u) {
502 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
503 this->suffix().data(), static_cast<int>(this->suffix().length()),
504 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
505 "google.protobuf.compiler.Version.suffix");
506 target =
507 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
508 4, this->suffix(), target);
509 }
510
511 if (_internal_metadata_.have_unknown_fields()) {
512 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
513 _internal_metadata_.unknown_fields(), target);
514 }
515 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.Version)
516 return target;
517 }
518
ByteSizeLong() const519 size_t Version::ByteSizeLong() const {
520 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version)
521 size_t total_size = 0;
522
523 if (_internal_metadata_.have_unknown_fields()) {
524 total_size +=
525 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
526 _internal_metadata_.unknown_fields());
527 }
528 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
529 // Prevent compiler warnings about cached_has_bits being unused
530 (void) cached_has_bits;
531
532 cached_has_bits = _has_bits_[0];
533 if (cached_has_bits & 0x0000000fu) {
534 // optional string suffix = 4;
535 if (cached_has_bits & 0x00000001u) {
536 total_size += 1 +
537 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
538 this->suffix());
539 }
540
541 // optional int32 major = 1;
542 if (cached_has_bits & 0x00000002u) {
543 total_size += 1 +
544 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
545 this->major());
546 }
547
548 // optional int32 minor = 2;
549 if (cached_has_bits & 0x00000004u) {
550 total_size += 1 +
551 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
552 this->minor());
553 }
554
555 // optional int32 patch = 3;
556 if (cached_has_bits & 0x00000008u) {
557 total_size += 1 +
558 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
559 this->patch());
560 }
561
562 }
563 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
564 SetCachedSize(cached_size);
565 return total_size;
566 }
567
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)568 void Version::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
569 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.Version)
570 GOOGLE_DCHECK_NE(&from, this);
571 const Version* source =
572 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Version>(
573 &from);
574 if (source == nullptr) {
575 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.Version)
576 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
577 } else {
578 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.Version)
579 MergeFrom(*source);
580 }
581 }
582
MergeFrom(const Version & from)583 void Version::MergeFrom(const Version& from) {
584 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
585 GOOGLE_DCHECK_NE(&from, this);
586 _internal_metadata_.MergeFrom(from._internal_metadata_);
587 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
588 (void) cached_has_bits;
589
590 cached_has_bits = from._has_bits_[0];
591 if (cached_has_bits & 0x0000000fu) {
592 if (cached_has_bits & 0x00000001u) {
593 _has_bits_[0] |= 0x00000001u;
594 suffix_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.suffix_);
595 }
596 if (cached_has_bits & 0x00000002u) {
597 major_ = from.major_;
598 }
599 if (cached_has_bits & 0x00000004u) {
600 minor_ = from.minor_;
601 }
602 if (cached_has_bits & 0x00000008u) {
603 patch_ = from.patch_;
604 }
605 _has_bits_[0] |= cached_has_bits;
606 }
607 }
608
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)609 void Version::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
610 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.Version)
611 if (&from == this) return;
612 Clear();
613 MergeFrom(from);
614 }
615
CopyFrom(const Version & from)616 void Version::CopyFrom(const Version& from) {
617 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.Version)
618 if (&from == this) return;
619 Clear();
620 MergeFrom(from);
621 }
622
IsInitialized() const623 bool Version::IsInitialized() const {
624 return true;
625 }
626
InternalSwap(Version * other)627 void Version::InternalSwap(Version* other) {
628 using std::swap;
629 _internal_metadata_.Swap(&other->_internal_metadata_);
630 swap(_has_bits_[0], other->_has_bits_[0]);
631 suffix_.Swap(&other->suffix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
632 GetArenaNoVirtual());
633 swap(major_, other->major_);
634 swap(minor_, other->minor_);
635 swap(patch_, other->patch_);
636 }
637
GetMetadata() const638 ::PROTOBUF_NAMESPACE_ID::Metadata Version::GetMetadata() const {
639 return GetMetadataStatic();
640 }
641
642
643 // ===================================================================
644
InitAsDefaultInstance()645 void CodeGeneratorRequest::InitAsDefaultInstance() {
646 PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_._instance.get_mutable()->compiler_version_ = const_cast< PROTOBUF_NAMESPACE_ID::compiler::Version*>(
647 PROTOBUF_NAMESPACE_ID::compiler::Version::internal_default_instance());
648 }
649 class CodeGeneratorRequest::_Internal {
650 public:
651 using HasBits = decltype(std::declval<CodeGeneratorRequest>()._has_bits_);
set_has_parameter(HasBits * has_bits)652 static void set_has_parameter(HasBits* has_bits) {
653 (*has_bits)[0] |= 1u;
654 }
655 static const PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version(const CodeGeneratorRequest* msg);
set_has_compiler_version(HasBits * has_bits)656 static void set_has_compiler_version(HasBits* has_bits) {
657 (*has_bits)[0] |= 2u;
658 }
659 };
660
661 const PROTOBUF_NAMESPACE_ID::compiler::Version&
compiler_version(const CodeGeneratorRequest * msg)662 CodeGeneratorRequest::_Internal::compiler_version(const CodeGeneratorRequest* msg) {
663 return *msg->compiler_version_;
664 }
clear_proto_file()665 void CodeGeneratorRequest::clear_proto_file() {
666 proto_file_.Clear();
667 }
CodeGeneratorRequest()668 CodeGeneratorRequest::CodeGeneratorRequest()
669 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
670 SharedCtor();
671 // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest)
672 }
CodeGeneratorRequest(const CodeGeneratorRequest & from)673 CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
674 : ::PROTOBUF_NAMESPACE_ID::Message(),
675 _internal_metadata_(nullptr),
676 _has_bits_(from._has_bits_),
677 file_to_generate_(from.file_to_generate_),
678 proto_file_(from.proto_file_) {
679 _internal_metadata_.MergeFrom(from._internal_metadata_);
680 parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
681 if (from.has_parameter()) {
682 parameter_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parameter_);
683 }
684 if (from.has_compiler_version()) {
685 compiler_version_ = new PROTOBUF_NAMESPACE_ID::compiler::Version(*from.compiler_version_);
686 } else {
687 compiler_version_ = nullptr;
688 }
689 // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
690 }
691
SharedCtor()692 void CodeGeneratorRequest::SharedCtor() {
693 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
694 parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
695 compiler_version_ = nullptr;
696 }
697
~CodeGeneratorRequest()698 CodeGeneratorRequest::~CodeGeneratorRequest() {
699 // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorRequest)
700 SharedDtor();
701 }
702
SharedDtor()703 void CodeGeneratorRequest::SharedDtor() {
704 parameter_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
705 if (this != internal_default_instance()) delete compiler_version_;
706 }
707
SetCachedSize(int size) const708 void CodeGeneratorRequest::SetCachedSize(int size) const {
709 _cached_size_.Set(size);
710 }
default_instance()711 const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() {
712 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
713 return *internal_default_instance();
714 }
715
716
Clear()717 void CodeGeneratorRequest::Clear() {
718 // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest)
719 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
720 // Prevent compiler warnings about cached_has_bits being unused
721 (void) cached_has_bits;
722
723 file_to_generate_.Clear();
724 proto_file_.Clear();
725 cached_has_bits = _has_bits_[0];
726 if (cached_has_bits & 0x00000003u) {
727 if (cached_has_bits & 0x00000001u) {
728 parameter_.ClearNonDefaultToEmptyNoArena();
729 }
730 if (cached_has_bits & 0x00000002u) {
731 GOOGLE_DCHECK(compiler_version_ != nullptr);
732 compiler_version_->Clear();
733 }
734 }
735 _has_bits_.Clear();
736 _internal_metadata_.Clear();
737 }
738
739 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)740 const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
741 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
742 _Internal::HasBits has_bits{};
743 while (!ctx->Done(&ptr)) {
744 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
745 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
746 CHK_(ptr);
747 switch (tag >> 3) {
748 // repeated string file_to_generate = 1;
749 case 1:
750 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
751 ptr -= 1;
752 do {
753 ptr += 1;
754 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_file_to_generate(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
755 CHK_(ptr);
756 if (!ctx->DataAvailable(ptr)) break;
757 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
758 } else goto handle_unusual;
759 continue;
760 // optional string parameter = 2;
761 case 2:
762 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
763 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_parameter(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorRequest.parameter");
764 CHK_(ptr);
765 } else goto handle_unusual;
766 continue;
767 // optional .google.protobuf.compiler.Version compiler_version = 3;
768 case 3:
769 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
770 ptr = ctx->ParseMessage(mutable_compiler_version(), ptr);
771 CHK_(ptr);
772 } else goto handle_unusual;
773 continue;
774 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
775 case 15:
776 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) {
777 ptr -= 1;
778 do {
779 ptr += 1;
780 ptr = ctx->ParseMessage(add_proto_file(), ptr);
781 CHK_(ptr);
782 if (!ctx->DataAvailable(ptr)) break;
783 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 122);
784 } else goto handle_unusual;
785 continue;
786 default: {
787 handle_unusual:
788 if ((tag & 7) == 4 || tag == 0) {
789 ctx->SetLastTag(tag);
790 goto success;
791 }
792 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
793 CHK_(ptr != nullptr);
794 continue;
795 }
796 } // switch
797 } // while
798 success:
799 _has_bits_.Or(has_bits);
800 return ptr;
801 failure:
802 ptr = nullptr;
803 goto success;
804 #undef CHK_
805 }
806 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)807 bool CodeGeneratorRequest::MergePartialFromCodedStream(
808 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
809 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
810 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
811 // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorRequest)
812 for (;;) {
813 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
814 tag = p.first;
815 if (!p.second) goto handle_unusual;
816 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
817 // repeated string file_to_generate = 1;
818 case 1: {
819 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
820 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
821 input, this->add_file_to_generate()));
822 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
823 this->file_to_generate(this->file_to_generate_size() - 1).data(),
824 static_cast<int>(this->file_to_generate(this->file_to_generate_size() - 1).length()),
825 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE,
826 "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
827 } else {
828 goto handle_unusual;
829 }
830 break;
831 }
832
833 // optional string parameter = 2;
834 case 2: {
835 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
836 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
837 input, this->mutable_parameter()));
838 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
839 this->parameter().data(), static_cast<int>(this->parameter().length()),
840 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE,
841 "google.protobuf.compiler.CodeGeneratorRequest.parameter");
842 } else {
843 goto handle_unusual;
844 }
845 break;
846 }
847
848 // optional .google.protobuf.compiler.Version compiler_version = 3;
849 case 3: {
850 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
851 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
852 input, mutable_compiler_version()));
853 } else {
854 goto handle_unusual;
855 }
856 break;
857 }
858
859 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
860 case 15: {
861 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) {
862 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
863 input, add_proto_file()));
864 } else {
865 goto handle_unusual;
866 }
867 break;
868 }
869
870 default: {
871 handle_unusual:
872 if (tag == 0) {
873 goto success;
874 }
875 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
876 input, tag, _internal_metadata_.mutable_unknown_fields()));
877 break;
878 }
879 }
880 }
881 success:
882 // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorRequest)
883 return true;
884 failure:
885 // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorRequest)
886 return false;
887 #undef DO_
888 }
889 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
890
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const891 void CodeGeneratorRequest::SerializeWithCachedSizes(
892 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
893 // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorRequest)
894 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
895 (void) cached_has_bits;
896
897 // repeated string file_to_generate = 1;
898 for (int i = 0, n = this->file_to_generate_size(); i < n; i++) {
899 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
900 this->file_to_generate(i).data(), static_cast<int>(this->file_to_generate(i).length()),
901 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
902 "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
903 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
904 1, this->file_to_generate(i), output);
905 }
906
907 cached_has_bits = _has_bits_[0];
908 // optional string parameter = 2;
909 if (cached_has_bits & 0x00000001u) {
910 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
911 this->parameter().data(), static_cast<int>(this->parameter().length()),
912 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
913 "google.protobuf.compiler.CodeGeneratorRequest.parameter");
914 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
915 2, this->parameter(), output);
916 }
917
918 // optional .google.protobuf.compiler.Version compiler_version = 3;
919 if (cached_has_bits & 0x00000002u) {
920 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
921 3, _Internal::compiler_version(this), output);
922 }
923
924 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
925 for (unsigned int i = 0,
926 n = static_cast<unsigned int>(this->proto_file_size()); i < n; i++) {
927 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
928 15,
929 this->proto_file(static_cast<int>(i)),
930 output);
931 }
932
933 if (_internal_metadata_.have_unknown_fields()) {
934 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
935 _internal_metadata_.unknown_fields(), output);
936 }
937 // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorRequest)
938 }
939
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const940 ::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorRequest::InternalSerializeWithCachedSizesToArray(
941 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
942 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest)
943 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
944 (void) cached_has_bits;
945
946 // repeated string file_to_generate = 1;
947 for (int i = 0, n = this->file_to_generate_size(); i < n; i++) {
948 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
949 this->file_to_generate(i).data(), static_cast<int>(this->file_to_generate(i).length()),
950 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
951 "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
952 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
953 WriteStringToArray(1, this->file_to_generate(i), target);
954 }
955
956 cached_has_bits = _has_bits_[0];
957 // optional string parameter = 2;
958 if (cached_has_bits & 0x00000001u) {
959 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
960 this->parameter().data(), static_cast<int>(this->parameter().length()),
961 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
962 "google.protobuf.compiler.CodeGeneratorRequest.parameter");
963 target =
964 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
965 2, this->parameter(), target);
966 }
967
968 // optional .google.protobuf.compiler.Version compiler_version = 3;
969 if (cached_has_bits & 0x00000002u) {
970 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
971 InternalWriteMessageToArray(
972 3, _Internal::compiler_version(this), target);
973 }
974
975 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
976 for (unsigned int i = 0,
977 n = static_cast<unsigned int>(this->proto_file_size()); i < n; i++) {
978 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
979 InternalWriteMessageToArray(
980 15, this->proto_file(static_cast<int>(i)), target);
981 }
982
983 if (_internal_metadata_.have_unknown_fields()) {
984 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
985 _internal_metadata_.unknown_fields(), target);
986 }
987 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorRequest)
988 return target;
989 }
990
ByteSizeLong() const991 size_t CodeGeneratorRequest::ByteSizeLong() const {
992 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorRequest)
993 size_t total_size = 0;
994
995 if (_internal_metadata_.have_unknown_fields()) {
996 total_size +=
997 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
998 _internal_metadata_.unknown_fields());
999 }
1000 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1001 // Prevent compiler warnings about cached_has_bits being unused
1002 (void) cached_has_bits;
1003
1004 // repeated string file_to_generate = 1;
1005 total_size += 1 *
1006 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->file_to_generate_size());
1007 for (int i = 0, n = this->file_to_generate_size(); i < n; i++) {
1008 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1009 this->file_to_generate(i));
1010 }
1011
1012 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
1013 {
1014 unsigned int count = static_cast<unsigned int>(this->proto_file_size());
1015 total_size += 1UL * count;
1016 for (unsigned int i = 0; i < count; i++) {
1017 total_size +=
1018 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1019 this->proto_file(static_cast<int>(i)));
1020 }
1021 }
1022
1023 cached_has_bits = _has_bits_[0];
1024 if (cached_has_bits & 0x00000003u) {
1025 // optional string parameter = 2;
1026 if (cached_has_bits & 0x00000001u) {
1027 total_size += 1 +
1028 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1029 this->parameter());
1030 }
1031
1032 // optional .google.protobuf.compiler.Version compiler_version = 3;
1033 if (cached_has_bits & 0x00000002u) {
1034 total_size += 1 +
1035 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1036 *compiler_version_);
1037 }
1038
1039 }
1040 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1041 SetCachedSize(cached_size);
1042 return total_size;
1043 }
1044
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1045 void CodeGeneratorRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1046 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
1047 GOOGLE_DCHECK_NE(&from, this);
1048 const CodeGeneratorRequest* source =
1049 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CodeGeneratorRequest>(
1050 &from);
1051 if (source == nullptr) {
1052 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorRequest)
1053 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1054 } else {
1055 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorRequest)
1056 MergeFrom(*source);
1057 }
1058 }
1059
MergeFrom(const CodeGeneratorRequest & from)1060 void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
1061 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
1062 GOOGLE_DCHECK_NE(&from, this);
1063 _internal_metadata_.MergeFrom(from._internal_metadata_);
1064 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1065 (void) cached_has_bits;
1066
1067 file_to_generate_.MergeFrom(from.file_to_generate_);
1068 proto_file_.MergeFrom(from.proto_file_);
1069 cached_has_bits = from._has_bits_[0];
1070 if (cached_has_bits & 0x00000003u) {
1071 if (cached_has_bits & 0x00000001u) {
1072 _has_bits_[0] |= 0x00000001u;
1073 parameter_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parameter_);
1074 }
1075 if (cached_has_bits & 0x00000002u) {
1076 mutable_compiler_version()->PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(from.compiler_version());
1077 }
1078 }
1079 }
1080
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1081 void CodeGeneratorRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1082 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorRequest)
1083 if (&from == this) return;
1084 Clear();
1085 MergeFrom(from);
1086 }
1087
CopyFrom(const CodeGeneratorRequest & from)1088 void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) {
1089 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorRequest)
1090 if (&from == this) return;
1091 Clear();
1092 MergeFrom(from);
1093 }
1094
IsInitialized() const1095 bool CodeGeneratorRequest::IsInitialized() const {
1096 if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->proto_file())) return false;
1097 return true;
1098 }
1099
InternalSwap(CodeGeneratorRequest * other)1100 void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
1101 using std::swap;
1102 _internal_metadata_.Swap(&other->_internal_metadata_);
1103 swap(_has_bits_[0], other->_has_bits_[0]);
1104 file_to_generate_.InternalSwap(CastToBase(&other->file_to_generate_));
1105 CastToBase(&proto_file_)->InternalSwap(CastToBase(&other->proto_file_));
1106 parameter_.Swap(&other->parameter_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1107 GetArenaNoVirtual());
1108 swap(compiler_version_, other->compiler_version_);
1109 }
1110
GetMetadata() const1111 ::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorRequest::GetMetadata() const {
1112 return GetMetadataStatic();
1113 }
1114
1115
1116 // ===================================================================
1117
InitAsDefaultInstance()1118 void CodeGeneratorResponse_File::InitAsDefaultInstance() {
1119 }
1120 class CodeGeneratorResponse_File::_Internal {
1121 public:
1122 using HasBits = decltype(std::declval<CodeGeneratorResponse_File>()._has_bits_);
set_has_name(HasBits * has_bits)1123 static void set_has_name(HasBits* has_bits) {
1124 (*has_bits)[0] |= 1u;
1125 }
set_has_insertion_point(HasBits * has_bits)1126 static void set_has_insertion_point(HasBits* has_bits) {
1127 (*has_bits)[0] |= 2u;
1128 }
set_has_content(HasBits * has_bits)1129 static void set_has_content(HasBits* has_bits) {
1130 (*has_bits)[0] |= 4u;
1131 }
1132 };
1133
CodeGeneratorResponse_File()1134 CodeGeneratorResponse_File::CodeGeneratorResponse_File()
1135 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1136 SharedCtor();
1137 // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
1138 }
CodeGeneratorResponse_File(const CodeGeneratorResponse_File & from)1139 CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from)
1140 : ::PROTOBUF_NAMESPACE_ID::Message(),
1141 _internal_metadata_(nullptr),
1142 _has_bits_(from._has_bits_) {
1143 _internal_metadata_.MergeFrom(from._internal_metadata_);
1144 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1145 if (from.has_name()) {
1146 name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
1147 }
1148 insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1149 if (from.has_insertion_point()) {
1150 insertion_point_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.insertion_point_);
1151 }
1152 content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1153 if (from.has_content()) {
1154 content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_);
1155 }
1156 // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
1157 }
1158
SharedCtor()1159 void CodeGeneratorResponse_File::SharedCtor() {
1160 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
1161 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1162 insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1163 content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1164 }
1165
~CodeGeneratorResponse_File()1166 CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
1167 // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse.File)
1168 SharedDtor();
1169 }
1170
SharedDtor()1171 void CodeGeneratorResponse_File::SharedDtor() {
1172 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1173 insertion_point_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1174 content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1175 }
1176
SetCachedSize(int size) const1177 void CodeGeneratorResponse_File::SetCachedSize(int size) const {
1178 _cached_size_.Set(size);
1179 }
default_instance()1180 const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() {
1181 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
1182 return *internal_default_instance();
1183 }
1184
1185
Clear()1186 void CodeGeneratorResponse_File::Clear() {
1187 // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1188 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1189 // Prevent compiler warnings about cached_has_bits being unused
1190 (void) cached_has_bits;
1191
1192 cached_has_bits = _has_bits_[0];
1193 if (cached_has_bits & 0x00000007u) {
1194 if (cached_has_bits & 0x00000001u) {
1195 name_.ClearNonDefaultToEmptyNoArena();
1196 }
1197 if (cached_has_bits & 0x00000002u) {
1198 insertion_point_.ClearNonDefaultToEmptyNoArena();
1199 }
1200 if (cached_has_bits & 0x00000004u) {
1201 content_.ClearNonDefaultToEmptyNoArena();
1202 }
1203 }
1204 _has_bits_.Clear();
1205 _internal_metadata_.Clear();
1206 }
1207
1208 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)1209 const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1210 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1211 _Internal::HasBits has_bits{};
1212 while (!ctx->Done(&ptr)) {
1213 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1214 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1215 CHK_(ptr);
1216 switch (tag >> 3) {
1217 // optional string name = 1;
1218 case 1:
1219 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1220 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.name");
1221 CHK_(ptr);
1222 } else goto handle_unusual;
1223 continue;
1224 // optional string insertion_point = 2;
1225 case 2:
1226 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
1227 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_insertion_point(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
1228 CHK_(ptr);
1229 } else goto handle_unusual;
1230 continue;
1231 // optional string content = 15;
1232 case 15:
1233 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) {
1234 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_content(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.content");
1235 CHK_(ptr);
1236 } else goto handle_unusual;
1237 continue;
1238 default: {
1239 handle_unusual:
1240 if ((tag & 7) == 4 || tag == 0) {
1241 ctx->SetLastTag(tag);
1242 goto success;
1243 }
1244 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1245 CHK_(ptr != nullptr);
1246 continue;
1247 }
1248 } // switch
1249 } // while
1250 success:
1251 _has_bits_.Or(has_bits);
1252 return ptr;
1253 failure:
1254 ptr = nullptr;
1255 goto success;
1256 #undef CHK_
1257 }
1258 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)1259 bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
1260 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1261 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1262 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1263 // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1264 for (;;) {
1265 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1266 tag = p.first;
1267 if (!p.second) goto handle_unusual;
1268 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1269 // optional string name = 1;
1270 case 1: {
1271 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
1272 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1273 input, this->mutable_name()));
1274 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1275 this->name().data(), static_cast<int>(this->name().length()),
1276 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE,
1277 "google.protobuf.compiler.CodeGeneratorResponse.File.name");
1278 } else {
1279 goto handle_unusual;
1280 }
1281 break;
1282 }
1283
1284 // optional string insertion_point = 2;
1285 case 2: {
1286 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
1287 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1288 input, this->mutable_insertion_point()));
1289 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1290 this->insertion_point().data(), static_cast<int>(this->insertion_point().length()),
1291 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE,
1292 "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
1293 } else {
1294 goto handle_unusual;
1295 }
1296 break;
1297 }
1298
1299 // optional string content = 15;
1300 case 15: {
1301 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) {
1302 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1303 input, this->mutable_content()));
1304 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1305 this->content().data(), static_cast<int>(this->content().length()),
1306 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE,
1307 "google.protobuf.compiler.CodeGeneratorResponse.File.content");
1308 } else {
1309 goto handle_unusual;
1310 }
1311 break;
1312 }
1313
1314 default: {
1315 handle_unusual:
1316 if (tag == 0) {
1317 goto success;
1318 }
1319 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1320 input, tag, _internal_metadata_.mutable_unknown_fields()));
1321 break;
1322 }
1323 }
1324 }
1325 success:
1326 // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorResponse.File)
1327 return true;
1328 failure:
1329 // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorResponse.File)
1330 return false;
1331 #undef DO_
1332 }
1333 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1334
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const1335 void CodeGeneratorResponse_File::SerializeWithCachedSizes(
1336 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1337 // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1338 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1339 (void) cached_has_bits;
1340
1341 cached_has_bits = _has_bits_[0];
1342 // optional string name = 1;
1343 if (cached_has_bits & 0x00000001u) {
1344 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1345 this->name().data(), static_cast<int>(this->name().length()),
1346 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1347 "google.protobuf.compiler.CodeGeneratorResponse.File.name");
1348 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1349 1, this->name(), output);
1350 }
1351
1352 // optional string insertion_point = 2;
1353 if (cached_has_bits & 0x00000002u) {
1354 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1355 this->insertion_point().data(), static_cast<int>(this->insertion_point().length()),
1356 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1357 "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
1358 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1359 2, this->insertion_point(), output);
1360 }
1361
1362 // optional string content = 15;
1363 if (cached_has_bits & 0x00000004u) {
1364 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1365 this->content().data(), static_cast<int>(this->content().length()),
1366 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1367 "google.protobuf.compiler.CodeGeneratorResponse.File.content");
1368 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1369 15, this->content(), output);
1370 }
1371
1372 if (_internal_metadata_.have_unknown_fields()) {
1373 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1374 _internal_metadata_.unknown_fields(), output);
1375 }
1376 // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse.File)
1377 }
1378
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const1379 ::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse_File::InternalSerializeWithCachedSizesToArray(
1380 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1381 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1382 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1383 (void) cached_has_bits;
1384
1385 cached_has_bits = _has_bits_[0];
1386 // optional string name = 1;
1387 if (cached_has_bits & 0x00000001u) {
1388 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1389 this->name().data(), static_cast<int>(this->name().length()),
1390 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1391 "google.protobuf.compiler.CodeGeneratorResponse.File.name");
1392 target =
1393 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1394 1, this->name(), target);
1395 }
1396
1397 // optional string insertion_point = 2;
1398 if (cached_has_bits & 0x00000002u) {
1399 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1400 this->insertion_point().data(), static_cast<int>(this->insertion_point().length()),
1401 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1402 "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
1403 target =
1404 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1405 2, this->insertion_point(), target);
1406 }
1407
1408 // optional string content = 15;
1409 if (cached_has_bits & 0x00000004u) {
1410 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1411 this->content().data(), static_cast<int>(this->content().length()),
1412 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1413 "google.protobuf.compiler.CodeGeneratorResponse.File.content");
1414 target =
1415 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1416 15, this->content(), target);
1417 }
1418
1419 if (_internal_metadata_.have_unknown_fields()) {
1420 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1421 _internal_metadata_.unknown_fields(), target);
1422 }
1423 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse.File)
1424 return target;
1425 }
1426
ByteSizeLong() const1427 size_t CodeGeneratorResponse_File::ByteSizeLong() const {
1428 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1429 size_t total_size = 0;
1430
1431 if (_internal_metadata_.have_unknown_fields()) {
1432 total_size +=
1433 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1434 _internal_metadata_.unknown_fields());
1435 }
1436 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1437 // Prevent compiler warnings about cached_has_bits being unused
1438 (void) cached_has_bits;
1439
1440 cached_has_bits = _has_bits_[0];
1441 if (cached_has_bits & 0x00000007u) {
1442 // optional string name = 1;
1443 if (cached_has_bits & 0x00000001u) {
1444 total_size += 1 +
1445 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1446 this->name());
1447 }
1448
1449 // optional string insertion_point = 2;
1450 if (cached_has_bits & 0x00000002u) {
1451 total_size += 1 +
1452 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1453 this->insertion_point());
1454 }
1455
1456 // optional string content = 15;
1457 if (cached_has_bits & 0x00000004u) {
1458 total_size += 1 +
1459 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1460 this->content());
1461 }
1462
1463 }
1464 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1465 SetCachedSize(cached_size);
1466 return total_size;
1467 }
1468
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1469 void CodeGeneratorResponse_File::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1470 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1471 GOOGLE_DCHECK_NE(&from, this);
1472 const CodeGeneratorResponse_File* source =
1473 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CodeGeneratorResponse_File>(
1474 &from);
1475 if (source == nullptr) {
1476 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorResponse.File)
1477 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1478 } else {
1479 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorResponse.File)
1480 MergeFrom(*source);
1481 }
1482 }
1483
MergeFrom(const CodeGeneratorResponse_File & from)1484 void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) {
1485 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1486 GOOGLE_DCHECK_NE(&from, this);
1487 _internal_metadata_.MergeFrom(from._internal_metadata_);
1488 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1489 (void) cached_has_bits;
1490
1491 cached_has_bits = from._has_bits_[0];
1492 if (cached_has_bits & 0x00000007u) {
1493 if (cached_has_bits & 0x00000001u) {
1494 _has_bits_[0] |= 0x00000001u;
1495 name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
1496 }
1497 if (cached_has_bits & 0x00000002u) {
1498 _has_bits_[0] |= 0x00000002u;
1499 insertion_point_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.insertion_point_);
1500 }
1501 if (cached_has_bits & 0x00000004u) {
1502 _has_bits_[0] |= 0x00000004u;
1503 content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_);
1504 }
1505 }
1506 }
1507
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1508 void CodeGeneratorResponse_File::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1509 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1510 if (&from == this) return;
1511 Clear();
1512 MergeFrom(from);
1513 }
1514
CopyFrom(const CodeGeneratorResponse_File & from)1515 void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) {
1516 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
1517 if (&from == this) return;
1518 Clear();
1519 MergeFrom(from);
1520 }
1521
IsInitialized() const1522 bool CodeGeneratorResponse_File::IsInitialized() const {
1523 return true;
1524 }
1525
InternalSwap(CodeGeneratorResponse_File * other)1526 void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) {
1527 using std::swap;
1528 _internal_metadata_.Swap(&other->_internal_metadata_);
1529 swap(_has_bits_[0], other->_has_bits_[0]);
1530 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1531 GetArenaNoVirtual());
1532 insertion_point_.Swap(&other->insertion_point_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1533 GetArenaNoVirtual());
1534 content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1535 GetArenaNoVirtual());
1536 }
1537
GetMetadata() const1538 ::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse_File::GetMetadata() const {
1539 return GetMetadataStatic();
1540 }
1541
1542
1543 // ===================================================================
1544
InitAsDefaultInstance()1545 void CodeGeneratorResponse::InitAsDefaultInstance() {
1546 }
1547 class CodeGeneratorResponse::_Internal {
1548 public:
1549 using HasBits = decltype(std::declval<CodeGeneratorResponse>()._has_bits_);
set_has_error(HasBits * has_bits)1550 static void set_has_error(HasBits* has_bits) {
1551 (*has_bits)[0] |= 1u;
1552 }
1553 };
1554
CodeGeneratorResponse()1555 CodeGeneratorResponse::CodeGeneratorResponse()
1556 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1557 SharedCtor();
1558 // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse)
1559 }
CodeGeneratorResponse(const CodeGeneratorResponse & from)1560 CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
1561 : ::PROTOBUF_NAMESPACE_ID::Message(),
1562 _internal_metadata_(nullptr),
1563 _has_bits_(from._has_bits_),
1564 file_(from.file_) {
1565 _internal_metadata_.MergeFrom(from._internal_metadata_);
1566 error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1567 if (from.has_error()) {
1568 error_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_);
1569 }
1570 // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse)
1571 }
1572
SharedCtor()1573 void CodeGeneratorResponse::SharedCtor() {
1574 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
1575 error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1576 }
1577
~CodeGeneratorResponse()1578 CodeGeneratorResponse::~CodeGeneratorResponse() {
1579 // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse)
1580 SharedDtor();
1581 }
1582
SharedDtor()1583 void CodeGeneratorResponse::SharedDtor() {
1584 error_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1585 }
1586
SetCachedSize(int size) const1587 void CodeGeneratorResponse::SetCachedSize(int size) const {
1588 _cached_size_.Set(size);
1589 }
default_instance()1590 const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() {
1591 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base);
1592 return *internal_default_instance();
1593 }
1594
1595
Clear()1596 void CodeGeneratorResponse::Clear() {
1597 // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse)
1598 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1599 // Prevent compiler warnings about cached_has_bits being unused
1600 (void) cached_has_bits;
1601
1602 file_.Clear();
1603 cached_has_bits = _has_bits_[0];
1604 if (cached_has_bits & 0x00000001u) {
1605 error_.ClearNonDefaultToEmptyNoArena();
1606 }
1607 _has_bits_.Clear();
1608 _internal_metadata_.Clear();
1609 }
1610
1611 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)1612 const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1613 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1614 _Internal::HasBits has_bits{};
1615 while (!ctx->Done(&ptr)) {
1616 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1617 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1618 CHK_(ptr);
1619 switch (tag >> 3) {
1620 // optional string error = 1;
1621 case 1:
1622 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1623 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_error(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.error");
1624 CHK_(ptr);
1625 } else goto handle_unusual;
1626 continue;
1627 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
1628 case 15:
1629 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) {
1630 ptr -= 1;
1631 do {
1632 ptr += 1;
1633 ptr = ctx->ParseMessage(add_file(), ptr);
1634 CHK_(ptr);
1635 if (!ctx->DataAvailable(ptr)) break;
1636 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 122);
1637 } else goto handle_unusual;
1638 continue;
1639 default: {
1640 handle_unusual:
1641 if ((tag & 7) == 4 || tag == 0) {
1642 ctx->SetLastTag(tag);
1643 goto success;
1644 }
1645 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1646 CHK_(ptr != nullptr);
1647 continue;
1648 }
1649 } // switch
1650 } // while
1651 success:
1652 _has_bits_.Or(has_bits);
1653 return ptr;
1654 failure:
1655 ptr = nullptr;
1656 goto success;
1657 #undef CHK_
1658 }
1659 #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)1660 bool CodeGeneratorResponse::MergePartialFromCodedStream(
1661 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1662 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1663 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1664 // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse)
1665 for (;;) {
1666 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1667 tag = p.first;
1668 if (!p.second) goto handle_unusual;
1669 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1670 // optional string error = 1;
1671 case 1: {
1672 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
1673 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1674 input, this->mutable_error()));
1675 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1676 this->error().data(), static_cast<int>(this->error().length()),
1677 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE,
1678 "google.protobuf.compiler.CodeGeneratorResponse.error");
1679 } else {
1680 goto handle_unusual;
1681 }
1682 break;
1683 }
1684
1685 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
1686 case 15: {
1687 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) {
1688 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1689 input, add_file()));
1690 } else {
1691 goto handle_unusual;
1692 }
1693 break;
1694 }
1695
1696 default: {
1697 handle_unusual:
1698 if (tag == 0) {
1699 goto success;
1700 }
1701 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1702 input, tag, _internal_metadata_.mutable_unknown_fields()));
1703 break;
1704 }
1705 }
1706 }
1707 success:
1708 // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorResponse)
1709 return true;
1710 failure:
1711 // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorResponse)
1712 return false;
1713 #undef DO_
1714 }
1715 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1716
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const1717 void CodeGeneratorResponse::SerializeWithCachedSizes(
1718 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1719 // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse)
1720 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1721 (void) cached_has_bits;
1722
1723 cached_has_bits = _has_bits_[0];
1724 // optional string error = 1;
1725 if (cached_has_bits & 0x00000001u) {
1726 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1727 this->error().data(), static_cast<int>(this->error().length()),
1728 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1729 "google.protobuf.compiler.CodeGeneratorResponse.error");
1730 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1731 1, this->error(), output);
1732 }
1733
1734 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
1735 for (unsigned int i = 0,
1736 n = static_cast<unsigned int>(this->file_size()); i < n; i++) {
1737 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1738 15,
1739 this->file(static_cast<int>(i)),
1740 output);
1741 }
1742
1743 if (_internal_metadata_.have_unknown_fields()) {
1744 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1745 _internal_metadata_.unknown_fields(), output);
1746 }
1747 // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse)
1748 }
1749
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const1750 ::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse::InternalSerializeWithCachedSizesToArray(
1751 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1752 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse)
1753 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1754 (void) cached_has_bits;
1755
1756 cached_has_bits = _has_bits_[0];
1757 // optional string error = 1;
1758 if (cached_has_bits & 0x00000001u) {
1759 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1760 this->error().data(), static_cast<int>(this->error().length()),
1761 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1762 "google.protobuf.compiler.CodeGeneratorResponse.error");
1763 target =
1764 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1765 1, this->error(), target);
1766 }
1767
1768 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
1769 for (unsigned int i = 0,
1770 n = static_cast<unsigned int>(this->file_size()); i < n; i++) {
1771 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1772 InternalWriteMessageToArray(
1773 15, this->file(static_cast<int>(i)), target);
1774 }
1775
1776 if (_internal_metadata_.have_unknown_fields()) {
1777 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1778 _internal_metadata_.unknown_fields(), target);
1779 }
1780 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse)
1781 return target;
1782 }
1783
ByteSizeLong() const1784 size_t CodeGeneratorResponse::ByteSizeLong() const {
1785 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse)
1786 size_t total_size = 0;
1787
1788 if (_internal_metadata_.have_unknown_fields()) {
1789 total_size +=
1790 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1791 _internal_metadata_.unknown_fields());
1792 }
1793 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1794 // Prevent compiler warnings about cached_has_bits being unused
1795 (void) cached_has_bits;
1796
1797 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
1798 {
1799 unsigned int count = static_cast<unsigned int>(this->file_size());
1800 total_size += 1UL * count;
1801 for (unsigned int i = 0; i < count; i++) {
1802 total_size +=
1803 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1804 this->file(static_cast<int>(i)));
1805 }
1806 }
1807
1808 // optional string error = 1;
1809 cached_has_bits = _has_bits_[0];
1810 if (cached_has_bits & 0x00000001u) {
1811 total_size += 1 +
1812 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1813 this->error());
1814 }
1815
1816 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1817 SetCachedSize(cached_size);
1818 return total_size;
1819 }
1820
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1821 void CodeGeneratorResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1822 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
1823 GOOGLE_DCHECK_NE(&from, this);
1824 const CodeGeneratorResponse* source =
1825 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CodeGeneratorResponse>(
1826 &from);
1827 if (source == nullptr) {
1828 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorResponse)
1829 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1830 } else {
1831 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorResponse)
1832 MergeFrom(*source);
1833 }
1834 }
1835
MergeFrom(const CodeGeneratorResponse & from)1836 void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
1837 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
1838 GOOGLE_DCHECK_NE(&from, this);
1839 _internal_metadata_.MergeFrom(from._internal_metadata_);
1840 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1841 (void) cached_has_bits;
1842
1843 file_.MergeFrom(from.file_);
1844 if (from.has_error()) {
1845 _has_bits_[0] |= 0x00000001u;
1846 error_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_);
1847 }
1848 }
1849
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)1850 void CodeGeneratorResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1851 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse)
1852 if (&from == this) return;
1853 Clear();
1854 MergeFrom(from);
1855 }
1856
CopyFrom(const CodeGeneratorResponse & from)1857 void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) {
1858 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse)
1859 if (&from == this) return;
1860 Clear();
1861 MergeFrom(from);
1862 }
1863
IsInitialized() const1864 bool CodeGeneratorResponse::IsInitialized() const {
1865 return true;
1866 }
1867
InternalSwap(CodeGeneratorResponse * other)1868 void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
1869 using std::swap;
1870 _internal_metadata_.Swap(&other->_internal_metadata_);
1871 swap(_has_bits_[0], other->_has_bits_[0]);
1872 CastToBase(&file_)->InternalSwap(CastToBase(&other->file_));
1873 error_.Swap(&other->error_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1874 GetArenaNoVirtual());
1875 }
1876
GetMetadata() const1877 ::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse::GetMetadata() const {
1878 return GetMetadataStatic();
1879 }
1880
1881
1882 // @@protoc_insertion_point(namespace_scope)
1883 } // namespace compiler
1884 PROTOBUF_NAMESPACE_CLOSE
1885 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)1886 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::Version* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::Version >(Arena* arena) {
1887 return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::Version >(arena);
1888 }
CreateMaybeMessage(Arena * arena)1889 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(Arena* arena) {
1890 return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(arena);
1891 }
CreateMaybeMessage(Arena * arena)1892 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(Arena* arena) {
1893 return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(arena);
1894 }
CreateMaybeMessage(Arena * arena)1895 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(Arena* arena) {
1896 return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(arena);
1897 }
1898 PROTOBUF_NAMESPACE_CLOSE
1899
1900 // @@protoc_insertion_point(global_scope)
1901 #include <google/protobuf/port_undef.inc>
1902