Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 1 | // This file is generated by rust-protobuf 2.14.0-pre. Do not edit |
| 2 | // @generated |
| 3 | |
| 4 | // https://github.com/rust-lang/rust-clippy/issues/702 |
| 5 | #![allow(unknown_lints)] |
| 6 | #![allow(clippy::all)] |
| 7 | |
| 8 | #![cfg_attr(rustfmt, rustfmt_skip)] |
| 9 | |
| 10 | #![allow(box_pointers)] |
| 11 | #![allow(dead_code)] |
| 12 | #![allow(missing_docs)] |
| 13 | #![allow(non_camel_case_types)] |
| 14 | #![allow(non_snake_case)] |
| 15 | #![allow(non_upper_case_globals)] |
| 16 | #![allow(trivial_casts)] |
| 17 | #![allow(unsafe_code)] |
| 18 | #![allow(unused_imports)] |
| 19 | #![allow(unused_results)] |
| 20 | //! Generated file from `google/protobuf/compiler/plugin.proto` |
| 21 | |
| 22 | use protobuf::Message as Message_imported_for_functions; |
| 23 | use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; |
| 24 | |
| 25 | #[derive(PartialEq,Clone,Default)] |
| 26 | #[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] |
| 27 | pub struct CodeGeneratorRequest { |
| 28 | // message fields |
| 29 | file_to_generate: ::protobuf::RepeatedField<::std::string::String>, |
| 30 | parameter: ::protobuf::SingularField<::std::string::String>, |
| 31 | proto_file: ::protobuf::RepeatedField<::protobuf::descriptor::FileDescriptorProto>, |
| 32 | // special fields |
| 33 | #[cfg_attr(feature = "with-serde", serde(skip))] |
| 34 | pub unknown_fields: ::protobuf::UnknownFields, |
| 35 | #[cfg_attr(feature = "with-serde", serde(skip))] |
| 36 | pub cached_size: ::protobuf::CachedSize, |
| 37 | } |
| 38 | |
| 39 | impl<'a> ::std::default::Default for &'a CodeGeneratorRequest { |
| 40 | fn default() -> &'a CodeGeneratorRequest { |
| 41 | <CodeGeneratorRequest as ::protobuf::Message>::default_instance() |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | impl CodeGeneratorRequest { |
| 46 | pub fn new() -> CodeGeneratorRequest { |
| 47 | ::std::default::Default::default() |
| 48 | } |
| 49 | |
| 50 | // repeated string file_to_generate = 1; |
| 51 | |
| 52 | |
| 53 | pub fn get_file_to_generate(&self) -> &[::std::string::String] { |
| 54 | &self.file_to_generate |
| 55 | } |
| 56 | pub fn clear_file_to_generate(&mut self) { |
| 57 | self.file_to_generate.clear(); |
| 58 | } |
| 59 | |
| 60 | // Param is passed by value, moved |
| 61 | pub fn set_file_to_generate(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { |
| 62 | self.file_to_generate = v; |
| 63 | } |
| 64 | |
| 65 | // Mutable pointer to the field. |
| 66 | pub fn mut_file_to_generate(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { |
| 67 | &mut self.file_to_generate |
| 68 | } |
| 69 | |
| 70 | // Take field |
| 71 | pub fn take_file_to_generate(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { |
| 72 | ::std::mem::replace(&mut self.file_to_generate, ::protobuf::RepeatedField::new()) |
| 73 | } |
| 74 | |
| 75 | // optional string parameter = 2; |
| 76 | |
| 77 | |
| 78 | pub fn get_parameter(&self) -> &str { |
| 79 | match self.parameter.as_ref() { |
| 80 | Some(v) => &v, |
| 81 | None => "", |
| 82 | } |
| 83 | } |
| 84 | pub fn clear_parameter(&mut self) { |
| 85 | self.parameter.clear(); |
| 86 | } |
| 87 | |
| 88 | pub fn has_parameter(&self) -> bool { |
| 89 | self.parameter.is_some() |
| 90 | } |
| 91 | |
| 92 | // Param is passed by value, moved |
| 93 | pub fn set_parameter(&mut self, v: ::std::string::String) { |
| 94 | self.parameter = ::protobuf::SingularField::some(v); |
| 95 | } |
| 96 | |
| 97 | // Mutable pointer to the field. |
| 98 | // If field is not initialized, it is initialized with default value first. |
| 99 | pub fn mut_parameter(&mut self) -> &mut ::std::string::String { |
| 100 | if self.parameter.is_none() { |
| 101 | self.parameter.set_default(); |
| 102 | } |
| 103 | self.parameter.as_mut().unwrap() |
| 104 | } |
| 105 | |
| 106 | // Take field |
| 107 | pub fn take_parameter(&mut self) -> ::std::string::String { |
| 108 | self.parameter.take().unwrap_or_else(|| ::std::string::String::new()) |
| 109 | } |
| 110 | |
| 111 | // repeated .google.protobuf.FileDescriptorProto proto_file = 15; |
| 112 | |
| 113 | |
| 114 | pub fn get_proto_file(&self) -> &[::protobuf::descriptor::FileDescriptorProto] { |
| 115 | &self.proto_file |
| 116 | } |
| 117 | pub fn clear_proto_file(&mut self) { |
| 118 | self.proto_file.clear(); |
| 119 | } |
| 120 | |
| 121 | // Param is passed by value, moved |
| 122 | pub fn set_proto_file(&mut self, v: ::protobuf::RepeatedField<::protobuf::descriptor::FileDescriptorProto>) { |
| 123 | self.proto_file = v; |
| 124 | } |
| 125 | |
| 126 | // Mutable pointer to the field. |
| 127 | pub fn mut_proto_file(&mut self) -> &mut ::protobuf::RepeatedField<::protobuf::descriptor::FileDescriptorProto> { |
| 128 | &mut self.proto_file |
| 129 | } |
| 130 | |
| 131 | // Take field |
| 132 | pub fn take_proto_file(&mut self) -> ::protobuf::RepeatedField<::protobuf::descriptor::FileDescriptorProto> { |
| 133 | ::std::mem::replace(&mut self.proto_file, ::protobuf::RepeatedField::new()) |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | impl ::protobuf::Message for CodeGeneratorRequest { |
| 138 | fn is_initialized(&self) -> bool { |
| 139 | for v in &self.proto_file { |
| 140 | if !v.is_initialized() { |
| 141 | return false; |
| 142 | } |
| 143 | }; |
| 144 | true |
| 145 | } |
| 146 | |
| 147 | fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { |
| 148 | while !is.eof()? { |
| 149 | let (field_number, wire_type) = is.read_tag_unpack()?; |
| 150 | match field_number { |
| 151 | 1 => { |
| 152 | ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.file_to_generate)?; |
| 153 | }, |
| 154 | 2 => { |
| 155 | ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.parameter)?; |
| 156 | }, |
| 157 | 15 => { |
| 158 | ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.proto_file)?; |
| 159 | }, |
| 160 | _ => { |
| 161 | ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; |
| 162 | }, |
| 163 | }; |
| 164 | } |
| 165 | ::std::result::Result::Ok(()) |
| 166 | } |
| 167 | |
| 168 | // Compute sizes of nested messages |
| 169 | #[allow(unused_variables)] |
| 170 | fn compute_size(&self) -> u32 { |
| 171 | let mut my_size = 0; |
| 172 | for value in &self.file_to_generate { |
| 173 | my_size += ::protobuf::rt::string_size(1, &value); |
| 174 | }; |
| 175 | if let Some(ref v) = self.parameter.as_ref() { |
| 176 | my_size += ::protobuf::rt::string_size(2, &v); |
| 177 | } |
| 178 | for value in &self.proto_file { |
| 179 | let len = value.compute_size(); |
| 180 | my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; |
| 181 | }; |
| 182 | my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); |
| 183 | self.cached_size.set(my_size); |
| 184 | my_size |
| 185 | } |
| 186 | |
| 187 | fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { |
| 188 | for v in &self.file_to_generate { |
| 189 | os.write_string(1, &v)?; |
| 190 | }; |
| 191 | if let Some(ref v) = self.parameter.as_ref() { |
| 192 | os.write_string(2, &v)?; |
| 193 | } |
| 194 | for v in &self.proto_file { |
| 195 | os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?; |
| 196 | os.write_raw_varint32(v.get_cached_size())?; |
| 197 | v.write_to_with_cached_sizes(os)?; |
| 198 | }; |
| 199 | os.write_unknown_fields(self.get_unknown_fields())?; |
| 200 | ::std::result::Result::Ok(()) |
| 201 | } |
| 202 | |
| 203 | fn get_cached_size(&self) -> u32 { |
| 204 | self.cached_size.get() |
| 205 | } |
| 206 | |
| 207 | fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { |
| 208 | &self.unknown_fields |
| 209 | } |
| 210 | |
| 211 | fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { |
| 212 | &mut self.unknown_fields |
| 213 | } |
| 214 | |
| 215 | fn as_any(&self) -> &dyn (::std::any::Any) { |
| 216 | self as &dyn (::std::any::Any) |
| 217 | } |
| 218 | fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { |
| 219 | self as &mut dyn (::std::any::Any) |
| 220 | } |
| 221 | fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { |
| 222 | self |
| 223 | } |
| 224 | |
| 225 | fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { |
| 226 | Self::descriptor_static() |
| 227 | } |
| 228 | |
| 229 | fn new() -> CodeGeneratorRequest { |
| 230 | CodeGeneratorRequest::new() |
| 231 | } |
| 232 | |
| 233 | fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { |
| 234 | static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; |
| 235 | unsafe { |
| 236 | descriptor.get(|| { |
| 237 | let mut fields = ::std::vec::Vec::new(); |
| 238 | fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( |
| 239 | "file_to_generate", |
| 240 | |m: &CodeGeneratorRequest| { &m.file_to_generate }, |
| 241 | |m: &mut CodeGeneratorRequest| { &mut m.file_to_generate }, |
| 242 | )); |
| 243 | fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( |
| 244 | "parameter", |
| 245 | |m: &CodeGeneratorRequest| { &m.parameter }, |
| 246 | |m: &mut CodeGeneratorRequest| { &mut m.parameter }, |
| 247 | )); |
| 248 | fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::descriptor::FileDescriptorProto>>( |
| 249 | "proto_file", |
| 250 | |m: &CodeGeneratorRequest| { &m.proto_file }, |
| 251 | |m: &mut CodeGeneratorRequest| { &mut m.proto_file }, |
| 252 | )); |
| 253 | ::protobuf::reflect::MessageDescriptor::new_pb_name::<CodeGeneratorRequest>( |
| 254 | "CodeGeneratorRequest", |
| 255 | fields, |
| 256 | file_descriptor_proto() |
| 257 | ) |
| 258 | }) |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | fn default_instance() -> &'static CodeGeneratorRequest { |
| 263 | static mut instance: ::protobuf::lazy::Lazy<CodeGeneratorRequest> = ::protobuf::lazy::Lazy::INIT; |
| 264 | unsafe { |
| 265 | instance.get(CodeGeneratorRequest::new) |
| 266 | } |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | impl ::protobuf::Clear for CodeGeneratorRequest { |
| 271 | fn clear(&mut self) { |
| 272 | self.file_to_generate.clear(); |
| 273 | self.parameter.clear(); |
| 274 | self.proto_file.clear(); |
| 275 | self.unknown_fields.clear(); |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | impl ::std::fmt::Debug for CodeGeneratorRequest { |
| 280 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
| 281 | ::protobuf::text_format::fmt(self, f) |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | impl ::protobuf::reflect::ProtobufValue for CodeGeneratorRequest { |
| 286 | fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { |
| 287 | ::protobuf::reflect::ReflectValueRef::Message(self) |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | #[derive(PartialEq,Clone,Default)] |
| 292 | #[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] |
| 293 | pub struct CodeGeneratorResponse { |
| 294 | // message fields |
| 295 | error: ::protobuf::SingularField<::std::string::String>, |
| 296 | file: ::protobuf::RepeatedField<CodeGeneratorResponse_File>, |
| 297 | // special fields |
| 298 | #[cfg_attr(feature = "with-serde", serde(skip))] |
| 299 | pub unknown_fields: ::protobuf::UnknownFields, |
| 300 | #[cfg_attr(feature = "with-serde", serde(skip))] |
| 301 | pub cached_size: ::protobuf::CachedSize, |
| 302 | } |
| 303 | |
| 304 | impl<'a> ::std::default::Default for &'a CodeGeneratorResponse { |
| 305 | fn default() -> &'a CodeGeneratorResponse { |
| 306 | <CodeGeneratorResponse as ::protobuf::Message>::default_instance() |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | impl CodeGeneratorResponse { |
| 311 | pub fn new() -> CodeGeneratorResponse { |
| 312 | ::std::default::Default::default() |
| 313 | } |
| 314 | |
| 315 | // optional string error = 1; |
| 316 | |
| 317 | |
| 318 | pub fn get_error(&self) -> &str { |
| 319 | match self.error.as_ref() { |
| 320 | Some(v) => &v, |
| 321 | None => "", |
| 322 | } |
| 323 | } |
| 324 | pub fn clear_error(&mut self) { |
| 325 | self.error.clear(); |
| 326 | } |
| 327 | |
| 328 | pub fn has_error(&self) -> bool { |
| 329 | self.error.is_some() |
| 330 | } |
| 331 | |
| 332 | // Param is passed by value, moved |
| 333 | pub fn set_error(&mut self, v: ::std::string::String) { |
| 334 | self.error = ::protobuf::SingularField::some(v); |
| 335 | } |
| 336 | |
| 337 | // Mutable pointer to the field. |
| 338 | // If field is not initialized, it is initialized with default value first. |
| 339 | pub fn mut_error(&mut self) -> &mut ::std::string::String { |
| 340 | if self.error.is_none() { |
| 341 | self.error.set_default(); |
| 342 | } |
| 343 | self.error.as_mut().unwrap() |
| 344 | } |
| 345 | |
| 346 | // Take field |
| 347 | pub fn take_error(&mut self) -> ::std::string::String { |
| 348 | self.error.take().unwrap_or_else(|| ::std::string::String::new()) |
| 349 | } |
| 350 | |
| 351 | // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; |
| 352 | |
| 353 | |
| 354 | pub fn get_file(&self) -> &[CodeGeneratorResponse_File] { |
| 355 | &self.file |
| 356 | } |
| 357 | pub fn clear_file(&mut self) { |
| 358 | self.file.clear(); |
| 359 | } |
| 360 | |
| 361 | // Param is passed by value, moved |
| 362 | pub fn set_file(&mut self, v: ::protobuf::RepeatedField<CodeGeneratorResponse_File>) { |
| 363 | self.file = v; |
| 364 | } |
| 365 | |
| 366 | // Mutable pointer to the field. |
| 367 | pub fn mut_file(&mut self) -> &mut ::protobuf::RepeatedField<CodeGeneratorResponse_File> { |
| 368 | &mut self.file |
| 369 | } |
| 370 | |
| 371 | // Take field |
| 372 | pub fn take_file(&mut self) -> ::protobuf::RepeatedField<CodeGeneratorResponse_File> { |
| 373 | ::std::mem::replace(&mut self.file, ::protobuf::RepeatedField::new()) |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | impl ::protobuf::Message for CodeGeneratorResponse { |
| 378 | fn is_initialized(&self) -> bool { |
| 379 | for v in &self.file { |
| 380 | if !v.is_initialized() { |
| 381 | return false; |
| 382 | } |
| 383 | }; |
| 384 | true |
| 385 | } |
| 386 | |
| 387 | fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { |
| 388 | while !is.eof()? { |
| 389 | let (field_number, wire_type) = is.read_tag_unpack()?; |
| 390 | match field_number { |
| 391 | 1 => { |
| 392 | ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.error)?; |
| 393 | }, |
| 394 | 15 => { |
| 395 | ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.file)?; |
| 396 | }, |
| 397 | _ => { |
| 398 | ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; |
| 399 | }, |
| 400 | }; |
| 401 | } |
| 402 | ::std::result::Result::Ok(()) |
| 403 | } |
| 404 | |
| 405 | // Compute sizes of nested messages |
| 406 | #[allow(unused_variables)] |
| 407 | fn compute_size(&self) -> u32 { |
| 408 | let mut my_size = 0; |
| 409 | if let Some(ref v) = self.error.as_ref() { |
| 410 | my_size += ::protobuf::rt::string_size(1, &v); |
| 411 | } |
| 412 | for value in &self.file { |
| 413 | let len = value.compute_size(); |
| 414 | my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; |
| 415 | }; |
| 416 | my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); |
| 417 | self.cached_size.set(my_size); |
| 418 | my_size |
| 419 | } |
| 420 | |
| 421 | fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { |
| 422 | if let Some(ref v) = self.error.as_ref() { |
| 423 | os.write_string(1, &v)?; |
| 424 | } |
| 425 | for v in &self.file { |
| 426 | os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?; |
| 427 | os.write_raw_varint32(v.get_cached_size())?; |
| 428 | v.write_to_with_cached_sizes(os)?; |
| 429 | }; |
| 430 | os.write_unknown_fields(self.get_unknown_fields())?; |
| 431 | ::std::result::Result::Ok(()) |
| 432 | } |
| 433 | |
| 434 | fn get_cached_size(&self) -> u32 { |
| 435 | self.cached_size.get() |
| 436 | } |
| 437 | |
| 438 | fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { |
| 439 | &self.unknown_fields |
| 440 | } |
| 441 | |
| 442 | fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { |
| 443 | &mut self.unknown_fields |
| 444 | } |
| 445 | |
| 446 | fn as_any(&self) -> &dyn (::std::any::Any) { |
| 447 | self as &dyn (::std::any::Any) |
| 448 | } |
| 449 | fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { |
| 450 | self as &mut dyn (::std::any::Any) |
| 451 | } |
| 452 | fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { |
| 453 | self |
| 454 | } |
| 455 | |
| 456 | fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { |
| 457 | Self::descriptor_static() |
| 458 | } |
| 459 | |
| 460 | fn new() -> CodeGeneratorResponse { |
| 461 | CodeGeneratorResponse::new() |
| 462 | } |
| 463 | |
| 464 | fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { |
| 465 | static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; |
| 466 | unsafe { |
| 467 | descriptor.get(|| { |
| 468 | let mut fields = ::std::vec::Vec::new(); |
| 469 | fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( |
| 470 | "error", |
| 471 | |m: &CodeGeneratorResponse| { &m.error }, |
| 472 | |m: &mut CodeGeneratorResponse| { &mut m.error }, |
| 473 | )); |
| 474 | fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<CodeGeneratorResponse_File>>( |
| 475 | "file", |
| 476 | |m: &CodeGeneratorResponse| { &m.file }, |
| 477 | |m: &mut CodeGeneratorResponse| { &mut m.file }, |
| 478 | )); |
| 479 | ::protobuf::reflect::MessageDescriptor::new_pb_name::<CodeGeneratorResponse>( |
| 480 | "CodeGeneratorResponse", |
| 481 | fields, |
| 482 | file_descriptor_proto() |
| 483 | ) |
| 484 | }) |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | fn default_instance() -> &'static CodeGeneratorResponse { |
| 489 | static mut instance: ::protobuf::lazy::Lazy<CodeGeneratorResponse> = ::protobuf::lazy::Lazy::INIT; |
| 490 | unsafe { |
| 491 | instance.get(CodeGeneratorResponse::new) |
| 492 | } |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | impl ::protobuf::Clear for CodeGeneratorResponse { |
| 497 | fn clear(&mut self) { |
| 498 | self.error.clear(); |
| 499 | self.file.clear(); |
| 500 | self.unknown_fields.clear(); |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | impl ::std::fmt::Debug for CodeGeneratorResponse { |
| 505 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
| 506 | ::protobuf::text_format::fmt(self, f) |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | impl ::protobuf::reflect::ProtobufValue for CodeGeneratorResponse { |
| 511 | fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { |
| 512 | ::protobuf::reflect::ReflectValueRef::Message(self) |
| 513 | } |
| 514 | } |
| 515 | |
| 516 | #[derive(PartialEq,Clone,Default)] |
| 517 | #[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] |
| 518 | pub struct CodeGeneratorResponse_File { |
| 519 | // message fields |
| 520 | name: ::protobuf::SingularField<::std::string::String>, |
| 521 | insertion_point: ::protobuf::SingularField<::std::string::String>, |
| 522 | content: ::protobuf::SingularField<::std::string::String>, |
| 523 | // special fields |
| 524 | #[cfg_attr(feature = "with-serde", serde(skip))] |
| 525 | pub unknown_fields: ::protobuf::UnknownFields, |
| 526 | #[cfg_attr(feature = "with-serde", serde(skip))] |
| 527 | pub cached_size: ::protobuf::CachedSize, |
| 528 | } |
| 529 | |
| 530 | impl<'a> ::std::default::Default for &'a CodeGeneratorResponse_File { |
| 531 | fn default() -> &'a CodeGeneratorResponse_File { |
| 532 | <CodeGeneratorResponse_File as ::protobuf::Message>::default_instance() |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | impl CodeGeneratorResponse_File { |
| 537 | pub fn new() -> CodeGeneratorResponse_File { |
| 538 | ::std::default::Default::default() |
| 539 | } |
| 540 | |
| 541 | // optional string name = 1; |
| 542 | |
| 543 | |
| 544 | pub fn get_name(&self) -> &str { |
| 545 | match self.name.as_ref() { |
| 546 | Some(v) => &v, |
| 547 | None => "", |
| 548 | } |
| 549 | } |
| 550 | pub fn clear_name(&mut self) { |
| 551 | self.name.clear(); |
| 552 | } |
| 553 | |
| 554 | pub fn has_name(&self) -> bool { |
| 555 | self.name.is_some() |
| 556 | } |
| 557 | |
| 558 | // Param is passed by value, moved |
| 559 | pub fn set_name(&mut self, v: ::std::string::String) { |
| 560 | self.name = ::protobuf::SingularField::some(v); |
| 561 | } |
| 562 | |
| 563 | // Mutable pointer to the field. |
| 564 | // If field is not initialized, it is initialized with default value first. |
| 565 | pub fn mut_name(&mut self) -> &mut ::std::string::String { |
| 566 | if self.name.is_none() { |
| 567 | self.name.set_default(); |
| 568 | } |
| 569 | self.name.as_mut().unwrap() |
| 570 | } |
| 571 | |
| 572 | // Take field |
| 573 | pub fn take_name(&mut self) -> ::std::string::String { |
| 574 | self.name.take().unwrap_or_else(|| ::std::string::String::new()) |
| 575 | } |
| 576 | |
| 577 | // optional string insertion_point = 2; |
| 578 | |
| 579 | |
| 580 | pub fn get_insertion_point(&self) -> &str { |
| 581 | match self.insertion_point.as_ref() { |
| 582 | Some(v) => &v, |
| 583 | None => "", |
| 584 | } |
| 585 | } |
| 586 | pub fn clear_insertion_point(&mut self) { |
| 587 | self.insertion_point.clear(); |
| 588 | } |
| 589 | |
| 590 | pub fn has_insertion_point(&self) -> bool { |
| 591 | self.insertion_point.is_some() |
| 592 | } |
| 593 | |
| 594 | // Param is passed by value, moved |
| 595 | pub fn set_insertion_point(&mut self, v: ::std::string::String) { |
| 596 | self.insertion_point = ::protobuf::SingularField::some(v); |
| 597 | } |
| 598 | |
| 599 | // Mutable pointer to the field. |
| 600 | // If field is not initialized, it is initialized with default value first. |
| 601 | pub fn mut_insertion_point(&mut self) -> &mut ::std::string::String { |
| 602 | if self.insertion_point.is_none() { |
| 603 | self.insertion_point.set_default(); |
| 604 | } |
| 605 | self.insertion_point.as_mut().unwrap() |
| 606 | } |
| 607 | |
| 608 | // Take field |
| 609 | pub fn take_insertion_point(&mut self) -> ::std::string::String { |
| 610 | self.insertion_point.take().unwrap_or_else(|| ::std::string::String::new()) |
| 611 | } |
| 612 | |
| 613 | // optional string content = 15; |
| 614 | |
| 615 | |
| 616 | pub fn get_content(&self) -> &str { |
| 617 | match self.content.as_ref() { |
| 618 | Some(v) => &v, |
| 619 | None => "", |
| 620 | } |
| 621 | } |
| 622 | pub fn clear_content(&mut self) { |
| 623 | self.content.clear(); |
| 624 | } |
| 625 | |
| 626 | pub fn has_content(&self) -> bool { |
| 627 | self.content.is_some() |
| 628 | } |
| 629 | |
| 630 | // Param is passed by value, moved |
| 631 | pub fn set_content(&mut self, v: ::std::string::String) { |
| 632 | self.content = ::protobuf::SingularField::some(v); |
| 633 | } |
| 634 | |
| 635 | // Mutable pointer to the field. |
| 636 | // If field is not initialized, it is initialized with default value first. |
| 637 | pub fn mut_content(&mut self) -> &mut ::std::string::String { |
| 638 | if self.content.is_none() { |
| 639 | self.content.set_default(); |
| 640 | } |
| 641 | self.content.as_mut().unwrap() |
| 642 | } |
| 643 | |
| 644 | // Take field |
| 645 | pub fn take_content(&mut self) -> ::std::string::String { |
| 646 | self.content.take().unwrap_or_else(|| ::std::string::String::new()) |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | impl ::protobuf::Message for CodeGeneratorResponse_File { |
| 651 | fn is_initialized(&self) -> bool { |
| 652 | true |
| 653 | } |
| 654 | |
| 655 | fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { |
| 656 | while !is.eof()? { |
| 657 | let (field_number, wire_type) = is.read_tag_unpack()?; |
| 658 | match field_number { |
| 659 | 1 => { |
| 660 | ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; |
| 661 | }, |
| 662 | 2 => { |
| 663 | ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.insertion_point)?; |
| 664 | }, |
| 665 | 15 => { |
| 666 | ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.content)?; |
| 667 | }, |
| 668 | _ => { |
| 669 | ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; |
| 670 | }, |
| 671 | }; |
| 672 | } |
| 673 | ::std::result::Result::Ok(()) |
| 674 | } |
| 675 | |
| 676 | // Compute sizes of nested messages |
| 677 | #[allow(unused_variables)] |
| 678 | fn compute_size(&self) -> u32 { |
| 679 | let mut my_size = 0; |
| 680 | if let Some(ref v) = self.name.as_ref() { |
| 681 | my_size += ::protobuf::rt::string_size(1, &v); |
| 682 | } |
| 683 | if let Some(ref v) = self.insertion_point.as_ref() { |
| 684 | my_size += ::protobuf::rt::string_size(2, &v); |
| 685 | } |
| 686 | if let Some(ref v) = self.content.as_ref() { |
| 687 | my_size += ::protobuf::rt::string_size(15, &v); |
| 688 | } |
| 689 | my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); |
| 690 | self.cached_size.set(my_size); |
| 691 | my_size |
| 692 | } |
| 693 | |
| 694 | fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { |
| 695 | if let Some(ref v) = self.name.as_ref() { |
| 696 | os.write_string(1, &v)?; |
| 697 | } |
| 698 | if let Some(ref v) = self.insertion_point.as_ref() { |
| 699 | os.write_string(2, &v)?; |
| 700 | } |
| 701 | if let Some(ref v) = self.content.as_ref() { |
| 702 | os.write_string(15, &v)?; |
| 703 | } |
| 704 | os.write_unknown_fields(self.get_unknown_fields())?; |
| 705 | ::std::result::Result::Ok(()) |
| 706 | } |
| 707 | |
| 708 | fn get_cached_size(&self) -> u32 { |
| 709 | self.cached_size.get() |
| 710 | } |
| 711 | |
| 712 | fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { |
| 713 | &self.unknown_fields |
| 714 | } |
| 715 | |
| 716 | fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { |
| 717 | &mut self.unknown_fields |
| 718 | } |
| 719 | |
| 720 | fn as_any(&self) -> &dyn (::std::any::Any) { |
| 721 | self as &dyn (::std::any::Any) |
| 722 | } |
| 723 | fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { |
| 724 | self as &mut dyn (::std::any::Any) |
| 725 | } |
| 726 | fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { |
| 727 | self |
| 728 | } |
| 729 | |
| 730 | fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { |
| 731 | Self::descriptor_static() |
| 732 | } |
| 733 | |
| 734 | fn new() -> CodeGeneratorResponse_File { |
| 735 | CodeGeneratorResponse_File::new() |
| 736 | } |
| 737 | |
| 738 | fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { |
| 739 | static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; |
| 740 | unsafe { |
| 741 | descriptor.get(|| { |
| 742 | let mut fields = ::std::vec::Vec::new(); |
| 743 | fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( |
| 744 | "name", |
| 745 | |m: &CodeGeneratorResponse_File| { &m.name }, |
| 746 | |m: &mut CodeGeneratorResponse_File| { &mut m.name }, |
| 747 | )); |
| 748 | fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( |
| 749 | "insertion_point", |
| 750 | |m: &CodeGeneratorResponse_File| { &m.insertion_point }, |
| 751 | |m: &mut CodeGeneratorResponse_File| { &mut m.insertion_point }, |
| 752 | )); |
| 753 | fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( |
| 754 | "content", |
| 755 | |m: &CodeGeneratorResponse_File| { &m.content }, |
| 756 | |m: &mut CodeGeneratorResponse_File| { &mut m.content }, |
| 757 | )); |
| 758 | ::protobuf::reflect::MessageDescriptor::new_pb_name::<CodeGeneratorResponse_File>( |
| 759 | "CodeGeneratorResponse.File", |
| 760 | fields, |
| 761 | file_descriptor_proto() |
| 762 | ) |
| 763 | }) |
| 764 | } |
| 765 | } |
| 766 | |
| 767 | fn default_instance() -> &'static CodeGeneratorResponse_File { |
| 768 | static mut instance: ::protobuf::lazy::Lazy<CodeGeneratorResponse_File> = ::protobuf::lazy::Lazy::INIT; |
| 769 | unsafe { |
| 770 | instance.get(CodeGeneratorResponse_File::new) |
| 771 | } |
| 772 | } |
| 773 | } |
| 774 | |
| 775 | impl ::protobuf::Clear for CodeGeneratorResponse_File { |
| 776 | fn clear(&mut self) { |
| 777 | self.name.clear(); |
| 778 | self.insertion_point.clear(); |
| 779 | self.content.clear(); |
| 780 | self.unknown_fields.clear(); |
| 781 | } |
| 782 | } |
| 783 | |
| 784 | impl ::std::fmt::Debug for CodeGeneratorResponse_File { |
| 785 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
| 786 | ::protobuf::text_format::fmt(self, f) |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | impl ::protobuf::reflect::ProtobufValue for CodeGeneratorResponse_File { |
| 791 | fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { |
| 792 | ::protobuf::reflect::ReflectValueRef::Message(self) |
| 793 | } |
| 794 | } |
| 795 | |
| 796 | static file_descriptor_proto_data: &'static [u8] = b"\ |
| 797 | \n%google/protobuf/compiler/plugin.proto\x12\x18google.protobuf.compiler\ |
| 798 | \x1a\x20google/protobuf/descriptor.proto\"\xa3\x01\n\x14CodeGeneratorReq\ |
| 799 | uest\x12(\n\x10file_to_generate\x18\x01\x20\x03(\tR\x0efileToGenerate\ |
| 800 | \x12\x1c\n\tparameter\x18\x02\x20\x01(\tR\tparameter\x12C\n\nproto_file\ |
| 801 | \x18\x0f\x20\x03(\x0b2$.google.protobuf.FileDescriptorProtoR\tprotoFile\ |
| 802 | \"\xd6\x01\n\x15CodeGeneratorResponse\x12\x14\n\x05error\x18\x01\x20\x01\ |
| 803 | (\tR\x05error\x12H\n\x04file\x18\x0f\x20\x03(\x0b24.google.protobuf.comp\ |
| 804 | iler.CodeGeneratorResponse.FileR\x04file\x1a]\n\x04File\x12\x12\n\x04nam\ |
| 805 | e\x18\x01\x20\x01(\tR\x04name\x12'\n\x0finsertion_point\x18\x02\x20\x01(\ |
| 806 | \tR\x0einsertionPoint\x12\x18\n\x07content\x18\x0f\x20\x01(\tR\x07conten\ |
| 807 | tB7\n\x1ccom.google.protobuf.compilerB\x0cPluginProtosZ\tplugin_goJ\xd29\ |
| 808 | \n\x07\x12\x05.\0\x95\x01\x01\n\xca\x11\n\x01\x0c\x12\x03.\0\x122\xc1\ |
| 809 | \x0c\x20Protocol\x20Buffers\x20-\x20Google's\x20data\x20interchange\x20f\ |
| 810 | ormat\n\x20Copyright\x202008\x20Google\x20Inc.\x20\x20All\x20rights\x20r\ |
| 811 | eserved.\n\x20https://developers.google.com/protocol-buffers/\n\n\x20Red\ |
| 812 | istribution\x20and\x20use\x20in\x20source\x20and\x20binary\x20forms,\x20\ |
| 813 | with\x20or\x20without\n\x20modification,\x20are\x20permitted\x20provided\ |
| 814 | \x20that\x20the\x20following\x20conditions\x20are\n\x20met:\n\n\x20\x20\ |
| 815 | \x20\x20\x20*\x20Redistributions\x20of\x20source\x20code\x20must\x20reta\ |
| 816 | in\x20the\x20above\x20copyright\n\x20notice,\x20this\x20list\x20of\x20co\ |
| 817 | nditions\x20and\x20the\x20following\x20disclaimer.\n\x20\x20\x20\x20\x20\ |
| 818 | *\x20Redistributions\x20in\x20binary\x20form\x20must\x20reproduce\x20the\ |
| 819 | \x20above\n\x20copyright\x20notice,\x20this\x20list\x20of\x20conditions\ |
| 820 | \x20and\x20the\x20following\x20disclaimer\n\x20in\x20the\x20documentatio\ |
| 821 | n\x20and/or\x20other\x20materials\x20provided\x20with\x20the\n\x20distri\ |
| 822 | bution.\n\x20\x20\x20\x20\x20*\x20Neither\x20the\x20name\x20of\x20Google\ |
| 823 | \x20Inc.\x20nor\x20the\x20names\x20of\x20its\n\x20contributors\x20may\ |
| 824 | \x20be\x20used\x20to\x20endorse\x20or\x20promote\x20products\x20derived\ |
| 825 | \x20from\n\x20this\x20software\x20without\x20specific\x20prior\x20writte\ |
| 826 | n\x20permission.\n\n\x20THIS\x20SOFTWARE\x20IS\x20PROVIDED\x20BY\x20THE\ |
| 827 | \x20COPYRIGHT\x20HOLDERS\x20AND\x20CONTRIBUTORS\n\x20\"AS\x20IS\"\x20AND\ |
| 828 | \x20ANY\x20EXPRESS\x20OR\x20IMPLIED\x20WARRANTIES,\x20INCLUDING,\x20BUT\ |
| 829 | \x20NOT\n\x20LIMITED\x20TO,\x20THE\x20IMPLIED\x20WARRANTIES\x20OF\x20MER\ |
| 830 | CHANTABILITY\x20AND\x20FITNESS\x20FOR\n\x20A\x20PARTICULAR\x20PURPOSE\ |
| 831 | \x20ARE\x20DISCLAIMED.\x20IN\x20NO\x20EVENT\x20SHALL\x20THE\x20COPYRIGHT\ |
| 832 | \n\x20OWNER\x20OR\x20CONTRIBUTORS\x20BE\x20LIABLE\x20FOR\x20ANY\x20DIREC\ |
| 833 | T,\x20INDIRECT,\x20INCIDENTAL,\n\x20SPECIAL,\x20EXEMPLARY,\x20OR\x20CONS\ |
| 834 | EQUENTIAL\x20DAMAGES\x20(INCLUDING,\x20BUT\x20NOT\n\x20LIMITED\x20TO,\ |
| 835 | \x20PROCUREMENT\x20OF\x20SUBSTITUTE\x20GOODS\x20OR\x20SERVICES;\x20LOSS\ |
| 836 | \x20OF\x20USE,\n\x20DATA,\x20OR\x20PROFITS;\x20OR\x20BUSINESS\x20INTERRU\ |
| 837 | PTION)\x20HOWEVER\x20CAUSED\x20AND\x20ON\x20ANY\n\x20THEORY\x20OF\x20LIA\ |
| 838 | BILITY,\x20WHETHER\x20IN\x20CONTRACT,\x20STRICT\x20LIABILITY,\x20OR\x20T\ |
| 839 | ORT\n\x20(INCLUDING\x20NEGLIGENCE\x20OR\x20OTHERWISE)\x20ARISING\x20IN\ |
| 840 | \x20ANY\x20WAY\x20OUT\x20OF\x20THE\x20USE\n\x20OF\x20THIS\x20SOFTWARE,\ |
| 841 | \x20EVEN\x20IF\x20ADVISED\x20OF\x20THE\x20POSSIBILITY\x20OF\x20SUCH\x20D\ |
| 842 | AMAGE.\n2\xfb\x04\x20Author:\x20kenton@google.com\x20(Kenton\x20Varda)\n\ |
| 843 | \n\x20WARNING:\x20\x20The\x20plugin\x20interface\x20is\x20currently\x20E\ |
| 844 | XPERIMENTAL\x20and\x20is\x20subject\x20to\n\x20\x20\x20change.\n\n\x20pr\ |
| 845 | otoc\x20(aka\x20the\x20Protocol\x20Compiler)\x20can\x20be\x20extended\ |
| 846 | \x20via\x20plugins.\x20\x20A\x20plugin\x20is\n\x20just\x20a\x20program\ |
| 847 | \x20that\x20reads\x20a\x20CodeGeneratorRequest\x20from\x20stdin\x20and\ |
| 848 | \x20writes\x20a\n\x20CodeGeneratorResponse\x20to\x20stdout.\n\n\x20Plugi\ |
| 849 | ns\x20written\x20using\x20C++\x20can\x20use\x20google/protobuf/compiler/\ |
| 850 | plugin.h\x20instead\n\x20of\x20dealing\x20with\x20the\x20raw\x20protocol\ |
| 851 | \x20defined\x20here.\n\n\x20A\x20plugin\x20executable\x20needs\x20only\ |
| 852 | \x20to\x20be\x20placed\x20somewhere\x20in\x20the\x20path.\x20\x20The\n\ |
| 853 | \x20plugin\x20should\x20be\x20named\x20\"protoc-gen-$NAME\",\x20and\x20w\ |
| 854 | ill\x20then\x20be\x20used\x20when\x20the\n\x20flag\x20\"--${NAME}_out\"\ |
| 855 | \x20is\x20passed\x20to\x20protoc.\n\n\x08\n\x01\x02\x12\x03/\0!\n\x08\n\ |
| 856 | \x01\x08\x12\x030\05\n\t\n\x02\x08\x01\x12\x030\05\n\x08\n\x01\x08\x12\ |
| 857 | \x031\0-\n\t\n\x02\x08\x08\x12\x031\0-\n\x08\n\x01\x08\x12\x033\0\x20\n\ |
| 858 | \t\n\x02\x08\x0b\x12\x033\0\x20\n\t\n\x02\x03\0\x12\x035\0*\nO\n\x02\x04\ |
| 859 | \0\x12\x048\0M\x01\x1aC\x20An\x20encoded\x20CodeGeneratorRequest\x20is\ |
| 860 | \x20written\x20to\x20the\x20plugin's\x20stdin.\n\n\n\n\x03\x04\0\x01\x12\ |
| 861 | \x038\x08\x1c\n\xd1\x01\n\x04\x04\0\x02\0\x12\x03<\x02'\x1a\xc3\x01\x20T\ |
| 862 | he\x20.proto\x20files\x20that\x20were\x20explicitly\x20listed\x20on\x20t\ |
| 863 | he\x20command-line.\x20\x20The\n\x20code\x20generator\x20should\x20gener\ |
| 864 | ate\x20code\x20only\x20for\x20these\x20files.\x20\x20Each\x20file's\n\ |
| 865 | \x20descriptor\x20will\x20be\x20included\x20in\x20proto_file,\x20below.\ |
| 866 | \n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03<\x02\n\n\x0c\n\x05\x04\0\x02\0\ |
| 867 | \x05\x12\x03<\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03<\x12\"\n\x0c\n\ |
| 868 | \x05\x04\0\x02\0\x03\x12\x03<%&\nB\n\x04\x04\0\x02\x01\x12\x03?\x02\x20\ |
| 869 | \x1a5\x20The\x20generator\x20parameter\x20passed\x20on\x20the\x20command\ |
| 870 | -line.\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03?\x02\n\n\x0c\n\x05\x04\0\ |
| 871 | \x02\x01\x05\x12\x03?\x0b\x11\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03?\x12\ |
| 872 | \x1b\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03?\x1e\x1f\n\xa9\x05\n\x04\x04\ |
| 873 | \0\x02\x02\x12\x03L\x02/\x1a\x9b\x05\x20FileDescriptorProtos\x20for\x20a\ |
| 874 | ll\x20files\x20in\x20files_to_generate\x20and\x20everything\n\x20they\ |
| 875 | \x20import.\x20\x20The\x20files\x20will\x20appear\x20in\x20topological\ |
| 876 | \x20order,\x20so\x20each\x20file\n\x20appears\x20before\x20any\x20file\ |
| 877 | \x20that\x20imports\x20it.\n\n\x20protoc\x20guarantees\x20that\x20all\ |
| 878 | \x20proto_files\x20will\x20be\x20written\x20after\n\x20the\x20fields\x20\ |
| 879 | above,\x20even\x20though\x20this\x20is\x20not\x20technically\x20guarante\ |
| 880 | ed\x20by\x20the\n\x20protobuf\x20wire\x20format.\x20\x20This\x20theoreti\ |
| 881 | cally\x20could\x20allow\x20a\x20plugin\x20to\x20stream\n\x20in\x20the\ |
| 882 | \x20FileDescriptorProtos\x20and\x20handle\x20them\x20one\x20by\x20one\ |
| 883 | \x20rather\x20than\x20read\n\x20the\x20entire\x20set\x20into\x20memory\ |
| 884 | \x20at\x20once.\x20\x20However,\x20as\x20of\x20this\x20writing,\x20this\ |
| 885 | \n\x20is\x20not\x20similarly\x20optimized\x20on\x20protoc's\x20end\x20--\ |
| 886 | \x20it\x20will\x20store\x20all\x20fields\x20in\n\x20memory\x20at\x20once\ |
| 887 | \x20before\x20sending\x20them\x20to\x20the\x20plugin.\n\n\x0c\n\x05\x04\ |
| 888 | \0\x02\x02\x04\x12\x03L\x02\n\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03L\x0b\ |
| 889 | \x1e\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03L\x1f)\n\x0c\n\x05\x04\0\x02\ |
| 890 | \x02\x03\x12\x03L,.\nL\n\x02\x04\x01\x12\x05P\0\x95\x01\x01\x1a?\x20The\ |
| 891 | \x20plugin\x20writes\x20an\x20encoded\x20CodeGeneratorResponse\x20to\x20\ |
| 892 | stdout.\n\n\n\n\x03\x04\x01\x01\x12\x03P\x08\x1d\n\xed\x03\n\x04\x04\x01\ |
| 893 | \x02\0\x12\x03Y\x02\x1c\x1a\xdf\x03\x20Error\x20message.\x20\x20If\x20no\ |
| 894 | n-empty,\x20code\x20generation\x20failed.\x20\x20The\x20plugin\x20proces\ |
| 895 | s\n\x20should\x20exit\x20with\x20status\x20code\x20zero\x20even\x20if\ |
| 896 | \x20it\x20reports\x20an\x20error\x20in\x20this\x20way.\n\n\x20This\x20sh\ |
| 897 | ould\x20be\x20used\x20to\x20indicate\x20errors\x20in\x20.proto\x20files\ |
| 898 | \x20which\x20prevent\x20the\n\x20code\x20generator\x20from\x20generating\ |
| 899 | \x20correct\x20code.\x20\x20Errors\x20which\x20indicate\x20a\n\x20proble\ |
| 900 | m\x20in\x20protoc\x20itself\x20--\x20such\x20as\x20the\x20input\x20CodeG\ |
| 901 | eneratorRequest\x20being\n\x20unparseable\x20--\x20should\x20be\x20repor\ |
| 902 | ted\x20by\x20writing\x20a\x20message\x20to\x20stderr\x20and\n\x20exiting\ |
| 903 | \x20with\x20a\x20non-zero\x20status\x20code.\n\n\x0c\n\x05\x04\x01\x02\0\ |
| 904 | \x04\x12\x03Y\x02\n\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03Y\x0b\x11\n\x0c\ |
| 905 | \n\x05\x04\x01\x02\0\x01\x12\x03Y\x12\x17\n\x0c\n\x05\x04\x01\x02\0\x03\ |
| 906 | \x12\x03Y\x1a\x1b\n4\n\x04\x04\x01\x03\0\x12\x05\\\x02\x93\x01\x03\x1a%\ |
| 907 | \x20Represents\x20a\x20single\x20generated\x20file.\n\n\x0c\n\x05\x04\ |
| 908 | \x01\x03\0\x01\x12\x03\\\n\x0e\n\xad\x05\n\x06\x04\x01\x03\0\x02\0\x12\ |
| 909 | \x03h\x04\x1d\x1a\x9d\x05\x20The\x20file\x20name,\x20relative\x20to\x20t\ |
| 910 | he\x20output\x20directory.\x20\x20The\x20name\x20must\x20not\n\x20contai\ |
| 911 | n\x20\".\"\x20or\x20\"..\"\x20components\x20and\x20must\x20be\x20relativ\ |
| 912 | e,\x20not\x20be\x20absolute\x20(so,\n\x20the\x20file\x20cannot\x20lie\ |
| 913 | \x20outside\x20the\x20output\x20directory).\x20\x20\"/\"\x20must\x20be\ |
| 914 | \x20used\x20as\n\x20the\x20path\x20separator,\x20not\x20\"\\\".\n\n\x20I\ |
| 915 | f\x20the\x20name\x20is\x20omitted,\x20the\x20content\x20will\x20be\x20ap\ |
| 916 | pended\x20to\x20the\x20previous\n\x20file.\x20\x20This\x20allows\x20the\ |
| 917 | \x20generator\x20to\x20break\x20large\x20files\x20into\x20small\x20chunk\ |
| 918 | s,\n\x20and\x20allows\x20the\x20generated\x20text\x20to\x20be\x20streame\ |
| 919 | d\x20back\x20to\x20protoc\x20so\x20that\x20large\n\x20files\x20need\x20n\ |
| 920 | ot\x20reside\x20completely\x20in\x20memory\x20at\x20one\x20time.\x20\x20\ |
| 921 | Note\x20that\x20as\x20of\n\x20this\x20writing\x20protoc\x20does\x20not\ |
| 922 | \x20optimize\x20for\x20this\x20--\x20it\x20will\x20read\x20the\x20entire\ |
| 923 | \n\x20CodeGeneratorResponse\x20before\x20writing\x20files\x20to\x20disk.\ |
| 924 | \n\n\x0e\n\x07\x04\x01\x03\0\x02\0\x04\x12\x03h\x04\x0c\n\x0e\n\x07\x04\ |
| 925 | \x01\x03\0\x02\0\x05\x12\x03h\r\x13\n\x0e\n\x07\x04\x01\x03\0\x02\0\x01\ |
| 926 | \x12\x03h\x14\x18\n\x0e\n\x07\x04\x01\x03\0\x02\0\x03\x12\x03h\x1b\x1c\n\ |
| 927 | \xae\x10\n\x06\x04\x01\x03\0\x02\x01\x12\x04\x8f\x01\x04(\x1a\x9d\x10\ |
| 928 | \x20If\x20non-empty,\x20indicates\x20that\x20the\x20named\x20file\x20sho\ |
| 929 | uld\x20already\x20exist,\x20and\x20the\n\x20content\x20here\x20is\x20to\ |
| 930 | \x20be\x20inserted\x20into\x20that\x20file\x20at\x20a\x20defined\x20inse\ |
| 931 | rtion\n\x20point.\x20\x20This\x20feature\x20allows\x20a\x20code\x20gener\ |
| 932 | ator\x20to\x20extend\x20the\x20output\n\x20produced\x20by\x20another\x20\ |
| 933 | code\x20generator.\x20\x20The\x20original\x20generator\x20may\x20provide\ |
| 934 | \n\x20insertion\x20points\x20by\x20placing\x20special\x20annotations\x20\ |
| 935 | in\x20the\x20file\x20that\x20look\n\x20like:\n\x20\x20\x20@@protoc_inser\ |
| 936 | tion_point(NAME)\n\x20The\x20annotation\x20can\x20have\x20arbitrary\x20t\ |
| 937 | ext\x20before\x20and\x20after\x20it\x20on\x20the\x20line,\n\x20which\x20\ |
| 938 | allows\x20it\x20to\x20be\x20placed\x20in\x20a\x20comment.\x20\x20NAME\ |
| 939 | \x20should\x20be\x20replaced\x20with\n\x20an\x20identifier\x20naming\x20\ |
| 940 | the\x20point\x20--\x20this\x20is\x20what\x20other\x20generators\x20will\ |
| 941 | \x20use\n\x20as\x20the\x20insertion_point.\x20\x20Code\x20inserted\x20at\ |
| 942 | \x20this\x20point\x20will\x20be\x20placed\n\x20immediately\x20above\x20t\ |
| 943 | he\x20line\x20containing\x20the\x20insertion\x20point\x20(thus\x20multip\ |
| 944 | le\n\x20insertions\x20to\x20the\x20same\x20point\x20will\x20come\x20out\ |
| 945 | \x20in\x20the\x20order\x20they\x20were\x20added).\n\x20The\x20double-@\ |
| 946 | \x20is\x20intended\x20to\x20make\x20it\x20unlikely\x20that\x20the\x20gen\ |
| 947 | erated\x20code\n\x20could\x20contain\x20things\x20that\x20look\x20like\ |
| 948 | \x20insertion\x20points\x20by\x20accident.\n\n\x20For\x20example,\x20the\ |
| 949 | \x20C++\x20code\x20generator\x20places\x20the\x20following\x20line\x20in\ |
| 950 | \x20the\n\x20.pb.h\x20files\x20that\x20it\x20generates:\n\x20\x20\x20//\ |
| 951 | \x20@@protoc_insertion_point(namespace_scope)\n\x20This\x20line\x20appea\ |
| 952 | rs\x20within\x20the\x20scope\x20of\x20the\x20file's\x20package\x20namesp\ |
| 953 | ace,\x20but\n\x20outside\x20of\x20any\x20particular\x20class.\x20\x20Ano\ |
| 954 | ther\x20plugin\x20can\x20then\x20specify\x20the\n\x20insertion_point\x20\ |
| 955 | \"namespace_scope\"\x20to\x20generate\x20additional\x20classes\x20or\n\ |
| 956 | \x20other\x20declarations\x20that\x20should\x20be\x20placed\x20in\x20thi\ |
| 957 | s\x20scope.\n\n\x20Note\x20that\x20if\x20the\x20line\x20containing\x20th\ |
| 958 | e\x20insertion\x20point\x20begins\x20with\n\x20whitespace,\x20the\x20sam\ |
| 959 | e\x20whitespace\x20will\x20be\x20added\x20to\x20every\x20line\x20of\x20t\ |
| 960 | he\n\x20inserted\x20text.\x20\x20This\x20is\x20useful\x20for\x20language\ |
| 961 | s\x20like\x20Python,\x20where\n\x20indentation\x20matters.\x20\x20In\x20\ |
| 962 | these\x20languages,\x20the\x20insertion\x20point\x20comment\n\x20should\ |
| 963 | \x20be\x20indented\x20the\x20same\x20amount\x20as\x20any\x20inserted\x20\ |
| 964 | code\x20will\x20need\x20to\x20be\n\x20in\x20order\x20to\x20work\x20corre\ |
| 965 | ctly\x20in\x20that\x20context.\n\n\x20The\x20code\x20generator\x20that\ |
| 966 | \x20generates\x20the\x20initial\x20file\x20and\x20the\x20one\x20which\n\ |
| 967 | \x20inserts\x20into\x20it\x20must\x20both\x20run\x20as\x20part\x20of\x20\ |
| 968 | a\x20single\x20invocation\x20of\x20protoc.\n\x20Code\x20generators\x20ar\ |
| 969 | e\x20executed\x20in\x20the\x20order\x20in\x20which\x20they\x20appear\x20\ |
| 970 | on\x20the\n\x20command\x20line.\n\n\x20If\x20|insertion_point|\x20is\x20\ |
| 971 | present,\x20|name|\x20must\x20also\x20be\x20present.\n\n\x0f\n\x07\x04\ |
| 972 | \x01\x03\0\x02\x01\x04\x12\x04\x8f\x01\x04\x0c\n\x0f\n\x07\x04\x01\x03\0\ |
| 973 | \x02\x01\x05\x12\x04\x8f\x01\r\x13\n\x0f\n\x07\x04\x01\x03\0\x02\x01\x01\ |
| 974 | \x12\x04\x8f\x01\x14#\n\x0f\n\x07\x04\x01\x03\0\x02\x01\x03\x12\x04\x8f\ |
| 975 | \x01&'\n$\n\x06\x04\x01\x03\0\x02\x02\x12\x04\x92\x01\x04!\x1a\x14\x20Th\ |
| 976 | e\x20file\x20contents.\n\n\x0f\n\x07\x04\x01\x03\0\x02\x02\x04\x12\x04\ |
| 977 | \x92\x01\x04\x0c\n\x0f\n\x07\x04\x01\x03\0\x02\x02\x05\x12\x04\x92\x01\r\ |
| 978 | \x13\n\x0f\n\x07\x04\x01\x03\0\x02\x02\x01\x12\x04\x92\x01\x14\x1b\n\x0f\ |
| 979 | \n\x07\x04\x01\x03\0\x02\x02\x03\x12\x04\x92\x01\x1e\x20\n\x0c\n\x04\x04\ |
| 980 | \x01\x02\x01\x12\x04\x94\x01\x02\x1a\n\r\n\x05\x04\x01\x02\x01\x04\x12\ |
| 981 | \x04\x94\x01\x02\n\n\r\n\x05\x04\x01\x02\x01\x06\x12\x04\x94\x01\x0b\x0f\ |
| 982 | \n\r\n\x05\x04\x01\x02\x01\x01\x12\x04\x94\x01\x10\x14\n\r\n\x05\x04\x01\ |
| 983 | \x02\x01\x03\x12\x04\x94\x01\x17\x19\ |
| 984 | "; |
| 985 | |
| 986 | static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; |
| 987 | |
| 988 | fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { |
| 989 | ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() |
| 990 | } |
| 991 | |
| 992 | pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { |
| 993 | unsafe { |
| 994 | file_descriptor_proto_lazy.get(|| { |
| 995 | parse_descriptor_proto() |
| 996 | }) |
| 997 | } |
| 998 | } |