gz_msgs/gz_msgs9/
model_configuration.rs1#![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::GzMessage)]
28#[derive(PartialEq,Clone,Default,Debug)]
30pub struct ModelConfiguration {
31 pub header: ::protobuf::MessageField<super::header::Header>,
34 pub time: ::protobuf::MessageField<super::time::Time>,
36 pub joint_names: ::std::vec::Vec<::std::string::String>,
38 pub joint_positions: ::std::vec::Vec<f64>,
40 pub pose: ::protobuf::MessageField<super::pose::Pose>,
42 pub link_name: ::std::string::String,
44 pub special_fields: ::protobuf::SpecialFields,
47}
48
49impl<'a> ::std::default::Default for &'a ModelConfiguration {
50 fn default() -> &'a ModelConfiguration {
51 <ModelConfiguration as ::protobuf::Message>::default_instance()
52 }
53}
54
55impl ModelConfiguration {
56 pub fn new() -> ModelConfiguration {
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: &ModelConfiguration| { &m.header },
66 |m: &mut ModelConfiguration| { &mut m.header },
67 ));
68 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::time::Time>(
69 "time",
70 |m: &ModelConfiguration| { &m.time },
71 |m: &mut ModelConfiguration| { &mut m.time },
72 ));
73 fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
74 "joint_names",
75 |m: &ModelConfiguration| { &m.joint_names },
76 |m: &mut ModelConfiguration| { &mut m.joint_names },
77 ));
78 fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
79 "joint_positions",
80 |m: &ModelConfiguration| { &m.joint_positions },
81 |m: &mut ModelConfiguration| { &mut m.joint_positions },
82 ));
83 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::pose::Pose>(
84 "pose",
85 |m: &ModelConfiguration| { &m.pose },
86 |m: &mut ModelConfiguration| { &mut m.pose },
87 ));
88 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
89 "link_name",
90 |m: &ModelConfiguration| { &m.link_name },
91 |m: &mut ModelConfiguration| { &mut m.link_name },
92 ));
93 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ModelConfiguration>(
94 "ModelConfiguration",
95 fields,
96 oneofs,
97 )
98 }
99}
100
101impl ::protobuf::Message for ModelConfiguration {
102 const NAME: &'static str = "ModelConfiguration";
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 18 => {
115 ::protobuf::rt::read_singular_message_into_field(is, &mut self.time)?;
116 },
117 26 => {
118 self.joint_names.push(is.read_string()?);
119 },
120 34 => {
121 is.read_repeated_packed_double_into(&mut self.joint_positions)?;
122 },
123 33 => {
124 self.joint_positions.push(is.read_double()?);
125 },
126 42 => {
127 ::protobuf::rt::read_singular_message_into_field(is, &mut self.pose)?;
128 },
129 50 => {
130 self.link_name = is.read_string()?;
131 },
132 tag => {
133 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
134 },
135 };
136 }
137 ::std::result::Result::Ok(())
138 }
139
140 #[allow(unused_variables)]
142 fn compute_size(&self) -> u64 {
143 let mut my_size = 0;
144 if let Some(v) = self.header.as_ref() {
145 let len = v.compute_size();
146 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
147 }
148 if let Some(v) = self.time.as_ref() {
149 let len = v.compute_size();
150 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
151 }
152 for value in &self.joint_names {
153 my_size += ::protobuf::rt::string_size(3, &value);
154 };
155 my_size += ::protobuf::rt::vec_packed_double_size(4, &self.joint_positions);
156 if let Some(v) = self.pose.as_ref() {
157 let len = v.compute_size();
158 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
159 }
160 if !self.link_name.is_empty() {
161 my_size += ::protobuf::rt::string_size(6, &self.link_name);
162 }
163 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
164 self.special_fields.cached_size().set(my_size as u32);
165 my_size
166 }
167
168 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
169 if let Some(v) = self.header.as_ref() {
170 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
171 }
172 if let Some(v) = self.time.as_ref() {
173 ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
174 }
175 for v in &self.joint_names {
176 os.write_string(3, &v)?;
177 };
178 os.write_repeated_packed_double(4, &self.joint_positions)?;
179 if let Some(v) = self.pose.as_ref() {
180 ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
181 }
182 if !self.link_name.is_empty() {
183 os.write_string(6, &self.link_name)?;
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() -> ModelConfiguration {
198 ModelConfiguration::new()
199 }
200
201 fn clear(&mut self) {
202 self.header.clear();
203 self.time.clear();
204 self.joint_names.clear();
205 self.joint_positions.clear();
206 self.pose.clear();
207 self.link_name.clear();
208 self.special_fields.clear();
209 }
210
211 fn default_instance() -> &'static ModelConfiguration {
212 static instance: ModelConfiguration = ModelConfiguration {
213 header: ::protobuf::MessageField::none(),
214 time: ::protobuf::MessageField::none(),
215 joint_names: ::std::vec::Vec::new(),
216 joint_positions: ::std::vec::Vec::new(),
217 pose: ::protobuf::MessageField::none(),
218 link_name: ::std::string::String::new(),
219 special_fields: ::protobuf::SpecialFields::new(),
220 };
221 &instance
222 }
223}
224
225impl ::protobuf::MessageFull for ModelConfiguration {
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("ModelConfiguration").unwrap()).clone()
229 }
230}
231
232impl ::std::fmt::Display for ModelConfiguration {
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 ModelConfiguration {
239 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
240}
241
242static file_descriptor_proto_data: &'static [u8] = b"\
243 \n!gz/msgs/model_configuration.proto\x12\x07gz.msgs\x1a\x12gz/msgs/time.\
244 proto\x1a\x12gz/msgs/pose.proto\x1a\x14gz/msgs/header.proto\"\xea\x01\n\
245 \x12ModelConfiguration\x12'\n\x06header\x18\x01\x20\x01(\x0b2\x0f.gz.msg\
246 s.HeaderR\x06header\x12!\n\x04time\x18\x02\x20\x01(\x0b2\r.gz.msgs.TimeR\
247 \x04time\x12\x1f\n\x0bjoint_names\x18\x03\x20\x03(\tR\njointNames\x12'\n\
248 \x0fjoint_positions\x18\x04\x20\x03(\x01R\x0ejointPositions\x12!\n\x04po\
249 se\x18\x05\x20\x01(\x0b2\r.gz.msgs.PoseR\x04pose\x12\x1b\n\tlink_name\
250 \x18\x06\x20\x01(\tR\x08linkNameB'\n\x0bcom.gz.msgsB\x18ModelConfigurati\
251 onProtosb\x06proto3\
252";
253
254fn 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
262pub 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(3);
269 deps.push(super::time::file_descriptor().clone());
270 deps.push(super::pose::file_descriptor().clone());
271 deps.push(super::header::file_descriptor().clone());
272 let mut messages = ::std::vec::Vec::with_capacity(1);
273 messages.push(ModelConfiguration::generated_message_descriptor_data());
274 let mut enums = ::std::vec::Vec::with_capacity(0);
275 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
276 file_descriptor_proto(),
277 deps,
278 messages,
279 enums,
280 )
281 });
282 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
283 })
284}