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