protos/workspace/docs/target/debug/build/protos-ced133450c5d2c46/out/
registered_events.rs

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