gz_msgs/ign_msgs8/
rest_post.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::IgnMessage)]
28#[derive(PartialEq,Clone,Default,Debug)]
30pub struct RestPost {
31 pub header: ::protobuf::MessageField<super::header::Header>,
34 pub id: u32,
36 pub route: ::std::string::String,
38 pub json: ::std::string::String,
40 pub special_fields: ::protobuf::SpecialFields,
43}
44
45impl<'a> ::std::default::Default for &'a RestPost {
46 fn default() -> &'a RestPost {
47 <RestPost as ::protobuf::Message>::default_instance()
48 }
49}
50
51impl RestPost {
52 pub fn new() -> RestPost {
53 ::std::default::Default::default()
54 }
55
56 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
57 let mut fields = ::std::vec::Vec::with_capacity(4);
58 let mut oneofs = ::std::vec::Vec::with_capacity(0);
59 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
60 "header",
61 |m: &RestPost| { &m.header },
62 |m: &mut RestPost| { &mut m.header },
63 ));
64 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
65 "id",
66 |m: &RestPost| { &m.id },
67 |m: &mut RestPost| { &mut m.id },
68 ));
69 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
70 "route",
71 |m: &RestPost| { &m.route },
72 |m: &mut RestPost| { &mut m.route },
73 ));
74 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
75 "json",
76 |m: &RestPost| { &m.json },
77 |m: &mut RestPost| { &mut m.json },
78 ));
79 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RestPost>(
80 "RestPost",
81 fields,
82 oneofs,
83 )
84 }
85}
86
87impl ::protobuf::Message for RestPost {
88 const NAME: &'static str = "RestPost";
89
90 fn is_initialized(&self) -> bool {
91 true
92 }
93
94 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
95 while let Some(tag) = is.read_raw_tag_or_eof()? {
96 match tag {
97 10 => {
98 ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
99 },
100 16 => {
101 self.id = is.read_uint32()?;
102 },
103 26 => {
104 self.route = is.read_string()?;
105 },
106 34 => {
107 self.json = is.read_string()?;
108 },
109 tag => {
110 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
111 },
112 };
113 }
114 ::std::result::Result::Ok(())
115 }
116
117 #[allow(unused_variables)]
119 fn compute_size(&self) -> u64 {
120 let mut my_size = 0;
121 if let Some(v) = self.header.as_ref() {
122 let len = v.compute_size();
123 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
124 }
125 if self.id != 0 {
126 my_size += ::protobuf::rt::uint32_size(2, self.id);
127 }
128 if !self.route.is_empty() {
129 my_size += ::protobuf::rt::string_size(3, &self.route);
130 }
131 if !self.json.is_empty() {
132 my_size += ::protobuf::rt::string_size(4, &self.json);
133 }
134 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
135 self.special_fields.cached_size().set(my_size as u32);
136 my_size
137 }
138
139 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
140 if let Some(v) = self.header.as_ref() {
141 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
142 }
143 if self.id != 0 {
144 os.write_uint32(2, self.id)?;
145 }
146 if !self.route.is_empty() {
147 os.write_string(3, &self.route)?;
148 }
149 if !self.json.is_empty() {
150 os.write_string(4, &self.json)?;
151 }
152 os.write_unknown_fields(self.special_fields.unknown_fields())?;
153 ::std::result::Result::Ok(())
154 }
155
156 fn special_fields(&self) -> &::protobuf::SpecialFields {
157 &self.special_fields
158 }
159
160 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
161 &mut self.special_fields
162 }
163
164 fn new() -> RestPost {
165 RestPost::new()
166 }
167
168 fn clear(&mut self) {
169 self.header.clear();
170 self.id = 0;
171 self.route.clear();
172 self.json.clear();
173 self.special_fields.clear();
174 }
175
176 fn default_instance() -> &'static RestPost {
177 static instance: RestPost = RestPost {
178 header: ::protobuf::MessageField::none(),
179 id: 0,
180 route: ::std::string::String::new(),
181 json: ::std::string::String::new(),
182 special_fields: ::protobuf::SpecialFields::new(),
183 };
184 &instance
185 }
186}
187
188impl ::protobuf::MessageFull for RestPost {
189 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
190 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
191 descriptor.get(|| file_descriptor().message_by_package_relative_name("RestPost").unwrap()).clone()
192 }
193}
194
195impl ::std::fmt::Display for RestPost {
196 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
197 ::protobuf::text_format::fmt(self, f)
198 }
199}
200
201impl ::protobuf::reflect::ProtobufValue for RestPost {
202 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
203}
204
205static file_descriptor_proto_data: &'static [u8] = b"\
206 \n\x1dignition/msgs/rest_post.proto\x12\rignition.msgs\x1a\x1aignition/m\
207 sgs/header.proto\"s\n\x08RestPost\x12-\n\x06header\x18\x01\x20\x01(\x0b2\
208 \x15.ignition.msgs.HeaderR\x06header\x12\x0e\n\x02id\x18\x02\x20\x01(\rR\
209 \x02id\x12\x14\n\x05route\x18\x03\x20\x01(\tR\x05route\x12\x12\n\x04json\
210 \x18\x04\x20\x01(\tR\x04jsonB#\n\x11com.ignition.msgsB\x0eRestPostProtos\
211 b\x06proto3\
212";
213
214fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
216 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
217 file_descriptor_proto_lazy.get(|| {
218 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
219 })
220}
221
222pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
224 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
225 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
226 file_descriptor.get(|| {
227 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
228 let mut deps = ::std::vec::Vec::with_capacity(1);
229 deps.push(super::header::file_descriptor().clone());
230 let mut messages = ::std::vec::Vec::with_capacity(1);
231 messages.push(RestPost::generated_message_descriptor_data());
232 let mut enums = ::std::vec::Vec::with_capacity(0);
233 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
234 file_descriptor_proto(),
235 deps,
236 messages,
237 enums,
238 )
239 });
240 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
241 })
242}