1#![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
21const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(::gz_msgs_common::IgnMessage)]
28#[derive(PartialEq,Clone,Default,Debug)]
30pub struct UserCmd {
31 pub header: ::protobuf::MessageField<super::header::Header>,
34 pub id: u32,
36 pub description: ::std::string::String,
38 pub type_: ::protobuf::EnumOrUnknown<user_cmd::Type>,
40 pub model: ::std::vec::Vec<super::model::Model>,
42 pub light: ::std::vec::Vec<super::light::Light>,
44 pub entity_name: ::std::string::String,
46 pub world_control: ::protobuf::MessageField<super::world_control::WorldControl>,
48 pub wrench: ::protobuf::MessageField<super::wrench::Wrench>,
50 pub special_fields: ::protobuf::SpecialFields,
53}
54
55impl<'a> ::std::default::Default for &'a UserCmd {
56 fn default() -> &'a UserCmd {
57 <UserCmd as ::protobuf::Message>::default_instance()
58 }
59}
60
61impl UserCmd {
62 pub fn new() -> UserCmd {
63 ::std::default::Default::default()
64 }
65
66 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
67 let mut fields = ::std::vec::Vec::with_capacity(9);
68 let mut oneofs = ::std::vec::Vec::with_capacity(0);
69 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
70 "header",
71 |m: &UserCmd| { &m.header },
72 |m: &mut UserCmd| { &mut m.header },
73 ));
74 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
75 "id",
76 |m: &UserCmd| { &m.id },
77 |m: &mut UserCmd| { &mut m.id },
78 ));
79 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
80 "description",
81 |m: &UserCmd| { &m.description },
82 |m: &mut UserCmd| { &mut m.description },
83 ));
84 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
85 "type",
86 |m: &UserCmd| { &m.type_ },
87 |m: &mut UserCmd| { &mut m.type_ },
88 ));
89 fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
90 "model",
91 |m: &UserCmd| { &m.model },
92 |m: &mut UserCmd| { &mut m.model },
93 ));
94 fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
95 "light",
96 |m: &UserCmd| { &m.light },
97 |m: &mut UserCmd| { &mut m.light },
98 ));
99 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
100 "entity_name",
101 |m: &UserCmd| { &m.entity_name },
102 |m: &mut UserCmd| { &mut m.entity_name },
103 ));
104 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::world_control::WorldControl>(
105 "world_control",
106 |m: &UserCmd| { &m.world_control },
107 |m: &mut UserCmd| { &mut m.world_control },
108 ));
109 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::wrench::Wrench>(
110 "wrench",
111 |m: &UserCmd| { &m.wrench },
112 |m: &mut UserCmd| { &mut m.wrench },
113 ));
114 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<UserCmd>(
115 "UserCmd",
116 fields,
117 oneofs,
118 )
119 }
120}
121
122impl ::protobuf::Message for UserCmd {
123 const NAME: &'static str = "UserCmd";
124
125 fn is_initialized(&self) -> bool {
126 true
127 }
128
129 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
130 while let Some(tag) = is.read_raw_tag_or_eof()? {
131 match tag {
132 10 => {
133 ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
134 },
135 16 => {
136 self.id = is.read_uint32()?;
137 },
138 26 => {
139 self.description = is.read_string()?;
140 },
141 32 => {
142 self.type_ = is.read_enum_or_unknown()?;
143 },
144 42 => {
145 self.model.push(is.read_message()?);
146 },
147 50 => {
148 self.light.push(is.read_message()?);
149 },
150 58 => {
151 self.entity_name = is.read_string()?;
152 },
153 66 => {
154 ::protobuf::rt::read_singular_message_into_field(is, &mut self.world_control)?;
155 },
156 74 => {
157 ::protobuf::rt::read_singular_message_into_field(is, &mut self.wrench)?;
158 },
159 tag => {
160 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
161 },
162 };
163 }
164 ::std::result::Result::Ok(())
165 }
166
167 #[allow(unused_variables)]
169 fn compute_size(&self) -> u64 {
170 let mut my_size = 0;
171 if let Some(v) = self.header.as_ref() {
172 let len = v.compute_size();
173 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
174 }
175 if self.id != 0 {
176 my_size += ::protobuf::rt::uint32_size(2, self.id);
177 }
178 if !self.description.is_empty() {
179 my_size += ::protobuf::rt::string_size(3, &self.description);
180 }
181 if self.type_ != ::protobuf::EnumOrUnknown::new(user_cmd::Type::MOVING) {
182 my_size += ::protobuf::rt::int32_size(4, self.type_.value());
183 }
184 for value in &self.model {
185 let len = value.compute_size();
186 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
187 };
188 for value in &self.light {
189 let len = value.compute_size();
190 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
191 };
192 if !self.entity_name.is_empty() {
193 my_size += ::protobuf::rt::string_size(7, &self.entity_name);
194 }
195 if let Some(v) = self.world_control.as_ref() {
196 let len = v.compute_size();
197 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
198 }
199 if let Some(v) = self.wrench.as_ref() {
200 let len = v.compute_size();
201 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
202 }
203 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
204 self.special_fields.cached_size().set(my_size as u32);
205 my_size
206 }
207
208 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
209 if let Some(v) = self.header.as_ref() {
210 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
211 }
212 if self.id != 0 {
213 os.write_uint32(2, self.id)?;
214 }
215 if !self.description.is_empty() {
216 os.write_string(3, &self.description)?;
217 }
218 if self.type_ != ::protobuf::EnumOrUnknown::new(user_cmd::Type::MOVING) {
219 os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.type_))?;
220 }
221 for v in &self.model {
222 ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
223 };
224 for v in &self.light {
225 ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
226 };
227 if !self.entity_name.is_empty() {
228 os.write_string(7, &self.entity_name)?;
229 }
230 if let Some(v) = self.world_control.as_ref() {
231 ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
232 }
233 if let Some(v) = self.wrench.as_ref() {
234 ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
235 }
236 os.write_unknown_fields(self.special_fields.unknown_fields())?;
237 ::std::result::Result::Ok(())
238 }
239
240 fn special_fields(&self) -> &::protobuf::SpecialFields {
241 &self.special_fields
242 }
243
244 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
245 &mut self.special_fields
246 }
247
248 fn new() -> UserCmd {
249 UserCmd::new()
250 }
251
252 fn clear(&mut self) {
253 self.header.clear();
254 self.id = 0;
255 self.description.clear();
256 self.type_ = ::protobuf::EnumOrUnknown::new(user_cmd::Type::MOVING);
257 self.model.clear();
258 self.light.clear();
259 self.entity_name.clear();
260 self.world_control.clear();
261 self.wrench.clear();
262 self.special_fields.clear();
263 }
264
265 fn default_instance() -> &'static UserCmd {
266 static instance: UserCmd = UserCmd {
267 header: ::protobuf::MessageField::none(),
268 id: 0,
269 description: ::std::string::String::new(),
270 type_: ::protobuf::EnumOrUnknown::from_i32(0),
271 model: ::std::vec::Vec::new(),
272 light: ::std::vec::Vec::new(),
273 entity_name: ::std::string::String::new(),
274 world_control: ::protobuf::MessageField::none(),
275 wrench: ::protobuf::MessageField::none(),
276 special_fields: ::protobuf::SpecialFields::new(),
277 };
278 &instance
279 }
280}
281
282impl ::protobuf::MessageFull for UserCmd {
283 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
284 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
285 descriptor.get(|| file_descriptor().message_by_package_relative_name("UserCmd").unwrap()).clone()
286 }
287}
288
289impl ::std::fmt::Display for UserCmd {
290 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
291 ::protobuf::text_format::fmt(self, f)
292 }
293}
294
295impl ::protobuf::reflect::ProtobufValue for UserCmd {
296 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
297}
298
299pub mod user_cmd {
301 #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
302 pub enum Type {
304 MOVING = 0,
306 WORLD_CONTROL = 1,
308 WRENCH = 2,
310 SCALING = 3,
312 }
313
314 impl ::protobuf::Enum for Type {
315 const NAME: &'static str = "Type";
316
317 fn value(&self) -> i32 {
318 *self as i32
319 }
320
321 fn from_i32(value: i32) -> ::std::option::Option<Type> {
322 match value {
323 0 => ::std::option::Option::Some(Type::MOVING),
324 1 => ::std::option::Option::Some(Type::WORLD_CONTROL),
325 2 => ::std::option::Option::Some(Type::WRENCH),
326 3 => ::std::option::Option::Some(Type::SCALING),
327 _ => ::std::option::Option::None
328 }
329 }
330
331 fn from_str(str: &str) -> ::std::option::Option<Type> {
332 match str {
333 "MOVING" => ::std::option::Option::Some(Type::MOVING),
334 "WORLD_CONTROL" => ::std::option::Option::Some(Type::WORLD_CONTROL),
335 "WRENCH" => ::std::option::Option::Some(Type::WRENCH),
336 "SCALING" => ::std::option::Option::Some(Type::SCALING),
337 _ => ::std::option::Option::None
338 }
339 }
340
341 const VALUES: &'static [Type] = &[
342 Type::MOVING,
343 Type::WORLD_CONTROL,
344 Type::WRENCH,
345 Type::SCALING,
346 ];
347 }
348
349 impl ::protobuf::EnumFull for Type {
350 fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
351 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
352 descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("UserCmd.Type").unwrap()).clone()
353 }
354
355 fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
356 let index = *self as usize;
357 Self::enum_descriptor().value_by_index(index)
358 }
359 }
360
361 impl ::std::default::Default for Type {
362 fn default() -> Self {
363 Type::MOVING
364 }
365 }
366
367 impl Type {
368 pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
369 ::protobuf::reflect::GeneratedEnumDescriptorData::new::<Type>("UserCmd.Type")
370 }
371 }
372}
373
374static file_descriptor_proto_data: &'static [u8] = b"\
375 \n\x1cignition/msgs/user_cmd.proto\x12\rignition.msgs\x1a\x19ignition/ms\
376 gs/light.proto\x1a\x19ignition/msgs/model.proto\x1a!ignition/msgs/world_\
377 control.proto\x1a\x1aignition/msgs/wrench.proto\x1a\x1aignition/msgs/hea\
378 der.proto\"\xc5\x03\n\x07UserCmd\x12-\n\x06header\x18\x01\x20\x01(\x0b2\
379 \x15.ignition.msgs.HeaderR\x06header\x12\x0e\n\x02id\x18\x02\x20\x01(\rR\
380 \x02id\x12\x20\n\x0bdescription\x18\x03\x20\x01(\tR\x0bdescription\x12/\
381 \n\x04type\x18\x04\x20\x01(\x0e2\x1b.ignition.msgs.UserCmd.TypeR\x04type\
382 \x12*\n\x05model\x18\x05\x20\x03(\x0b2\x14.ignition.msgs.ModelR\x05model\
383 \x12*\n\x05light\x18\x06\x20\x03(\x0b2\x14.ignition.msgs.LightR\x05light\
384 \x12\x1f\n\x0bentity_name\x18\x07\x20\x01(\tR\nentityName\x12@\n\rworld_\
385 control\x18\x08\x20\x01(\x0b2\x1b.ignition.msgs.WorldControlR\x0cworldCo\
386 ntrol\x12-\n\x06wrench\x18\t\x20\x01(\x0b2\x15.ignition.msgs.WrenchR\x06\
387 wrench\">\n\x04Type\x12\n\n\x06MOVING\x10\0\x12\x11\n\rWORLD_CONTROL\x10\
388 \x01\x12\n\n\x06WRENCH\x10\x02\x12\x0b\n\x07SCALING\x10\x03B\"\n\x11com.\
389 ignition.msgsB\rUserCmdProtosb\x06proto3\
390";
391
392fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
394 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
395 file_descriptor_proto_lazy.get(|| {
396 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
397 })
398}
399
400pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
402 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
403 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
404 file_descriptor.get(|| {
405 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
406 let mut deps = ::std::vec::Vec::with_capacity(5);
407 deps.push(super::light::file_descriptor().clone());
408 deps.push(super::model::file_descriptor().clone());
409 deps.push(super::world_control::file_descriptor().clone());
410 deps.push(super::wrench::file_descriptor().clone());
411 deps.push(super::header::file_descriptor().clone());
412 let mut messages = ::std::vec::Vec::with_capacity(1);
413 messages.push(UserCmd::generated_message_descriptor_data());
414 let mut enums = ::std::vec::Vec::with_capacity(1);
415 enums.push(user_cmd::Type::generated_enum_descriptor_data());
416 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
417 file_descriptor_proto(),
418 deps,
419 messages,
420 enums,
421 )
422 });
423 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
424 })
425}