blob: 93f2ca8d9278cbab4a286d41c69d8f742d30d087 [file] [log] [blame]
David LeGare793d84b2022-03-02 16:21:10 +00001// This file is generated by rust-protobuf 2.26.0. Do not edit
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002// @generated
3
4// https://github.com/rust-lang/rust-clippy/issues/702
5#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
Haibo Huang52aa7852020-07-10 20:23:55 -07008#![allow(unused_attributes)]
Joel Galensonfa77f002021-04-02 11:32:01 -07009#![cfg_attr(rustfmt, rustfmt::skip)]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010
11#![allow(box_pointers)]
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070018#![allow(unused_imports)]
19#![allow(unused_results)]
20//! Generated file from `google/protobuf/compiler/plugin.proto`
21
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070022#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -080023#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
24pub struct Version {
25 // message fields
26 major: ::std::option::Option<i32>,
27 minor: ::std::option::Option<i32>,
28 patch: ::std::option::Option<i32>,
29 suffix: crate::SingularField<::std::string::String>,
30 // special fields
31 #[cfg_attr(feature = "with-serde", serde(skip))]
32 pub unknown_fields: crate::UnknownFields,
33 #[cfg_attr(feature = "with-serde", serde(skip))]
34 pub cached_size: crate::CachedSize,
35}
36
37impl<'a> ::std::default::Default for &'a Version {
38 fn default() -> &'a Version {
39 <Version as crate::Message>::default_instance()
40 }
41}
42
43impl Version {
44 pub fn new() -> Version {
45 ::std::default::Default::default()
46 }
47
48 // optional int32 major = 1;
49
50
51 pub fn get_major(&self) -> i32 {
52 self.major.unwrap_or(0)
53 }
54 pub fn clear_major(&mut self) {
55 self.major = ::std::option::Option::None;
56 }
57
58 pub fn has_major(&self) -> bool {
59 self.major.is_some()
60 }
61
62 // Param is passed by value, moved
63 pub fn set_major(&mut self, v: i32) {
64 self.major = ::std::option::Option::Some(v);
65 }
66
67 // optional int32 minor = 2;
68
69
70 pub fn get_minor(&self) -> i32 {
71 self.minor.unwrap_or(0)
72 }
73 pub fn clear_minor(&mut self) {
74 self.minor = ::std::option::Option::None;
75 }
76
77 pub fn has_minor(&self) -> bool {
78 self.minor.is_some()
79 }
80
81 // Param is passed by value, moved
82 pub fn set_minor(&mut self, v: i32) {
83 self.minor = ::std::option::Option::Some(v);
84 }
85
86 // optional int32 patch = 3;
87
88
89 pub fn get_patch(&self) -> i32 {
90 self.patch.unwrap_or(0)
91 }
92 pub fn clear_patch(&mut self) {
93 self.patch = ::std::option::Option::None;
94 }
95
96 pub fn has_patch(&self) -> bool {
97 self.patch.is_some()
98 }
99
100 // Param is passed by value, moved
101 pub fn set_patch(&mut self, v: i32) {
102 self.patch = ::std::option::Option::Some(v);
103 }
104
105 // optional string suffix = 4;
106
107
108 pub fn get_suffix(&self) -> &str {
109 match self.suffix.as_ref() {
110 Some(v) => &v,
111 None => "",
112 }
113 }
114 pub fn clear_suffix(&mut self) {
115 self.suffix.clear();
116 }
117
118 pub fn has_suffix(&self) -> bool {
119 self.suffix.is_some()
120 }
121
122 // Param is passed by value, moved
123 pub fn set_suffix(&mut self, v: ::std::string::String) {
124 self.suffix = crate::SingularField::some(v);
125 }
126
127 // Mutable pointer to the field.
128 // If field is not initialized, it is initialized with default value first.
129 pub fn mut_suffix(&mut self) -> &mut ::std::string::String {
130 if self.suffix.is_none() {
131 self.suffix.set_default();
132 }
133 self.suffix.as_mut().unwrap()
134 }
135
136 // Take field
137 pub fn take_suffix(&mut self) -> ::std::string::String {
138 self.suffix.take().unwrap_or_else(|| ::std::string::String::new())
139 }
140}
141
142impl crate::Message for Version {
143 fn is_initialized(&self) -> bool {
144 true
145 }
146
147 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
148 while !is.eof()? {
149 let (field_number, wire_type) = is.read_tag_unpack()?;
150 match field_number {
151 1 => {
152 if wire_type != crate::wire_format::WireTypeVarint {
153 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
154 }
155 let tmp = is.read_int32()?;
156 self.major = ::std::option::Option::Some(tmp);
157 },
158 2 => {
159 if wire_type != crate::wire_format::WireTypeVarint {
160 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
161 }
162 let tmp = is.read_int32()?;
163 self.minor = ::std::option::Option::Some(tmp);
164 },
165 3 => {
166 if wire_type != crate::wire_format::WireTypeVarint {
167 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
168 }
169 let tmp = is.read_int32()?;
170 self.patch = ::std::option::Option::Some(tmp);
171 },
172 4 => {
173 crate::rt::read_singular_string_into(wire_type, is, &mut self.suffix)?;
174 },
175 _ => {
176 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
177 },
178 };
179 }
180 ::std::result::Result::Ok(())
181 }
182
183 // Compute sizes of nested messages
184 #[allow(unused_variables)]
185 fn compute_size(&self) -> u32 {
186 let mut my_size = 0;
187 if let Some(v) = self.major {
188 my_size += crate::rt::value_size(1, v, crate::wire_format::WireTypeVarint);
189 }
190 if let Some(v) = self.minor {
191 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
192 }
193 if let Some(v) = self.patch {
194 my_size += crate::rt::value_size(3, v, crate::wire_format::WireTypeVarint);
195 }
196 if let Some(ref v) = self.suffix.as_ref() {
197 my_size += crate::rt::string_size(4, &v);
198 }
199 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
200 self.cached_size.set(my_size);
201 my_size
202 }
203
204 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
205 if let Some(v) = self.major {
206 os.write_int32(1, v)?;
207 }
208 if let Some(v) = self.minor {
209 os.write_int32(2, v)?;
210 }
211 if let Some(v) = self.patch {
212 os.write_int32(3, v)?;
213 }
214 if let Some(ref v) = self.suffix.as_ref() {
215 os.write_string(4, &v)?;
216 }
217 os.write_unknown_fields(self.get_unknown_fields())?;
218 ::std::result::Result::Ok(())
219 }
220
221 fn get_cached_size(&self) -> u32 {
222 self.cached_size.get()
223 }
224
225 fn get_unknown_fields(&self) -> &crate::UnknownFields {
226 &self.unknown_fields
227 }
228
229 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
230 &mut self.unknown_fields
231 }
232
233 fn as_any(&self) -> &dyn (::std::any::Any) {
234 self as &dyn (::std::any::Any)
235 }
236 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
237 self as &mut dyn (::std::any::Any)
238 }
239 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
240 self
241 }
242
243 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
244 Self::descriptor_static()
245 }
246
247 fn new() -> Version {
248 Version::new()
249 }
250
251 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
252 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
253 descriptor.get(|| {
254 let mut fields = ::std::vec::Vec::new();
255 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
256 "major",
257 |m: &Version| { &m.major },
258 |m: &mut Version| { &mut m.major },
259 ));
260 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
261 "minor",
262 |m: &Version| { &m.minor },
263 |m: &mut Version| { &mut m.minor },
264 ));
265 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
266 "patch",
267 |m: &Version| { &m.patch },
268 |m: &mut Version| { &mut m.patch },
269 ));
270 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
271 "suffix",
272 |m: &Version| { &m.suffix },
273 |m: &mut Version| { &mut m.suffix },
274 ));
275 crate::reflect::MessageDescriptor::new_pb_name::<Version>(
276 "Version",
277 fields,
278 file_descriptor_proto()
279 )
280 })
281 }
282
283 fn default_instance() -> &'static Version {
284 static instance: crate::rt::LazyV2<Version> = crate::rt::LazyV2::INIT;
285 instance.get(Version::new)
286 }
287}
288
289impl crate::Clear for Version {
290 fn clear(&mut self) {
291 self.major = ::std::option::Option::None;
292 self.minor = ::std::option::Option::None;
293 self.patch = ::std::option::Option::None;
294 self.suffix.clear();
295 self.unknown_fields.clear();
296 }
297}
298
299impl ::std::fmt::Debug for Version {
300 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
301 crate::text_format::fmt(self, f)
302 }
303}
304
305impl crate::reflect::ProtobufValue for Version {
306 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
307 crate::reflect::ReflectValueRef::Message(self)
308 }
309}
310
311#[derive(PartialEq,Clone,Default)]
312#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700313pub struct CodeGeneratorRequest {
314 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700315 pub file_to_generate: crate::RepeatedField<::std::string::String>,
316 parameter: crate::SingularField<::std::string::String>,
317 pub proto_file: crate::RepeatedField<crate::descriptor::FileDescriptorProto>,
Haibo Huangca95bfd2021-02-09 17:48:30 -0800318 pub compiler_version: crate::SingularPtrField<Version>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700319 // special fields
320 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700321 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700322 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700323 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700324}
325
326impl<'a> ::std::default::Default for &'a CodeGeneratorRequest {
327 fn default() -> &'a CodeGeneratorRequest {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700328 <CodeGeneratorRequest as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700329 }
330}
331
332impl CodeGeneratorRequest {
333 pub fn new() -> CodeGeneratorRequest {
334 ::std::default::Default::default()
335 }
336
337 // repeated string file_to_generate = 1;
338
339
340 pub fn get_file_to_generate(&self) -> &[::std::string::String] {
341 &self.file_to_generate
342 }
343 pub fn clear_file_to_generate(&mut self) {
344 self.file_to_generate.clear();
345 }
346
347 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700348 pub fn set_file_to_generate(&mut self, v: crate::RepeatedField<::std::string::String>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700349 self.file_to_generate = v;
350 }
351
352 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700353 pub fn mut_file_to_generate(&mut self) -> &mut crate::RepeatedField<::std::string::String> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700354 &mut self.file_to_generate
355 }
356
357 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700358 pub fn take_file_to_generate(&mut self) -> crate::RepeatedField<::std::string::String> {
359 ::std::mem::replace(&mut self.file_to_generate, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700360 }
361
362 // optional string parameter = 2;
363
364
365 pub fn get_parameter(&self) -> &str {
366 match self.parameter.as_ref() {
367 Some(v) => &v,
368 None => "",
369 }
370 }
371 pub fn clear_parameter(&mut self) {
372 self.parameter.clear();
373 }
374
375 pub fn has_parameter(&self) -> bool {
376 self.parameter.is_some()
377 }
378
379 // Param is passed by value, moved
380 pub fn set_parameter(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700381 self.parameter = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700382 }
383
384 // Mutable pointer to the field.
385 // If field is not initialized, it is initialized with default value first.
386 pub fn mut_parameter(&mut self) -> &mut ::std::string::String {
387 if self.parameter.is_none() {
388 self.parameter.set_default();
389 }
390 self.parameter.as_mut().unwrap()
391 }
392
393 // Take field
394 pub fn take_parameter(&mut self) -> ::std::string::String {
395 self.parameter.take().unwrap_or_else(|| ::std::string::String::new())
396 }
397
398 // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
399
400
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700401 pub fn get_proto_file(&self) -> &[crate::descriptor::FileDescriptorProto] {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700402 &self.proto_file
403 }
404 pub fn clear_proto_file(&mut self) {
405 self.proto_file.clear();
406 }
407
408 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700409 pub fn set_proto_file(&mut self, v: crate::RepeatedField<crate::descriptor::FileDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700410 self.proto_file = v;
411 }
412
413 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700414 pub fn mut_proto_file(&mut self) -> &mut crate::RepeatedField<crate::descriptor::FileDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700415 &mut self.proto_file
416 }
417
418 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700419 pub fn take_proto_file(&mut self) -> crate::RepeatedField<crate::descriptor::FileDescriptorProto> {
420 ::std::mem::replace(&mut self.proto_file, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700421 }
Haibo Huangca95bfd2021-02-09 17:48:30 -0800422
423 // optional .google.protobuf.compiler.Version compiler_version = 3;
424
425
426 pub fn get_compiler_version(&self) -> &Version {
427 self.compiler_version.as_ref().unwrap_or_else(|| <Version as crate::Message>::default_instance())
428 }
429 pub fn clear_compiler_version(&mut self) {
430 self.compiler_version.clear();
431 }
432
433 pub fn has_compiler_version(&self) -> bool {
434 self.compiler_version.is_some()
435 }
436
437 // Param is passed by value, moved
438 pub fn set_compiler_version(&mut self, v: Version) {
439 self.compiler_version = crate::SingularPtrField::some(v);
440 }
441
442 // Mutable pointer to the field.
443 // If field is not initialized, it is initialized with default value first.
444 pub fn mut_compiler_version(&mut self) -> &mut Version {
445 if self.compiler_version.is_none() {
446 self.compiler_version.set_default();
447 }
448 self.compiler_version.as_mut().unwrap()
449 }
450
451 // Take field
452 pub fn take_compiler_version(&mut self) -> Version {
453 self.compiler_version.take().unwrap_or_else(|| Version::new())
454 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700455}
456
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700457impl crate::Message for CodeGeneratorRequest {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700458 fn is_initialized(&self) -> bool {
459 for v in &self.proto_file {
460 if !v.is_initialized() {
461 return false;
462 }
463 };
Haibo Huangca95bfd2021-02-09 17:48:30 -0800464 for v in &self.compiler_version {
465 if !v.is_initialized() {
466 return false;
467 }
468 };
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700469 true
470 }
471
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700472 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700473 while !is.eof()? {
474 let (field_number, wire_type) = is.read_tag_unpack()?;
475 match field_number {
476 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700477 crate::rt::read_repeated_string_into(wire_type, is, &mut self.file_to_generate)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700478 },
479 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700480 crate::rt::read_singular_string_into(wire_type, is, &mut self.parameter)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700481 },
482 15 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700483 crate::rt::read_repeated_message_into(wire_type, is, &mut self.proto_file)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700484 },
Haibo Huangca95bfd2021-02-09 17:48:30 -0800485 3 => {
486 crate::rt::read_singular_message_into(wire_type, is, &mut self.compiler_version)?;
487 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700488 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700489 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700490 },
491 };
492 }
493 ::std::result::Result::Ok(())
494 }
495
496 // Compute sizes of nested messages
497 #[allow(unused_variables)]
498 fn compute_size(&self) -> u32 {
499 let mut my_size = 0;
500 for value in &self.file_to_generate {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700501 my_size += crate::rt::string_size(1, &value);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700502 };
503 if let Some(ref v) = self.parameter.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700504 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700505 }
506 for value in &self.proto_file {
507 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700508 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700509 };
Haibo Huangca95bfd2021-02-09 17:48:30 -0800510 if let Some(ref v) = self.compiler_version.as_ref() {
511 let len = v.compute_size();
512 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
513 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700514 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700515 self.cached_size.set(my_size);
516 my_size
517 }
518
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700519 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700520 for v in &self.file_to_generate {
521 os.write_string(1, &v)?;
522 };
523 if let Some(ref v) = self.parameter.as_ref() {
524 os.write_string(2, &v)?;
525 }
526 for v in &self.proto_file {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700527 os.write_tag(15, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700528 os.write_raw_varint32(v.get_cached_size())?;
529 v.write_to_with_cached_sizes(os)?;
530 };
Haibo Huangca95bfd2021-02-09 17:48:30 -0800531 if let Some(ref v) = self.compiler_version.as_ref() {
532 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
533 os.write_raw_varint32(v.get_cached_size())?;
534 v.write_to_with_cached_sizes(os)?;
535 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700536 os.write_unknown_fields(self.get_unknown_fields())?;
537 ::std::result::Result::Ok(())
538 }
539
540 fn get_cached_size(&self) -> u32 {
541 self.cached_size.get()
542 }
543
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700544 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700545 &self.unknown_fields
546 }
547
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700548 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700549 &mut self.unknown_fields
550 }
551
552 fn as_any(&self) -> &dyn (::std::any::Any) {
553 self as &dyn (::std::any::Any)
554 }
555 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
556 self as &mut dyn (::std::any::Any)
557 }
Haibo Huang52aa7852020-07-10 20:23:55 -0700558 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700559 self
560 }
561
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700562 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700563 Self::descriptor_static()
564 }
565
566 fn new() -> CodeGeneratorRequest {
567 CodeGeneratorRequest::new()
568 }
569
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700570 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
571 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700572 descriptor.get(|| {
573 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700574 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700575 "file_to_generate",
576 |m: &CodeGeneratorRequest| { &m.file_to_generate },
577 |m: &mut CodeGeneratorRequest| { &mut m.file_to_generate },
578 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700579 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700580 "parameter",
581 |m: &CodeGeneratorRequest| { &m.parameter },
582 |m: &mut CodeGeneratorRequest| { &mut m.parameter },
583 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700584 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<crate::descriptor::FileDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700585 "proto_file",
586 |m: &CodeGeneratorRequest| { &m.proto_file },
587 |m: &mut CodeGeneratorRequest| { &mut m.proto_file },
588 ));
Haibo Huangca95bfd2021-02-09 17:48:30 -0800589 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<Version>>(
590 "compiler_version",
591 |m: &CodeGeneratorRequest| { &m.compiler_version },
592 |m: &mut CodeGeneratorRequest| { &mut m.compiler_version },
593 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700594 crate::reflect::MessageDescriptor::new_pb_name::<CodeGeneratorRequest>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700595 "CodeGeneratorRequest",
596 fields,
597 file_descriptor_proto()
598 )
599 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700600 }
601
602 fn default_instance() -> &'static CodeGeneratorRequest {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700603 static instance: crate::rt::LazyV2<CodeGeneratorRequest> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700604 instance.get(CodeGeneratorRequest::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700605 }
606}
607
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700608impl crate::Clear for CodeGeneratorRequest {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700609 fn clear(&mut self) {
610 self.file_to_generate.clear();
611 self.parameter.clear();
612 self.proto_file.clear();
Haibo Huangca95bfd2021-02-09 17:48:30 -0800613 self.compiler_version.clear();
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700614 self.unknown_fields.clear();
615 }
616}
617
618impl ::std::fmt::Debug for CodeGeneratorRequest {
619 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700620 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700621 }
622}
623
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700624impl crate::reflect::ProtobufValue for CodeGeneratorRequest {
625 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
626 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700627 }
628}
629
630#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -0800631#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700632pub struct CodeGeneratorResponse {
633 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700634 error: crate::SingularField<::std::string::String>,
Haibo Huangca95bfd2021-02-09 17:48:30 -0800635 supported_features: ::std::option::Option<u64>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700636 pub file: crate::RepeatedField<CodeGeneratorResponse_File>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700637 // special fields
638 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700639 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700640 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700641 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700642}
643
644impl<'a> ::std::default::Default for &'a CodeGeneratorResponse {
645 fn default() -> &'a CodeGeneratorResponse {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700646 <CodeGeneratorResponse as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700647 }
648}
649
650impl CodeGeneratorResponse {
651 pub fn new() -> CodeGeneratorResponse {
652 ::std::default::Default::default()
653 }
654
655 // optional string error = 1;
656
657
658 pub fn get_error(&self) -> &str {
659 match self.error.as_ref() {
660 Some(v) => &v,
661 None => "",
662 }
663 }
664 pub fn clear_error(&mut self) {
665 self.error.clear();
666 }
667
668 pub fn has_error(&self) -> bool {
669 self.error.is_some()
670 }
671
672 // Param is passed by value, moved
673 pub fn set_error(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700674 self.error = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700675 }
676
677 // Mutable pointer to the field.
678 // If field is not initialized, it is initialized with default value first.
679 pub fn mut_error(&mut self) -> &mut ::std::string::String {
680 if self.error.is_none() {
681 self.error.set_default();
682 }
683 self.error.as_mut().unwrap()
684 }
685
686 // Take field
687 pub fn take_error(&mut self) -> ::std::string::String {
688 self.error.take().unwrap_or_else(|| ::std::string::String::new())
689 }
690
Haibo Huangca95bfd2021-02-09 17:48:30 -0800691 // optional uint64 supported_features = 2;
692
693
694 pub fn get_supported_features(&self) -> u64 {
695 self.supported_features.unwrap_or(0)
696 }
697 pub fn clear_supported_features(&mut self) {
698 self.supported_features = ::std::option::Option::None;
699 }
700
701 pub fn has_supported_features(&self) -> bool {
702 self.supported_features.is_some()
703 }
704
705 // Param is passed by value, moved
706 pub fn set_supported_features(&mut self, v: u64) {
707 self.supported_features = ::std::option::Option::Some(v);
708 }
709
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700710 // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
711
712
713 pub fn get_file(&self) -> &[CodeGeneratorResponse_File] {
714 &self.file
715 }
716 pub fn clear_file(&mut self) {
717 self.file.clear();
718 }
719
720 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700721 pub fn set_file(&mut self, v: crate::RepeatedField<CodeGeneratorResponse_File>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700722 self.file = v;
723 }
724
725 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700726 pub fn mut_file(&mut self) -> &mut crate::RepeatedField<CodeGeneratorResponse_File> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700727 &mut self.file
728 }
729
730 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700731 pub fn take_file(&mut self) -> crate::RepeatedField<CodeGeneratorResponse_File> {
732 ::std::mem::replace(&mut self.file, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700733 }
734}
735
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700736impl crate::Message for CodeGeneratorResponse {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700737 fn is_initialized(&self) -> bool {
738 for v in &self.file {
739 if !v.is_initialized() {
740 return false;
741 }
742 };
743 true
744 }
745
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700746 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700747 while !is.eof()? {
748 let (field_number, wire_type) = is.read_tag_unpack()?;
749 match field_number {
750 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700751 crate::rt::read_singular_string_into(wire_type, is, &mut self.error)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700752 },
Haibo Huangca95bfd2021-02-09 17:48:30 -0800753 2 => {
754 if wire_type != crate::wire_format::WireTypeVarint {
755 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
756 }
757 let tmp = is.read_uint64()?;
758 self.supported_features = ::std::option::Option::Some(tmp);
759 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700760 15 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700761 crate::rt::read_repeated_message_into(wire_type, is, &mut self.file)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700762 },
763 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700764 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700765 },
766 };
767 }
768 ::std::result::Result::Ok(())
769 }
770
771 // Compute sizes of nested messages
772 #[allow(unused_variables)]
773 fn compute_size(&self) -> u32 {
774 let mut my_size = 0;
775 if let Some(ref v) = self.error.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700776 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700777 }
Haibo Huangca95bfd2021-02-09 17:48:30 -0800778 if let Some(v) = self.supported_features {
779 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
780 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700781 for value in &self.file {
782 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700783 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700784 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700785 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700786 self.cached_size.set(my_size);
787 my_size
788 }
789
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700790 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700791 if let Some(ref v) = self.error.as_ref() {
792 os.write_string(1, &v)?;
793 }
Haibo Huangca95bfd2021-02-09 17:48:30 -0800794 if let Some(v) = self.supported_features {
795 os.write_uint64(2, v)?;
796 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700797 for v in &self.file {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700798 os.write_tag(15, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700799 os.write_raw_varint32(v.get_cached_size())?;
800 v.write_to_with_cached_sizes(os)?;
801 };
802 os.write_unknown_fields(self.get_unknown_fields())?;
803 ::std::result::Result::Ok(())
804 }
805
806 fn get_cached_size(&self) -> u32 {
807 self.cached_size.get()
808 }
809
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700810 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700811 &self.unknown_fields
812 }
813
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700814 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700815 &mut self.unknown_fields
816 }
817
818 fn as_any(&self) -> &dyn (::std::any::Any) {
819 self as &dyn (::std::any::Any)
820 }
821 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
822 self as &mut dyn (::std::any::Any)
823 }
Haibo Huang52aa7852020-07-10 20:23:55 -0700824 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700825 self
826 }
827
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700828 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700829 Self::descriptor_static()
830 }
831
832 fn new() -> CodeGeneratorResponse {
833 CodeGeneratorResponse::new()
834 }
835
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700836 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
837 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700838 descriptor.get(|| {
839 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700840 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700841 "error",
842 |m: &CodeGeneratorResponse| { &m.error },
843 |m: &mut CodeGeneratorResponse| { &mut m.error },
844 ));
Haibo Huangca95bfd2021-02-09 17:48:30 -0800845 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeUint64>(
846 "supported_features",
847 |m: &CodeGeneratorResponse| { &m.supported_features },
848 |m: &mut CodeGeneratorResponse| { &mut m.supported_features },
849 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700850 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<CodeGeneratorResponse_File>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700851 "file",
852 |m: &CodeGeneratorResponse| { &m.file },
853 |m: &mut CodeGeneratorResponse| { &mut m.file },
854 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700855 crate::reflect::MessageDescriptor::new_pb_name::<CodeGeneratorResponse>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700856 "CodeGeneratorResponse",
857 fields,
858 file_descriptor_proto()
859 )
860 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700861 }
862
863 fn default_instance() -> &'static CodeGeneratorResponse {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700864 static instance: crate::rt::LazyV2<CodeGeneratorResponse> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700865 instance.get(CodeGeneratorResponse::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700866 }
867}
868
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700869impl crate::Clear for CodeGeneratorResponse {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700870 fn clear(&mut self) {
871 self.error.clear();
Haibo Huangca95bfd2021-02-09 17:48:30 -0800872 self.supported_features = ::std::option::Option::None;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700873 self.file.clear();
874 self.unknown_fields.clear();
875 }
876}
877
878impl ::std::fmt::Debug for CodeGeneratorResponse {
879 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700880 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700881 }
882}
883
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700884impl crate::reflect::ProtobufValue for CodeGeneratorResponse {
885 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
886 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700887 }
888}
889
890#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -0800891#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700892pub struct CodeGeneratorResponse_File {
893 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700894 name: crate::SingularField<::std::string::String>,
895 insertion_point: crate::SingularField<::std::string::String>,
896 content: crate::SingularField<::std::string::String>,
Haibo Huangca95bfd2021-02-09 17:48:30 -0800897 pub generated_code_info: crate::SingularPtrField<crate::descriptor::GeneratedCodeInfo>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700898 // special fields
899 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700900 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700901 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700902 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700903}
904
905impl<'a> ::std::default::Default for &'a CodeGeneratorResponse_File {
906 fn default() -> &'a CodeGeneratorResponse_File {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700907 <CodeGeneratorResponse_File as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700908 }
909}
910
911impl CodeGeneratorResponse_File {
912 pub fn new() -> CodeGeneratorResponse_File {
913 ::std::default::Default::default()
914 }
915
916 // optional string name = 1;
917
918
919 pub fn get_name(&self) -> &str {
920 match self.name.as_ref() {
921 Some(v) => &v,
922 None => "",
923 }
924 }
925 pub fn clear_name(&mut self) {
926 self.name.clear();
927 }
928
929 pub fn has_name(&self) -> bool {
930 self.name.is_some()
931 }
932
933 // Param is passed by value, moved
934 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700935 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700936 }
937
938 // Mutable pointer to the field.
939 // If field is not initialized, it is initialized with default value first.
940 pub fn mut_name(&mut self) -> &mut ::std::string::String {
941 if self.name.is_none() {
942 self.name.set_default();
943 }
944 self.name.as_mut().unwrap()
945 }
946
947 // Take field
948 pub fn take_name(&mut self) -> ::std::string::String {
949 self.name.take().unwrap_or_else(|| ::std::string::String::new())
950 }
951
952 // optional string insertion_point = 2;
953
954
955 pub fn get_insertion_point(&self) -> &str {
956 match self.insertion_point.as_ref() {
957 Some(v) => &v,
958 None => "",
959 }
960 }
961 pub fn clear_insertion_point(&mut self) {
962 self.insertion_point.clear();
963 }
964
965 pub fn has_insertion_point(&self) -> bool {
966 self.insertion_point.is_some()
967 }
968
969 // Param is passed by value, moved
970 pub fn set_insertion_point(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700971 self.insertion_point = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700972 }
973
974 // Mutable pointer to the field.
975 // If field is not initialized, it is initialized with default value first.
976 pub fn mut_insertion_point(&mut self) -> &mut ::std::string::String {
977 if self.insertion_point.is_none() {
978 self.insertion_point.set_default();
979 }
980 self.insertion_point.as_mut().unwrap()
981 }
982
983 // Take field
984 pub fn take_insertion_point(&mut self) -> ::std::string::String {
985 self.insertion_point.take().unwrap_or_else(|| ::std::string::String::new())
986 }
987
988 // optional string content = 15;
989
990
991 pub fn get_content(&self) -> &str {
992 match self.content.as_ref() {
993 Some(v) => &v,
994 None => "",
995 }
996 }
997 pub fn clear_content(&mut self) {
998 self.content.clear();
999 }
1000
1001 pub fn has_content(&self) -> bool {
1002 self.content.is_some()
1003 }
1004
1005 // Param is passed by value, moved
1006 pub fn set_content(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001007 self.content = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001008 }
1009
1010 // Mutable pointer to the field.
1011 // If field is not initialized, it is initialized with default value first.
1012 pub fn mut_content(&mut self) -> &mut ::std::string::String {
1013 if self.content.is_none() {
1014 self.content.set_default();
1015 }
1016 self.content.as_mut().unwrap()
1017 }
1018
1019 // Take field
1020 pub fn take_content(&mut self) -> ::std::string::String {
1021 self.content.take().unwrap_or_else(|| ::std::string::String::new())
1022 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08001023
1024 // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16;
1025
1026
1027 pub fn get_generated_code_info(&self) -> &crate::descriptor::GeneratedCodeInfo {
1028 self.generated_code_info.as_ref().unwrap_or_else(|| <crate::descriptor::GeneratedCodeInfo as crate::Message>::default_instance())
1029 }
1030 pub fn clear_generated_code_info(&mut self) {
1031 self.generated_code_info.clear();
1032 }
1033
1034 pub fn has_generated_code_info(&self) -> bool {
1035 self.generated_code_info.is_some()
1036 }
1037
1038 // Param is passed by value, moved
1039 pub fn set_generated_code_info(&mut self, v: crate::descriptor::GeneratedCodeInfo) {
1040 self.generated_code_info = crate::SingularPtrField::some(v);
1041 }
1042
1043 // Mutable pointer to the field.
1044 // If field is not initialized, it is initialized with default value first.
1045 pub fn mut_generated_code_info(&mut self) -> &mut crate::descriptor::GeneratedCodeInfo {
1046 if self.generated_code_info.is_none() {
1047 self.generated_code_info.set_default();
1048 }
1049 self.generated_code_info.as_mut().unwrap()
1050 }
1051
1052 // Take field
1053 pub fn take_generated_code_info(&mut self) -> crate::descriptor::GeneratedCodeInfo {
1054 self.generated_code_info.take().unwrap_or_else(|| crate::descriptor::GeneratedCodeInfo::new())
1055 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001056}
1057
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001058impl crate::Message for CodeGeneratorResponse_File {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001059 fn is_initialized(&self) -> bool {
Haibo Huangca95bfd2021-02-09 17:48:30 -08001060 for v in &self.generated_code_info {
1061 if !v.is_initialized() {
1062 return false;
1063 }
1064 };
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001065 true
1066 }
1067
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001068 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001069 while !is.eof()? {
1070 let (field_number, wire_type) = is.read_tag_unpack()?;
1071 match field_number {
1072 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001073 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001074 },
1075 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001076 crate::rt::read_singular_string_into(wire_type, is, &mut self.insertion_point)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001077 },
1078 15 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001079 crate::rt::read_singular_string_into(wire_type, is, &mut self.content)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001080 },
Haibo Huangca95bfd2021-02-09 17:48:30 -08001081 16 => {
1082 crate::rt::read_singular_message_into(wire_type, is, &mut self.generated_code_info)?;
1083 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001084 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001085 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001086 },
1087 };
1088 }
1089 ::std::result::Result::Ok(())
1090 }
1091
1092 // Compute sizes of nested messages
1093 #[allow(unused_variables)]
1094 fn compute_size(&self) -> u32 {
1095 let mut my_size = 0;
1096 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001097 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001098 }
1099 if let Some(ref v) = self.insertion_point.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001100 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001101 }
1102 if let Some(ref v) = self.content.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001103 my_size += crate::rt::string_size(15, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001104 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08001105 if let Some(ref v) = self.generated_code_info.as_ref() {
1106 let len = v.compute_size();
1107 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
1108 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001109 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001110 self.cached_size.set(my_size);
1111 my_size
1112 }
1113
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001114 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001115 if let Some(ref v) = self.name.as_ref() {
1116 os.write_string(1, &v)?;
1117 }
1118 if let Some(ref v) = self.insertion_point.as_ref() {
1119 os.write_string(2, &v)?;
1120 }
1121 if let Some(ref v) = self.content.as_ref() {
1122 os.write_string(15, &v)?;
1123 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08001124 if let Some(ref v) = self.generated_code_info.as_ref() {
1125 os.write_tag(16, crate::wire_format::WireTypeLengthDelimited)?;
1126 os.write_raw_varint32(v.get_cached_size())?;
1127 v.write_to_with_cached_sizes(os)?;
1128 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001129 os.write_unknown_fields(self.get_unknown_fields())?;
1130 ::std::result::Result::Ok(())
1131 }
1132
1133 fn get_cached_size(&self) -> u32 {
1134 self.cached_size.get()
1135 }
1136
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001137 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001138 &self.unknown_fields
1139 }
1140
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001141 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001142 &mut self.unknown_fields
1143 }
1144
1145 fn as_any(&self) -> &dyn (::std::any::Any) {
1146 self as &dyn (::std::any::Any)
1147 }
1148 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1149 self as &mut dyn (::std::any::Any)
1150 }
Haibo Huang52aa7852020-07-10 20:23:55 -07001151 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001152 self
1153 }
1154
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001155 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001156 Self::descriptor_static()
1157 }
1158
1159 fn new() -> CodeGeneratorResponse_File {
1160 CodeGeneratorResponse_File::new()
1161 }
1162
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001163 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
1164 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001165 descriptor.get(|| {
1166 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001167 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001168 "name",
1169 |m: &CodeGeneratorResponse_File| { &m.name },
1170 |m: &mut CodeGeneratorResponse_File| { &mut m.name },
1171 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001172 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001173 "insertion_point",
1174 |m: &CodeGeneratorResponse_File| { &m.insertion_point },
1175 |m: &mut CodeGeneratorResponse_File| { &mut m.insertion_point },
1176 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001177 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001178 "content",
1179 |m: &CodeGeneratorResponse_File| { &m.content },
1180 |m: &mut CodeGeneratorResponse_File| { &mut m.content },
1181 ));
Haibo Huangca95bfd2021-02-09 17:48:30 -08001182 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<crate::descriptor::GeneratedCodeInfo>>(
1183 "generated_code_info",
1184 |m: &CodeGeneratorResponse_File| { &m.generated_code_info },
1185 |m: &mut CodeGeneratorResponse_File| { &mut m.generated_code_info },
1186 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001187 crate::reflect::MessageDescriptor::new_pb_name::<CodeGeneratorResponse_File>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001188 "CodeGeneratorResponse.File",
1189 fields,
1190 file_descriptor_proto()
1191 )
1192 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001193 }
1194
1195 fn default_instance() -> &'static CodeGeneratorResponse_File {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001196 static instance: crate::rt::LazyV2<CodeGeneratorResponse_File> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001197 instance.get(CodeGeneratorResponse_File::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001198 }
1199}
1200
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001201impl crate::Clear for CodeGeneratorResponse_File {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001202 fn clear(&mut self) {
1203 self.name.clear();
1204 self.insertion_point.clear();
1205 self.content.clear();
Haibo Huangca95bfd2021-02-09 17:48:30 -08001206 self.generated_code_info.clear();
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001207 self.unknown_fields.clear();
1208 }
1209}
1210
1211impl ::std::fmt::Debug for CodeGeneratorResponse_File {
1212 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001213 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001214 }
1215}
1216
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001217impl crate::reflect::ProtobufValue for CodeGeneratorResponse_File {
1218 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
1219 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001220 }
1221}
1222
Haibo Huangca95bfd2021-02-09 17:48:30 -08001223#[derive(Clone,PartialEq,Eq,Debug,Hash)]
1224#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
1225pub enum CodeGeneratorResponse_Feature {
1226 FEATURE_NONE = 0,
1227 FEATURE_PROTO3_OPTIONAL = 1,
1228}
1229
1230impl crate::ProtobufEnum for CodeGeneratorResponse_Feature {
1231 fn value(&self) -> i32 {
1232 *self as i32
1233 }
1234
1235 fn from_i32(value: i32) -> ::std::option::Option<CodeGeneratorResponse_Feature> {
1236 match value {
1237 0 => ::std::option::Option::Some(CodeGeneratorResponse_Feature::FEATURE_NONE),
1238 1 => ::std::option::Option::Some(CodeGeneratorResponse_Feature::FEATURE_PROTO3_OPTIONAL),
1239 _ => ::std::option::Option::None
1240 }
1241 }
1242
1243 fn values() -> &'static [Self] {
1244 static values: &'static [CodeGeneratorResponse_Feature] = &[
1245 CodeGeneratorResponse_Feature::FEATURE_NONE,
1246 CodeGeneratorResponse_Feature::FEATURE_PROTO3_OPTIONAL,
1247 ];
1248 values
1249 }
1250
1251 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
1252 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
1253 descriptor.get(|| {
1254 crate::reflect::EnumDescriptor::new_pb_name::<CodeGeneratorResponse_Feature>("CodeGeneratorResponse.Feature", file_descriptor_proto())
1255 })
1256 }
1257}
1258
1259impl ::std::marker::Copy for CodeGeneratorResponse_Feature {
1260}
1261
1262impl ::std::default::Default for CodeGeneratorResponse_Feature {
1263 fn default() -> Self {
1264 CodeGeneratorResponse_Feature::FEATURE_NONE
1265 }
1266}
1267
1268impl crate::reflect::ProtobufValue for CodeGeneratorResponse_Feature {
1269 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
1270 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
1271 }
1272}
1273
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001274static file_descriptor_proto_data: &'static [u8] = b"\
1275 \n%google/protobuf/compiler/plugin.proto\x12\x18google.protobuf.compiler\
Haibo Huangca95bfd2021-02-09 17:48:30 -08001276 \x1a\x20google/protobuf/descriptor.proto\"c\n\x07Version\x12\x14\n\x05ma\
1277 jor\x18\x01\x20\x01(\x05R\x05major\x12\x14\n\x05minor\x18\x02\x20\x01(\
1278 \x05R\x05minor\x12\x14\n\x05patch\x18\x03\x20\x01(\x05R\x05patch\x12\x16\
1279 \n\x06suffix\x18\x04\x20\x01(\tR\x06suffix\"\xf1\x01\n\x14CodeGeneratorR\
1280 equest\x12(\n\x10file_to_generate\x18\x01\x20\x03(\tR\x0efileToGenerate\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001281 \x12\x1c\n\tparameter\x18\x02\x20\x01(\tR\tparameter\x12C\n\nproto_file\
1282 \x18\x0f\x20\x03(\x0b2$.google.protobuf.FileDescriptorProtoR\tprotoFile\
Haibo Huangca95bfd2021-02-09 17:48:30 -08001283 \x12L\n\x10compiler_version\x18\x03\x20\x01(\x0b2!.google.protobuf.compi\
1284 ler.VersionR\x0fcompilerVersion\"\x94\x03\n\x15CodeGeneratorResponse\x12\
1285 \x14\n\x05error\x18\x01\x20\x01(\tR\x05error\x12-\n\x12supported_feature\
1286 s\x18\x02\x20\x01(\x04R\x11supportedFeatures\x12H\n\x04file\x18\x0f\x20\
1287 \x03(\x0b24.google.protobuf.compiler.CodeGeneratorResponse.FileR\x04file\
1288 \x1a\xb1\x01\n\x04File\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\
1289 '\n\x0finsertion_point\x18\x02\x20\x01(\tR\x0einsertionPoint\x12\x18\n\
1290 \x07content\x18\x0f\x20\x01(\tR\x07content\x12R\n\x13generated_code_info\
1291 \x18\x10\x20\x01(\x0b2\".google.protobuf.GeneratedCodeInfoR\x11generated\
1292 CodeInfo\"8\n\x07Feature\x12\x10\n\x0cFEATURE_NONE\x10\0\x12\x1b\n\x17FE\
1293 ATURE_PROTO3_OPTIONAL\x10\x01BW\n\x1ccom.google.protobuf.compilerB\x0cPl\
1294 uginProtosZ)google.golang.org/protobuf/types/pluginpbJ\xf9C\n\x07\x12\
1295 \x05.\0\xb6\x01\x01\n\xca\x11\n\x01\x0c\x12\x03.\0\x122\xc1\x0c\x20Proto\
1296 col\x20Buffers\x20-\x20Google's\x20data\x20interchange\x20format\n\x20Co\
1297 pyright\x202008\x20Google\x20Inc.\x20\x20All\x20rights\x20reserved.\n\
1298 \x20https://developers.google.com/protocol-buffers/\n\n\x20Redistributio\
1299 n\x20and\x20use\x20in\x20source\x20and\x20binary\x20forms,\x20with\x20or\
1300 \x20without\n\x20modification,\x20are\x20permitted\x20provided\x20that\
1301 \x20the\x20following\x20conditions\x20are\n\x20met:\n\n\x20\x20\x20\x20\
1302 \x20*\x20Redistributions\x20of\x20source\x20code\x20must\x20retain\x20th\
1303 e\x20above\x20copyright\n\x20notice,\x20this\x20list\x20of\x20conditions\
1304 \x20and\x20the\x20following\x20disclaimer.\n\x20\x20\x20\x20\x20*\x20Red\
1305 istributions\x20in\x20binary\x20form\x20must\x20reproduce\x20the\x20abov\
1306 e\n\x20copyright\x20notice,\x20this\x20list\x20of\x20conditions\x20and\
1307 \x20the\x20following\x20disclaimer\n\x20in\x20the\x20documentation\x20an\
1308 d/or\x20other\x20materials\x20provided\x20with\x20the\n\x20distribution.\
1309 \n\x20\x20\x20\x20\x20*\x20Neither\x20the\x20name\x20of\x20Google\x20Inc\
1310 .\x20nor\x20the\x20names\x20of\x20its\n\x20contributors\x20may\x20be\x20\
1311 used\x20to\x20endorse\x20or\x20promote\x20products\x20derived\x20from\n\
1312 \x20this\x20software\x20without\x20specific\x20prior\x20written\x20permi\
1313 ssion.\n\n\x20THIS\x20SOFTWARE\x20IS\x20PROVIDED\x20BY\x20THE\x20COPYRIG\
1314 HT\x20HOLDERS\x20AND\x20CONTRIBUTORS\n\x20\"AS\x20IS\"\x20AND\x20ANY\x20\
1315 EXPRESS\x20OR\x20IMPLIED\x20WARRANTIES,\x20INCLUDING,\x20BUT\x20NOT\n\
1316 \x20LIMITED\x20TO,\x20THE\x20IMPLIED\x20WARRANTIES\x20OF\x20MERCHANTABIL\
1317 ITY\x20AND\x20FITNESS\x20FOR\n\x20A\x20PARTICULAR\x20PURPOSE\x20ARE\x20D\
1318 ISCLAIMED.\x20IN\x20NO\x20EVENT\x20SHALL\x20THE\x20COPYRIGHT\n\x20OWNER\
1319 \x20OR\x20CONTRIBUTORS\x20BE\x20LIABLE\x20FOR\x20ANY\x20DIRECT,\x20INDIR\
1320 ECT,\x20INCIDENTAL,\n\x20SPECIAL,\x20EXEMPLARY,\x20OR\x20CONSEQUENTIAL\
1321 \x20DAMAGES\x20(INCLUDING,\x20BUT\x20NOT\n\x20LIMITED\x20TO,\x20PROCUREM\
1322 ENT\x20OF\x20SUBSTITUTE\x20GOODS\x20OR\x20SERVICES;\x20LOSS\x20OF\x20USE\
1323 ,\n\x20DATA,\x20OR\x20PROFITS;\x20OR\x20BUSINESS\x20INTERRUPTION)\x20HOW\
1324 EVER\x20CAUSED\x20AND\x20ON\x20ANY\n\x20THEORY\x20OF\x20LIABILITY,\x20WH\
1325 ETHER\x20IN\x20CONTRACT,\x20STRICT\x20LIABILITY,\x20OR\x20TORT\n\x20(INC\
1326 LUDING\x20NEGLIGENCE\x20OR\x20OTHERWISE)\x20ARISING\x20IN\x20ANY\x20WAY\
1327 \x20OUT\x20OF\x20THE\x20USE\n\x20OF\x20THIS\x20SOFTWARE,\x20EVEN\x20IF\
1328 \x20ADVISED\x20OF\x20THE\x20POSSIBILITY\x20OF\x20SUCH\x20DAMAGE.\n2\xfb\
1329 \x04\x20Author:\x20kenton@google.com\x20(Kenton\x20Varda)\n\n\x20WARNING\
1330 :\x20\x20The\x20plugin\x20interface\x20is\x20currently\x20EXPERIMENTAL\
1331 \x20and\x20is\x20subject\x20to\n\x20\x20\x20change.\n\n\x20protoc\x20(ak\
1332 a\x20the\x20Protocol\x20Compiler)\x20can\x20be\x20extended\x20via\x20plu\
1333 gins.\x20\x20A\x20plugin\x20is\n\x20just\x20a\x20program\x20that\x20read\
1334 s\x20a\x20CodeGeneratorRequest\x20from\x20stdin\x20and\x20writes\x20a\n\
1335 \x20CodeGeneratorResponse\x20to\x20stdout.\n\n\x20Plugins\x20written\x20\
1336 using\x20C++\x20can\x20use\x20google/protobuf/compiler/plugin.h\x20inste\
1337 ad\n\x20of\x20dealing\x20with\x20the\x20raw\x20protocol\x20defined\x20he\
1338 re.\n\n\x20A\x20plugin\x20executable\x20needs\x20only\x20to\x20be\x20pla\
1339 ced\x20somewhere\x20in\x20the\x20path.\x20\x20The\n\x20plugin\x20should\
1340 \x20be\x20named\x20\"protoc-gen-$NAME\",\x20and\x20will\x20then\x20be\
1341 \x20used\x20when\x20the\n\x20flag\x20\"--${NAME}_out\"\x20is\x20passed\
1342 \x20to\x20protoc.\n\n\x08\n\x01\x02\x12\x030\0!\n\x08\n\x01\x08\x12\x031\
1343 \05\n\t\n\x02\x08\x01\x12\x031\05\n\x08\n\x01\x08\x12\x032\0-\n\t\n\x02\
1344 \x08\x08\x12\x032\0-\n\x08\n\x01\x08\x12\x034\0@\n\t\n\x02\x08\x0b\x12\
1345 \x034\0@\n\t\n\x02\x03\0\x12\x036\0*\n6\n\x02\x04\0\x12\x049\0@\x01\x1a*\
1346 \x20The\x20version\x20number\x20of\x20protocol\x20compiler.\n\n\n\n\x03\
1347 \x04\0\x01\x12\x039\x08\x0f\n\x0b\n\x04\x04\0\x02\0\x12\x03:\x02\x1b\n\
1348 \x0c\n\x05\x04\0\x02\0\x04\x12\x03:\x02\n\n\x0c\n\x05\x04\0\x02\0\x05\
1349 \x12\x03:\x0b\x10\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03:\x11\x16\n\x0c\n\
1350 \x05\x04\0\x02\0\x03\x12\x03:\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03;\
1351 \x02\x1b\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03;\x02\n\n\x0c\n\x05\x04\0\
1352 \x02\x01\x05\x12\x03;\x0b\x10\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03;\x11\
1353 \x16\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03;\x19\x1a\n\x0b\n\x04\x04\0\
1354 \x02\x02\x12\x03<\x02\x1b\n\x0c\n\x05\x04\0\x02\x02\x04\x12\x03<\x02\n\n\
1355 \x0c\n\x05\x04\0\x02\x02\x05\x12\x03<\x0b\x10\n\x0c\n\x05\x04\0\x02\x02\
1356 \x01\x12\x03<\x11\x16\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03<\x19\x1a\n\
1357 \x80\x01\n\x04\x04\0\x02\x03\x12\x03?\x02\x1d\x1as\x20A\x20suffix\x20for\
1358 \x20alpha,\x20beta\x20or\x20rc\x20release,\x20e.g.,\x20\"alpha-1\",\x20\
1359 \"rc2\".\x20It\x20should\n\x20be\x20empty\x20for\x20mainline\x20stable\
1360 \x20releases.\n\n\x0c\n\x05\x04\0\x02\x03\x04\x12\x03?\x02\n\n\x0c\n\x05\
1361 \x04\0\x02\x03\x05\x12\x03?\x0b\x11\n\x0c\n\x05\x04\0\x02\x03\x01\x12\
1362 \x03?\x12\x18\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03?\x1b\x1c\nO\n\x02\
1363 \x04\x01\x12\x04C\0_\x01\x1aC\x20An\x20encoded\x20CodeGeneratorRequest\
1364 \x20is\x20written\x20to\x20the\x20plugin's\x20stdin.\n\n\n\n\x03\x04\x01\
1365 \x01\x12\x03C\x08\x1c\n\xd1\x01\n\x04\x04\x01\x02\0\x12\x03G\x02'\x1a\
1366 \xc3\x01\x20The\x20.proto\x20files\x20that\x20were\x20explicitly\x20list\
1367 ed\x20on\x20the\x20command-line.\x20\x20The\n\x20code\x20generator\x20sh\
1368 ould\x20generate\x20code\x20only\x20for\x20these\x20files.\x20\x20Each\
1369 \x20file's\n\x20descriptor\x20will\x20be\x20included\x20in\x20proto_file\
1370 ,\x20below.\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03G\x02\n\n\x0c\n\x05\
1371 \x04\x01\x02\0\x05\x12\x03G\x0b\x11\n\x0c\n\x05\x04\x01\x02\0\x01\x12\
1372 \x03G\x12\"\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03G%&\nB\n\x04\x04\x01\
1373 \x02\x01\x12\x03J\x02\x20\x1a5\x20The\x20generator\x20parameter\x20passe\
1374 d\x20on\x20the\x20command-line.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\
1375 \x03J\x02\n\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03J\x0b\x11\n\x0c\n\x05\
1376 \x04\x01\x02\x01\x01\x12\x03J\x12\x1b\n\x0c\n\x05\x04\x01\x02\x01\x03\
1377 \x12\x03J\x1e\x1f\n\x87\x06\n\x04\x04\x01\x02\x02\x12\x03Z\x02/\x1a\xf9\
1378 \x05\x20FileDescriptorProtos\x20for\x20all\x20files\x20in\x20files_to_ge\
1379 nerate\x20and\x20everything\n\x20they\x20import.\x20\x20The\x20files\x20\
1380 will\x20appear\x20in\x20topological\x20order,\x20so\x20each\x20file\n\
1381 \x20appears\x20before\x20any\x20file\x20that\x20imports\x20it.\n\n\x20pr\
1382 otoc\x20guarantees\x20that\x20all\x20proto_files\x20will\x20be\x20writte\
1383 n\x20after\n\x20the\x20fields\x20above,\x20even\x20though\x20this\x20is\
1384 \x20not\x20technically\x20guaranteed\x20by\x20the\n\x20protobuf\x20wire\
1385 \x20format.\x20\x20This\x20theoretically\x20could\x20allow\x20a\x20plugi\
1386 n\x20to\x20stream\n\x20in\x20the\x20FileDescriptorProtos\x20and\x20handl\
1387 e\x20them\x20one\x20by\x20one\x20rather\x20than\x20read\n\x20the\x20enti\
1388 re\x20set\x20into\x20memory\x20at\x20once.\x20\x20However,\x20as\x20of\
1389 \x20this\x20writing,\x20this\n\x20is\x20not\x20similarly\x20optimized\
1390 \x20on\x20protoc's\x20end\x20--\x20it\x20will\x20store\x20all\x20fields\
1391 \x20in\n\x20memory\x20at\x20once\x20before\x20sending\x20them\x20to\x20t\
1392 he\x20plugin.\n\n\x20Type\x20names\x20of\x20fields\x20and\x20extensions\
1393 \x20in\x20the\x20FileDescriptorProto\x20are\x20always\n\x20fully\x20qual\
1394 ified.\n\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03Z\x02\n\n\x0c\n\x05\x04\
1395 \x01\x02\x02\x06\x12\x03Z\x0b\x1e\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\
1396 \x03Z\x1f)\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03Z,.\n7\n\x04\x04\x01\
1397 \x02\x03\x12\x03]\x02(\x1a*\x20The\x20version\x20number\x20of\x20protoco\
1398 l\x20compiler.\n\n\x0c\n\x05\x04\x01\x02\x03\x04\x12\x03]\x02\n\n\x0c\n\
1399 \x05\x04\x01\x02\x03\x06\x12\x03]\x0b\x12\n\x0c\n\x05\x04\x01\x02\x03\
1400 \x01\x12\x03]\x13#\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03]&'\nL\n\x02\
1401 \x04\x02\x12\x05b\0\xb6\x01\x01\x1a?\x20The\x20plugin\x20writes\x20an\
1402 \x20encoded\x20CodeGeneratorResponse\x20to\x20stdout.\n\n\n\n\x03\x04\
1403 \x02\x01\x12\x03b\x08\x1d\n\xed\x03\n\x04\x04\x02\x02\0\x12\x03k\x02\x1c\
1404 \x1a\xdf\x03\x20Error\x20message.\x20\x20If\x20non-empty,\x20code\x20gen\
1405 eration\x20failed.\x20\x20The\x20plugin\x20process\n\x20should\x20exit\
1406 \x20with\x20status\x20code\x20zero\x20even\x20if\x20it\x20reports\x20an\
1407 \x20error\x20in\x20this\x20way.\n\n\x20This\x20should\x20be\x20used\x20t\
1408 o\x20indicate\x20errors\x20in\x20.proto\x20files\x20which\x20prevent\x20\
1409 the\n\x20code\x20generator\x20from\x20generating\x20correct\x20code.\x20\
1410 \x20Errors\x20which\x20indicate\x20a\n\x20problem\x20in\x20protoc\x20its\
1411 elf\x20--\x20such\x20as\x20the\x20input\x20CodeGeneratorRequest\x20being\
1412 \n\x20unparseable\x20--\x20should\x20be\x20reported\x20by\x20writing\x20\
1413 a\x20message\x20to\x20stderr\x20and\n\x20exiting\x20with\x20a\x20non-zer\
1414 o\x20status\x20code.\n\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03k\x02\n\n\
1415 \x0c\n\x05\x04\x02\x02\0\x05\x12\x03k\x0b\x11\n\x0c\n\x05\x04\x02\x02\0\
1416 \x01\x12\x03k\x12\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03k\x1a\x1b\n\
1417 \x89\x01\n\x04\x04\x02\x02\x01\x12\x03o\x02)\x1a|\x20A\x20bitmask\x20of\
1418 \x20supported\x20features\x20that\x20the\x20code\x20generator\x20support\
1419 s.\n\x20This\x20is\x20a\x20bitwise\x20\"or\"\x20of\x20values\x20from\x20\
1420 the\x20Feature\x20enum.\n\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03o\x02\n\
1421 \n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03o\x0b\x11\n\x0c\n\x05\x04\x02\
1422 \x02\x01\x01\x12\x03o\x12$\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03o'(\n+\
1423 \n\x04\x04\x02\x04\0\x12\x04r\x02u\x03\x1a\x1d\x20Sync\x20with\x20code_g\
1424 enerator.h.\n\n\x0c\n\x05\x04\x02\x04\0\x01\x12\x03r\x07\x0e\n\r\n\x06\
1425 \x04\x02\x04\0\x02\0\x12\x03s\x04\x15\n\x0e\n\x07\x04\x02\x04\0\x02\0\
1426 \x01\x12\x03s\x04\x10\n\x0e\n\x07\x04\x02\x04\0\x02\0\x02\x12\x03s\x13\
1427 \x14\n\r\n\x06\x04\x02\x04\0\x02\x01\x12\x03t\x04\x20\n\x0e\n\x07\x04\
1428 \x02\x04\0\x02\x01\x01\x12\x03t\x04\x1b\n\x0e\n\x07\x04\x02\x04\0\x02\
1429 \x01\x02\x12\x03t\x1e\x1f\n4\n\x04\x04\x02\x03\0\x12\x05x\x02\xb4\x01\
1430 \x03\x1a%\x20Represents\x20a\x20single\x20generated\x20file.\n\n\x0c\n\
1431 \x05\x04\x02\x03\0\x01\x12\x03x\n\x0e\n\xae\x05\n\x06\x04\x02\x03\0\x02\
1432 \0\x12\x04\x84\x01\x04\x1d\x1a\x9d\x05\x20The\x20file\x20name,\x20relati\
1433 ve\x20to\x20the\x20output\x20directory.\x20\x20The\x20name\x20must\x20no\
1434 t\n\x20contain\x20\".\"\x20or\x20\"..\"\x20components\x20and\x20must\x20\
1435 be\x20relative,\x20not\x20be\x20absolute\x20(so,\n\x20the\x20file\x20can\
1436 not\x20lie\x20outside\x20the\x20output\x20directory).\x20\x20\"/\"\x20mu\
1437 st\x20be\x20used\x20as\n\x20the\x20path\x20separator,\x20not\x20\"\\\".\
1438 \n\n\x20If\x20the\x20name\x20is\x20omitted,\x20the\x20content\x20will\
1439 \x20be\x20appended\x20to\x20the\x20previous\n\x20file.\x20\x20This\x20al\
1440 lows\x20the\x20generator\x20to\x20break\x20large\x20files\x20into\x20sma\
1441 ll\x20chunks,\n\x20and\x20allows\x20the\x20generated\x20text\x20to\x20be\
1442 \x20streamed\x20back\x20to\x20protoc\x20so\x20that\x20large\n\x20files\
1443 \x20need\x20not\x20reside\x20completely\x20in\x20memory\x20at\x20one\x20\
1444 time.\x20\x20Note\x20that\x20as\x20of\n\x20this\x20writing\x20protoc\x20\
1445 does\x20not\x20optimize\x20for\x20this\x20--\x20it\x20will\x20read\x20th\
1446 e\x20entire\n\x20CodeGeneratorResponse\x20before\x20writing\x20files\x20\
1447 to\x20disk.\n\n\x0f\n\x07\x04\x02\x03\0\x02\0\x04\x12\x04\x84\x01\x04\
1448 \x0c\n\x0f\n\x07\x04\x02\x03\0\x02\0\x05\x12\x04\x84\x01\r\x13\n\x0f\n\
1449 \x07\x04\x02\x03\0\x02\0\x01\x12\x04\x84\x01\x14\x18\n\x0f\n\x07\x04\x02\
1450 \x03\0\x02\0\x03\x12\x04\x84\x01\x1b\x1c\n\xae\x10\n\x06\x04\x02\x03\0\
1451 \x02\x01\x12\x04\xab\x01\x04(\x1a\x9d\x10\x20If\x20non-empty,\x20indicat\
1452 es\x20that\x20the\x20named\x20file\x20should\x20already\x20exist,\x20and\
1453 \x20the\n\x20content\x20here\x20is\x20to\x20be\x20inserted\x20into\x20th\
1454 at\x20file\x20at\x20a\x20defined\x20insertion\n\x20point.\x20\x20This\
1455 \x20feature\x20allows\x20a\x20code\x20generator\x20to\x20extend\x20the\
1456 \x20output\n\x20produced\x20by\x20another\x20code\x20generator.\x20\x20T\
1457 he\x20original\x20generator\x20may\x20provide\n\x20insertion\x20points\
1458 \x20by\x20placing\x20special\x20annotations\x20in\x20the\x20file\x20that\
1459 \x20look\n\x20like:\n\x20\x20\x20@@protoc_insertion_point(NAME)\n\x20The\
1460 \x20annotation\x20can\x20have\x20arbitrary\x20text\x20before\x20and\x20a\
1461 fter\x20it\x20on\x20the\x20line,\n\x20which\x20allows\x20it\x20to\x20be\
1462 \x20placed\x20in\x20a\x20comment.\x20\x20NAME\x20should\x20be\x20replace\
1463 d\x20with\n\x20an\x20identifier\x20naming\x20the\x20point\x20--\x20this\
1464 \x20is\x20what\x20other\x20generators\x20will\x20use\n\x20as\x20the\x20i\
1465 nsertion_point.\x20\x20Code\x20inserted\x20at\x20this\x20point\x20will\
1466 \x20be\x20placed\n\x20immediately\x20above\x20the\x20line\x20containing\
1467 \x20the\x20insertion\x20point\x20(thus\x20multiple\n\x20insertions\x20to\
1468 \x20the\x20same\x20point\x20will\x20come\x20out\x20in\x20the\x20order\
1469 \x20they\x20were\x20added).\n\x20The\x20double-@\x20is\x20intended\x20to\
1470 \x20make\x20it\x20unlikely\x20that\x20the\x20generated\x20code\n\x20coul\
1471 d\x20contain\x20things\x20that\x20look\x20like\x20insertion\x20points\
1472 \x20by\x20accident.\n\n\x20For\x20example,\x20the\x20C++\x20code\x20gene\
1473 rator\x20places\x20the\x20following\x20line\x20in\x20the\n\x20.pb.h\x20f\
1474 iles\x20that\x20it\x20generates:\n\x20\x20\x20//\x20@@protoc_insertion_p\
1475 oint(namespace_scope)\n\x20This\x20line\x20appears\x20within\x20the\x20s\
1476 cope\x20of\x20the\x20file's\x20package\x20namespace,\x20but\n\x20outside\
1477 \x20of\x20any\x20particular\x20class.\x20\x20Another\x20plugin\x20can\
1478 \x20then\x20specify\x20the\n\x20insertion_point\x20\"namespace_scope\"\
1479 \x20to\x20generate\x20additional\x20classes\x20or\n\x20other\x20declarat\
1480 ions\x20that\x20should\x20be\x20placed\x20in\x20this\x20scope.\n\n\x20No\
1481 te\x20that\x20if\x20the\x20line\x20containing\x20the\x20insertion\x20poi\
1482 nt\x20begins\x20with\n\x20whitespace,\x20the\x20same\x20whitespace\x20wi\
1483 ll\x20be\x20added\x20to\x20every\x20line\x20of\x20the\n\x20inserted\x20t\
1484 ext.\x20\x20This\x20is\x20useful\x20for\x20languages\x20like\x20Python,\
1485 \x20where\n\x20indentation\x20matters.\x20\x20In\x20these\x20languages,\
1486 \x20the\x20insertion\x20point\x20comment\n\x20should\x20be\x20indented\
1487 \x20the\x20same\x20amount\x20as\x20any\x20inserted\x20code\x20will\x20ne\
1488 ed\x20to\x20be\n\x20in\x20order\x20to\x20work\x20correctly\x20in\x20that\
1489 \x20context.\n\n\x20The\x20code\x20generator\x20that\x20generates\x20the\
1490 \x20initial\x20file\x20and\x20the\x20one\x20which\n\x20inserts\x20into\
1491 \x20it\x20must\x20both\x20run\x20as\x20part\x20of\x20a\x20single\x20invo\
1492 cation\x20of\x20protoc.\n\x20Code\x20generators\x20are\x20executed\x20in\
1493 \x20the\x20order\x20in\x20which\x20they\x20appear\x20on\x20the\n\x20comm\
1494 and\x20line.\n\n\x20If\x20|insertion_point|\x20is\x20present,\x20|name|\
1495 \x20must\x20also\x20be\x20present.\n\n\x0f\n\x07\x04\x02\x03\0\x02\x01\
1496 \x04\x12\x04\xab\x01\x04\x0c\n\x0f\n\x07\x04\x02\x03\0\x02\x01\x05\x12\
1497 \x04\xab\x01\r\x13\n\x0f\n\x07\x04\x02\x03\0\x02\x01\x01\x12\x04\xab\x01\
1498 \x14#\n\x0f\n\x07\x04\x02\x03\0\x02\x01\x03\x12\x04\xab\x01&'\n$\n\x06\
1499 \x04\x02\x03\0\x02\x02\x12\x04\xae\x01\x04!\x1a\x14\x20The\x20file\x20co\
1500 ntents.\n\n\x0f\n\x07\x04\x02\x03\0\x02\x02\x04\x12\x04\xae\x01\x04\x0c\
1501 \n\x0f\n\x07\x04\x02\x03\0\x02\x02\x05\x12\x04\xae\x01\r\x13\n\x0f\n\x07\
1502 \x04\x02\x03\0\x02\x02\x01\x12\x04\xae\x01\x14\x1b\n\x0f\n\x07\x04\x02\
1503 \x03\0\x02\x02\x03\x12\x04\xae\x01\x1e\x20\n\xe1\x01\n\x06\x04\x02\x03\0\
1504 \x02\x03\x12\x04\xb3\x01\x048\x1a\xd0\x01\x20Information\x20describing\
1505 \x20the\x20file\x20content\x20being\x20inserted.\x20If\x20an\x20insertio\
1506 n\n\x20point\x20is\x20used,\x20this\x20information\x20will\x20be\x20appr\
1507 opriately\x20offset\x20and\x20inserted\n\x20into\x20the\x20code\x20gener\
1508 ation\x20metadata\x20for\x20the\x20generated\x20files.\n\n\x0f\n\x07\x04\
1509 \x02\x03\0\x02\x03\x04\x12\x04\xb3\x01\x04\x0c\n\x0f\n\x07\x04\x02\x03\0\
1510 \x02\x03\x06\x12\x04\xb3\x01\r\x1e\n\x0f\n\x07\x04\x02\x03\0\x02\x03\x01\
1511 \x12\x04\xb3\x01\x1f2\n\x0f\n\x07\x04\x02\x03\0\x02\x03\x03\x12\x04\xb3\
1512 \x0157\n\x0c\n\x04\x04\x02\x02\x02\x12\x04\xb5\x01\x02\x1a\n\r\n\x05\x04\
1513 \x02\x02\x02\x04\x12\x04\xb5\x01\x02\n\n\r\n\x05\x04\x02\x02\x02\x06\x12\
1514 \x04\xb5\x01\x0b\x0f\n\r\n\x05\x04\x02\x02\x02\x01\x12\x04\xb5\x01\x10\
1515 \x14\n\r\n\x05\x04\x02\x02\x02\x03\x12\x04\xb5\x01\x17\x19\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001516";
1517
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001518static file_descriptor_proto_lazy: crate::rt::LazyV2<crate::descriptor::FileDescriptorProto> = crate::rt::LazyV2::INIT;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001519
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001520fn parse_descriptor_proto() -> crate::descriptor::FileDescriptorProto {
Haibo Huang914311b2021-01-07 18:06:15 -08001521 crate::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001522}
1523
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001524pub fn file_descriptor_proto() -> &'static crate::descriptor::FileDescriptorProto {
Haibo Huang52aa7852020-07-10 20:23:55 -07001525 file_descriptor_proto_lazy.get(|| {
1526 parse_descriptor_proto()
1527 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001528}