kplayer_rust_wrap/kplayer/proto/
message.rs1#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![allow(unused_attributes)]
9#![cfg_attr(rustfmt, rustfmt::skip)]
10
11#![allow(box_pointers)]
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_imports)]
19#![allow(unused_results)]
20#[derive(PartialEq,Clone,Default)]
27pub struct KPMessage {
28 pub action: super::keys::EventMessageAction,
30 pub body: ::std::string::String,
31 pub unknown_fields: ::protobuf::UnknownFields,
33 pub cached_size: ::protobuf::CachedSize,
34}
35
36impl<'a> ::std::default::Default for &'a KPMessage {
37 fn default() -> &'a KPMessage {
38 <KPMessage as ::protobuf::Message>::default_instance()
39 }
40}
41
42impl KPMessage {
43 pub fn new() -> KPMessage {
44 ::std::default::Default::default()
45 }
46
47 pub fn get_action(&self) -> super::keys::EventMessageAction {
51 self.action
52 }
53 pub fn clear_action(&mut self) {
54 self.action = super::keys::EventMessageAction::EVENT_MESSAGE_ACTION_PLAYER_STARTED;
55 }
56
57 pub fn set_action(&mut self, v: super::keys::EventMessageAction) {
59 self.action = v;
60 }
61
62 pub fn get_body(&self) -> &str {
66 &self.body
67 }
68 pub fn clear_body(&mut self) {
69 self.body.clear();
70 }
71
72 pub fn set_body(&mut self, v: ::std::string::String) {
74 self.body = v;
75 }
76
77 pub fn mut_body(&mut self) -> &mut ::std::string::String {
80 &mut self.body
81 }
82
83 pub fn take_body(&mut self) -> ::std::string::String {
85 ::std::mem::replace(&mut self.body, ::std::string::String::new())
86 }
87}
88
89impl ::protobuf::Message for KPMessage {
90 fn is_initialized(&self) -> bool {
91 true
92 }
93
94 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
95 while !is.eof()? {
96 let (field_number, wire_type) = is.read_tag_unpack()?;
97 match field_number {
98 1 => {
99 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.action, 1, &mut self.unknown_fields)?
100 },
101 2 => {
102 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.body)?;
103 },
104 _ => {
105 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
106 },
107 };
108 }
109 ::std::result::Result::Ok(())
110 }
111
112 #[allow(unused_variables)]
114 fn compute_size(&self) -> u32 {
115 let mut my_size = 0;
116 if self.action != super::keys::EventMessageAction::EVENT_MESSAGE_ACTION_PLAYER_STARTED {
117 my_size += ::protobuf::rt::enum_size(1, self.action);
118 }
119 if !self.body.is_empty() {
120 my_size += ::protobuf::rt::string_size(2, &self.body);
121 }
122 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
123 self.cached_size.set(my_size);
124 my_size
125 }
126
127 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
128 if self.action != super::keys::EventMessageAction::EVENT_MESSAGE_ACTION_PLAYER_STARTED {
129 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.action))?;
130 }
131 if !self.body.is_empty() {
132 os.write_string(2, &self.body)?;
133 }
134 os.write_unknown_fields(self.get_unknown_fields())?;
135 ::std::result::Result::Ok(())
136 }
137
138 fn get_cached_size(&self) -> u32 {
139 self.cached_size.get()
140 }
141
142 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
143 &self.unknown_fields
144 }
145
146 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
147 &mut self.unknown_fields
148 }
149
150 fn as_any(&self) -> &dyn (::std::any::Any) {
151 self as &dyn (::std::any::Any)
152 }
153 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
154 self as &mut dyn (::std::any::Any)
155 }
156 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
157 self
158 }
159
160 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
161 Self::descriptor_static()
162 }
163
164 fn new() -> KPMessage {
165 KPMessage::new()
166 }
167
168 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
169 static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
170 descriptor.get(|| {
171 let mut fields = ::std::vec::Vec::new();
172 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::keys::EventMessageAction>>(
173 "action",
174 |m: &KPMessage| { &m.action },
175 |m: &mut KPMessage| { &mut m.action },
176 ));
177 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
178 "body",
179 |m: &KPMessage| { &m.body },
180 |m: &mut KPMessage| { &mut m.body },
181 ));
182 ::protobuf::reflect::MessageDescriptor::new_pb_name::<KPMessage>(
183 "KPMessage",
184 fields,
185 file_descriptor_proto()
186 )
187 })
188 }
189
190 fn default_instance() -> &'static KPMessage {
191 static instance: ::protobuf::rt::LazyV2<KPMessage> = ::protobuf::rt::LazyV2::INIT;
192 instance.get(KPMessage::new)
193 }
194}
195
196impl ::protobuf::Clear for KPMessage {
197 fn clear(&mut self) {
198 self.action = super::keys::EventMessageAction::EVENT_MESSAGE_ACTION_PLAYER_STARTED;
199 self.body.clear();
200 self.unknown_fields.clear();
201 }
202}
203
204impl ::std::fmt::Debug for KPMessage {
205 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
206 ::protobuf::text_format::fmt(self, f)
207 }
208}
209
210impl ::protobuf::reflect::ProtobufValue for KPMessage {
211 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
212 ::protobuf::reflect::ReflectValueRef::Message(self)
213 }
214}
215
216#[derive(PartialEq,Clone,Default)]
217pub struct KPPrompt {
218 pub action: super::keys::EventPromptAction,
220 pub body: ::std::string::String,
221 pub unknown_fields: ::protobuf::UnknownFields,
223 pub cached_size: ::protobuf::CachedSize,
224}
225
226impl<'a> ::std::default::Default for &'a KPPrompt {
227 fn default() -> &'a KPPrompt {
228 <KPPrompt as ::protobuf::Message>::default_instance()
229 }
230}
231
232impl KPPrompt {
233 pub fn new() -> KPPrompt {
234 ::std::default::Default::default()
235 }
236
237 pub fn get_action(&self) -> super::keys::EventPromptAction {
241 self.action
242 }
243 pub fn clear_action(&mut self) {
244 self.action = super::keys::EventPromptAction::EVENT_PROMPT_ACTION_PLAYER_STOP;
245 }
246
247 pub fn set_action(&mut self, v: super::keys::EventPromptAction) {
249 self.action = v;
250 }
251
252 pub fn get_body(&self) -> &str {
256 &self.body
257 }
258 pub fn clear_body(&mut self) {
259 self.body.clear();
260 }
261
262 pub fn set_body(&mut self, v: ::std::string::String) {
264 self.body = v;
265 }
266
267 pub fn mut_body(&mut self) -> &mut ::std::string::String {
270 &mut self.body
271 }
272
273 pub fn take_body(&mut self) -> ::std::string::String {
275 ::std::mem::replace(&mut self.body, ::std::string::String::new())
276 }
277}
278
279impl ::protobuf::Message for KPPrompt {
280 fn is_initialized(&self) -> bool {
281 true
282 }
283
284 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
285 while !is.eof()? {
286 let (field_number, wire_type) = is.read_tag_unpack()?;
287 match field_number {
288 1 => {
289 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.action, 1, &mut self.unknown_fields)?
290 },
291 2 => {
292 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.body)?;
293 },
294 _ => {
295 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
296 },
297 };
298 }
299 ::std::result::Result::Ok(())
300 }
301
302 #[allow(unused_variables)]
304 fn compute_size(&self) -> u32 {
305 let mut my_size = 0;
306 if self.action != super::keys::EventPromptAction::EVENT_PROMPT_ACTION_PLAYER_STOP {
307 my_size += ::protobuf::rt::enum_size(1, self.action);
308 }
309 if !self.body.is_empty() {
310 my_size += ::protobuf::rt::string_size(2, &self.body);
311 }
312 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
313 self.cached_size.set(my_size);
314 my_size
315 }
316
317 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
318 if self.action != super::keys::EventPromptAction::EVENT_PROMPT_ACTION_PLAYER_STOP {
319 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.action))?;
320 }
321 if !self.body.is_empty() {
322 os.write_string(2, &self.body)?;
323 }
324 os.write_unknown_fields(self.get_unknown_fields())?;
325 ::std::result::Result::Ok(())
326 }
327
328 fn get_cached_size(&self) -> u32 {
329 self.cached_size.get()
330 }
331
332 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
333 &self.unknown_fields
334 }
335
336 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
337 &mut self.unknown_fields
338 }
339
340 fn as_any(&self) -> &dyn (::std::any::Any) {
341 self as &dyn (::std::any::Any)
342 }
343 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
344 self as &mut dyn (::std::any::Any)
345 }
346 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
347 self
348 }
349
350 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
351 Self::descriptor_static()
352 }
353
354 fn new() -> KPPrompt {
355 KPPrompt::new()
356 }
357
358 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
359 static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
360 descriptor.get(|| {
361 let mut fields = ::std::vec::Vec::new();
362 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::keys::EventPromptAction>>(
363 "action",
364 |m: &KPPrompt| { &m.action },
365 |m: &mut KPPrompt| { &mut m.action },
366 ));
367 fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
368 "body",
369 |m: &KPPrompt| { &m.body },
370 |m: &mut KPPrompt| { &mut m.body },
371 ));
372 ::protobuf::reflect::MessageDescriptor::new_pb_name::<KPPrompt>(
373 "KPPrompt",
374 fields,
375 file_descriptor_proto()
376 )
377 })
378 }
379
380 fn default_instance() -> &'static KPPrompt {
381 static instance: ::protobuf::rt::LazyV2<KPPrompt> = ::protobuf::rt::LazyV2::INIT;
382 instance.get(KPPrompt::new)
383 }
384}
385
386impl ::protobuf::Clear for KPPrompt {
387 fn clear(&mut self) {
388 self.action = super::keys::EventPromptAction::EVENT_PROMPT_ACTION_PLAYER_STOP;
389 self.body.clear();
390 self.unknown_fields.clear();
391 }
392}
393
394impl ::std::fmt::Debug for KPPrompt {
395 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
396 ::protobuf::text_format::fmt(self, f)
397 }
398}
399
400impl ::protobuf::reflect::ProtobufValue for KPPrompt {
401 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
402 ::protobuf::reflect::ReflectValueRef::Message(self)
403 }
404}
405
406static file_descriptor_proto_data: &'static [u8] = b"\
407 \n\x13proto/message.proto\x12\x07KPProto\x1a\x10proto/keys.proto\"T\n\tK\
408 PMessage\x123\n\x06action\x18\x01\x20\x01(\x0e2\x1b.KPProto.EventMessage\
409 ActionR\x06action\x12\x12\n\x04body\x18\x02\x20\x01(\tR\x04body\"R\n\x08\
410 KPPrompt\x122\n\x06action\x18\x01\x20\x01(\x0e2\x1a.KPProto.EventPromptA\
411 ctionR\x06action\x12\x12\n\x04body\x18\x02\x20\x01(\tR\x04bodyB.Z,github\
412 .com/bytelang/kplayer/types/core/protoJ\xc8\x02\n\x06\x12\x04\0\0\x10\
413 \x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x02\0\x10\n\
414 \t\n\x02\x03\0\x12\x03\x04\0\x1a\n\x08\n\x01\x08\x12\x03\x06\0C\n\t\n\
415 \x02\x08\x0b\x12\x03\x06\0C\n\n\n\x02\x04\0\x12\x04\x08\0\x0b\x01\n\n\n\
416 \x03\x04\0\x01\x12\x03\x08\x08\x11\n\x0b\n\x04\x04\0\x02\0\x12\x03\t\x02\
417 \x20\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\t\x02\x14\n\x0c\n\x05\x04\0\x02\
418 \0\x01\x12\x03\t\x15\x1b\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\t\x1e\x1f\n\
419 \x0b\n\x04\x04\0\x02\x01\x12\x03\n\x02\x12\n\x0c\n\x05\x04\0\x02\x01\x05\
420 \x12\x03\n\x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\n\t\r\n\x0c\n\
421 \x05\x04\0\x02\x01\x03\x12\x03\n\x10\x11\n\n\n\x02\x04\x01\x12\x04\r\0\
422 \x10\x01\n\n\n\x03\x04\x01\x01\x12\x03\r\x08\x10\n\x0b\n\x04\x04\x01\x02\
423 \0\x12\x03\x0e\x02\x1f\n\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x0e\x02\x13\
424 \n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x0e\x14\x1a\n\x0c\n\x05\x04\x01\
425 \x02\0\x03\x12\x03\x0e\x1d\x1e\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x0f\
426 \x02\x12\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x0f\x02\x08\n\x0c\n\x05\
427 \x04\x01\x02\x01\x01\x12\x03\x0f\t\r\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\
428 \x03\x0f\x10\x11b\x06proto3\
429";
430
431static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
432
433fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
434 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
435}
436
437pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
438 file_descriptor_proto_lazy.get(|| {
439 parse_descriptor_proto()
440 })
441}