1use crate::monitor_service::*;
2impl serde::Serialize for AnalyzeHeapRequest {
3 #[allow(deprecated)]
4 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5 where
6 S: serde::Serializer,
7 {
8 use serde::ser::SerializeStruct;
9 let mut len = 0;
10 if !self.path.is_empty() {
11 len += 1;
12 }
13 let mut struct_ser = serializer.serialize_struct("monitor_service.AnalyzeHeapRequest", len)?;
14 if !self.path.is_empty() {
15 struct_ser.serialize_field("path", &self.path)?;
16 }
17 struct_ser.end()
18 }
19}
20impl<'de> serde::Deserialize<'de> for AnalyzeHeapRequest {
21 #[allow(deprecated)]
22 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23 where
24 D: serde::Deserializer<'de>,
25 {
26 const FIELDS: &[&str] = &[
27 "path",
28 ];
29
30 #[allow(clippy::enum_variant_names)]
31 enum GeneratedField {
32 Path,
33 }
34 impl<'de> serde::Deserialize<'de> for GeneratedField {
35 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
36 where
37 D: serde::Deserializer<'de>,
38 {
39 struct GeneratedVisitor;
40
41 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
42 type Value = GeneratedField;
43
44 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
45 write!(formatter, "expected one of: {:?}", &FIELDS)
46 }
47
48 #[allow(unused_variables)]
49 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
50 where
51 E: serde::de::Error,
52 {
53 match value {
54 "path" => Ok(GeneratedField::Path),
55 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
56 }
57 }
58 }
59 deserializer.deserialize_identifier(GeneratedVisitor)
60 }
61 }
62 struct GeneratedVisitor;
63 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
64 type Value = AnalyzeHeapRequest;
65
66 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
67 formatter.write_str("struct monitor_service.AnalyzeHeapRequest")
68 }
69
70 fn visit_map<V>(self, mut map_: V) -> std::result::Result<AnalyzeHeapRequest, V::Error>
71 where
72 V: serde::de::MapAccess<'de>,
73 {
74 let mut path__ = None;
75 while let Some(k) = map_.next_key()? {
76 match k {
77 GeneratedField::Path => {
78 if path__.is_some() {
79 return Err(serde::de::Error::duplicate_field("path"));
80 }
81 path__ = Some(map_.next_value()?);
82 }
83 }
84 }
85 Ok(AnalyzeHeapRequest {
86 path: path__.unwrap_or_default(),
87 })
88 }
89 }
90 deserializer.deserialize_struct("monitor_service.AnalyzeHeapRequest", FIELDS, GeneratedVisitor)
91 }
92}
93impl serde::Serialize for AnalyzeHeapResponse {
94 #[allow(deprecated)]
95 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
96 where
97 S: serde::Serializer,
98 {
99 use serde::ser::SerializeStruct;
100 let mut len = 0;
101 if !self.result.is_empty() {
102 len += 1;
103 }
104 let mut struct_ser = serializer.serialize_struct("monitor_service.AnalyzeHeapResponse", len)?;
105 if !self.result.is_empty() {
106 #[allow(clippy::needless_borrow)]
107 #[allow(clippy::needless_borrows_for_generic_args)]
108 struct_ser.serialize_field("result", pbjson::private::base64::encode(&self.result).as_str())?;
109 }
110 struct_ser.end()
111 }
112}
113impl<'de> serde::Deserialize<'de> for AnalyzeHeapResponse {
114 #[allow(deprecated)]
115 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
116 where
117 D: serde::Deserializer<'de>,
118 {
119 const FIELDS: &[&str] = &[
120 "result",
121 ];
122
123 #[allow(clippy::enum_variant_names)]
124 enum GeneratedField {
125 Result,
126 }
127 impl<'de> serde::Deserialize<'de> for GeneratedField {
128 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
129 where
130 D: serde::Deserializer<'de>,
131 {
132 struct GeneratedVisitor;
133
134 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
135 type Value = GeneratedField;
136
137 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
138 write!(formatter, "expected one of: {:?}", &FIELDS)
139 }
140
141 #[allow(unused_variables)]
142 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
143 where
144 E: serde::de::Error,
145 {
146 match value {
147 "result" => Ok(GeneratedField::Result),
148 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
149 }
150 }
151 }
152 deserializer.deserialize_identifier(GeneratedVisitor)
153 }
154 }
155 struct GeneratedVisitor;
156 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
157 type Value = AnalyzeHeapResponse;
158
159 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
160 formatter.write_str("struct monitor_service.AnalyzeHeapResponse")
161 }
162
163 fn visit_map<V>(self, mut map_: V) -> std::result::Result<AnalyzeHeapResponse, V::Error>
164 where
165 V: serde::de::MapAccess<'de>,
166 {
167 let mut result__ = None;
168 while let Some(k) = map_.next_key()? {
169 match k {
170 GeneratedField::Result => {
171 if result__.is_some() {
172 return Err(serde::de::Error::duplicate_field("result"));
173 }
174 result__ =
175 Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
176 ;
177 }
178 }
179 }
180 Ok(AnalyzeHeapResponse {
181 result: result__.unwrap_or_default(),
182 })
183 }
184 }
185 deserializer.deserialize_struct("monitor_service.AnalyzeHeapResponse", FIELDS, GeneratedVisitor)
186 }
187}
188impl serde::Serialize for ChannelStats {
189 #[allow(deprecated)]
190 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
191 where
192 S: serde::Serializer,
193 {
194 use serde::ser::SerializeStruct;
195 let mut len = 0;
196 if self.actor_count != 0 {
197 len += 1;
198 }
199 if self.output_blocking_duration != 0. {
200 len += 1;
201 }
202 if self.recv_row_count != 0 {
203 len += 1;
204 }
205 if self.send_row_count != 0 {
206 len += 1;
207 }
208 let mut struct_ser = serializer.serialize_struct("monitor_service.ChannelStats", len)?;
209 if self.actor_count != 0 {
210 struct_ser.serialize_field("n", &self.actor_count)?;
211 }
212 if self.output_blocking_duration != 0. {
213 struct_ser.serialize_field("b", &self.output_blocking_duration)?;
214 }
215 if self.recv_row_count != 0 {
216 #[allow(clippy::needless_borrow)]
217 #[allow(clippy::needless_borrows_for_generic_args)]
218 struct_ser.serialize_field("i", ToString::to_string(&self.recv_row_count).as_str())?;
219 }
220 if self.send_row_count != 0 {
221 #[allow(clippy::needless_borrow)]
222 #[allow(clippy::needless_borrows_for_generic_args)]
223 struct_ser.serialize_field("o", ToString::to_string(&self.send_row_count).as_str())?;
224 }
225 struct_ser.end()
226 }
227}
228impl<'de> serde::Deserialize<'de> for ChannelStats {
229 #[allow(deprecated)]
230 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
231 where
232 D: serde::Deserializer<'de>,
233 {
234 const FIELDS: &[&str] = &[
235 "actor_count",
236 "n",
237 "output_blocking_duration",
238 "b",
239 "recv_row_count",
240 "i",
241 "send_row_count",
242 "o",
243 ];
244
245 #[allow(clippy::enum_variant_names)]
246 enum GeneratedField {
247 ActorCount,
248 OutputBlockingDuration,
249 RecvRowCount,
250 SendRowCount,
251 }
252 impl<'de> serde::Deserialize<'de> for GeneratedField {
253 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
254 where
255 D: serde::Deserializer<'de>,
256 {
257 struct GeneratedVisitor;
258
259 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
260 type Value = GeneratedField;
261
262 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
263 write!(formatter, "expected one of: {:?}", &FIELDS)
264 }
265
266 #[allow(unused_variables)]
267 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
268 where
269 E: serde::de::Error,
270 {
271 match value {
272 "n" | "actor_count" => Ok(GeneratedField::ActorCount),
273 "b" | "output_blocking_duration" => Ok(GeneratedField::OutputBlockingDuration),
274 "i" | "recv_row_count" => Ok(GeneratedField::RecvRowCount),
275 "o" | "send_row_count" => Ok(GeneratedField::SendRowCount),
276 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
277 }
278 }
279 }
280 deserializer.deserialize_identifier(GeneratedVisitor)
281 }
282 }
283 struct GeneratedVisitor;
284 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
285 type Value = ChannelStats;
286
287 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
288 formatter.write_str("struct monitor_service.ChannelStats")
289 }
290
291 fn visit_map<V>(self, mut map_: V) -> std::result::Result<ChannelStats, V::Error>
292 where
293 V: serde::de::MapAccess<'de>,
294 {
295 let mut actor_count__ = None;
296 let mut output_blocking_duration__ = None;
297 let mut recv_row_count__ = None;
298 let mut send_row_count__ = None;
299 while let Some(k) = map_.next_key()? {
300 match k {
301 GeneratedField::ActorCount => {
302 if actor_count__.is_some() {
303 return Err(serde::de::Error::duplicate_field("n"));
304 }
305 actor_count__ =
306 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
307 ;
308 }
309 GeneratedField::OutputBlockingDuration => {
310 if output_blocking_duration__.is_some() {
311 return Err(serde::de::Error::duplicate_field("b"));
312 }
313 output_blocking_duration__ =
314 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
315 ;
316 }
317 GeneratedField::RecvRowCount => {
318 if recv_row_count__.is_some() {
319 return Err(serde::de::Error::duplicate_field("i"));
320 }
321 recv_row_count__ =
322 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
323 ;
324 }
325 GeneratedField::SendRowCount => {
326 if send_row_count__.is_some() {
327 return Err(serde::de::Error::duplicate_field("o"));
328 }
329 send_row_count__ =
330 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
331 ;
332 }
333 }
334 }
335 Ok(ChannelStats {
336 actor_count: actor_count__.unwrap_or_default(),
337 output_blocking_duration: output_blocking_duration__.unwrap_or_default(),
338 recv_row_count: recv_row_count__.unwrap_or_default(),
339 send_row_count: send_row_count__.unwrap_or_default(),
340 })
341 }
342 }
343 deserializer.deserialize_struct("monitor_service.ChannelStats", FIELDS, GeneratedVisitor)
344 }
345}
346impl serde::Serialize for FragmentStats {
347 #[allow(deprecated)]
348 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
349 where
350 S: serde::Serializer,
351 {
352 use serde::ser::SerializeStruct;
353 let mut len = 0;
354 if self.actor_count != 0 {
355 len += 1;
356 }
357 if self.current_epoch != 0 {
358 len += 1;
359 }
360 let mut struct_ser = serializer.serialize_struct("monitor_service.FragmentStats", len)?;
361 if self.actor_count != 0 {
362 struct_ser.serialize_field("n", &self.actor_count)?;
363 }
364 if self.current_epoch != 0 {
365 #[allow(clippy::needless_borrow)]
366 #[allow(clippy::needless_borrows_for_generic_args)]
367 struct_ser.serialize_field("e", ToString::to_string(&self.current_epoch).as_str())?;
368 }
369 struct_ser.end()
370 }
371}
372impl<'de> serde::Deserialize<'de> for FragmentStats {
373 #[allow(deprecated)]
374 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
375 where
376 D: serde::Deserializer<'de>,
377 {
378 const FIELDS: &[&str] = &[
379 "actor_count",
380 "n",
381 "current_epoch",
382 "e",
383 ];
384
385 #[allow(clippy::enum_variant_names)]
386 enum GeneratedField {
387 ActorCount,
388 CurrentEpoch,
389 }
390 impl<'de> serde::Deserialize<'de> for GeneratedField {
391 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
392 where
393 D: serde::Deserializer<'de>,
394 {
395 struct GeneratedVisitor;
396
397 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
398 type Value = GeneratedField;
399
400 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
401 write!(formatter, "expected one of: {:?}", &FIELDS)
402 }
403
404 #[allow(unused_variables)]
405 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
406 where
407 E: serde::de::Error,
408 {
409 match value {
410 "n" | "actor_count" => Ok(GeneratedField::ActorCount),
411 "e" | "current_epoch" => Ok(GeneratedField::CurrentEpoch),
412 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
413 }
414 }
415 }
416 deserializer.deserialize_identifier(GeneratedVisitor)
417 }
418 }
419 struct GeneratedVisitor;
420 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
421 type Value = FragmentStats;
422
423 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
424 formatter.write_str("struct monitor_service.FragmentStats")
425 }
426
427 fn visit_map<V>(self, mut map_: V) -> std::result::Result<FragmentStats, V::Error>
428 where
429 V: serde::de::MapAccess<'de>,
430 {
431 let mut actor_count__ = None;
432 let mut current_epoch__ = None;
433 while let Some(k) = map_.next_key()? {
434 match k {
435 GeneratedField::ActorCount => {
436 if actor_count__.is_some() {
437 return Err(serde::de::Error::duplicate_field("n"));
438 }
439 actor_count__ =
440 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
441 ;
442 }
443 GeneratedField::CurrentEpoch => {
444 if current_epoch__.is_some() {
445 return Err(serde::de::Error::duplicate_field("e"));
446 }
447 current_epoch__ =
448 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
449 ;
450 }
451 }
452 }
453 Ok(FragmentStats {
454 actor_count: actor_count__.unwrap_or_default(),
455 current_epoch: current_epoch__.unwrap_or_default(),
456 })
457 }
458 }
459 deserializer.deserialize_struct("monitor_service.FragmentStats", FIELDS, GeneratedVisitor)
460 }
461}
462impl serde::Serialize for GetProfileStatsRequest {
463 #[allow(deprecated)]
464 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
465 where
466 S: serde::Serializer,
467 {
468 use serde::ser::SerializeStruct;
469 let mut len = 0;
470 if !self.executor_ids.is_empty() {
471 len += 1;
472 }
473 if !self.dispatcher_fragment_ids.is_empty() {
474 len += 1;
475 }
476 let mut struct_ser = serializer.serialize_struct("monitor_service.GetProfileStatsRequest", len)?;
477 if !self.executor_ids.is_empty() {
478 struct_ser.serialize_field("executorIds", &self.executor_ids.iter().map(ToString::to_string).collect::<Vec<_>>())?;
479 }
480 if !self.dispatcher_fragment_ids.is_empty() {
481 struct_ser.serialize_field("dispatcherFragmentIds", &self.dispatcher_fragment_ids)?;
482 }
483 struct_ser.end()
484 }
485}
486impl<'de> serde::Deserialize<'de> for GetProfileStatsRequest {
487 #[allow(deprecated)]
488 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
489 where
490 D: serde::Deserializer<'de>,
491 {
492 const FIELDS: &[&str] = &[
493 "executor_ids",
494 "executorIds",
495 "dispatcher_fragment_ids",
496 "dispatcherFragmentIds",
497 ];
498
499 #[allow(clippy::enum_variant_names)]
500 enum GeneratedField {
501 ExecutorIds,
502 DispatcherFragmentIds,
503 }
504 impl<'de> serde::Deserialize<'de> for GeneratedField {
505 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
506 where
507 D: serde::Deserializer<'de>,
508 {
509 struct GeneratedVisitor;
510
511 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
512 type Value = GeneratedField;
513
514 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
515 write!(formatter, "expected one of: {:?}", &FIELDS)
516 }
517
518 #[allow(unused_variables)]
519 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
520 where
521 E: serde::de::Error,
522 {
523 match value {
524 "executorIds" | "executor_ids" => Ok(GeneratedField::ExecutorIds),
525 "dispatcherFragmentIds" | "dispatcher_fragment_ids" => Ok(GeneratedField::DispatcherFragmentIds),
526 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
527 }
528 }
529 }
530 deserializer.deserialize_identifier(GeneratedVisitor)
531 }
532 }
533 struct GeneratedVisitor;
534 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
535 type Value = GetProfileStatsRequest;
536
537 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
538 formatter.write_str("struct monitor_service.GetProfileStatsRequest")
539 }
540
541 fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetProfileStatsRequest, V::Error>
542 where
543 V: serde::de::MapAccess<'de>,
544 {
545 let mut executor_ids__ = None;
546 let mut dispatcher_fragment_ids__ = None;
547 while let Some(k) = map_.next_key()? {
548 match k {
549 GeneratedField::ExecutorIds => {
550 if executor_ids__.is_some() {
551 return Err(serde::de::Error::duplicate_field("executorIds"));
552 }
553 executor_ids__ =
554 Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
555 .into_iter().map(|x| x.0).collect())
556 ;
557 }
558 GeneratedField::DispatcherFragmentIds => {
559 if dispatcher_fragment_ids__.is_some() {
560 return Err(serde::de::Error::duplicate_field("dispatcherFragmentIds"));
561 }
562 dispatcher_fragment_ids__ =
563 Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
564 .into_iter().map(|x| x.0).collect())
565 ;
566 }
567 }
568 }
569 Ok(GetProfileStatsRequest {
570 executor_ids: executor_ids__.unwrap_or_default(),
571 dispatcher_fragment_ids: dispatcher_fragment_ids__.unwrap_or_default(),
572 })
573 }
574 }
575 deserializer.deserialize_struct("monitor_service.GetProfileStatsRequest", FIELDS, GeneratedVisitor)
576 }
577}
578impl serde::Serialize for GetProfileStatsResponse {
579 #[allow(deprecated)]
580 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
581 where
582 S: serde::Serializer,
583 {
584 use serde::ser::SerializeStruct;
585 let mut len = 0;
586 if !self.stream_node_output_row_count.is_empty() {
587 len += 1;
588 }
589 if !self.stream_node_output_blocking_duration_ns.is_empty() {
590 len += 1;
591 }
592 if !self.dispatch_fragment_output_row_count.is_empty() {
593 len += 1;
594 }
595 if !self.dispatch_fragment_output_blocking_duration_ns.is_empty() {
596 len += 1;
597 }
598 let mut struct_ser = serializer.serialize_struct("monitor_service.GetProfileStatsResponse", len)?;
599 if !self.stream_node_output_row_count.is_empty() {
600 let v: std::collections::HashMap<_, _> = self.stream_node_output_row_count.iter()
601 .map(|(k, v)| (k, v.to_string())).collect();
602 struct_ser.serialize_field("streamNodeOutputRowCount", &v)?;
603 }
604 if !self.stream_node_output_blocking_duration_ns.is_empty() {
605 let v: std::collections::HashMap<_, _> = self.stream_node_output_blocking_duration_ns.iter()
606 .map(|(k, v)| (k, v.to_string())).collect();
607 struct_ser.serialize_field("streamNodeOutputBlockingDurationNs", &v)?;
608 }
609 if !self.dispatch_fragment_output_row_count.is_empty() {
610 let v: std::collections::HashMap<_, _> = self.dispatch_fragment_output_row_count.iter()
611 .map(|(k, v)| (k, v.to_string())).collect();
612 struct_ser.serialize_field("dispatchFragmentOutputRowCount", &v)?;
613 }
614 if !self.dispatch_fragment_output_blocking_duration_ns.is_empty() {
615 let v: std::collections::HashMap<_, _> = self.dispatch_fragment_output_blocking_duration_ns.iter()
616 .map(|(k, v)| (k, v.to_string())).collect();
617 struct_ser.serialize_field("dispatchFragmentOutputBlockingDurationNs", &v)?;
618 }
619 struct_ser.end()
620 }
621}
622impl<'de> serde::Deserialize<'de> for GetProfileStatsResponse {
623 #[allow(deprecated)]
624 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
625 where
626 D: serde::Deserializer<'de>,
627 {
628 const FIELDS: &[&str] = &[
629 "stream_node_output_row_count",
630 "streamNodeOutputRowCount",
631 "stream_node_output_blocking_duration_ns",
632 "streamNodeOutputBlockingDurationNs",
633 "dispatch_fragment_output_row_count",
634 "dispatchFragmentOutputRowCount",
635 "dispatch_fragment_output_blocking_duration_ns",
636 "dispatchFragmentOutputBlockingDurationNs",
637 ];
638
639 #[allow(clippy::enum_variant_names)]
640 enum GeneratedField {
641 StreamNodeOutputRowCount,
642 StreamNodeOutputBlockingDurationNs,
643 DispatchFragmentOutputRowCount,
644 DispatchFragmentOutputBlockingDurationNs,
645 }
646 impl<'de> serde::Deserialize<'de> for GeneratedField {
647 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
648 where
649 D: serde::Deserializer<'de>,
650 {
651 struct GeneratedVisitor;
652
653 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
654 type Value = GeneratedField;
655
656 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
657 write!(formatter, "expected one of: {:?}", &FIELDS)
658 }
659
660 #[allow(unused_variables)]
661 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
662 where
663 E: serde::de::Error,
664 {
665 match value {
666 "streamNodeOutputRowCount" | "stream_node_output_row_count" => Ok(GeneratedField::StreamNodeOutputRowCount),
667 "streamNodeOutputBlockingDurationNs" | "stream_node_output_blocking_duration_ns" => Ok(GeneratedField::StreamNodeOutputBlockingDurationNs),
668 "dispatchFragmentOutputRowCount" | "dispatch_fragment_output_row_count" => Ok(GeneratedField::DispatchFragmentOutputRowCount),
669 "dispatchFragmentOutputBlockingDurationNs" | "dispatch_fragment_output_blocking_duration_ns" => Ok(GeneratedField::DispatchFragmentOutputBlockingDurationNs),
670 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
671 }
672 }
673 }
674 deserializer.deserialize_identifier(GeneratedVisitor)
675 }
676 }
677 struct GeneratedVisitor;
678 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
679 type Value = GetProfileStatsResponse;
680
681 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
682 formatter.write_str("struct monitor_service.GetProfileStatsResponse")
683 }
684
685 fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetProfileStatsResponse, V::Error>
686 where
687 V: serde::de::MapAccess<'de>,
688 {
689 let mut stream_node_output_row_count__ = None;
690 let mut stream_node_output_blocking_duration_ns__ = None;
691 let mut dispatch_fragment_output_row_count__ = None;
692 let mut dispatch_fragment_output_blocking_duration_ns__ = None;
693 while let Some(k) = map_.next_key()? {
694 match k {
695 GeneratedField::StreamNodeOutputRowCount => {
696 if stream_node_output_row_count__.is_some() {
697 return Err(serde::de::Error::duplicate_field("streamNodeOutputRowCount"));
698 }
699 stream_node_output_row_count__ = Some(
700 map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, ::pbjson::private::NumberDeserialize<u64>>>()?
701 .into_iter().map(|(k,v)| (k.0, v.0)).collect()
702 );
703 }
704 GeneratedField::StreamNodeOutputBlockingDurationNs => {
705 if stream_node_output_blocking_duration_ns__.is_some() {
706 return Err(serde::de::Error::duplicate_field("streamNodeOutputBlockingDurationNs"));
707 }
708 stream_node_output_blocking_duration_ns__ = Some(
709 map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, ::pbjson::private::NumberDeserialize<u64>>>()?
710 .into_iter().map(|(k,v)| (k.0, v.0)).collect()
711 );
712 }
713 GeneratedField::DispatchFragmentOutputRowCount => {
714 if dispatch_fragment_output_row_count__.is_some() {
715 return Err(serde::de::Error::duplicate_field("dispatchFragmentOutputRowCount"));
716 }
717 dispatch_fragment_output_row_count__ = Some(
718 map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, ::pbjson::private::NumberDeserialize<u64>>>()?
719 .into_iter().map(|(k,v)| (k.0, v.0)).collect()
720 );
721 }
722 GeneratedField::DispatchFragmentOutputBlockingDurationNs => {
723 if dispatch_fragment_output_blocking_duration_ns__.is_some() {
724 return Err(serde::de::Error::duplicate_field("dispatchFragmentOutputBlockingDurationNs"));
725 }
726 dispatch_fragment_output_blocking_duration_ns__ = Some(
727 map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, ::pbjson::private::NumberDeserialize<u64>>>()?
728 .into_iter().map(|(k,v)| (k.0, v.0)).collect()
729 );
730 }
731 }
732 }
733 Ok(GetProfileStatsResponse {
734 stream_node_output_row_count: stream_node_output_row_count__.unwrap_or_default(),
735 stream_node_output_blocking_duration_ns: stream_node_output_blocking_duration_ns__.unwrap_or_default(),
736 dispatch_fragment_output_row_count: dispatch_fragment_output_row_count__.unwrap_or_default(),
737 dispatch_fragment_output_blocking_duration_ns: dispatch_fragment_output_blocking_duration_ns__.unwrap_or_default(),
738 })
739 }
740 }
741 deserializer.deserialize_struct("monitor_service.GetProfileStatsResponse", FIELDS, GeneratedVisitor)
742 }
743}
744impl serde::Serialize for GetStreamingStatsRequest {
745 #[allow(deprecated)]
746 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
747 where
748 S: serde::Serializer,
749 {
750 use serde::ser::SerializeStruct;
751 let len = 0;
752 let struct_ser = serializer.serialize_struct("monitor_service.GetStreamingStatsRequest", len)?;
753 struct_ser.end()
754 }
755}
756impl<'de> serde::Deserialize<'de> for GetStreamingStatsRequest {
757 #[allow(deprecated)]
758 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
759 where
760 D: serde::Deserializer<'de>,
761 {
762 const FIELDS: &[&str] = &[
763 ];
764
765 #[allow(clippy::enum_variant_names)]
766 enum GeneratedField {
767 }
768 impl<'de> serde::Deserialize<'de> for GeneratedField {
769 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
770 where
771 D: serde::Deserializer<'de>,
772 {
773 struct GeneratedVisitor;
774
775 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
776 type Value = GeneratedField;
777
778 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
779 write!(formatter, "expected one of: {:?}", &FIELDS)
780 }
781
782 #[allow(unused_variables)]
783 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
784 where
785 E: serde::de::Error,
786 {
787 Err(serde::de::Error::unknown_field(value, FIELDS))
788 }
789 }
790 deserializer.deserialize_identifier(GeneratedVisitor)
791 }
792 }
793 struct GeneratedVisitor;
794 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
795 type Value = GetStreamingStatsRequest;
796
797 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
798 formatter.write_str("struct monitor_service.GetStreamingStatsRequest")
799 }
800
801 fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetStreamingStatsRequest, V::Error>
802 where
803 V: serde::de::MapAccess<'de>,
804 {
805 while map_.next_key::<GeneratedField>()?.is_some() {
806 let _ = map_.next_value::<serde::de::IgnoredAny>()?;
807 }
808 Ok(GetStreamingStatsRequest {
809 })
810 }
811 }
812 deserializer.deserialize_struct("monitor_service.GetStreamingStatsRequest", FIELDS, GeneratedVisitor)
813 }
814}
815impl serde::Serialize for GetStreamingStatsResponse {
816 #[allow(deprecated)]
817 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
818 where
819 S: serde::Serializer,
820 {
821 use serde::ser::SerializeStruct;
822 let mut len = 0;
823 if !self.channel_stats.is_empty() {
824 len += 1;
825 }
826 if !self.fragment_stats.is_empty() {
827 len += 1;
828 }
829 if !self.relation_stats.is_empty() {
830 len += 1;
831 }
832 let mut struct_ser = serializer.serialize_struct("monitor_service.GetStreamingStatsResponse", len)?;
833 if !self.channel_stats.is_empty() {
834 struct_ser.serialize_field("channelStats", &self.channel_stats)?;
835 }
836 if !self.fragment_stats.is_empty() {
837 struct_ser.serialize_field("fragmentStats", &self.fragment_stats)?;
838 }
839 if !self.relation_stats.is_empty() {
840 struct_ser.serialize_field("relationStats", &self.relation_stats)?;
841 }
842 struct_ser.end()
843 }
844}
845impl<'de> serde::Deserialize<'de> for GetStreamingStatsResponse {
846 #[allow(deprecated)]
847 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
848 where
849 D: serde::Deserializer<'de>,
850 {
851 const FIELDS: &[&str] = &[
852 "channel_stats",
853 "channelStats",
854 "fragment_stats",
855 "fragmentStats",
856 "relation_stats",
857 "relationStats",
858 ];
859
860 #[allow(clippy::enum_variant_names)]
861 enum GeneratedField {
862 ChannelStats,
863 FragmentStats,
864 RelationStats,
865 }
866 impl<'de> serde::Deserialize<'de> for GeneratedField {
867 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
868 where
869 D: serde::Deserializer<'de>,
870 {
871 struct GeneratedVisitor;
872
873 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
874 type Value = GeneratedField;
875
876 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
877 write!(formatter, "expected one of: {:?}", &FIELDS)
878 }
879
880 #[allow(unused_variables)]
881 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
882 where
883 E: serde::de::Error,
884 {
885 match value {
886 "channelStats" | "channel_stats" => Ok(GeneratedField::ChannelStats),
887 "fragmentStats" | "fragment_stats" => Ok(GeneratedField::FragmentStats),
888 "relationStats" | "relation_stats" => Ok(GeneratedField::RelationStats),
889 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
890 }
891 }
892 }
893 deserializer.deserialize_identifier(GeneratedVisitor)
894 }
895 }
896 struct GeneratedVisitor;
897 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
898 type Value = GetStreamingStatsResponse;
899
900 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
901 formatter.write_str("struct monitor_service.GetStreamingStatsResponse")
902 }
903
904 fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetStreamingStatsResponse, V::Error>
905 where
906 V: serde::de::MapAccess<'de>,
907 {
908 let mut channel_stats__ = None;
909 let mut fragment_stats__ = None;
910 let mut relation_stats__ = None;
911 while let Some(k) = map_.next_key()? {
912 match k {
913 GeneratedField::ChannelStats => {
914 if channel_stats__.is_some() {
915 return Err(serde::de::Error::duplicate_field("channelStats"));
916 }
917 channel_stats__ = Some(
918 map_.next_value::<std::collections::HashMap<_, _>>()?
919 );
920 }
921 GeneratedField::FragmentStats => {
922 if fragment_stats__.is_some() {
923 return Err(serde::de::Error::duplicate_field("fragmentStats"));
924 }
925 fragment_stats__ = Some(
926 map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
927 .into_iter().map(|(k,v)| (k.0, v)).collect()
928 );
929 }
930 GeneratedField::RelationStats => {
931 if relation_stats__.is_some() {
932 return Err(serde::de::Error::duplicate_field("relationStats"));
933 }
934 relation_stats__ = Some(
935 map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
936 .into_iter().map(|(k,v)| (k.0, v)).collect()
937 );
938 }
939 }
940 }
941 Ok(GetStreamingStatsResponse {
942 channel_stats: channel_stats__.unwrap_or_default(),
943 fragment_stats: fragment_stats__.unwrap_or_default(),
944 relation_stats: relation_stats__.unwrap_or_default(),
945 })
946 }
947 }
948 deserializer.deserialize_struct("monitor_service.GetStreamingStatsResponse", FIELDS, GeneratedVisitor)
949 }
950}
951impl serde::Serialize for HeapProfilingRequest {
952 #[allow(deprecated)]
953 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
954 where
955 S: serde::Serializer,
956 {
957 use serde::ser::SerializeStruct;
958 let mut len = 0;
959 if !self.dir.is_empty() {
960 len += 1;
961 }
962 let mut struct_ser = serializer.serialize_struct("monitor_service.HeapProfilingRequest", len)?;
963 if !self.dir.is_empty() {
964 struct_ser.serialize_field("dir", &self.dir)?;
965 }
966 struct_ser.end()
967 }
968}
969impl<'de> serde::Deserialize<'de> for HeapProfilingRequest {
970 #[allow(deprecated)]
971 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
972 where
973 D: serde::Deserializer<'de>,
974 {
975 const FIELDS: &[&str] = &[
976 "dir",
977 ];
978
979 #[allow(clippy::enum_variant_names)]
980 enum GeneratedField {
981 Dir,
982 }
983 impl<'de> serde::Deserialize<'de> for GeneratedField {
984 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
985 where
986 D: serde::Deserializer<'de>,
987 {
988 struct GeneratedVisitor;
989
990 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
991 type Value = GeneratedField;
992
993 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
994 write!(formatter, "expected one of: {:?}", &FIELDS)
995 }
996
997 #[allow(unused_variables)]
998 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
999 where
1000 E: serde::de::Error,
1001 {
1002 match value {
1003 "dir" => Ok(GeneratedField::Dir),
1004 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1005 }
1006 }
1007 }
1008 deserializer.deserialize_identifier(GeneratedVisitor)
1009 }
1010 }
1011 struct GeneratedVisitor;
1012 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1013 type Value = HeapProfilingRequest;
1014
1015 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1016 formatter.write_str("struct monitor_service.HeapProfilingRequest")
1017 }
1018
1019 fn visit_map<V>(self, mut map_: V) -> std::result::Result<HeapProfilingRequest, V::Error>
1020 where
1021 V: serde::de::MapAccess<'de>,
1022 {
1023 let mut dir__ = None;
1024 while let Some(k) = map_.next_key()? {
1025 match k {
1026 GeneratedField::Dir => {
1027 if dir__.is_some() {
1028 return Err(serde::de::Error::duplicate_field("dir"));
1029 }
1030 dir__ = Some(map_.next_value()?);
1031 }
1032 }
1033 }
1034 Ok(HeapProfilingRequest {
1035 dir: dir__.unwrap_or_default(),
1036 })
1037 }
1038 }
1039 deserializer.deserialize_struct("monitor_service.HeapProfilingRequest", FIELDS, GeneratedVisitor)
1040 }
1041}
1042impl serde::Serialize for HeapProfilingResponse {
1043 #[allow(deprecated)]
1044 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1045 where
1046 S: serde::Serializer,
1047 {
1048 use serde::ser::SerializeStruct;
1049 let len = 0;
1050 let struct_ser = serializer.serialize_struct("monitor_service.HeapProfilingResponse", len)?;
1051 struct_ser.end()
1052 }
1053}
1054impl<'de> serde::Deserialize<'de> for HeapProfilingResponse {
1055 #[allow(deprecated)]
1056 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1057 where
1058 D: serde::Deserializer<'de>,
1059 {
1060 const FIELDS: &[&str] = &[
1061 ];
1062
1063 #[allow(clippy::enum_variant_names)]
1064 enum GeneratedField {
1065 }
1066 impl<'de> serde::Deserialize<'de> for GeneratedField {
1067 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1068 where
1069 D: serde::Deserializer<'de>,
1070 {
1071 struct GeneratedVisitor;
1072
1073 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1074 type Value = GeneratedField;
1075
1076 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1077 write!(formatter, "expected one of: {:?}", &FIELDS)
1078 }
1079
1080 #[allow(unused_variables)]
1081 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1082 where
1083 E: serde::de::Error,
1084 {
1085 Err(serde::de::Error::unknown_field(value, FIELDS))
1086 }
1087 }
1088 deserializer.deserialize_identifier(GeneratedVisitor)
1089 }
1090 }
1091 struct GeneratedVisitor;
1092 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1093 type Value = HeapProfilingResponse;
1094
1095 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1096 formatter.write_str("struct monitor_service.HeapProfilingResponse")
1097 }
1098
1099 fn visit_map<V>(self, mut map_: V) -> std::result::Result<HeapProfilingResponse, V::Error>
1100 where
1101 V: serde::de::MapAccess<'de>,
1102 {
1103 while map_.next_key::<GeneratedField>()?.is_some() {
1104 let _ = map_.next_value::<serde::de::IgnoredAny>()?;
1105 }
1106 Ok(HeapProfilingResponse {
1107 })
1108 }
1109 }
1110 deserializer.deserialize_struct("monitor_service.HeapProfilingResponse", FIELDS, GeneratedVisitor)
1111 }
1112}
1113impl serde::Serialize for ListHeapProfilingRequest {
1114 #[allow(deprecated)]
1115 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1116 where
1117 S: serde::Serializer,
1118 {
1119 use serde::ser::SerializeStruct;
1120 let len = 0;
1121 let struct_ser = serializer.serialize_struct("monitor_service.ListHeapProfilingRequest", len)?;
1122 struct_ser.end()
1123 }
1124}
1125impl<'de> serde::Deserialize<'de> for ListHeapProfilingRequest {
1126 #[allow(deprecated)]
1127 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1128 where
1129 D: serde::Deserializer<'de>,
1130 {
1131 const FIELDS: &[&str] = &[
1132 ];
1133
1134 #[allow(clippy::enum_variant_names)]
1135 enum GeneratedField {
1136 }
1137 impl<'de> serde::Deserialize<'de> for GeneratedField {
1138 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1139 where
1140 D: serde::Deserializer<'de>,
1141 {
1142 struct GeneratedVisitor;
1143
1144 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1145 type Value = GeneratedField;
1146
1147 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1148 write!(formatter, "expected one of: {:?}", &FIELDS)
1149 }
1150
1151 #[allow(unused_variables)]
1152 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1153 where
1154 E: serde::de::Error,
1155 {
1156 Err(serde::de::Error::unknown_field(value, FIELDS))
1157 }
1158 }
1159 deserializer.deserialize_identifier(GeneratedVisitor)
1160 }
1161 }
1162 struct GeneratedVisitor;
1163 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1164 type Value = ListHeapProfilingRequest;
1165
1166 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1167 formatter.write_str("struct monitor_service.ListHeapProfilingRequest")
1168 }
1169
1170 fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListHeapProfilingRequest, V::Error>
1171 where
1172 V: serde::de::MapAccess<'de>,
1173 {
1174 while map_.next_key::<GeneratedField>()?.is_some() {
1175 let _ = map_.next_value::<serde::de::IgnoredAny>()?;
1176 }
1177 Ok(ListHeapProfilingRequest {
1178 })
1179 }
1180 }
1181 deserializer.deserialize_struct("monitor_service.ListHeapProfilingRequest", FIELDS, GeneratedVisitor)
1182 }
1183}
1184impl serde::Serialize for ListHeapProfilingResponse {
1185 #[allow(deprecated)]
1186 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1187 where
1188 S: serde::Serializer,
1189 {
1190 use serde::ser::SerializeStruct;
1191 let mut len = 0;
1192 if !self.dir.is_empty() {
1193 len += 1;
1194 }
1195 if !self.name_manually.is_empty() {
1196 len += 1;
1197 }
1198 if !self.name_auto.is_empty() {
1199 len += 1;
1200 }
1201 let mut struct_ser = serializer.serialize_struct("monitor_service.ListHeapProfilingResponse", len)?;
1202 if !self.dir.is_empty() {
1203 struct_ser.serialize_field("dir", &self.dir)?;
1204 }
1205 if !self.name_manually.is_empty() {
1206 struct_ser.serialize_field("nameManually", &self.name_manually)?;
1207 }
1208 if !self.name_auto.is_empty() {
1209 struct_ser.serialize_field("nameAuto", &self.name_auto)?;
1210 }
1211 struct_ser.end()
1212 }
1213}
1214impl<'de> serde::Deserialize<'de> for ListHeapProfilingResponse {
1215 #[allow(deprecated)]
1216 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1217 where
1218 D: serde::Deserializer<'de>,
1219 {
1220 const FIELDS: &[&str] = &[
1221 "dir",
1222 "name_manually",
1223 "nameManually",
1224 "name_auto",
1225 "nameAuto",
1226 ];
1227
1228 #[allow(clippy::enum_variant_names)]
1229 enum GeneratedField {
1230 Dir,
1231 NameManually,
1232 NameAuto,
1233 }
1234 impl<'de> serde::Deserialize<'de> for GeneratedField {
1235 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1236 where
1237 D: serde::Deserializer<'de>,
1238 {
1239 struct GeneratedVisitor;
1240
1241 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1242 type Value = GeneratedField;
1243
1244 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1245 write!(formatter, "expected one of: {:?}", &FIELDS)
1246 }
1247
1248 #[allow(unused_variables)]
1249 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1250 where
1251 E: serde::de::Error,
1252 {
1253 match value {
1254 "dir" => Ok(GeneratedField::Dir),
1255 "nameManually" | "name_manually" => Ok(GeneratedField::NameManually),
1256 "nameAuto" | "name_auto" => Ok(GeneratedField::NameAuto),
1257 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1258 }
1259 }
1260 }
1261 deserializer.deserialize_identifier(GeneratedVisitor)
1262 }
1263 }
1264 struct GeneratedVisitor;
1265 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1266 type Value = ListHeapProfilingResponse;
1267
1268 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1269 formatter.write_str("struct monitor_service.ListHeapProfilingResponse")
1270 }
1271
1272 fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListHeapProfilingResponse, V::Error>
1273 where
1274 V: serde::de::MapAccess<'de>,
1275 {
1276 let mut dir__ = None;
1277 let mut name_manually__ = None;
1278 let mut name_auto__ = None;
1279 while let Some(k) = map_.next_key()? {
1280 match k {
1281 GeneratedField::Dir => {
1282 if dir__.is_some() {
1283 return Err(serde::de::Error::duplicate_field("dir"));
1284 }
1285 dir__ = Some(map_.next_value()?);
1286 }
1287 GeneratedField::NameManually => {
1288 if name_manually__.is_some() {
1289 return Err(serde::de::Error::duplicate_field("nameManually"));
1290 }
1291 name_manually__ = Some(map_.next_value()?);
1292 }
1293 GeneratedField::NameAuto => {
1294 if name_auto__.is_some() {
1295 return Err(serde::de::Error::duplicate_field("nameAuto"));
1296 }
1297 name_auto__ = Some(map_.next_value()?);
1298 }
1299 }
1300 }
1301 Ok(ListHeapProfilingResponse {
1302 dir: dir__.unwrap_or_default(),
1303 name_manually: name_manually__.unwrap_or_default(),
1304 name_auto: name_auto__.unwrap_or_default(),
1305 })
1306 }
1307 }
1308 deserializer.deserialize_struct("monitor_service.ListHeapProfilingResponse", FIELDS, GeneratedVisitor)
1309 }
1310}
1311impl serde::Serialize for ProfilingRequest {
1312 #[allow(deprecated)]
1313 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1314 where
1315 S: serde::Serializer,
1316 {
1317 use serde::ser::SerializeStruct;
1318 let mut len = 0;
1319 if self.sleep_s != 0 {
1320 len += 1;
1321 }
1322 let mut struct_ser = serializer.serialize_struct("monitor_service.ProfilingRequest", len)?;
1323 if self.sleep_s != 0 {
1324 #[allow(clippy::needless_borrow)]
1325 #[allow(clippy::needless_borrows_for_generic_args)]
1326 struct_ser.serialize_field("sleepS", ToString::to_string(&self.sleep_s).as_str())?;
1327 }
1328 struct_ser.end()
1329 }
1330}
1331impl<'de> serde::Deserialize<'de> for ProfilingRequest {
1332 #[allow(deprecated)]
1333 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1334 where
1335 D: serde::Deserializer<'de>,
1336 {
1337 const FIELDS: &[&str] = &[
1338 "sleep_s",
1339 "sleepS",
1340 ];
1341
1342 #[allow(clippy::enum_variant_names)]
1343 enum GeneratedField {
1344 SleepS,
1345 }
1346 impl<'de> serde::Deserialize<'de> for GeneratedField {
1347 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1348 where
1349 D: serde::Deserializer<'de>,
1350 {
1351 struct GeneratedVisitor;
1352
1353 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1354 type Value = GeneratedField;
1355
1356 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1357 write!(formatter, "expected one of: {:?}", &FIELDS)
1358 }
1359
1360 #[allow(unused_variables)]
1361 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1362 where
1363 E: serde::de::Error,
1364 {
1365 match value {
1366 "sleepS" | "sleep_s" => Ok(GeneratedField::SleepS),
1367 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1368 }
1369 }
1370 }
1371 deserializer.deserialize_identifier(GeneratedVisitor)
1372 }
1373 }
1374 struct GeneratedVisitor;
1375 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1376 type Value = ProfilingRequest;
1377
1378 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1379 formatter.write_str("struct monitor_service.ProfilingRequest")
1380 }
1381
1382 fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProfilingRequest, V::Error>
1383 where
1384 V: serde::de::MapAccess<'de>,
1385 {
1386 let mut sleep_s__ = None;
1387 while let Some(k) = map_.next_key()? {
1388 match k {
1389 GeneratedField::SleepS => {
1390 if sleep_s__.is_some() {
1391 return Err(serde::de::Error::duplicate_field("sleepS"));
1392 }
1393 sleep_s__ =
1394 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1395 ;
1396 }
1397 }
1398 }
1399 Ok(ProfilingRequest {
1400 sleep_s: sleep_s__.unwrap_or_default(),
1401 })
1402 }
1403 }
1404 deserializer.deserialize_struct("monitor_service.ProfilingRequest", FIELDS, GeneratedVisitor)
1405 }
1406}
1407impl serde::Serialize for ProfilingResponse {
1408 #[allow(deprecated)]
1409 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1410 where
1411 S: serde::Serializer,
1412 {
1413 use serde::ser::SerializeStruct;
1414 let mut len = 0;
1415 if !self.result.is_empty() {
1416 len += 1;
1417 }
1418 let mut struct_ser = serializer.serialize_struct("monitor_service.ProfilingResponse", len)?;
1419 if !self.result.is_empty() {
1420 #[allow(clippy::needless_borrow)]
1421 #[allow(clippy::needless_borrows_for_generic_args)]
1422 struct_ser.serialize_field("result", pbjson::private::base64::encode(&self.result).as_str())?;
1423 }
1424 struct_ser.end()
1425 }
1426}
1427impl<'de> serde::Deserialize<'de> for ProfilingResponse {
1428 #[allow(deprecated)]
1429 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1430 where
1431 D: serde::Deserializer<'de>,
1432 {
1433 const FIELDS: &[&str] = &[
1434 "result",
1435 ];
1436
1437 #[allow(clippy::enum_variant_names)]
1438 enum GeneratedField {
1439 Result,
1440 }
1441 impl<'de> serde::Deserialize<'de> for GeneratedField {
1442 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1443 where
1444 D: serde::Deserializer<'de>,
1445 {
1446 struct GeneratedVisitor;
1447
1448 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1449 type Value = GeneratedField;
1450
1451 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1452 write!(formatter, "expected one of: {:?}", &FIELDS)
1453 }
1454
1455 #[allow(unused_variables)]
1456 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1457 where
1458 E: serde::de::Error,
1459 {
1460 match value {
1461 "result" => Ok(GeneratedField::Result),
1462 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1463 }
1464 }
1465 }
1466 deserializer.deserialize_identifier(GeneratedVisitor)
1467 }
1468 }
1469 struct GeneratedVisitor;
1470 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1471 type Value = ProfilingResponse;
1472
1473 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1474 formatter.write_str("struct monitor_service.ProfilingResponse")
1475 }
1476
1477 fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProfilingResponse, V::Error>
1478 where
1479 V: serde::de::MapAccess<'de>,
1480 {
1481 let mut result__ = None;
1482 while let Some(k) = map_.next_key()? {
1483 match k {
1484 GeneratedField::Result => {
1485 if result__.is_some() {
1486 return Err(serde::de::Error::duplicate_field("result"));
1487 }
1488 result__ =
1489 Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
1490 ;
1491 }
1492 }
1493 }
1494 Ok(ProfilingResponse {
1495 result: result__.unwrap_or_default(),
1496 })
1497 }
1498 }
1499 deserializer.deserialize_struct("monitor_service.ProfilingResponse", FIELDS, GeneratedVisitor)
1500 }
1501}
1502impl serde::Serialize for RelationStats {
1503 #[allow(deprecated)]
1504 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1505 where
1506 S: serde::Serializer,
1507 {
1508 use serde::ser::SerializeStruct;
1509 let mut len = 0;
1510 if self.actor_count != 0 {
1511 len += 1;
1512 }
1513 if self.current_epoch != 0 {
1514 len += 1;
1515 }
1516 let mut struct_ser = serializer.serialize_struct("monitor_service.RelationStats", len)?;
1517 if self.actor_count != 0 {
1518 struct_ser.serialize_field("n", &self.actor_count)?;
1519 }
1520 if self.current_epoch != 0 {
1521 #[allow(clippy::needless_borrow)]
1522 #[allow(clippy::needless_borrows_for_generic_args)]
1523 struct_ser.serialize_field("e", ToString::to_string(&self.current_epoch).as_str())?;
1524 }
1525 struct_ser.end()
1526 }
1527}
1528impl<'de> serde::Deserialize<'de> for RelationStats {
1529 #[allow(deprecated)]
1530 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1531 where
1532 D: serde::Deserializer<'de>,
1533 {
1534 const FIELDS: &[&str] = &[
1535 "actor_count",
1536 "n",
1537 "current_epoch",
1538 "e",
1539 ];
1540
1541 #[allow(clippy::enum_variant_names)]
1542 enum GeneratedField {
1543 ActorCount,
1544 CurrentEpoch,
1545 }
1546 impl<'de> serde::Deserialize<'de> for GeneratedField {
1547 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1548 where
1549 D: serde::Deserializer<'de>,
1550 {
1551 struct GeneratedVisitor;
1552
1553 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1554 type Value = GeneratedField;
1555
1556 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1557 write!(formatter, "expected one of: {:?}", &FIELDS)
1558 }
1559
1560 #[allow(unused_variables)]
1561 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1562 where
1563 E: serde::de::Error,
1564 {
1565 match value {
1566 "n" | "actor_count" => Ok(GeneratedField::ActorCount),
1567 "e" | "current_epoch" => Ok(GeneratedField::CurrentEpoch),
1568 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1569 }
1570 }
1571 }
1572 deserializer.deserialize_identifier(GeneratedVisitor)
1573 }
1574 }
1575 struct GeneratedVisitor;
1576 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1577 type Value = RelationStats;
1578
1579 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1580 formatter.write_str("struct monitor_service.RelationStats")
1581 }
1582
1583 fn visit_map<V>(self, mut map_: V) -> std::result::Result<RelationStats, V::Error>
1584 where
1585 V: serde::de::MapAccess<'de>,
1586 {
1587 let mut actor_count__ = None;
1588 let mut current_epoch__ = None;
1589 while let Some(k) = map_.next_key()? {
1590 match k {
1591 GeneratedField::ActorCount => {
1592 if actor_count__.is_some() {
1593 return Err(serde::de::Error::duplicate_field("n"));
1594 }
1595 actor_count__ =
1596 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1597 ;
1598 }
1599 GeneratedField::CurrentEpoch => {
1600 if current_epoch__.is_some() {
1601 return Err(serde::de::Error::duplicate_field("e"));
1602 }
1603 current_epoch__ =
1604 Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1605 ;
1606 }
1607 }
1608 }
1609 Ok(RelationStats {
1610 actor_count: actor_count__.unwrap_or_default(),
1611 current_epoch: current_epoch__.unwrap_or_default(),
1612 })
1613 }
1614 }
1615 deserializer.deserialize_struct("monitor_service.RelationStats", FIELDS, GeneratedVisitor)
1616 }
1617}
1618impl serde::Serialize for StackTraceRequest {
1619 #[allow(deprecated)]
1620 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1621 where
1622 S: serde::Serializer,
1623 {
1624 use serde::ser::SerializeStruct;
1625 let mut len = 0;
1626 if self.actor_traces_format != 0 {
1627 len += 1;
1628 }
1629 let mut struct_ser = serializer.serialize_struct("monitor_service.StackTraceRequest", len)?;
1630 if self.actor_traces_format != 0 {
1631 let v = stack_trace_request::ActorTracesFormat::try_from(self.actor_traces_format)
1632 .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.actor_traces_format)))?;
1633 struct_ser.serialize_field("actorTracesFormat", &v)?;
1634 }
1635 struct_ser.end()
1636 }
1637}
1638impl<'de> serde::Deserialize<'de> for StackTraceRequest {
1639 #[allow(deprecated)]
1640 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1641 where
1642 D: serde::Deserializer<'de>,
1643 {
1644 const FIELDS: &[&str] = &[
1645 "actor_traces_format",
1646 "actorTracesFormat",
1647 ];
1648
1649 #[allow(clippy::enum_variant_names)]
1650 enum GeneratedField {
1651 ActorTracesFormat,
1652 }
1653 impl<'de> serde::Deserialize<'de> for GeneratedField {
1654 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1655 where
1656 D: serde::Deserializer<'de>,
1657 {
1658 struct GeneratedVisitor;
1659
1660 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1661 type Value = GeneratedField;
1662
1663 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1664 write!(formatter, "expected one of: {:?}", &FIELDS)
1665 }
1666
1667 #[allow(unused_variables)]
1668 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1669 where
1670 E: serde::de::Error,
1671 {
1672 match value {
1673 "actorTracesFormat" | "actor_traces_format" => Ok(GeneratedField::ActorTracesFormat),
1674 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1675 }
1676 }
1677 }
1678 deserializer.deserialize_identifier(GeneratedVisitor)
1679 }
1680 }
1681 struct GeneratedVisitor;
1682 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1683 type Value = StackTraceRequest;
1684
1685 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1686 formatter.write_str("struct monitor_service.StackTraceRequest")
1687 }
1688
1689 fn visit_map<V>(self, mut map_: V) -> std::result::Result<StackTraceRequest, V::Error>
1690 where
1691 V: serde::de::MapAccess<'de>,
1692 {
1693 let mut actor_traces_format__ = None;
1694 while let Some(k) = map_.next_key()? {
1695 match k {
1696 GeneratedField::ActorTracesFormat => {
1697 if actor_traces_format__.is_some() {
1698 return Err(serde::de::Error::duplicate_field("actorTracesFormat"));
1699 }
1700 actor_traces_format__ = Some(map_.next_value::<stack_trace_request::ActorTracesFormat>()? as i32);
1701 }
1702 }
1703 }
1704 Ok(StackTraceRequest {
1705 actor_traces_format: actor_traces_format__.unwrap_or_default(),
1706 })
1707 }
1708 }
1709 deserializer.deserialize_struct("monitor_service.StackTraceRequest", FIELDS, GeneratedVisitor)
1710 }
1711}
1712impl serde::Serialize for stack_trace_request::ActorTracesFormat {
1713 #[allow(deprecated)]
1714 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1715 where
1716 S: serde::Serializer,
1717 {
1718 let variant = match self {
1719 Self::Unspecified => "UNSPECIFIED",
1720 Self::Json => "JSON",
1721 Self::Text => "TEXT",
1722 };
1723 serializer.serialize_str(variant)
1724 }
1725}
1726impl<'de> serde::Deserialize<'de> for stack_trace_request::ActorTracesFormat {
1727 #[allow(deprecated)]
1728 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1729 where
1730 D: serde::Deserializer<'de>,
1731 {
1732 const FIELDS: &[&str] = &[
1733 "UNSPECIFIED",
1734 "JSON",
1735 "TEXT",
1736 ];
1737
1738 struct GeneratedVisitor;
1739
1740 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1741 type Value = stack_trace_request::ActorTracesFormat;
1742
1743 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1744 write!(formatter, "expected one of: {:?}", &FIELDS)
1745 }
1746
1747 fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
1748 where
1749 E: serde::de::Error,
1750 {
1751 i32::try_from(v)
1752 .ok()
1753 .and_then(|x| x.try_into().ok())
1754 .ok_or_else(|| {
1755 serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
1756 })
1757 }
1758
1759 fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
1760 where
1761 E: serde::de::Error,
1762 {
1763 i32::try_from(v)
1764 .ok()
1765 .and_then(|x| x.try_into().ok())
1766 .ok_or_else(|| {
1767 serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
1768 })
1769 }
1770
1771 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1772 where
1773 E: serde::de::Error,
1774 {
1775 match value {
1776 "UNSPECIFIED" => Ok(stack_trace_request::ActorTracesFormat::Unspecified),
1777 "JSON" => Ok(stack_trace_request::ActorTracesFormat::Json),
1778 "TEXT" => Ok(stack_trace_request::ActorTracesFormat::Text),
1779 _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
1780 }
1781 }
1782 }
1783 deserializer.deserialize_any(GeneratedVisitor)
1784 }
1785}
1786impl serde::Serialize for StackTraceResponse {
1787 #[allow(deprecated)]
1788 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1789 where
1790 S: serde::Serializer,
1791 {
1792 use serde::ser::SerializeStruct;
1793 let mut len = 0;
1794 if !self.actor_traces.is_empty() {
1795 len += 1;
1796 }
1797 if !self.rpc_traces.is_empty() {
1798 len += 1;
1799 }
1800 if !self.compaction_task_traces.is_empty() {
1801 len += 1;
1802 }
1803 if !self.inflight_barrier_traces.is_empty() {
1804 len += 1;
1805 }
1806 if !self.barrier_worker_state.is_empty() {
1807 len += 1;
1808 }
1809 if !self.jvm_stack_traces.is_empty() {
1810 len += 1;
1811 }
1812 let mut struct_ser = serializer.serialize_struct("monitor_service.StackTraceResponse", len)?;
1813 if !self.actor_traces.is_empty() {
1814 struct_ser.serialize_field("actorTraces", &self.actor_traces)?;
1815 }
1816 if !self.rpc_traces.is_empty() {
1817 struct_ser.serialize_field("rpcTraces", &self.rpc_traces)?;
1818 }
1819 if !self.compaction_task_traces.is_empty() {
1820 struct_ser.serialize_field("compactionTaskTraces", &self.compaction_task_traces)?;
1821 }
1822 if !self.inflight_barrier_traces.is_empty() {
1823 struct_ser.serialize_field("inflightBarrierTraces", &self.inflight_barrier_traces)?;
1824 }
1825 if !self.barrier_worker_state.is_empty() {
1826 struct_ser.serialize_field("barrierWorkerState", &self.barrier_worker_state)?;
1827 }
1828 if !self.jvm_stack_traces.is_empty() {
1829 struct_ser.serialize_field("jvmStackTraces", &self.jvm_stack_traces)?;
1830 }
1831 struct_ser.end()
1832 }
1833}
1834impl<'de> serde::Deserialize<'de> for StackTraceResponse {
1835 #[allow(deprecated)]
1836 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1837 where
1838 D: serde::Deserializer<'de>,
1839 {
1840 const FIELDS: &[&str] = &[
1841 "actor_traces",
1842 "actorTraces",
1843 "rpc_traces",
1844 "rpcTraces",
1845 "compaction_task_traces",
1846 "compactionTaskTraces",
1847 "inflight_barrier_traces",
1848 "inflightBarrierTraces",
1849 "barrier_worker_state",
1850 "barrierWorkerState",
1851 "jvm_stack_traces",
1852 "jvmStackTraces",
1853 ];
1854
1855 #[allow(clippy::enum_variant_names)]
1856 enum GeneratedField {
1857 ActorTraces,
1858 RpcTraces,
1859 CompactionTaskTraces,
1860 InflightBarrierTraces,
1861 BarrierWorkerState,
1862 JvmStackTraces,
1863 }
1864 impl<'de> serde::Deserialize<'de> for GeneratedField {
1865 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1866 where
1867 D: serde::Deserializer<'de>,
1868 {
1869 struct GeneratedVisitor;
1870
1871 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1872 type Value = GeneratedField;
1873
1874 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1875 write!(formatter, "expected one of: {:?}", &FIELDS)
1876 }
1877
1878 #[allow(unused_variables)]
1879 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1880 where
1881 E: serde::de::Error,
1882 {
1883 match value {
1884 "actorTraces" | "actor_traces" => Ok(GeneratedField::ActorTraces),
1885 "rpcTraces" | "rpc_traces" => Ok(GeneratedField::RpcTraces),
1886 "compactionTaskTraces" | "compaction_task_traces" => Ok(GeneratedField::CompactionTaskTraces),
1887 "inflightBarrierTraces" | "inflight_barrier_traces" => Ok(GeneratedField::InflightBarrierTraces),
1888 "barrierWorkerState" | "barrier_worker_state" => Ok(GeneratedField::BarrierWorkerState),
1889 "jvmStackTraces" | "jvm_stack_traces" => Ok(GeneratedField::JvmStackTraces),
1890 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1891 }
1892 }
1893 }
1894 deserializer.deserialize_identifier(GeneratedVisitor)
1895 }
1896 }
1897 struct GeneratedVisitor;
1898 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1899 type Value = StackTraceResponse;
1900
1901 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1902 formatter.write_str("struct monitor_service.StackTraceResponse")
1903 }
1904
1905 fn visit_map<V>(self, mut map_: V) -> std::result::Result<StackTraceResponse, V::Error>
1906 where
1907 V: serde::de::MapAccess<'de>,
1908 {
1909 let mut actor_traces__ = None;
1910 let mut rpc_traces__ = None;
1911 let mut compaction_task_traces__ = None;
1912 let mut inflight_barrier_traces__ = None;
1913 let mut barrier_worker_state__ = None;
1914 let mut jvm_stack_traces__ = None;
1915 while let Some(k) = map_.next_key()? {
1916 match k {
1917 GeneratedField::ActorTraces => {
1918 if actor_traces__.is_some() {
1919 return Err(serde::de::Error::duplicate_field("actorTraces"));
1920 }
1921 actor_traces__ = Some(
1922 map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
1923 .into_iter().map(|(k,v)| (k.0, v)).collect()
1924 );
1925 }
1926 GeneratedField::RpcTraces => {
1927 if rpc_traces__.is_some() {
1928 return Err(serde::de::Error::duplicate_field("rpcTraces"));
1929 }
1930 rpc_traces__ = Some(
1931 map_.next_value::<std::collections::BTreeMap<_, _>>()?
1932 );
1933 }
1934 GeneratedField::CompactionTaskTraces => {
1935 if compaction_task_traces__.is_some() {
1936 return Err(serde::de::Error::duplicate_field("compactionTaskTraces"));
1937 }
1938 compaction_task_traces__ = Some(
1939 map_.next_value::<std::collections::BTreeMap<_, _>>()?
1940 );
1941 }
1942 GeneratedField::InflightBarrierTraces => {
1943 if inflight_barrier_traces__.is_some() {
1944 return Err(serde::de::Error::duplicate_field("inflightBarrierTraces"));
1945 }
1946 inflight_barrier_traces__ = Some(
1947 map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u64>, _>>()?
1948 .into_iter().map(|(k,v)| (k.0, v)).collect()
1949 );
1950 }
1951 GeneratedField::BarrierWorkerState => {
1952 if barrier_worker_state__.is_some() {
1953 return Err(serde::de::Error::duplicate_field("barrierWorkerState"));
1954 }
1955 barrier_worker_state__ = Some(
1956 map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
1957 .into_iter().map(|(k,v)| (k.0, v)).collect()
1958 );
1959 }
1960 GeneratedField::JvmStackTraces => {
1961 if jvm_stack_traces__.is_some() {
1962 return Err(serde::de::Error::duplicate_field("jvmStackTraces"));
1963 }
1964 jvm_stack_traces__ = Some(
1965 map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
1966 .into_iter().map(|(k,v)| (k.0, v)).collect()
1967 );
1968 }
1969 }
1970 }
1971 Ok(StackTraceResponse {
1972 actor_traces: actor_traces__.unwrap_or_default(),
1973 rpc_traces: rpc_traces__.unwrap_or_default(),
1974 compaction_task_traces: compaction_task_traces__.unwrap_or_default(),
1975 inflight_barrier_traces: inflight_barrier_traces__.unwrap_or_default(),
1976 barrier_worker_state: barrier_worker_state__.unwrap_or_default(),
1977 jvm_stack_traces: jvm_stack_traces__.unwrap_or_default(),
1978 })
1979 }
1980 }
1981 deserializer.deserialize_struct("monitor_service.StackTraceResponse", FIELDS, GeneratedVisitor)
1982 }
1983}
1984impl serde::Serialize for TieredCacheTracingRequest {
1985 #[allow(deprecated)]
1986 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1987 where
1988 S: serde::Serializer,
1989 {
1990 use serde::ser::SerializeStruct;
1991 let mut len = 0;
1992 if self.enable {
1993 len += 1;
1994 }
1995 if self.record_hybrid_insert_threshold_ms.is_some() {
1996 len += 1;
1997 }
1998 if self.record_hybrid_get_threshold_ms.is_some() {
1999 len += 1;
2000 }
2001 if self.record_hybrid_obtain_threshold_ms.is_some() {
2002 len += 1;
2003 }
2004 if self.record_hybrid_remove_threshold_ms.is_some() {
2005 len += 1;
2006 }
2007 if self.record_hybrid_fetch_threshold_ms.is_some() {
2008 len += 1;
2009 }
2010 let mut struct_ser = serializer.serialize_struct("monitor_service.TieredCacheTracingRequest", len)?;
2011 if self.enable {
2012 struct_ser.serialize_field("enable", &self.enable)?;
2013 }
2014 if let Some(v) = self.record_hybrid_insert_threshold_ms.as_ref() {
2015 struct_ser.serialize_field("recordHybridInsertThresholdMs", v)?;
2016 }
2017 if let Some(v) = self.record_hybrid_get_threshold_ms.as_ref() {
2018 struct_ser.serialize_field("recordHybridGetThresholdMs", v)?;
2019 }
2020 if let Some(v) = self.record_hybrid_obtain_threshold_ms.as_ref() {
2021 struct_ser.serialize_field("recordHybridObtainThresholdMs", v)?;
2022 }
2023 if let Some(v) = self.record_hybrid_remove_threshold_ms.as_ref() {
2024 struct_ser.serialize_field("recordHybridRemoveThresholdMs", v)?;
2025 }
2026 if let Some(v) = self.record_hybrid_fetch_threshold_ms.as_ref() {
2027 struct_ser.serialize_field("recordHybridFetchThresholdMs", v)?;
2028 }
2029 struct_ser.end()
2030 }
2031}
2032impl<'de> serde::Deserialize<'de> for TieredCacheTracingRequest {
2033 #[allow(deprecated)]
2034 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2035 where
2036 D: serde::Deserializer<'de>,
2037 {
2038 const FIELDS: &[&str] = &[
2039 "enable",
2040 "record_hybrid_insert_threshold_ms",
2041 "recordHybridInsertThresholdMs",
2042 "record_hybrid_get_threshold_ms",
2043 "recordHybridGetThresholdMs",
2044 "record_hybrid_obtain_threshold_ms",
2045 "recordHybridObtainThresholdMs",
2046 "record_hybrid_remove_threshold_ms",
2047 "recordHybridRemoveThresholdMs",
2048 "record_hybrid_fetch_threshold_ms",
2049 "recordHybridFetchThresholdMs",
2050 ];
2051
2052 #[allow(clippy::enum_variant_names)]
2053 enum GeneratedField {
2054 Enable,
2055 RecordHybridInsertThresholdMs,
2056 RecordHybridGetThresholdMs,
2057 RecordHybridObtainThresholdMs,
2058 RecordHybridRemoveThresholdMs,
2059 RecordHybridFetchThresholdMs,
2060 }
2061 impl<'de> serde::Deserialize<'de> for GeneratedField {
2062 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2063 where
2064 D: serde::Deserializer<'de>,
2065 {
2066 struct GeneratedVisitor;
2067
2068 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2069 type Value = GeneratedField;
2070
2071 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2072 write!(formatter, "expected one of: {:?}", &FIELDS)
2073 }
2074
2075 #[allow(unused_variables)]
2076 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2077 where
2078 E: serde::de::Error,
2079 {
2080 match value {
2081 "enable" => Ok(GeneratedField::Enable),
2082 "recordHybridInsertThresholdMs" | "record_hybrid_insert_threshold_ms" => Ok(GeneratedField::RecordHybridInsertThresholdMs),
2083 "recordHybridGetThresholdMs" | "record_hybrid_get_threshold_ms" => Ok(GeneratedField::RecordHybridGetThresholdMs),
2084 "recordHybridObtainThresholdMs" | "record_hybrid_obtain_threshold_ms" => Ok(GeneratedField::RecordHybridObtainThresholdMs),
2085 "recordHybridRemoveThresholdMs" | "record_hybrid_remove_threshold_ms" => Ok(GeneratedField::RecordHybridRemoveThresholdMs),
2086 "recordHybridFetchThresholdMs" | "record_hybrid_fetch_threshold_ms" => Ok(GeneratedField::RecordHybridFetchThresholdMs),
2087 _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2088 }
2089 }
2090 }
2091 deserializer.deserialize_identifier(GeneratedVisitor)
2092 }
2093 }
2094 struct GeneratedVisitor;
2095 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2096 type Value = TieredCacheTracingRequest;
2097
2098 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2099 formatter.write_str("struct monitor_service.TieredCacheTracingRequest")
2100 }
2101
2102 fn visit_map<V>(self, mut map_: V) -> std::result::Result<TieredCacheTracingRequest, V::Error>
2103 where
2104 V: serde::de::MapAccess<'de>,
2105 {
2106 let mut enable__ = None;
2107 let mut record_hybrid_insert_threshold_ms__ = None;
2108 let mut record_hybrid_get_threshold_ms__ = None;
2109 let mut record_hybrid_obtain_threshold_ms__ = None;
2110 let mut record_hybrid_remove_threshold_ms__ = None;
2111 let mut record_hybrid_fetch_threshold_ms__ = None;
2112 while let Some(k) = map_.next_key()? {
2113 match k {
2114 GeneratedField::Enable => {
2115 if enable__.is_some() {
2116 return Err(serde::de::Error::duplicate_field("enable"));
2117 }
2118 enable__ = Some(map_.next_value()?);
2119 }
2120 GeneratedField::RecordHybridInsertThresholdMs => {
2121 if record_hybrid_insert_threshold_ms__.is_some() {
2122 return Err(serde::de::Error::duplicate_field("recordHybridInsertThresholdMs"));
2123 }
2124 record_hybrid_insert_threshold_ms__ =
2125 map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2126 ;
2127 }
2128 GeneratedField::RecordHybridGetThresholdMs => {
2129 if record_hybrid_get_threshold_ms__.is_some() {
2130 return Err(serde::de::Error::duplicate_field("recordHybridGetThresholdMs"));
2131 }
2132 record_hybrid_get_threshold_ms__ =
2133 map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2134 ;
2135 }
2136 GeneratedField::RecordHybridObtainThresholdMs => {
2137 if record_hybrid_obtain_threshold_ms__.is_some() {
2138 return Err(serde::de::Error::duplicate_field("recordHybridObtainThresholdMs"));
2139 }
2140 record_hybrid_obtain_threshold_ms__ =
2141 map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2142 ;
2143 }
2144 GeneratedField::RecordHybridRemoveThresholdMs => {
2145 if record_hybrid_remove_threshold_ms__.is_some() {
2146 return Err(serde::de::Error::duplicate_field("recordHybridRemoveThresholdMs"));
2147 }
2148 record_hybrid_remove_threshold_ms__ =
2149 map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2150 ;
2151 }
2152 GeneratedField::RecordHybridFetchThresholdMs => {
2153 if record_hybrid_fetch_threshold_ms__.is_some() {
2154 return Err(serde::de::Error::duplicate_field("recordHybridFetchThresholdMs"));
2155 }
2156 record_hybrid_fetch_threshold_ms__ =
2157 map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2158 ;
2159 }
2160 }
2161 }
2162 Ok(TieredCacheTracingRequest {
2163 enable: enable__.unwrap_or_default(),
2164 record_hybrid_insert_threshold_ms: record_hybrid_insert_threshold_ms__,
2165 record_hybrid_get_threshold_ms: record_hybrid_get_threshold_ms__,
2166 record_hybrid_obtain_threshold_ms: record_hybrid_obtain_threshold_ms__,
2167 record_hybrid_remove_threshold_ms: record_hybrid_remove_threshold_ms__,
2168 record_hybrid_fetch_threshold_ms: record_hybrid_fetch_threshold_ms__,
2169 })
2170 }
2171 }
2172 deserializer.deserialize_struct("monitor_service.TieredCacheTracingRequest", FIELDS, GeneratedVisitor)
2173 }
2174}
2175impl serde::Serialize for TieredCacheTracingResponse {
2176 #[allow(deprecated)]
2177 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2178 where
2179 S: serde::Serializer,
2180 {
2181 use serde::ser::SerializeStruct;
2182 let len = 0;
2183 let struct_ser = serializer.serialize_struct("monitor_service.TieredCacheTracingResponse", len)?;
2184 struct_ser.end()
2185 }
2186}
2187impl<'de> serde::Deserialize<'de> for TieredCacheTracingResponse {
2188 #[allow(deprecated)]
2189 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2190 where
2191 D: serde::Deserializer<'de>,
2192 {
2193 const FIELDS: &[&str] = &[
2194 ];
2195
2196 #[allow(clippy::enum_variant_names)]
2197 enum GeneratedField {
2198 }
2199 impl<'de> serde::Deserialize<'de> for GeneratedField {
2200 fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2201 where
2202 D: serde::Deserializer<'de>,
2203 {
2204 struct GeneratedVisitor;
2205
2206 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2207 type Value = GeneratedField;
2208
2209 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2210 write!(formatter, "expected one of: {:?}", &FIELDS)
2211 }
2212
2213 #[allow(unused_variables)]
2214 fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2215 where
2216 E: serde::de::Error,
2217 {
2218 Err(serde::de::Error::unknown_field(value, FIELDS))
2219 }
2220 }
2221 deserializer.deserialize_identifier(GeneratedVisitor)
2222 }
2223 }
2224 struct GeneratedVisitor;
2225 impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2226 type Value = TieredCacheTracingResponse;
2227
2228 fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2229 formatter.write_str("struct monitor_service.TieredCacheTracingResponse")
2230 }
2231
2232 fn visit_map<V>(self, mut map_: V) -> std::result::Result<TieredCacheTracingResponse, V::Error>
2233 where
2234 V: serde::de::MapAccess<'de>,
2235 {
2236 while map_.next_key::<GeneratedField>()?.is_some() {
2237 let _ = map_.next_value::<serde::de::IgnoredAny>()?;
2238 }
2239 Ok(TieredCacheTracingResponse {
2240 })
2241 }
2242 }
2243 deserializer.deserialize_struct("monitor_service.TieredCacheTracingResponse", FIELDS, GeneratedVisitor)
2244 }
2245}