gz_msgs/ign_msgs8/
log_playback_control.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 `ignition/msgs/log_playback_control.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#[derive(::gz_msgs_common::IgnMessage)]
28// @@protoc_insertion_point(message:ignition.msgs.LogPlaybackControl)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct LogPlaybackControl {
31    // message fields
32    // @@protoc_insertion_point(field:ignition.msgs.LogPlaybackControl.header)
33    pub header: ::protobuf::MessageField<super::header::Header>,
34    // @@protoc_insertion_point(field:ignition.msgs.LogPlaybackControl.pause)
35    pub pause: bool,
36    // @@protoc_insertion_point(field:ignition.msgs.LogPlaybackControl.multi_step)
37    pub multi_step: i32,
38    // @@protoc_insertion_point(field:ignition.msgs.LogPlaybackControl.rewind)
39    pub rewind: bool,
40    // @@protoc_insertion_point(field:ignition.msgs.LogPlaybackControl.forward)
41    pub forward: bool,
42    // @@protoc_insertion_point(field:ignition.msgs.LogPlaybackControl.seek)
43    pub seek: ::protobuf::MessageField<super::time::Time>,
44    // special fields
45    // @@protoc_insertion_point(special_field:ignition.msgs.LogPlaybackControl.special_fields)
46    pub special_fields: ::protobuf::SpecialFields,
47}
48
49impl<'a> ::std::default::Default for &'a LogPlaybackControl {
50    fn default() -> &'a LogPlaybackControl {
51        <LogPlaybackControl as ::protobuf::Message>::default_instance()
52    }
53}
54
55impl LogPlaybackControl {
56    pub fn new() -> LogPlaybackControl {
57        ::std::default::Default::default()
58    }
59
60    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
61        let mut fields = ::std::vec::Vec::with_capacity(6);
62        let mut oneofs = ::std::vec::Vec::with_capacity(0);
63        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
64            "header",
65            |m: &LogPlaybackControl| { &m.header },
66            |m: &mut LogPlaybackControl| { &mut m.header },
67        ));
68        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
69            "pause",
70            |m: &LogPlaybackControl| { &m.pause },
71            |m: &mut LogPlaybackControl| { &mut m.pause },
72        ));
73        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
74            "multi_step",
75            |m: &LogPlaybackControl| { &m.multi_step },
76            |m: &mut LogPlaybackControl| { &mut m.multi_step },
77        ));
78        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
79            "rewind",
80            |m: &LogPlaybackControl| { &m.rewind },
81            |m: &mut LogPlaybackControl| { &mut m.rewind },
82        ));
83        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
84            "forward",
85            |m: &LogPlaybackControl| { &m.forward },
86            |m: &mut LogPlaybackControl| { &mut m.forward },
87        ));
88        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::time::Time>(
89            "seek",
90            |m: &LogPlaybackControl| { &m.seek },
91            |m: &mut LogPlaybackControl| { &mut m.seek },
92        ));
93        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<LogPlaybackControl>(
94            "LogPlaybackControl",
95            fields,
96            oneofs,
97        )
98    }
99}
100
101impl ::protobuf::Message for LogPlaybackControl {
102    const NAME: &'static str = "LogPlaybackControl";
103
104    fn is_initialized(&self) -> bool {
105        true
106    }
107
108    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
109        while let Some(tag) = is.read_raw_tag_or_eof()? {
110            match tag {
111                10 => {
112                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
113                },
114                16 => {
115                    self.pause = is.read_bool()?;
116                },
117                24 => {
118                    self.multi_step = is.read_sint32()?;
119                },
120                32 => {
121                    self.rewind = is.read_bool()?;
122                },
123                40 => {
124                    self.forward = is.read_bool()?;
125                },
126                50 => {
127                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.seek)?;
128                },
129                tag => {
130                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
131                },
132            };
133        }
134        ::std::result::Result::Ok(())
135    }
136
137    // Compute sizes of nested messages
138    #[allow(unused_variables)]
139    fn compute_size(&self) -> u64 {
140        let mut my_size = 0;
141        if let Some(v) = self.header.as_ref() {
142            let len = v.compute_size();
143            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
144        }
145        if self.pause != false {
146            my_size += 1 + 1;
147        }
148        if self.multi_step != 0 {
149            my_size += ::protobuf::rt::sint32_size(3, self.multi_step);
150        }
151        if self.rewind != false {
152            my_size += 1 + 1;
153        }
154        if self.forward != false {
155            my_size += 1 + 1;
156        }
157        if let Some(v) = self.seek.as_ref() {
158            let len = v.compute_size();
159            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
160        }
161        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
162        self.special_fields.cached_size().set(my_size as u32);
163        my_size
164    }
165
166    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
167        if let Some(v) = self.header.as_ref() {
168            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
169        }
170        if self.pause != false {
171            os.write_bool(2, self.pause)?;
172        }
173        if self.multi_step != 0 {
174            os.write_sint32(3, self.multi_step)?;
175        }
176        if self.rewind != false {
177            os.write_bool(4, self.rewind)?;
178        }
179        if self.forward != false {
180            os.write_bool(5, self.forward)?;
181        }
182        if let Some(v) = self.seek.as_ref() {
183            ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
184        }
185        os.write_unknown_fields(self.special_fields.unknown_fields())?;
186        ::std::result::Result::Ok(())
187    }
188
189    fn special_fields(&self) -> &::protobuf::SpecialFields {
190        &self.special_fields
191    }
192
193    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
194        &mut self.special_fields
195    }
196
197    fn new() -> LogPlaybackControl {
198        LogPlaybackControl::new()
199    }
200
201    fn clear(&mut self) {
202        self.header.clear();
203        self.pause = false;
204        self.multi_step = 0;
205        self.rewind = false;
206        self.forward = false;
207        self.seek.clear();
208        self.special_fields.clear();
209    }
210
211    fn default_instance() -> &'static LogPlaybackControl {
212        static instance: LogPlaybackControl = LogPlaybackControl {
213            header: ::protobuf::MessageField::none(),
214            pause: false,
215            multi_step: 0,
216            rewind: false,
217            forward: false,
218            seek: ::protobuf::MessageField::none(),
219            special_fields: ::protobuf::SpecialFields::new(),
220        };
221        &instance
222    }
223}
224
225impl ::protobuf::MessageFull for LogPlaybackControl {
226    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
227        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
228        descriptor.get(|| file_descriptor().message_by_package_relative_name("LogPlaybackControl").unwrap()).clone()
229    }
230}
231
232impl ::std::fmt::Display for LogPlaybackControl {
233    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
234        ::protobuf::text_format::fmt(self, f)
235    }
236}
237
238impl ::protobuf::reflect::ProtobufValue for LogPlaybackControl {
239    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
240}
241
242static file_descriptor_proto_data: &'static [u8] = b"\
243    \n(ignition/msgs/log_playback_control.proto\x12\rignition.msgs\x1a\x18ig\
244    nition/msgs/time.proto\x1a\x1aignition/msgs/header.proto\"\xd3\x01\n\x12\
245    LogPlaybackControl\x12-\n\x06header\x18\x01\x20\x01(\x0b2\x15.ignition.m\
246    sgs.HeaderR\x06header\x12\x14\n\x05pause\x18\x02\x20\x01(\x08R\x05pause\
247    \x12\x1d\n\nmulti_step\x18\x03\x20\x01(\x11R\tmultiStep\x12\x16\n\x06rew\
248    ind\x18\x04\x20\x01(\x08R\x06rewind\x12\x18\n\x07forward\x18\x05\x20\x01\
249    (\x08R\x07forward\x12'\n\x04seek\x18\x06\x20\x01(\x0b2\x13.ignition.msgs\
250    .TimeR\x04seekB-\n\x11com.ignition.msgsB\x18LogPlaybackControlProtosb\
251    \x06proto3\
252";
253
254/// `FileDescriptorProto` object which was a source for this generated file
255fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
256    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
257    file_descriptor_proto_lazy.get(|| {
258        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
259    })
260}
261
262/// `FileDescriptor` object which allows dynamic access to files
263pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
264    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
265    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
266    file_descriptor.get(|| {
267        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
268            let mut deps = ::std::vec::Vec::with_capacity(2);
269            deps.push(super::time::file_descriptor().clone());
270            deps.push(super::header::file_descriptor().clone());
271            let mut messages = ::std::vec::Vec::with_capacity(1);
272            messages.push(LogPlaybackControl::generated_message_descriptor_data());
273            let mut enums = ::std::vec::Vec::with_capacity(0);
274            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
275                file_descriptor_proto(),
276                deps,
277                messages,
278                enums,
279            )
280        });
281        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
282    })
283}