ref: 7c647735402dafcb78eac1232d0319f3a8ce162a
yats-connector-rust/yats_grpc.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 |
// This file is generated by rust-protobuf 3.5.0. Do not edit // .proto file is parsed by protoc --rust_out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unused_results)] #![allow(unused_mut)] //! Generated file from `yats-grpc.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_0; // @@protoc_insertion_point(message:yats.Metric) #[derive(PartialEq,Clone,Default,Debug)] pub struct Metric { // message fields // @@protoc_insertion_point(field:yats.Metric.id_client) pub id_client: ::std::string::String, // @@protoc_insertion_point(field:yats.Metric.mtime) pub mtime: i64, // @@protoc_insertion_point(field:yats.Metric.name) pub name: ::std::string::String, // @@protoc_insertion_point(field:yats.Metric.value) pub value: ::std::string::String, // special fields // @@protoc_insertion_point(special_field:yats.Metric.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Metric { fn default() -> &'a Metric { <Metric as ::protobuf::Message>::default_instance() } } impl Metric { pub fn new() -> Metric { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "id_client", |m: &Metric| { &m.id_client }, |m: &mut Metric| { &mut m.id_client }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "mtime", |m: &Metric| { &m.mtime }, |m: &mut Metric| { &mut m.mtime }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "name", |m: &Metric| { &m.name }, |m: &mut Metric| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "value", |m: &Metric| { &m.value }, |m: &mut Metric| { &mut m.value }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Metric>( "Metric", fields, oneofs, ) } } impl ::protobuf::Message for Metric { const NAME: &'static str = "Metric"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.id_client = is.read_string()?; }, 16 => { self.mtime = is.read_int64()?; }, 26 => { self.name = is.read_string()?; }, 34 => { self.value = is.read_string()?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.id_client.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.id_client); } if self.mtime != 0 { my_size += ::protobuf::rt::int64_size(2, self.mtime); } if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.name); } if !self.value.is_empty() { my_size += ::protobuf::rt::string_size(4, &self.value); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.id_client.is_empty() { os.write_string(1, &self.id_client)?; } if self.mtime != 0 { os.write_int64(2, self.mtime)?; } if !self.name.is_empty() { os.write_string(3, &self.name)?; } if !self.value.is_empty() { os.write_string(4, &self.value)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Metric { Metric::new() } fn clear(&mut self) { self.id_client.clear(); self.mtime = 0; self.name.clear(); self.value.clear(); self.special_fields.clear(); } fn default_instance() -> &'static Metric { static instance: Metric = Metric { id_client: ::std::string::String::new(), mtime: 0, name: ::std::string::String::new(), value: ::std::string::String::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Metric { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("Metric").unwrap()).clone() } } impl ::std::fmt::Display for Metric { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Metric { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; } // @@protoc_insertion_point(message:yats.Event) #[derive(PartialEq,Clone,Default,Debug)] pub struct Event { // message fields // @@protoc_insertion_point(field:yats.Event.id_client) pub id_client: ::std::string::String, // @@protoc_insertion_point(field:yats.Event.etime) pub etime: i64, // @@protoc_insertion_point(field:yats.Event.name) pub name: ::std::string::String, // special fields // @@protoc_insertion_point(special_field:yats.Event.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Event { fn default() -> &'a Event { <Event as ::protobuf::Message>::default_instance() } } impl Event { pub fn new() -> Event { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(3); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "id_client", |m: &Event| { &m.id_client }, |m: &mut Event| { &mut m.id_client }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "etime", |m: &Event| { &m.etime }, |m: &mut Event| { &mut m.etime }, )); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "name", |m: &Event| { &m.name }, |m: &mut Event| { &mut m.name }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Event>( "Event", fields, oneofs, ) } } impl ::protobuf::Message for Event { const NAME: &'static str = "Event"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.id_client = is.read_string()?; }, 16 => { self.etime = is.read_int64()?; }, 26 => { self.name = is.read_string()?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.id_client.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.id_client); } if self.etime != 0 { my_size += ::protobuf::rt::int64_size(2, self.etime); } if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.name); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.id_client.is_empty() { os.write_string(1, &self.id_client)?; } if self.etime != 0 { os.write_int64(2, self.etime)?; } if !self.name.is_empty() { os.write_string(3, &self.name)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> Event { Event::new() } fn clear(&mut self) { self.id_client.clear(); self.etime = 0; self.name.clear(); self.special_fields.clear(); } fn default_instance() -> &'static Event { static instance: Event = Event { id_client: ::std::string::String::new(), etime: 0, name: ::std::string::String::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for Event { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("Event").unwrap()).clone() } } impl ::std::fmt::Display for Event { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Event { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; } // @@protoc_insertion_point(message:yats.CreateMetricRequest) #[derive(PartialEq,Clone,Default,Debug)] pub struct CreateMetricRequest { // message fields // @@protoc_insertion_point(field:yats.CreateMetricRequest.metric) pub metric: ::protobuf::MessageField<Metric>, // special fields // @@protoc_insertion_point(special_field:yats.CreateMetricRequest.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CreateMetricRequest { fn default() -> &'a CreateMetricRequest { <CreateMetricRequest as ::protobuf::Message>::default_instance() } } impl CreateMetricRequest { pub fn new() -> CreateMetricRequest { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Metric>( "metric", |m: &CreateMetricRequest| { &m.metric }, |m: &mut CreateMetricRequest| { &mut m.metric }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CreateMetricRequest>( "CreateMetricRequest", fields, oneofs, ) } } impl ::protobuf::Message for CreateMetricRequest { const NAME: &'static str = "CreateMetricRequest"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.metric)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.metric.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.metric.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> CreateMetricRequest { CreateMetricRequest::new() } fn clear(&mut self) { self.metric.clear(); self.special_fields.clear(); } fn default_instance() -> &'static CreateMetricRequest { static instance: CreateMetricRequest = CreateMetricRequest { metric: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for CreateMetricRequest { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateMetricRequest").unwrap()).clone() } } impl ::std::fmt::Display for CreateMetricRequest { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CreateMetricRequest { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; } // @@protoc_insertion_point(message:yats.CreateMetricResponse) #[derive(PartialEq,Clone,Default,Debug)] pub struct CreateMetricResponse { // message fields // @@protoc_insertion_point(field:yats.CreateMetricResponse.metric) pub metric: ::protobuf::MessageField<Metric>, // special fields // @@protoc_insertion_point(special_field:yats.CreateMetricResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CreateMetricResponse { fn default() -> &'a CreateMetricResponse { <CreateMetricResponse as ::protobuf::Message>::default_instance() } } impl CreateMetricResponse { pub fn new() -> CreateMetricResponse { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Metric>( "metric", |m: &CreateMetricResponse| { &m.metric }, |m: &mut CreateMetricResponse| { &mut m.metric }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CreateMetricResponse>( "CreateMetricResponse", fields, oneofs, ) } } impl ::protobuf::Message for CreateMetricResponse { const NAME: &'static str = "CreateMetricResponse"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.metric)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.metric.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.metric.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> CreateMetricResponse { CreateMetricResponse::new() } fn clear(&mut self) { self.metric.clear(); self.special_fields.clear(); } fn default_instance() -> &'static CreateMetricResponse { static instance: CreateMetricResponse = CreateMetricResponse { metric: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for CreateMetricResponse { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateMetricResponse").unwrap()).clone() } } impl ::std::fmt::Display for CreateMetricResponse { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CreateMetricResponse { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; } // @@protoc_insertion_point(message:yats.CreateEventRequest) #[derive(PartialEq,Clone,Default,Debug)] pub struct CreateEventRequest { // message fields // @@protoc_insertion_point(field:yats.CreateEventRequest.event) pub event: ::protobuf::MessageField<Event>, // special fields // @@protoc_insertion_point(special_field:yats.CreateEventRequest.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CreateEventRequest { fn default() -> &'a CreateEventRequest { <CreateEventRequest as ::protobuf::Message>::default_instance() } } impl CreateEventRequest { pub fn new() -> CreateEventRequest { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Event>( "event", |m: &CreateEventRequest| { &m.event }, |m: &mut CreateEventRequest| { &mut m.event }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CreateEventRequest>( "CreateEventRequest", fields, oneofs, ) } } impl ::protobuf::Message for CreateEventRequest { const NAME: &'static str = "CreateEventRequest"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.event)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.event.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.event.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> CreateEventRequest { CreateEventRequest::new() } fn clear(&mut self) { self.event.clear(); self.special_fields.clear(); } fn default_instance() -> &'static CreateEventRequest { static instance: CreateEventRequest = CreateEventRequest { event: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for CreateEventRequest { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateEventRequest").unwrap()).clone() } } impl ::std::fmt::Display for CreateEventRequest { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CreateEventRequest { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; } // @@protoc_insertion_point(message:yats.CreateEventResponse) #[derive(PartialEq,Clone,Default,Debug)] pub struct CreateEventResponse { // message fields // @@protoc_insertion_point(field:yats.CreateEventResponse.event) pub event: ::protobuf::MessageField<Event>, // special fields // @@protoc_insertion_point(special_field:yats.CreateEventResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CreateEventResponse { fn default() -> &'a CreateEventResponse { <CreateEventResponse as ::protobuf::Message>::default_instance() } } impl CreateEventResponse { pub fn new() -> CreateEventResponse { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Event>( "event", |m: &CreateEventResponse| { &m.event }, |m: &mut CreateEventResponse| { &mut m.event }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CreateEventResponse>( "CreateEventResponse", fields, oneofs, ) } } impl ::protobuf::Message for CreateEventResponse { const NAME: &'static str = "CreateEventResponse"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.event)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.event.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.event.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> CreateEventResponse { CreateEventResponse::new() } fn clear(&mut self) { self.event.clear(); self.special_fields.clear(); } fn default_instance() -> &'static CreateEventResponse { static instance: CreateEventResponse = CreateEventResponse { event: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for CreateEventResponse { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateEventResponse").unwrap()).clone() } } impl ::std::fmt::Display for CreateEventResponse { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CreateEventResponse { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x0fyats-grpc.proto\x12\x04yats\"e\n\x06Metric\x12\x1b\n\tid_client\ \x18\x01\x20\x01(\tR\x08idClient\x12\x14\n\x05mtime\x18\x02\x20\x01(\x03\ R\x05mtime\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\x14\n\x05va\ lue\x18\x04\x20\x01(\tR\x05value\"N\n\x05Event\x12\x1b\n\tid_client\x18\ \x01\x20\x01(\tR\x08idClient\x12\x14\n\x05etime\x18\x02\x20\x01(\x03R\ \x05etime\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\";\n\x13CreateMe\ tricRequest\x12$\n\x06metric\x18\x01\x20\x01(\x0b2\x0c.yats.MetricR\x06m\ etric\"<\n\x14CreateMetricResponse\x12$\n\x06metric\x18\x01\x20\x01(\x0b\ 2\x0c.yats.MetricR\x06metric\"7\n\x12CreateEventRequest\x12!\n\x05event\ \x18\x01\x20\x01(\x0b2\x0b.yats.EventR\x05event\"8\n\x13CreateEventRespo\ nse\x12!\n\x05event\x18\x01\x20\x01(\x0b2\x0b.yats.EventR\x05event2\x9c\ \x01\n\x0fYatsGrpcService\x12E\n\x0cCreateMetric\x12\x19.yats.CreateMetr\ icRequest\x1a\x1a.yats.CreateMetricResponse\x12B\n\x0bCreateEvent\x12\ \x18.yats.CreateEventRequest\x1a\x19.yats.CreateEventResponseB'\n\x17com\ .kevwe.yats.protobufP\x01Z\nyats/protoJ\x8b\t\n\x06\x12\x04\n\01\x01\n\ \xc4\x01\n\x01\x0c\x12\x03\n\0\x122\xb9\x01*\n\x20Yats\x20-\x20yats\n\n\ \x20This\x20file\x20is\x20licensed\x20under\x20the\x20Affero\x20General\ \x20Public\x20License\x20version\x203\x20or\n\x20later.\x20See\x20the\ \x20COPYING\x20file.\n\n\x20@author\x20Paolo\x20Lulli\x20<kevwe.com>\n\ \x20@copyright\x20Paolo\x20Lulli\x202024\n\n\x08\n\x01\x02\x12\x03\x0b\0\ \r\n\x08\n\x01\x08\x12\x03\r\00\n\t\n\x02\x08\x01\x12\x03\r\00\n\x08\n\ \x01\x08\x12\x03\x0e\0\"\n\t\n\x02\x08\n\x12\x03\x0e\0\"\n\x08\n\x01\x08\ \x12\x03\x0f\0!\n\t\n\x02\x08\x0b\x12\x03\x0f\0!\n\n\n\x02\x04\0\x12\x04\ \x11\0\x16\x01\n\n\n\x03\x04\0\x01\x12\x03\x11\x08\x0e\n\x0b\n\x04\x04\0\ \x02\0\x12\x03\x12\x02\x17\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x12\x02\ \x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x12\t\x12\n\x0c\n\x05\x04\0\x02\ \0\x03\x12\x03\x12\x15\x16\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x13\x02\x12\ \n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x13\x02\x07\n\x0c\n\x05\x04\0\x02\ \x01\x01\x12\x03\x13\x08\r\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x13\x10\ \x11\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x14\x02\x12\n\x0c\n\x05\x04\0\x02\ \x02\x05\x12\x03\x14\x02\x08\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x14\t\ \r\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x14\x10\x11\n\x0b\n\x04\x04\0\ \x02\x03\x12\x03\x15\x02\x13\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\x15\ \x02\x08\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x15\t\x0e\n\x0c\n\x05\x04\ \0\x02\x03\x03\x12\x03\x15\x11\x12\n\n\n\x02\x04\x01\x12\x04\x18\0\x1c\ \x01\n\n\n\x03\x04\x01\x01\x12\x03\x18\x08\r\n\x0b\n\x04\x04\x01\x02\0\ \x12\x03\x19\x02\x17\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x19\x02\x08\n\ \x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x19\t\x12\n\x0c\n\x05\x04\x01\x02\0\ \x03\x12\x03\x19\x15\x16\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x1a\x02\x12\ \n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x1a\x02\x07\n\x0c\n\x05\x04\x01\ \x02\x01\x01\x12\x03\x1a\x08\r\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\ \x1a\x10\x11\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x1b\x02\x12\n\x0c\n\x05\ \x04\x01\x02\x02\x05\x12\x03\x1b\x02\x08\n\x0c\n\x05\x04\x01\x02\x02\x01\ \x12\x03\x1b\t\r\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x1b\x10\x11\n\n\ \n\x02\x04\x02\x12\x04\x1e\0\x20\x01\n\n\n\x03\x04\x02\x01\x12\x03\x1e\ \x08\x1b\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x1f\x02\x14\n\x0c\n\x05\x04\ \x02\x02\0\x06\x12\x03\x1f\x02\x08\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\ \x1f\t\x0f\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x1f\x12\x13\n\n\n\x02\ \x04\x03\x12\x04\"\0$\x01\n\n\n\x03\x04\x03\x01\x12\x03\"\x08\x1c\n\x0b\ \n\x04\x04\x03\x02\0\x12\x03#\x02\x14\n\x0c\n\x05\x04\x03\x02\0\x06\x12\ \x03#\x02\x08\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03#\t\x0f\n\x0c\n\x05\ \x04\x03\x02\0\x03\x12\x03#\x12\x13\n\n\n\x02\x04\x04\x12\x04&\0(\x01\n\ \n\n\x03\x04\x04\x01\x12\x03&\x08\x1a\n\x0b\n\x04\x04\x04\x02\0\x12\x03'\ \x02\x12\n\x0c\n\x05\x04\x04\x02\0\x06\x12\x03'\x02\x07\n\x0c\n\x05\x04\ \x04\x02\0\x01\x12\x03'\x08\r\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03'\x10\ \x11\n\n\n\x02\x04\x05\x12\x04*\0,\x01\n\n\n\x03\x04\x05\x01\x12\x03*\ \x08\x1b\n\x0b\n\x04\x04\x05\x02\0\x12\x03+\x02\x12\n\x0c\n\x05\x04\x05\ \x02\0\x06\x12\x03+\x02\x07\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03+\x08\r\ \n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03+\x10\x11\n\n\n\x02\x06\0\x12\x04.\ \01\x01\n\n\n\x03\x06\0\x01\x12\x03.\x08\x17\n\x0b\n\x04\x06\0\x02\0\x12\ \x03/\x02G\n\x0c\n\x05\x06\0\x02\0\x01\x12\x03/\x06\x12\n\x0c\n\x05\x06\ \0\x02\0\x02\x12\x03/\x13&\n\x0c\n\x05\x06\0\x02\0\x03\x12\x03/1E\n\x0b\ \n\x04\x06\0\x02\x01\x12\x030\x02D\n\x0c\n\x05\x06\0\x02\x01\x01\x12\x03\ 0\x06\x11\n\x0c\n\x05\x06\0\x02\x01\x02\x12\x030\x12$\n\x0c\n\x05\x06\0\ \x02\x01\x03\x12\x030/Bb\x06proto3\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); let mut messages = ::std::vec::Vec::with_capacity(6); messages.push(Metric::generated_message_descriptor_data()); messages.push(Event::generated_message_descriptor_data()); messages.push(CreateMetricRequest::generated_message_descriptor_data()); messages.push(CreateMetricResponse::generated_message_descriptor_data()); messages.push(CreateEventRequest::generated_message_descriptor_data()); messages.push(CreateEventResponse::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } |