gz_msgs/gz_msgs11/
subscribe.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 Subscribe {
31 pub header: ::protobuf::MessageField<super::header::Header>,
34 pub topic: ::std::string::String,
36 pub host: ::std::string::String,
38 pub port: u32,
40 pub msg_type: ::std::string::String,
42 pub latching: bool,
44 pub special_fields: ::protobuf::SpecialFields,
47}
48
49impl<'a> ::std::default::Default for &'a Subscribe {
50 fn default() -> &'a Subscribe {
51 <Subscribe as ::protobuf::Message>::default_instance()
52 }
53}
54
55impl Subscribe {
56 pub fn new() -> Subscribe {
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: &Subscribe| { &m.header },
66 |m: &mut Subscribe| { &mut m.header },
67 ));
68 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
69 "topic",
70 |m: &Subscribe| { &m.topic },
71 |m: &mut Subscribe| { &mut m.topic },
72 ));
73 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
74 "host",
75 |m: &Subscribe| { &m.host },
76 |m: &mut Subscribe| { &mut m.host },
77 ));
78 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
79 "port",
80 |m: &Subscribe| { &m.port },
81 |m: &mut Subscribe| { &mut m.port },
82 ));
83 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
84 "msg_type",
85 |m: &Subscribe| { &m.msg_type },
86 |m: &mut Subscribe| { &mut m.msg_type },
87 ));
88 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
89 "latching",
90 |m: &Subscribe| { &m.latching },
91 |m: &mut Subscribe| { &mut m.latching },
92 ));
93 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Subscribe>(
94 "Subscribe",
95 fields,
96 oneofs,
97 )
98 }
99}
100
101impl ::protobuf::Message for Subscribe {
102 const NAME: &'static str = "Subscribe";
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 self.topic = is.read_string()?;
116 },
117 26 => {
118 self.host = is.read_string()?;
119 },
120 32 => {
121 self.port = is.read_uint32()?;
122 },
123 42 => {
124 self.msg_type = is.read_string()?;
125 },
126 48 => {
127 self.latching = is.read_bool()?;
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 #[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.topic.is_empty() {
146 my_size += ::protobuf::rt::string_size(2, &self.topic);
147 }
148 if !self.host.is_empty() {
149 my_size += ::protobuf::rt::string_size(3, &self.host);
150 }
151 if self.port != 0 {
152 my_size += ::protobuf::rt::uint32_size(4, self.port);
153 }
154 if !self.msg_type.is_empty() {
155 my_size += ::protobuf::rt::string_size(5, &self.msg_type);
156 }
157 if self.latching != false {
158 my_size += 1 + 1;
159 }
160 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
161 self.special_fields.cached_size().set(my_size as u32);
162 my_size
163 }
164
165 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
166 if let Some(v) = self.header.as_ref() {
167 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
168 }
169 if !self.topic.is_empty() {
170 os.write_string(2, &self.topic)?;
171 }
172 if !self.host.is_empty() {
173 os.write_string(3, &self.host)?;
174 }
175 if self.port != 0 {
176 os.write_uint32(4, self.port)?;
177 }
178 if !self.msg_type.is_empty() {
179 os.write_string(5, &self.msg_type)?;
180 }
181 if self.latching != false {
182 os.write_bool(6, self.latching)?;
183 }
184 os.write_unknown_fields(self.special_fields.unknown_fields())?;
185 ::std::result::Result::Ok(())
186 }
187
188 fn special_fields(&self) -> &::protobuf::SpecialFields {
189 &self.special_fields
190 }
191
192 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
193 &mut self.special_fields
194 }
195
196 fn new() -> Subscribe {
197 Subscribe::new()
198 }
199
200 fn clear(&mut self) {
201 self.header.clear();
202 self.topic.clear();
203 self.host.clear();
204 self.port = 0;
205 self.msg_type.clear();
206 self.latching = false;
207 self.special_fields.clear();
208 }
209
210 fn default_instance() -> &'static Subscribe {
211 static instance: Subscribe = Subscribe {
212 header: ::protobuf::MessageField::none(),
213 topic: ::std::string::String::new(),
214 host: ::std::string::String::new(),
215 port: 0,
216 msg_type: ::std::string::String::new(),
217 latching: false,
218 special_fields: ::protobuf::SpecialFields::new(),
219 };
220 &instance
221 }
222}
223
224impl ::protobuf::MessageFull for Subscribe {
225 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
226 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
227 descriptor.get(|| file_descriptor().message_by_package_relative_name("Subscribe").unwrap()).clone()
228 }
229}
230
231impl ::std::fmt::Display for Subscribe {
232 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
233 ::protobuf::text_format::fmt(self, f)
234 }
235}
236
237impl ::protobuf::reflect::ProtobufValue for Subscribe {
238 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
239}
240
241static file_descriptor_proto_data: &'static [u8] = b"\
242 \n\x17gz/msgs/subscribe.proto\x12\x07gz.msgs\x1a\x14gz/msgs/header.proto\
243 \"\xa9\x01\n\tSubscribe\x12'\n\x06header\x18\x01\x20\x01(\x0b2\x0f.gz.ms\
244 gs.HeaderR\x06header\x12\x14\n\x05topic\x18\x02\x20\x01(\tR\x05topic\x12\
245 \x12\n\x04host\x18\x03\x20\x01(\tR\x04host\x12\x12\n\x04port\x18\x04\x20\
246 \x01(\rR\x04port\x12\x19\n\x08msg_type\x18\x05\x20\x01(\tR\x07msgType\
247 \x12\x1a\n\x08latching\x18\x06\x20\x01(\x08R\x08latchingB\x1e\n\x0bcom.g\
248 z.msgsB\x0fSubscribeProtosb\x06proto3\
249";
250
251fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
253 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
254 file_descriptor_proto_lazy.get(|| {
255 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
256 })
257}
258
259pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
261 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
262 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
263 file_descriptor.get(|| {
264 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
265 let mut deps = ::std::vec::Vec::with_capacity(1);
266 deps.push(super::header::file_descriptor().clone());
267 let mut messages = ::std::vec::Vec::with_capacity(1);
268 messages.push(Subscribe::generated_message_descriptor_data());
269 let mut enums = ::std::vec::Vec::with_capacity(0);
270 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
271 file_descriptor_proto(),
272 deps,
273 messages,
274 enums,
275 )
276 });
277 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
278 })
279}