gz_msgs/gz_msgs10/
log_control.rs

1// This file is generated by rust-protobuf 3.7.2. Do not edit
2// .proto file is parsed by protoc 3.21.12
3// @generated
4
5// https://github.com/rust-lang/rust-clippy/issues/702
6#![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
21//! Generated file from `gz/msgs/log_control.proto`
22
23/// Generated files are compatible only with the same version
24/// of protobuf runtime.
25const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(::gz_msgs_common::GzMessage)]
28// @@protoc_insertion_point(message:gz.msgs.LogControl)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct LogControl {
31    // message fields
32    // @@protoc_insertion_point(field:gz.msgs.LogControl.header)
33    pub header: ::protobuf::MessageField<super::header::Header>,
34    // @@protoc_insertion_point(field:gz.msgs.LogControl.start)
35    pub start: bool,
36    // @@protoc_insertion_point(field:gz.msgs.LogControl.stop)
37    pub stop: bool,
38    // @@protoc_insertion_point(field:gz.msgs.LogControl.paused)
39    pub paused: bool,
40    // @@protoc_insertion_point(field:gz.msgs.LogControl.base_path)
41    pub base_path: ::std::string::String,
42    // @@protoc_insertion_point(field:gz.msgs.LogControl.encoding)
43    pub encoding: ::std::string::String,
44    // @@protoc_insertion_point(field:gz.msgs.LogControl.record_resources)
45    pub record_resources: ::std::string::String,
46    // special fields
47    // @@protoc_insertion_point(special_field:gz.msgs.LogControl.special_fields)
48    pub special_fields: ::protobuf::SpecialFields,
49}
50
51impl<'a> ::std::default::Default for &'a LogControl {
52    fn default() -> &'a LogControl {
53        <LogControl as ::protobuf::Message>::default_instance()
54    }
55}
56
57impl LogControl {
58    pub fn new() -> LogControl {
59        ::std::default::Default::default()
60    }
61
62    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
63        let mut fields = ::std::vec::Vec::with_capacity(7);
64        let mut oneofs = ::std::vec::Vec::with_capacity(0);
65        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
66            "header",
67            |m: &LogControl| { &m.header },
68            |m: &mut LogControl| { &mut m.header },
69        ));
70        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
71            "start",
72            |m: &LogControl| { &m.start },
73            |m: &mut LogControl| { &mut m.start },
74        ));
75        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
76            "stop",
77            |m: &LogControl| { &m.stop },
78            |m: &mut LogControl| { &mut m.stop },
79        ));
80        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
81            "paused",
82            |m: &LogControl| { &m.paused },
83            |m: &mut LogControl| { &mut m.paused },
84        ));
85        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
86            "base_path",
87            |m: &LogControl| { &m.base_path },
88            |m: &mut LogControl| { &mut m.base_path },
89        ));
90        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
91            "encoding",
92            |m: &LogControl| { &m.encoding },
93            |m: &mut LogControl| { &mut m.encoding },
94        ));
95        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
96            "record_resources",
97            |m: &LogControl| { &m.record_resources },
98            |m: &mut LogControl| { &mut m.record_resources },
99        ));
100        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<LogControl>(
101            "LogControl",
102            fields,
103            oneofs,
104        )
105    }
106}
107
108impl ::protobuf::Message for LogControl {
109    const NAME: &'static str = "LogControl";
110
111    fn is_initialized(&self) -> bool {
112        true
113    }
114
115    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
116        while let Some(tag) = is.read_raw_tag_or_eof()? {
117            match tag {
118                10 => {
119                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
120                },
121                16 => {
122                    self.start = is.read_bool()?;
123                },
124                24 => {
125                    self.stop = is.read_bool()?;
126                },
127                32 => {
128                    self.paused = is.read_bool()?;
129                },
130                42 => {
131                    self.base_path = is.read_string()?;
132                },
133                50 => {
134                    self.encoding = is.read_string()?;
135                },
136                58 => {
137                    self.record_resources = is.read_string()?;
138                },
139                tag => {
140                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
141                },
142            };
143        }
144        ::std::result::Result::Ok(())
145    }
146
147    // Compute sizes of nested messages
148    #[allow(unused_variables)]
149    fn compute_size(&self) -> u64 {
150        let mut my_size = 0;
151        if let Some(v) = self.header.as_ref() {
152            let len = v.compute_size();
153            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
154        }
155        if self.start != false {
156            my_size += 1 + 1;
157        }
158        if self.stop != false {
159            my_size += 1 + 1;
160        }
161        if self.paused != false {
162            my_size += 1 + 1;
163        }
164        if !self.base_path.is_empty() {
165            my_size += ::protobuf::rt::string_size(5, &self.base_path);
166        }
167        if !self.encoding.is_empty() {
168            my_size += ::protobuf::rt::string_size(6, &self.encoding);
169        }
170        if !self.record_resources.is_empty() {
171            my_size += ::protobuf::rt::string_size(7, &self.record_resources);
172        }
173        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
174        self.special_fields.cached_size().set(my_size as u32);
175        my_size
176    }
177
178    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
179        if let Some(v) = self.header.as_ref() {
180            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
181        }
182        if self.start != false {
183            os.write_bool(2, self.start)?;
184        }
185        if self.stop != false {
186            os.write_bool(3, self.stop)?;
187        }
188        if self.paused != false {
189            os.write_bool(4, self.paused)?;
190        }
191        if !self.base_path.is_empty() {
192            os.write_string(5, &self.base_path)?;
193        }
194        if !self.encoding.is_empty() {
195            os.write_string(6, &self.encoding)?;
196        }
197        if !self.record_resources.is_empty() {
198            os.write_string(7, &self.record_resources)?;
199        }
200        os.write_unknown_fields(self.special_fields.unknown_fields())?;
201        ::std::result::Result::Ok(())
202    }
203
204    fn special_fields(&self) -> &::protobuf::SpecialFields {
205        &self.special_fields
206    }
207
208    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
209        &mut self.special_fields
210    }
211
212    fn new() -> LogControl {
213        LogControl::new()
214    }
215
216    fn clear(&mut self) {
217        self.header.clear();
218        self.start = false;
219        self.stop = false;
220        self.paused = false;
221        self.base_path.clear();
222        self.encoding.clear();
223        self.record_resources.clear();
224        self.special_fields.clear();
225    }
226
227    fn default_instance() -> &'static LogControl {
228        static instance: LogControl = LogControl {
229            header: ::protobuf::MessageField::none(),
230            start: false,
231            stop: false,
232            paused: false,
233            base_path: ::std::string::String::new(),
234            encoding: ::std::string::String::new(),
235            record_resources: ::std::string::String::new(),
236            special_fields: ::protobuf::SpecialFields::new(),
237        };
238        &instance
239    }
240}
241
242impl ::protobuf::MessageFull for LogControl {
243    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
244        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
245        descriptor.get(|| file_descriptor().message_by_package_relative_name("LogControl").unwrap()).clone()
246    }
247}
248
249impl ::std::fmt::Display for LogControl {
250    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
251        ::protobuf::text_format::fmt(self, f)
252    }
253}
254
255impl ::protobuf::reflect::ProtobufValue for LogControl {
256    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
257}
258
259static file_descriptor_proto_data: &'static [u8] = b"\
260    \n\x19gz/msgs/log_control.proto\x12\x07gz.msgs\x1a\x14gz/msgs/header.pro\
261    to\"\xdb\x01\n\nLogControl\x12'\n\x06header\x18\x01\x20\x01(\x0b2\x0f.gz\
262    .msgs.HeaderR\x06header\x12\x14\n\x05start\x18\x02\x20\x01(\x08R\x05star\
263    t\x12\x12\n\x04stop\x18\x03\x20\x01(\x08R\x04stop\x12\x16\n\x06paused\
264    \x18\x04\x20\x01(\x08R\x06paused\x12\x1b\n\tbase_path\x18\x05\x20\x01(\t\
265    R\x08basePath\x12\x1a\n\x08encoding\x18\x06\x20\x01(\tR\x08encoding\x12)\
266    \n\x10record_resources\x18\x07\x20\x01(\tR\x0frecordResourcesB\x1f\n\x0b\
267    com.gz.msgsB\x10LogControlProtosb\x06proto3\
268";
269
270/// `FileDescriptorProto` object which was a source for this generated file
271fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
272    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
273    file_descriptor_proto_lazy.get(|| {
274        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
275    })
276}
277
278/// `FileDescriptor` object which allows dynamic access to files
279pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
280    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
281    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
282    file_descriptor.get(|| {
283        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
284            let mut deps = ::std::vec::Vec::with_capacity(1);
285            deps.push(super::header::file_descriptor().clone());
286            let mut messages = ::std::vec::Vec::with_capacity(1);
287            messages.push(LogControl::generated_message_descriptor_data());
288            let mut enums = ::std::vec::Vec::with_capacity(0);
289            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
290                file_descriptor_proto(),
291                deps,
292                messages,
293                enums,
294            )
295        });
296        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
297    })
298}