1#![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(PartialEq,Clone,Default,Debug)]
29pub struct Log {
30 pub timestamp: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>,
33 pub level: ::protobuf::EnumOrUnknown<log::Level>,
35 pub message: ::std::string::String,
37 pub name: ::std::string::String,
39 pub file: ::std::string::String,
41 pub line: u32,
43 pub special_fields: ::protobuf::SpecialFields,
46}
47
48impl<'a> ::std::default::Default for &'a Log {
49 fn default() -> &'a Log {
50 <Log as ::protobuf::Message>::default_instance()
51 }
52}
53
54impl Log {
55 pub fn new() -> Log {
56 ::std::default::Default::default()
57 }
58
59 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
60 let mut fields = ::std::vec::Vec::with_capacity(6);
61 let mut oneofs = ::std::vec::Vec::with_capacity(0);
62 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>(
63 "timestamp",
64 |m: &Log| { &m.timestamp },
65 |m: &mut Log| { &mut m.timestamp },
66 ));
67 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
68 "level",
69 |m: &Log| { &m.level },
70 |m: &mut Log| { &mut m.level },
71 ));
72 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
73 "message",
74 |m: &Log| { &m.message },
75 |m: &mut Log| { &mut m.message },
76 ));
77 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
78 "name",
79 |m: &Log| { &m.name },
80 |m: &mut Log| { &mut m.name },
81 ));
82 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
83 "file",
84 |m: &Log| { &m.file },
85 |m: &mut Log| { &mut m.file },
86 ));
87 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
88 "line",
89 |m: &Log| { &m.line },
90 |m: &mut Log| { &mut m.line },
91 ));
92 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Log>(
93 "Log",
94 fields,
95 oneofs,
96 )
97 }
98}
99
100impl ::protobuf::Message for Log {
101 const NAME: &'static str = "Log";
102
103 fn is_initialized(&self) -> bool {
104 true
105 }
106
107 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
108 while let Some(tag) = is.read_raw_tag_or_eof()? {
109 match tag {
110 10 => {
111 ::protobuf::rt::read_singular_message_into_field(is, &mut self.timestamp)?;
112 },
113 16 => {
114 self.level = is.read_enum_or_unknown()?;
115 },
116 26 => {
117 self.message = is.read_string()?;
118 },
119 34 => {
120 self.name = is.read_string()?;
121 },
122 42 => {
123 self.file = is.read_string()?;
124 },
125 53 => {
126 self.line = is.read_fixed32()?;
127 },
128 tag => {
129 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
130 },
131 };
132 }
133 ::std::result::Result::Ok(())
134 }
135
136 #[allow(unused_variables)]
138 fn compute_size(&self) -> u64 {
139 let mut my_size = 0;
140 if let Some(v) = self.timestamp.as_ref() {
141 let len = v.compute_size();
142 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
143 }
144 if self.level != ::protobuf::EnumOrUnknown::new(log::Level::UNKNOWN) {
145 my_size += ::protobuf::rt::int32_size(2, self.level.value());
146 }
147 if !self.message.is_empty() {
148 my_size += ::protobuf::rt::string_size(3, &self.message);
149 }
150 if !self.name.is_empty() {
151 my_size += ::protobuf::rt::string_size(4, &self.name);
152 }
153 if !self.file.is_empty() {
154 my_size += ::protobuf::rt::string_size(5, &self.file);
155 }
156 if self.line != 0 {
157 my_size += 1 + 4;
158 }
159 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
160 self.special_fields.cached_size().set(my_size as u32);
161 my_size
162 }
163
164 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
165 if let Some(v) = self.timestamp.as_ref() {
166 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
167 }
168 if self.level != ::protobuf::EnumOrUnknown::new(log::Level::UNKNOWN) {
169 os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.level))?;
170 }
171 if !self.message.is_empty() {
172 os.write_string(3, &self.message)?;
173 }
174 if !self.name.is_empty() {
175 os.write_string(4, &self.name)?;
176 }
177 if !self.file.is_empty() {
178 os.write_string(5, &self.file)?;
179 }
180 if self.line != 0 {
181 os.write_fixed32(6, self.line)?;
182 }
183 os.write_unknown_fields(self.special_fields.unknown_fields())?;
184 ::std::result::Result::Ok(())
185 }
186
187 fn special_fields(&self) -> &::protobuf::SpecialFields {
188 &self.special_fields
189 }
190
191 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
192 &mut self.special_fields
193 }
194
195 fn new() -> Log {
196 Log::new()
197 }
198
199 fn clear(&mut self) {
200 self.timestamp.clear();
201 self.level = ::protobuf::EnumOrUnknown::new(log::Level::UNKNOWN);
202 self.message.clear();
203 self.name.clear();
204 self.file.clear();
205 self.line = 0;
206 self.special_fields.clear();
207 }
208
209 fn default_instance() -> &'static Log {
210 static instance: Log = Log {
211 timestamp: ::protobuf::MessageField::none(),
212 level: ::protobuf::EnumOrUnknown::from_i32(0),
213 message: ::std::string::String::new(),
214 name: ::std::string::String::new(),
215 file: ::std::string::String::new(),
216 line: 0,
217 special_fields: ::protobuf::SpecialFields::new(),
218 };
219 &instance
220 }
221}
222
223impl ::protobuf::MessageFull for Log {
224 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
225 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
226 descriptor.get(|| file_descriptor().message_by_package_relative_name("Log").unwrap()).clone()
227 }
228}
229
230impl ::std::fmt::Display for Log {
231 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
232 ::protobuf::text_format::fmt(self, f)
233 }
234}
235
236impl ::protobuf::reflect::ProtobufValue for Log {
237 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
238}
239
240pub mod log {
242 #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
243 pub enum Level {
245 UNKNOWN = 0,
247 DEBUG = 1,
249 INFO = 2,
251 WARNING = 3,
253 ERROR = 4,
255 FATAL = 5,
257 }
258
259 impl ::protobuf::Enum for Level {
260 const NAME: &'static str = "Level";
261
262 fn value(&self) -> i32 {
263 *self as i32
264 }
265
266 fn from_i32(value: i32) -> ::std::option::Option<Level> {
267 match value {
268 0 => ::std::option::Option::Some(Level::UNKNOWN),
269 1 => ::std::option::Option::Some(Level::DEBUG),
270 2 => ::std::option::Option::Some(Level::INFO),
271 3 => ::std::option::Option::Some(Level::WARNING),
272 4 => ::std::option::Option::Some(Level::ERROR),
273 5 => ::std::option::Option::Some(Level::FATAL),
274 _ => ::std::option::Option::None
275 }
276 }
277
278 fn from_str(str: &str) -> ::std::option::Option<Level> {
279 match str {
280 "UNKNOWN" => ::std::option::Option::Some(Level::UNKNOWN),
281 "DEBUG" => ::std::option::Option::Some(Level::DEBUG),
282 "INFO" => ::std::option::Option::Some(Level::INFO),
283 "WARNING" => ::std::option::Option::Some(Level::WARNING),
284 "ERROR" => ::std::option::Option::Some(Level::ERROR),
285 "FATAL" => ::std::option::Option::Some(Level::FATAL),
286 _ => ::std::option::Option::None
287 }
288 }
289
290 const VALUES: &'static [Level] = &[
291 Level::UNKNOWN,
292 Level::DEBUG,
293 Level::INFO,
294 Level::WARNING,
295 Level::ERROR,
296 Level::FATAL,
297 ];
298 }
299
300 impl ::protobuf::EnumFull for Level {
301 fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
302 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
303 descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("Log.Level").unwrap()).clone()
304 }
305
306 fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
307 let index = *self as usize;
308 Self::enum_descriptor().value_by_index(index)
309 }
310 }
311
312 impl ::std::default::Default for Level {
313 fn default() -> Self {
314 Level::UNKNOWN
315 }
316 }
317
318 impl Level {
319 pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
320 ::protobuf::reflect::GeneratedEnumDescriptorData::new::<Level>("Log.Level")
321 }
322 }
323}
324
325static file_descriptor_proto_data: &'static [u8] = b"\
326 \n\x12foxglove/Log.proto\x12\x08foxglove\x1a\x1fgoogle/protobuf/timestam\
327 p.proto\"\x8e\x02\n\x03Log\x128\n\ttimestamp\x18\x01\x20\x01(\x0b2\x1a.g\
328 oogle.protobuf.TimestampR\ttimestamp\x12)\n\x05level\x18\x02\x20\x01(\
329 \x0e2\x13.foxglove.Log.LevelR\x05level\x12\x18\n\x07message\x18\x03\x20\
330 \x01(\tR\x07message\x12\x12\n\x04name\x18\x04\x20\x01(\tR\x04name\x12\
331 \x12\n\x04file\x18\x05\x20\x01(\tR\x04file\x12\x12\n\x04line\x18\x06\x20\
332 \x01(\x07R\x04line\"L\n\x05Level\x12\x0b\n\x07UNKNOWN\x10\0\x12\t\n\x05D\
333 EBUG\x10\x01\x12\x08\n\x04INFO\x10\x02\x12\x0b\n\x07WARNING\x10\x03\x12\
334 \t\n\x05ERROR\x10\x04\x12\t\n\x05FATAL\x10\x05b\x06proto3\
335";
336
337fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
339 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
340 file_descriptor_proto_lazy.get(|| {
341 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
342 })
343}
344
345pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
347 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
348 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
349 file_descriptor.get(|| {
350 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
351 let mut deps = ::std::vec::Vec::with_capacity(1);
352 deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone());
353 let mut messages = ::std::vec::Vec::with_capacity(1);
354 messages.push(Log::generated_message_descriptor_data());
355 let mut enums = ::std::vec::Vec::with_capacity(1);
356 enums.push(log::Level::generated_enum_descriptor_data());
357 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
358 file_descriptor_proto(),
359 deps,
360 messages,
361 enums,
362 )
363 });
364 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
365 })
366}