gz_msgs/ign_msgs8/
track_visual.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/track_visual.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.TrackVisual)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct TrackVisual {
31    // message fields
32    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.header)
33    pub header: ::protobuf::MessageField<super::header::Header>,
34    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.name)
35    pub name: ::std::string::String,
36    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.id)
37    pub id: u32,
38    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.inherit_orientation)
39    pub inherit_orientation: bool,
40    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.min_dist)
41    pub min_dist: f64,
42    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.max_dist)
43    pub max_dist: f64,
44    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.static)
45    pub static_: bool,
46    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.use_model_frame)
47    pub use_model_frame: bool,
48    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.xyz)
49    pub xyz: ::protobuf::MessageField<super::vector3d::Vector3d>,
50    // @@protoc_insertion_point(field:ignition.msgs.TrackVisual.inherit_yaw)
51    pub inherit_yaw: bool,
52    // special fields
53    // @@protoc_insertion_point(special_field:ignition.msgs.TrackVisual.special_fields)
54    pub special_fields: ::protobuf::SpecialFields,
55}
56
57impl<'a> ::std::default::Default for &'a TrackVisual {
58    fn default() -> &'a TrackVisual {
59        <TrackVisual as ::protobuf::Message>::default_instance()
60    }
61}
62
63impl TrackVisual {
64    pub fn new() -> TrackVisual {
65        ::std::default::Default::default()
66    }
67
68    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
69        let mut fields = ::std::vec::Vec::with_capacity(10);
70        let mut oneofs = ::std::vec::Vec::with_capacity(0);
71        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
72            "header",
73            |m: &TrackVisual| { &m.header },
74            |m: &mut TrackVisual| { &mut m.header },
75        ));
76        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
77            "name",
78            |m: &TrackVisual| { &m.name },
79            |m: &mut TrackVisual| { &mut m.name },
80        ));
81        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
82            "id",
83            |m: &TrackVisual| { &m.id },
84            |m: &mut TrackVisual| { &mut m.id },
85        ));
86        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
87            "inherit_orientation",
88            |m: &TrackVisual| { &m.inherit_orientation },
89            |m: &mut TrackVisual| { &mut m.inherit_orientation },
90        ));
91        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
92            "min_dist",
93            |m: &TrackVisual| { &m.min_dist },
94            |m: &mut TrackVisual| { &mut m.min_dist },
95        ));
96        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
97            "max_dist",
98            |m: &TrackVisual| { &m.max_dist },
99            |m: &mut TrackVisual| { &mut m.max_dist },
100        ));
101        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
102            "static",
103            |m: &TrackVisual| { &m.static_ },
104            |m: &mut TrackVisual| { &mut m.static_ },
105        ));
106        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
107            "use_model_frame",
108            |m: &TrackVisual| { &m.use_model_frame },
109            |m: &mut TrackVisual| { &mut m.use_model_frame },
110        ));
111        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::vector3d::Vector3d>(
112            "xyz",
113            |m: &TrackVisual| { &m.xyz },
114            |m: &mut TrackVisual| { &mut m.xyz },
115        ));
116        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
117            "inherit_yaw",
118            |m: &TrackVisual| { &m.inherit_yaw },
119            |m: &mut TrackVisual| { &mut m.inherit_yaw },
120        ));
121        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TrackVisual>(
122            "TrackVisual",
123            fields,
124            oneofs,
125        )
126    }
127}
128
129impl ::protobuf::Message for TrackVisual {
130    const NAME: &'static str = "TrackVisual";
131
132    fn is_initialized(&self) -> bool {
133        true
134    }
135
136    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
137        while let Some(tag) = is.read_raw_tag_or_eof()? {
138            match tag {
139                10 => {
140                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
141                },
142                18 => {
143                    self.name = is.read_string()?;
144                },
145                24 => {
146                    self.id = is.read_uint32()?;
147                },
148                32 => {
149                    self.inherit_orientation = is.read_bool()?;
150                },
151                41 => {
152                    self.min_dist = is.read_double()?;
153                },
154                49 => {
155                    self.max_dist = is.read_double()?;
156                },
157                56 => {
158                    self.static_ = is.read_bool()?;
159                },
160                64 => {
161                    self.use_model_frame = is.read_bool()?;
162                },
163                74 => {
164                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.xyz)?;
165                },
166                80 => {
167                    self.inherit_yaw = is.read_bool()?;
168                },
169                tag => {
170                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
171                },
172            };
173        }
174        ::std::result::Result::Ok(())
175    }
176
177    // Compute sizes of nested messages
178    #[allow(unused_variables)]
179    fn compute_size(&self) -> u64 {
180        let mut my_size = 0;
181        if let Some(v) = self.header.as_ref() {
182            let len = v.compute_size();
183            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
184        }
185        if !self.name.is_empty() {
186            my_size += ::protobuf::rt::string_size(2, &self.name);
187        }
188        if self.id != 0 {
189            my_size += ::protobuf::rt::uint32_size(3, self.id);
190        }
191        if self.inherit_orientation != false {
192            my_size += 1 + 1;
193        }
194        if self.min_dist != 0. {
195            my_size += 1 + 8;
196        }
197        if self.max_dist != 0. {
198            my_size += 1 + 8;
199        }
200        if self.static_ != false {
201            my_size += 1 + 1;
202        }
203        if self.use_model_frame != false {
204            my_size += 1 + 1;
205        }
206        if let Some(v) = self.xyz.as_ref() {
207            let len = v.compute_size();
208            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
209        }
210        if self.inherit_yaw != false {
211            my_size += 1 + 1;
212        }
213        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
214        self.special_fields.cached_size().set(my_size as u32);
215        my_size
216    }
217
218    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
219        if let Some(v) = self.header.as_ref() {
220            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
221        }
222        if !self.name.is_empty() {
223            os.write_string(2, &self.name)?;
224        }
225        if self.id != 0 {
226            os.write_uint32(3, self.id)?;
227        }
228        if self.inherit_orientation != false {
229            os.write_bool(4, self.inherit_orientation)?;
230        }
231        if self.min_dist != 0. {
232            os.write_double(5, self.min_dist)?;
233        }
234        if self.max_dist != 0. {
235            os.write_double(6, self.max_dist)?;
236        }
237        if self.static_ != false {
238            os.write_bool(7, self.static_)?;
239        }
240        if self.use_model_frame != false {
241            os.write_bool(8, self.use_model_frame)?;
242        }
243        if let Some(v) = self.xyz.as_ref() {
244            ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
245        }
246        if self.inherit_yaw != false {
247            os.write_bool(10, self.inherit_yaw)?;
248        }
249        os.write_unknown_fields(self.special_fields.unknown_fields())?;
250        ::std::result::Result::Ok(())
251    }
252
253    fn special_fields(&self) -> &::protobuf::SpecialFields {
254        &self.special_fields
255    }
256
257    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
258        &mut self.special_fields
259    }
260
261    fn new() -> TrackVisual {
262        TrackVisual::new()
263    }
264
265    fn clear(&mut self) {
266        self.header.clear();
267        self.name.clear();
268        self.id = 0;
269        self.inherit_orientation = false;
270        self.min_dist = 0.;
271        self.max_dist = 0.;
272        self.static_ = false;
273        self.use_model_frame = false;
274        self.xyz.clear();
275        self.inherit_yaw = false;
276        self.special_fields.clear();
277    }
278
279    fn default_instance() -> &'static TrackVisual {
280        static instance: TrackVisual = TrackVisual {
281            header: ::protobuf::MessageField::none(),
282            name: ::std::string::String::new(),
283            id: 0,
284            inherit_orientation: false,
285            min_dist: 0.,
286            max_dist: 0.,
287            static_: false,
288            use_model_frame: false,
289            xyz: ::protobuf::MessageField::none(),
290            inherit_yaw: false,
291            special_fields: ::protobuf::SpecialFields::new(),
292        };
293        &instance
294    }
295}
296
297impl ::protobuf::MessageFull for TrackVisual {
298    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
299        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
300        descriptor.get(|| file_descriptor().message_by_package_relative_name("TrackVisual").unwrap()).clone()
301    }
302}
303
304impl ::std::fmt::Display for TrackVisual {
305    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
306        ::protobuf::text_format::fmt(self, f)
307    }
308}
309
310impl ::protobuf::reflect::ProtobufValue for TrackVisual {
311    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
312}
313
314static file_descriptor_proto_data: &'static [u8] = b"\
315    \n\x20ignition/msgs/track_visual.proto\x12\rignition.msgs\x1a\x1cignitio\
316    n/msgs/vector3d.proto\x1a\x1aignition/msgs/header.proto\"\xd3\x02\n\x0bT\
317    rackVisual\x12-\n\x06header\x18\x01\x20\x01(\x0b2\x15.ignition.msgs.Head\
318    erR\x06header\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x0e\n\
319    \x02id\x18\x03\x20\x01(\rR\x02id\x12/\n\x13inherit_orientation\x18\x04\
320    \x20\x01(\x08R\x12inheritOrientation\x12\x19\n\x08min_dist\x18\x05\x20\
321    \x01(\x01R\x07minDist\x12\x19\n\x08max_dist\x18\x06\x20\x01(\x01R\x07max\
322    Dist\x12\x16\n\x06static\x18\x07\x20\x01(\x08R\x06static\x12&\n\x0fuse_m\
323    odel_frame\x18\x08\x20\x01(\x08R\ruseModelFrame\x12)\n\x03xyz\x18\t\x20\
324    \x01(\x0b2\x17.ignition.msgs.Vector3dR\x03xyz\x12\x1f\n\x0binherit_yaw\
325    \x18\n\x20\x01(\x08R\ninheritYawB&\n\x11com.ignition.msgsB\x11TrackVisua\
326    lProtosb\x06proto3\
327";
328
329/// `FileDescriptorProto` object which was a source for this generated file
330fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
331    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
332    file_descriptor_proto_lazy.get(|| {
333        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
334    })
335}
336
337/// `FileDescriptor` object which allows dynamic access to files
338pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
339    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
340    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
341    file_descriptor.get(|| {
342        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
343            let mut deps = ::std::vec::Vec::with_capacity(2);
344            deps.push(super::vector3d::file_descriptor().clone());
345            deps.push(super::header::file_descriptor().clone());
346            let mut messages = ::std::vec::Vec::with_capacity(1);
347            messages.push(TrackVisual::generated_message_descriptor_data());
348            let mut enums = ::std::vec::Vec::with_capacity(0);
349            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
350                file_descriptor_proto(),
351                deps,
352                messages,
353                enums,
354            )
355        });
356        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
357    })
358}