risingwave_pb/
hummock.serde.rs

1use crate::hummock::*;
2impl serde::Serialize for BloomFilterType {
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        let variant = match self {
9            Self::BloomFilterUnspecified => "BLOOM_FILTER_UNSPECIFIED",
10            Self::Sstable => "SSTABLE",
11            Self::Blocked => "BLOCKED",
12        };
13        serializer.serialize_str(variant)
14    }
15}
16impl<'de> serde::Deserialize<'de> for BloomFilterType {
17    #[allow(deprecated)]
18    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19    where
20        D: serde::Deserializer<'de>,
21    {
22        const FIELDS: &[&str] = &[
23            "BLOOM_FILTER_UNSPECIFIED",
24            "SSTABLE",
25            "BLOCKED",
26        ];
27
28        struct GeneratedVisitor;
29
30        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
31            type Value = BloomFilterType;
32
33            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
34                write!(formatter, "expected one of: {:?}", &FIELDS)
35            }
36
37            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
38            where
39                E: serde::de::Error,
40            {
41                i32::try_from(v)
42                    .ok()
43                    .and_then(|x| x.try_into().ok())
44                    .ok_or_else(|| {
45                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
46                    })
47            }
48
49            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
50            where
51                E: serde::de::Error,
52            {
53                i32::try_from(v)
54                    .ok()
55                    .and_then(|x| x.try_into().ok())
56                    .ok_or_else(|| {
57                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
58                    })
59            }
60
61            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
62            where
63                E: serde::de::Error,
64            {
65                match value {
66                    "BLOOM_FILTER_UNSPECIFIED" => Ok(BloomFilterType::BloomFilterUnspecified),
67                    "SSTABLE" => Ok(BloomFilterType::Sstable),
68                    "BLOCKED" => Ok(BloomFilterType::Blocked),
69                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
70                }
71            }
72        }
73        deserializer.deserialize_any(GeneratedVisitor)
74    }
75}
76impl serde::Serialize for BranchedObject {
77    #[allow(deprecated)]
78    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
79    where
80        S: serde::Serializer,
81    {
82        use serde::ser::SerializeStruct;
83        let mut len = 0;
84        if self.object_id != 0 {
85            len += 1;
86        }
87        if !self.sst_id.is_empty() {
88            len += 1;
89        }
90        if self.compaction_group_id != 0 {
91            len += 1;
92        }
93        let mut struct_ser = serializer.serialize_struct("hummock.BranchedObject", len)?;
94        if self.object_id != 0 {
95            #[allow(clippy::needless_borrow)]
96            #[allow(clippy::needless_borrows_for_generic_args)]
97            struct_ser.serialize_field("objectId", ToString::to_string(&self.object_id).as_str())?;
98        }
99        if !self.sst_id.is_empty() {
100            struct_ser.serialize_field("sstId", &self.sst_id.iter().map(ToString::to_string).collect::<Vec<_>>())?;
101        }
102        if self.compaction_group_id != 0 {
103            #[allow(clippy::needless_borrow)]
104            #[allow(clippy::needless_borrows_for_generic_args)]
105            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&self.compaction_group_id).as_str())?;
106        }
107        struct_ser.end()
108    }
109}
110impl<'de> serde::Deserialize<'de> for BranchedObject {
111    #[allow(deprecated)]
112    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
113    where
114        D: serde::Deserializer<'de>,
115    {
116        const FIELDS: &[&str] = &[
117            "object_id",
118            "objectId",
119            "sst_id",
120            "sstId",
121            "compaction_group_id",
122            "compactionGroupId",
123        ];
124
125        #[allow(clippy::enum_variant_names)]
126        enum GeneratedField {
127            ObjectId,
128            SstId,
129            CompactionGroupId,
130        }
131        impl<'de> serde::Deserialize<'de> for GeneratedField {
132            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
133            where
134                D: serde::Deserializer<'de>,
135            {
136                struct GeneratedVisitor;
137
138                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
139                    type Value = GeneratedField;
140
141                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
142                        write!(formatter, "expected one of: {:?}", &FIELDS)
143                    }
144
145                    #[allow(unused_variables)]
146                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
147                    where
148                        E: serde::de::Error,
149                    {
150                        match value {
151                            "objectId" | "object_id" => Ok(GeneratedField::ObjectId),
152                            "sstId" | "sst_id" => Ok(GeneratedField::SstId),
153                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
154                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
155                        }
156                    }
157                }
158                deserializer.deserialize_identifier(GeneratedVisitor)
159            }
160        }
161        struct GeneratedVisitor;
162        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
163            type Value = BranchedObject;
164
165            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
166                formatter.write_str("struct hummock.BranchedObject")
167            }
168
169            fn visit_map<V>(self, mut map_: V) -> std::result::Result<BranchedObject, V::Error>
170                where
171                    V: serde::de::MapAccess<'de>,
172            {
173                let mut object_id__ = None;
174                let mut sst_id__ = None;
175                let mut compaction_group_id__ = None;
176                while let Some(k) = map_.next_key()? {
177                    match k {
178                        GeneratedField::ObjectId => {
179                            if object_id__.is_some() {
180                                return Err(serde::de::Error::duplicate_field("objectId"));
181                            }
182                            object_id__ = 
183                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
184                            ;
185                        }
186                        GeneratedField::SstId => {
187                            if sst_id__.is_some() {
188                                return Err(serde::de::Error::duplicate_field("sstId"));
189                            }
190                            sst_id__ = 
191                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
192                                    .into_iter().map(|x| x.0).collect())
193                            ;
194                        }
195                        GeneratedField::CompactionGroupId => {
196                            if compaction_group_id__.is_some() {
197                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
198                            }
199                            compaction_group_id__ = 
200                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
201                            ;
202                        }
203                    }
204                }
205                Ok(BranchedObject {
206                    object_id: object_id__.unwrap_or_default(),
207                    sst_id: sst_id__.unwrap_or_default(),
208                    compaction_group_id: compaction_group_id__.unwrap_or_default(),
209                })
210            }
211        }
212        deserializer.deserialize_struct("hummock.BranchedObject", FIELDS, GeneratedVisitor)
213    }
214}
215impl serde::Serialize for CancelCompactTask {
216    #[allow(deprecated)]
217    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
218    where
219        S: serde::Serializer,
220    {
221        use serde::ser::SerializeStruct;
222        let mut len = 0;
223        if self.context_id != 0 {
224            len += 1;
225        }
226        if self.task_id != 0 {
227            len += 1;
228        }
229        let mut struct_ser = serializer.serialize_struct("hummock.CancelCompactTask", len)?;
230        if self.context_id != 0 {
231            struct_ser.serialize_field("contextId", &self.context_id)?;
232        }
233        if self.task_id != 0 {
234            #[allow(clippy::needless_borrow)]
235            #[allow(clippy::needless_borrows_for_generic_args)]
236            struct_ser.serialize_field("taskId", ToString::to_string(&self.task_id).as_str())?;
237        }
238        struct_ser.end()
239    }
240}
241impl<'de> serde::Deserialize<'de> for CancelCompactTask {
242    #[allow(deprecated)]
243    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
244    where
245        D: serde::Deserializer<'de>,
246    {
247        const FIELDS: &[&str] = &[
248            "context_id",
249            "contextId",
250            "task_id",
251            "taskId",
252        ];
253
254        #[allow(clippy::enum_variant_names)]
255        enum GeneratedField {
256            ContextId,
257            TaskId,
258        }
259        impl<'de> serde::Deserialize<'de> for GeneratedField {
260            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
261            where
262                D: serde::Deserializer<'de>,
263            {
264                struct GeneratedVisitor;
265
266                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
267                    type Value = GeneratedField;
268
269                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
270                        write!(formatter, "expected one of: {:?}", &FIELDS)
271                    }
272
273                    #[allow(unused_variables)]
274                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
275                    where
276                        E: serde::de::Error,
277                    {
278                        match value {
279                            "contextId" | "context_id" => Ok(GeneratedField::ContextId),
280                            "taskId" | "task_id" => Ok(GeneratedField::TaskId),
281                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
282                        }
283                    }
284                }
285                deserializer.deserialize_identifier(GeneratedVisitor)
286            }
287        }
288        struct GeneratedVisitor;
289        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
290            type Value = CancelCompactTask;
291
292            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
293                formatter.write_str("struct hummock.CancelCompactTask")
294            }
295
296            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CancelCompactTask, V::Error>
297                where
298                    V: serde::de::MapAccess<'de>,
299            {
300                let mut context_id__ = None;
301                let mut task_id__ = None;
302                while let Some(k) = map_.next_key()? {
303                    match k {
304                        GeneratedField::ContextId => {
305                            if context_id__.is_some() {
306                                return Err(serde::de::Error::duplicate_field("contextId"));
307                            }
308                            context_id__ = 
309                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
310                            ;
311                        }
312                        GeneratedField::TaskId => {
313                            if task_id__.is_some() {
314                                return Err(serde::de::Error::duplicate_field("taskId"));
315                            }
316                            task_id__ = 
317                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
318                            ;
319                        }
320                    }
321                }
322                Ok(CancelCompactTask {
323                    context_id: context_id__.unwrap_or_default(),
324                    task_id: task_id__.unwrap_or_default(),
325                })
326            }
327        }
328        deserializer.deserialize_struct("hummock.CancelCompactTask", FIELDS, GeneratedVisitor)
329    }
330}
331impl serde::Serialize for CancelCompactTaskRequest {
332    #[allow(deprecated)]
333    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
334    where
335        S: serde::Serializer,
336    {
337        use serde::ser::SerializeStruct;
338        let mut len = 0;
339        if self.task_id != 0 {
340            len += 1;
341        }
342        if self.task_status != 0 {
343            len += 1;
344        }
345        let mut struct_ser = serializer.serialize_struct("hummock.CancelCompactTaskRequest", len)?;
346        if self.task_id != 0 {
347            #[allow(clippy::needless_borrow)]
348            #[allow(clippy::needless_borrows_for_generic_args)]
349            struct_ser.serialize_field("taskId", ToString::to_string(&self.task_id).as_str())?;
350        }
351        if self.task_status != 0 {
352            let v = compact_task::TaskStatus::try_from(self.task_status)
353                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.task_status)))?;
354            struct_ser.serialize_field("taskStatus", &v)?;
355        }
356        struct_ser.end()
357    }
358}
359impl<'de> serde::Deserialize<'de> for CancelCompactTaskRequest {
360    #[allow(deprecated)]
361    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
362    where
363        D: serde::Deserializer<'de>,
364    {
365        const FIELDS: &[&str] = &[
366            "task_id",
367            "taskId",
368            "task_status",
369            "taskStatus",
370        ];
371
372        #[allow(clippy::enum_variant_names)]
373        enum GeneratedField {
374            TaskId,
375            TaskStatus,
376        }
377        impl<'de> serde::Deserialize<'de> for GeneratedField {
378            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
379            where
380                D: serde::Deserializer<'de>,
381            {
382                struct GeneratedVisitor;
383
384                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
385                    type Value = GeneratedField;
386
387                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
388                        write!(formatter, "expected one of: {:?}", &FIELDS)
389                    }
390
391                    #[allow(unused_variables)]
392                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
393                    where
394                        E: serde::de::Error,
395                    {
396                        match value {
397                            "taskId" | "task_id" => Ok(GeneratedField::TaskId),
398                            "taskStatus" | "task_status" => Ok(GeneratedField::TaskStatus),
399                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
400                        }
401                    }
402                }
403                deserializer.deserialize_identifier(GeneratedVisitor)
404            }
405        }
406        struct GeneratedVisitor;
407        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
408            type Value = CancelCompactTaskRequest;
409
410            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
411                formatter.write_str("struct hummock.CancelCompactTaskRequest")
412            }
413
414            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CancelCompactTaskRequest, V::Error>
415                where
416                    V: serde::de::MapAccess<'de>,
417            {
418                let mut task_id__ = None;
419                let mut task_status__ = None;
420                while let Some(k) = map_.next_key()? {
421                    match k {
422                        GeneratedField::TaskId => {
423                            if task_id__.is_some() {
424                                return Err(serde::de::Error::duplicate_field("taskId"));
425                            }
426                            task_id__ = 
427                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
428                            ;
429                        }
430                        GeneratedField::TaskStatus => {
431                            if task_status__.is_some() {
432                                return Err(serde::de::Error::duplicate_field("taskStatus"));
433                            }
434                            task_status__ = Some(map_.next_value::<compact_task::TaskStatus>()? as i32);
435                        }
436                    }
437                }
438                Ok(CancelCompactTaskRequest {
439                    task_id: task_id__.unwrap_or_default(),
440                    task_status: task_status__.unwrap_or_default(),
441                })
442            }
443        }
444        deserializer.deserialize_struct("hummock.CancelCompactTaskRequest", FIELDS, GeneratedVisitor)
445    }
446}
447impl serde::Serialize for CancelCompactTaskResponse {
448    #[allow(deprecated)]
449    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
450    where
451        S: serde::Serializer,
452    {
453        use serde::ser::SerializeStruct;
454        let mut len = 0;
455        if self.ret {
456            len += 1;
457        }
458        let mut struct_ser = serializer.serialize_struct("hummock.CancelCompactTaskResponse", len)?;
459        if self.ret {
460            struct_ser.serialize_field("ret", &self.ret)?;
461        }
462        struct_ser.end()
463    }
464}
465impl<'de> serde::Deserialize<'de> for CancelCompactTaskResponse {
466    #[allow(deprecated)]
467    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
468    where
469        D: serde::Deserializer<'de>,
470    {
471        const FIELDS: &[&str] = &[
472            "ret",
473        ];
474
475        #[allow(clippy::enum_variant_names)]
476        enum GeneratedField {
477            Ret,
478        }
479        impl<'de> serde::Deserialize<'de> for GeneratedField {
480            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
481            where
482                D: serde::Deserializer<'de>,
483            {
484                struct GeneratedVisitor;
485
486                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
487                    type Value = GeneratedField;
488
489                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
490                        write!(formatter, "expected one of: {:?}", &FIELDS)
491                    }
492
493                    #[allow(unused_variables)]
494                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
495                    where
496                        E: serde::de::Error,
497                    {
498                        match value {
499                            "ret" => Ok(GeneratedField::Ret),
500                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
501                        }
502                    }
503                }
504                deserializer.deserialize_identifier(GeneratedVisitor)
505            }
506        }
507        struct GeneratedVisitor;
508        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
509            type Value = CancelCompactTaskResponse;
510
511            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
512                formatter.write_str("struct hummock.CancelCompactTaskResponse")
513            }
514
515            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CancelCompactTaskResponse, V::Error>
516                where
517                    V: serde::de::MapAccess<'de>,
518            {
519                let mut ret__ = None;
520                while let Some(k) = map_.next_key()? {
521                    match k {
522                        GeneratedField::Ret => {
523                            if ret__.is_some() {
524                                return Err(serde::de::Error::duplicate_field("ret"));
525                            }
526                            ret__ = Some(map_.next_value()?);
527                        }
528                    }
529                }
530                Ok(CancelCompactTaskResponse {
531                    ret: ret__.unwrap_or_default(),
532                })
533            }
534        }
535        deserializer.deserialize_struct("hummock.CancelCompactTaskResponse", FIELDS, GeneratedVisitor)
536    }
537}
538impl serde::Serialize for CompactStatus {
539    #[allow(deprecated)]
540    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
541    where
542        S: serde::Serializer,
543    {
544        use serde::ser::SerializeStruct;
545        let mut len = 0;
546        if self.compaction_group_id != 0 {
547            len += 1;
548        }
549        if !self.level_handlers.is_empty() {
550            len += 1;
551        }
552        let mut struct_ser = serializer.serialize_struct("hummock.CompactStatus", len)?;
553        if self.compaction_group_id != 0 {
554            #[allow(clippy::needless_borrow)]
555            #[allow(clippy::needless_borrows_for_generic_args)]
556            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&self.compaction_group_id).as_str())?;
557        }
558        if !self.level_handlers.is_empty() {
559            struct_ser.serialize_field("levelHandlers", &self.level_handlers)?;
560        }
561        struct_ser.end()
562    }
563}
564impl<'de> serde::Deserialize<'de> for CompactStatus {
565    #[allow(deprecated)]
566    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
567    where
568        D: serde::Deserializer<'de>,
569    {
570        const FIELDS: &[&str] = &[
571            "compaction_group_id",
572            "compactionGroupId",
573            "level_handlers",
574            "levelHandlers",
575        ];
576
577        #[allow(clippy::enum_variant_names)]
578        enum GeneratedField {
579            CompactionGroupId,
580            LevelHandlers,
581        }
582        impl<'de> serde::Deserialize<'de> for GeneratedField {
583            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
584            where
585                D: serde::Deserializer<'de>,
586            {
587                struct GeneratedVisitor;
588
589                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
590                    type Value = GeneratedField;
591
592                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
593                        write!(formatter, "expected one of: {:?}", &FIELDS)
594                    }
595
596                    #[allow(unused_variables)]
597                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
598                    where
599                        E: serde::de::Error,
600                    {
601                        match value {
602                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
603                            "levelHandlers" | "level_handlers" => Ok(GeneratedField::LevelHandlers),
604                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
605                        }
606                    }
607                }
608                deserializer.deserialize_identifier(GeneratedVisitor)
609            }
610        }
611        struct GeneratedVisitor;
612        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
613            type Value = CompactStatus;
614
615            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
616                formatter.write_str("struct hummock.CompactStatus")
617            }
618
619            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CompactStatus, V::Error>
620                where
621                    V: serde::de::MapAccess<'de>,
622            {
623                let mut compaction_group_id__ = None;
624                let mut level_handlers__ = None;
625                while let Some(k) = map_.next_key()? {
626                    match k {
627                        GeneratedField::CompactionGroupId => {
628                            if compaction_group_id__.is_some() {
629                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
630                            }
631                            compaction_group_id__ = 
632                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
633                            ;
634                        }
635                        GeneratedField::LevelHandlers => {
636                            if level_handlers__.is_some() {
637                                return Err(serde::de::Error::duplicate_field("levelHandlers"));
638                            }
639                            level_handlers__ = Some(map_.next_value()?);
640                        }
641                    }
642                }
643                Ok(CompactStatus {
644                    compaction_group_id: compaction_group_id__.unwrap_or_default(),
645                    level_handlers: level_handlers__.unwrap_or_default(),
646                })
647            }
648        }
649        deserializer.deserialize_struct("hummock.CompactStatus", FIELDS, GeneratedVisitor)
650    }
651}
652impl serde::Serialize for CompactTask {
653    #[allow(deprecated)]
654    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
655    where
656        S: serde::Serializer,
657    {
658        use serde::ser::SerializeStruct;
659        let mut len = 0;
660        if !self.input_ssts.is_empty() {
661            len += 1;
662        }
663        if !self.splits.is_empty() {
664            len += 1;
665        }
666        if !self.sorted_output_ssts.is_empty() {
667            len += 1;
668        }
669        if self.task_id != 0 {
670            len += 1;
671        }
672        if self.target_level != 0 {
673            len += 1;
674        }
675        if self.gc_delete_keys {
676            len += 1;
677        }
678        if self.base_level != 0 {
679            len += 1;
680        }
681        if self.task_status != 0 {
682            len += 1;
683        }
684        if self.compaction_group_id != 0 {
685            len += 1;
686        }
687        if !self.existing_table_ids.is_empty() {
688            len += 1;
689        }
690        if self.compression_algorithm != 0 {
691            len += 1;
692        }
693        if self.target_file_size != 0 {
694            len += 1;
695        }
696        if self.compaction_filter_mask != 0 {
697            len += 1;
698        }
699        if !self.table_options.is_empty() {
700            len += 1;
701        }
702        if self.current_epoch_time != 0 {
703            len += 1;
704        }
705        if self.target_sub_level_id != 0 {
706            len += 1;
707        }
708        if self.task_type != 0 {
709            len += 1;
710        }
711        if self.split_by_state_table {
712            len += 1;
713        }
714        if self.split_weight_by_vnode != 0 {
715            len += 1;
716        }
717        if !self.table_vnode_partition.is_empty() {
718            len += 1;
719        }
720        if !self.table_watermarks.is_empty() {
721            len += 1;
722        }
723        if !self.table_schemas.is_empty() {
724            len += 1;
725        }
726        if self.max_sub_compaction != 0 {
727            len += 1;
728        }
729        if self.compaction_group_version_id != 0 {
730            len += 1;
731        }
732        let mut struct_ser = serializer.serialize_struct("hummock.CompactTask", len)?;
733        if !self.input_ssts.is_empty() {
734            struct_ser.serialize_field("inputSsts", &self.input_ssts)?;
735        }
736        if !self.splits.is_empty() {
737            struct_ser.serialize_field("splits", &self.splits)?;
738        }
739        if !self.sorted_output_ssts.is_empty() {
740            struct_ser.serialize_field("sortedOutputSsts", &self.sorted_output_ssts)?;
741        }
742        if self.task_id != 0 {
743            #[allow(clippy::needless_borrow)]
744            #[allow(clippy::needless_borrows_for_generic_args)]
745            struct_ser.serialize_field("taskId", ToString::to_string(&self.task_id).as_str())?;
746        }
747        if self.target_level != 0 {
748            struct_ser.serialize_field("targetLevel", &self.target_level)?;
749        }
750        if self.gc_delete_keys {
751            struct_ser.serialize_field("gcDeleteKeys", &self.gc_delete_keys)?;
752        }
753        if self.base_level != 0 {
754            struct_ser.serialize_field("baseLevel", &self.base_level)?;
755        }
756        if self.task_status != 0 {
757            let v = compact_task::TaskStatus::try_from(self.task_status)
758                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.task_status)))?;
759            struct_ser.serialize_field("taskStatus", &v)?;
760        }
761        if self.compaction_group_id != 0 {
762            #[allow(clippy::needless_borrow)]
763            #[allow(clippy::needless_borrows_for_generic_args)]
764            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&self.compaction_group_id).as_str())?;
765        }
766        if !self.existing_table_ids.is_empty() {
767            struct_ser.serialize_field("existingTableIds", &self.existing_table_ids)?;
768        }
769        if self.compression_algorithm != 0 {
770            struct_ser.serialize_field("compressionAlgorithm", &self.compression_algorithm)?;
771        }
772        if self.target_file_size != 0 {
773            #[allow(clippy::needless_borrow)]
774            #[allow(clippy::needless_borrows_for_generic_args)]
775            struct_ser.serialize_field("targetFileSize", ToString::to_string(&self.target_file_size).as_str())?;
776        }
777        if self.compaction_filter_mask != 0 {
778            struct_ser.serialize_field("compactionFilterMask", &self.compaction_filter_mask)?;
779        }
780        if !self.table_options.is_empty() {
781            struct_ser.serialize_field("tableOptions", &self.table_options)?;
782        }
783        if self.current_epoch_time != 0 {
784            #[allow(clippy::needless_borrow)]
785            #[allow(clippy::needless_borrows_for_generic_args)]
786            struct_ser.serialize_field("currentEpochTime", ToString::to_string(&self.current_epoch_time).as_str())?;
787        }
788        if self.target_sub_level_id != 0 {
789            #[allow(clippy::needless_borrow)]
790            #[allow(clippy::needless_borrows_for_generic_args)]
791            struct_ser.serialize_field("targetSubLevelId", ToString::to_string(&self.target_sub_level_id).as_str())?;
792        }
793        if self.task_type != 0 {
794            let v = compact_task::TaskType::try_from(self.task_type)
795                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.task_type)))?;
796            struct_ser.serialize_field("taskType", &v)?;
797        }
798        if self.split_by_state_table {
799            struct_ser.serialize_field("splitByStateTable", &self.split_by_state_table)?;
800        }
801        if self.split_weight_by_vnode != 0 {
802            struct_ser.serialize_field("splitWeightByVnode", &self.split_weight_by_vnode)?;
803        }
804        if !self.table_vnode_partition.is_empty() {
805            struct_ser.serialize_field("tableVnodePartition", &self.table_vnode_partition)?;
806        }
807        if !self.table_watermarks.is_empty() {
808            struct_ser.serialize_field("tableWatermarks", &self.table_watermarks)?;
809        }
810        if !self.table_schemas.is_empty() {
811            struct_ser.serialize_field("tableSchemas", &self.table_schemas)?;
812        }
813        if self.max_sub_compaction != 0 {
814            struct_ser.serialize_field("maxSubCompaction", &self.max_sub_compaction)?;
815        }
816        if self.compaction_group_version_id != 0 {
817            #[allow(clippy::needless_borrow)]
818            #[allow(clippy::needless_borrows_for_generic_args)]
819            struct_ser.serialize_field("compactionGroupVersionId", ToString::to_string(&self.compaction_group_version_id).as_str())?;
820        }
821        struct_ser.end()
822    }
823}
824impl<'de> serde::Deserialize<'de> for CompactTask {
825    #[allow(deprecated)]
826    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
827    where
828        D: serde::Deserializer<'de>,
829    {
830        const FIELDS: &[&str] = &[
831            "input_ssts",
832            "inputSsts",
833            "splits",
834            "sorted_output_ssts",
835            "sortedOutputSsts",
836            "task_id",
837            "taskId",
838            "target_level",
839            "targetLevel",
840            "gc_delete_keys",
841            "gcDeleteKeys",
842            "base_level",
843            "baseLevel",
844            "task_status",
845            "taskStatus",
846            "compaction_group_id",
847            "compactionGroupId",
848            "existing_table_ids",
849            "existingTableIds",
850            "compression_algorithm",
851            "compressionAlgorithm",
852            "target_file_size",
853            "targetFileSize",
854            "compaction_filter_mask",
855            "compactionFilterMask",
856            "table_options",
857            "tableOptions",
858            "current_epoch_time",
859            "currentEpochTime",
860            "target_sub_level_id",
861            "targetSubLevelId",
862            "task_type",
863            "taskType",
864            "split_by_state_table",
865            "splitByStateTable",
866            "split_weight_by_vnode",
867            "splitWeightByVnode",
868            "table_vnode_partition",
869            "tableVnodePartition",
870            "table_watermarks",
871            "tableWatermarks",
872            "table_schemas",
873            "tableSchemas",
874            "max_sub_compaction",
875            "maxSubCompaction",
876            "compaction_group_version_id",
877            "compactionGroupVersionId",
878        ];
879
880        #[allow(clippy::enum_variant_names)]
881        enum GeneratedField {
882            InputSsts,
883            Splits,
884            SortedOutputSsts,
885            TaskId,
886            TargetLevel,
887            GcDeleteKeys,
888            BaseLevel,
889            TaskStatus,
890            CompactionGroupId,
891            ExistingTableIds,
892            CompressionAlgorithm,
893            TargetFileSize,
894            CompactionFilterMask,
895            TableOptions,
896            CurrentEpochTime,
897            TargetSubLevelId,
898            TaskType,
899            SplitByStateTable,
900            SplitWeightByVnode,
901            TableVnodePartition,
902            TableWatermarks,
903            TableSchemas,
904            MaxSubCompaction,
905            CompactionGroupVersionId,
906        }
907        impl<'de> serde::Deserialize<'de> for GeneratedField {
908            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
909            where
910                D: serde::Deserializer<'de>,
911            {
912                struct GeneratedVisitor;
913
914                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
915                    type Value = GeneratedField;
916
917                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
918                        write!(formatter, "expected one of: {:?}", &FIELDS)
919                    }
920
921                    #[allow(unused_variables)]
922                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
923                    where
924                        E: serde::de::Error,
925                    {
926                        match value {
927                            "inputSsts" | "input_ssts" => Ok(GeneratedField::InputSsts),
928                            "splits" => Ok(GeneratedField::Splits),
929                            "sortedOutputSsts" | "sorted_output_ssts" => Ok(GeneratedField::SortedOutputSsts),
930                            "taskId" | "task_id" => Ok(GeneratedField::TaskId),
931                            "targetLevel" | "target_level" => Ok(GeneratedField::TargetLevel),
932                            "gcDeleteKeys" | "gc_delete_keys" => Ok(GeneratedField::GcDeleteKeys),
933                            "baseLevel" | "base_level" => Ok(GeneratedField::BaseLevel),
934                            "taskStatus" | "task_status" => Ok(GeneratedField::TaskStatus),
935                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
936                            "existingTableIds" | "existing_table_ids" => Ok(GeneratedField::ExistingTableIds),
937                            "compressionAlgorithm" | "compression_algorithm" => Ok(GeneratedField::CompressionAlgorithm),
938                            "targetFileSize" | "target_file_size" => Ok(GeneratedField::TargetFileSize),
939                            "compactionFilterMask" | "compaction_filter_mask" => Ok(GeneratedField::CompactionFilterMask),
940                            "tableOptions" | "table_options" => Ok(GeneratedField::TableOptions),
941                            "currentEpochTime" | "current_epoch_time" => Ok(GeneratedField::CurrentEpochTime),
942                            "targetSubLevelId" | "target_sub_level_id" => Ok(GeneratedField::TargetSubLevelId),
943                            "taskType" | "task_type" => Ok(GeneratedField::TaskType),
944                            "splitByStateTable" | "split_by_state_table" => Ok(GeneratedField::SplitByStateTable),
945                            "splitWeightByVnode" | "split_weight_by_vnode" => Ok(GeneratedField::SplitWeightByVnode),
946                            "tableVnodePartition" | "table_vnode_partition" => Ok(GeneratedField::TableVnodePartition),
947                            "tableWatermarks" | "table_watermarks" => Ok(GeneratedField::TableWatermarks),
948                            "tableSchemas" | "table_schemas" => Ok(GeneratedField::TableSchemas),
949                            "maxSubCompaction" | "max_sub_compaction" => Ok(GeneratedField::MaxSubCompaction),
950                            "compactionGroupVersionId" | "compaction_group_version_id" => Ok(GeneratedField::CompactionGroupVersionId),
951                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
952                        }
953                    }
954                }
955                deserializer.deserialize_identifier(GeneratedVisitor)
956            }
957        }
958        struct GeneratedVisitor;
959        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
960            type Value = CompactTask;
961
962            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
963                formatter.write_str("struct hummock.CompactTask")
964            }
965
966            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CompactTask, V::Error>
967                where
968                    V: serde::de::MapAccess<'de>,
969            {
970                let mut input_ssts__ = None;
971                let mut splits__ = None;
972                let mut sorted_output_ssts__ = None;
973                let mut task_id__ = None;
974                let mut target_level__ = None;
975                let mut gc_delete_keys__ = None;
976                let mut base_level__ = None;
977                let mut task_status__ = None;
978                let mut compaction_group_id__ = None;
979                let mut existing_table_ids__ = None;
980                let mut compression_algorithm__ = None;
981                let mut target_file_size__ = None;
982                let mut compaction_filter_mask__ = None;
983                let mut table_options__ = None;
984                let mut current_epoch_time__ = None;
985                let mut target_sub_level_id__ = None;
986                let mut task_type__ = None;
987                let mut split_by_state_table__ = None;
988                let mut split_weight_by_vnode__ = None;
989                let mut table_vnode_partition__ = None;
990                let mut table_watermarks__ = None;
991                let mut table_schemas__ = None;
992                let mut max_sub_compaction__ = None;
993                let mut compaction_group_version_id__ = None;
994                while let Some(k) = map_.next_key()? {
995                    match k {
996                        GeneratedField::InputSsts => {
997                            if input_ssts__.is_some() {
998                                return Err(serde::de::Error::duplicate_field("inputSsts"));
999                            }
1000                            input_ssts__ = Some(map_.next_value()?);
1001                        }
1002                        GeneratedField::Splits => {
1003                            if splits__.is_some() {
1004                                return Err(serde::de::Error::duplicate_field("splits"));
1005                            }
1006                            splits__ = Some(map_.next_value()?);
1007                        }
1008                        GeneratedField::SortedOutputSsts => {
1009                            if sorted_output_ssts__.is_some() {
1010                                return Err(serde::de::Error::duplicate_field("sortedOutputSsts"));
1011                            }
1012                            sorted_output_ssts__ = Some(map_.next_value()?);
1013                        }
1014                        GeneratedField::TaskId => {
1015                            if task_id__.is_some() {
1016                                return Err(serde::de::Error::duplicate_field("taskId"));
1017                            }
1018                            task_id__ = 
1019                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1020                            ;
1021                        }
1022                        GeneratedField::TargetLevel => {
1023                            if target_level__.is_some() {
1024                                return Err(serde::de::Error::duplicate_field("targetLevel"));
1025                            }
1026                            target_level__ = 
1027                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1028                            ;
1029                        }
1030                        GeneratedField::GcDeleteKeys => {
1031                            if gc_delete_keys__.is_some() {
1032                                return Err(serde::de::Error::duplicate_field("gcDeleteKeys"));
1033                            }
1034                            gc_delete_keys__ = Some(map_.next_value()?);
1035                        }
1036                        GeneratedField::BaseLevel => {
1037                            if base_level__.is_some() {
1038                                return Err(serde::de::Error::duplicate_field("baseLevel"));
1039                            }
1040                            base_level__ = 
1041                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1042                            ;
1043                        }
1044                        GeneratedField::TaskStatus => {
1045                            if task_status__.is_some() {
1046                                return Err(serde::de::Error::duplicate_field("taskStatus"));
1047                            }
1048                            task_status__ = Some(map_.next_value::<compact_task::TaskStatus>()? as i32);
1049                        }
1050                        GeneratedField::CompactionGroupId => {
1051                            if compaction_group_id__.is_some() {
1052                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
1053                            }
1054                            compaction_group_id__ = 
1055                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1056                            ;
1057                        }
1058                        GeneratedField::ExistingTableIds => {
1059                            if existing_table_ids__.is_some() {
1060                                return Err(serde::de::Error::duplicate_field("existingTableIds"));
1061                            }
1062                            existing_table_ids__ = 
1063                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1064                                    .into_iter().map(|x| x.0).collect())
1065                            ;
1066                        }
1067                        GeneratedField::CompressionAlgorithm => {
1068                            if compression_algorithm__.is_some() {
1069                                return Err(serde::de::Error::duplicate_field("compressionAlgorithm"));
1070                            }
1071                            compression_algorithm__ = 
1072                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1073                            ;
1074                        }
1075                        GeneratedField::TargetFileSize => {
1076                            if target_file_size__.is_some() {
1077                                return Err(serde::de::Error::duplicate_field("targetFileSize"));
1078                            }
1079                            target_file_size__ = 
1080                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1081                            ;
1082                        }
1083                        GeneratedField::CompactionFilterMask => {
1084                            if compaction_filter_mask__.is_some() {
1085                                return Err(serde::de::Error::duplicate_field("compactionFilterMask"));
1086                            }
1087                            compaction_filter_mask__ = 
1088                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1089                            ;
1090                        }
1091                        GeneratedField::TableOptions => {
1092                            if table_options__.is_some() {
1093                                return Err(serde::de::Error::duplicate_field("tableOptions"));
1094                            }
1095                            table_options__ = Some(
1096                                map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
1097                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
1098                            );
1099                        }
1100                        GeneratedField::CurrentEpochTime => {
1101                            if current_epoch_time__.is_some() {
1102                                return Err(serde::de::Error::duplicate_field("currentEpochTime"));
1103                            }
1104                            current_epoch_time__ = 
1105                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1106                            ;
1107                        }
1108                        GeneratedField::TargetSubLevelId => {
1109                            if target_sub_level_id__.is_some() {
1110                                return Err(serde::de::Error::duplicate_field("targetSubLevelId"));
1111                            }
1112                            target_sub_level_id__ = 
1113                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1114                            ;
1115                        }
1116                        GeneratedField::TaskType => {
1117                            if task_type__.is_some() {
1118                                return Err(serde::de::Error::duplicate_field("taskType"));
1119                            }
1120                            task_type__ = Some(map_.next_value::<compact_task::TaskType>()? as i32);
1121                        }
1122                        GeneratedField::SplitByStateTable => {
1123                            if split_by_state_table__.is_some() {
1124                                return Err(serde::de::Error::duplicate_field("splitByStateTable"));
1125                            }
1126                            split_by_state_table__ = Some(map_.next_value()?);
1127                        }
1128                        GeneratedField::SplitWeightByVnode => {
1129                            if split_weight_by_vnode__.is_some() {
1130                                return Err(serde::de::Error::duplicate_field("splitWeightByVnode"));
1131                            }
1132                            split_weight_by_vnode__ = 
1133                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1134                            ;
1135                        }
1136                        GeneratedField::TableVnodePartition => {
1137                            if table_vnode_partition__.is_some() {
1138                                return Err(serde::de::Error::duplicate_field("tableVnodePartition"));
1139                            }
1140                            table_vnode_partition__ = Some(
1141                                map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, ::pbjson::private::NumberDeserialize<u32>>>()?
1142                                    .into_iter().map(|(k,v)| (k.0, v.0)).collect()
1143                            );
1144                        }
1145                        GeneratedField::TableWatermarks => {
1146                            if table_watermarks__.is_some() {
1147                                return Err(serde::de::Error::duplicate_field("tableWatermarks"));
1148                            }
1149                            table_watermarks__ = Some(
1150                                map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
1151                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
1152                            );
1153                        }
1154                        GeneratedField::TableSchemas => {
1155                            if table_schemas__.is_some() {
1156                                return Err(serde::de::Error::duplicate_field("tableSchemas"));
1157                            }
1158                            table_schemas__ = Some(
1159                                map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
1160                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
1161                            );
1162                        }
1163                        GeneratedField::MaxSubCompaction => {
1164                            if max_sub_compaction__.is_some() {
1165                                return Err(serde::de::Error::duplicate_field("maxSubCompaction"));
1166                            }
1167                            max_sub_compaction__ = 
1168                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1169                            ;
1170                        }
1171                        GeneratedField::CompactionGroupVersionId => {
1172                            if compaction_group_version_id__.is_some() {
1173                                return Err(serde::de::Error::duplicate_field("compactionGroupVersionId"));
1174                            }
1175                            compaction_group_version_id__ = 
1176                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1177                            ;
1178                        }
1179                    }
1180                }
1181                Ok(CompactTask {
1182                    input_ssts: input_ssts__.unwrap_or_default(),
1183                    splits: splits__.unwrap_or_default(),
1184                    sorted_output_ssts: sorted_output_ssts__.unwrap_or_default(),
1185                    task_id: task_id__.unwrap_or_default(),
1186                    target_level: target_level__.unwrap_or_default(),
1187                    gc_delete_keys: gc_delete_keys__.unwrap_or_default(),
1188                    base_level: base_level__.unwrap_or_default(),
1189                    task_status: task_status__.unwrap_or_default(),
1190                    compaction_group_id: compaction_group_id__.unwrap_or_default(),
1191                    existing_table_ids: existing_table_ids__.unwrap_or_default(),
1192                    compression_algorithm: compression_algorithm__.unwrap_or_default(),
1193                    target_file_size: target_file_size__.unwrap_or_default(),
1194                    compaction_filter_mask: compaction_filter_mask__.unwrap_or_default(),
1195                    table_options: table_options__.unwrap_or_default(),
1196                    current_epoch_time: current_epoch_time__.unwrap_or_default(),
1197                    target_sub_level_id: target_sub_level_id__.unwrap_or_default(),
1198                    task_type: task_type__.unwrap_or_default(),
1199                    split_by_state_table: split_by_state_table__.unwrap_or_default(),
1200                    split_weight_by_vnode: split_weight_by_vnode__.unwrap_or_default(),
1201                    table_vnode_partition: table_vnode_partition__.unwrap_or_default(),
1202                    table_watermarks: table_watermarks__.unwrap_or_default(),
1203                    table_schemas: table_schemas__.unwrap_or_default(),
1204                    max_sub_compaction: max_sub_compaction__.unwrap_or_default(),
1205                    compaction_group_version_id: compaction_group_version_id__.unwrap_or_default(),
1206                })
1207            }
1208        }
1209        deserializer.deserialize_struct("hummock.CompactTask", FIELDS, GeneratedVisitor)
1210    }
1211}
1212impl serde::Serialize for compact_task::TaskStatus {
1213    #[allow(deprecated)]
1214    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1215    where
1216        S: serde::Serializer,
1217    {
1218        let variant = match self {
1219            Self::Unspecified => "UNSPECIFIED",
1220            Self::Pending => "PENDING",
1221            Self::Success => "SUCCESS",
1222            Self::HeartbeatCanceled => "HEARTBEAT_CANCELED",
1223            Self::NoAvailMemoryResourceCanceled => "NO_AVAIL_MEMORY_RESOURCE_CANCELED",
1224            Self::AssignFailCanceled => "ASSIGN_FAIL_CANCELED",
1225            Self::SendFailCanceled => "SEND_FAIL_CANCELED",
1226            Self::ManualCanceled => "MANUAL_CANCELED",
1227            Self::InvalidGroupCanceled => "INVALID_GROUP_CANCELED",
1228            Self::InputOutdatedCanceled => "INPUT_OUTDATED_CANCELED",
1229            Self::ExecuteFailed => "EXECUTE_FAILED",
1230            Self::JoinHandleFailed => "JOIN_HANDLE_FAILED",
1231            Self::TrackSstObjectIdFailed => "TRACK_SST_OBJECT_ID_FAILED",
1232            Self::NoAvailCpuResourceCanceled => "NO_AVAIL_CPU_RESOURCE_CANCELED",
1233            Self::HeartbeatProgressCanceled => "HEARTBEAT_PROGRESS_CANCELED",
1234            Self::RetentionTimeRejected => "RETENTION_TIME_REJECTED",
1235            Self::ServerlessSendFailCanceled => "SERVERLESS_SEND_FAIL_CANCELED",
1236            Self::ServerlessTableNotFoundCanceled => "SERVERLESS_TABLE_NOT_FOUND_CANCELED",
1237        };
1238        serializer.serialize_str(variant)
1239    }
1240}
1241impl<'de> serde::Deserialize<'de> for compact_task::TaskStatus {
1242    #[allow(deprecated)]
1243    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1244    where
1245        D: serde::Deserializer<'de>,
1246    {
1247        const FIELDS: &[&str] = &[
1248            "UNSPECIFIED",
1249            "PENDING",
1250            "SUCCESS",
1251            "HEARTBEAT_CANCELED",
1252            "NO_AVAIL_MEMORY_RESOURCE_CANCELED",
1253            "ASSIGN_FAIL_CANCELED",
1254            "SEND_FAIL_CANCELED",
1255            "MANUAL_CANCELED",
1256            "INVALID_GROUP_CANCELED",
1257            "INPUT_OUTDATED_CANCELED",
1258            "EXECUTE_FAILED",
1259            "JOIN_HANDLE_FAILED",
1260            "TRACK_SST_OBJECT_ID_FAILED",
1261            "NO_AVAIL_CPU_RESOURCE_CANCELED",
1262            "HEARTBEAT_PROGRESS_CANCELED",
1263            "RETENTION_TIME_REJECTED",
1264            "SERVERLESS_SEND_FAIL_CANCELED",
1265            "SERVERLESS_TABLE_NOT_FOUND_CANCELED",
1266        ];
1267
1268        struct GeneratedVisitor;
1269
1270        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1271            type Value = compact_task::TaskStatus;
1272
1273            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1274                write!(formatter, "expected one of: {:?}", &FIELDS)
1275            }
1276
1277            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
1278            where
1279                E: serde::de::Error,
1280            {
1281                i32::try_from(v)
1282                    .ok()
1283                    .and_then(|x| x.try_into().ok())
1284                    .ok_or_else(|| {
1285                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
1286                    })
1287            }
1288
1289            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
1290            where
1291                E: serde::de::Error,
1292            {
1293                i32::try_from(v)
1294                    .ok()
1295                    .and_then(|x| x.try_into().ok())
1296                    .ok_or_else(|| {
1297                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
1298                    })
1299            }
1300
1301            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1302            where
1303                E: serde::de::Error,
1304            {
1305                match value {
1306                    "UNSPECIFIED" => Ok(compact_task::TaskStatus::Unspecified),
1307                    "PENDING" => Ok(compact_task::TaskStatus::Pending),
1308                    "SUCCESS" => Ok(compact_task::TaskStatus::Success),
1309                    "HEARTBEAT_CANCELED" => Ok(compact_task::TaskStatus::HeartbeatCanceled),
1310                    "NO_AVAIL_MEMORY_RESOURCE_CANCELED" => Ok(compact_task::TaskStatus::NoAvailMemoryResourceCanceled),
1311                    "ASSIGN_FAIL_CANCELED" => Ok(compact_task::TaskStatus::AssignFailCanceled),
1312                    "SEND_FAIL_CANCELED" => Ok(compact_task::TaskStatus::SendFailCanceled),
1313                    "MANUAL_CANCELED" => Ok(compact_task::TaskStatus::ManualCanceled),
1314                    "INVALID_GROUP_CANCELED" => Ok(compact_task::TaskStatus::InvalidGroupCanceled),
1315                    "INPUT_OUTDATED_CANCELED" => Ok(compact_task::TaskStatus::InputOutdatedCanceled),
1316                    "EXECUTE_FAILED" => Ok(compact_task::TaskStatus::ExecuteFailed),
1317                    "JOIN_HANDLE_FAILED" => Ok(compact_task::TaskStatus::JoinHandleFailed),
1318                    "TRACK_SST_OBJECT_ID_FAILED" => Ok(compact_task::TaskStatus::TrackSstObjectIdFailed),
1319                    "NO_AVAIL_CPU_RESOURCE_CANCELED" => Ok(compact_task::TaskStatus::NoAvailCpuResourceCanceled),
1320                    "HEARTBEAT_PROGRESS_CANCELED" => Ok(compact_task::TaskStatus::HeartbeatProgressCanceled),
1321                    "RETENTION_TIME_REJECTED" => Ok(compact_task::TaskStatus::RetentionTimeRejected),
1322                    "SERVERLESS_SEND_FAIL_CANCELED" => Ok(compact_task::TaskStatus::ServerlessSendFailCanceled),
1323                    "SERVERLESS_TABLE_NOT_FOUND_CANCELED" => Ok(compact_task::TaskStatus::ServerlessTableNotFoundCanceled),
1324                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
1325                }
1326            }
1327        }
1328        deserializer.deserialize_any(GeneratedVisitor)
1329    }
1330}
1331impl serde::Serialize for compact_task::TaskType {
1332    #[allow(deprecated)]
1333    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1334    where
1335        S: serde::Serializer,
1336    {
1337        let variant = match self {
1338            Self::TypeUnspecified => "TYPE_UNSPECIFIED",
1339            Self::Dynamic => "DYNAMIC",
1340            Self::SpaceReclaim => "SPACE_RECLAIM",
1341            Self::Manual => "MANUAL",
1342            Self::SharedBuffer => "SHARED_BUFFER",
1343            Self::Ttl => "TTL",
1344            Self::Tombstone => "TOMBSTONE",
1345            Self::Emergency => "EMERGENCY",
1346            Self::VnodeWatermark => "VNODE_WATERMARK",
1347        };
1348        serializer.serialize_str(variant)
1349    }
1350}
1351impl<'de> serde::Deserialize<'de> for compact_task::TaskType {
1352    #[allow(deprecated)]
1353    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1354    where
1355        D: serde::Deserializer<'de>,
1356    {
1357        const FIELDS: &[&str] = &[
1358            "TYPE_UNSPECIFIED",
1359            "DYNAMIC",
1360            "SPACE_RECLAIM",
1361            "MANUAL",
1362            "SHARED_BUFFER",
1363            "TTL",
1364            "TOMBSTONE",
1365            "EMERGENCY",
1366            "VNODE_WATERMARK",
1367        ];
1368
1369        struct GeneratedVisitor;
1370
1371        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1372            type Value = compact_task::TaskType;
1373
1374            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1375                write!(formatter, "expected one of: {:?}", &FIELDS)
1376            }
1377
1378            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
1379            where
1380                E: serde::de::Error,
1381            {
1382                i32::try_from(v)
1383                    .ok()
1384                    .and_then(|x| x.try_into().ok())
1385                    .ok_or_else(|| {
1386                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
1387                    })
1388            }
1389
1390            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
1391            where
1392                E: serde::de::Error,
1393            {
1394                i32::try_from(v)
1395                    .ok()
1396                    .and_then(|x| x.try_into().ok())
1397                    .ok_or_else(|| {
1398                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
1399                    })
1400            }
1401
1402            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1403            where
1404                E: serde::de::Error,
1405            {
1406                match value {
1407                    "TYPE_UNSPECIFIED" => Ok(compact_task::TaskType::TypeUnspecified),
1408                    "DYNAMIC" => Ok(compact_task::TaskType::Dynamic),
1409                    "SPACE_RECLAIM" => Ok(compact_task::TaskType::SpaceReclaim),
1410                    "MANUAL" => Ok(compact_task::TaskType::Manual),
1411                    "SHARED_BUFFER" => Ok(compact_task::TaskType::SharedBuffer),
1412                    "TTL" => Ok(compact_task::TaskType::Ttl),
1413                    "TOMBSTONE" => Ok(compact_task::TaskType::Tombstone),
1414                    "EMERGENCY" => Ok(compact_task::TaskType::Emergency),
1415                    "VNODE_WATERMARK" => Ok(compact_task::TaskType::VnodeWatermark),
1416                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
1417                }
1418            }
1419        }
1420        deserializer.deserialize_any(GeneratedVisitor)
1421    }
1422}
1423impl serde::Serialize for CompactTaskAssignment {
1424    #[allow(deprecated)]
1425    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1426    where
1427        S: serde::Serializer,
1428    {
1429        use serde::ser::SerializeStruct;
1430        let mut len = 0;
1431        if self.compact_task.is_some() {
1432            len += 1;
1433        }
1434        if self.context_id != 0 {
1435            len += 1;
1436        }
1437        let mut struct_ser = serializer.serialize_struct("hummock.CompactTaskAssignment", len)?;
1438        if let Some(v) = self.compact_task.as_ref() {
1439            struct_ser.serialize_field("compactTask", v)?;
1440        }
1441        if self.context_id != 0 {
1442            struct_ser.serialize_field("contextId", &self.context_id)?;
1443        }
1444        struct_ser.end()
1445    }
1446}
1447impl<'de> serde::Deserialize<'de> for CompactTaskAssignment {
1448    #[allow(deprecated)]
1449    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1450    where
1451        D: serde::Deserializer<'de>,
1452    {
1453        const FIELDS: &[&str] = &[
1454            "compact_task",
1455            "compactTask",
1456            "context_id",
1457            "contextId",
1458        ];
1459
1460        #[allow(clippy::enum_variant_names)]
1461        enum GeneratedField {
1462            CompactTask,
1463            ContextId,
1464        }
1465        impl<'de> serde::Deserialize<'de> for GeneratedField {
1466            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1467            where
1468                D: serde::Deserializer<'de>,
1469            {
1470                struct GeneratedVisitor;
1471
1472                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1473                    type Value = GeneratedField;
1474
1475                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1476                        write!(formatter, "expected one of: {:?}", &FIELDS)
1477                    }
1478
1479                    #[allow(unused_variables)]
1480                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1481                    where
1482                        E: serde::de::Error,
1483                    {
1484                        match value {
1485                            "compactTask" | "compact_task" => Ok(GeneratedField::CompactTask),
1486                            "contextId" | "context_id" => Ok(GeneratedField::ContextId),
1487                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1488                        }
1489                    }
1490                }
1491                deserializer.deserialize_identifier(GeneratedVisitor)
1492            }
1493        }
1494        struct GeneratedVisitor;
1495        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1496            type Value = CompactTaskAssignment;
1497
1498            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1499                formatter.write_str("struct hummock.CompactTaskAssignment")
1500            }
1501
1502            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CompactTaskAssignment, V::Error>
1503                where
1504                    V: serde::de::MapAccess<'de>,
1505            {
1506                let mut compact_task__ = None;
1507                let mut context_id__ = None;
1508                while let Some(k) = map_.next_key()? {
1509                    match k {
1510                        GeneratedField::CompactTask => {
1511                            if compact_task__.is_some() {
1512                                return Err(serde::de::Error::duplicate_field("compactTask"));
1513                            }
1514                            compact_task__ = map_.next_value()?;
1515                        }
1516                        GeneratedField::ContextId => {
1517                            if context_id__.is_some() {
1518                                return Err(serde::de::Error::duplicate_field("contextId"));
1519                            }
1520                            context_id__ = 
1521                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1522                            ;
1523                        }
1524                    }
1525                }
1526                Ok(CompactTaskAssignment {
1527                    compact_task: compact_task__,
1528                    context_id: context_id__.unwrap_or_default(),
1529                })
1530            }
1531        }
1532        deserializer.deserialize_struct("hummock.CompactTaskAssignment", FIELDS, GeneratedVisitor)
1533    }
1534}
1535impl serde::Serialize for CompactTaskProgress {
1536    #[allow(deprecated)]
1537    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1538    where
1539        S: serde::Serializer,
1540    {
1541        use serde::ser::SerializeStruct;
1542        let mut len = 0;
1543        if self.task_id != 0 {
1544            len += 1;
1545        }
1546        if self.num_ssts_sealed != 0 {
1547            len += 1;
1548        }
1549        if self.num_ssts_uploaded != 0 {
1550            len += 1;
1551        }
1552        if self.num_progress_key != 0 {
1553            len += 1;
1554        }
1555        if self.num_pending_read_io != 0 {
1556            len += 1;
1557        }
1558        if self.num_pending_write_io != 0 {
1559            len += 1;
1560        }
1561        if self.compaction_group_id.is_some() {
1562            len += 1;
1563        }
1564        let mut struct_ser = serializer.serialize_struct("hummock.CompactTaskProgress", len)?;
1565        if self.task_id != 0 {
1566            #[allow(clippy::needless_borrow)]
1567            #[allow(clippy::needless_borrows_for_generic_args)]
1568            struct_ser.serialize_field("taskId", ToString::to_string(&self.task_id).as_str())?;
1569        }
1570        if self.num_ssts_sealed != 0 {
1571            struct_ser.serialize_field("numSstsSealed", &self.num_ssts_sealed)?;
1572        }
1573        if self.num_ssts_uploaded != 0 {
1574            struct_ser.serialize_field("numSstsUploaded", &self.num_ssts_uploaded)?;
1575        }
1576        if self.num_progress_key != 0 {
1577            #[allow(clippy::needless_borrow)]
1578            #[allow(clippy::needless_borrows_for_generic_args)]
1579            struct_ser.serialize_field("numProgressKey", ToString::to_string(&self.num_progress_key).as_str())?;
1580        }
1581        if self.num_pending_read_io != 0 {
1582            #[allow(clippy::needless_borrow)]
1583            #[allow(clippy::needless_borrows_for_generic_args)]
1584            struct_ser.serialize_field("numPendingReadIo", ToString::to_string(&self.num_pending_read_io).as_str())?;
1585        }
1586        if self.num_pending_write_io != 0 {
1587            #[allow(clippy::needless_borrow)]
1588            #[allow(clippy::needless_borrows_for_generic_args)]
1589            struct_ser.serialize_field("numPendingWriteIo", ToString::to_string(&self.num_pending_write_io).as_str())?;
1590        }
1591        if let Some(v) = self.compaction_group_id.as_ref() {
1592            #[allow(clippy::needless_borrow)]
1593            #[allow(clippy::needless_borrows_for_generic_args)]
1594            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&v).as_str())?;
1595        }
1596        struct_ser.end()
1597    }
1598}
1599impl<'de> serde::Deserialize<'de> for CompactTaskProgress {
1600    #[allow(deprecated)]
1601    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1602    where
1603        D: serde::Deserializer<'de>,
1604    {
1605        const FIELDS: &[&str] = &[
1606            "task_id",
1607            "taskId",
1608            "num_ssts_sealed",
1609            "numSstsSealed",
1610            "num_ssts_uploaded",
1611            "numSstsUploaded",
1612            "num_progress_key",
1613            "numProgressKey",
1614            "num_pending_read_io",
1615            "numPendingReadIo",
1616            "num_pending_write_io",
1617            "numPendingWriteIo",
1618            "compaction_group_id",
1619            "compactionGroupId",
1620        ];
1621
1622        #[allow(clippy::enum_variant_names)]
1623        enum GeneratedField {
1624            TaskId,
1625            NumSstsSealed,
1626            NumSstsUploaded,
1627            NumProgressKey,
1628            NumPendingReadIo,
1629            NumPendingWriteIo,
1630            CompactionGroupId,
1631        }
1632        impl<'de> serde::Deserialize<'de> for GeneratedField {
1633            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1634            where
1635                D: serde::Deserializer<'de>,
1636            {
1637                struct GeneratedVisitor;
1638
1639                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1640                    type Value = GeneratedField;
1641
1642                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1643                        write!(formatter, "expected one of: {:?}", &FIELDS)
1644                    }
1645
1646                    #[allow(unused_variables)]
1647                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1648                    where
1649                        E: serde::de::Error,
1650                    {
1651                        match value {
1652                            "taskId" | "task_id" => Ok(GeneratedField::TaskId),
1653                            "numSstsSealed" | "num_ssts_sealed" => Ok(GeneratedField::NumSstsSealed),
1654                            "numSstsUploaded" | "num_ssts_uploaded" => Ok(GeneratedField::NumSstsUploaded),
1655                            "numProgressKey" | "num_progress_key" => Ok(GeneratedField::NumProgressKey),
1656                            "numPendingReadIo" | "num_pending_read_io" => Ok(GeneratedField::NumPendingReadIo),
1657                            "numPendingWriteIo" | "num_pending_write_io" => Ok(GeneratedField::NumPendingWriteIo),
1658                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
1659                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1660                        }
1661                    }
1662                }
1663                deserializer.deserialize_identifier(GeneratedVisitor)
1664            }
1665        }
1666        struct GeneratedVisitor;
1667        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1668            type Value = CompactTaskProgress;
1669
1670            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1671                formatter.write_str("struct hummock.CompactTaskProgress")
1672            }
1673
1674            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CompactTaskProgress, V::Error>
1675                where
1676                    V: serde::de::MapAccess<'de>,
1677            {
1678                let mut task_id__ = None;
1679                let mut num_ssts_sealed__ = None;
1680                let mut num_ssts_uploaded__ = None;
1681                let mut num_progress_key__ = None;
1682                let mut num_pending_read_io__ = None;
1683                let mut num_pending_write_io__ = None;
1684                let mut compaction_group_id__ = None;
1685                while let Some(k) = map_.next_key()? {
1686                    match k {
1687                        GeneratedField::TaskId => {
1688                            if task_id__.is_some() {
1689                                return Err(serde::de::Error::duplicate_field("taskId"));
1690                            }
1691                            task_id__ = 
1692                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1693                            ;
1694                        }
1695                        GeneratedField::NumSstsSealed => {
1696                            if num_ssts_sealed__.is_some() {
1697                                return Err(serde::de::Error::duplicate_field("numSstsSealed"));
1698                            }
1699                            num_ssts_sealed__ = 
1700                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1701                            ;
1702                        }
1703                        GeneratedField::NumSstsUploaded => {
1704                            if num_ssts_uploaded__.is_some() {
1705                                return Err(serde::de::Error::duplicate_field("numSstsUploaded"));
1706                            }
1707                            num_ssts_uploaded__ = 
1708                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1709                            ;
1710                        }
1711                        GeneratedField::NumProgressKey => {
1712                            if num_progress_key__.is_some() {
1713                                return Err(serde::de::Error::duplicate_field("numProgressKey"));
1714                            }
1715                            num_progress_key__ = 
1716                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1717                            ;
1718                        }
1719                        GeneratedField::NumPendingReadIo => {
1720                            if num_pending_read_io__.is_some() {
1721                                return Err(serde::de::Error::duplicate_field("numPendingReadIo"));
1722                            }
1723                            num_pending_read_io__ = 
1724                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1725                            ;
1726                        }
1727                        GeneratedField::NumPendingWriteIo => {
1728                            if num_pending_write_io__.is_some() {
1729                                return Err(serde::de::Error::duplicate_field("numPendingWriteIo"));
1730                            }
1731                            num_pending_write_io__ = 
1732                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1733                            ;
1734                        }
1735                        GeneratedField::CompactionGroupId => {
1736                            if compaction_group_id__.is_some() {
1737                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
1738                            }
1739                            compaction_group_id__ = 
1740                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
1741                            ;
1742                        }
1743                    }
1744                }
1745                Ok(CompactTaskProgress {
1746                    task_id: task_id__.unwrap_or_default(),
1747                    num_ssts_sealed: num_ssts_sealed__.unwrap_or_default(),
1748                    num_ssts_uploaded: num_ssts_uploaded__.unwrap_or_default(),
1749                    num_progress_key: num_progress_key__.unwrap_or_default(),
1750                    num_pending_read_io: num_pending_read_io__.unwrap_or_default(),
1751                    num_pending_write_io: num_pending_write_io__.unwrap_or_default(),
1752                    compaction_group_id: compaction_group_id__,
1753                })
1754            }
1755        }
1756        deserializer.deserialize_struct("hummock.CompactTaskProgress", FIELDS, GeneratedVisitor)
1757    }
1758}
1759impl serde::Serialize for CompactionConfig {
1760    #[allow(deprecated)]
1761    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1762    where
1763        S: serde::Serializer,
1764    {
1765        use serde::ser::SerializeStruct;
1766        let mut len = 0;
1767        if self.max_bytes_for_level_base != 0 {
1768            len += 1;
1769        }
1770        if self.max_level != 0 {
1771            len += 1;
1772        }
1773        if self.max_bytes_for_level_multiplier != 0 {
1774            len += 1;
1775        }
1776        if self.max_compaction_bytes != 0 {
1777            len += 1;
1778        }
1779        if self.sub_level_max_compaction_bytes != 0 {
1780            len += 1;
1781        }
1782        if self.level0_tier_compact_file_number != 0 {
1783            len += 1;
1784        }
1785        if self.compaction_mode != 0 {
1786            len += 1;
1787        }
1788        if !self.compression_algorithm.is_empty() {
1789            len += 1;
1790        }
1791        if self.target_file_size_base != 0 {
1792            len += 1;
1793        }
1794        if self.compaction_filter_mask != 0 {
1795            len += 1;
1796        }
1797        if self.max_sub_compaction != 0 {
1798            len += 1;
1799        }
1800        if self.max_space_reclaim_bytes != 0 {
1801            len += 1;
1802        }
1803        if self.split_by_state_table {
1804            len += 1;
1805        }
1806        if self.split_weight_by_vnode != 0 {
1807            len += 1;
1808        }
1809        if self.level0_stop_write_threshold_sub_level_number != 0 {
1810            len += 1;
1811        }
1812        if self.level0_max_compact_file_number != 0 {
1813            len += 1;
1814        }
1815        if self.level0_sub_level_compact_level_count != 0 {
1816            len += 1;
1817        }
1818        if self.level0_overlapping_sub_level_compact_level_count != 0 {
1819            len += 1;
1820        }
1821        if self.tombstone_reclaim_ratio != 0 {
1822            len += 1;
1823        }
1824        if self.enable_emergency_picker {
1825            len += 1;
1826        }
1827        if self.max_l0_compact_level_count.is_some() {
1828            len += 1;
1829        }
1830        if self.sst_allowed_trivial_move_min_size.is_some() {
1831            len += 1;
1832        }
1833        if self.disable_auto_group_scheduling.is_some() {
1834            len += 1;
1835        }
1836        if self.max_overlapping_level_size.is_some() {
1837            len += 1;
1838        }
1839        if self.emergency_level0_sst_file_count.is_some() {
1840            len += 1;
1841        }
1842        if self.emergency_level0_sub_level_partition.is_some() {
1843            len += 1;
1844        }
1845        if self.level0_stop_write_threshold_max_sst_count.is_some() {
1846            len += 1;
1847        }
1848        if self.level0_stop_write_threshold_max_size.is_some() {
1849            len += 1;
1850        }
1851        if self.sst_allowed_trivial_move_max_count.is_some() {
1852            len += 1;
1853        }
1854        let mut struct_ser = serializer.serialize_struct("hummock.CompactionConfig", len)?;
1855        if self.max_bytes_for_level_base != 0 {
1856            #[allow(clippy::needless_borrow)]
1857            #[allow(clippy::needless_borrows_for_generic_args)]
1858            struct_ser.serialize_field("maxBytesForLevelBase", ToString::to_string(&self.max_bytes_for_level_base).as_str())?;
1859        }
1860        if self.max_level != 0 {
1861            #[allow(clippy::needless_borrow)]
1862            #[allow(clippy::needless_borrows_for_generic_args)]
1863            struct_ser.serialize_field("maxLevel", ToString::to_string(&self.max_level).as_str())?;
1864        }
1865        if self.max_bytes_for_level_multiplier != 0 {
1866            #[allow(clippy::needless_borrow)]
1867            #[allow(clippy::needless_borrows_for_generic_args)]
1868            struct_ser.serialize_field("maxBytesForLevelMultiplier", ToString::to_string(&self.max_bytes_for_level_multiplier).as_str())?;
1869        }
1870        if self.max_compaction_bytes != 0 {
1871            #[allow(clippy::needless_borrow)]
1872            #[allow(clippy::needless_borrows_for_generic_args)]
1873            struct_ser.serialize_field("maxCompactionBytes", ToString::to_string(&self.max_compaction_bytes).as_str())?;
1874        }
1875        if self.sub_level_max_compaction_bytes != 0 {
1876            #[allow(clippy::needless_borrow)]
1877            #[allow(clippy::needless_borrows_for_generic_args)]
1878            struct_ser.serialize_field("subLevelMaxCompactionBytes", ToString::to_string(&self.sub_level_max_compaction_bytes).as_str())?;
1879        }
1880        if self.level0_tier_compact_file_number != 0 {
1881            #[allow(clippy::needless_borrow)]
1882            #[allow(clippy::needless_borrows_for_generic_args)]
1883            struct_ser.serialize_field("level0TierCompactFileNumber", ToString::to_string(&self.level0_tier_compact_file_number).as_str())?;
1884        }
1885        if self.compaction_mode != 0 {
1886            let v = compaction_config::CompactionMode::try_from(self.compaction_mode)
1887                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.compaction_mode)))?;
1888            struct_ser.serialize_field("compactionMode", &v)?;
1889        }
1890        if !self.compression_algorithm.is_empty() {
1891            struct_ser.serialize_field("compressionAlgorithm", &self.compression_algorithm)?;
1892        }
1893        if self.target_file_size_base != 0 {
1894            #[allow(clippy::needless_borrow)]
1895            #[allow(clippy::needless_borrows_for_generic_args)]
1896            struct_ser.serialize_field("targetFileSizeBase", ToString::to_string(&self.target_file_size_base).as_str())?;
1897        }
1898        if self.compaction_filter_mask != 0 {
1899            struct_ser.serialize_field("compactionFilterMask", &self.compaction_filter_mask)?;
1900        }
1901        if self.max_sub_compaction != 0 {
1902            struct_ser.serialize_field("maxSubCompaction", &self.max_sub_compaction)?;
1903        }
1904        if self.max_space_reclaim_bytes != 0 {
1905            #[allow(clippy::needless_borrow)]
1906            #[allow(clippy::needless_borrows_for_generic_args)]
1907            struct_ser.serialize_field("maxSpaceReclaimBytes", ToString::to_string(&self.max_space_reclaim_bytes).as_str())?;
1908        }
1909        if self.split_by_state_table {
1910            struct_ser.serialize_field("splitByStateTable", &self.split_by_state_table)?;
1911        }
1912        if self.split_weight_by_vnode != 0 {
1913            struct_ser.serialize_field("splitWeightByVnode", &self.split_weight_by_vnode)?;
1914        }
1915        if self.level0_stop_write_threshold_sub_level_number != 0 {
1916            #[allow(clippy::needless_borrow)]
1917            #[allow(clippy::needless_borrows_for_generic_args)]
1918            struct_ser.serialize_field("level0StopWriteThresholdSubLevelNumber", ToString::to_string(&self.level0_stop_write_threshold_sub_level_number).as_str())?;
1919        }
1920        if self.level0_max_compact_file_number != 0 {
1921            #[allow(clippy::needless_borrow)]
1922            #[allow(clippy::needless_borrows_for_generic_args)]
1923            struct_ser.serialize_field("level0MaxCompactFileNumber", ToString::to_string(&self.level0_max_compact_file_number).as_str())?;
1924        }
1925        if self.level0_sub_level_compact_level_count != 0 {
1926            struct_ser.serialize_field("level0SubLevelCompactLevelCount", &self.level0_sub_level_compact_level_count)?;
1927        }
1928        if self.level0_overlapping_sub_level_compact_level_count != 0 {
1929            struct_ser.serialize_field("level0OverlappingSubLevelCompactLevelCount", &self.level0_overlapping_sub_level_compact_level_count)?;
1930        }
1931        if self.tombstone_reclaim_ratio != 0 {
1932            struct_ser.serialize_field("tombstoneReclaimRatio", &self.tombstone_reclaim_ratio)?;
1933        }
1934        if self.enable_emergency_picker {
1935            struct_ser.serialize_field("enableEmergencyPicker", &self.enable_emergency_picker)?;
1936        }
1937        if let Some(v) = self.max_l0_compact_level_count.as_ref() {
1938            struct_ser.serialize_field("maxL0CompactLevelCount", v)?;
1939        }
1940        if let Some(v) = self.sst_allowed_trivial_move_min_size.as_ref() {
1941            #[allow(clippy::needless_borrow)]
1942            #[allow(clippy::needless_borrows_for_generic_args)]
1943            struct_ser.serialize_field("sstAllowedTrivialMoveMinSize", ToString::to_string(&v).as_str())?;
1944        }
1945        if let Some(v) = self.disable_auto_group_scheduling.as_ref() {
1946            struct_ser.serialize_field("disableAutoGroupScheduling", v)?;
1947        }
1948        if let Some(v) = self.max_overlapping_level_size.as_ref() {
1949            #[allow(clippy::needless_borrow)]
1950            #[allow(clippy::needless_borrows_for_generic_args)]
1951            struct_ser.serialize_field("maxOverlappingLevelSize", ToString::to_string(&v).as_str())?;
1952        }
1953        if let Some(v) = self.emergency_level0_sst_file_count.as_ref() {
1954            struct_ser.serialize_field("emergencyLevel0SstFileCount", v)?;
1955        }
1956        if let Some(v) = self.emergency_level0_sub_level_partition.as_ref() {
1957            struct_ser.serialize_field("emergencyLevel0SubLevelPartition", v)?;
1958        }
1959        if let Some(v) = self.level0_stop_write_threshold_max_sst_count.as_ref() {
1960            struct_ser.serialize_field("level0StopWriteThresholdMaxSstCount", v)?;
1961        }
1962        if let Some(v) = self.level0_stop_write_threshold_max_size.as_ref() {
1963            #[allow(clippy::needless_borrow)]
1964            #[allow(clippy::needless_borrows_for_generic_args)]
1965            struct_ser.serialize_field("level0StopWriteThresholdMaxSize", ToString::to_string(&v).as_str())?;
1966        }
1967        if let Some(v) = self.sst_allowed_trivial_move_max_count.as_ref() {
1968            struct_ser.serialize_field("sstAllowedTrivialMoveMaxCount", v)?;
1969        }
1970        struct_ser.end()
1971    }
1972}
1973impl<'de> serde::Deserialize<'de> for CompactionConfig {
1974    #[allow(deprecated)]
1975    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1976    where
1977        D: serde::Deserializer<'de>,
1978    {
1979        const FIELDS: &[&str] = &[
1980            "max_bytes_for_level_base",
1981            "maxBytesForLevelBase",
1982            "max_level",
1983            "maxLevel",
1984            "max_bytes_for_level_multiplier",
1985            "maxBytesForLevelMultiplier",
1986            "max_compaction_bytes",
1987            "maxCompactionBytes",
1988            "sub_level_max_compaction_bytes",
1989            "subLevelMaxCompactionBytes",
1990            "level0_tier_compact_file_number",
1991            "level0TierCompactFileNumber",
1992            "compaction_mode",
1993            "compactionMode",
1994            "compression_algorithm",
1995            "compressionAlgorithm",
1996            "target_file_size_base",
1997            "targetFileSizeBase",
1998            "compaction_filter_mask",
1999            "compactionFilterMask",
2000            "max_sub_compaction",
2001            "maxSubCompaction",
2002            "max_space_reclaim_bytes",
2003            "maxSpaceReclaimBytes",
2004            "split_by_state_table",
2005            "splitByStateTable",
2006            "split_weight_by_vnode",
2007            "splitWeightByVnode",
2008            "level0_stop_write_threshold_sub_level_number",
2009            "level0StopWriteThresholdSubLevelNumber",
2010            "level0_max_compact_file_number",
2011            "level0MaxCompactFileNumber",
2012            "level0_sub_level_compact_level_count",
2013            "level0SubLevelCompactLevelCount",
2014            "level0_overlapping_sub_level_compact_level_count",
2015            "level0OverlappingSubLevelCompactLevelCount",
2016            "tombstone_reclaim_ratio",
2017            "tombstoneReclaimRatio",
2018            "enable_emergency_picker",
2019            "enableEmergencyPicker",
2020            "max_l0_compact_level_count",
2021            "maxL0CompactLevelCount",
2022            "sst_allowed_trivial_move_min_size",
2023            "sstAllowedTrivialMoveMinSize",
2024            "disable_auto_group_scheduling",
2025            "disableAutoGroupScheduling",
2026            "max_overlapping_level_size",
2027            "maxOverlappingLevelSize",
2028            "emergency_level0_sst_file_count",
2029            "emergencyLevel0SstFileCount",
2030            "emergency_level0_sub_level_partition",
2031            "emergencyLevel0SubLevelPartition",
2032            "level0_stop_write_threshold_max_sst_count",
2033            "level0StopWriteThresholdMaxSstCount",
2034            "level0_stop_write_threshold_max_size",
2035            "level0StopWriteThresholdMaxSize",
2036            "sst_allowed_trivial_move_max_count",
2037            "sstAllowedTrivialMoveMaxCount",
2038        ];
2039
2040        #[allow(clippy::enum_variant_names)]
2041        enum GeneratedField {
2042            MaxBytesForLevelBase,
2043            MaxLevel,
2044            MaxBytesForLevelMultiplier,
2045            MaxCompactionBytes,
2046            SubLevelMaxCompactionBytes,
2047            Level0TierCompactFileNumber,
2048            CompactionMode,
2049            CompressionAlgorithm,
2050            TargetFileSizeBase,
2051            CompactionFilterMask,
2052            MaxSubCompaction,
2053            MaxSpaceReclaimBytes,
2054            SplitByStateTable,
2055            SplitWeightByVnode,
2056            Level0StopWriteThresholdSubLevelNumber,
2057            Level0MaxCompactFileNumber,
2058            Level0SubLevelCompactLevelCount,
2059            Level0OverlappingSubLevelCompactLevelCount,
2060            TombstoneReclaimRatio,
2061            EnableEmergencyPicker,
2062            MaxL0CompactLevelCount,
2063            SstAllowedTrivialMoveMinSize,
2064            DisableAutoGroupScheduling,
2065            MaxOverlappingLevelSize,
2066            EmergencyLevel0SstFileCount,
2067            EmergencyLevel0SubLevelPartition,
2068            Level0StopWriteThresholdMaxSstCount,
2069            Level0StopWriteThresholdMaxSize,
2070            SstAllowedTrivialMoveMaxCount,
2071        }
2072        impl<'de> serde::Deserialize<'de> for GeneratedField {
2073            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2074            where
2075                D: serde::Deserializer<'de>,
2076            {
2077                struct GeneratedVisitor;
2078
2079                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2080                    type Value = GeneratedField;
2081
2082                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2083                        write!(formatter, "expected one of: {:?}", &FIELDS)
2084                    }
2085
2086                    #[allow(unused_variables)]
2087                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2088                    where
2089                        E: serde::de::Error,
2090                    {
2091                        match value {
2092                            "maxBytesForLevelBase" | "max_bytes_for_level_base" => Ok(GeneratedField::MaxBytesForLevelBase),
2093                            "maxLevel" | "max_level" => Ok(GeneratedField::MaxLevel),
2094                            "maxBytesForLevelMultiplier" | "max_bytes_for_level_multiplier" => Ok(GeneratedField::MaxBytesForLevelMultiplier),
2095                            "maxCompactionBytes" | "max_compaction_bytes" => Ok(GeneratedField::MaxCompactionBytes),
2096                            "subLevelMaxCompactionBytes" | "sub_level_max_compaction_bytes" => Ok(GeneratedField::SubLevelMaxCompactionBytes),
2097                            "level0TierCompactFileNumber" | "level0_tier_compact_file_number" => Ok(GeneratedField::Level0TierCompactFileNumber),
2098                            "compactionMode" | "compaction_mode" => Ok(GeneratedField::CompactionMode),
2099                            "compressionAlgorithm" | "compression_algorithm" => Ok(GeneratedField::CompressionAlgorithm),
2100                            "targetFileSizeBase" | "target_file_size_base" => Ok(GeneratedField::TargetFileSizeBase),
2101                            "compactionFilterMask" | "compaction_filter_mask" => Ok(GeneratedField::CompactionFilterMask),
2102                            "maxSubCompaction" | "max_sub_compaction" => Ok(GeneratedField::MaxSubCompaction),
2103                            "maxSpaceReclaimBytes" | "max_space_reclaim_bytes" => Ok(GeneratedField::MaxSpaceReclaimBytes),
2104                            "splitByStateTable" | "split_by_state_table" => Ok(GeneratedField::SplitByStateTable),
2105                            "splitWeightByVnode" | "split_weight_by_vnode" => Ok(GeneratedField::SplitWeightByVnode),
2106                            "level0StopWriteThresholdSubLevelNumber" | "level0_stop_write_threshold_sub_level_number" => Ok(GeneratedField::Level0StopWriteThresholdSubLevelNumber),
2107                            "level0MaxCompactFileNumber" | "level0_max_compact_file_number" => Ok(GeneratedField::Level0MaxCompactFileNumber),
2108                            "level0SubLevelCompactLevelCount" | "level0_sub_level_compact_level_count" => Ok(GeneratedField::Level0SubLevelCompactLevelCount),
2109                            "level0OverlappingSubLevelCompactLevelCount" | "level0_overlapping_sub_level_compact_level_count" => Ok(GeneratedField::Level0OverlappingSubLevelCompactLevelCount),
2110                            "tombstoneReclaimRatio" | "tombstone_reclaim_ratio" => Ok(GeneratedField::TombstoneReclaimRatio),
2111                            "enableEmergencyPicker" | "enable_emergency_picker" => Ok(GeneratedField::EnableEmergencyPicker),
2112                            "maxL0CompactLevelCount" | "max_l0_compact_level_count" => Ok(GeneratedField::MaxL0CompactLevelCount),
2113                            "sstAllowedTrivialMoveMinSize" | "sst_allowed_trivial_move_min_size" => Ok(GeneratedField::SstAllowedTrivialMoveMinSize),
2114                            "disableAutoGroupScheduling" | "disable_auto_group_scheduling" => Ok(GeneratedField::DisableAutoGroupScheduling),
2115                            "maxOverlappingLevelSize" | "max_overlapping_level_size" => Ok(GeneratedField::MaxOverlappingLevelSize),
2116                            "emergencyLevel0SstFileCount" | "emergency_level0_sst_file_count" => Ok(GeneratedField::EmergencyLevel0SstFileCount),
2117                            "emergencyLevel0SubLevelPartition" | "emergency_level0_sub_level_partition" => Ok(GeneratedField::EmergencyLevel0SubLevelPartition),
2118                            "level0StopWriteThresholdMaxSstCount" | "level0_stop_write_threshold_max_sst_count" => Ok(GeneratedField::Level0StopWriteThresholdMaxSstCount),
2119                            "level0StopWriteThresholdMaxSize" | "level0_stop_write_threshold_max_size" => Ok(GeneratedField::Level0StopWriteThresholdMaxSize),
2120                            "sstAllowedTrivialMoveMaxCount" | "sst_allowed_trivial_move_max_count" => Ok(GeneratedField::SstAllowedTrivialMoveMaxCount),
2121                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2122                        }
2123                    }
2124                }
2125                deserializer.deserialize_identifier(GeneratedVisitor)
2126            }
2127        }
2128        struct GeneratedVisitor;
2129        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2130            type Value = CompactionConfig;
2131
2132            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2133                formatter.write_str("struct hummock.CompactionConfig")
2134            }
2135
2136            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CompactionConfig, V::Error>
2137                where
2138                    V: serde::de::MapAccess<'de>,
2139            {
2140                let mut max_bytes_for_level_base__ = None;
2141                let mut max_level__ = None;
2142                let mut max_bytes_for_level_multiplier__ = None;
2143                let mut max_compaction_bytes__ = None;
2144                let mut sub_level_max_compaction_bytes__ = None;
2145                let mut level0_tier_compact_file_number__ = None;
2146                let mut compaction_mode__ = None;
2147                let mut compression_algorithm__ = None;
2148                let mut target_file_size_base__ = None;
2149                let mut compaction_filter_mask__ = None;
2150                let mut max_sub_compaction__ = None;
2151                let mut max_space_reclaim_bytes__ = None;
2152                let mut split_by_state_table__ = None;
2153                let mut split_weight_by_vnode__ = None;
2154                let mut level0_stop_write_threshold_sub_level_number__ = None;
2155                let mut level0_max_compact_file_number__ = None;
2156                let mut level0_sub_level_compact_level_count__ = None;
2157                let mut level0_overlapping_sub_level_compact_level_count__ = None;
2158                let mut tombstone_reclaim_ratio__ = None;
2159                let mut enable_emergency_picker__ = None;
2160                let mut max_l0_compact_level_count__ = None;
2161                let mut sst_allowed_trivial_move_min_size__ = None;
2162                let mut disable_auto_group_scheduling__ = None;
2163                let mut max_overlapping_level_size__ = None;
2164                let mut emergency_level0_sst_file_count__ = None;
2165                let mut emergency_level0_sub_level_partition__ = None;
2166                let mut level0_stop_write_threshold_max_sst_count__ = None;
2167                let mut level0_stop_write_threshold_max_size__ = None;
2168                let mut sst_allowed_trivial_move_max_count__ = None;
2169                while let Some(k) = map_.next_key()? {
2170                    match k {
2171                        GeneratedField::MaxBytesForLevelBase => {
2172                            if max_bytes_for_level_base__.is_some() {
2173                                return Err(serde::de::Error::duplicate_field("maxBytesForLevelBase"));
2174                            }
2175                            max_bytes_for_level_base__ = 
2176                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2177                            ;
2178                        }
2179                        GeneratedField::MaxLevel => {
2180                            if max_level__.is_some() {
2181                                return Err(serde::de::Error::duplicate_field("maxLevel"));
2182                            }
2183                            max_level__ = 
2184                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2185                            ;
2186                        }
2187                        GeneratedField::MaxBytesForLevelMultiplier => {
2188                            if max_bytes_for_level_multiplier__.is_some() {
2189                                return Err(serde::de::Error::duplicate_field("maxBytesForLevelMultiplier"));
2190                            }
2191                            max_bytes_for_level_multiplier__ = 
2192                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2193                            ;
2194                        }
2195                        GeneratedField::MaxCompactionBytes => {
2196                            if max_compaction_bytes__.is_some() {
2197                                return Err(serde::de::Error::duplicate_field("maxCompactionBytes"));
2198                            }
2199                            max_compaction_bytes__ = 
2200                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2201                            ;
2202                        }
2203                        GeneratedField::SubLevelMaxCompactionBytes => {
2204                            if sub_level_max_compaction_bytes__.is_some() {
2205                                return Err(serde::de::Error::duplicate_field("subLevelMaxCompactionBytes"));
2206                            }
2207                            sub_level_max_compaction_bytes__ = 
2208                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2209                            ;
2210                        }
2211                        GeneratedField::Level0TierCompactFileNumber => {
2212                            if level0_tier_compact_file_number__.is_some() {
2213                                return Err(serde::de::Error::duplicate_field("level0TierCompactFileNumber"));
2214                            }
2215                            level0_tier_compact_file_number__ = 
2216                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2217                            ;
2218                        }
2219                        GeneratedField::CompactionMode => {
2220                            if compaction_mode__.is_some() {
2221                                return Err(serde::de::Error::duplicate_field("compactionMode"));
2222                            }
2223                            compaction_mode__ = Some(map_.next_value::<compaction_config::CompactionMode>()? as i32);
2224                        }
2225                        GeneratedField::CompressionAlgorithm => {
2226                            if compression_algorithm__.is_some() {
2227                                return Err(serde::de::Error::duplicate_field("compressionAlgorithm"));
2228                            }
2229                            compression_algorithm__ = Some(map_.next_value()?);
2230                        }
2231                        GeneratedField::TargetFileSizeBase => {
2232                            if target_file_size_base__.is_some() {
2233                                return Err(serde::de::Error::duplicate_field("targetFileSizeBase"));
2234                            }
2235                            target_file_size_base__ = 
2236                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2237                            ;
2238                        }
2239                        GeneratedField::CompactionFilterMask => {
2240                            if compaction_filter_mask__.is_some() {
2241                                return Err(serde::de::Error::duplicate_field("compactionFilterMask"));
2242                            }
2243                            compaction_filter_mask__ = 
2244                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2245                            ;
2246                        }
2247                        GeneratedField::MaxSubCompaction => {
2248                            if max_sub_compaction__.is_some() {
2249                                return Err(serde::de::Error::duplicate_field("maxSubCompaction"));
2250                            }
2251                            max_sub_compaction__ = 
2252                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2253                            ;
2254                        }
2255                        GeneratedField::MaxSpaceReclaimBytes => {
2256                            if max_space_reclaim_bytes__.is_some() {
2257                                return Err(serde::de::Error::duplicate_field("maxSpaceReclaimBytes"));
2258                            }
2259                            max_space_reclaim_bytes__ = 
2260                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2261                            ;
2262                        }
2263                        GeneratedField::SplitByStateTable => {
2264                            if split_by_state_table__.is_some() {
2265                                return Err(serde::de::Error::duplicate_field("splitByStateTable"));
2266                            }
2267                            split_by_state_table__ = Some(map_.next_value()?);
2268                        }
2269                        GeneratedField::SplitWeightByVnode => {
2270                            if split_weight_by_vnode__.is_some() {
2271                                return Err(serde::de::Error::duplicate_field("splitWeightByVnode"));
2272                            }
2273                            split_weight_by_vnode__ = 
2274                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2275                            ;
2276                        }
2277                        GeneratedField::Level0StopWriteThresholdSubLevelNumber => {
2278                            if level0_stop_write_threshold_sub_level_number__.is_some() {
2279                                return Err(serde::de::Error::duplicate_field("level0StopWriteThresholdSubLevelNumber"));
2280                            }
2281                            level0_stop_write_threshold_sub_level_number__ = 
2282                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2283                            ;
2284                        }
2285                        GeneratedField::Level0MaxCompactFileNumber => {
2286                            if level0_max_compact_file_number__.is_some() {
2287                                return Err(serde::de::Error::duplicate_field("level0MaxCompactFileNumber"));
2288                            }
2289                            level0_max_compact_file_number__ = 
2290                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2291                            ;
2292                        }
2293                        GeneratedField::Level0SubLevelCompactLevelCount => {
2294                            if level0_sub_level_compact_level_count__.is_some() {
2295                                return Err(serde::de::Error::duplicate_field("level0SubLevelCompactLevelCount"));
2296                            }
2297                            level0_sub_level_compact_level_count__ = 
2298                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2299                            ;
2300                        }
2301                        GeneratedField::Level0OverlappingSubLevelCompactLevelCount => {
2302                            if level0_overlapping_sub_level_compact_level_count__.is_some() {
2303                                return Err(serde::de::Error::duplicate_field("level0OverlappingSubLevelCompactLevelCount"));
2304                            }
2305                            level0_overlapping_sub_level_compact_level_count__ = 
2306                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2307                            ;
2308                        }
2309                        GeneratedField::TombstoneReclaimRatio => {
2310                            if tombstone_reclaim_ratio__.is_some() {
2311                                return Err(serde::de::Error::duplicate_field("tombstoneReclaimRatio"));
2312                            }
2313                            tombstone_reclaim_ratio__ = 
2314                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2315                            ;
2316                        }
2317                        GeneratedField::EnableEmergencyPicker => {
2318                            if enable_emergency_picker__.is_some() {
2319                                return Err(serde::de::Error::duplicate_field("enableEmergencyPicker"));
2320                            }
2321                            enable_emergency_picker__ = Some(map_.next_value()?);
2322                        }
2323                        GeneratedField::MaxL0CompactLevelCount => {
2324                            if max_l0_compact_level_count__.is_some() {
2325                                return Err(serde::de::Error::duplicate_field("maxL0CompactLevelCount"));
2326                            }
2327                            max_l0_compact_level_count__ = 
2328                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2329                            ;
2330                        }
2331                        GeneratedField::SstAllowedTrivialMoveMinSize => {
2332                            if sst_allowed_trivial_move_min_size__.is_some() {
2333                                return Err(serde::de::Error::duplicate_field("sstAllowedTrivialMoveMinSize"));
2334                            }
2335                            sst_allowed_trivial_move_min_size__ = 
2336                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2337                            ;
2338                        }
2339                        GeneratedField::DisableAutoGroupScheduling => {
2340                            if disable_auto_group_scheduling__.is_some() {
2341                                return Err(serde::de::Error::duplicate_field("disableAutoGroupScheduling"));
2342                            }
2343                            disable_auto_group_scheduling__ = map_.next_value()?;
2344                        }
2345                        GeneratedField::MaxOverlappingLevelSize => {
2346                            if max_overlapping_level_size__.is_some() {
2347                                return Err(serde::de::Error::duplicate_field("maxOverlappingLevelSize"));
2348                            }
2349                            max_overlapping_level_size__ = 
2350                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2351                            ;
2352                        }
2353                        GeneratedField::EmergencyLevel0SstFileCount => {
2354                            if emergency_level0_sst_file_count__.is_some() {
2355                                return Err(serde::de::Error::duplicate_field("emergencyLevel0SstFileCount"));
2356                            }
2357                            emergency_level0_sst_file_count__ = 
2358                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2359                            ;
2360                        }
2361                        GeneratedField::EmergencyLevel0SubLevelPartition => {
2362                            if emergency_level0_sub_level_partition__.is_some() {
2363                                return Err(serde::de::Error::duplicate_field("emergencyLevel0SubLevelPartition"));
2364                            }
2365                            emergency_level0_sub_level_partition__ = 
2366                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2367                            ;
2368                        }
2369                        GeneratedField::Level0StopWriteThresholdMaxSstCount => {
2370                            if level0_stop_write_threshold_max_sst_count__.is_some() {
2371                                return Err(serde::de::Error::duplicate_field("level0StopWriteThresholdMaxSstCount"));
2372                            }
2373                            level0_stop_write_threshold_max_sst_count__ = 
2374                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2375                            ;
2376                        }
2377                        GeneratedField::Level0StopWriteThresholdMaxSize => {
2378                            if level0_stop_write_threshold_max_size__.is_some() {
2379                                return Err(serde::de::Error::duplicate_field("level0StopWriteThresholdMaxSize"));
2380                            }
2381                            level0_stop_write_threshold_max_size__ = 
2382                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2383                            ;
2384                        }
2385                        GeneratedField::SstAllowedTrivialMoveMaxCount => {
2386                            if sst_allowed_trivial_move_max_count__.is_some() {
2387                                return Err(serde::de::Error::duplicate_field("sstAllowedTrivialMoveMaxCount"));
2388                            }
2389                            sst_allowed_trivial_move_max_count__ = 
2390                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
2391                            ;
2392                        }
2393                    }
2394                }
2395                Ok(CompactionConfig {
2396                    max_bytes_for_level_base: max_bytes_for_level_base__.unwrap_or_default(),
2397                    max_level: max_level__.unwrap_or_default(),
2398                    max_bytes_for_level_multiplier: max_bytes_for_level_multiplier__.unwrap_or_default(),
2399                    max_compaction_bytes: max_compaction_bytes__.unwrap_or_default(),
2400                    sub_level_max_compaction_bytes: sub_level_max_compaction_bytes__.unwrap_or_default(),
2401                    level0_tier_compact_file_number: level0_tier_compact_file_number__.unwrap_or_default(),
2402                    compaction_mode: compaction_mode__.unwrap_or_default(),
2403                    compression_algorithm: compression_algorithm__.unwrap_or_default(),
2404                    target_file_size_base: target_file_size_base__.unwrap_or_default(),
2405                    compaction_filter_mask: compaction_filter_mask__.unwrap_or_default(),
2406                    max_sub_compaction: max_sub_compaction__.unwrap_or_default(),
2407                    max_space_reclaim_bytes: max_space_reclaim_bytes__.unwrap_or_default(),
2408                    split_by_state_table: split_by_state_table__.unwrap_or_default(),
2409                    split_weight_by_vnode: split_weight_by_vnode__.unwrap_or_default(),
2410                    level0_stop_write_threshold_sub_level_number: level0_stop_write_threshold_sub_level_number__.unwrap_or_default(),
2411                    level0_max_compact_file_number: level0_max_compact_file_number__.unwrap_or_default(),
2412                    level0_sub_level_compact_level_count: level0_sub_level_compact_level_count__.unwrap_or_default(),
2413                    level0_overlapping_sub_level_compact_level_count: level0_overlapping_sub_level_compact_level_count__.unwrap_or_default(),
2414                    tombstone_reclaim_ratio: tombstone_reclaim_ratio__.unwrap_or_default(),
2415                    enable_emergency_picker: enable_emergency_picker__.unwrap_or_default(),
2416                    max_l0_compact_level_count: max_l0_compact_level_count__,
2417                    sst_allowed_trivial_move_min_size: sst_allowed_trivial_move_min_size__,
2418                    disable_auto_group_scheduling: disable_auto_group_scheduling__,
2419                    max_overlapping_level_size: max_overlapping_level_size__,
2420                    emergency_level0_sst_file_count: emergency_level0_sst_file_count__,
2421                    emergency_level0_sub_level_partition: emergency_level0_sub_level_partition__,
2422                    level0_stop_write_threshold_max_sst_count: level0_stop_write_threshold_max_sst_count__,
2423                    level0_stop_write_threshold_max_size: level0_stop_write_threshold_max_size__,
2424                    sst_allowed_trivial_move_max_count: sst_allowed_trivial_move_max_count__,
2425                })
2426            }
2427        }
2428        deserializer.deserialize_struct("hummock.CompactionConfig", FIELDS, GeneratedVisitor)
2429    }
2430}
2431impl serde::Serialize for compaction_config::CompactionMode {
2432    #[allow(deprecated)]
2433    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2434    where
2435        S: serde::Serializer,
2436    {
2437        let variant = match self {
2438            Self::Unspecified => "UNSPECIFIED",
2439            Self::Range => "RANGE",
2440        };
2441        serializer.serialize_str(variant)
2442    }
2443}
2444impl<'de> serde::Deserialize<'de> for compaction_config::CompactionMode {
2445    #[allow(deprecated)]
2446    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2447    where
2448        D: serde::Deserializer<'de>,
2449    {
2450        const FIELDS: &[&str] = &[
2451            "UNSPECIFIED",
2452            "RANGE",
2453        ];
2454
2455        struct GeneratedVisitor;
2456
2457        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2458            type Value = compaction_config::CompactionMode;
2459
2460            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2461                write!(formatter, "expected one of: {:?}", &FIELDS)
2462            }
2463
2464            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
2465            where
2466                E: serde::de::Error,
2467            {
2468                i32::try_from(v)
2469                    .ok()
2470                    .and_then(|x| x.try_into().ok())
2471                    .ok_or_else(|| {
2472                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
2473                    })
2474            }
2475
2476            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
2477            where
2478                E: serde::de::Error,
2479            {
2480                i32::try_from(v)
2481                    .ok()
2482                    .and_then(|x| x.try_into().ok())
2483                    .ok_or_else(|| {
2484                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
2485                    })
2486            }
2487
2488            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2489            where
2490                E: serde::de::Error,
2491            {
2492                match value {
2493                    "UNSPECIFIED" => Ok(compaction_config::CompactionMode::Unspecified),
2494                    "RANGE" => Ok(compaction_config::CompactionMode::Range),
2495                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
2496                }
2497            }
2498        }
2499        deserializer.deserialize_any(GeneratedVisitor)
2500    }
2501}
2502impl serde::Serialize for CompactionGroup {
2503    #[allow(deprecated)]
2504    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2505    where
2506        S: serde::Serializer,
2507    {
2508        use serde::ser::SerializeStruct;
2509        let mut len = 0;
2510        if self.id != 0 {
2511            len += 1;
2512        }
2513        if self.compaction_config.is_some() {
2514            len += 1;
2515        }
2516        let mut struct_ser = serializer.serialize_struct("hummock.CompactionGroup", len)?;
2517        if self.id != 0 {
2518            #[allow(clippy::needless_borrow)]
2519            #[allow(clippy::needless_borrows_for_generic_args)]
2520            struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?;
2521        }
2522        if let Some(v) = self.compaction_config.as_ref() {
2523            struct_ser.serialize_field("compactionConfig", v)?;
2524        }
2525        struct_ser.end()
2526    }
2527}
2528impl<'de> serde::Deserialize<'de> for CompactionGroup {
2529    #[allow(deprecated)]
2530    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2531    where
2532        D: serde::Deserializer<'de>,
2533    {
2534        const FIELDS: &[&str] = &[
2535            "id",
2536            "compaction_config",
2537            "compactionConfig",
2538        ];
2539
2540        #[allow(clippy::enum_variant_names)]
2541        enum GeneratedField {
2542            Id,
2543            CompactionConfig,
2544        }
2545        impl<'de> serde::Deserialize<'de> for GeneratedField {
2546            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2547            where
2548                D: serde::Deserializer<'de>,
2549            {
2550                struct GeneratedVisitor;
2551
2552                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2553                    type Value = GeneratedField;
2554
2555                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2556                        write!(formatter, "expected one of: {:?}", &FIELDS)
2557                    }
2558
2559                    #[allow(unused_variables)]
2560                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2561                    where
2562                        E: serde::de::Error,
2563                    {
2564                        match value {
2565                            "id" => Ok(GeneratedField::Id),
2566                            "compactionConfig" | "compaction_config" => Ok(GeneratedField::CompactionConfig),
2567                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2568                        }
2569                    }
2570                }
2571                deserializer.deserialize_identifier(GeneratedVisitor)
2572            }
2573        }
2574        struct GeneratedVisitor;
2575        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2576            type Value = CompactionGroup;
2577
2578            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2579                formatter.write_str("struct hummock.CompactionGroup")
2580            }
2581
2582            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CompactionGroup, V::Error>
2583                where
2584                    V: serde::de::MapAccess<'de>,
2585            {
2586                let mut id__ = None;
2587                let mut compaction_config__ = None;
2588                while let Some(k) = map_.next_key()? {
2589                    match k {
2590                        GeneratedField::Id => {
2591                            if id__.is_some() {
2592                                return Err(serde::de::Error::duplicate_field("id"));
2593                            }
2594                            id__ = 
2595                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2596                            ;
2597                        }
2598                        GeneratedField::CompactionConfig => {
2599                            if compaction_config__.is_some() {
2600                                return Err(serde::de::Error::duplicate_field("compactionConfig"));
2601                            }
2602                            compaction_config__ = map_.next_value()?;
2603                        }
2604                    }
2605                }
2606                Ok(CompactionGroup {
2607                    id: id__.unwrap_or_default(),
2608                    compaction_config: compaction_config__,
2609                })
2610            }
2611        }
2612        deserializer.deserialize_struct("hummock.CompactionGroup", FIELDS, GeneratedVisitor)
2613    }
2614}
2615impl serde::Serialize for CompactionGroupInfo {
2616    #[allow(deprecated)]
2617    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2618    where
2619        S: serde::Serializer,
2620    {
2621        use serde::ser::SerializeStruct;
2622        let mut len = 0;
2623        if self.id != 0 {
2624            len += 1;
2625        }
2626        if self.parent_id != 0 {
2627            len += 1;
2628        }
2629        if !self.member_table_ids.is_empty() {
2630            len += 1;
2631        }
2632        if self.compaction_config.is_some() {
2633            len += 1;
2634        }
2635        let mut struct_ser = serializer.serialize_struct("hummock.CompactionGroupInfo", len)?;
2636        if self.id != 0 {
2637            #[allow(clippy::needless_borrow)]
2638            #[allow(clippy::needless_borrows_for_generic_args)]
2639            struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?;
2640        }
2641        if self.parent_id != 0 {
2642            #[allow(clippy::needless_borrow)]
2643            #[allow(clippy::needless_borrows_for_generic_args)]
2644            struct_ser.serialize_field("parentId", ToString::to_string(&self.parent_id).as_str())?;
2645        }
2646        if !self.member_table_ids.is_empty() {
2647            struct_ser.serialize_field("memberTableIds", &self.member_table_ids)?;
2648        }
2649        if let Some(v) = self.compaction_config.as_ref() {
2650            struct_ser.serialize_field("compactionConfig", v)?;
2651        }
2652        struct_ser.end()
2653    }
2654}
2655impl<'de> serde::Deserialize<'de> for CompactionGroupInfo {
2656    #[allow(deprecated)]
2657    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2658    where
2659        D: serde::Deserializer<'de>,
2660    {
2661        const FIELDS: &[&str] = &[
2662            "id",
2663            "parent_id",
2664            "parentId",
2665            "member_table_ids",
2666            "memberTableIds",
2667            "compaction_config",
2668            "compactionConfig",
2669        ];
2670
2671        #[allow(clippy::enum_variant_names)]
2672        enum GeneratedField {
2673            Id,
2674            ParentId,
2675            MemberTableIds,
2676            CompactionConfig,
2677        }
2678        impl<'de> serde::Deserialize<'de> for GeneratedField {
2679            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2680            where
2681                D: serde::Deserializer<'de>,
2682            {
2683                struct GeneratedVisitor;
2684
2685                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2686                    type Value = GeneratedField;
2687
2688                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2689                        write!(formatter, "expected one of: {:?}", &FIELDS)
2690                    }
2691
2692                    #[allow(unused_variables)]
2693                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2694                    where
2695                        E: serde::de::Error,
2696                    {
2697                        match value {
2698                            "id" => Ok(GeneratedField::Id),
2699                            "parentId" | "parent_id" => Ok(GeneratedField::ParentId),
2700                            "memberTableIds" | "member_table_ids" => Ok(GeneratedField::MemberTableIds),
2701                            "compactionConfig" | "compaction_config" => Ok(GeneratedField::CompactionConfig),
2702                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2703                        }
2704                    }
2705                }
2706                deserializer.deserialize_identifier(GeneratedVisitor)
2707            }
2708        }
2709        struct GeneratedVisitor;
2710        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2711            type Value = CompactionGroupInfo;
2712
2713            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2714                formatter.write_str("struct hummock.CompactionGroupInfo")
2715            }
2716
2717            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CompactionGroupInfo, V::Error>
2718                where
2719                    V: serde::de::MapAccess<'de>,
2720            {
2721                let mut id__ = None;
2722                let mut parent_id__ = None;
2723                let mut member_table_ids__ = None;
2724                let mut compaction_config__ = None;
2725                while let Some(k) = map_.next_key()? {
2726                    match k {
2727                        GeneratedField::Id => {
2728                            if id__.is_some() {
2729                                return Err(serde::de::Error::duplicate_field("id"));
2730                            }
2731                            id__ = 
2732                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2733                            ;
2734                        }
2735                        GeneratedField::ParentId => {
2736                            if parent_id__.is_some() {
2737                                return Err(serde::de::Error::duplicate_field("parentId"));
2738                            }
2739                            parent_id__ = 
2740                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2741                            ;
2742                        }
2743                        GeneratedField::MemberTableIds => {
2744                            if member_table_ids__.is_some() {
2745                                return Err(serde::de::Error::duplicate_field("memberTableIds"));
2746                            }
2747                            member_table_ids__ = 
2748                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2749                                    .into_iter().map(|x| x.0).collect())
2750                            ;
2751                        }
2752                        GeneratedField::CompactionConfig => {
2753                            if compaction_config__.is_some() {
2754                                return Err(serde::de::Error::duplicate_field("compactionConfig"));
2755                            }
2756                            compaction_config__ = map_.next_value()?;
2757                        }
2758                    }
2759                }
2760                Ok(CompactionGroupInfo {
2761                    id: id__.unwrap_or_default(),
2762                    parent_id: parent_id__.unwrap_or_default(),
2763                    member_table_ids: member_table_ids__.unwrap_or_default(),
2764                    compaction_config: compaction_config__,
2765                })
2766            }
2767        }
2768        deserializer.deserialize_struct("hummock.CompactionGroupInfo", FIELDS, GeneratedVisitor)
2769    }
2770}
2771impl serde::Serialize for CompatibilityVersion {
2772    #[allow(deprecated)]
2773    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2774    where
2775        S: serde::Serializer,
2776    {
2777        let variant = match self {
2778            Self::VersionUnspecified => "VERSION_UNSPECIFIED",
2779            Self::NoTrivialSplit => "NO_TRIVIAL_SPLIT",
2780            Self::NoMemberTableIds => "NO_MEMBER_TABLE_IDS",
2781            Self::SplitGroupByTableId => "SPLIT_GROUP_BY_TABLE_ID",
2782        };
2783        serializer.serialize_str(variant)
2784    }
2785}
2786impl<'de> serde::Deserialize<'de> for CompatibilityVersion {
2787    #[allow(deprecated)]
2788    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2789    where
2790        D: serde::Deserializer<'de>,
2791    {
2792        const FIELDS: &[&str] = &[
2793            "VERSION_UNSPECIFIED",
2794            "NO_TRIVIAL_SPLIT",
2795            "NO_MEMBER_TABLE_IDS",
2796            "SPLIT_GROUP_BY_TABLE_ID",
2797        ];
2798
2799        struct GeneratedVisitor;
2800
2801        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2802            type Value = CompatibilityVersion;
2803
2804            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2805                write!(formatter, "expected one of: {:?}", &FIELDS)
2806            }
2807
2808            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
2809            where
2810                E: serde::de::Error,
2811            {
2812                i32::try_from(v)
2813                    .ok()
2814                    .and_then(|x| x.try_into().ok())
2815                    .ok_or_else(|| {
2816                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
2817                    })
2818            }
2819
2820            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
2821            where
2822                E: serde::de::Error,
2823            {
2824                i32::try_from(v)
2825                    .ok()
2826                    .and_then(|x| x.try_into().ok())
2827                    .ok_or_else(|| {
2828                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
2829                    })
2830            }
2831
2832            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2833            where
2834                E: serde::de::Error,
2835            {
2836                match value {
2837                    "VERSION_UNSPECIFIED" => Ok(CompatibilityVersion::VersionUnspecified),
2838                    "NO_TRIVIAL_SPLIT" => Ok(CompatibilityVersion::NoTrivialSplit),
2839                    "NO_MEMBER_TABLE_IDS" => Ok(CompatibilityVersion::NoMemberTableIds),
2840                    "SPLIT_GROUP_BY_TABLE_ID" => Ok(CompatibilityVersion::SplitGroupByTableId),
2841                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
2842                }
2843            }
2844        }
2845        deserializer.deserialize_any(GeneratedVisitor)
2846    }
2847}
2848impl serde::Serialize for DisableCommitEpochRequest {
2849    #[allow(deprecated)]
2850    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2851    where
2852        S: serde::Serializer,
2853    {
2854        use serde::ser::SerializeStruct;
2855        let len = 0;
2856        let struct_ser = serializer.serialize_struct("hummock.DisableCommitEpochRequest", len)?;
2857        struct_ser.end()
2858    }
2859}
2860impl<'de> serde::Deserialize<'de> for DisableCommitEpochRequest {
2861    #[allow(deprecated)]
2862    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2863    where
2864        D: serde::Deserializer<'de>,
2865    {
2866        const FIELDS: &[&str] = &[
2867        ];
2868
2869        #[allow(clippy::enum_variant_names)]
2870        enum GeneratedField {
2871        }
2872        impl<'de> serde::Deserialize<'de> for GeneratedField {
2873            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2874            where
2875                D: serde::Deserializer<'de>,
2876            {
2877                struct GeneratedVisitor;
2878
2879                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2880                    type Value = GeneratedField;
2881
2882                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2883                        write!(formatter, "expected one of: {:?}", &FIELDS)
2884                    }
2885
2886                    #[allow(unused_variables)]
2887                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2888                    where
2889                        E: serde::de::Error,
2890                    {
2891                            Err(serde::de::Error::unknown_field(value, FIELDS))
2892                    }
2893                }
2894                deserializer.deserialize_identifier(GeneratedVisitor)
2895            }
2896        }
2897        struct GeneratedVisitor;
2898        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2899            type Value = DisableCommitEpochRequest;
2900
2901            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2902                formatter.write_str("struct hummock.DisableCommitEpochRequest")
2903            }
2904
2905            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DisableCommitEpochRequest, V::Error>
2906                where
2907                    V: serde::de::MapAccess<'de>,
2908            {
2909                while map_.next_key::<GeneratedField>()?.is_some() {
2910                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
2911                }
2912                Ok(DisableCommitEpochRequest {
2913                })
2914            }
2915        }
2916        deserializer.deserialize_struct("hummock.DisableCommitEpochRequest", FIELDS, GeneratedVisitor)
2917    }
2918}
2919impl serde::Serialize for DisableCommitEpochResponse {
2920    #[allow(deprecated)]
2921    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2922    where
2923        S: serde::Serializer,
2924    {
2925        use serde::ser::SerializeStruct;
2926        let mut len = 0;
2927        if self.current_version.is_some() {
2928            len += 1;
2929        }
2930        let mut struct_ser = serializer.serialize_struct("hummock.DisableCommitEpochResponse", len)?;
2931        if let Some(v) = self.current_version.as_ref() {
2932            struct_ser.serialize_field("currentVersion", v)?;
2933        }
2934        struct_ser.end()
2935    }
2936}
2937impl<'de> serde::Deserialize<'de> for DisableCommitEpochResponse {
2938    #[allow(deprecated)]
2939    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2940    where
2941        D: serde::Deserializer<'de>,
2942    {
2943        const FIELDS: &[&str] = &[
2944            "current_version",
2945            "currentVersion",
2946        ];
2947
2948        #[allow(clippy::enum_variant_names)]
2949        enum GeneratedField {
2950            CurrentVersion,
2951        }
2952        impl<'de> serde::Deserialize<'de> for GeneratedField {
2953            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2954            where
2955                D: serde::Deserializer<'de>,
2956            {
2957                struct GeneratedVisitor;
2958
2959                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2960                    type Value = GeneratedField;
2961
2962                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2963                        write!(formatter, "expected one of: {:?}", &FIELDS)
2964                    }
2965
2966                    #[allow(unused_variables)]
2967                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2968                    where
2969                        E: serde::de::Error,
2970                    {
2971                        match value {
2972                            "currentVersion" | "current_version" => Ok(GeneratedField::CurrentVersion),
2973                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2974                        }
2975                    }
2976                }
2977                deserializer.deserialize_identifier(GeneratedVisitor)
2978            }
2979        }
2980        struct GeneratedVisitor;
2981        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2982            type Value = DisableCommitEpochResponse;
2983
2984            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2985                formatter.write_str("struct hummock.DisableCommitEpochResponse")
2986            }
2987
2988            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DisableCommitEpochResponse, V::Error>
2989                where
2990                    V: serde::de::MapAccess<'de>,
2991            {
2992                let mut current_version__ = None;
2993                while let Some(k) = map_.next_key()? {
2994                    match k {
2995                        GeneratedField::CurrentVersion => {
2996                            if current_version__.is_some() {
2997                                return Err(serde::de::Error::duplicate_field("currentVersion"));
2998                            }
2999                            current_version__ = map_.next_value()?;
3000                        }
3001                    }
3002                }
3003                Ok(DisableCommitEpochResponse {
3004                    current_version: current_version__,
3005                })
3006            }
3007        }
3008        deserializer.deserialize_struct("hummock.DisableCommitEpochResponse", FIELDS, GeneratedVisitor)
3009    }
3010}
3011impl serde::Serialize for EpochNewChangeLog {
3012    #[allow(deprecated)]
3013    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3014    where
3015        S: serde::Serializer,
3016    {
3017        use serde::ser::SerializeStruct;
3018        let mut len = 0;
3019        if !self.old_value.is_empty() {
3020            len += 1;
3021        }
3022        if !self.new_value.is_empty() {
3023            len += 1;
3024        }
3025        if !self.epochs.is_empty() {
3026            len += 1;
3027        }
3028        let mut struct_ser = serializer.serialize_struct("hummock.EpochNewChangeLog", len)?;
3029        if !self.old_value.is_empty() {
3030            struct_ser.serialize_field("oldValue", &self.old_value)?;
3031        }
3032        if !self.new_value.is_empty() {
3033            struct_ser.serialize_field("newValue", &self.new_value)?;
3034        }
3035        if !self.epochs.is_empty() {
3036            struct_ser.serialize_field("epochs", &self.epochs.iter().map(ToString::to_string).collect::<Vec<_>>())?;
3037        }
3038        struct_ser.end()
3039    }
3040}
3041impl<'de> serde::Deserialize<'de> for EpochNewChangeLog {
3042    #[allow(deprecated)]
3043    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3044    where
3045        D: serde::Deserializer<'de>,
3046    {
3047        const FIELDS: &[&str] = &[
3048            "old_value",
3049            "oldValue",
3050            "new_value",
3051            "newValue",
3052            "epochs",
3053        ];
3054
3055        #[allow(clippy::enum_variant_names)]
3056        enum GeneratedField {
3057            OldValue,
3058            NewValue,
3059            Epochs,
3060        }
3061        impl<'de> serde::Deserialize<'de> for GeneratedField {
3062            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3063            where
3064                D: serde::Deserializer<'de>,
3065            {
3066                struct GeneratedVisitor;
3067
3068                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3069                    type Value = GeneratedField;
3070
3071                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3072                        write!(formatter, "expected one of: {:?}", &FIELDS)
3073                    }
3074
3075                    #[allow(unused_variables)]
3076                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3077                    where
3078                        E: serde::de::Error,
3079                    {
3080                        match value {
3081                            "oldValue" | "old_value" => Ok(GeneratedField::OldValue),
3082                            "newValue" | "new_value" => Ok(GeneratedField::NewValue),
3083                            "epochs" => Ok(GeneratedField::Epochs),
3084                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3085                        }
3086                    }
3087                }
3088                deserializer.deserialize_identifier(GeneratedVisitor)
3089            }
3090        }
3091        struct GeneratedVisitor;
3092        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3093            type Value = EpochNewChangeLog;
3094
3095            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3096                formatter.write_str("struct hummock.EpochNewChangeLog")
3097            }
3098
3099            fn visit_map<V>(self, mut map_: V) -> std::result::Result<EpochNewChangeLog, V::Error>
3100                where
3101                    V: serde::de::MapAccess<'de>,
3102            {
3103                let mut old_value__ = None;
3104                let mut new_value__ = None;
3105                let mut epochs__ = None;
3106                while let Some(k) = map_.next_key()? {
3107                    match k {
3108                        GeneratedField::OldValue => {
3109                            if old_value__.is_some() {
3110                                return Err(serde::de::Error::duplicate_field("oldValue"));
3111                            }
3112                            old_value__ = Some(map_.next_value()?);
3113                        }
3114                        GeneratedField::NewValue => {
3115                            if new_value__.is_some() {
3116                                return Err(serde::de::Error::duplicate_field("newValue"));
3117                            }
3118                            new_value__ = Some(map_.next_value()?);
3119                        }
3120                        GeneratedField::Epochs => {
3121                            if epochs__.is_some() {
3122                                return Err(serde::de::Error::duplicate_field("epochs"));
3123                            }
3124                            epochs__ = 
3125                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
3126                                    .into_iter().map(|x| x.0).collect())
3127                            ;
3128                        }
3129                    }
3130                }
3131                Ok(EpochNewChangeLog {
3132                    old_value: old_value__.unwrap_or_default(),
3133                    new_value: new_value__.unwrap_or_default(),
3134                    epochs: epochs__.unwrap_or_default(),
3135                })
3136            }
3137        }
3138        deserializer.deserialize_struct("hummock.EpochNewChangeLog", FIELDS, GeneratedVisitor)
3139    }
3140}
3141impl serde::Serialize for FullScanTask {
3142    #[allow(deprecated)]
3143    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3144    where
3145        S: serde::Serializer,
3146    {
3147        use serde::ser::SerializeStruct;
3148        let mut len = 0;
3149        if self.sst_retention_watermark != 0 {
3150            len += 1;
3151        }
3152        if self.prefix.is_some() {
3153            len += 1;
3154        }
3155        if self.start_after.is_some() {
3156            len += 1;
3157        }
3158        if self.limit.is_some() {
3159            len += 1;
3160        }
3161        let mut struct_ser = serializer.serialize_struct("hummock.FullScanTask", len)?;
3162        if self.sst_retention_watermark != 0 {
3163            #[allow(clippy::needless_borrow)]
3164            #[allow(clippy::needless_borrows_for_generic_args)]
3165            struct_ser.serialize_field("sstRetentionWatermark", ToString::to_string(&self.sst_retention_watermark).as_str())?;
3166        }
3167        if let Some(v) = self.prefix.as_ref() {
3168            struct_ser.serialize_field("prefix", v)?;
3169        }
3170        if let Some(v) = self.start_after.as_ref() {
3171            struct_ser.serialize_field("startAfter", v)?;
3172        }
3173        if let Some(v) = self.limit.as_ref() {
3174            #[allow(clippy::needless_borrow)]
3175            #[allow(clippy::needless_borrows_for_generic_args)]
3176            struct_ser.serialize_field("limit", ToString::to_string(&v).as_str())?;
3177        }
3178        struct_ser.end()
3179    }
3180}
3181impl<'de> serde::Deserialize<'de> for FullScanTask {
3182    #[allow(deprecated)]
3183    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3184    where
3185        D: serde::Deserializer<'de>,
3186    {
3187        const FIELDS: &[&str] = &[
3188            "sst_retention_watermark",
3189            "sstRetentionWatermark",
3190            "prefix",
3191            "start_after",
3192            "startAfter",
3193            "limit",
3194        ];
3195
3196        #[allow(clippy::enum_variant_names)]
3197        enum GeneratedField {
3198            SstRetentionWatermark,
3199            Prefix,
3200            StartAfter,
3201            Limit,
3202        }
3203        impl<'de> serde::Deserialize<'de> for GeneratedField {
3204            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3205            where
3206                D: serde::Deserializer<'de>,
3207            {
3208                struct GeneratedVisitor;
3209
3210                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3211                    type Value = GeneratedField;
3212
3213                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3214                        write!(formatter, "expected one of: {:?}", &FIELDS)
3215                    }
3216
3217                    #[allow(unused_variables)]
3218                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3219                    where
3220                        E: serde::de::Error,
3221                    {
3222                        match value {
3223                            "sstRetentionWatermark" | "sst_retention_watermark" => Ok(GeneratedField::SstRetentionWatermark),
3224                            "prefix" => Ok(GeneratedField::Prefix),
3225                            "startAfter" | "start_after" => Ok(GeneratedField::StartAfter),
3226                            "limit" => Ok(GeneratedField::Limit),
3227                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3228                        }
3229                    }
3230                }
3231                deserializer.deserialize_identifier(GeneratedVisitor)
3232            }
3233        }
3234        struct GeneratedVisitor;
3235        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3236            type Value = FullScanTask;
3237
3238            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3239                formatter.write_str("struct hummock.FullScanTask")
3240            }
3241
3242            fn visit_map<V>(self, mut map_: V) -> std::result::Result<FullScanTask, V::Error>
3243                where
3244                    V: serde::de::MapAccess<'de>,
3245            {
3246                let mut sst_retention_watermark__ = None;
3247                let mut prefix__ = None;
3248                let mut start_after__ = None;
3249                let mut limit__ = None;
3250                while let Some(k) = map_.next_key()? {
3251                    match k {
3252                        GeneratedField::SstRetentionWatermark => {
3253                            if sst_retention_watermark__.is_some() {
3254                                return Err(serde::de::Error::duplicate_field("sstRetentionWatermark"));
3255                            }
3256                            sst_retention_watermark__ = 
3257                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3258                            ;
3259                        }
3260                        GeneratedField::Prefix => {
3261                            if prefix__.is_some() {
3262                                return Err(serde::de::Error::duplicate_field("prefix"));
3263                            }
3264                            prefix__ = map_.next_value()?;
3265                        }
3266                        GeneratedField::StartAfter => {
3267                            if start_after__.is_some() {
3268                                return Err(serde::de::Error::duplicate_field("startAfter"));
3269                            }
3270                            start_after__ = map_.next_value()?;
3271                        }
3272                        GeneratedField::Limit => {
3273                            if limit__.is_some() {
3274                                return Err(serde::de::Error::duplicate_field("limit"));
3275                            }
3276                            limit__ = 
3277                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
3278                            ;
3279                        }
3280                    }
3281                }
3282                Ok(FullScanTask {
3283                    sst_retention_watermark: sst_retention_watermark__.unwrap_or_default(),
3284                    prefix: prefix__,
3285                    start_after: start_after__,
3286                    limit: limit__,
3287                })
3288            }
3289        }
3290        deserializer.deserialize_struct("hummock.FullScanTask", FIELDS, GeneratedVisitor)
3291    }
3292}
3293impl serde::Serialize for GetAssignedCompactTaskNumRequest {
3294    #[allow(deprecated)]
3295    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3296    where
3297        S: serde::Serializer,
3298    {
3299        use serde::ser::SerializeStruct;
3300        let len = 0;
3301        let struct_ser = serializer.serialize_struct("hummock.GetAssignedCompactTaskNumRequest", len)?;
3302        struct_ser.end()
3303    }
3304}
3305impl<'de> serde::Deserialize<'de> for GetAssignedCompactTaskNumRequest {
3306    #[allow(deprecated)]
3307    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3308    where
3309        D: serde::Deserializer<'de>,
3310    {
3311        const FIELDS: &[&str] = &[
3312        ];
3313
3314        #[allow(clippy::enum_variant_names)]
3315        enum GeneratedField {
3316        }
3317        impl<'de> serde::Deserialize<'de> for GeneratedField {
3318            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3319            where
3320                D: serde::Deserializer<'de>,
3321            {
3322                struct GeneratedVisitor;
3323
3324                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3325                    type Value = GeneratedField;
3326
3327                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3328                        write!(formatter, "expected one of: {:?}", &FIELDS)
3329                    }
3330
3331                    #[allow(unused_variables)]
3332                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3333                    where
3334                        E: serde::de::Error,
3335                    {
3336                            Err(serde::de::Error::unknown_field(value, FIELDS))
3337                    }
3338                }
3339                deserializer.deserialize_identifier(GeneratedVisitor)
3340            }
3341        }
3342        struct GeneratedVisitor;
3343        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3344            type Value = GetAssignedCompactTaskNumRequest;
3345
3346            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3347                formatter.write_str("struct hummock.GetAssignedCompactTaskNumRequest")
3348            }
3349
3350            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAssignedCompactTaskNumRequest, V::Error>
3351                where
3352                    V: serde::de::MapAccess<'de>,
3353            {
3354                while map_.next_key::<GeneratedField>()?.is_some() {
3355                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
3356                }
3357                Ok(GetAssignedCompactTaskNumRequest {
3358                })
3359            }
3360        }
3361        deserializer.deserialize_struct("hummock.GetAssignedCompactTaskNumRequest", FIELDS, GeneratedVisitor)
3362    }
3363}
3364impl serde::Serialize for GetAssignedCompactTaskNumResponse {
3365    #[allow(deprecated)]
3366    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3367    where
3368        S: serde::Serializer,
3369    {
3370        use serde::ser::SerializeStruct;
3371        let mut len = 0;
3372        if self.num_tasks != 0 {
3373            len += 1;
3374        }
3375        let mut struct_ser = serializer.serialize_struct("hummock.GetAssignedCompactTaskNumResponse", len)?;
3376        if self.num_tasks != 0 {
3377            struct_ser.serialize_field("numTasks", &self.num_tasks)?;
3378        }
3379        struct_ser.end()
3380    }
3381}
3382impl<'de> serde::Deserialize<'de> for GetAssignedCompactTaskNumResponse {
3383    #[allow(deprecated)]
3384    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3385    where
3386        D: serde::Deserializer<'de>,
3387    {
3388        const FIELDS: &[&str] = &[
3389            "num_tasks",
3390            "numTasks",
3391        ];
3392
3393        #[allow(clippy::enum_variant_names)]
3394        enum GeneratedField {
3395            NumTasks,
3396        }
3397        impl<'de> serde::Deserialize<'de> for GeneratedField {
3398            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3399            where
3400                D: serde::Deserializer<'de>,
3401            {
3402                struct GeneratedVisitor;
3403
3404                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3405                    type Value = GeneratedField;
3406
3407                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3408                        write!(formatter, "expected one of: {:?}", &FIELDS)
3409                    }
3410
3411                    #[allow(unused_variables)]
3412                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3413                    where
3414                        E: serde::de::Error,
3415                    {
3416                        match value {
3417                            "numTasks" | "num_tasks" => Ok(GeneratedField::NumTasks),
3418                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3419                        }
3420                    }
3421                }
3422                deserializer.deserialize_identifier(GeneratedVisitor)
3423            }
3424        }
3425        struct GeneratedVisitor;
3426        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3427            type Value = GetAssignedCompactTaskNumResponse;
3428
3429            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3430                formatter.write_str("struct hummock.GetAssignedCompactTaskNumResponse")
3431            }
3432
3433            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAssignedCompactTaskNumResponse, V::Error>
3434                where
3435                    V: serde::de::MapAccess<'de>,
3436            {
3437                let mut num_tasks__ = None;
3438                while let Some(k) = map_.next_key()? {
3439                    match k {
3440                        GeneratedField::NumTasks => {
3441                            if num_tasks__.is_some() {
3442                                return Err(serde::de::Error::duplicate_field("numTasks"));
3443                            }
3444                            num_tasks__ = 
3445                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3446                            ;
3447                        }
3448                    }
3449                }
3450                Ok(GetAssignedCompactTaskNumResponse {
3451                    num_tasks: num_tasks__.unwrap_or_default(),
3452                })
3453            }
3454        }
3455        deserializer.deserialize_struct("hummock.GetAssignedCompactTaskNumResponse", FIELDS, GeneratedVisitor)
3456    }
3457}
3458impl serde::Serialize for GetCompactionScoreRequest {
3459    #[allow(deprecated)]
3460    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3461    where
3462        S: serde::Serializer,
3463    {
3464        use serde::ser::SerializeStruct;
3465        let mut len = 0;
3466        if self.compaction_group_id != 0 {
3467            len += 1;
3468        }
3469        let mut struct_ser = serializer.serialize_struct("hummock.GetCompactionScoreRequest", len)?;
3470        if self.compaction_group_id != 0 {
3471            #[allow(clippy::needless_borrow)]
3472            #[allow(clippy::needless_borrows_for_generic_args)]
3473            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&self.compaction_group_id).as_str())?;
3474        }
3475        struct_ser.end()
3476    }
3477}
3478impl<'de> serde::Deserialize<'de> for GetCompactionScoreRequest {
3479    #[allow(deprecated)]
3480    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3481    where
3482        D: serde::Deserializer<'de>,
3483    {
3484        const FIELDS: &[&str] = &[
3485            "compaction_group_id",
3486            "compactionGroupId",
3487        ];
3488
3489        #[allow(clippy::enum_variant_names)]
3490        enum GeneratedField {
3491            CompactionGroupId,
3492        }
3493        impl<'de> serde::Deserialize<'de> for GeneratedField {
3494            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3495            where
3496                D: serde::Deserializer<'de>,
3497            {
3498                struct GeneratedVisitor;
3499
3500                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3501                    type Value = GeneratedField;
3502
3503                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3504                        write!(formatter, "expected one of: {:?}", &FIELDS)
3505                    }
3506
3507                    #[allow(unused_variables)]
3508                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3509                    where
3510                        E: serde::de::Error,
3511                    {
3512                        match value {
3513                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
3514                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3515                        }
3516                    }
3517                }
3518                deserializer.deserialize_identifier(GeneratedVisitor)
3519            }
3520        }
3521        struct GeneratedVisitor;
3522        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3523            type Value = GetCompactionScoreRequest;
3524
3525            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3526                formatter.write_str("struct hummock.GetCompactionScoreRequest")
3527            }
3528
3529            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCompactionScoreRequest, V::Error>
3530                where
3531                    V: serde::de::MapAccess<'de>,
3532            {
3533                let mut compaction_group_id__ = None;
3534                while let Some(k) = map_.next_key()? {
3535                    match k {
3536                        GeneratedField::CompactionGroupId => {
3537                            if compaction_group_id__.is_some() {
3538                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
3539                            }
3540                            compaction_group_id__ = 
3541                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3542                            ;
3543                        }
3544                    }
3545                }
3546                Ok(GetCompactionScoreRequest {
3547                    compaction_group_id: compaction_group_id__.unwrap_or_default(),
3548                })
3549            }
3550        }
3551        deserializer.deserialize_struct("hummock.GetCompactionScoreRequest", FIELDS, GeneratedVisitor)
3552    }
3553}
3554impl serde::Serialize for GetCompactionScoreResponse {
3555    #[allow(deprecated)]
3556    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3557    where
3558        S: serde::Serializer,
3559    {
3560        use serde::ser::SerializeStruct;
3561        let mut len = 0;
3562        if self.compaction_group_id != 0 {
3563            len += 1;
3564        }
3565        if !self.scores.is_empty() {
3566            len += 1;
3567        }
3568        let mut struct_ser = serializer.serialize_struct("hummock.GetCompactionScoreResponse", len)?;
3569        if self.compaction_group_id != 0 {
3570            #[allow(clippy::needless_borrow)]
3571            #[allow(clippy::needless_borrows_for_generic_args)]
3572            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&self.compaction_group_id).as_str())?;
3573        }
3574        if !self.scores.is_empty() {
3575            struct_ser.serialize_field("scores", &self.scores)?;
3576        }
3577        struct_ser.end()
3578    }
3579}
3580impl<'de> serde::Deserialize<'de> for GetCompactionScoreResponse {
3581    #[allow(deprecated)]
3582    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3583    where
3584        D: serde::Deserializer<'de>,
3585    {
3586        const FIELDS: &[&str] = &[
3587            "compaction_group_id",
3588            "compactionGroupId",
3589            "scores",
3590        ];
3591
3592        #[allow(clippy::enum_variant_names)]
3593        enum GeneratedField {
3594            CompactionGroupId,
3595            Scores,
3596        }
3597        impl<'de> serde::Deserialize<'de> for GeneratedField {
3598            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3599            where
3600                D: serde::Deserializer<'de>,
3601            {
3602                struct GeneratedVisitor;
3603
3604                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3605                    type Value = GeneratedField;
3606
3607                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3608                        write!(formatter, "expected one of: {:?}", &FIELDS)
3609                    }
3610
3611                    #[allow(unused_variables)]
3612                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3613                    where
3614                        E: serde::de::Error,
3615                    {
3616                        match value {
3617                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
3618                            "scores" => Ok(GeneratedField::Scores),
3619                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3620                        }
3621                    }
3622                }
3623                deserializer.deserialize_identifier(GeneratedVisitor)
3624            }
3625        }
3626        struct GeneratedVisitor;
3627        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3628            type Value = GetCompactionScoreResponse;
3629
3630            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3631                formatter.write_str("struct hummock.GetCompactionScoreResponse")
3632            }
3633
3634            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCompactionScoreResponse, V::Error>
3635                where
3636                    V: serde::de::MapAccess<'de>,
3637            {
3638                let mut compaction_group_id__ = None;
3639                let mut scores__ = None;
3640                while let Some(k) = map_.next_key()? {
3641                    match k {
3642                        GeneratedField::CompactionGroupId => {
3643                            if compaction_group_id__.is_some() {
3644                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
3645                            }
3646                            compaction_group_id__ = 
3647                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3648                            ;
3649                        }
3650                        GeneratedField::Scores => {
3651                            if scores__.is_some() {
3652                                return Err(serde::de::Error::duplicate_field("scores"));
3653                            }
3654                            scores__ = Some(map_.next_value()?);
3655                        }
3656                    }
3657                }
3658                Ok(GetCompactionScoreResponse {
3659                    compaction_group_id: compaction_group_id__.unwrap_or_default(),
3660                    scores: scores__.unwrap_or_default(),
3661                })
3662            }
3663        }
3664        deserializer.deserialize_struct("hummock.GetCompactionScoreResponse", FIELDS, GeneratedVisitor)
3665    }
3666}
3667impl serde::Serialize for get_compaction_score_response::PickerInfo {
3668    #[allow(deprecated)]
3669    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3670    where
3671        S: serde::Serializer,
3672    {
3673        use serde::ser::SerializeStruct;
3674        let mut len = 0;
3675        if self.score != 0 {
3676            len += 1;
3677        }
3678        if self.select_level != 0 {
3679            len += 1;
3680        }
3681        if self.target_level != 0 {
3682            len += 1;
3683        }
3684        if !self.picker_type.is_empty() {
3685            len += 1;
3686        }
3687        let mut struct_ser = serializer.serialize_struct("hummock.GetCompactionScoreResponse.PickerInfo", len)?;
3688        if self.score != 0 {
3689            #[allow(clippy::needless_borrow)]
3690            #[allow(clippy::needless_borrows_for_generic_args)]
3691            struct_ser.serialize_field("score", ToString::to_string(&self.score).as_str())?;
3692        }
3693        if self.select_level != 0 {
3694            #[allow(clippy::needless_borrow)]
3695            #[allow(clippy::needless_borrows_for_generic_args)]
3696            struct_ser.serialize_field("selectLevel", ToString::to_string(&self.select_level).as_str())?;
3697        }
3698        if self.target_level != 0 {
3699            #[allow(clippy::needless_borrow)]
3700            #[allow(clippy::needless_borrows_for_generic_args)]
3701            struct_ser.serialize_field("targetLevel", ToString::to_string(&self.target_level).as_str())?;
3702        }
3703        if !self.picker_type.is_empty() {
3704            struct_ser.serialize_field("pickerType", &self.picker_type)?;
3705        }
3706        struct_ser.end()
3707    }
3708}
3709impl<'de> serde::Deserialize<'de> for get_compaction_score_response::PickerInfo {
3710    #[allow(deprecated)]
3711    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3712    where
3713        D: serde::Deserializer<'de>,
3714    {
3715        const FIELDS: &[&str] = &[
3716            "score",
3717            "select_level",
3718            "selectLevel",
3719            "target_level",
3720            "targetLevel",
3721            "picker_type",
3722            "pickerType",
3723        ];
3724
3725        #[allow(clippy::enum_variant_names)]
3726        enum GeneratedField {
3727            Score,
3728            SelectLevel,
3729            TargetLevel,
3730            PickerType,
3731        }
3732        impl<'de> serde::Deserialize<'de> for GeneratedField {
3733            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3734            where
3735                D: serde::Deserializer<'de>,
3736            {
3737                struct GeneratedVisitor;
3738
3739                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3740                    type Value = GeneratedField;
3741
3742                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3743                        write!(formatter, "expected one of: {:?}", &FIELDS)
3744                    }
3745
3746                    #[allow(unused_variables)]
3747                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3748                    where
3749                        E: serde::de::Error,
3750                    {
3751                        match value {
3752                            "score" => Ok(GeneratedField::Score),
3753                            "selectLevel" | "select_level" => Ok(GeneratedField::SelectLevel),
3754                            "targetLevel" | "target_level" => Ok(GeneratedField::TargetLevel),
3755                            "pickerType" | "picker_type" => Ok(GeneratedField::PickerType),
3756                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3757                        }
3758                    }
3759                }
3760                deserializer.deserialize_identifier(GeneratedVisitor)
3761            }
3762        }
3763        struct GeneratedVisitor;
3764        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3765            type Value = get_compaction_score_response::PickerInfo;
3766
3767            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3768                formatter.write_str("struct hummock.GetCompactionScoreResponse.PickerInfo")
3769            }
3770
3771            fn visit_map<V>(self, mut map_: V) -> std::result::Result<get_compaction_score_response::PickerInfo, V::Error>
3772                where
3773                    V: serde::de::MapAccess<'de>,
3774            {
3775                let mut score__ = None;
3776                let mut select_level__ = None;
3777                let mut target_level__ = None;
3778                let mut picker_type__ = None;
3779                while let Some(k) = map_.next_key()? {
3780                    match k {
3781                        GeneratedField::Score => {
3782                            if score__.is_some() {
3783                                return Err(serde::de::Error::duplicate_field("score"));
3784                            }
3785                            score__ = 
3786                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3787                            ;
3788                        }
3789                        GeneratedField::SelectLevel => {
3790                            if select_level__.is_some() {
3791                                return Err(serde::de::Error::duplicate_field("selectLevel"));
3792                            }
3793                            select_level__ = 
3794                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3795                            ;
3796                        }
3797                        GeneratedField::TargetLevel => {
3798                            if target_level__.is_some() {
3799                                return Err(serde::de::Error::duplicate_field("targetLevel"));
3800                            }
3801                            target_level__ = 
3802                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3803                            ;
3804                        }
3805                        GeneratedField::PickerType => {
3806                            if picker_type__.is_some() {
3807                                return Err(serde::de::Error::duplicate_field("pickerType"));
3808                            }
3809                            picker_type__ = Some(map_.next_value()?);
3810                        }
3811                    }
3812                }
3813                Ok(get_compaction_score_response::PickerInfo {
3814                    score: score__.unwrap_or_default(),
3815                    select_level: select_level__.unwrap_or_default(),
3816                    target_level: target_level__.unwrap_or_default(),
3817                    picker_type: picker_type__.unwrap_or_default(),
3818                })
3819            }
3820        }
3821        deserializer.deserialize_struct("hummock.GetCompactionScoreResponse.PickerInfo", FIELDS, GeneratedVisitor)
3822    }
3823}
3824impl serde::Serialize for GetCurrentVersionRequest {
3825    #[allow(deprecated)]
3826    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3827    where
3828        S: serde::Serializer,
3829    {
3830        use serde::ser::SerializeStruct;
3831        let len = 0;
3832        let struct_ser = serializer.serialize_struct("hummock.GetCurrentVersionRequest", len)?;
3833        struct_ser.end()
3834    }
3835}
3836impl<'de> serde::Deserialize<'de> for GetCurrentVersionRequest {
3837    #[allow(deprecated)]
3838    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3839    where
3840        D: serde::Deserializer<'de>,
3841    {
3842        const FIELDS: &[&str] = &[
3843        ];
3844
3845        #[allow(clippy::enum_variant_names)]
3846        enum GeneratedField {
3847        }
3848        impl<'de> serde::Deserialize<'de> for GeneratedField {
3849            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3850            where
3851                D: serde::Deserializer<'de>,
3852            {
3853                struct GeneratedVisitor;
3854
3855                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3856                    type Value = GeneratedField;
3857
3858                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3859                        write!(formatter, "expected one of: {:?}", &FIELDS)
3860                    }
3861
3862                    #[allow(unused_variables)]
3863                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3864                    where
3865                        E: serde::de::Error,
3866                    {
3867                            Err(serde::de::Error::unknown_field(value, FIELDS))
3868                    }
3869                }
3870                deserializer.deserialize_identifier(GeneratedVisitor)
3871            }
3872        }
3873        struct GeneratedVisitor;
3874        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3875            type Value = GetCurrentVersionRequest;
3876
3877            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3878                formatter.write_str("struct hummock.GetCurrentVersionRequest")
3879            }
3880
3881            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCurrentVersionRequest, V::Error>
3882                where
3883                    V: serde::de::MapAccess<'de>,
3884            {
3885                while map_.next_key::<GeneratedField>()?.is_some() {
3886                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
3887                }
3888                Ok(GetCurrentVersionRequest {
3889                })
3890            }
3891        }
3892        deserializer.deserialize_struct("hummock.GetCurrentVersionRequest", FIELDS, GeneratedVisitor)
3893    }
3894}
3895impl serde::Serialize for GetCurrentVersionResponse {
3896    #[allow(deprecated)]
3897    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3898    where
3899        S: serde::Serializer,
3900    {
3901        use serde::ser::SerializeStruct;
3902        let mut len = 0;
3903        if self.status.is_some() {
3904            len += 1;
3905        }
3906        if self.current_version.is_some() {
3907            len += 1;
3908        }
3909        let mut struct_ser = serializer.serialize_struct("hummock.GetCurrentVersionResponse", len)?;
3910        if let Some(v) = self.status.as_ref() {
3911            struct_ser.serialize_field("status", v)?;
3912        }
3913        if let Some(v) = self.current_version.as_ref() {
3914            struct_ser.serialize_field("currentVersion", v)?;
3915        }
3916        struct_ser.end()
3917    }
3918}
3919impl<'de> serde::Deserialize<'de> for GetCurrentVersionResponse {
3920    #[allow(deprecated)]
3921    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3922    where
3923        D: serde::Deserializer<'de>,
3924    {
3925        const FIELDS: &[&str] = &[
3926            "status",
3927            "current_version",
3928            "currentVersion",
3929        ];
3930
3931        #[allow(clippy::enum_variant_names)]
3932        enum GeneratedField {
3933            Status,
3934            CurrentVersion,
3935        }
3936        impl<'de> serde::Deserialize<'de> for GeneratedField {
3937            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3938            where
3939                D: serde::Deserializer<'de>,
3940            {
3941                struct GeneratedVisitor;
3942
3943                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3944                    type Value = GeneratedField;
3945
3946                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3947                        write!(formatter, "expected one of: {:?}", &FIELDS)
3948                    }
3949
3950                    #[allow(unused_variables)]
3951                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3952                    where
3953                        E: serde::de::Error,
3954                    {
3955                        match value {
3956                            "status" => Ok(GeneratedField::Status),
3957                            "currentVersion" | "current_version" => Ok(GeneratedField::CurrentVersion),
3958                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3959                        }
3960                    }
3961                }
3962                deserializer.deserialize_identifier(GeneratedVisitor)
3963            }
3964        }
3965        struct GeneratedVisitor;
3966        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3967            type Value = GetCurrentVersionResponse;
3968
3969            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3970                formatter.write_str("struct hummock.GetCurrentVersionResponse")
3971            }
3972
3973            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCurrentVersionResponse, V::Error>
3974                where
3975                    V: serde::de::MapAccess<'de>,
3976            {
3977                let mut status__ = None;
3978                let mut current_version__ = None;
3979                while let Some(k) = map_.next_key()? {
3980                    match k {
3981                        GeneratedField::Status => {
3982                            if status__.is_some() {
3983                                return Err(serde::de::Error::duplicate_field("status"));
3984                            }
3985                            status__ = map_.next_value()?;
3986                        }
3987                        GeneratedField::CurrentVersion => {
3988                            if current_version__.is_some() {
3989                                return Err(serde::de::Error::duplicate_field("currentVersion"));
3990                            }
3991                            current_version__ = map_.next_value()?;
3992                        }
3993                    }
3994                }
3995                Ok(GetCurrentVersionResponse {
3996                    status: status__,
3997                    current_version: current_version__,
3998                })
3999            }
4000        }
4001        deserializer.deserialize_struct("hummock.GetCurrentVersionResponse", FIELDS, GeneratedVisitor)
4002    }
4003}
4004impl serde::Serialize for GetNewSstIdsRequest {
4005    #[allow(deprecated)]
4006    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4007    where
4008        S: serde::Serializer,
4009    {
4010        use serde::ser::SerializeStruct;
4011        let mut len = 0;
4012        if self.number != 0 {
4013            len += 1;
4014        }
4015        let mut struct_ser = serializer.serialize_struct("hummock.GetNewSstIdsRequest", len)?;
4016        if self.number != 0 {
4017            struct_ser.serialize_field("number", &self.number)?;
4018        }
4019        struct_ser.end()
4020    }
4021}
4022impl<'de> serde::Deserialize<'de> for GetNewSstIdsRequest {
4023    #[allow(deprecated)]
4024    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4025    where
4026        D: serde::Deserializer<'de>,
4027    {
4028        const FIELDS: &[&str] = &[
4029            "number",
4030        ];
4031
4032        #[allow(clippy::enum_variant_names)]
4033        enum GeneratedField {
4034            Number,
4035        }
4036        impl<'de> serde::Deserialize<'de> for GeneratedField {
4037            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4038            where
4039                D: serde::Deserializer<'de>,
4040            {
4041                struct GeneratedVisitor;
4042
4043                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4044                    type Value = GeneratedField;
4045
4046                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4047                        write!(formatter, "expected one of: {:?}", &FIELDS)
4048                    }
4049
4050                    #[allow(unused_variables)]
4051                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4052                    where
4053                        E: serde::de::Error,
4054                    {
4055                        match value {
4056                            "number" => Ok(GeneratedField::Number),
4057                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4058                        }
4059                    }
4060                }
4061                deserializer.deserialize_identifier(GeneratedVisitor)
4062            }
4063        }
4064        struct GeneratedVisitor;
4065        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4066            type Value = GetNewSstIdsRequest;
4067
4068            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4069                formatter.write_str("struct hummock.GetNewSstIdsRequest")
4070            }
4071
4072            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetNewSstIdsRequest, V::Error>
4073                where
4074                    V: serde::de::MapAccess<'de>,
4075            {
4076                let mut number__ = None;
4077                while let Some(k) = map_.next_key()? {
4078                    match k {
4079                        GeneratedField::Number => {
4080                            if number__.is_some() {
4081                                return Err(serde::de::Error::duplicate_field("number"));
4082                            }
4083                            number__ = 
4084                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4085                            ;
4086                        }
4087                    }
4088                }
4089                Ok(GetNewSstIdsRequest {
4090                    number: number__.unwrap_or_default(),
4091                })
4092            }
4093        }
4094        deserializer.deserialize_struct("hummock.GetNewSstIdsRequest", FIELDS, GeneratedVisitor)
4095    }
4096}
4097impl serde::Serialize for GetNewSstIdsResponse {
4098    #[allow(deprecated)]
4099    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4100    where
4101        S: serde::Serializer,
4102    {
4103        use serde::ser::SerializeStruct;
4104        let mut len = 0;
4105        if self.status.is_some() {
4106            len += 1;
4107        }
4108        if self.start_id != 0 {
4109            len += 1;
4110        }
4111        if self.end_id != 0 {
4112            len += 1;
4113        }
4114        let mut struct_ser = serializer.serialize_struct("hummock.GetNewSstIdsResponse", len)?;
4115        if let Some(v) = self.status.as_ref() {
4116            struct_ser.serialize_field("status", v)?;
4117        }
4118        if self.start_id != 0 {
4119            #[allow(clippy::needless_borrow)]
4120            #[allow(clippy::needless_borrows_for_generic_args)]
4121            struct_ser.serialize_field("startId", ToString::to_string(&self.start_id).as_str())?;
4122        }
4123        if self.end_id != 0 {
4124            #[allow(clippy::needless_borrow)]
4125            #[allow(clippy::needless_borrows_for_generic_args)]
4126            struct_ser.serialize_field("endId", ToString::to_string(&self.end_id).as_str())?;
4127        }
4128        struct_ser.end()
4129    }
4130}
4131impl<'de> serde::Deserialize<'de> for GetNewSstIdsResponse {
4132    #[allow(deprecated)]
4133    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4134    where
4135        D: serde::Deserializer<'de>,
4136    {
4137        const FIELDS: &[&str] = &[
4138            "status",
4139            "start_id",
4140            "startId",
4141            "end_id",
4142            "endId",
4143        ];
4144
4145        #[allow(clippy::enum_variant_names)]
4146        enum GeneratedField {
4147            Status,
4148            StartId,
4149            EndId,
4150        }
4151        impl<'de> serde::Deserialize<'de> for GeneratedField {
4152            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4153            where
4154                D: serde::Deserializer<'de>,
4155            {
4156                struct GeneratedVisitor;
4157
4158                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4159                    type Value = GeneratedField;
4160
4161                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4162                        write!(formatter, "expected one of: {:?}", &FIELDS)
4163                    }
4164
4165                    #[allow(unused_variables)]
4166                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4167                    where
4168                        E: serde::de::Error,
4169                    {
4170                        match value {
4171                            "status" => Ok(GeneratedField::Status),
4172                            "startId" | "start_id" => Ok(GeneratedField::StartId),
4173                            "endId" | "end_id" => Ok(GeneratedField::EndId),
4174                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4175                        }
4176                    }
4177                }
4178                deserializer.deserialize_identifier(GeneratedVisitor)
4179            }
4180        }
4181        struct GeneratedVisitor;
4182        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4183            type Value = GetNewSstIdsResponse;
4184
4185            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4186                formatter.write_str("struct hummock.GetNewSstIdsResponse")
4187            }
4188
4189            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetNewSstIdsResponse, V::Error>
4190                where
4191                    V: serde::de::MapAccess<'de>,
4192            {
4193                let mut status__ = None;
4194                let mut start_id__ = None;
4195                let mut end_id__ = None;
4196                while let Some(k) = map_.next_key()? {
4197                    match k {
4198                        GeneratedField::Status => {
4199                            if status__.is_some() {
4200                                return Err(serde::de::Error::duplicate_field("status"));
4201                            }
4202                            status__ = map_.next_value()?;
4203                        }
4204                        GeneratedField::StartId => {
4205                            if start_id__.is_some() {
4206                                return Err(serde::de::Error::duplicate_field("startId"));
4207                            }
4208                            start_id__ = 
4209                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4210                            ;
4211                        }
4212                        GeneratedField::EndId => {
4213                            if end_id__.is_some() {
4214                                return Err(serde::de::Error::duplicate_field("endId"));
4215                            }
4216                            end_id__ = 
4217                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4218                            ;
4219                        }
4220                    }
4221                }
4222                Ok(GetNewSstIdsResponse {
4223                    status: status__,
4224                    start_id: start_id__.unwrap_or_default(),
4225                    end_id: end_id__.unwrap_or_default(),
4226                })
4227            }
4228        }
4229        deserializer.deserialize_struct("hummock.GetNewSstIdsResponse", FIELDS, GeneratedVisitor)
4230    }
4231}
4232impl serde::Serialize for GetVersionByEpochRequest {
4233    #[allow(deprecated)]
4234    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4235    where
4236        S: serde::Serializer,
4237    {
4238        use serde::ser::SerializeStruct;
4239        let mut len = 0;
4240        if self.epoch != 0 {
4241            len += 1;
4242        }
4243        if self.table_id != 0 {
4244            len += 1;
4245        }
4246        let mut struct_ser = serializer.serialize_struct("hummock.GetVersionByEpochRequest", len)?;
4247        if self.epoch != 0 {
4248            #[allow(clippy::needless_borrow)]
4249            #[allow(clippy::needless_borrows_for_generic_args)]
4250            struct_ser.serialize_field("epoch", ToString::to_string(&self.epoch).as_str())?;
4251        }
4252        if self.table_id != 0 {
4253            struct_ser.serialize_field("tableId", &self.table_id)?;
4254        }
4255        struct_ser.end()
4256    }
4257}
4258impl<'de> serde::Deserialize<'de> for GetVersionByEpochRequest {
4259    #[allow(deprecated)]
4260    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4261    where
4262        D: serde::Deserializer<'de>,
4263    {
4264        const FIELDS: &[&str] = &[
4265            "epoch",
4266            "table_id",
4267            "tableId",
4268        ];
4269
4270        #[allow(clippy::enum_variant_names)]
4271        enum GeneratedField {
4272            Epoch,
4273            TableId,
4274        }
4275        impl<'de> serde::Deserialize<'de> for GeneratedField {
4276            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4277            where
4278                D: serde::Deserializer<'de>,
4279            {
4280                struct GeneratedVisitor;
4281
4282                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4283                    type Value = GeneratedField;
4284
4285                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4286                        write!(formatter, "expected one of: {:?}", &FIELDS)
4287                    }
4288
4289                    #[allow(unused_variables)]
4290                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4291                    where
4292                        E: serde::de::Error,
4293                    {
4294                        match value {
4295                            "epoch" => Ok(GeneratedField::Epoch),
4296                            "tableId" | "table_id" => Ok(GeneratedField::TableId),
4297                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4298                        }
4299                    }
4300                }
4301                deserializer.deserialize_identifier(GeneratedVisitor)
4302            }
4303        }
4304        struct GeneratedVisitor;
4305        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4306            type Value = GetVersionByEpochRequest;
4307
4308            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4309                formatter.write_str("struct hummock.GetVersionByEpochRequest")
4310            }
4311
4312            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetVersionByEpochRequest, V::Error>
4313                where
4314                    V: serde::de::MapAccess<'de>,
4315            {
4316                let mut epoch__ = None;
4317                let mut table_id__ = None;
4318                while let Some(k) = map_.next_key()? {
4319                    match k {
4320                        GeneratedField::Epoch => {
4321                            if epoch__.is_some() {
4322                                return Err(serde::de::Error::duplicate_field("epoch"));
4323                            }
4324                            epoch__ = 
4325                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4326                            ;
4327                        }
4328                        GeneratedField::TableId => {
4329                            if table_id__.is_some() {
4330                                return Err(serde::de::Error::duplicate_field("tableId"));
4331                            }
4332                            table_id__ = 
4333                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4334                            ;
4335                        }
4336                    }
4337                }
4338                Ok(GetVersionByEpochRequest {
4339                    epoch: epoch__.unwrap_or_default(),
4340                    table_id: table_id__.unwrap_or_default(),
4341                })
4342            }
4343        }
4344        deserializer.deserialize_struct("hummock.GetVersionByEpochRequest", FIELDS, GeneratedVisitor)
4345    }
4346}
4347impl serde::Serialize for GetVersionByEpochResponse {
4348    #[allow(deprecated)]
4349    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4350    where
4351        S: serde::Serializer,
4352    {
4353        use serde::ser::SerializeStruct;
4354        let mut len = 0;
4355        if self.version.is_some() {
4356            len += 1;
4357        }
4358        let mut struct_ser = serializer.serialize_struct("hummock.GetVersionByEpochResponse", len)?;
4359        if let Some(v) = self.version.as_ref() {
4360            struct_ser.serialize_field("version", v)?;
4361        }
4362        struct_ser.end()
4363    }
4364}
4365impl<'de> serde::Deserialize<'de> for GetVersionByEpochResponse {
4366    #[allow(deprecated)]
4367    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4368    where
4369        D: serde::Deserializer<'de>,
4370    {
4371        const FIELDS: &[&str] = &[
4372            "version",
4373        ];
4374
4375        #[allow(clippy::enum_variant_names)]
4376        enum GeneratedField {
4377            Version,
4378        }
4379        impl<'de> serde::Deserialize<'de> for GeneratedField {
4380            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4381            where
4382                D: serde::Deserializer<'de>,
4383            {
4384                struct GeneratedVisitor;
4385
4386                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4387                    type Value = GeneratedField;
4388
4389                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4390                        write!(formatter, "expected one of: {:?}", &FIELDS)
4391                    }
4392
4393                    #[allow(unused_variables)]
4394                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4395                    where
4396                        E: serde::de::Error,
4397                    {
4398                        match value {
4399                            "version" => Ok(GeneratedField::Version),
4400                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4401                        }
4402                    }
4403                }
4404                deserializer.deserialize_identifier(GeneratedVisitor)
4405            }
4406        }
4407        struct GeneratedVisitor;
4408        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4409            type Value = GetVersionByEpochResponse;
4410
4411            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4412                formatter.write_str("struct hummock.GetVersionByEpochResponse")
4413            }
4414
4415            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetVersionByEpochResponse, V::Error>
4416                where
4417                    V: serde::de::MapAccess<'de>,
4418            {
4419                let mut version__ = None;
4420                while let Some(k) = map_.next_key()? {
4421                    match k {
4422                        GeneratedField::Version => {
4423                            if version__.is_some() {
4424                                return Err(serde::de::Error::duplicate_field("version"));
4425                            }
4426                            version__ = map_.next_value()?;
4427                        }
4428                    }
4429                }
4430                Ok(GetVersionByEpochResponse {
4431                    version: version__,
4432                })
4433            }
4434        }
4435        deserializer.deserialize_struct("hummock.GetVersionByEpochResponse", FIELDS, GeneratedVisitor)
4436    }
4437}
4438impl serde::Serialize for GroupConstruct {
4439    #[allow(deprecated)]
4440    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4441    where
4442        S: serde::Serializer,
4443    {
4444        use serde::ser::SerializeStruct;
4445        let mut len = 0;
4446        if self.group_config.is_some() {
4447            len += 1;
4448        }
4449        if self.parent_group_id != 0 {
4450            len += 1;
4451        }
4452        if !self.table_ids.is_empty() {
4453            len += 1;
4454        }
4455        if self.group_id != 0 {
4456            len += 1;
4457        }
4458        if self.new_sst_start_id != 0 {
4459            len += 1;
4460        }
4461        if self.version != 0 {
4462            len += 1;
4463        }
4464        if self.split_key.is_some() {
4465            len += 1;
4466        }
4467        let mut struct_ser = serializer.serialize_struct("hummock.GroupConstruct", len)?;
4468        if let Some(v) = self.group_config.as_ref() {
4469            struct_ser.serialize_field("groupConfig", v)?;
4470        }
4471        if self.parent_group_id != 0 {
4472            #[allow(clippy::needless_borrow)]
4473            #[allow(clippy::needless_borrows_for_generic_args)]
4474            struct_ser.serialize_field("parentGroupId", ToString::to_string(&self.parent_group_id).as_str())?;
4475        }
4476        if !self.table_ids.is_empty() {
4477            struct_ser.serialize_field("tableIds", &self.table_ids)?;
4478        }
4479        if self.group_id != 0 {
4480            #[allow(clippy::needless_borrow)]
4481            #[allow(clippy::needless_borrows_for_generic_args)]
4482            struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?;
4483        }
4484        if self.new_sst_start_id != 0 {
4485            #[allow(clippy::needless_borrow)]
4486            #[allow(clippy::needless_borrows_for_generic_args)]
4487            struct_ser.serialize_field("newSstStartId", ToString::to_string(&self.new_sst_start_id).as_str())?;
4488        }
4489        if self.version != 0 {
4490            let v = CompatibilityVersion::try_from(self.version)
4491                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.version)))?;
4492            struct_ser.serialize_field("version", &v)?;
4493        }
4494        if let Some(v) = self.split_key.as_ref() {
4495            #[allow(clippy::needless_borrow)]
4496            #[allow(clippy::needless_borrows_for_generic_args)]
4497            struct_ser.serialize_field("splitKey", pbjson::private::base64::encode(&v).as_str())?;
4498        }
4499        struct_ser.end()
4500    }
4501}
4502impl<'de> serde::Deserialize<'de> for GroupConstruct {
4503    #[allow(deprecated)]
4504    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4505    where
4506        D: serde::Deserializer<'de>,
4507    {
4508        const FIELDS: &[&str] = &[
4509            "group_config",
4510            "groupConfig",
4511            "parent_group_id",
4512            "parentGroupId",
4513            "table_ids",
4514            "tableIds",
4515            "group_id",
4516            "groupId",
4517            "new_sst_start_id",
4518            "newSstStartId",
4519            "version",
4520            "split_key",
4521            "splitKey",
4522        ];
4523
4524        #[allow(clippy::enum_variant_names)]
4525        enum GeneratedField {
4526            GroupConfig,
4527            ParentGroupId,
4528            TableIds,
4529            GroupId,
4530            NewSstStartId,
4531            Version,
4532            SplitKey,
4533        }
4534        impl<'de> serde::Deserialize<'de> for GeneratedField {
4535            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4536            where
4537                D: serde::Deserializer<'de>,
4538            {
4539                struct GeneratedVisitor;
4540
4541                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4542                    type Value = GeneratedField;
4543
4544                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4545                        write!(formatter, "expected one of: {:?}", &FIELDS)
4546                    }
4547
4548                    #[allow(unused_variables)]
4549                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4550                    where
4551                        E: serde::de::Error,
4552                    {
4553                        match value {
4554                            "groupConfig" | "group_config" => Ok(GeneratedField::GroupConfig),
4555                            "parentGroupId" | "parent_group_id" => Ok(GeneratedField::ParentGroupId),
4556                            "tableIds" | "table_ids" => Ok(GeneratedField::TableIds),
4557                            "groupId" | "group_id" => Ok(GeneratedField::GroupId),
4558                            "newSstStartId" | "new_sst_start_id" => Ok(GeneratedField::NewSstStartId),
4559                            "version" => Ok(GeneratedField::Version),
4560                            "splitKey" | "split_key" => Ok(GeneratedField::SplitKey),
4561                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4562                        }
4563                    }
4564                }
4565                deserializer.deserialize_identifier(GeneratedVisitor)
4566            }
4567        }
4568        struct GeneratedVisitor;
4569        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4570            type Value = GroupConstruct;
4571
4572            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4573                formatter.write_str("struct hummock.GroupConstruct")
4574            }
4575
4576            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GroupConstruct, V::Error>
4577                where
4578                    V: serde::de::MapAccess<'de>,
4579            {
4580                let mut group_config__ = None;
4581                let mut parent_group_id__ = None;
4582                let mut table_ids__ = None;
4583                let mut group_id__ = None;
4584                let mut new_sst_start_id__ = None;
4585                let mut version__ = None;
4586                let mut split_key__ = None;
4587                while let Some(k) = map_.next_key()? {
4588                    match k {
4589                        GeneratedField::GroupConfig => {
4590                            if group_config__.is_some() {
4591                                return Err(serde::de::Error::duplicate_field("groupConfig"));
4592                            }
4593                            group_config__ = map_.next_value()?;
4594                        }
4595                        GeneratedField::ParentGroupId => {
4596                            if parent_group_id__.is_some() {
4597                                return Err(serde::de::Error::duplicate_field("parentGroupId"));
4598                            }
4599                            parent_group_id__ = 
4600                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4601                            ;
4602                        }
4603                        GeneratedField::TableIds => {
4604                            if table_ids__.is_some() {
4605                                return Err(serde::de::Error::duplicate_field("tableIds"));
4606                            }
4607                            table_ids__ = 
4608                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
4609                                    .into_iter().map(|x| x.0).collect())
4610                            ;
4611                        }
4612                        GeneratedField::GroupId => {
4613                            if group_id__.is_some() {
4614                                return Err(serde::de::Error::duplicate_field("groupId"));
4615                            }
4616                            group_id__ = 
4617                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4618                            ;
4619                        }
4620                        GeneratedField::NewSstStartId => {
4621                            if new_sst_start_id__.is_some() {
4622                                return Err(serde::de::Error::duplicate_field("newSstStartId"));
4623                            }
4624                            new_sst_start_id__ = 
4625                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4626                            ;
4627                        }
4628                        GeneratedField::Version => {
4629                            if version__.is_some() {
4630                                return Err(serde::de::Error::duplicate_field("version"));
4631                            }
4632                            version__ = Some(map_.next_value::<CompatibilityVersion>()? as i32);
4633                        }
4634                        GeneratedField::SplitKey => {
4635                            if split_key__.is_some() {
4636                                return Err(serde::de::Error::duplicate_field("splitKey"));
4637                            }
4638                            split_key__ = 
4639                                map_.next_value::<::std::option::Option<::pbjson::private::BytesDeserialize<_>>>()?.map(|x| x.0)
4640                            ;
4641                        }
4642                    }
4643                }
4644                Ok(GroupConstruct {
4645                    group_config: group_config__,
4646                    parent_group_id: parent_group_id__.unwrap_or_default(),
4647                    table_ids: table_ids__.unwrap_or_default(),
4648                    group_id: group_id__.unwrap_or_default(),
4649                    new_sst_start_id: new_sst_start_id__.unwrap_or_default(),
4650                    version: version__.unwrap_or_default(),
4651                    split_key: split_key__,
4652                })
4653            }
4654        }
4655        deserializer.deserialize_struct("hummock.GroupConstruct", FIELDS, GeneratedVisitor)
4656    }
4657}
4658impl serde::Serialize for GroupDelta {
4659    #[allow(deprecated)]
4660    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4661    where
4662        S: serde::Serializer,
4663    {
4664        use serde::ser::SerializeStruct;
4665        let mut len = 0;
4666        if self.delta_type.is_some() {
4667            len += 1;
4668        }
4669        let mut struct_ser = serializer.serialize_struct("hummock.GroupDelta", len)?;
4670        if let Some(v) = self.delta_type.as_ref() {
4671            match v {
4672                group_delta::DeltaType::IntraLevel(v) => {
4673                    struct_ser.serialize_field("intraLevel", v)?;
4674                }
4675                group_delta::DeltaType::GroupConstruct(v) => {
4676                    struct_ser.serialize_field("groupConstruct", v)?;
4677                }
4678                group_delta::DeltaType::GroupDestroy(v) => {
4679                    struct_ser.serialize_field("groupDestroy", v)?;
4680                }
4681                group_delta::DeltaType::GroupMerge(v) => {
4682                    struct_ser.serialize_field("groupMerge", v)?;
4683                }
4684                group_delta::DeltaType::NewL0SubLevel(v) => {
4685                    struct_ser.serialize_field("newL0SubLevel", v)?;
4686                }
4687            }
4688        }
4689        struct_ser.end()
4690    }
4691}
4692impl<'de> serde::Deserialize<'de> for GroupDelta {
4693    #[allow(deprecated)]
4694    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4695    where
4696        D: serde::Deserializer<'de>,
4697    {
4698        const FIELDS: &[&str] = &[
4699            "intra_level",
4700            "intraLevel",
4701            "group_construct",
4702            "groupConstruct",
4703            "group_destroy",
4704            "groupDestroy",
4705            "group_merge",
4706            "groupMerge",
4707            "new_l0_sub_level",
4708            "newL0SubLevel",
4709        ];
4710
4711        #[allow(clippy::enum_variant_names)]
4712        enum GeneratedField {
4713            IntraLevel,
4714            GroupConstruct,
4715            GroupDestroy,
4716            GroupMerge,
4717            NewL0SubLevel,
4718        }
4719        impl<'de> serde::Deserialize<'de> for GeneratedField {
4720            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4721            where
4722                D: serde::Deserializer<'de>,
4723            {
4724                struct GeneratedVisitor;
4725
4726                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4727                    type Value = GeneratedField;
4728
4729                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4730                        write!(formatter, "expected one of: {:?}", &FIELDS)
4731                    }
4732
4733                    #[allow(unused_variables)]
4734                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4735                    where
4736                        E: serde::de::Error,
4737                    {
4738                        match value {
4739                            "intraLevel" | "intra_level" => Ok(GeneratedField::IntraLevel),
4740                            "groupConstruct" | "group_construct" => Ok(GeneratedField::GroupConstruct),
4741                            "groupDestroy" | "group_destroy" => Ok(GeneratedField::GroupDestroy),
4742                            "groupMerge" | "group_merge" => Ok(GeneratedField::GroupMerge),
4743                            "newL0SubLevel" | "new_l0_sub_level" => Ok(GeneratedField::NewL0SubLevel),
4744                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4745                        }
4746                    }
4747                }
4748                deserializer.deserialize_identifier(GeneratedVisitor)
4749            }
4750        }
4751        struct GeneratedVisitor;
4752        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4753            type Value = GroupDelta;
4754
4755            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4756                formatter.write_str("struct hummock.GroupDelta")
4757            }
4758
4759            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GroupDelta, V::Error>
4760                where
4761                    V: serde::de::MapAccess<'de>,
4762            {
4763                let mut delta_type__ = None;
4764                while let Some(k) = map_.next_key()? {
4765                    match k {
4766                        GeneratedField::IntraLevel => {
4767                            if delta_type__.is_some() {
4768                                return Err(serde::de::Error::duplicate_field("intraLevel"));
4769                            }
4770                            delta_type__ = map_.next_value::<::std::option::Option<_>>()?.map(group_delta::DeltaType::IntraLevel)
4771;
4772                        }
4773                        GeneratedField::GroupConstruct => {
4774                            if delta_type__.is_some() {
4775                                return Err(serde::de::Error::duplicate_field("groupConstruct"));
4776                            }
4777                            delta_type__ = map_.next_value::<::std::option::Option<_>>()?.map(group_delta::DeltaType::GroupConstruct)
4778;
4779                        }
4780                        GeneratedField::GroupDestroy => {
4781                            if delta_type__.is_some() {
4782                                return Err(serde::de::Error::duplicate_field("groupDestroy"));
4783                            }
4784                            delta_type__ = map_.next_value::<::std::option::Option<_>>()?.map(group_delta::DeltaType::GroupDestroy)
4785;
4786                        }
4787                        GeneratedField::GroupMerge => {
4788                            if delta_type__.is_some() {
4789                                return Err(serde::de::Error::duplicate_field("groupMerge"));
4790                            }
4791                            delta_type__ = map_.next_value::<::std::option::Option<_>>()?.map(group_delta::DeltaType::GroupMerge)
4792;
4793                        }
4794                        GeneratedField::NewL0SubLevel => {
4795                            if delta_type__.is_some() {
4796                                return Err(serde::de::Error::duplicate_field("newL0SubLevel"));
4797                            }
4798                            delta_type__ = map_.next_value::<::std::option::Option<_>>()?.map(group_delta::DeltaType::NewL0SubLevel)
4799;
4800                        }
4801                    }
4802                }
4803                Ok(GroupDelta {
4804                    delta_type: delta_type__,
4805                })
4806            }
4807        }
4808        deserializer.deserialize_struct("hummock.GroupDelta", FIELDS, GeneratedVisitor)
4809    }
4810}
4811impl serde::Serialize for GroupDestroy {
4812    #[allow(deprecated)]
4813    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4814    where
4815        S: serde::Serializer,
4816    {
4817        use serde::ser::SerializeStruct;
4818        let len = 0;
4819        let struct_ser = serializer.serialize_struct("hummock.GroupDestroy", len)?;
4820        struct_ser.end()
4821    }
4822}
4823impl<'de> serde::Deserialize<'de> for GroupDestroy {
4824    #[allow(deprecated)]
4825    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4826    where
4827        D: serde::Deserializer<'de>,
4828    {
4829        const FIELDS: &[&str] = &[
4830        ];
4831
4832        #[allow(clippy::enum_variant_names)]
4833        enum GeneratedField {
4834        }
4835        impl<'de> serde::Deserialize<'de> for GeneratedField {
4836            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4837            where
4838                D: serde::Deserializer<'de>,
4839            {
4840                struct GeneratedVisitor;
4841
4842                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4843                    type Value = GeneratedField;
4844
4845                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4846                        write!(formatter, "expected one of: {:?}", &FIELDS)
4847                    }
4848
4849                    #[allow(unused_variables)]
4850                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4851                    where
4852                        E: serde::de::Error,
4853                    {
4854                            Err(serde::de::Error::unknown_field(value, FIELDS))
4855                    }
4856                }
4857                deserializer.deserialize_identifier(GeneratedVisitor)
4858            }
4859        }
4860        struct GeneratedVisitor;
4861        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4862            type Value = GroupDestroy;
4863
4864            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4865                formatter.write_str("struct hummock.GroupDestroy")
4866            }
4867
4868            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GroupDestroy, V::Error>
4869                where
4870                    V: serde::de::MapAccess<'de>,
4871            {
4872                while map_.next_key::<GeneratedField>()?.is_some() {
4873                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
4874                }
4875                Ok(GroupDestroy {
4876                })
4877            }
4878        }
4879        deserializer.deserialize_struct("hummock.GroupDestroy", FIELDS, GeneratedVisitor)
4880    }
4881}
4882impl serde::Serialize for GroupMerge {
4883    #[allow(deprecated)]
4884    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4885    where
4886        S: serde::Serializer,
4887    {
4888        use serde::ser::SerializeStruct;
4889        let mut len = 0;
4890        if self.left_group_id != 0 {
4891            len += 1;
4892        }
4893        if self.right_group_id != 0 {
4894            len += 1;
4895        }
4896        let mut struct_ser = serializer.serialize_struct("hummock.GroupMerge", len)?;
4897        if self.left_group_id != 0 {
4898            #[allow(clippy::needless_borrow)]
4899            #[allow(clippy::needless_borrows_for_generic_args)]
4900            struct_ser.serialize_field("leftGroupId", ToString::to_string(&self.left_group_id).as_str())?;
4901        }
4902        if self.right_group_id != 0 {
4903            #[allow(clippy::needless_borrow)]
4904            #[allow(clippy::needless_borrows_for_generic_args)]
4905            struct_ser.serialize_field("rightGroupId", ToString::to_string(&self.right_group_id).as_str())?;
4906        }
4907        struct_ser.end()
4908    }
4909}
4910impl<'de> serde::Deserialize<'de> for GroupMerge {
4911    #[allow(deprecated)]
4912    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4913    where
4914        D: serde::Deserializer<'de>,
4915    {
4916        const FIELDS: &[&str] = &[
4917            "left_group_id",
4918            "leftGroupId",
4919            "right_group_id",
4920            "rightGroupId",
4921        ];
4922
4923        #[allow(clippy::enum_variant_names)]
4924        enum GeneratedField {
4925            LeftGroupId,
4926            RightGroupId,
4927        }
4928        impl<'de> serde::Deserialize<'de> for GeneratedField {
4929            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4930            where
4931                D: serde::Deserializer<'de>,
4932            {
4933                struct GeneratedVisitor;
4934
4935                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4936                    type Value = GeneratedField;
4937
4938                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4939                        write!(formatter, "expected one of: {:?}", &FIELDS)
4940                    }
4941
4942                    #[allow(unused_variables)]
4943                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4944                    where
4945                        E: serde::de::Error,
4946                    {
4947                        match value {
4948                            "leftGroupId" | "left_group_id" => Ok(GeneratedField::LeftGroupId),
4949                            "rightGroupId" | "right_group_id" => Ok(GeneratedField::RightGroupId),
4950                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4951                        }
4952                    }
4953                }
4954                deserializer.deserialize_identifier(GeneratedVisitor)
4955            }
4956        }
4957        struct GeneratedVisitor;
4958        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4959            type Value = GroupMerge;
4960
4961            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4962                formatter.write_str("struct hummock.GroupMerge")
4963            }
4964
4965            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GroupMerge, V::Error>
4966                where
4967                    V: serde::de::MapAccess<'de>,
4968            {
4969                let mut left_group_id__ = None;
4970                let mut right_group_id__ = None;
4971                while let Some(k) = map_.next_key()? {
4972                    match k {
4973                        GeneratedField::LeftGroupId => {
4974                            if left_group_id__.is_some() {
4975                                return Err(serde::de::Error::duplicate_field("leftGroupId"));
4976                            }
4977                            left_group_id__ = 
4978                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4979                            ;
4980                        }
4981                        GeneratedField::RightGroupId => {
4982                            if right_group_id__.is_some() {
4983                                return Err(serde::de::Error::duplicate_field("rightGroupId"));
4984                            }
4985                            right_group_id__ = 
4986                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4987                            ;
4988                        }
4989                    }
4990                }
4991                Ok(GroupMerge {
4992                    left_group_id: left_group_id__.unwrap_or_default(),
4993                    right_group_id: right_group_id__.unwrap_or_default(),
4994                })
4995            }
4996        }
4997        deserializer.deserialize_struct("hummock.GroupMerge", FIELDS, GeneratedVisitor)
4998    }
4999}
5000impl serde::Serialize for HummockPinnedSnapshot {
5001    #[allow(deprecated)]
5002    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5003    where
5004        S: serde::Serializer,
5005    {
5006        use serde::ser::SerializeStruct;
5007        let mut len = 0;
5008        if self.context_id != 0 {
5009            len += 1;
5010        }
5011        if self.minimal_pinned_snapshot != 0 {
5012            len += 1;
5013        }
5014        let mut struct_ser = serializer.serialize_struct("hummock.HummockPinnedSnapshot", len)?;
5015        if self.context_id != 0 {
5016            struct_ser.serialize_field("contextId", &self.context_id)?;
5017        }
5018        if self.minimal_pinned_snapshot != 0 {
5019            #[allow(clippy::needless_borrow)]
5020            #[allow(clippy::needless_borrows_for_generic_args)]
5021            struct_ser.serialize_field("minimalPinnedSnapshot", ToString::to_string(&self.minimal_pinned_snapshot).as_str())?;
5022        }
5023        struct_ser.end()
5024    }
5025}
5026impl<'de> serde::Deserialize<'de> for HummockPinnedSnapshot {
5027    #[allow(deprecated)]
5028    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5029    where
5030        D: serde::Deserializer<'de>,
5031    {
5032        const FIELDS: &[&str] = &[
5033            "context_id",
5034            "contextId",
5035            "minimal_pinned_snapshot",
5036            "minimalPinnedSnapshot",
5037        ];
5038
5039        #[allow(clippy::enum_variant_names)]
5040        enum GeneratedField {
5041            ContextId,
5042            MinimalPinnedSnapshot,
5043        }
5044        impl<'de> serde::Deserialize<'de> for GeneratedField {
5045            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5046            where
5047                D: serde::Deserializer<'de>,
5048            {
5049                struct GeneratedVisitor;
5050
5051                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5052                    type Value = GeneratedField;
5053
5054                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5055                        write!(formatter, "expected one of: {:?}", &FIELDS)
5056                    }
5057
5058                    #[allow(unused_variables)]
5059                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5060                    where
5061                        E: serde::de::Error,
5062                    {
5063                        match value {
5064                            "contextId" | "context_id" => Ok(GeneratedField::ContextId),
5065                            "minimalPinnedSnapshot" | "minimal_pinned_snapshot" => Ok(GeneratedField::MinimalPinnedSnapshot),
5066                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5067                        }
5068                    }
5069                }
5070                deserializer.deserialize_identifier(GeneratedVisitor)
5071            }
5072        }
5073        struct GeneratedVisitor;
5074        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5075            type Value = HummockPinnedSnapshot;
5076
5077            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5078                formatter.write_str("struct hummock.HummockPinnedSnapshot")
5079            }
5080
5081            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HummockPinnedSnapshot, V::Error>
5082                where
5083                    V: serde::de::MapAccess<'de>,
5084            {
5085                let mut context_id__ = None;
5086                let mut minimal_pinned_snapshot__ = None;
5087                while let Some(k) = map_.next_key()? {
5088                    match k {
5089                        GeneratedField::ContextId => {
5090                            if context_id__.is_some() {
5091                                return Err(serde::de::Error::duplicate_field("contextId"));
5092                            }
5093                            context_id__ = 
5094                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5095                            ;
5096                        }
5097                        GeneratedField::MinimalPinnedSnapshot => {
5098                            if minimal_pinned_snapshot__.is_some() {
5099                                return Err(serde::de::Error::duplicate_field("minimalPinnedSnapshot"));
5100                            }
5101                            minimal_pinned_snapshot__ = 
5102                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5103                            ;
5104                        }
5105                    }
5106                }
5107                Ok(HummockPinnedSnapshot {
5108                    context_id: context_id__.unwrap_or_default(),
5109                    minimal_pinned_snapshot: minimal_pinned_snapshot__.unwrap_or_default(),
5110                })
5111            }
5112        }
5113        deserializer.deserialize_struct("hummock.HummockPinnedSnapshot", FIELDS, GeneratedVisitor)
5114    }
5115}
5116impl serde::Serialize for HummockPinnedVersion {
5117    #[allow(deprecated)]
5118    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5119    where
5120        S: serde::Serializer,
5121    {
5122        use serde::ser::SerializeStruct;
5123        let mut len = 0;
5124        if self.context_id != 0 {
5125            len += 1;
5126        }
5127        if self.min_pinned_id != 0 {
5128            len += 1;
5129        }
5130        let mut struct_ser = serializer.serialize_struct("hummock.HummockPinnedVersion", len)?;
5131        if self.context_id != 0 {
5132            struct_ser.serialize_field("contextId", &self.context_id)?;
5133        }
5134        if self.min_pinned_id != 0 {
5135            #[allow(clippy::needless_borrow)]
5136            #[allow(clippy::needless_borrows_for_generic_args)]
5137            struct_ser.serialize_field("minPinnedId", ToString::to_string(&self.min_pinned_id).as_str())?;
5138        }
5139        struct_ser.end()
5140    }
5141}
5142impl<'de> serde::Deserialize<'de> for HummockPinnedVersion {
5143    #[allow(deprecated)]
5144    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5145    where
5146        D: serde::Deserializer<'de>,
5147    {
5148        const FIELDS: &[&str] = &[
5149            "context_id",
5150            "contextId",
5151            "min_pinned_id",
5152            "minPinnedId",
5153        ];
5154
5155        #[allow(clippy::enum_variant_names)]
5156        enum GeneratedField {
5157            ContextId,
5158            MinPinnedId,
5159        }
5160        impl<'de> serde::Deserialize<'de> for GeneratedField {
5161            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5162            where
5163                D: serde::Deserializer<'de>,
5164            {
5165                struct GeneratedVisitor;
5166
5167                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5168                    type Value = GeneratedField;
5169
5170                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5171                        write!(formatter, "expected one of: {:?}", &FIELDS)
5172                    }
5173
5174                    #[allow(unused_variables)]
5175                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5176                    where
5177                        E: serde::de::Error,
5178                    {
5179                        match value {
5180                            "contextId" | "context_id" => Ok(GeneratedField::ContextId),
5181                            "minPinnedId" | "min_pinned_id" => Ok(GeneratedField::MinPinnedId),
5182                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5183                        }
5184                    }
5185                }
5186                deserializer.deserialize_identifier(GeneratedVisitor)
5187            }
5188        }
5189        struct GeneratedVisitor;
5190        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5191            type Value = HummockPinnedVersion;
5192
5193            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5194                formatter.write_str("struct hummock.HummockPinnedVersion")
5195            }
5196
5197            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HummockPinnedVersion, V::Error>
5198                where
5199                    V: serde::de::MapAccess<'de>,
5200            {
5201                let mut context_id__ = None;
5202                let mut min_pinned_id__ = None;
5203                while let Some(k) = map_.next_key()? {
5204                    match k {
5205                        GeneratedField::ContextId => {
5206                            if context_id__.is_some() {
5207                                return Err(serde::de::Error::duplicate_field("contextId"));
5208                            }
5209                            context_id__ = 
5210                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5211                            ;
5212                        }
5213                        GeneratedField::MinPinnedId => {
5214                            if min_pinned_id__.is_some() {
5215                                return Err(serde::de::Error::duplicate_field("minPinnedId"));
5216                            }
5217                            min_pinned_id__ = 
5218                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5219                            ;
5220                        }
5221                    }
5222                }
5223                Ok(HummockPinnedVersion {
5224                    context_id: context_id__.unwrap_or_default(),
5225                    min_pinned_id: min_pinned_id__.unwrap_or_default(),
5226                })
5227            }
5228        }
5229        deserializer.deserialize_struct("hummock.HummockPinnedVersion", FIELDS, GeneratedVisitor)
5230    }
5231}
5232impl serde::Serialize for HummockVersion {
5233    #[allow(deprecated)]
5234    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5235    where
5236        S: serde::Serializer,
5237    {
5238        use serde::ser::SerializeStruct;
5239        let mut len = 0;
5240        if self.id != 0 {
5241            len += 1;
5242        }
5243        if !self.levels.is_empty() {
5244            len += 1;
5245        }
5246        if self.max_committed_epoch != 0 {
5247            len += 1;
5248        }
5249        if !self.table_watermarks.is_empty() {
5250            len += 1;
5251        }
5252        if !self.table_change_logs.is_empty() {
5253            len += 1;
5254        }
5255        if !self.state_table_info.is_empty() {
5256            len += 1;
5257        }
5258        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersion", len)?;
5259        if self.id != 0 {
5260            #[allow(clippy::needless_borrow)]
5261            #[allow(clippy::needless_borrows_for_generic_args)]
5262            struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?;
5263        }
5264        if !self.levels.is_empty() {
5265            struct_ser.serialize_field("levels", &self.levels)?;
5266        }
5267        if self.max_committed_epoch != 0 {
5268            #[allow(clippy::needless_borrow)]
5269            #[allow(clippy::needless_borrows_for_generic_args)]
5270            struct_ser.serialize_field("maxCommittedEpoch", ToString::to_string(&self.max_committed_epoch).as_str())?;
5271        }
5272        if !self.table_watermarks.is_empty() {
5273            struct_ser.serialize_field("tableWatermarks", &self.table_watermarks)?;
5274        }
5275        if !self.table_change_logs.is_empty() {
5276            struct_ser.serialize_field("tableChangeLogs", &self.table_change_logs)?;
5277        }
5278        if !self.state_table_info.is_empty() {
5279            struct_ser.serialize_field("stateTableInfo", &self.state_table_info)?;
5280        }
5281        struct_ser.end()
5282    }
5283}
5284impl<'de> serde::Deserialize<'de> for HummockVersion {
5285    #[allow(deprecated)]
5286    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5287    where
5288        D: serde::Deserializer<'de>,
5289    {
5290        const FIELDS: &[&str] = &[
5291            "id",
5292            "levels",
5293            "max_committed_epoch",
5294            "maxCommittedEpoch",
5295            "table_watermarks",
5296            "tableWatermarks",
5297            "table_change_logs",
5298            "tableChangeLogs",
5299            "state_table_info",
5300            "stateTableInfo",
5301        ];
5302
5303        #[allow(clippy::enum_variant_names)]
5304        enum GeneratedField {
5305            Id,
5306            Levels,
5307            MaxCommittedEpoch,
5308            TableWatermarks,
5309            TableChangeLogs,
5310            StateTableInfo,
5311        }
5312        impl<'de> serde::Deserialize<'de> for GeneratedField {
5313            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5314            where
5315                D: serde::Deserializer<'de>,
5316            {
5317                struct GeneratedVisitor;
5318
5319                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5320                    type Value = GeneratedField;
5321
5322                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5323                        write!(formatter, "expected one of: {:?}", &FIELDS)
5324                    }
5325
5326                    #[allow(unused_variables)]
5327                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5328                    where
5329                        E: serde::de::Error,
5330                    {
5331                        match value {
5332                            "id" => Ok(GeneratedField::Id),
5333                            "levels" => Ok(GeneratedField::Levels),
5334                            "maxCommittedEpoch" | "max_committed_epoch" => Ok(GeneratedField::MaxCommittedEpoch),
5335                            "tableWatermarks" | "table_watermarks" => Ok(GeneratedField::TableWatermarks),
5336                            "tableChangeLogs" | "table_change_logs" => Ok(GeneratedField::TableChangeLogs),
5337                            "stateTableInfo" | "state_table_info" => Ok(GeneratedField::StateTableInfo),
5338                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5339                        }
5340                    }
5341                }
5342                deserializer.deserialize_identifier(GeneratedVisitor)
5343            }
5344        }
5345        struct GeneratedVisitor;
5346        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5347            type Value = HummockVersion;
5348
5349            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5350                formatter.write_str("struct hummock.HummockVersion")
5351            }
5352
5353            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HummockVersion, V::Error>
5354                where
5355                    V: serde::de::MapAccess<'de>,
5356            {
5357                let mut id__ = None;
5358                let mut levels__ = None;
5359                let mut max_committed_epoch__ = None;
5360                let mut table_watermarks__ = None;
5361                let mut table_change_logs__ = None;
5362                let mut state_table_info__ = None;
5363                while let Some(k) = map_.next_key()? {
5364                    match k {
5365                        GeneratedField::Id => {
5366                            if id__.is_some() {
5367                                return Err(serde::de::Error::duplicate_field("id"));
5368                            }
5369                            id__ = 
5370                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5371                            ;
5372                        }
5373                        GeneratedField::Levels => {
5374                            if levels__.is_some() {
5375                                return Err(serde::de::Error::duplicate_field("levels"));
5376                            }
5377                            levels__ = Some(
5378                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, _>>()?
5379                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
5380                            );
5381                        }
5382                        GeneratedField::MaxCommittedEpoch => {
5383                            if max_committed_epoch__.is_some() {
5384                                return Err(serde::de::Error::duplicate_field("maxCommittedEpoch"));
5385                            }
5386                            max_committed_epoch__ = 
5387                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5388                            ;
5389                        }
5390                        GeneratedField::TableWatermarks => {
5391                            if table_watermarks__.is_some() {
5392                                return Err(serde::de::Error::duplicate_field("tableWatermarks"));
5393                            }
5394                            table_watermarks__ = Some(
5395                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
5396                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
5397                            );
5398                        }
5399                        GeneratedField::TableChangeLogs => {
5400                            if table_change_logs__.is_some() {
5401                                return Err(serde::de::Error::duplicate_field("tableChangeLogs"));
5402                            }
5403                            table_change_logs__ = Some(
5404                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
5405                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
5406                            );
5407                        }
5408                        GeneratedField::StateTableInfo => {
5409                            if state_table_info__.is_some() {
5410                                return Err(serde::de::Error::duplicate_field("stateTableInfo"));
5411                            }
5412                            state_table_info__ = Some(
5413                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
5414                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
5415                            );
5416                        }
5417                    }
5418                }
5419                Ok(HummockVersion {
5420                    id: id__.unwrap_or_default(),
5421                    levels: levels__.unwrap_or_default(),
5422                    max_committed_epoch: max_committed_epoch__.unwrap_or_default(),
5423                    table_watermarks: table_watermarks__.unwrap_or_default(),
5424                    table_change_logs: table_change_logs__.unwrap_or_default(),
5425                    state_table_info: state_table_info__.unwrap_or_default(),
5426                })
5427            }
5428        }
5429        deserializer.deserialize_struct("hummock.HummockVersion", FIELDS, GeneratedVisitor)
5430    }
5431}
5432impl serde::Serialize for hummock_version::Levels {
5433    #[allow(deprecated)]
5434    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5435    where
5436        S: serde::Serializer,
5437    {
5438        use serde::ser::SerializeStruct;
5439        let mut len = 0;
5440        if !self.levels.is_empty() {
5441            len += 1;
5442        }
5443        if self.l0.is_some() {
5444            len += 1;
5445        }
5446        if self.group_id != 0 {
5447            len += 1;
5448        }
5449        if self.parent_group_id != 0 {
5450            len += 1;
5451        }
5452        if !self.member_table_ids.is_empty() {
5453            len += 1;
5454        }
5455        if self.compaction_group_version_id != 0 {
5456            len += 1;
5457        }
5458        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersion.Levels", len)?;
5459        if !self.levels.is_empty() {
5460            struct_ser.serialize_field("levels", &self.levels)?;
5461        }
5462        if let Some(v) = self.l0.as_ref() {
5463            struct_ser.serialize_field("l0", v)?;
5464        }
5465        if self.group_id != 0 {
5466            #[allow(clippy::needless_borrow)]
5467            #[allow(clippy::needless_borrows_for_generic_args)]
5468            struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?;
5469        }
5470        if self.parent_group_id != 0 {
5471            #[allow(clippy::needless_borrow)]
5472            #[allow(clippy::needless_borrows_for_generic_args)]
5473            struct_ser.serialize_field("parentGroupId", ToString::to_string(&self.parent_group_id).as_str())?;
5474        }
5475        if !self.member_table_ids.is_empty() {
5476            struct_ser.serialize_field("memberTableIds", &self.member_table_ids)?;
5477        }
5478        if self.compaction_group_version_id != 0 {
5479            #[allow(clippy::needless_borrow)]
5480            #[allow(clippy::needless_borrows_for_generic_args)]
5481            struct_ser.serialize_field("compactionGroupVersionId", ToString::to_string(&self.compaction_group_version_id).as_str())?;
5482        }
5483        struct_ser.end()
5484    }
5485}
5486impl<'de> serde::Deserialize<'de> for hummock_version::Levels {
5487    #[allow(deprecated)]
5488    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5489    where
5490        D: serde::Deserializer<'de>,
5491    {
5492        const FIELDS: &[&str] = &[
5493            "levels",
5494            "l0",
5495            "group_id",
5496            "groupId",
5497            "parent_group_id",
5498            "parentGroupId",
5499            "member_table_ids",
5500            "memberTableIds",
5501            "compaction_group_version_id",
5502            "compactionGroupVersionId",
5503        ];
5504
5505        #[allow(clippy::enum_variant_names)]
5506        enum GeneratedField {
5507            Levels,
5508            L0,
5509            GroupId,
5510            ParentGroupId,
5511            MemberTableIds,
5512            CompactionGroupVersionId,
5513        }
5514        impl<'de> serde::Deserialize<'de> for GeneratedField {
5515            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5516            where
5517                D: serde::Deserializer<'de>,
5518            {
5519                struct GeneratedVisitor;
5520
5521                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5522                    type Value = GeneratedField;
5523
5524                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5525                        write!(formatter, "expected one of: {:?}", &FIELDS)
5526                    }
5527
5528                    #[allow(unused_variables)]
5529                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5530                    where
5531                        E: serde::de::Error,
5532                    {
5533                        match value {
5534                            "levels" => Ok(GeneratedField::Levels),
5535                            "l0" => Ok(GeneratedField::L0),
5536                            "groupId" | "group_id" => Ok(GeneratedField::GroupId),
5537                            "parentGroupId" | "parent_group_id" => Ok(GeneratedField::ParentGroupId),
5538                            "memberTableIds" | "member_table_ids" => Ok(GeneratedField::MemberTableIds),
5539                            "compactionGroupVersionId" | "compaction_group_version_id" => Ok(GeneratedField::CompactionGroupVersionId),
5540                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5541                        }
5542                    }
5543                }
5544                deserializer.deserialize_identifier(GeneratedVisitor)
5545            }
5546        }
5547        struct GeneratedVisitor;
5548        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5549            type Value = hummock_version::Levels;
5550
5551            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5552                formatter.write_str("struct hummock.HummockVersion.Levels")
5553            }
5554
5555            fn visit_map<V>(self, mut map_: V) -> std::result::Result<hummock_version::Levels, V::Error>
5556                where
5557                    V: serde::de::MapAccess<'de>,
5558            {
5559                let mut levels__ = None;
5560                let mut l0__ = None;
5561                let mut group_id__ = None;
5562                let mut parent_group_id__ = None;
5563                let mut member_table_ids__ = None;
5564                let mut compaction_group_version_id__ = None;
5565                while let Some(k) = map_.next_key()? {
5566                    match k {
5567                        GeneratedField::Levels => {
5568                            if levels__.is_some() {
5569                                return Err(serde::de::Error::duplicate_field("levels"));
5570                            }
5571                            levels__ = Some(map_.next_value()?);
5572                        }
5573                        GeneratedField::L0 => {
5574                            if l0__.is_some() {
5575                                return Err(serde::de::Error::duplicate_field("l0"));
5576                            }
5577                            l0__ = map_.next_value()?;
5578                        }
5579                        GeneratedField::GroupId => {
5580                            if group_id__.is_some() {
5581                                return Err(serde::de::Error::duplicate_field("groupId"));
5582                            }
5583                            group_id__ = 
5584                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5585                            ;
5586                        }
5587                        GeneratedField::ParentGroupId => {
5588                            if parent_group_id__.is_some() {
5589                                return Err(serde::de::Error::duplicate_field("parentGroupId"));
5590                            }
5591                            parent_group_id__ = 
5592                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5593                            ;
5594                        }
5595                        GeneratedField::MemberTableIds => {
5596                            if member_table_ids__.is_some() {
5597                                return Err(serde::de::Error::duplicate_field("memberTableIds"));
5598                            }
5599                            member_table_ids__ = 
5600                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5601                                    .into_iter().map(|x| x.0).collect())
5602                            ;
5603                        }
5604                        GeneratedField::CompactionGroupVersionId => {
5605                            if compaction_group_version_id__.is_some() {
5606                                return Err(serde::de::Error::duplicate_field("compactionGroupVersionId"));
5607                            }
5608                            compaction_group_version_id__ = 
5609                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5610                            ;
5611                        }
5612                    }
5613                }
5614                Ok(hummock_version::Levels {
5615                    levels: levels__.unwrap_or_default(),
5616                    l0: l0__,
5617                    group_id: group_id__.unwrap_or_default(),
5618                    parent_group_id: parent_group_id__.unwrap_or_default(),
5619                    member_table_ids: member_table_ids__.unwrap_or_default(),
5620                    compaction_group_version_id: compaction_group_version_id__.unwrap_or_default(),
5621                })
5622            }
5623        }
5624        deserializer.deserialize_struct("hummock.HummockVersion.Levels", FIELDS, GeneratedVisitor)
5625    }
5626}
5627impl serde::Serialize for HummockVersionArchive {
5628    #[allow(deprecated)]
5629    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5630    where
5631        S: serde::Serializer,
5632    {
5633        use serde::ser::SerializeStruct;
5634        let mut len = 0;
5635        if self.version.is_some() {
5636            len += 1;
5637        }
5638        if !self.version_deltas.is_empty() {
5639            len += 1;
5640        }
5641        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersionArchive", len)?;
5642        if let Some(v) = self.version.as_ref() {
5643            struct_ser.serialize_field("version", v)?;
5644        }
5645        if !self.version_deltas.is_empty() {
5646            struct_ser.serialize_field("versionDeltas", &self.version_deltas)?;
5647        }
5648        struct_ser.end()
5649    }
5650}
5651impl<'de> serde::Deserialize<'de> for HummockVersionArchive {
5652    #[allow(deprecated)]
5653    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5654    where
5655        D: serde::Deserializer<'de>,
5656    {
5657        const FIELDS: &[&str] = &[
5658            "version",
5659            "version_deltas",
5660            "versionDeltas",
5661        ];
5662
5663        #[allow(clippy::enum_variant_names)]
5664        enum GeneratedField {
5665            Version,
5666            VersionDeltas,
5667        }
5668        impl<'de> serde::Deserialize<'de> for GeneratedField {
5669            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5670            where
5671                D: serde::Deserializer<'de>,
5672            {
5673                struct GeneratedVisitor;
5674
5675                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5676                    type Value = GeneratedField;
5677
5678                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5679                        write!(formatter, "expected one of: {:?}", &FIELDS)
5680                    }
5681
5682                    #[allow(unused_variables)]
5683                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5684                    where
5685                        E: serde::de::Error,
5686                    {
5687                        match value {
5688                            "version" => Ok(GeneratedField::Version),
5689                            "versionDeltas" | "version_deltas" => Ok(GeneratedField::VersionDeltas),
5690                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5691                        }
5692                    }
5693                }
5694                deserializer.deserialize_identifier(GeneratedVisitor)
5695            }
5696        }
5697        struct GeneratedVisitor;
5698        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5699            type Value = HummockVersionArchive;
5700
5701            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5702                formatter.write_str("struct hummock.HummockVersionArchive")
5703            }
5704
5705            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HummockVersionArchive, V::Error>
5706                where
5707                    V: serde::de::MapAccess<'de>,
5708            {
5709                let mut version__ = None;
5710                let mut version_deltas__ = None;
5711                while let Some(k) = map_.next_key()? {
5712                    match k {
5713                        GeneratedField::Version => {
5714                            if version__.is_some() {
5715                                return Err(serde::de::Error::duplicate_field("version"));
5716                            }
5717                            version__ = map_.next_value()?;
5718                        }
5719                        GeneratedField::VersionDeltas => {
5720                            if version_deltas__.is_some() {
5721                                return Err(serde::de::Error::duplicate_field("versionDeltas"));
5722                            }
5723                            version_deltas__ = Some(map_.next_value()?);
5724                        }
5725                    }
5726                }
5727                Ok(HummockVersionArchive {
5728                    version: version__,
5729                    version_deltas: version_deltas__.unwrap_or_default(),
5730                })
5731            }
5732        }
5733        deserializer.deserialize_struct("hummock.HummockVersionArchive", FIELDS, GeneratedVisitor)
5734    }
5735}
5736impl serde::Serialize for HummockVersionCheckpoint {
5737    #[allow(deprecated)]
5738    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5739    where
5740        S: serde::Serializer,
5741    {
5742        use serde::ser::SerializeStruct;
5743        let mut len = 0;
5744        if self.version.is_some() {
5745            len += 1;
5746        }
5747        if !self.stale_objects.is_empty() {
5748            len += 1;
5749        }
5750        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersionCheckpoint", len)?;
5751        if let Some(v) = self.version.as_ref() {
5752            struct_ser.serialize_field("version", v)?;
5753        }
5754        if !self.stale_objects.is_empty() {
5755            struct_ser.serialize_field("staleObjects", &self.stale_objects)?;
5756        }
5757        struct_ser.end()
5758    }
5759}
5760impl<'de> serde::Deserialize<'de> for HummockVersionCheckpoint {
5761    #[allow(deprecated)]
5762    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5763    where
5764        D: serde::Deserializer<'de>,
5765    {
5766        const FIELDS: &[&str] = &[
5767            "version",
5768            "stale_objects",
5769            "staleObjects",
5770        ];
5771
5772        #[allow(clippy::enum_variant_names)]
5773        enum GeneratedField {
5774            Version,
5775            StaleObjects,
5776        }
5777        impl<'de> serde::Deserialize<'de> for GeneratedField {
5778            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5779            where
5780                D: serde::Deserializer<'de>,
5781            {
5782                struct GeneratedVisitor;
5783
5784                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5785                    type Value = GeneratedField;
5786
5787                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5788                        write!(formatter, "expected one of: {:?}", &FIELDS)
5789                    }
5790
5791                    #[allow(unused_variables)]
5792                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5793                    where
5794                        E: serde::de::Error,
5795                    {
5796                        match value {
5797                            "version" => Ok(GeneratedField::Version),
5798                            "staleObjects" | "stale_objects" => Ok(GeneratedField::StaleObjects),
5799                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5800                        }
5801                    }
5802                }
5803                deserializer.deserialize_identifier(GeneratedVisitor)
5804            }
5805        }
5806        struct GeneratedVisitor;
5807        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5808            type Value = HummockVersionCheckpoint;
5809
5810            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5811                formatter.write_str("struct hummock.HummockVersionCheckpoint")
5812            }
5813
5814            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HummockVersionCheckpoint, V::Error>
5815                where
5816                    V: serde::de::MapAccess<'de>,
5817            {
5818                let mut version__ = None;
5819                let mut stale_objects__ = None;
5820                while let Some(k) = map_.next_key()? {
5821                    match k {
5822                        GeneratedField::Version => {
5823                            if version__.is_some() {
5824                                return Err(serde::de::Error::duplicate_field("version"));
5825                            }
5826                            version__ = map_.next_value()?;
5827                        }
5828                        GeneratedField::StaleObjects => {
5829                            if stale_objects__.is_some() {
5830                                return Err(serde::de::Error::duplicate_field("staleObjects"));
5831                            }
5832                            stale_objects__ = Some(
5833                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, _>>()?
5834                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
5835                            );
5836                        }
5837                    }
5838                }
5839                Ok(HummockVersionCheckpoint {
5840                    version: version__,
5841                    stale_objects: stale_objects__.unwrap_or_default(),
5842                })
5843            }
5844        }
5845        deserializer.deserialize_struct("hummock.HummockVersionCheckpoint", FIELDS, GeneratedVisitor)
5846    }
5847}
5848impl serde::Serialize for hummock_version_checkpoint::StaleObjects {
5849    #[allow(deprecated)]
5850    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5851    where
5852        S: serde::Serializer,
5853    {
5854        use serde::ser::SerializeStruct;
5855        let mut len = 0;
5856        if !self.id.is_empty() {
5857            len += 1;
5858        }
5859        if self.total_file_size != 0 {
5860            len += 1;
5861        }
5862        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersionCheckpoint.StaleObjects", len)?;
5863        if !self.id.is_empty() {
5864            struct_ser.serialize_field("id", &self.id.iter().map(ToString::to_string).collect::<Vec<_>>())?;
5865        }
5866        if self.total_file_size != 0 {
5867            #[allow(clippy::needless_borrow)]
5868            #[allow(clippy::needless_borrows_for_generic_args)]
5869            struct_ser.serialize_field("totalFileSize", ToString::to_string(&self.total_file_size).as_str())?;
5870        }
5871        struct_ser.end()
5872    }
5873}
5874impl<'de> serde::Deserialize<'de> for hummock_version_checkpoint::StaleObjects {
5875    #[allow(deprecated)]
5876    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5877    where
5878        D: serde::Deserializer<'de>,
5879    {
5880        const FIELDS: &[&str] = &[
5881            "id",
5882            "total_file_size",
5883            "totalFileSize",
5884        ];
5885
5886        #[allow(clippy::enum_variant_names)]
5887        enum GeneratedField {
5888            Id,
5889            TotalFileSize,
5890        }
5891        impl<'de> serde::Deserialize<'de> for GeneratedField {
5892            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5893            where
5894                D: serde::Deserializer<'de>,
5895            {
5896                struct GeneratedVisitor;
5897
5898                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5899                    type Value = GeneratedField;
5900
5901                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5902                        write!(formatter, "expected one of: {:?}", &FIELDS)
5903                    }
5904
5905                    #[allow(unused_variables)]
5906                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5907                    where
5908                        E: serde::de::Error,
5909                    {
5910                        match value {
5911                            "id" => Ok(GeneratedField::Id),
5912                            "totalFileSize" | "total_file_size" => Ok(GeneratedField::TotalFileSize),
5913                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5914                        }
5915                    }
5916                }
5917                deserializer.deserialize_identifier(GeneratedVisitor)
5918            }
5919        }
5920        struct GeneratedVisitor;
5921        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5922            type Value = hummock_version_checkpoint::StaleObjects;
5923
5924            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5925                formatter.write_str("struct hummock.HummockVersionCheckpoint.StaleObjects")
5926            }
5927
5928            fn visit_map<V>(self, mut map_: V) -> std::result::Result<hummock_version_checkpoint::StaleObjects, V::Error>
5929                where
5930                    V: serde::de::MapAccess<'de>,
5931            {
5932                let mut id__ = None;
5933                let mut total_file_size__ = None;
5934                while let Some(k) = map_.next_key()? {
5935                    match k {
5936                        GeneratedField::Id => {
5937                            if id__.is_some() {
5938                                return Err(serde::de::Error::duplicate_field("id"));
5939                            }
5940                            id__ = 
5941                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5942                                    .into_iter().map(|x| x.0).collect())
5943                            ;
5944                        }
5945                        GeneratedField::TotalFileSize => {
5946                            if total_file_size__.is_some() {
5947                                return Err(serde::de::Error::duplicate_field("totalFileSize"));
5948                            }
5949                            total_file_size__ = 
5950                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5951                            ;
5952                        }
5953                    }
5954                }
5955                Ok(hummock_version_checkpoint::StaleObjects {
5956                    id: id__.unwrap_or_default(),
5957                    total_file_size: total_file_size__.unwrap_or_default(),
5958                })
5959            }
5960        }
5961        deserializer.deserialize_struct("hummock.HummockVersionCheckpoint.StaleObjects", FIELDS, GeneratedVisitor)
5962    }
5963}
5964impl serde::Serialize for HummockVersionDelta {
5965    #[allow(deprecated)]
5966    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5967    where
5968        S: serde::Serializer,
5969    {
5970        use serde::ser::SerializeStruct;
5971        let mut len = 0;
5972        if self.id != 0 {
5973            len += 1;
5974        }
5975        if self.prev_id != 0 {
5976            len += 1;
5977        }
5978        if !self.group_deltas.is_empty() {
5979            len += 1;
5980        }
5981        if self.max_committed_epoch != 0 {
5982            len += 1;
5983        }
5984        if self.trivial_move {
5985            len += 1;
5986        }
5987        if !self.new_table_watermarks.is_empty() {
5988            len += 1;
5989        }
5990        if !self.removed_table_ids.is_empty() {
5991            len += 1;
5992        }
5993        if !self.change_log_delta.is_empty() {
5994            len += 1;
5995        }
5996        if !self.state_table_info_delta.is_empty() {
5997            len += 1;
5998        }
5999        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersionDelta", len)?;
6000        if self.id != 0 {
6001            #[allow(clippy::needless_borrow)]
6002            #[allow(clippy::needless_borrows_for_generic_args)]
6003            struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?;
6004        }
6005        if self.prev_id != 0 {
6006            #[allow(clippy::needless_borrow)]
6007            #[allow(clippy::needless_borrows_for_generic_args)]
6008            struct_ser.serialize_field("prevId", ToString::to_string(&self.prev_id).as_str())?;
6009        }
6010        if !self.group_deltas.is_empty() {
6011            struct_ser.serialize_field("groupDeltas", &self.group_deltas)?;
6012        }
6013        if self.max_committed_epoch != 0 {
6014            #[allow(clippy::needless_borrow)]
6015            #[allow(clippy::needless_borrows_for_generic_args)]
6016            struct_ser.serialize_field("maxCommittedEpoch", ToString::to_string(&self.max_committed_epoch).as_str())?;
6017        }
6018        if self.trivial_move {
6019            struct_ser.serialize_field("trivialMove", &self.trivial_move)?;
6020        }
6021        if !self.new_table_watermarks.is_empty() {
6022            struct_ser.serialize_field("newTableWatermarks", &self.new_table_watermarks)?;
6023        }
6024        if !self.removed_table_ids.is_empty() {
6025            struct_ser.serialize_field("removedTableIds", &self.removed_table_ids)?;
6026        }
6027        if !self.change_log_delta.is_empty() {
6028            struct_ser.serialize_field("changeLogDelta", &self.change_log_delta)?;
6029        }
6030        if !self.state_table_info_delta.is_empty() {
6031            struct_ser.serialize_field("stateTableInfoDelta", &self.state_table_info_delta)?;
6032        }
6033        struct_ser.end()
6034    }
6035}
6036impl<'de> serde::Deserialize<'de> for HummockVersionDelta {
6037    #[allow(deprecated)]
6038    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6039    where
6040        D: serde::Deserializer<'de>,
6041    {
6042        const FIELDS: &[&str] = &[
6043            "id",
6044            "prev_id",
6045            "prevId",
6046            "group_deltas",
6047            "groupDeltas",
6048            "max_committed_epoch",
6049            "maxCommittedEpoch",
6050            "trivial_move",
6051            "trivialMove",
6052            "new_table_watermarks",
6053            "newTableWatermarks",
6054            "removed_table_ids",
6055            "removedTableIds",
6056            "change_log_delta",
6057            "changeLogDelta",
6058            "state_table_info_delta",
6059            "stateTableInfoDelta",
6060        ];
6061
6062        #[allow(clippy::enum_variant_names)]
6063        enum GeneratedField {
6064            Id,
6065            PrevId,
6066            GroupDeltas,
6067            MaxCommittedEpoch,
6068            TrivialMove,
6069            NewTableWatermarks,
6070            RemovedTableIds,
6071            ChangeLogDelta,
6072            StateTableInfoDelta,
6073        }
6074        impl<'de> serde::Deserialize<'de> for GeneratedField {
6075            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6076            where
6077                D: serde::Deserializer<'de>,
6078            {
6079                struct GeneratedVisitor;
6080
6081                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6082                    type Value = GeneratedField;
6083
6084                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6085                        write!(formatter, "expected one of: {:?}", &FIELDS)
6086                    }
6087
6088                    #[allow(unused_variables)]
6089                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6090                    where
6091                        E: serde::de::Error,
6092                    {
6093                        match value {
6094                            "id" => Ok(GeneratedField::Id),
6095                            "prevId" | "prev_id" => Ok(GeneratedField::PrevId),
6096                            "groupDeltas" | "group_deltas" => Ok(GeneratedField::GroupDeltas),
6097                            "maxCommittedEpoch" | "max_committed_epoch" => Ok(GeneratedField::MaxCommittedEpoch),
6098                            "trivialMove" | "trivial_move" => Ok(GeneratedField::TrivialMove),
6099                            "newTableWatermarks" | "new_table_watermarks" => Ok(GeneratedField::NewTableWatermarks),
6100                            "removedTableIds" | "removed_table_ids" => Ok(GeneratedField::RemovedTableIds),
6101                            "changeLogDelta" | "change_log_delta" => Ok(GeneratedField::ChangeLogDelta),
6102                            "stateTableInfoDelta" | "state_table_info_delta" => Ok(GeneratedField::StateTableInfoDelta),
6103                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6104                        }
6105                    }
6106                }
6107                deserializer.deserialize_identifier(GeneratedVisitor)
6108            }
6109        }
6110        struct GeneratedVisitor;
6111        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6112            type Value = HummockVersionDelta;
6113
6114            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6115                formatter.write_str("struct hummock.HummockVersionDelta")
6116            }
6117
6118            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HummockVersionDelta, V::Error>
6119                where
6120                    V: serde::de::MapAccess<'de>,
6121            {
6122                let mut id__ = None;
6123                let mut prev_id__ = None;
6124                let mut group_deltas__ = None;
6125                let mut max_committed_epoch__ = None;
6126                let mut trivial_move__ = None;
6127                let mut new_table_watermarks__ = None;
6128                let mut removed_table_ids__ = None;
6129                let mut change_log_delta__ = None;
6130                let mut state_table_info_delta__ = None;
6131                while let Some(k) = map_.next_key()? {
6132                    match k {
6133                        GeneratedField::Id => {
6134                            if id__.is_some() {
6135                                return Err(serde::de::Error::duplicate_field("id"));
6136                            }
6137                            id__ = 
6138                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
6139                            ;
6140                        }
6141                        GeneratedField::PrevId => {
6142                            if prev_id__.is_some() {
6143                                return Err(serde::de::Error::duplicate_field("prevId"));
6144                            }
6145                            prev_id__ = 
6146                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
6147                            ;
6148                        }
6149                        GeneratedField::GroupDeltas => {
6150                            if group_deltas__.is_some() {
6151                                return Err(serde::de::Error::duplicate_field("groupDeltas"));
6152                            }
6153                            group_deltas__ = Some(
6154                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, _>>()?
6155                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
6156                            );
6157                        }
6158                        GeneratedField::MaxCommittedEpoch => {
6159                            if max_committed_epoch__.is_some() {
6160                                return Err(serde::de::Error::duplicate_field("maxCommittedEpoch"));
6161                            }
6162                            max_committed_epoch__ = 
6163                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
6164                            ;
6165                        }
6166                        GeneratedField::TrivialMove => {
6167                            if trivial_move__.is_some() {
6168                                return Err(serde::de::Error::duplicate_field("trivialMove"));
6169                            }
6170                            trivial_move__ = Some(map_.next_value()?);
6171                        }
6172                        GeneratedField::NewTableWatermarks => {
6173                            if new_table_watermarks__.is_some() {
6174                                return Err(serde::de::Error::duplicate_field("newTableWatermarks"));
6175                            }
6176                            new_table_watermarks__ = Some(
6177                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
6178                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
6179                            );
6180                        }
6181                        GeneratedField::RemovedTableIds => {
6182                            if removed_table_ids__.is_some() {
6183                                return Err(serde::de::Error::duplicate_field("removedTableIds"));
6184                            }
6185                            removed_table_ids__ = 
6186                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
6187                                    .into_iter().map(|x| x.0).collect())
6188                            ;
6189                        }
6190                        GeneratedField::ChangeLogDelta => {
6191                            if change_log_delta__.is_some() {
6192                                return Err(serde::de::Error::duplicate_field("changeLogDelta"));
6193                            }
6194                            change_log_delta__ = Some(
6195                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
6196                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
6197                            );
6198                        }
6199                        GeneratedField::StateTableInfoDelta => {
6200                            if state_table_info_delta__.is_some() {
6201                                return Err(serde::de::Error::duplicate_field("stateTableInfoDelta"));
6202                            }
6203                            state_table_info_delta__ = Some(
6204                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
6205                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
6206                            );
6207                        }
6208                    }
6209                }
6210                Ok(HummockVersionDelta {
6211                    id: id__.unwrap_or_default(),
6212                    prev_id: prev_id__.unwrap_or_default(),
6213                    group_deltas: group_deltas__.unwrap_or_default(),
6214                    max_committed_epoch: max_committed_epoch__.unwrap_or_default(),
6215                    trivial_move: trivial_move__.unwrap_or_default(),
6216                    new_table_watermarks: new_table_watermarks__.unwrap_or_default(),
6217                    removed_table_ids: removed_table_ids__.unwrap_or_default(),
6218                    change_log_delta: change_log_delta__.unwrap_or_default(),
6219                    state_table_info_delta: state_table_info_delta__.unwrap_or_default(),
6220                })
6221            }
6222        }
6223        deserializer.deserialize_struct("hummock.HummockVersionDelta", FIELDS, GeneratedVisitor)
6224    }
6225}
6226impl serde::Serialize for hummock_version_delta::ChangeLogDelta {
6227    #[allow(deprecated)]
6228    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6229    where
6230        S: serde::Serializer,
6231    {
6232        use serde::ser::SerializeStruct;
6233        let mut len = 0;
6234        if self.new_log.is_some() {
6235            len += 1;
6236        }
6237        if self.truncate_epoch != 0 {
6238            len += 1;
6239        }
6240        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersionDelta.ChangeLogDelta", len)?;
6241        if let Some(v) = self.new_log.as_ref() {
6242            struct_ser.serialize_field("newLog", v)?;
6243        }
6244        if self.truncate_epoch != 0 {
6245            #[allow(clippy::needless_borrow)]
6246            #[allow(clippy::needless_borrows_for_generic_args)]
6247            struct_ser.serialize_field("truncateEpoch", ToString::to_string(&self.truncate_epoch).as_str())?;
6248        }
6249        struct_ser.end()
6250    }
6251}
6252impl<'de> serde::Deserialize<'de> for hummock_version_delta::ChangeLogDelta {
6253    #[allow(deprecated)]
6254    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6255    where
6256        D: serde::Deserializer<'de>,
6257    {
6258        const FIELDS: &[&str] = &[
6259            "new_log",
6260            "newLog",
6261            "truncate_epoch",
6262            "truncateEpoch",
6263        ];
6264
6265        #[allow(clippy::enum_variant_names)]
6266        enum GeneratedField {
6267            NewLog,
6268            TruncateEpoch,
6269        }
6270        impl<'de> serde::Deserialize<'de> for GeneratedField {
6271            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6272            where
6273                D: serde::Deserializer<'de>,
6274            {
6275                struct GeneratedVisitor;
6276
6277                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6278                    type Value = GeneratedField;
6279
6280                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6281                        write!(formatter, "expected one of: {:?}", &FIELDS)
6282                    }
6283
6284                    #[allow(unused_variables)]
6285                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6286                    where
6287                        E: serde::de::Error,
6288                    {
6289                        match value {
6290                            "newLog" | "new_log" => Ok(GeneratedField::NewLog),
6291                            "truncateEpoch" | "truncate_epoch" => Ok(GeneratedField::TruncateEpoch),
6292                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6293                        }
6294                    }
6295                }
6296                deserializer.deserialize_identifier(GeneratedVisitor)
6297            }
6298        }
6299        struct GeneratedVisitor;
6300        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6301            type Value = hummock_version_delta::ChangeLogDelta;
6302
6303            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6304                formatter.write_str("struct hummock.HummockVersionDelta.ChangeLogDelta")
6305            }
6306
6307            fn visit_map<V>(self, mut map_: V) -> std::result::Result<hummock_version_delta::ChangeLogDelta, V::Error>
6308                where
6309                    V: serde::de::MapAccess<'de>,
6310            {
6311                let mut new_log__ = None;
6312                let mut truncate_epoch__ = None;
6313                while let Some(k) = map_.next_key()? {
6314                    match k {
6315                        GeneratedField::NewLog => {
6316                            if new_log__.is_some() {
6317                                return Err(serde::de::Error::duplicate_field("newLog"));
6318                            }
6319                            new_log__ = map_.next_value()?;
6320                        }
6321                        GeneratedField::TruncateEpoch => {
6322                            if truncate_epoch__.is_some() {
6323                                return Err(serde::de::Error::duplicate_field("truncateEpoch"));
6324                            }
6325                            truncate_epoch__ = 
6326                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
6327                            ;
6328                        }
6329                    }
6330                }
6331                Ok(hummock_version_delta::ChangeLogDelta {
6332                    new_log: new_log__,
6333                    truncate_epoch: truncate_epoch__.unwrap_or_default(),
6334                })
6335            }
6336        }
6337        deserializer.deserialize_struct("hummock.HummockVersionDelta.ChangeLogDelta", FIELDS, GeneratedVisitor)
6338    }
6339}
6340impl serde::Serialize for hummock_version_delta::GroupDeltas {
6341    #[allow(deprecated)]
6342    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6343    where
6344        S: serde::Serializer,
6345    {
6346        use serde::ser::SerializeStruct;
6347        let mut len = 0;
6348        if !self.group_deltas.is_empty() {
6349            len += 1;
6350        }
6351        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersionDelta.GroupDeltas", len)?;
6352        if !self.group_deltas.is_empty() {
6353            struct_ser.serialize_field("groupDeltas", &self.group_deltas)?;
6354        }
6355        struct_ser.end()
6356    }
6357}
6358impl<'de> serde::Deserialize<'de> for hummock_version_delta::GroupDeltas {
6359    #[allow(deprecated)]
6360    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6361    where
6362        D: serde::Deserializer<'de>,
6363    {
6364        const FIELDS: &[&str] = &[
6365            "group_deltas",
6366            "groupDeltas",
6367        ];
6368
6369        #[allow(clippy::enum_variant_names)]
6370        enum GeneratedField {
6371            GroupDeltas,
6372        }
6373        impl<'de> serde::Deserialize<'de> for GeneratedField {
6374            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6375            where
6376                D: serde::Deserializer<'de>,
6377            {
6378                struct GeneratedVisitor;
6379
6380                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6381                    type Value = GeneratedField;
6382
6383                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6384                        write!(formatter, "expected one of: {:?}", &FIELDS)
6385                    }
6386
6387                    #[allow(unused_variables)]
6388                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6389                    where
6390                        E: serde::de::Error,
6391                    {
6392                        match value {
6393                            "groupDeltas" | "group_deltas" => Ok(GeneratedField::GroupDeltas),
6394                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6395                        }
6396                    }
6397                }
6398                deserializer.deserialize_identifier(GeneratedVisitor)
6399            }
6400        }
6401        struct GeneratedVisitor;
6402        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6403            type Value = hummock_version_delta::GroupDeltas;
6404
6405            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6406                formatter.write_str("struct hummock.HummockVersionDelta.GroupDeltas")
6407            }
6408
6409            fn visit_map<V>(self, mut map_: V) -> std::result::Result<hummock_version_delta::GroupDeltas, V::Error>
6410                where
6411                    V: serde::de::MapAccess<'de>,
6412            {
6413                let mut group_deltas__ = None;
6414                while let Some(k) = map_.next_key()? {
6415                    match k {
6416                        GeneratedField::GroupDeltas => {
6417                            if group_deltas__.is_some() {
6418                                return Err(serde::de::Error::duplicate_field("groupDeltas"));
6419                            }
6420                            group_deltas__ = Some(map_.next_value()?);
6421                        }
6422                    }
6423                }
6424                Ok(hummock_version_delta::GroupDeltas {
6425                    group_deltas: group_deltas__.unwrap_or_default(),
6426                })
6427            }
6428        }
6429        deserializer.deserialize_struct("hummock.HummockVersionDelta.GroupDeltas", FIELDS, GeneratedVisitor)
6430    }
6431}
6432impl serde::Serialize for HummockVersionDeltas {
6433    #[allow(deprecated)]
6434    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6435    where
6436        S: serde::Serializer,
6437    {
6438        use serde::ser::SerializeStruct;
6439        let mut len = 0;
6440        if !self.version_deltas.is_empty() {
6441            len += 1;
6442        }
6443        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersionDeltas", len)?;
6444        if !self.version_deltas.is_empty() {
6445            struct_ser.serialize_field("versionDeltas", &self.version_deltas)?;
6446        }
6447        struct_ser.end()
6448    }
6449}
6450impl<'de> serde::Deserialize<'de> for HummockVersionDeltas {
6451    #[allow(deprecated)]
6452    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6453    where
6454        D: serde::Deserializer<'de>,
6455    {
6456        const FIELDS: &[&str] = &[
6457            "version_deltas",
6458            "versionDeltas",
6459        ];
6460
6461        #[allow(clippy::enum_variant_names)]
6462        enum GeneratedField {
6463            VersionDeltas,
6464        }
6465        impl<'de> serde::Deserialize<'de> for GeneratedField {
6466            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6467            where
6468                D: serde::Deserializer<'de>,
6469            {
6470                struct GeneratedVisitor;
6471
6472                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6473                    type Value = GeneratedField;
6474
6475                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6476                        write!(formatter, "expected one of: {:?}", &FIELDS)
6477                    }
6478
6479                    #[allow(unused_variables)]
6480                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6481                    where
6482                        E: serde::de::Error,
6483                    {
6484                        match value {
6485                            "versionDeltas" | "version_deltas" => Ok(GeneratedField::VersionDeltas),
6486                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6487                        }
6488                    }
6489                }
6490                deserializer.deserialize_identifier(GeneratedVisitor)
6491            }
6492        }
6493        struct GeneratedVisitor;
6494        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6495            type Value = HummockVersionDeltas;
6496
6497            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6498                formatter.write_str("struct hummock.HummockVersionDeltas")
6499            }
6500
6501            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HummockVersionDeltas, V::Error>
6502                where
6503                    V: serde::de::MapAccess<'de>,
6504            {
6505                let mut version_deltas__ = None;
6506                while let Some(k) = map_.next_key()? {
6507                    match k {
6508                        GeneratedField::VersionDeltas => {
6509                            if version_deltas__.is_some() {
6510                                return Err(serde::de::Error::duplicate_field("versionDeltas"));
6511                            }
6512                            version_deltas__ = Some(map_.next_value()?);
6513                        }
6514                    }
6515                }
6516                Ok(HummockVersionDeltas {
6517                    version_deltas: version_deltas__.unwrap_or_default(),
6518                })
6519            }
6520        }
6521        deserializer.deserialize_struct("hummock.HummockVersionDeltas", FIELDS, GeneratedVisitor)
6522    }
6523}
6524impl serde::Serialize for HummockVersionStats {
6525    #[allow(deprecated)]
6526    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6527    where
6528        S: serde::Serializer,
6529    {
6530        use serde::ser::SerializeStruct;
6531        let mut len = 0;
6532        if self.hummock_version_id != 0 {
6533            len += 1;
6534        }
6535        if !self.table_stats.is_empty() {
6536            len += 1;
6537        }
6538        let mut struct_ser = serializer.serialize_struct("hummock.HummockVersionStats", len)?;
6539        if self.hummock_version_id != 0 {
6540            #[allow(clippy::needless_borrow)]
6541            #[allow(clippy::needless_borrows_for_generic_args)]
6542            struct_ser.serialize_field("hummockVersionId", ToString::to_string(&self.hummock_version_id).as_str())?;
6543        }
6544        if !self.table_stats.is_empty() {
6545            struct_ser.serialize_field("tableStats", &self.table_stats)?;
6546        }
6547        struct_ser.end()
6548    }
6549}
6550impl<'de> serde::Deserialize<'de> for HummockVersionStats {
6551    #[allow(deprecated)]
6552    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6553    where
6554        D: serde::Deserializer<'de>,
6555    {
6556        const FIELDS: &[&str] = &[
6557            "hummock_version_id",
6558            "hummockVersionId",
6559            "table_stats",
6560            "tableStats",
6561        ];
6562
6563        #[allow(clippy::enum_variant_names)]
6564        enum GeneratedField {
6565            HummockVersionId,
6566            TableStats,
6567        }
6568        impl<'de> serde::Deserialize<'de> for GeneratedField {
6569            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6570            where
6571                D: serde::Deserializer<'de>,
6572            {
6573                struct GeneratedVisitor;
6574
6575                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6576                    type Value = GeneratedField;
6577
6578                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6579                        write!(formatter, "expected one of: {:?}", &FIELDS)
6580                    }
6581
6582                    #[allow(unused_variables)]
6583                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6584                    where
6585                        E: serde::de::Error,
6586                    {
6587                        match value {
6588                            "hummockVersionId" | "hummock_version_id" => Ok(GeneratedField::HummockVersionId),
6589                            "tableStats" | "table_stats" => Ok(GeneratedField::TableStats),
6590                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6591                        }
6592                    }
6593                }
6594                deserializer.deserialize_identifier(GeneratedVisitor)
6595            }
6596        }
6597        struct GeneratedVisitor;
6598        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6599            type Value = HummockVersionStats;
6600
6601            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6602                formatter.write_str("struct hummock.HummockVersionStats")
6603            }
6604
6605            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HummockVersionStats, V::Error>
6606                where
6607                    V: serde::de::MapAccess<'de>,
6608            {
6609                let mut hummock_version_id__ = None;
6610                let mut table_stats__ = None;
6611                while let Some(k) = map_.next_key()? {
6612                    match k {
6613                        GeneratedField::HummockVersionId => {
6614                            if hummock_version_id__.is_some() {
6615                                return Err(serde::de::Error::duplicate_field("hummockVersionId"));
6616                            }
6617                            hummock_version_id__ = 
6618                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
6619                            ;
6620                        }
6621                        GeneratedField::TableStats => {
6622                            if table_stats__.is_some() {
6623                                return Err(serde::de::Error::duplicate_field("tableStats"));
6624                            }
6625                            table_stats__ = Some(
6626                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
6627                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
6628                            );
6629                        }
6630                    }
6631                }
6632                Ok(HummockVersionStats {
6633                    hummock_version_id: hummock_version_id__.unwrap_or_default(),
6634                    table_stats: table_stats__.unwrap_or_default(),
6635                })
6636            }
6637        }
6638        deserializer.deserialize_struct("hummock.HummockVersionStats", FIELDS, GeneratedVisitor)
6639    }
6640}
6641impl serde::Serialize for InitMetadataForReplayRequest {
6642    #[allow(deprecated)]
6643    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6644    where
6645        S: serde::Serializer,
6646    {
6647        use serde::ser::SerializeStruct;
6648        let mut len = 0;
6649        if !self.tables.is_empty() {
6650            len += 1;
6651        }
6652        if !self.compaction_groups.is_empty() {
6653            len += 1;
6654        }
6655        let mut struct_ser = serializer.serialize_struct("hummock.InitMetadataForReplayRequest", len)?;
6656        if !self.tables.is_empty() {
6657            struct_ser.serialize_field("tables", &self.tables)?;
6658        }
6659        if !self.compaction_groups.is_empty() {
6660            struct_ser.serialize_field("compactionGroups", &self.compaction_groups)?;
6661        }
6662        struct_ser.end()
6663    }
6664}
6665impl<'de> serde::Deserialize<'de> for InitMetadataForReplayRequest {
6666    #[allow(deprecated)]
6667    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6668    where
6669        D: serde::Deserializer<'de>,
6670    {
6671        const FIELDS: &[&str] = &[
6672            "tables",
6673            "compaction_groups",
6674            "compactionGroups",
6675        ];
6676
6677        #[allow(clippy::enum_variant_names)]
6678        enum GeneratedField {
6679            Tables,
6680            CompactionGroups,
6681        }
6682        impl<'de> serde::Deserialize<'de> for GeneratedField {
6683            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6684            where
6685                D: serde::Deserializer<'de>,
6686            {
6687                struct GeneratedVisitor;
6688
6689                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6690                    type Value = GeneratedField;
6691
6692                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6693                        write!(formatter, "expected one of: {:?}", &FIELDS)
6694                    }
6695
6696                    #[allow(unused_variables)]
6697                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6698                    where
6699                        E: serde::de::Error,
6700                    {
6701                        match value {
6702                            "tables" => Ok(GeneratedField::Tables),
6703                            "compactionGroups" | "compaction_groups" => Ok(GeneratedField::CompactionGroups),
6704                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6705                        }
6706                    }
6707                }
6708                deserializer.deserialize_identifier(GeneratedVisitor)
6709            }
6710        }
6711        struct GeneratedVisitor;
6712        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6713            type Value = InitMetadataForReplayRequest;
6714
6715            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6716                formatter.write_str("struct hummock.InitMetadataForReplayRequest")
6717            }
6718
6719            fn visit_map<V>(self, mut map_: V) -> std::result::Result<InitMetadataForReplayRequest, V::Error>
6720                where
6721                    V: serde::de::MapAccess<'de>,
6722            {
6723                let mut tables__ = None;
6724                let mut compaction_groups__ = None;
6725                while let Some(k) = map_.next_key()? {
6726                    match k {
6727                        GeneratedField::Tables => {
6728                            if tables__.is_some() {
6729                                return Err(serde::de::Error::duplicate_field("tables"));
6730                            }
6731                            tables__ = Some(map_.next_value()?);
6732                        }
6733                        GeneratedField::CompactionGroups => {
6734                            if compaction_groups__.is_some() {
6735                                return Err(serde::de::Error::duplicate_field("compactionGroups"));
6736                            }
6737                            compaction_groups__ = Some(map_.next_value()?);
6738                        }
6739                    }
6740                }
6741                Ok(InitMetadataForReplayRequest {
6742                    tables: tables__.unwrap_or_default(),
6743                    compaction_groups: compaction_groups__.unwrap_or_default(),
6744                })
6745            }
6746        }
6747        deserializer.deserialize_struct("hummock.InitMetadataForReplayRequest", FIELDS, GeneratedVisitor)
6748    }
6749}
6750impl serde::Serialize for InitMetadataForReplayResponse {
6751    #[allow(deprecated)]
6752    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6753    where
6754        S: serde::Serializer,
6755    {
6756        use serde::ser::SerializeStruct;
6757        let len = 0;
6758        let struct_ser = serializer.serialize_struct("hummock.InitMetadataForReplayResponse", len)?;
6759        struct_ser.end()
6760    }
6761}
6762impl<'de> serde::Deserialize<'de> for InitMetadataForReplayResponse {
6763    #[allow(deprecated)]
6764    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6765    where
6766        D: serde::Deserializer<'de>,
6767    {
6768        const FIELDS: &[&str] = &[
6769        ];
6770
6771        #[allow(clippy::enum_variant_names)]
6772        enum GeneratedField {
6773        }
6774        impl<'de> serde::Deserialize<'de> for GeneratedField {
6775            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6776            where
6777                D: serde::Deserializer<'de>,
6778            {
6779                struct GeneratedVisitor;
6780
6781                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6782                    type Value = GeneratedField;
6783
6784                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6785                        write!(formatter, "expected one of: {:?}", &FIELDS)
6786                    }
6787
6788                    #[allow(unused_variables)]
6789                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6790                    where
6791                        E: serde::de::Error,
6792                    {
6793                            Err(serde::de::Error::unknown_field(value, FIELDS))
6794                    }
6795                }
6796                deserializer.deserialize_identifier(GeneratedVisitor)
6797            }
6798        }
6799        struct GeneratedVisitor;
6800        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6801            type Value = InitMetadataForReplayResponse;
6802
6803            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6804                formatter.write_str("struct hummock.InitMetadataForReplayResponse")
6805            }
6806
6807            fn visit_map<V>(self, mut map_: V) -> std::result::Result<InitMetadataForReplayResponse, V::Error>
6808                where
6809                    V: serde::de::MapAccess<'de>,
6810            {
6811                while map_.next_key::<GeneratedField>()?.is_some() {
6812                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
6813                }
6814                Ok(InitMetadataForReplayResponse {
6815                })
6816            }
6817        }
6818        deserializer.deserialize_struct("hummock.InitMetadataForReplayResponse", FIELDS, GeneratedVisitor)
6819    }
6820}
6821impl serde::Serialize for InputLevel {
6822    #[allow(deprecated)]
6823    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6824    where
6825        S: serde::Serializer,
6826    {
6827        use serde::ser::SerializeStruct;
6828        let mut len = 0;
6829        if self.level_idx != 0 {
6830            len += 1;
6831        }
6832        if self.level_type != 0 {
6833            len += 1;
6834        }
6835        if !self.table_infos.is_empty() {
6836            len += 1;
6837        }
6838        let mut struct_ser = serializer.serialize_struct("hummock.InputLevel", len)?;
6839        if self.level_idx != 0 {
6840            struct_ser.serialize_field("levelIdx", &self.level_idx)?;
6841        }
6842        if self.level_type != 0 {
6843            let v = LevelType::try_from(self.level_type)
6844                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.level_type)))?;
6845            struct_ser.serialize_field("levelType", &v)?;
6846        }
6847        if !self.table_infos.is_empty() {
6848            struct_ser.serialize_field("tableInfos", &self.table_infos)?;
6849        }
6850        struct_ser.end()
6851    }
6852}
6853impl<'de> serde::Deserialize<'de> for InputLevel {
6854    #[allow(deprecated)]
6855    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6856    where
6857        D: serde::Deserializer<'de>,
6858    {
6859        const FIELDS: &[&str] = &[
6860            "level_idx",
6861            "levelIdx",
6862            "level_type",
6863            "levelType",
6864            "table_infos",
6865            "tableInfos",
6866        ];
6867
6868        #[allow(clippy::enum_variant_names)]
6869        enum GeneratedField {
6870            LevelIdx,
6871            LevelType,
6872            TableInfos,
6873        }
6874        impl<'de> serde::Deserialize<'de> for GeneratedField {
6875            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6876            where
6877                D: serde::Deserializer<'de>,
6878            {
6879                struct GeneratedVisitor;
6880
6881                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6882                    type Value = GeneratedField;
6883
6884                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6885                        write!(formatter, "expected one of: {:?}", &FIELDS)
6886                    }
6887
6888                    #[allow(unused_variables)]
6889                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6890                    where
6891                        E: serde::de::Error,
6892                    {
6893                        match value {
6894                            "levelIdx" | "level_idx" => Ok(GeneratedField::LevelIdx),
6895                            "levelType" | "level_type" => Ok(GeneratedField::LevelType),
6896                            "tableInfos" | "table_infos" => Ok(GeneratedField::TableInfos),
6897                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6898                        }
6899                    }
6900                }
6901                deserializer.deserialize_identifier(GeneratedVisitor)
6902            }
6903        }
6904        struct GeneratedVisitor;
6905        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6906            type Value = InputLevel;
6907
6908            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6909                formatter.write_str("struct hummock.InputLevel")
6910            }
6911
6912            fn visit_map<V>(self, mut map_: V) -> std::result::Result<InputLevel, V::Error>
6913                where
6914                    V: serde::de::MapAccess<'de>,
6915            {
6916                let mut level_idx__ = None;
6917                let mut level_type__ = None;
6918                let mut table_infos__ = None;
6919                while let Some(k) = map_.next_key()? {
6920                    match k {
6921                        GeneratedField::LevelIdx => {
6922                            if level_idx__.is_some() {
6923                                return Err(serde::de::Error::duplicate_field("levelIdx"));
6924                            }
6925                            level_idx__ = 
6926                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
6927                            ;
6928                        }
6929                        GeneratedField::LevelType => {
6930                            if level_type__.is_some() {
6931                                return Err(serde::de::Error::duplicate_field("levelType"));
6932                            }
6933                            level_type__ = Some(map_.next_value::<LevelType>()? as i32);
6934                        }
6935                        GeneratedField::TableInfos => {
6936                            if table_infos__.is_some() {
6937                                return Err(serde::de::Error::duplicate_field("tableInfos"));
6938                            }
6939                            table_infos__ = Some(map_.next_value()?);
6940                        }
6941                    }
6942                }
6943                Ok(InputLevel {
6944                    level_idx: level_idx__.unwrap_or_default(),
6945                    level_type: level_type__.unwrap_or_default(),
6946                    table_infos: table_infos__.unwrap_or_default(),
6947                })
6948            }
6949        }
6950        deserializer.deserialize_struct("hummock.InputLevel", FIELDS, GeneratedVisitor)
6951    }
6952}
6953impl serde::Serialize for IntraLevelDelta {
6954    #[allow(deprecated)]
6955    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6956    where
6957        S: serde::Serializer,
6958    {
6959        use serde::ser::SerializeStruct;
6960        let mut len = 0;
6961        if self.level_idx != 0 {
6962            len += 1;
6963        }
6964        if self.l0_sub_level_id != 0 {
6965            len += 1;
6966        }
6967        if !self.removed_table_ids.is_empty() {
6968            len += 1;
6969        }
6970        if !self.inserted_table_infos.is_empty() {
6971            len += 1;
6972        }
6973        if self.vnode_partition_count != 0 {
6974            len += 1;
6975        }
6976        if self.compaction_group_version_id != 0 {
6977            len += 1;
6978        }
6979        let mut struct_ser = serializer.serialize_struct("hummock.IntraLevelDelta", len)?;
6980        if self.level_idx != 0 {
6981            struct_ser.serialize_field("levelIdx", &self.level_idx)?;
6982        }
6983        if self.l0_sub_level_id != 0 {
6984            #[allow(clippy::needless_borrow)]
6985            #[allow(clippy::needless_borrows_for_generic_args)]
6986            struct_ser.serialize_field("l0SubLevelId", ToString::to_string(&self.l0_sub_level_id).as_str())?;
6987        }
6988        if !self.removed_table_ids.is_empty() {
6989            struct_ser.serialize_field("removedTableIds", &self.removed_table_ids.iter().map(ToString::to_string).collect::<Vec<_>>())?;
6990        }
6991        if !self.inserted_table_infos.is_empty() {
6992            struct_ser.serialize_field("insertedTableInfos", &self.inserted_table_infos)?;
6993        }
6994        if self.vnode_partition_count != 0 {
6995            struct_ser.serialize_field("vnodePartitionCount", &self.vnode_partition_count)?;
6996        }
6997        if self.compaction_group_version_id != 0 {
6998            #[allow(clippy::needless_borrow)]
6999            #[allow(clippy::needless_borrows_for_generic_args)]
7000            struct_ser.serialize_field("compactionGroupVersionId", ToString::to_string(&self.compaction_group_version_id).as_str())?;
7001        }
7002        struct_ser.end()
7003    }
7004}
7005impl<'de> serde::Deserialize<'de> for IntraLevelDelta {
7006    #[allow(deprecated)]
7007    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7008    where
7009        D: serde::Deserializer<'de>,
7010    {
7011        const FIELDS: &[&str] = &[
7012            "level_idx",
7013            "levelIdx",
7014            "l0_sub_level_id",
7015            "l0SubLevelId",
7016            "removed_table_ids",
7017            "removedTableIds",
7018            "inserted_table_infos",
7019            "insertedTableInfos",
7020            "vnode_partition_count",
7021            "vnodePartitionCount",
7022            "compaction_group_version_id",
7023            "compactionGroupVersionId",
7024        ];
7025
7026        #[allow(clippy::enum_variant_names)]
7027        enum GeneratedField {
7028            LevelIdx,
7029            L0SubLevelId,
7030            RemovedTableIds,
7031            InsertedTableInfos,
7032            VnodePartitionCount,
7033            CompactionGroupVersionId,
7034        }
7035        impl<'de> serde::Deserialize<'de> for GeneratedField {
7036            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7037            where
7038                D: serde::Deserializer<'de>,
7039            {
7040                struct GeneratedVisitor;
7041
7042                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7043                    type Value = GeneratedField;
7044
7045                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7046                        write!(formatter, "expected one of: {:?}", &FIELDS)
7047                    }
7048
7049                    #[allow(unused_variables)]
7050                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7051                    where
7052                        E: serde::de::Error,
7053                    {
7054                        match value {
7055                            "levelIdx" | "level_idx" => Ok(GeneratedField::LevelIdx),
7056                            "l0SubLevelId" | "l0_sub_level_id" => Ok(GeneratedField::L0SubLevelId),
7057                            "removedTableIds" | "removed_table_ids" => Ok(GeneratedField::RemovedTableIds),
7058                            "insertedTableInfos" | "inserted_table_infos" => Ok(GeneratedField::InsertedTableInfos),
7059                            "vnodePartitionCount" | "vnode_partition_count" => Ok(GeneratedField::VnodePartitionCount),
7060                            "compactionGroupVersionId" | "compaction_group_version_id" => Ok(GeneratedField::CompactionGroupVersionId),
7061                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7062                        }
7063                    }
7064                }
7065                deserializer.deserialize_identifier(GeneratedVisitor)
7066            }
7067        }
7068        struct GeneratedVisitor;
7069        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7070            type Value = IntraLevelDelta;
7071
7072            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7073                formatter.write_str("struct hummock.IntraLevelDelta")
7074            }
7075
7076            fn visit_map<V>(self, mut map_: V) -> std::result::Result<IntraLevelDelta, V::Error>
7077                where
7078                    V: serde::de::MapAccess<'de>,
7079            {
7080                let mut level_idx__ = None;
7081                let mut l0_sub_level_id__ = None;
7082                let mut removed_table_ids__ = None;
7083                let mut inserted_table_infos__ = None;
7084                let mut vnode_partition_count__ = None;
7085                let mut compaction_group_version_id__ = None;
7086                while let Some(k) = map_.next_key()? {
7087                    match k {
7088                        GeneratedField::LevelIdx => {
7089                            if level_idx__.is_some() {
7090                                return Err(serde::de::Error::duplicate_field("levelIdx"));
7091                            }
7092                            level_idx__ = 
7093                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7094                            ;
7095                        }
7096                        GeneratedField::L0SubLevelId => {
7097                            if l0_sub_level_id__.is_some() {
7098                                return Err(serde::de::Error::duplicate_field("l0SubLevelId"));
7099                            }
7100                            l0_sub_level_id__ = 
7101                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7102                            ;
7103                        }
7104                        GeneratedField::RemovedTableIds => {
7105                            if removed_table_ids__.is_some() {
7106                                return Err(serde::de::Error::duplicate_field("removedTableIds"));
7107                            }
7108                            removed_table_ids__ = 
7109                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7110                                    .into_iter().map(|x| x.0).collect())
7111                            ;
7112                        }
7113                        GeneratedField::InsertedTableInfos => {
7114                            if inserted_table_infos__.is_some() {
7115                                return Err(serde::de::Error::duplicate_field("insertedTableInfos"));
7116                            }
7117                            inserted_table_infos__ = Some(map_.next_value()?);
7118                        }
7119                        GeneratedField::VnodePartitionCount => {
7120                            if vnode_partition_count__.is_some() {
7121                                return Err(serde::de::Error::duplicate_field("vnodePartitionCount"));
7122                            }
7123                            vnode_partition_count__ = 
7124                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7125                            ;
7126                        }
7127                        GeneratedField::CompactionGroupVersionId => {
7128                            if compaction_group_version_id__.is_some() {
7129                                return Err(serde::de::Error::duplicate_field("compactionGroupVersionId"));
7130                            }
7131                            compaction_group_version_id__ = 
7132                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7133                            ;
7134                        }
7135                    }
7136                }
7137                Ok(IntraLevelDelta {
7138                    level_idx: level_idx__.unwrap_or_default(),
7139                    l0_sub_level_id: l0_sub_level_id__.unwrap_or_default(),
7140                    removed_table_ids: removed_table_ids__.unwrap_or_default(),
7141                    inserted_table_infos: inserted_table_infos__.unwrap_or_default(),
7142                    vnode_partition_count: vnode_partition_count__.unwrap_or_default(),
7143                    compaction_group_version_id: compaction_group_version_id__.unwrap_or_default(),
7144                })
7145            }
7146        }
7147        deserializer.deserialize_struct("hummock.IntraLevelDelta", FIELDS, GeneratedVisitor)
7148    }
7149}
7150impl serde::Serialize for KeyRange {
7151    #[allow(deprecated)]
7152    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7153    where
7154        S: serde::Serializer,
7155    {
7156        use serde::ser::SerializeStruct;
7157        let mut len = 0;
7158        if !self.left.is_empty() {
7159            len += 1;
7160        }
7161        if !self.right.is_empty() {
7162            len += 1;
7163        }
7164        if self.right_exclusive {
7165            len += 1;
7166        }
7167        let mut struct_ser = serializer.serialize_struct("hummock.KeyRange", len)?;
7168        if !self.left.is_empty() {
7169            #[allow(clippy::needless_borrow)]
7170            #[allow(clippy::needless_borrows_for_generic_args)]
7171            struct_ser.serialize_field("left", pbjson::private::base64::encode(&self.left).as_str())?;
7172        }
7173        if !self.right.is_empty() {
7174            #[allow(clippy::needless_borrow)]
7175            #[allow(clippy::needless_borrows_for_generic_args)]
7176            struct_ser.serialize_field("right", pbjson::private::base64::encode(&self.right).as_str())?;
7177        }
7178        if self.right_exclusive {
7179            struct_ser.serialize_field("rightExclusive", &self.right_exclusive)?;
7180        }
7181        struct_ser.end()
7182    }
7183}
7184impl<'de> serde::Deserialize<'de> for KeyRange {
7185    #[allow(deprecated)]
7186    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7187    where
7188        D: serde::Deserializer<'de>,
7189    {
7190        const FIELDS: &[&str] = &[
7191            "left",
7192            "right",
7193            "right_exclusive",
7194            "rightExclusive",
7195        ];
7196
7197        #[allow(clippy::enum_variant_names)]
7198        enum GeneratedField {
7199            Left,
7200            Right,
7201            RightExclusive,
7202        }
7203        impl<'de> serde::Deserialize<'de> for GeneratedField {
7204            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7205            where
7206                D: serde::Deserializer<'de>,
7207            {
7208                struct GeneratedVisitor;
7209
7210                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7211                    type Value = GeneratedField;
7212
7213                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7214                        write!(formatter, "expected one of: {:?}", &FIELDS)
7215                    }
7216
7217                    #[allow(unused_variables)]
7218                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7219                    where
7220                        E: serde::de::Error,
7221                    {
7222                        match value {
7223                            "left" => Ok(GeneratedField::Left),
7224                            "right" => Ok(GeneratedField::Right),
7225                            "rightExclusive" | "right_exclusive" => Ok(GeneratedField::RightExclusive),
7226                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7227                        }
7228                    }
7229                }
7230                deserializer.deserialize_identifier(GeneratedVisitor)
7231            }
7232        }
7233        struct GeneratedVisitor;
7234        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7235            type Value = KeyRange;
7236
7237            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7238                formatter.write_str("struct hummock.KeyRange")
7239            }
7240
7241            fn visit_map<V>(self, mut map_: V) -> std::result::Result<KeyRange, V::Error>
7242                where
7243                    V: serde::de::MapAccess<'de>,
7244            {
7245                let mut left__ = None;
7246                let mut right__ = None;
7247                let mut right_exclusive__ = None;
7248                while let Some(k) = map_.next_key()? {
7249                    match k {
7250                        GeneratedField::Left => {
7251                            if left__.is_some() {
7252                                return Err(serde::de::Error::duplicate_field("left"));
7253                            }
7254                            left__ = 
7255                                Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
7256                            ;
7257                        }
7258                        GeneratedField::Right => {
7259                            if right__.is_some() {
7260                                return Err(serde::de::Error::duplicate_field("right"));
7261                            }
7262                            right__ = 
7263                                Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
7264                            ;
7265                        }
7266                        GeneratedField::RightExclusive => {
7267                            if right_exclusive__.is_some() {
7268                                return Err(serde::de::Error::duplicate_field("rightExclusive"));
7269                            }
7270                            right_exclusive__ = Some(map_.next_value()?);
7271                        }
7272                    }
7273                }
7274                Ok(KeyRange {
7275                    left: left__.unwrap_or_default(),
7276                    right: right__.unwrap_or_default(),
7277                    right_exclusive: right_exclusive__.unwrap_or_default(),
7278                })
7279            }
7280        }
7281        deserializer.deserialize_struct("hummock.KeyRange", FIELDS, GeneratedVisitor)
7282    }
7283}
7284impl serde::Serialize for Level {
7285    #[allow(deprecated)]
7286    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7287    where
7288        S: serde::Serializer,
7289    {
7290        use serde::ser::SerializeStruct;
7291        let mut len = 0;
7292        if self.level_idx != 0 {
7293            len += 1;
7294        }
7295        if self.level_type != 0 {
7296            len += 1;
7297        }
7298        if !self.table_infos.is_empty() {
7299            len += 1;
7300        }
7301        if self.total_file_size != 0 {
7302            len += 1;
7303        }
7304        if self.sub_level_id != 0 {
7305            len += 1;
7306        }
7307        if self.uncompressed_file_size != 0 {
7308            len += 1;
7309        }
7310        if self.vnode_partition_count != 0 {
7311            len += 1;
7312        }
7313        let mut struct_ser = serializer.serialize_struct("hummock.Level", len)?;
7314        if self.level_idx != 0 {
7315            struct_ser.serialize_field("levelIdx", &self.level_idx)?;
7316        }
7317        if self.level_type != 0 {
7318            let v = LevelType::try_from(self.level_type)
7319                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.level_type)))?;
7320            struct_ser.serialize_field("levelType", &v)?;
7321        }
7322        if !self.table_infos.is_empty() {
7323            struct_ser.serialize_field("tableInfos", &self.table_infos)?;
7324        }
7325        if self.total_file_size != 0 {
7326            #[allow(clippy::needless_borrow)]
7327            #[allow(clippy::needless_borrows_for_generic_args)]
7328            struct_ser.serialize_field("totalFileSize", ToString::to_string(&self.total_file_size).as_str())?;
7329        }
7330        if self.sub_level_id != 0 {
7331            #[allow(clippy::needless_borrow)]
7332            #[allow(clippy::needless_borrows_for_generic_args)]
7333            struct_ser.serialize_field("subLevelId", ToString::to_string(&self.sub_level_id).as_str())?;
7334        }
7335        if self.uncompressed_file_size != 0 {
7336            #[allow(clippy::needless_borrow)]
7337            #[allow(clippy::needless_borrows_for_generic_args)]
7338            struct_ser.serialize_field("uncompressedFileSize", ToString::to_string(&self.uncompressed_file_size).as_str())?;
7339        }
7340        if self.vnode_partition_count != 0 {
7341            struct_ser.serialize_field("vnodePartitionCount", &self.vnode_partition_count)?;
7342        }
7343        struct_ser.end()
7344    }
7345}
7346impl<'de> serde::Deserialize<'de> for Level {
7347    #[allow(deprecated)]
7348    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7349    where
7350        D: serde::Deserializer<'de>,
7351    {
7352        const FIELDS: &[&str] = &[
7353            "level_idx",
7354            "levelIdx",
7355            "level_type",
7356            "levelType",
7357            "table_infos",
7358            "tableInfos",
7359            "total_file_size",
7360            "totalFileSize",
7361            "sub_level_id",
7362            "subLevelId",
7363            "uncompressed_file_size",
7364            "uncompressedFileSize",
7365            "vnode_partition_count",
7366            "vnodePartitionCount",
7367        ];
7368
7369        #[allow(clippy::enum_variant_names)]
7370        enum GeneratedField {
7371            LevelIdx,
7372            LevelType,
7373            TableInfos,
7374            TotalFileSize,
7375            SubLevelId,
7376            UncompressedFileSize,
7377            VnodePartitionCount,
7378        }
7379        impl<'de> serde::Deserialize<'de> for GeneratedField {
7380            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7381            where
7382                D: serde::Deserializer<'de>,
7383            {
7384                struct GeneratedVisitor;
7385
7386                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7387                    type Value = GeneratedField;
7388
7389                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7390                        write!(formatter, "expected one of: {:?}", &FIELDS)
7391                    }
7392
7393                    #[allow(unused_variables)]
7394                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7395                    where
7396                        E: serde::de::Error,
7397                    {
7398                        match value {
7399                            "levelIdx" | "level_idx" => Ok(GeneratedField::LevelIdx),
7400                            "levelType" | "level_type" => Ok(GeneratedField::LevelType),
7401                            "tableInfos" | "table_infos" => Ok(GeneratedField::TableInfos),
7402                            "totalFileSize" | "total_file_size" => Ok(GeneratedField::TotalFileSize),
7403                            "subLevelId" | "sub_level_id" => Ok(GeneratedField::SubLevelId),
7404                            "uncompressedFileSize" | "uncompressed_file_size" => Ok(GeneratedField::UncompressedFileSize),
7405                            "vnodePartitionCount" | "vnode_partition_count" => Ok(GeneratedField::VnodePartitionCount),
7406                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7407                        }
7408                    }
7409                }
7410                deserializer.deserialize_identifier(GeneratedVisitor)
7411            }
7412        }
7413        struct GeneratedVisitor;
7414        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7415            type Value = Level;
7416
7417            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7418                formatter.write_str("struct hummock.Level")
7419            }
7420
7421            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Level, V::Error>
7422                where
7423                    V: serde::de::MapAccess<'de>,
7424            {
7425                let mut level_idx__ = None;
7426                let mut level_type__ = None;
7427                let mut table_infos__ = None;
7428                let mut total_file_size__ = None;
7429                let mut sub_level_id__ = None;
7430                let mut uncompressed_file_size__ = None;
7431                let mut vnode_partition_count__ = None;
7432                while let Some(k) = map_.next_key()? {
7433                    match k {
7434                        GeneratedField::LevelIdx => {
7435                            if level_idx__.is_some() {
7436                                return Err(serde::de::Error::duplicate_field("levelIdx"));
7437                            }
7438                            level_idx__ = 
7439                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7440                            ;
7441                        }
7442                        GeneratedField::LevelType => {
7443                            if level_type__.is_some() {
7444                                return Err(serde::de::Error::duplicate_field("levelType"));
7445                            }
7446                            level_type__ = Some(map_.next_value::<LevelType>()? as i32);
7447                        }
7448                        GeneratedField::TableInfos => {
7449                            if table_infos__.is_some() {
7450                                return Err(serde::de::Error::duplicate_field("tableInfos"));
7451                            }
7452                            table_infos__ = Some(map_.next_value()?);
7453                        }
7454                        GeneratedField::TotalFileSize => {
7455                            if total_file_size__.is_some() {
7456                                return Err(serde::de::Error::duplicate_field("totalFileSize"));
7457                            }
7458                            total_file_size__ = 
7459                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7460                            ;
7461                        }
7462                        GeneratedField::SubLevelId => {
7463                            if sub_level_id__.is_some() {
7464                                return Err(serde::de::Error::duplicate_field("subLevelId"));
7465                            }
7466                            sub_level_id__ = 
7467                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7468                            ;
7469                        }
7470                        GeneratedField::UncompressedFileSize => {
7471                            if uncompressed_file_size__.is_some() {
7472                                return Err(serde::de::Error::duplicate_field("uncompressedFileSize"));
7473                            }
7474                            uncompressed_file_size__ = 
7475                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7476                            ;
7477                        }
7478                        GeneratedField::VnodePartitionCount => {
7479                            if vnode_partition_count__.is_some() {
7480                                return Err(serde::de::Error::duplicate_field("vnodePartitionCount"));
7481                            }
7482                            vnode_partition_count__ = 
7483                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7484                            ;
7485                        }
7486                    }
7487                }
7488                Ok(Level {
7489                    level_idx: level_idx__.unwrap_or_default(),
7490                    level_type: level_type__.unwrap_or_default(),
7491                    table_infos: table_infos__.unwrap_or_default(),
7492                    total_file_size: total_file_size__.unwrap_or_default(),
7493                    sub_level_id: sub_level_id__.unwrap_or_default(),
7494                    uncompressed_file_size: uncompressed_file_size__.unwrap_or_default(),
7495                    vnode_partition_count: vnode_partition_count__.unwrap_or_default(),
7496                })
7497            }
7498        }
7499        deserializer.deserialize_struct("hummock.Level", FIELDS, GeneratedVisitor)
7500    }
7501}
7502impl serde::Serialize for LevelHandler {
7503    #[allow(deprecated)]
7504    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7505    where
7506        S: serde::Serializer,
7507    {
7508        use serde::ser::SerializeStruct;
7509        let mut len = 0;
7510        if self.level != 0 {
7511            len += 1;
7512        }
7513        if !self.tasks.is_empty() {
7514            len += 1;
7515        }
7516        let mut struct_ser = serializer.serialize_struct("hummock.LevelHandler", len)?;
7517        if self.level != 0 {
7518            struct_ser.serialize_field("level", &self.level)?;
7519        }
7520        if !self.tasks.is_empty() {
7521            struct_ser.serialize_field("tasks", &self.tasks)?;
7522        }
7523        struct_ser.end()
7524    }
7525}
7526impl<'de> serde::Deserialize<'de> for LevelHandler {
7527    #[allow(deprecated)]
7528    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7529    where
7530        D: serde::Deserializer<'de>,
7531    {
7532        const FIELDS: &[&str] = &[
7533            "level",
7534            "tasks",
7535        ];
7536
7537        #[allow(clippy::enum_variant_names)]
7538        enum GeneratedField {
7539            Level,
7540            Tasks,
7541        }
7542        impl<'de> serde::Deserialize<'de> for GeneratedField {
7543            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7544            where
7545                D: serde::Deserializer<'de>,
7546            {
7547                struct GeneratedVisitor;
7548
7549                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7550                    type Value = GeneratedField;
7551
7552                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7553                        write!(formatter, "expected one of: {:?}", &FIELDS)
7554                    }
7555
7556                    #[allow(unused_variables)]
7557                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7558                    where
7559                        E: serde::de::Error,
7560                    {
7561                        match value {
7562                            "level" => Ok(GeneratedField::Level),
7563                            "tasks" => Ok(GeneratedField::Tasks),
7564                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7565                        }
7566                    }
7567                }
7568                deserializer.deserialize_identifier(GeneratedVisitor)
7569            }
7570        }
7571        struct GeneratedVisitor;
7572        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7573            type Value = LevelHandler;
7574
7575            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7576                formatter.write_str("struct hummock.LevelHandler")
7577            }
7578
7579            fn visit_map<V>(self, mut map_: V) -> std::result::Result<LevelHandler, V::Error>
7580                where
7581                    V: serde::de::MapAccess<'de>,
7582            {
7583                let mut level__ = None;
7584                let mut tasks__ = None;
7585                while let Some(k) = map_.next_key()? {
7586                    match k {
7587                        GeneratedField::Level => {
7588                            if level__.is_some() {
7589                                return Err(serde::de::Error::duplicate_field("level"));
7590                            }
7591                            level__ = 
7592                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7593                            ;
7594                        }
7595                        GeneratedField::Tasks => {
7596                            if tasks__.is_some() {
7597                                return Err(serde::de::Error::duplicate_field("tasks"));
7598                            }
7599                            tasks__ = Some(map_.next_value()?);
7600                        }
7601                    }
7602                }
7603                Ok(LevelHandler {
7604                    level: level__.unwrap_or_default(),
7605                    tasks: tasks__.unwrap_or_default(),
7606                })
7607            }
7608        }
7609        deserializer.deserialize_struct("hummock.LevelHandler", FIELDS, GeneratedVisitor)
7610    }
7611}
7612impl serde::Serialize for level_handler::RunningCompactTask {
7613    #[allow(deprecated)]
7614    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7615    where
7616        S: serde::Serializer,
7617    {
7618        use serde::ser::SerializeStruct;
7619        let mut len = 0;
7620        if self.task_id != 0 {
7621            len += 1;
7622        }
7623        if !self.ssts.is_empty() {
7624            len += 1;
7625        }
7626        if self.total_file_size != 0 {
7627            len += 1;
7628        }
7629        if self.target_level != 0 {
7630            len += 1;
7631        }
7632        let mut struct_ser = serializer.serialize_struct("hummock.LevelHandler.RunningCompactTask", len)?;
7633        if self.task_id != 0 {
7634            #[allow(clippy::needless_borrow)]
7635            #[allow(clippy::needless_borrows_for_generic_args)]
7636            struct_ser.serialize_field("taskId", ToString::to_string(&self.task_id).as_str())?;
7637        }
7638        if !self.ssts.is_empty() {
7639            struct_ser.serialize_field("ssts", &self.ssts.iter().map(ToString::to_string).collect::<Vec<_>>())?;
7640        }
7641        if self.total_file_size != 0 {
7642            #[allow(clippy::needless_borrow)]
7643            #[allow(clippy::needless_borrows_for_generic_args)]
7644            struct_ser.serialize_field("totalFileSize", ToString::to_string(&self.total_file_size).as_str())?;
7645        }
7646        if self.target_level != 0 {
7647            struct_ser.serialize_field("targetLevel", &self.target_level)?;
7648        }
7649        struct_ser.end()
7650    }
7651}
7652impl<'de> serde::Deserialize<'de> for level_handler::RunningCompactTask {
7653    #[allow(deprecated)]
7654    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7655    where
7656        D: serde::Deserializer<'de>,
7657    {
7658        const FIELDS: &[&str] = &[
7659            "task_id",
7660            "taskId",
7661            "ssts",
7662            "total_file_size",
7663            "totalFileSize",
7664            "target_level",
7665            "targetLevel",
7666        ];
7667
7668        #[allow(clippy::enum_variant_names)]
7669        enum GeneratedField {
7670            TaskId,
7671            Ssts,
7672            TotalFileSize,
7673            TargetLevel,
7674        }
7675        impl<'de> serde::Deserialize<'de> for GeneratedField {
7676            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7677            where
7678                D: serde::Deserializer<'de>,
7679            {
7680                struct GeneratedVisitor;
7681
7682                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7683                    type Value = GeneratedField;
7684
7685                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7686                        write!(formatter, "expected one of: {:?}", &FIELDS)
7687                    }
7688
7689                    #[allow(unused_variables)]
7690                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7691                    where
7692                        E: serde::de::Error,
7693                    {
7694                        match value {
7695                            "taskId" | "task_id" => Ok(GeneratedField::TaskId),
7696                            "ssts" => Ok(GeneratedField::Ssts),
7697                            "totalFileSize" | "total_file_size" => Ok(GeneratedField::TotalFileSize),
7698                            "targetLevel" | "target_level" => Ok(GeneratedField::TargetLevel),
7699                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7700                        }
7701                    }
7702                }
7703                deserializer.deserialize_identifier(GeneratedVisitor)
7704            }
7705        }
7706        struct GeneratedVisitor;
7707        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7708            type Value = level_handler::RunningCompactTask;
7709
7710            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7711                formatter.write_str("struct hummock.LevelHandler.RunningCompactTask")
7712            }
7713
7714            fn visit_map<V>(self, mut map_: V) -> std::result::Result<level_handler::RunningCompactTask, V::Error>
7715                where
7716                    V: serde::de::MapAccess<'de>,
7717            {
7718                let mut task_id__ = None;
7719                let mut ssts__ = None;
7720                let mut total_file_size__ = None;
7721                let mut target_level__ = None;
7722                while let Some(k) = map_.next_key()? {
7723                    match k {
7724                        GeneratedField::TaskId => {
7725                            if task_id__.is_some() {
7726                                return Err(serde::de::Error::duplicate_field("taskId"));
7727                            }
7728                            task_id__ = 
7729                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7730                            ;
7731                        }
7732                        GeneratedField::Ssts => {
7733                            if ssts__.is_some() {
7734                                return Err(serde::de::Error::duplicate_field("ssts"));
7735                            }
7736                            ssts__ = 
7737                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7738                                    .into_iter().map(|x| x.0).collect())
7739                            ;
7740                        }
7741                        GeneratedField::TotalFileSize => {
7742                            if total_file_size__.is_some() {
7743                                return Err(serde::de::Error::duplicate_field("totalFileSize"));
7744                            }
7745                            total_file_size__ = 
7746                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7747                            ;
7748                        }
7749                        GeneratedField::TargetLevel => {
7750                            if target_level__.is_some() {
7751                                return Err(serde::de::Error::duplicate_field("targetLevel"));
7752                            }
7753                            target_level__ = 
7754                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7755                            ;
7756                        }
7757                    }
7758                }
7759                Ok(level_handler::RunningCompactTask {
7760                    task_id: task_id__.unwrap_or_default(),
7761                    ssts: ssts__.unwrap_or_default(),
7762                    total_file_size: total_file_size__.unwrap_or_default(),
7763                    target_level: target_level__.unwrap_or_default(),
7764                })
7765            }
7766        }
7767        deserializer.deserialize_struct("hummock.LevelHandler.RunningCompactTask", FIELDS, GeneratedVisitor)
7768    }
7769}
7770impl serde::Serialize for LevelType {
7771    #[allow(deprecated)]
7772    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7773    where
7774        S: serde::Serializer,
7775    {
7776        let variant = match self {
7777            Self::Unspecified => "LEVEL_TYPE_UNSPECIFIED",
7778            Self::Nonoverlapping => "LEVEL_TYPE_NONOVERLAPPING",
7779            Self::Overlapping => "LEVEL_TYPE_OVERLAPPING",
7780        };
7781        serializer.serialize_str(variant)
7782    }
7783}
7784impl<'de> serde::Deserialize<'de> for LevelType {
7785    #[allow(deprecated)]
7786    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7787    where
7788        D: serde::Deserializer<'de>,
7789    {
7790        const FIELDS: &[&str] = &[
7791            "LEVEL_TYPE_UNSPECIFIED",
7792            "LEVEL_TYPE_NONOVERLAPPING",
7793            "LEVEL_TYPE_OVERLAPPING",
7794        ];
7795
7796        struct GeneratedVisitor;
7797
7798        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7799            type Value = LevelType;
7800
7801            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7802                write!(formatter, "expected one of: {:?}", &FIELDS)
7803            }
7804
7805            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
7806            where
7807                E: serde::de::Error,
7808            {
7809                i32::try_from(v)
7810                    .ok()
7811                    .and_then(|x| x.try_into().ok())
7812                    .ok_or_else(|| {
7813                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
7814                    })
7815            }
7816
7817            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
7818            where
7819                E: serde::de::Error,
7820            {
7821                i32::try_from(v)
7822                    .ok()
7823                    .and_then(|x| x.try_into().ok())
7824                    .ok_or_else(|| {
7825                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
7826                    })
7827            }
7828
7829            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7830            where
7831                E: serde::de::Error,
7832            {
7833                match value {
7834                    "LEVEL_TYPE_UNSPECIFIED" => Ok(LevelType::Unspecified),
7835                    "LEVEL_TYPE_NONOVERLAPPING" => Ok(LevelType::Nonoverlapping),
7836                    "LEVEL_TYPE_OVERLAPPING" => Ok(LevelType::Overlapping),
7837                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
7838                }
7839            }
7840        }
7841        deserializer.deserialize_any(GeneratedVisitor)
7842    }
7843}
7844impl serde::Serialize for ListActiveWriteLimitRequest {
7845    #[allow(deprecated)]
7846    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7847    where
7848        S: serde::Serializer,
7849    {
7850        use serde::ser::SerializeStruct;
7851        let len = 0;
7852        let struct_ser = serializer.serialize_struct("hummock.ListActiveWriteLimitRequest", len)?;
7853        struct_ser.end()
7854    }
7855}
7856impl<'de> serde::Deserialize<'de> for ListActiveWriteLimitRequest {
7857    #[allow(deprecated)]
7858    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7859    where
7860        D: serde::Deserializer<'de>,
7861    {
7862        const FIELDS: &[&str] = &[
7863        ];
7864
7865        #[allow(clippy::enum_variant_names)]
7866        enum GeneratedField {
7867        }
7868        impl<'de> serde::Deserialize<'de> for GeneratedField {
7869            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7870            where
7871                D: serde::Deserializer<'de>,
7872            {
7873                struct GeneratedVisitor;
7874
7875                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7876                    type Value = GeneratedField;
7877
7878                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7879                        write!(formatter, "expected one of: {:?}", &FIELDS)
7880                    }
7881
7882                    #[allow(unused_variables)]
7883                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7884                    where
7885                        E: serde::de::Error,
7886                    {
7887                            Err(serde::de::Error::unknown_field(value, FIELDS))
7888                    }
7889                }
7890                deserializer.deserialize_identifier(GeneratedVisitor)
7891            }
7892        }
7893        struct GeneratedVisitor;
7894        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7895            type Value = ListActiveWriteLimitRequest;
7896
7897            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7898                formatter.write_str("struct hummock.ListActiveWriteLimitRequest")
7899            }
7900
7901            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListActiveWriteLimitRequest, V::Error>
7902                where
7903                    V: serde::de::MapAccess<'de>,
7904            {
7905                while map_.next_key::<GeneratedField>()?.is_some() {
7906                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
7907                }
7908                Ok(ListActiveWriteLimitRequest {
7909                })
7910            }
7911        }
7912        deserializer.deserialize_struct("hummock.ListActiveWriteLimitRequest", FIELDS, GeneratedVisitor)
7913    }
7914}
7915impl serde::Serialize for ListActiveWriteLimitResponse {
7916    #[allow(deprecated)]
7917    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7918    where
7919        S: serde::Serializer,
7920    {
7921        use serde::ser::SerializeStruct;
7922        let mut len = 0;
7923        if !self.write_limits.is_empty() {
7924            len += 1;
7925        }
7926        let mut struct_ser = serializer.serialize_struct("hummock.ListActiveWriteLimitResponse", len)?;
7927        if !self.write_limits.is_empty() {
7928            struct_ser.serialize_field("writeLimits", &self.write_limits)?;
7929        }
7930        struct_ser.end()
7931    }
7932}
7933impl<'de> serde::Deserialize<'de> for ListActiveWriteLimitResponse {
7934    #[allow(deprecated)]
7935    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7936    where
7937        D: serde::Deserializer<'de>,
7938    {
7939        const FIELDS: &[&str] = &[
7940            "write_limits",
7941            "writeLimits",
7942        ];
7943
7944        #[allow(clippy::enum_variant_names)]
7945        enum GeneratedField {
7946            WriteLimits,
7947        }
7948        impl<'de> serde::Deserialize<'de> for GeneratedField {
7949            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7950            where
7951                D: serde::Deserializer<'de>,
7952            {
7953                struct GeneratedVisitor;
7954
7955                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7956                    type Value = GeneratedField;
7957
7958                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7959                        write!(formatter, "expected one of: {:?}", &FIELDS)
7960                    }
7961
7962                    #[allow(unused_variables)]
7963                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7964                    where
7965                        E: serde::de::Error,
7966                    {
7967                        match value {
7968                            "writeLimits" | "write_limits" => Ok(GeneratedField::WriteLimits),
7969                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7970                        }
7971                    }
7972                }
7973                deserializer.deserialize_identifier(GeneratedVisitor)
7974            }
7975        }
7976        struct GeneratedVisitor;
7977        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7978            type Value = ListActiveWriteLimitResponse;
7979
7980            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7981                formatter.write_str("struct hummock.ListActiveWriteLimitResponse")
7982            }
7983
7984            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListActiveWriteLimitResponse, V::Error>
7985                where
7986                    V: serde::de::MapAccess<'de>,
7987            {
7988                let mut write_limits__ = None;
7989                while let Some(k) = map_.next_key()? {
7990                    match k {
7991                        GeneratedField::WriteLimits => {
7992                            if write_limits__.is_some() {
7993                                return Err(serde::de::Error::duplicate_field("writeLimits"));
7994                            }
7995                            write_limits__ = Some(
7996                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, _>>()?
7997                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
7998                            );
7999                        }
8000                    }
8001                }
8002                Ok(ListActiveWriteLimitResponse {
8003                    write_limits: write_limits__.unwrap_or_default(),
8004                })
8005            }
8006        }
8007        deserializer.deserialize_struct("hummock.ListActiveWriteLimitResponse", FIELDS, GeneratedVisitor)
8008    }
8009}
8010impl serde::Serialize for ListBranchedObjectRequest {
8011    #[allow(deprecated)]
8012    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8013    where
8014        S: serde::Serializer,
8015    {
8016        use serde::ser::SerializeStruct;
8017        let len = 0;
8018        let struct_ser = serializer.serialize_struct("hummock.ListBranchedObjectRequest", len)?;
8019        struct_ser.end()
8020    }
8021}
8022impl<'de> serde::Deserialize<'de> for ListBranchedObjectRequest {
8023    #[allow(deprecated)]
8024    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8025    where
8026        D: serde::Deserializer<'de>,
8027    {
8028        const FIELDS: &[&str] = &[
8029        ];
8030
8031        #[allow(clippy::enum_variant_names)]
8032        enum GeneratedField {
8033        }
8034        impl<'de> serde::Deserialize<'de> for GeneratedField {
8035            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8036            where
8037                D: serde::Deserializer<'de>,
8038            {
8039                struct GeneratedVisitor;
8040
8041                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8042                    type Value = GeneratedField;
8043
8044                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8045                        write!(formatter, "expected one of: {:?}", &FIELDS)
8046                    }
8047
8048                    #[allow(unused_variables)]
8049                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8050                    where
8051                        E: serde::de::Error,
8052                    {
8053                            Err(serde::de::Error::unknown_field(value, FIELDS))
8054                    }
8055                }
8056                deserializer.deserialize_identifier(GeneratedVisitor)
8057            }
8058        }
8059        struct GeneratedVisitor;
8060        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8061            type Value = ListBranchedObjectRequest;
8062
8063            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8064                formatter.write_str("struct hummock.ListBranchedObjectRequest")
8065            }
8066
8067            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListBranchedObjectRequest, V::Error>
8068                where
8069                    V: serde::de::MapAccess<'de>,
8070            {
8071                while map_.next_key::<GeneratedField>()?.is_some() {
8072                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
8073                }
8074                Ok(ListBranchedObjectRequest {
8075                })
8076            }
8077        }
8078        deserializer.deserialize_struct("hummock.ListBranchedObjectRequest", FIELDS, GeneratedVisitor)
8079    }
8080}
8081impl serde::Serialize for ListBranchedObjectResponse {
8082    #[allow(deprecated)]
8083    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8084    where
8085        S: serde::Serializer,
8086    {
8087        use serde::ser::SerializeStruct;
8088        let mut len = 0;
8089        if !self.branched_objects.is_empty() {
8090            len += 1;
8091        }
8092        let mut struct_ser = serializer.serialize_struct("hummock.ListBranchedObjectResponse", len)?;
8093        if !self.branched_objects.is_empty() {
8094            struct_ser.serialize_field("branchedObjects", &self.branched_objects)?;
8095        }
8096        struct_ser.end()
8097    }
8098}
8099impl<'de> serde::Deserialize<'de> for ListBranchedObjectResponse {
8100    #[allow(deprecated)]
8101    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8102    where
8103        D: serde::Deserializer<'de>,
8104    {
8105        const FIELDS: &[&str] = &[
8106            "branched_objects",
8107            "branchedObjects",
8108        ];
8109
8110        #[allow(clippy::enum_variant_names)]
8111        enum GeneratedField {
8112            BranchedObjects,
8113        }
8114        impl<'de> serde::Deserialize<'de> for GeneratedField {
8115            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8116            where
8117                D: serde::Deserializer<'de>,
8118            {
8119                struct GeneratedVisitor;
8120
8121                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8122                    type Value = GeneratedField;
8123
8124                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8125                        write!(formatter, "expected one of: {:?}", &FIELDS)
8126                    }
8127
8128                    #[allow(unused_variables)]
8129                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8130                    where
8131                        E: serde::de::Error,
8132                    {
8133                        match value {
8134                            "branchedObjects" | "branched_objects" => Ok(GeneratedField::BranchedObjects),
8135                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8136                        }
8137                    }
8138                }
8139                deserializer.deserialize_identifier(GeneratedVisitor)
8140            }
8141        }
8142        struct GeneratedVisitor;
8143        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8144            type Value = ListBranchedObjectResponse;
8145
8146            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8147                formatter.write_str("struct hummock.ListBranchedObjectResponse")
8148            }
8149
8150            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListBranchedObjectResponse, V::Error>
8151                where
8152                    V: serde::de::MapAccess<'de>,
8153            {
8154                let mut branched_objects__ = None;
8155                while let Some(k) = map_.next_key()? {
8156                    match k {
8157                        GeneratedField::BranchedObjects => {
8158                            if branched_objects__.is_some() {
8159                                return Err(serde::de::Error::duplicate_field("branchedObjects"));
8160                            }
8161                            branched_objects__ = Some(map_.next_value()?);
8162                        }
8163                    }
8164                }
8165                Ok(ListBranchedObjectResponse {
8166                    branched_objects: branched_objects__.unwrap_or_default(),
8167                })
8168            }
8169        }
8170        deserializer.deserialize_struct("hummock.ListBranchedObjectResponse", FIELDS, GeneratedVisitor)
8171    }
8172}
8173impl serde::Serialize for ListCompactTaskAssignmentRequest {
8174    #[allow(deprecated)]
8175    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8176    where
8177        S: serde::Serializer,
8178    {
8179        use serde::ser::SerializeStruct;
8180        let len = 0;
8181        let struct_ser = serializer.serialize_struct("hummock.ListCompactTaskAssignmentRequest", len)?;
8182        struct_ser.end()
8183    }
8184}
8185impl<'de> serde::Deserialize<'de> for ListCompactTaskAssignmentRequest {
8186    #[allow(deprecated)]
8187    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8188    where
8189        D: serde::Deserializer<'de>,
8190    {
8191        const FIELDS: &[&str] = &[
8192        ];
8193
8194        #[allow(clippy::enum_variant_names)]
8195        enum GeneratedField {
8196        }
8197        impl<'de> serde::Deserialize<'de> for GeneratedField {
8198            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8199            where
8200                D: serde::Deserializer<'de>,
8201            {
8202                struct GeneratedVisitor;
8203
8204                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8205                    type Value = GeneratedField;
8206
8207                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8208                        write!(formatter, "expected one of: {:?}", &FIELDS)
8209                    }
8210
8211                    #[allow(unused_variables)]
8212                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8213                    where
8214                        E: serde::de::Error,
8215                    {
8216                            Err(serde::de::Error::unknown_field(value, FIELDS))
8217                    }
8218                }
8219                deserializer.deserialize_identifier(GeneratedVisitor)
8220            }
8221        }
8222        struct GeneratedVisitor;
8223        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8224            type Value = ListCompactTaskAssignmentRequest;
8225
8226            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8227                formatter.write_str("struct hummock.ListCompactTaskAssignmentRequest")
8228            }
8229
8230            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListCompactTaskAssignmentRequest, V::Error>
8231                where
8232                    V: serde::de::MapAccess<'de>,
8233            {
8234                while map_.next_key::<GeneratedField>()?.is_some() {
8235                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
8236                }
8237                Ok(ListCompactTaskAssignmentRequest {
8238                })
8239            }
8240        }
8241        deserializer.deserialize_struct("hummock.ListCompactTaskAssignmentRequest", FIELDS, GeneratedVisitor)
8242    }
8243}
8244impl serde::Serialize for ListCompactTaskAssignmentResponse {
8245    #[allow(deprecated)]
8246    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8247    where
8248        S: serde::Serializer,
8249    {
8250        use serde::ser::SerializeStruct;
8251        let mut len = 0;
8252        if !self.task_assignment.is_empty() {
8253            len += 1;
8254        }
8255        let mut struct_ser = serializer.serialize_struct("hummock.ListCompactTaskAssignmentResponse", len)?;
8256        if !self.task_assignment.is_empty() {
8257            struct_ser.serialize_field("taskAssignment", &self.task_assignment)?;
8258        }
8259        struct_ser.end()
8260    }
8261}
8262impl<'de> serde::Deserialize<'de> for ListCompactTaskAssignmentResponse {
8263    #[allow(deprecated)]
8264    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8265    where
8266        D: serde::Deserializer<'de>,
8267    {
8268        const FIELDS: &[&str] = &[
8269            "task_assignment",
8270            "taskAssignment",
8271        ];
8272
8273        #[allow(clippy::enum_variant_names)]
8274        enum GeneratedField {
8275            TaskAssignment,
8276        }
8277        impl<'de> serde::Deserialize<'de> for GeneratedField {
8278            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8279            where
8280                D: serde::Deserializer<'de>,
8281            {
8282                struct GeneratedVisitor;
8283
8284                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8285                    type Value = GeneratedField;
8286
8287                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8288                        write!(formatter, "expected one of: {:?}", &FIELDS)
8289                    }
8290
8291                    #[allow(unused_variables)]
8292                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8293                    where
8294                        E: serde::de::Error,
8295                    {
8296                        match value {
8297                            "taskAssignment" | "task_assignment" => Ok(GeneratedField::TaskAssignment),
8298                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8299                        }
8300                    }
8301                }
8302                deserializer.deserialize_identifier(GeneratedVisitor)
8303            }
8304        }
8305        struct GeneratedVisitor;
8306        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8307            type Value = ListCompactTaskAssignmentResponse;
8308
8309            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8310                formatter.write_str("struct hummock.ListCompactTaskAssignmentResponse")
8311            }
8312
8313            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListCompactTaskAssignmentResponse, V::Error>
8314                where
8315                    V: serde::de::MapAccess<'de>,
8316            {
8317                let mut task_assignment__ = None;
8318                while let Some(k) = map_.next_key()? {
8319                    match k {
8320                        GeneratedField::TaskAssignment => {
8321                            if task_assignment__.is_some() {
8322                                return Err(serde::de::Error::duplicate_field("taskAssignment"));
8323                            }
8324                            task_assignment__ = Some(map_.next_value()?);
8325                        }
8326                    }
8327                }
8328                Ok(ListCompactTaskAssignmentResponse {
8329                    task_assignment: task_assignment__.unwrap_or_default(),
8330                })
8331            }
8332        }
8333        deserializer.deserialize_struct("hummock.ListCompactTaskAssignmentResponse", FIELDS, GeneratedVisitor)
8334    }
8335}
8336impl serde::Serialize for ListCompactTaskProgressRequest {
8337    #[allow(deprecated)]
8338    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8339    where
8340        S: serde::Serializer,
8341    {
8342        use serde::ser::SerializeStruct;
8343        let len = 0;
8344        let struct_ser = serializer.serialize_struct("hummock.ListCompactTaskProgressRequest", len)?;
8345        struct_ser.end()
8346    }
8347}
8348impl<'de> serde::Deserialize<'de> for ListCompactTaskProgressRequest {
8349    #[allow(deprecated)]
8350    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8351    where
8352        D: serde::Deserializer<'de>,
8353    {
8354        const FIELDS: &[&str] = &[
8355        ];
8356
8357        #[allow(clippy::enum_variant_names)]
8358        enum GeneratedField {
8359        }
8360        impl<'de> serde::Deserialize<'de> for GeneratedField {
8361            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8362            where
8363                D: serde::Deserializer<'de>,
8364            {
8365                struct GeneratedVisitor;
8366
8367                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8368                    type Value = GeneratedField;
8369
8370                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8371                        write!(formatter, "expected one of: {:?}", &FIELDS)
8372                    }
8373
8374                    #[allow(unused_variables)]
8375                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8376                    where
8377                        E: serde::de::Error,
8378                    {
8379                            Err(serde::de::Error::unknown_field(value, FIELDS))
8380                    }
8381                }
8382                deserializer.deserialize_identifier(GeneratedVisitor)
8383            }
8384        }
8385        struct GeneratedVisitor;
8386        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8387            type Value = ListCompactTaskProgressRequest;
8388
8389            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8390                formatter.write_str("struct hummock.ListCompactTaskProgressRequest")
8391            }
8392
8393            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListCompactTaskProgressRequest, V::Error>
8394                where
8395                    V: serde::de::MapAccess<'de>,
8396            {
8397                while map_.next_key::<GeneratedField>()?.is_some() {
8398                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
8399                }
8400                Ok(ListCompactTaskProgressRequest {
8401                })
8402            }
8403        }
8404        deserializer.deserialize_struct("hummock.ListCompactTaskProgressRequest", FIELDS, GeneratedVisitor)
8405    }
8406}
8407impl serde::Serialize for ListCompactTaskProgressResponse {
8408    #[allow(deprecated)]
8409    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8410    where
8411        S: serde::Serializer,
8412    {
8413        use serde::ser::SerializeStruct;
8414        let mut len = 0;
8415        if !self.task_progress.is_empty() {
8416            len += 1;
8417        }
8418        let mut struct_ser = serializer.serialize_struct("hummock.ListCompactTaskProgressResponse", len)?;
8419        if !self.task_progress.is_empty() {
8420            struct_ser.serialize_field("taskProgress", &self.task_progress)?;
8421        }
8422        struct_ser.end()
8423    }
8424}
8425impl<'de> serde::Deserialize<'de> for ListCompactTaskProgressResponse {
8426    #[allow(deprecated)]
8427    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8428    where
8429        D: serde::Deserializer<'de>,
8430    {
8431        const FIELDS: &[&str] = &[
8432            "task_progress",
8433            "taskProgress",
8434        ];
8435
8436        #[allow(clippy::enum_variant_names)]
8437        enum GeneratedField {
8438            TaskProgress,
8439        }
8440        impl<'de> serde::Deserialize<'de> for GeneratedField {
8441            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8442            where
8443                D: serde::Deserializer<'de>,
8444            {
8445                struct GeneratedVisitor;
8446
8447                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8448                    type Value = GeneratedField;
8449
8450                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8451                        write!(formatter, "expected one of: {:?}", &FIELDS)
8452                    }
8453
8454                    #[allow(unused_variables)]
8455                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8456                    where
8457                        E: serde::de::Error,
8458                    {
8459                        match value {
8460                            "taskProgress" | "task_progress" => Ok(GeneratedField::TaskProgress),
8461                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8462                        }
8463                    }
8464                }
8465                deserializer.deserialize_identifier(GeneratedVisitor)
8466            }
8467        }
8468        struct GeneratedVisitor;
8469        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8470            type Value = ListCompactTaskProgressResponse;
8471
8472            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8473                formatter.write_str("struct hummock.ListCompactTaskProgressResponse")
8474            }
8475
8476            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListCompactTaskProgressResponse, V::Error>
8477                where
8478                    V: serde::de::MapAccess<'de>,
8479            {
8480                let mut task_progress__ = None;
8481                while let Some(k) = map_.next_key()? {
8482                    match k {
8483                        GeneratedField::TaskProgress => {
8484                            if task_progress__.is_some() {
8485                                return Err(serde::de::Error::duplicate_field("taskProgress"));
8486                            }
8487                            task_progress__ = Some(map_.next_value()?);
8488                        }
8489                    }
8490                }
8491                Ok(ListCompactTaskProgressResponse {
8492                    task_progress: task_progress__.unwrap_or_default(),
8493                })
8494            }
8495        }
8496        deserializer.deserialize_struct("hummock.ListCompactTaskProgressResponse", FIELDS, GeneratedVisitor)
8497    }
8498}
8499impl serde::Serialize for ListHummockMetaConfigRequest {
8500    #[allow(deprecated)]
8501    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8502    where
8503        S: serde::Serializer,
8504    {
8505        use serde::ser::SerializeStruct;
8506        let len = 0;
8507        let struct_ser = serializer.serialize_struct("hummock.ListHummockMetaConfigRequest", len)?;
8508        struct_ser.end()
8509    }
8510}
8511impl<'de> serde::Deserialize<'de> for ListHummockMetaConfigRequest {
8512    #[allow(deprecated)]
8513    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8514    where
8515        D: serde::Deserializer<'de>,
8516    {
8517        const FIELDS: &[&str] = &[
8518        ];
8519
8520        #[allow(clippy::enum_variant_names)]
8521        enum GeneratedField {
8522        }
8523        impl<'de> serde::Deserialize<'de> for GeneratedField {
8524            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8525            where
8526                D: serde::Deserializer<'de>,
8527            {
8528                struct GeneratedVisitor;
8529
8530                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8531                    type Value = GeneratedField;
8532
8533                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8534                        write!(formatter, "expected one of: {:?}", &FIELDS)
8535                    }
8536
8537                    #[allow(unused_variables)]
8538                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8539                    where
8540                        E: serde::de::Error,
8541                    {
8542                            Err(serde::de::Error::unknown_field(value, FIELDS))
8543                    }
8544                }
8545                deserializer.deserialize_identifier(GeneratedVisitor)
8546            }
8547        }
8548        struct GeneratedVisitor;
8549        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8550            type Value = ListHummockMetaConfigRequest;
8551
8552            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8553                formatter.write_str("struct hummock.ListHummockMetaConfigRequest")
8554            }
8555
8556            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListHummockMetaConfigRequest, V::Error>
8557                where
8558                    V: serde::de::MapAccess<'de>,
8559            {
8560                while map_.next_key::<GeneratedField>()?.is_some() {
8561                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
8562                }
8563                Ok(ListHummockMetaConfigRequest {
8564                })
8565            }
8566        }
8567        deserializer.deserialize_struct("hummock.ListHummockMetaConfigRequest", FIELDS, GeneratedVisitor)
8568    }
8569}
8570impl serde::Serialize for ListHummockMetaConfigResponse {
8571    #[allow(deprecated)]
8572    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8573    where
8574        S: serde::Serializer,
8575    {
8576        use serde::ser::SerializeStruct;
8577        let mut len = 0;
8578        if !self.configs.is_empty() {
8579            len += 1;
8580        }
8581        let mut struct_ser = serializer.serialize_struct("hummock.ListHummockMetaConfigResponse", len)?;
8582        if !self.configs.is_empty() {
8583            struct_ser.serialize_field("configs", &self.configs)?;
8584        }
8585        struct_ser.end()
8586    }
8587}
8588impl<'de> serde::Deserialize<'de> for ListHummockMetaConfigResponse {
8589    #[allow(deprecated)]
8590    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8591    where
8592        D: serde::Deserializer<'de>,
8593    {
8594        const FIELDS: &[&str] = &[
8595            "configs",
8596        ];
8597
8598        #[allow(clippy::enum_variant_names)]
8599        enum GeneratedField {
8600            Configs,
8601        }
8602        impl<'de> serde::Deserialize<'de> for GeneratedField {
8603            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8604            where
8605                D: serde::Deserializer<'de>,
8606            {
8607                struct GeneratedVisitor;
8608
8609                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8610                    type Value = GeneratedField;
8611
8612                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8613                        write!(formatter, "expected one of: {:?}", &FIELDS)
8614                    }
8615
8616                    #[allow(unused_variables)]
8617                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8618                    where
8619                        E: serde::de::Error,
8620                    {
8621                        match value {
8622                            "configs" => Ok(GeneratedField::Configs),
8623                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8624                        }
8625                    }
8626                }
8627                deserializer.deserialize_identifier(GeneratedVisitor)
8628            }
8629        }
8630        struct GeneratedVisitor;
8631        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8632            type Value = ListHummockMetaConfigResponse;
8633
8634            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8635                formatter.write_str("struct hummock.ListHummockMetaConfigResponse")
8636            }
8637
8638            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListHummockMetaConfigResponse, V::Error>
8639                where
8640                    V: serde::de::MapAccess<'de>,
8641            {
8642                let mut configs__ = None;
8643                while let Some(k) = map_.next_key()? {
8644                    match k {
8645                        GeneratedField::Configs => {
8646                            if configs__.is_some() {
8647                                return Err(serde::de::Error::duplicate_field("configs"));
8648                            }
8649                            configs__ = Some(
8650                                map_.next_value::<std::collections::HashMap<_, _>>()?
8651                            );
8652                        }
8653                    }
8654                }
8655                Ok(ListHummockMetaConfigResponse {
8656                    configs: configs__.unwrap_or_default(),
8657                })
8658            }
8659        }
8660        deserializer.deserialize_struct("hummock.ListHummockMetaConfigResponse", FIELDS, GeneratedVisitor)
8661    }
8662}
8663impl serde::Serialize for ListVersionDeltasRequest {
8664    #[allow(deprecated)]
8665    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8666    where
8667        S: serde::Serializer,
8668    {
8669        use serde::ser::SerializeStruct;
8670        let mut len = 0;
8671        if self.start_id != 0 {
8672            len += 1;
8673        }
8674        if self.num_limit != 0 {
8675            len += 1;
8676        }
8677        if self.committed_epoch_limit != 0 {
8678            len += 1;
8679        }
8680        let mut struct_ser = serializer.serialize_struct("hummock.ListVersionDeltasRequest", len)?;
8681        if self.start_id != 0 {
8682            #[allow(clippy::needless_borrow)]
8683            #[allow(clippy::needless_borrows_for_generic_args)]
8684            struct_ser.serialize_field("startId", ToString::to_string(&self.start_id).as_str())?;
8685        }
8686        if self.num_limit != 0 {
8687            struct_ser.serialize_field("numLimit", &self.num_limit)?;
8688        }
8689        if self.committed_epoch_limit != 0 {
8690            #[allow(clippy::needless_borrow)]
8691            #[allow(clippy::needless_borrows_for_generic_args)]
8692            struct_ser.serialize_field("committedEpochLimit", ToString::to_string(&self.committed_epoch_limit).as_str())?;
8693        }
8694        struct_ser.end()
8695    }
8696}
8697impl<'de> serde::Deserialize<'de> for ListVersionDeltasRequest {
8698    #[allow(deprecated)]
8699    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8700    where
8701        D: serde::Deserializer<'de>,
8702    {
8703        const FIELDS: &[&str] = &[
8704            "start_id",
8705            "startId",
8706            "num_limit",
8707            "numLimit",
8708            "committed_epoch_limit",
8709            "committedEpochLimit",
8710        ];
8711
8712        #[allow(clippy::enum_variant_names)]
8713        enum GeneratedField {
8714            StartId,
8715            NumLimit,
8716            CommittedEpochLimit,
8717        }
8718        impl<'de> serde::Deserialize<'de> for GeneratedField {
8719            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8720            where
8721                D: serde::Deserializer<'de>,
8722            {
8723                struct GeneratedVisitor;
8724
8725                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8726                    type Value = GeneratedField;
8727
8728                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8729                        write!(formatter, "expected one of: {:?}", &FIELDS)
8730                    }
8731
8732                    #[allow(unused_variables)]
8733                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8734                    where
8735                        E: serde::de::Error,
8736                    {
8737                        match value {
8738                            "startId" | "start_id" => Ok(GeneratedField::StartId),
8739                            "numLimit" | "num_limit" => Ok(GeneratedField::NumLimit),
8740                            "committedEpochLimit" | "committed_epoch_limit" => Ok(GeneratedField::CommittedEpochLimit),
8741                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8742                        }
8743                    }
8744                }
8745                deserializer.deserialize_identifier(GeneratedVisitor)
8746            }
8747        }
8748        struct GeneratedVisitor;
8749        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8750            type Value = ListVersionDeltasRequest;
8751
8752            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8753                formatter.write_str("struct hummock.ListVersionDeltasRequest")
8754            }
8755
8756            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListVersionDeltasRequest, V::Error>
8757                where
8758                    V: serde::de::MapAccess<'de>,
8759            {
8760                let mut start_id__ = None;
8761                let mut num_limit__ = None;
8762                let mut committed_epoch_limit__ = None;
8763                while let Some(k) = map_.next_key()? {
8764                    match k {
8765                        GeneratedField::StartId => {
8766                            if start_id__.is_some() {
8767                                return Err(serde::de::Error::duplicate_field("startId"));
8768                            }
8769                            start_id__ = 
8770                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
8771                            ;
8772                        }
8773                        GeneratedField::NumLimit => {
8774                            if num_limit__.is_some() {
8775                                return Err(serde::de::Error::duplicate_field("numLimit"));
8776                            }
8777                            num_limit__ = 
8778                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
8779                            ;
8780                        }
8781                        GeneratedField::CommittedEpochLimit => {
8782                            if committed_epoch_limit__.is_some() {
8783                                return Err(serde::de::Error::duplicate_field("committedEpochLimit"));
8784                            }
8785                            committed_epoch_limit__ = 
8786                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
8787                            ;
8788                        }
8789                    }
8790                }
8791                Ok(ListVersionDeltasRequest {
8792                    start_id: start_id__.unwrap_or_default(),
8793                    num_limit: num_limit__.unwrap_or_default(),
8794                    committed_epoch_limit: committed_epoch_limit__.unwrap_or_default(),
8795                })
8796            }
8797        }
8798        deserializer.deserialize_struct("hummock.ListVersionDeltasRequest", FIELDS, GeneratedVisitor)
8799    }
8800}
8801impl serde::Serialize for ListVersionDeltasResponse {
8802    #[allow(deprecated)]
8803    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8804    where
8805        S: serde::Serializer,
8806    {
8807        use serde::ser::SerializeStruct;
8808        let mut len = 0;
8809        if self.version_deltas.is_some() {
8810            len += 1;
8811        }
8812        let mut struct_ser = serializer.serialize_struct("hummock.ListVersionDeltasResponse", len)?;
8813        if let Some(v) = self.version_deltas.as_ref() {
8814            struct_ser.serialize_field("versionDeltas", v)?;
8815        }
8816        struct_ser.end()
8817    }
8818}
8819impl<'de> serde::Deserialize<'de> for ListVersionDeltasResponse {
8820    #[allow(deprecated)]
8821    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8822    where
8823        D: serde::Deserializer<'de>,
8824    {
8825        const FIELDS: &[&str] = &[
8826            "version_deltas",
8827            "versionDeltas",
8828        ];
8829
8830        #[allow(clippy::enum_variant_names)]
8831        enum GeneratedField {
8832            VersionDeltas,
8833        }
8834        impl<'de> serde::Deserialize<'de> for GeneratedField {
8835            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8836            where
8837                D: serde::Deserializer<'de>,
8838            {
8839                struct GeneratedVisitor;
8840
8841                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8842                    type Value = GeneratedField;
8843
8844                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8845                        write!(formatter, "expected one of: {:?}", &FIELDS)
8846                    }
8847
8848                    #[allow(unused_variables)]
8849                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8850                    where
8851                        E: serde::de::Error,
8852                    {
8853                        match value {
8854                            "versionDeltas" | "version_deltas" => Ok(GeneratedField::VersionDeltas),
8855                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8856                        }
8857                    }
8858                }
8859                deserializer.deserialize_identifier(GeneratedVisitor)
8860            }
8861        }
8862        struct GeneratedVisitor;
8863        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8864            type Value = ListVersionDeltasResponse;
8865
8866            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8867                formatter.write_str("struct hummock.ListVersionDeltasResponse")
8868            }
8869
8870            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListVersionDeltasResponse, V::Error>
8871                where
8872                    V: serde::de::MapAccess<'de>,
8873            {
8874                let mut version_deltas__ = None;
8875                while let Some(k) = map_.next_key()? {
8876                    match k {
8877                        GeneratedField::VersionDeltas => {
8878                            if version_deltas__.is_some() {
8879                                return Err(serde::de::Error::duplicate_field("versionDeltas"));
8880                            }
8881                            version_deltas__ = map_.next_value()?;
8882                        }
8883                    }
8884                }
8885                Ok(ListVersionDeltasResponse {
8886                    version_deltas: version_deltas__,
8887                })
8888            }
8889        }
8890        deserializer.deserialize_struct("hummock.ListVersionDeltasResponse", FIELDS, GeneratedVisitor)
8891    }
8892}
8893impl serde::Serialize for MergeCompactionGroupRequest {
8894    #[allow(deprecated)]
8895    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8896    where
8897        S: serde::Serializer,
8898    {
8899        use serde::ser::SerializeStruct;
8900        let mut len = 0;
8901        if self.left_group_id != 0 {
8902            len += 1;
8903        }
8904        if self.right_group_id != 0 {
8905            len += 1;
8906        }
8907        let mut struct_ser = serializer.serialize_struct("hummock.MergeCompactionGroupRequest", len)?;
8908        if self.left_group_id != 0 {
8909            #[allow(clippy::needless_borrow)]
8910            #[allow(clippy::needless_borrows_for_generic_args)]
8911            struct_ser.serialize_field("leftGroupId", ToString::to_string(&self.left_group_id).as_str())?;
8912        }
8913        if self.right_group_id != 0 {
8914            #[allow(clippy::needless_borrow)]
8915            #[allow(clippy::needless_borrows_for_generic_args)]
8916            struct_ser.serialize_field("rightGroupId", ToString::to_string(&self.right_group_id).as_str())?;
8917        }
8918        struct_ser.end()
8919    }
8920}
8921impl<'de> serde::Deserialize<'de> for MergeCompactionGroupRequest {
8922    #[allow(deprecated)]
8923    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8924    where
8925        D: serde::Deserializer<'de>,
8926    {
8927        const FIELDS: &[&str] = &[
8928            "left_group_id",
8929            "leftGroupId",
8930            "right_group_id",
8931            "rightGroupId",
8932        ];
8933
8934        #[allow(clippy::enum_variant_names)]
8935        enum GeneratedField {
8936            LeftGroupId,
8937            RightGroupId,
8938        }
8939        impl<'de> serde::Deserialize<'de> for GeneratedField {
8940            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8941            where
8942                D: serde::Deserializer<'de>,
8943            {
8944                struct GeneratedVisitor;
8945
8946                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8947                    type Value = GeneratedField;
8948
8949                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8950                        write!(formatter, "expected one of: {:?}", &FIELDS)
8951                    }
8952
8953                    #[allow(unused_variables)]
8954                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8955                    where
8956                        E: serde::de::Error,
8957                    {
8958                        match value {
8959                            "leftGroupId" | "left_group_id" => Ok(GeneratedField::LeftGroupId),
8960                            "rightGroupId" | "right_group_id" => Ok(GeneratedField::RightGroupId),
8961                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8962                        }
8963                    }
8964                }
8965                deserializer.deserialize_identifier(GeneratedVisitor)
8966            }
8967        }
8968        struct GeneratedVisitor;
8969        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8970            type Value = MergeCompactionGroupRequest;
8971
8972            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8973                formatter.write_str("struct hummock.MergeCompactionGroupRequest")
8974            }
8975
8976            fn visit_map<V>(self, mut map_: V) -> std::result::Result<MergeCompactionGroupRequest, V::Error>
8977                where
8978                    V: serde::de::MapAccess<'de>,
8979            {
8980                let mut left_group_id__ = None;
8981                let mut right_group_id__ = None;
8982                while let Some(k) = map_.next_key()? {
8983                    match k {
8984                        GeneratedField::LeftGroupId => {
8985                            if left_group_id__.is_some() {
8986                                return Err(serde::de::Error::duplicate_field("leftGroupId"));
8987                            }
8988                            left_group_id__ = 
8989                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
8990                            ;
8991                        }
8992                        GeneratedField::RightGroupId => {
8993                            if right_group_id__.is_some() {
8994                                return Err(serde::de::Error::duplicate_field("rightGroupId"));
8995                            }
8996                            right_group_id__ = 
8997                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
8998                            ;
8999                        }
9000                    }
9001                }
9002                Ok(MergeCompactionGroupRequest {
9003                    left_group_id: left_group_id__.unwrap_or_default(),
9004                    right_group_id: right_group_id__.unwrap_or_default(),
9005                })
9006            }
9007        }
9008        deserializer.deserialize_struct("hummock.MergeCompactionGroupRequest", FIELDS, GeneratedVisitor)
9009    }
9010}
9011impl serde::Serialize for MergeCompactionGroupResponse {
9012    #[allow(deprecated)]
9013    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9014    where
9015        S: serde::Serializer,
9016    {
9017        use serde::ser::SerializeStruct;
9018        let len = 0;
9019        let struct_ser = serializer.serialize_struct("hummock.MergeCompactionGroupResponse", len)?;
9020        struct_ser.end()
9021    }
9022}
9023impl<'de> serde::Deserialize<'de> for MergeCompactionGroupResponse {
9024    #[allow(deprecated)]
9025    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9026    where
9027        D: serde::Deserializer<'de>,
9028    {
9029        const FIELDS: &[&str] = &[
9030        ];
9031
9032        #[allow(clippy::enum_variant_names)]
9033        enum GeneratedField {
9034        }
9035        impl<'de> serde::Deserialize<'de> for GeneratedField {
9036            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9037            where
9038                D: serde::Deserializer<'de>,
9039            {
9040                struct GeneratedVisitor;
9041
9042                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9043                    type Value = GeneratedField;
9044
9045                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9046                        write!(formatter, "expected one of: {:?}", &FIELDS)
9047                    }
9048
9049                    #[allow(unused_variables)]
9050                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9051                    where
9052                        E: serde::de::Error,
9053                    {
9054                            Err(serde::de::Error::unknown_field(value, FIELDS))
9055                    }
9056                }
9057                deserializer.deserialize_identifier(GeneratedVisitor)
9058            }
9059        }
9060        struct GeneratedVisitor;
9061        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9062            type Value = MergeCompactionGroupResponse;
9063
9064            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9065                formatter.write_str("struct hummock.MergeCompactionGroupResponse")
9066            }
9067
9068            fn visit_map<V>(self, mut map_: V) -> std::result::Result<MergeCompactionGroupResponse, V::Error>
9069                where
9070                    V: serde::de::MapAccess<'de>,
9071            {
9072                while map_.next_key::<GeneratedField>()?.is_some() {
9073                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
9074                }
9075                Ok(MergeCompactionGroupResponse {
9076                })
9077            }
9078        }
9079        deserializer.deserialize_struct("hummock.MergeCompactionGroupResponse", FIELDS, GeneratedVisitor)
9080    }
9081}
9082impl serde::Serialize for NewL0SubLevel {
9083    #[allow(deprecated)]
9084    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9085    where
9086        S: serde::Serializer,
9087    {
9088        use serde::ser::SerializeStruct;
9089        let mut len = 0;
9090        if !self.inserted_table_infos.is_empty() {
9091            len += 1;
9092        }
9093        let mut struct_ser = serializer.serialize_struct("hummock.NewL0SubLevel", len)?;
9094        if !self.inserted_table_infos.is_empty() {
9095            struct_ser.serialize_field("insertedTableInfos", &self.inserted_table_infos)?;
9096        }
9097        struct_ser.end()
9098    }
9099}
9100impl<'de> serde::Deserialize<'de> for NewL0SubLevel {
9101    #[allow(deprecated)]
9102    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9103    where
9104        D: serde::Deserializer<'de>,
9105    {
9106        const FIELDS: &[&str] = &[
9107            "inserted_table_infos",
9108            "insertedTableInfos",
9109        ];
9110
9111        #[allow(clippy::enum_variant_names)]
9112        enum GeneratedField {
9113            InsertedTableInfos,
9114        }
9115        impl<'de> serde::Deserialize<'de> for GeneratedField {
9116            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9117            where
9118                D: serde::Deserializer<'de>,
9119            {
9120                struct GeneratedVisitor;
9121
9122                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9123                    type Value = GeneratedField;
9124
9125                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9126                        write!(formatter, "expected one of: {:?}", &FIELDS)
9127                    }
9128
9129                    #[allow(unused_variables)]
9130                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9131                    where
9132                        E: serde::de::Error,
9133                    {
9134                        match value {
9135                            "insertedTableInfos" | "inserted_table_infos" => Ok(GeneratedField::InsertedTableInfos),
9136                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9137                        }
9138                    }
9139                }
9140                deserializer.deserialize_identifier(GeneratedVisitor)
9141            }
9142        }
9143        struct GeneratedVisitor;
9144        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9145            type Value = NewL0SubLevel;
9146
9147            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9148                formatter.write_str("struct hummock.NewL0SubLevel")
9149            }
9150
9151            fn visit_map<V>(self, mut map_: V) -> std::result::Result<NewL0SubLevel, V::Error>
9152                where
9153                    V: serde::de::MapAccess<'de>,
9154            {
9155                let mut inserted_table_infos__ = None;
9156                while let Some(k) = map_.next_key()? {
9157                    match k {
9158                        GeneratedField::InsertedTableInfos => {
9159                            if inserted_table_infos__.is_some() {
9160                                return Err(serde::de::Error::duplicate_field("insertedTableInfos"));
9161                            }
9162                            inserted_table_infos__ = Some(map_.next_value()?);
9163                        }
9164                    }
9165                }
9166                Ok(NewL0SubLevel {
9167                    inserted_table_infos: inserted_table_infos__.unwrap_or_default(),
9168                })
9169            }
9170        }
9171        deserializer.deserialize_struct("hummock.NewL0SubLevel", FIELDS, GeneratedVisitor)
9172    }
9173}
9174impl serde::Serialize for OverlappingLevel {
9175    #[allow(deprecated)]
9176    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9177    where
9178        S: serde::Serializer,
9179    {
9180        use serde::ser::SerializeStruct;
9181        let mut len = 0;
9182        if !self.sub_levels.is_empty() {
9183            len += 1;
9184        }
9185        if self.total_file_size != 0 {
9186            len += 1;
9187        }
9188        if self.uncompressed_file_size != 0 {
9189            len += 1;
9190        }
9191        let mut struct_ser = serializer.serialize_struct("hummock.OverlappingLevel", len)?;
9192        if !self.sub_levels.is_empty() {
9193            struct_ser.serialize_field("subLevels", &self.sub_levels)?;
9194        }
9195        if self.total_file_size != 0 {
9196            #[allow(clippy::needless_borrow)]
9197            #[allow(clippy::needless_borrows_for_generic_args)]
9198            struct_ser.serialize_field("totalFileSize", ToString::to_string(&self.total_file_size).as_str())?;
9199        }
9200        if self.uncompressed_file_size != 0 {
9201            #[allow(clippy::needless_borrow)]
9202            #[allow(clippy::needless_borrows_for_generic_args)]
9203            struct_ser.serialize_field("uncompressedFileSize", ToString::to_string(&self.uncompressed_file_size).as_str())?;
9204        }
9205        struct_ser.end()
9206    }
9207}
9208impl<'de> serde::Deserialize<'de> for OverlappingLevel {
9209    #[allow(deprecated)]
9210    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9211    where
9212        D: serde::Deserializer<'de>,
9213    {
9214        const FIELDS: &[&str] = &[
9215            "sub_levels",
9216            "subLevels",
9217            "total_file_size",
9218            "totalFileSize",
9219            "uncompressed_file_size",
9220            "uncompressedFileSize",
9221        ];
9222
9223        #[allow(clippy::enum_variant_names)]
9224        enum GeneratedField {
9225            SubLevels,
9226            TotalFileSize,
9227            UncompressedFileSize,
9228        }
9229        impl<'de> serde::Deserialize<'de> for GeneratedField {
9230            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9231            where
9232                D: serde::Deserializer<'de>,
9233            {
9234                struct GeneratedVisitor;
9235
9236                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9237                    type Value = GeneratedField;
9238
9239                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9240                        write!(formatter, "expected one of: {:?}", &FIELDS)
9241                    }
9242
9243                    #[allow(unused_variables)]
9244                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9245                    where
9246                        E: serde::de::Error,
9247                    {
9248                        match value {
9249                            "subLevels" | "sub_levels" => Ok(GeneratedField::SubLevels),
9250                            "totalFileSize" | "total_file_size" => Ok(GeneratedField::TotalFileSize),
9251                            "uncompressedFileSize" | "uncompressed_file_size" => Ok(GeneratedField::UncompressedFileSize),
9252                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9253                        }
9254                    }
9255                }
9256                deserializer.deserialize_identifier(GeneratedVisitor)
9257            }
9258        }
9259        struct GeneratedVisitor;
9260        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9261            type Value = OverlappingLevel;
9262
9263            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9264                formatter.write_str("struct hummock.OverlappingLevel")
9265            }
9266
9267            fn visit_map<V>(self, mut map_: V) -> std::result::Result<OverlappingLevel, V::Error>
9268                where
9269                    V: serde::de::MapAccess<'de>,
9270            {
9271                let mut sub_levels__ = None;
9272                let mut total_file_size__ = None;
9273                let mut uncompressed_file_size__ = None;
9274                while let Some(k) = map_.next_key()? {
9275                    match k {
9276                        GeneratedField::SubLevels => {
9277                            if sub_levels__.is_some() {
9278                                return Err(serde::de::Error::duplicate_field("subLevels"));
9279                            }
9280                            sub_levels__ = Some(map_.next_value()?);
9281                        }
9282                        GeneratedField::TotalFileSize => {
9283                            if total_file_size__.is_some() {
9284                                return Err(serde::de::Error::duplicate_field("totalFileSize"));
9285                            }
9286                            total_file_size__ = 
9287                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9288                            ;
9289                        }
9290                        GeneratedField::UncompressedFileSize => {
9291                            if uncompressed_file_size__.is_some() {
9292                                return Err(serde::de::Error::duplicate_field("uncompressedFileSize"));
9293                            }
9294                            uncompressed_file_size__ = 
9295                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9296                            ;
9297                        }
9298                    }
9299                }
9300                Ok(OverlappingLevel {
9301                    sub_levels: sub_levels__.unwrap_or_default(),
9302                    total_file_size: total_file_size__.unwrap_or_default(),
9303                    uncompressed_file_size: uncompressed_file_size__.unwrap_or_default(),
9304                })
9305            }
9306        }
9307        deserializer.deserialize_struct("hummock.OverlappingLevel", FIELDS, GeneratedVisitor)
9308    }
9309}
9310impl serde::Serialize for PinVersionRequest {
9311    #[allow(deprecated)]
9312    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9313    where
9314        S: serde::Serializer,
9315    {
9316        use serde::ser::SerializeStruct;
9317        let mut len = 0;
9318        if self.context_id != 0 {
9319            len += 1;
9320        }
9321        let mut struct_ser = serializer.serialize_struct("hummock.PinVersionRequest", len)?;
9322        if self.context_id != 0 {
9323            struct_ser.serialize_field("contextId", &self.context_id)?;
9324        }
9325        struct_ser.end()
9326    }
9327}
9328impl<'de> serde::Deserialize<'de> for PinVersionRequest {
9329    #[allow(deprecated)]
9330    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9331    where
9332        D: serde::Deserializer<'de>,
9333    {
9334        const FIELDS: &[&str] = &[
9335            "context_id",
9336            "contextId",
9337        ];
9338
9339        #[allow(clippy::enum_variant_names)]
9340        enum GeneratedField {
9341            ContextId,
9342        }
9343        impl<'de> serde::Deserialize<'de> for GeneratedField {
9344            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9345            where
9346                D: serde::Deserializer<'de>,
9347            {
9348                struct GeneratedVisitor;
9349
9350                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9351                    type Value = GeneratedField;
9352
9353                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9354                        write!(formatter, "expected one of: {:?}", &FIELDS)
9355                    }
9356
9357                    #[allow(unused_variables)]
9358                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9359                    where
9360                        E: serde::de::Error,
9361                    {
9362                        match value {
9363                            "contextId" | "context_id" => Ok(GeneratedField::ContextId),
9364                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9365                        }
9366                    }
9367                }
9368                deserializer.deserialize_identifier(GeneratedVisitor)
9369            }
9370        }
9371        struct GeneratedVisitor;
9372        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9373            type Value = PinVersionRequest;
9374
9375            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9376                formatter.write_str("struct hummock.PinVersionRequest")
9377            }
9378
9379            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PinVersionRequest, V::Error>
9380                where
9381                    V: serde::de::MapAccess<'de>,
9382            {
9383                let mut context_id__ = None;
9384                while let Some(k) = map_.next_key()? {
9385                    match k {
9386                        GeneratedField::ContextId => {
9387                            if context_id__.is_some() {
9388                                return Err(serde::de::Error::duplicate_field("contextId"));
9389                            }
9390                            context_id__ = 
9391                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9392                            ;
9393                        }
9394                    }
9395                }
9396                Ok(PinVersionRequest {
9397                    context_id: context_id__.unwrap_or_default(),
9398                })
9399            }
9400        }
9401        deserializer.deserialize_struct("hummock.PinVersionRequest", FIELDS, GeneratedVisitor)
9402    }
9403}
9404impl serde::Serialize for PinVersionResponse {
9405    #[allow(deprecated)]
9406    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9407    where
9408        S: serde::Serializer,
9409    {
9410        use serde::ser::SerializeStruct;
9411        let mut len = 0;
9412        if self.pinned_version.is_some() {
9413            len += 1;
9414        }
9415        let mut struct_ser = serializer.serialize_struct("hummock.PinVersionResponse", len)?;
9416        if let Some(v) = self.pinned_version.as_ref() {
9417            struct_ser.serialize_field("pinnedVersion", v)?;
9418        }
9419        struct_ser.end()
9420    }
9421}
9422impl<'de> serde::Deserialize<'de> for PinVersionResponse {
9423    #[allow(deprecated)]
9424    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9425    where
9426        D: serde::Deserializer<'de>,
9427    {
9428        const FIELDS: &[&str] = &[
9429            "pinned_version",
9430            "pinnedVersion",
9431        ];
9432
9433        #[allow(clippy::enum_variant_names)]
9434        enum GeneratedField {
9435            PinnedVersion,
9436        }
9437        impl<'de> serde::Deserialize<'de> for GeneratedField {
9438            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9439            where
9440                D: serde::Deserializer<'de>,
9441            {
9442                struct GeneratedVisitor;
9443
9444                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9445                    type Value = GeneratedField;
9446
9447                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9448                        write!(formatter, "expected one of: {:?}", &FIELDS)
9449                    }
9450
9451                    #[allow(unused_variables)]
9452                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9453                    where
9454                        E: serde::de::Error,
9455                    {
9456                        match value {
9457                            "pinnedVersion" | "pinned_version" => Ok(GeneratedField::PinnedVersion),
9458                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9459                        }
9460                    }
9461                }
9462                deserializer.deserialize_identifier(GeneratedVisitor)
9463            }
9464        }
9465        struct GeneratedVisitor;
9466        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9467            type Value = PinVersionResponse;
9468
9469            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9470                formatter.write_str("struct hummock.PinVersionResponse")
9471            }
9472
9473            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PinVersionResponse, V::Error>
9474                where
9475                    V: serde::de::MapAccess<'de>,
9476            {
9477                let mut pinned_version__ = None;
9478                while let Some(k) = map_.next_key()? {
9479                    match k {
9480                        GeneratedField::PinnedVersion => {
9481                            if pinned_version__.is_some() {
9482                                return Err(serde::de::Error::duplicate_field("pinnedVersion"));
9483                            }
9484                            pinned_version__ = map_.next_value()?;
9485                        }
9486                    }
9487                }
9488                Ok(PinVersionResponse {
9489                    pinned_version: pinned_version__,
9490                })
9491            }
9492        }
9493        deserializer.deserialize_struct("hummock.PinVersionResponse", FIELDS, GeneratedVisitor)
9494    }
9495}
9496impl serde::Serialize for PinnedVersionsSummary {
9497    #[allow(deprecated)]
9498    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9499    where
9500        S: serde::Serializer,
9501    {
9502        use serde::ser::SerializeStruct;
9503        let mut len = 0;
9504        if !self.pinned_versions.is_empty() {
9505            len += 1;
9506        }
9507        if !self.workers.is_empty() {
9508            len += 1;
9509        }
9510        let mut struct_ser = serializer.serialize_struct("hummock.PinnedVersionsSummary", len)?;
9511        if !self.pinned_versions.is_empty() {
9512            struct_ser.serialize_field("pinnedVersions", &self.pinned_versions)?;
9513        }
9514        if !self.workers.is_empty() {
9515            struct_ser.serialize_field("workers", &self.workers)?;
9516        }
9517        struct_ser.end()
9518    }
9519}
9520impl<'de> serde::Deserialize<'de> for PinnedVersionsSummary {
9521    #[allow(deprecated)]
9522    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9523    where
9524        D: serde::Deserializer<'de>,
9525    {
9526        const FIELDS: &[&str] = &[
9527            "pinned_versions",
9528            "pinnedVersions",
9529            "workers",
9530        ];
9531
9532        #[allow(clippy::enum_variant_names)]
9533        enum GeneratedField {
9534            PinnedVersions,
9535            Workers,
9536        }
9537        impl<'de> serde::Deserialize<'de> for GeneratedField {
9538            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9539            where
9540                D: serde::Deserializer<'de>,
9541            {
9542                struct GeneratedVisitor;
9543
9544                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9545                    type Value = GeneratedField;
9546
9547                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9548                        write!(formatter, "expected one of: {:?}", &FIELDS)
9549                    }
9550
9551                    #[allow(unused_variables)]
9552                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9553                    where
9554                        E: serde::de::Error,
9555                    {
9556                        match value {
9557                            "pinnedVersions" | "pinned_versions" => Ok(GeneratedField::PinnedVersions),
9558                            "workers" => Ok(GeneratedField::Workers),
9559                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9560                        }
9561                    }
9562                }
9563                deserializer.deserialize_identifier(GeneratedVisitor)
9564            }
9565        }
9566        struct GeneratedVisitor;
9567        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9568            type Value = PinnedVersionsSummary;
9569
9570            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9571                formatter.write_str("struct hummock.PinnedVersionsSummary")
9572            }
9573
9574            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PinnedVersionsSummary, V::Error>
9575                where
9576                    V: serde::de::MapAccess<'de>,
9577            {
9578                let mut pinned_versions__ = None;
9579                let mut workers__ = None;
9580                while let Some(k) = map_.next_key()? {
9581                    match k {
9582                        GeneratedField::PinnedVersions => {
9583                            if pinned_versions__.is_some() {
9584                                return Err(serde::de::Error::duplicate_field("pinnedVersions"));
9585                            }
9586                            pinned_versions__ = Some(map_.next_value()?);
9587                        }
9588                        GeneratedField::Workers => {
9589                            if workers__.is_some() {
9590                                return Err(serde::de::Error::duplicate_field("workers"));
9591                            }
9592                            workers__ = Some(
9593                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
9594                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
9595                            );
9596                        }
9597                    }
9598                }
9599                Ok(PinnedVersionsSummary {
9600                    pinned_versions: pinned_versions__.unwrap_or_default(),
9601                    workers: workers__.unwrap_or_default(),
9602                })
9603            }
9604        }
9605        deserializer.deserialize_struct("hummock.PinnedVersionsSummary", FIELDS, GeneratedVisitor)
9606    }
9607}
9608impl serde::Serialize for ReplayVersionDeltaRequest {
9609    #[allow(deprecated)]
9610    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9611    where
9612        S: serde::Serializer,
9613    {
9614        use serde::ser::SerializeStruct;
9615        let mut len = 0;
9616        if self.version_delta.is_some() {
9617            len += 1;
9618        }
9619        let mut struct_ser = serializer.serialize_struct("hummock.ReplayVersionDeltaRequest", len)?;
9620        if let Some(v) = self.version_delta.as_ref() {
9621            struct_ser.serialize_field("versionDelta", v)?;
9622        }
9623        struct_ser.end()
9624    }
9625}
9626impl<'de> serde::Deserialize<'de> for ReplayVersionDeltaRequest {
9627    #[allow(deprecated)]
9628    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9629    where
9630        D: serde::Deserializer<'de>,
9631    {
9632        const FIELDS: &[&str] = &[
9633            "version_delta",
9634            "versionDelta",
9635        ];
9636
9637        #[allow(clippy::enum_variant_names)]
9638        enum GeneratedField {
9639            VersionDelta,
9640        }
9641        impl<'de> serde::Deserialize<'de> for GeneratedField {
9642            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9643            where
9644                D: serde::Deserializer<'de>,
9645            {
9646                struct GeneratedVisitor;
9647
9648                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9649                    type Value = GeneratedField;
9650
9651                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9652                        write!(formatter, "expected one of: {:?}", &FIELDS)
9653                    }
9654
9655                    #[allow(unused_variables)]
9656                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9657                    where
9658                        E: serde::de::Error,
9659                    {
9660                        match value {
9661                            "versionDelta" | "version_delta" => Ok(GeneratedField::VersionDelta),
9662                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9663                        }
9664                    }
9665                }
9666                deserializer.deserialize_identifier(GeneratedVisitor)
9667            }
9668        }
9669        struct GeneratedVisitor;
9670        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9671            type Value = ReplayVersionDeltaRequest;
9672
9673            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9674                formatter.write_str("struct hummock.ReplayVersionDeltaRequest")
9675            }
9676
9677            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReplayVersionDeltaRequest, V::Error>
9678                where
9679                    V: serde::de::MapAccess<'de>,
9680            {
9681                let mut version_delta__ = None;
9682                while let Some(k) = map_.next_key()? {
9683                    match k {
9684                        GeneratedField::VersionDelta => {
9685                            if version_delta__.is_some() {
9686                                return Err(serde::de::Error::duplicate_field("versionDelta"));
9687                            }
9688                            version_delta__ = map_.next_value()?;
9689                        }
9690                    }
9691                }
9692                Ok(ReplayVersionDeltaRequest {
9693                    version_delta: version_delta__,
9694                })
9695            }
9696        }
9697        deserializer.deserialize_struct("hummock.ReplayVersionDeltaRequest", FIELDS, GeneratedVisitor)
9698    }
9699}
9700impl serde::Serialize for ReplayVersionDeltaResponse {
9701    #[allow(deprecated)]
9702    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9703    where
9704        S: serde::Serializer,
9705    {
9706        use serde::ser::SerializeStruct;
9707        let mut len = 0;
9708        if self.version.is_some() {
9709            len += 1;
9710        }
9711        if !self.modified_compaction_groups.is_empty() {
9712            len += 1;
9713        }
9714        let mut struct_ser = serializer.serialize_struct("hummock.ReplayVersionDeltaResponse", len)?;
9715        if let Some(v) = self.version.as_ref() {
9716            struct_ser.serialize_field("version", v)?;
9717        }
9718        if !self.modified_compaction_groups.is_empty() {
9719            struct_ser.serialize_field("modifiedCompactionGroups", &self.modified_compaction_groups.iter().map(ToString::to_string).collect::<Vec<_>>())?;
9720        }
9721        struct_ser.end()
9722    }
9723}
9724impl<'de> serde::Deserialize<'de> for ReplayVersionDeltaResponse {
9725    #[allow(deprecated)]
9726    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9727    where
9728        D: serde::Deserializer<'de>,
9729    {
9730        const FIELDS: &[&str] = &[
9731            "version",
9732            "modified_compaction_groups",
9733            "modifiedCompactionGroups",
9734        ];
9735
9736        #[allow(clippy::enum_variant_names)]
9737        enum GeneratedField {
9738            Version,
9739            ModifiedCompactionGroups,
9740        }
9741        impl<'de> serde::Deserialize<'de> for GeneratedField {
9742            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9743            where
9744                D: serde::Deserializer<'de>,
9745            {
9746                struct GeneratedVisitor;
9747
9748                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9749                    type Value = GeneratedField;
9750
9751                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9752                        write!(formatter, "expected one of: {:?}", &FIELDS)
9753                    }
9754
9755                    #[allow(unused_variables)]
9756                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9757                    where
9758                        E: serde::de::Error,
9759                    {
9760                        match value {
9761                            "version" => Ok(GeneratedField::Version),
9762                            "modifiedCompactionGroups" | "modified_compaction_groups" => Ok(GeneratedField::ModifiedCompactionGroups),
9763                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9764                        }
9765                    }
9766                }
9767                deserializer.deserialize_identifier(GeneratedVisitor)
9768            }
9769        }
9770        struct GeneratedVisitor;
9771        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9772            type Value = ReplayVersionDeltaResponse;
9773
9774            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9775                formatter.write_str("struct hummock.ReplayVersionDeltaResponse")
9776            }
9777
9778            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReplayVersionDeltaResponse, V::Error>
9779                where
9780                    V: serde::de::MapAccess<'de>,
9781            {
9782                let mut version__ = None;
9783                let mut modified_compaction_groups__ = None;
9784                while let Some(k) = map_.next_key()? {
9785                    match k {
9786                        GeneratedField::Version => {
9787                            if version__.is_some() {
9788                                return Err(serde::de::Error::duplicate_field("version"));
9789                            }
9790                            version__ = map_.next_value()?;
9791                        }
9792                        GeneratedField::ModifiedCompactionGroups => {
9793                            if modified_compaction_groups__.is_some() {
9794                                return Err(serde::de::Error::duplicate_field("modifiedCompactionGroups"));
9795                            }
9796                            modified_compaction_groups__ = 
9797                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
9798                                    .into_iter().map(|x| x.0).collect())
9799                            ;
9800                        }
9801                    }
9802                }
9803                Ok(ReplayVersionDeltaResponse {
9804                    version: version__,
9805                    modified_compaction_groups: modified_compaction_groups__.unwrap_or_default(),
9806                })
9807            }
9808        }
9809        deserializer.deserialize_struct("hummock.ReplayVersionDeltaResponse", FIELDS, GeneratedVisitor)
9810    }
9811}
9812impl serde::Serialize for ReportCompactionTaskRequest {
9813    #[allow(deprecated)]
9814    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9815    where
9816        S: serde::Serializer,
9817    {
9818        use serde::ser::SerializeStruct;
9819        let mut len = 0;
9820        if self.event.is_some() {
9821            len += 1;
9822        }
9823        let mut struct_ser = serializer.serialize_struct("hummock.ReportCompactionTaskRequest", len)?;
9824        if let Some(v) = self.event.as_ref() {
9825            match v {
9826                report_compaction_task_request::Event::ReportTask(v) => {
9827                    struct_ser.serialize_field("reportTask", v)?;
9828                }
9829                report_compaction_task_request::Event::HeartBeat(v) => {
9830                    struct_ser.serialize_field("heartBeat", v)?;
9831                }
9832            }
9833        }
9834        struct_ser.end()
9835    }
9836}
9837impl<'de> serde::Deserialize<'de> for ReportCompactionTaskRequest {
9838    #[allow(deprecated)]
9839    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9840    where
9841        D: serde::Deserializer<'de>,
9842    {
9843        const FIELDS: &[&str] = &[
9844            "report_task",
9845            "reportTask",
9846            "heart_beat",
9847            "heartBeat",
9848        ];
9849
9850        #[allow(clippy::enum_variant_names)]
9851        enum GeneratedField {
9852            ReportTask,
9853            HeartBeat,
9854        }
9855        impl<'de> serde::Deserialize<'de> for GeneratedField {
9856            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9857            where
9858                D: serde::Deserializer<'de>,
9859            {
9860                struct GeneratedVisitor;
9861
9862                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9863                    type Value = GeneratedField;
9864
9865                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9866                        write!(formatter, "expected one of: {:?}", &FIELDS)
9867                    }
9868
9869                    #[allow(unused_variables)]
9870                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9871                    where
9872                        E: serde::de::Error,
9873                    {
9874                        match value {
9875                            "reportTask" | "report_task" => Ok(GeneratedField::ReportTask),
9876                            "heartBeat" | "heart_beat" => Ok(GeneratedField::HeartBeat),
9877                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9878                        }
9879                    }
9880                }
9881                deserializer.deserialize_identifier(GeneratedVisitor)
9882            }
9883        }
9884        struct GeneratedVisitor;
9885        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9886            type Value = ReportCompactionTaskRequest;
9887
9888            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9889                formatter.write_str("struct hummock.ReportCompactionTaskRequest")
9890            }
9891
9892            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReportCompactionTaskRequest, V::Error>
9893                where
9894                    V: serde::de::MapAccess<'de>,
9895            {
9896                let mut event__ = None;
9897                while let Some(k) = map_.next_key()? {
9898                    match k {
9899                        GeneratedField::ReportTask => {
9900                            if event__.is_some() {
9901                                return Err(serde::de::Error::duplicate_field("reportTask"));
9902                            }
9903                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(report_compaction_task_request::Event::ReportTask)
9904;
9905                        }
9906                        GeneratedField::HeartBeat => {
9907                            if event__.is_some() {
9908                                return Err(serde::de::Error::duplicate_field("heartBeat"));
9909                            }
9910                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(report_compaction_task_request::Event::HeartBeat)
9911;
9912                        }
9913                    }
9914                }
9915                Ok(ReportCompactionTaskRequest {
9916                    event: event__,
9917                })
9918            }
9919        }
9920        deserializer.deserialize_struct("hummock.ReportCompactionTaskRequest", FIELDS, GeneratedVisitor)
9921    }
9922}
9923impl serde::Serialize for report_compaction_task_request::HeartBeat {
9924    #[allow(deprecated)]
9925    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9926    where
9927        S: serde::Serializer,
9928    {
9929        use serde::ser::SerializeStruct;
9930        let mut len = 0;
9931        if !self.progress.is_empty() {
9932            len += 1;
9933        }
9934        let mut struct_ser = serializer.serialize_struct("hummock.ReportCompactionTaskRequest.HeartBeat", len)?;
9935        if !self.progress.is_empty() {
9936            struct_ser.serialize_field("progress", &self.progress)?;
9937        }
9938        struct_ser.end()
9939    }
9940}
9941impl<'de> serde::Deserialize<'de> for report_compaction_task_request::HeartBeat {
9942    #[allow(deprecated)]
9943    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9944    where
9945        D: serde::Deserializer<'de>,
9946    {
9947        const FIELDS: &[&str] = &[
9948            "progress",
9949        ];
9950
9951        #[allow(clippy::enum_variant_names)]
9952        enum GeneratedField {
9953            Progress,
9954        }
9955        impl<'de> serde::Deserialize<'de> for GeneratedField {
9956            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9957            where
9958                D: serde::Deserializer<'de>,
9959            {
9960                struct GeneratedVisitor;
9961
9962                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9963                    type Value = GeneratedField;
9964
9965                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9966                        write!(formatter, "expected one of: {:?}", &FIELDS)
9967                    }
9968
9969                    #[allow(unused_variables)]
9970                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9971                    where
9972                        E: serde::de::Error,
9973                    {
9974                        match value {
9975                            "progress" => Ok(GeneratedField::Progress),
9976                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9977                        }
9978                    }
9979                }
9980                deserializer.deserialize_identifier(GeneratedVisitor)
9981            }
9982        }
9983        struct GeneratedVisitor;
9984        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9985            type Value = report_compaction_task_request::HeartBeat;
9986
9987            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9988                formatter.write_str("struct hummock.ReportCompactionTaskRequest.HeartBeat")
9989            }
9990
9991            fn visit_map<V>(self, mut map_: V) -> std::result::Result<report_compaction_task_request::HeartBeat, V::Error>
9992                where
9993                    V: serde::de::MapAccess<'de>,
9994            {
9995                let mut progress__ = None;
9996                while let Some(k) = map_.next_key()? {
9997                    match k {
9998                        GeneratedField::Progress => {
9999                            if progress__.is_some() {
10000                                return Err(serde::de::Error::duplicate_field("progress"));
10001                            }
10002                            progress__ = Some(map_.next_value()?);
10003                        }
10004                    }
10005                }
10006                Ok(report_compaction_task_request::HeartBeat {
10007                    progress: progress__.unwrap_or_default(),
10008                })
10009            }
10010        }
10011        deserializer.deserialize_struct("hummock.ReportCompactionTaskRequest.HeartBeat", FIELDS, GeneratedVisitor)
10012    }
10013}
10014impl serde::Serialize for report_compaction_task_request::ReportTask {
10015    #[allow(deprecated)]
10016    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10017    where
10018        S: serde::Serializer,
10019    {
10020        use serde::ser::SerializeStruct;
10021        let mut len = 0;
10022        if self.compact_task.is_some() {
10023            len += 1;
10024        }
10025        if !self.table_stats_change.is_empty() {
10026            len += 1;
10027        }
10028        if !self.object_timestamps.is_empty() {
10029            len += 1;
10030        }
10031        let mut struct_ser = serializer.serialize_struct("hummock.ReportCompactionTaskRequest.ReportTask", len)?;
10032        if let Some(v) = self.compact_task.as_ref() {
10033            struct_ser.serialize_field("compactTask", v)?;
10034        }
10035        if !self.table_stats_change.is_empty() {
10036            struct_ser.serialize_field("tableStatsChange", &self.table_stats_change)?;
10037        }
10038        if !self.object_timestamps.is_empty() {
10039            let v: std::collections::HashMap<_, _> = self.object_timestamps.iter()
10040                .map(|(k, v)| (k, v.to_string())).collect();
10041            struct_ser.serialize_field("objectTimestamps", &v)?;
10042        }
10043        struct_ser.end()
10044    }
10045}
10046impl<'de> serde::Deserialize<'de> for report_compaction_task_request::ReportTask {
10047    #[allow(deprecated)]
10048    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10049    where
10050        D: serde::Deserializer<'de>,
10051    {
10052        const FIELDS: &[&str] = &[
10053            "compact_task",
10054            "compactTask",
10055            "table_stats_change",
10056            "tableStatsChange",
10057            "object_timestamps",
10058            "objectTimestamps",
10059        ];
10060
10061        #[allow(clippy::enum_variant_names)]
10062        enum GeneratedField {
10063            CompactTask,
10064            TableStatsChange,
10065            ObjectTimestamps,
10066        }
10067        impl<'de> serde::Deserialize<'de> for GeneratedField {
10068            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10069            where
10070                D: serde::Deserializer<'de>,
10071            {
10072                struct GeneratedVisitor;
10073
10074                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10075                    type Value = GeneratedField;
10076
10077                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10078                        write!(formatter, "expected one of: {:?}", &FIELDS)
10079                    }
10080
10081                    #[allow(unused_variables)]
10082                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10083                    where
10084                        E: serde::de::Error,
10085                    {
10086                        match value {
10087                            "compactTask" | "compact_task" => Ok(GeneratedField::CompactTask),
10088                            "tableStatsChange" | "table_stats_change" => Ok(GeneratedField::TableStatsChange),
10089                            "objectTimestamps" | "object_timestamps" => Ok(GeneratedField::ObjectTimestamps),
10090                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10091                        }
10092                    }
10093                }
10094                deserializer.deserialize_identifier(GeneratedVisitor)
10095            }
10096        }
10097        struct GeneratedVisitor;
10098        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10099            type Value = report_compaction_task_request::ReportTask;
10100
10101            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10102                formatter.write_str("struct hummock.ReportCompactionTaskRequest.ReportTask")
10103            }
10104
10105            fn visit_map<V>(self, mut map_: V) -> std::result::Result<report_compaction_task_request::ReportTask, V::Error>
10106                where
10107                    V: serde::de::MapAccess<'de>,
10108            {
10109                let mut compact_task__ = None;
10110                let mut table_stats_change__ = None;
10111                let mut object_timestamps__ = None;
10112                while let Some(k) = map_.next_key()? {
10113                    match k {
10114                        GeneratedField::CompactTask => {
10115                            if compact_task__.is_some() {
10116                                return Err(serde::de::Error::duplicate_field("compactTask"));
10117                            }
10118                            compact_task__ = map_.next_value()?;
10119                        }
10120                        GeneratedField::TableStatsChange => {
10121                            if table_stats_change__.is_some() {
10122                                return Err(serde::de::Error::duplicate_field("tableStatsChange"));
10123                            }
10124                            table_stats_change__ = Some(
10125                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
10126                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
10127                            );
10128                        }
10129                        GeneratedField::ObjectTimestamps => {
10130                            if object_timestamps__.is_some() {
10131                                return Err(serde::de::Error::duplicate_field("objectTimestamps"));
10132                            }
10133                            object_timestamps__ = Some(
10134                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, ::pbjson::private::NumberDeserialize<u64>>>()?
10135                                    .into_iter().map(|(k,v)| (k.0, v.0)).collect()
10136                            );
10137                        }
10138                    }
10139                }
10140                Ok(report_compaction_task_request::ReportTask {
10141                    compact_task: compact_task__,
10142                    table_stats_change: table_stats_change__.unwrap_or_default(),
10143                    object_timestamps: object_timestamps__.unwrap_or_default(),
10144                })
10145            }
10146        }
10147        deserializer.deserialize_struct("hummock.ReportCompactionTaskRequest.ReportTask", FIELDS, GeneratedVisitor)
10148    }
10149}
10150impl serde::Serialize for ReportCompactionTaskResponse {
10151    #[allow(deprecated)]
10152    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10153    where
10154        S: serde::Serializer,
10155    {
10156        use serde::ser::SerializeStruct;
10157        let mut len = 0;
10158        if self.status.is_some() {
10159            len += 1;
10160        }
10161        let mut struct_ser = serializer.serialize_struct("hummock.ReportCompactionTaskResponse", len)?;
10162        if let Some(v) = self.status.as_ref() {
10163            struct_ser.serialize_field("status", v)?;
10164        }
10165        struct_ser.end()
10166    }
10167}
10168impl<'de> serde::Deserialize<'de> for ReportCompactionTaskResponse {
10169    #[allow(deprecated)]
10170    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10171    where
10172        D: serde::Deserializer<'de>,
10173    {
10174        const FIELDS: &[&str] = &[
10175            "status",
10176        ];
10177
10178        #[allow(clippy::enum_variant_names)]
10179        enum GeneratedField {
10180            Status,
10181        }
10182        impl<'de> serde::Deserialize<'de> for GeneratedField {
10183            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10184            where
10185                D: serde::Deserializer<'de>,
10186            {
10187                struct GeneratedVisitor;
10188
10189                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10190                    type Value = GeneratedField;
10191
10192                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10193                        write!(formatter, "expected one of: {:?}", &FIELDS)
10194                    }
10195
10196                    #[allow(unused_variables)]
10197                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10198                    where
10199                        E: serde::de::Error,
10200                    {
10201                        match value {
10202                            "status" => Ok(GeneratedField::Status),
10203                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10204                        }
10205                    }
10206                }
10207                deserializer.deserialize_identifier(GeneratedVisitor)
10208            }
10209        }
10210        struct GeneratedVisitor;
10211        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10212            type Value = ReportCompactionTaskResponse;
10213
10214            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10215                formatter.write_str("struct hummock.ReportCompactionTaskResponse")
10216            }
10217
10218            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReportCompactionTaskResponse, V::Error>
10219                where
10220                    V: serde::de::MapAccess<'de>,
10221            {
10222                let mut status__ = None;
10223                while let Some(k) = map_.next_key()? {
10224                    match k {
10225                        GeneratedField::Status => {
10226                            if status__.is_some() {
10227                                return Err(serde::de::Error::duplicate_field("status"));
10228                            }
10229                            status__ = map_.next_value()?;
10230                        }
10231                    }
10232                }
10233                Ok(ReportCompactionTaskResponse {
10234                    status: status__,
10235                })
10236            }
10237        }
10238        deserializer.deserialize_struct("hummock.ReportCompactionTaskResponse", FIELDS, GeneratedVisitor)
10239    }
10240}
10241impl serde::Serialize for RiseCtlGetCheckpointVersionRequest {
10242    #[allow(deprecated)]
10243    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10244    where
10245        S: serde::Serializer,
10246    {
10247        use serde::ser::SerializeStruct;
10248        let len = 0;
10249        let struct_ser = serializer.serialize_struct("hummock.RiseCtlGetCheckpointVersionRequest", len)?;
10250        struct_ser.end()
10251    }
10252}
10253impl<'de> serde::Deserialize<'de> for RiseCtlGetCheckpointVersionRequest {
10254    #[allow(deprecated)]
10255    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10256    where
10257        D: serde::Deserializer<'de>,
10258    {
10259        const FIELDS: &[&str] = &[
10260        ];
10261
10262        #[allow(clippy::enum_variant_names)]
10263        enum GeneratedField {
10264        }
10265        impl<'de> serde::Deserialize<'de> for GeneratedField {
10266            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10267            where
10268                D: serde::Deserializer<'de>,
10269            {
10270                struct GeneratedVisitor;
10271
10272                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10273                    type Value = GeneratedField;
10274
10275                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10276                        write!(formatter, "expected one of: {:?}", &FIELDS)
10277                    }
10278
10279                    #[allow(unused_variables)]
10280                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10281                    where
10282                        E: serde::de::Error,
10283                    {
10284                            Err(serde::de::Error::unknown_field(value, FIELDS))
10285                    }
10286                }
10287                deserializer.deserialize_identifier(GeneratedVisitor)
10288            }
10289        }
10290        struct GeneratedVisitor;
10291        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10292            type Value = RiseCtlGetCheckpointVersionRequest;
10293
10294            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10295                formatter.write_str("struct hummock.RiseCtlGetCheckpointVersionRequest")
10296            }
10297
10298            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlGetCheckpointVersionRequest, V::Error>
10299                where
10300                    V: serde::de::MapAccess<'de>,
10301            {
10302                while map_.next_key::<GeneratedField>()?.is_some() {
10303                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
10304                }
10305                Ok(RiseCtlGetCheckpointVersionRequest {
10306                })
10307            }
10308        }
10309        deserializer.deserialize_struct("hummock.RiseCtlGetCheckpointVersionRequest", FIELDS, GeneratedVisitor)
10310    }
10311}
10312impl serde::Serialize for RiseCtlGetCheckpointVersionResponse {
10313    #[allow(deprecated)]
10314    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10315    where
10316        S: serde::Serializer,
10317    {
10318        use serde::ser::SerializeStruct;
10319        let mut len = 0;
10320        if self.checkpoint_version.is_some() {
10321            len += 1;
10322        }
10323        let mut struct_ser = serializer.serialize_struct("hummock.RiseCtlGetCheckpointVersionResponse", len)?;
10324        if let Some(v) = self.checkpoint_version.as_ref() {
10325            struct_ser.serialize_field("checkpointVersion", v)?;
10326        }
10327        struct_ser.end()
10328    }
10329}
10330impl<'de> serde::Deserialize<'de> for RiseCtlGetCheckpointVersionResponse {
10331    #[allow(deprecated)]
10332    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10333    where
10334        D: serde::Deserializer<'de>,
10335    {
10336        const FIELDS: &[&str] = &[
10337            "checkpoint_version",
10338            "checkpointVersion",
10339        ];
10340
10341        #[allow(clippy::enum_variant_names)]
10342        enum GeneratedField {
10343            CheckpointVersion,
10344        }
10345        impl<'de> serde::Deserialize<'de> for GeneratedField {
10346            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10347            where
10348                D: serde::Deserializer<'de>,
10349            {
10350                struct GeneratedVisitor;
10351
10352                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10353                    type Value = GeneratedField;
10354
10355                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10356                        write!(formatter, "expected one of: {:?}", &FIELDS)
10357                    }
10358
10359                    #[allow(unused_variables)]
10360                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10361                    where
10362                        E: serde::de::Error,
10363                    {
10364                        match value {
10365                            "checkpointVersion" | "checkpoint_version" => Ok(GeneratedField::CheckpointVersion),
10366                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10367                        }
10368                    }
10369                }
10370                deserializer.deserialize_identifier(GeneratedVisitor)
10371            }
10372        }
10373        struct GeneratedVisitor;
10374        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10375            type Value = RiseCtlGetCheckpointVersionResponse;
10376
10377            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10378                formatter.write_str("struct hummock.RiseCtlGetCheckpointVersionResponse")
10379            }
10380
10381            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlGetCheckpointVersionResponse, V::Error>
10382                where
10383                    V: serde::de::MapAccess<'de>,
10384            {
10385                let mut checkpoint_version__ = None;
10386                while let Some(k) = map_.next_key()? {
10387                    match k {
10388                        GeneratedField::CheckpointVersion => {
10389                            if checkpoint_version__.is_some() {
10390                                return Err(serde::de::Error::duplicate_field("checkpointVersion"));
10391                            }
10392                            checkpoint_version__ = map_.next_value()?;
10393                        }
10394                    }
10395                }
10396                Ok(RiseCtlGetCheckpointVersionResponse {
10397                    checkpoint_version: checkpoint_version__,
10398                })
10399            }
10400        }
10401        deserializer.deserialize_struct("hummock.RiseCtlGetCheckpointVersionResponse", FIELDS, GeneratedVisitor)
10402    }
10403}
10404impl serde::Serialize for RiseCtlGetPinnedVersionsSummaryRequest {
10405    #[allow(deprecated)]
10406    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10407    where
10408        S: serde::Serializer,
10409    {
10410        use serde::ser::SerializeStruct;
10411        let len = 0;
10412        let struct_ser = serializer.serialize_struct("hummock.RiseCtlGetPinnedVersionsSummaryRequest", len)?;
10413        struct_ser.end()
10414    }
10415}
10416impl<'de> serde::Deserialize<'de> for RiseCtlGetPinnedVersionsSummaryRequest {
10417    #[allow(deprecated)]
10418    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10419    where
10420        D: serde::Deserializer<'de>,
10421    {
10422        const FIELDS: &[&str] = &[
10423        ];
10424
10425        #[allow(clippy::enum_variant_names)]
10426        enum GeneratedField {
10427        }
10428        impl<'de> serde::Deserialize<'de> for GeneratedField {
10429            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10430            where
10431                D: serde::Deserializer<'de>,
10432            {
10433                struct GeneratedVisitor;
10434
10435                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10436                    type Value = GeneratedField;
10437
10438                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10439                        write!(formatter, "expected one of: {:?}", &FIELDS)
10440                    }
10441
10442                    #[allow(unused_variables)]
10443                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10444                    where
10445                        E: serde::de::Error,
10446                    {
10447                            Err(serde::de::Error::unknown_field(value, FIELDS))
10448                    }
10449                }
10450                deserializer.deserialize_identifier(GeneratedVisitor)
10451            }
10452        }
10453        struct GeneratedVisitor;
10454        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10455            type Value = RiseCtlGetPinnedVersionsSummaryRequest;
10456
10457            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10458                formatter.write_str("struct hummock.RiseCtlGetPinnedVersionsSummaryRequest")
10459            }
10460
10461            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlGetPinnedVersionsSummaryRequest, V::Error>
10462                where
10463                    V: serde::de::MapAccess<'de>,
10464            {
10465                while map_.next_key::<GeneratedField>()?.is_some() {
10466                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
10467                }
10468                Ok(RiseCtlGetPinnedVersionsSummaryRequest {
10469                })
10470            }
10471        }
10472        deserializer.deserialize_struct("hummock.RiseCtlGetPinnedVersionsSummaryRequest", FIELDS, GeneratedVisitor)
10473    }
10474}
10475impl serde::Serialize for RiseCtlGetPinnedVersionsSummaryResponse {
10476    #[allow(deprecated)]
10477    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10478    where
10479        S: serde::Serializer,
10480    {
10481        use serde::ser::SerializeStruct;
10482        let mut len = 0;
10483        if self.summary.is_some() {
10484            len += 1;
10485        }
10486        let mut struct_ser = serializer.serialize_struct("hummock.RiseCtlGetPinnedVersionsSummaryResponse", len)?;
10487        if let Some(v) = self.summary.as_ref() {
10488            struct_ser.serialize_field("summary", v)?;
10489        }
10490        struct_ser.end()
10491    }
10492}
10493impl<'de> serde::Deserialize<'de> for RiseCtlGetPinnedVersionsSummaryResponse {
10494    #[allow(deprecated)]
10495    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10496    where
10497        D: serde::Deserializer<'de>,
10498    {
10499        const FIELDS: &[&str] = &[
10500            "summary",
10501        ];
10502
10503        #[allow(clippy::enum_variant_names)]
10504        enum GeneratedField {
10505            Summary,
10506        }
10507        impl<'de> serde::Deserialize<'de> for GeneratedField {
10508            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10509            where
10510                D: serde::Deserializer<'de>,
10511            {
10512                struct GeneratedVisitor;
10513
10514                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10515                    type Value = GeneratedField;
10516
10517                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10518                        write!(formatter, "expected one of: {:?}", &FIELDS)
10519                    }
10520
10521                    #[allow(unused_variables)]
10522                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10523                    where
10524                        E: serde::de::Error,
10525                    {
10526                        match value {
10527                            "summary" => Ok(GeneratedField::Summary),
10528                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10529                        }
10530                    }
10531                }
10532                deserializer.deserialize_identifier(GeneratedVisitor)
10533            }
10534        }
10535        struct GeneratedVisitor;
10536        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10537            type Value = RiseCtlGetPinnedVersionsSummaryResponse;
10538
10539            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10540                formatter.write_str("struct hummock.RiseCtlGetPinnedVersionsSummaryResponse")
10541            }
10542
10543            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlGetPinnedVersionsSummaryResponse, V::Error>
10544                where
10545                    V: serde::de::MapAccess<'de>,
10546            {
10547                let mut summary__ = None;
10548                while let Some(k) = map_.next_key()? {
10549                    match k {
10550                        GeneratedField::Summary => {
10551                            if summary__.is_some() {
10552                                return Err(serde::de::Error::duplicate_field("summary"));
10553                            }
10554                            summary__ = map_.next_value()?;
10555                        }
10556                    }
10557                }
10558                Ok(RiseCtlGetPinnedVersionsSummaryResponse {
10559                    summary: summary__,
10560                })
10561            }
10562        }
10563        deserializer.deserialize_struct("hummock.RiseCtlGetPinnedVersionsSummaryResponse", FIELDS, GeneratedVisitor)
10564    }
10565}
10566impl serde::Serialize for RiseCtlListCompactionGroupRequest {
10567    #[allow(deprecated)]
10568    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10569    where
10570        S: serde::Serializer,
10571    {
10572        use serde::ser::SerializeStruct;
10573        let len = 0;
10574        let struct_ser = serializer.serialize_struct("hummock.RiseCtlListCompactionGroupRequest", len)?;
10575        struct_ser.end()
10576    }
10577}
10578impl<'de> serde::Deserialize<'de> for RiseCtlListCompactionGroupRequest {
10579    #[allow(deprecated)]
10580    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10581    where
10582        D: serde::Deserializer<'de>,
10583    {
10584        const FIELDS: &[&str] = &[
10585        ];
10586
10587        #[allow(clippy::enum_variant_names)]
10588        enum GeneratedField {
10589        }
10590        impl<'de> serde::Deserialize<'de> for GeneratedField {
10591            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10592            where
10593                D: serde::Deserializer<'de>,
10594            {
10595                struct GeneratedVisitor;
10596
10597                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10598                    type Value = GeneratedField;
10599
10600                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10601                        write!(formatter, "expected one of: {:?}", &FIELDS)
10602                    }
10603
10604                    #[allow(unused_variables)]
10605                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10606                    where
10607                        E: serde::de::Error,
10608                    {
10609                            Err(serde::de::Error::unknown_field(value, FIELDS))
10610                    }
10611                }
10612                deserializer.deserialize_identifier(GeneratedVisitor)
10613            }
10614        }
10615        struct GeneratedVisitor;
10616        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10617            type Value = RiseCtlListCompactionGroupRequest;
10618
10619            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10620                formatter.write_str("struct hummock.RiseCtlListCompactionGroupRequest")
10621            }
10622
10623            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlListCompactionGroupRequest, V::Error>
10624                where
10625                    V: serde::de::MapAccess<'de>,
10626            {
10627                while map_.next_key::<GeneratedField>()?.is_some() {
10628                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
10629                }
10630                Ok(RiseCtlListCompactionGroupRequest {
10631                })
10632            }
10633        }
10634        deserializer.deserialize_struct("hummock.RiseCtlListCompactionGroupRequest", FIELDS, GeneratedVisitor)
10635    }
10636}
10637impl serde::Serialize for RiseCtlListCompactionGroupResponse {
10638    #[allow(deprecated)]
10639    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10640    where
10641        S: serde::Serializer,
10642    {
10643        use serde::ser::SerializeStruct;
10644        let mut len = 0;
10645        if self.status.is_some() {
10646            len += 1;
10647        }
10648        if !self.compaction_groups.is_empty() {
10649            len += 1;
10650        }
10651        let mut struct_ser = serializer.serialize_struct("hummock.RiseCtlListCompactionGroupResponse", len)?;
10652        if let Some(v) = self.status.as_ref() {
10653            struct_ser.serialize_field("status", v)?;
10654        }
10655        if !self.compaction_groups.is_empty() {
10656            struct_ser.serialize_field("compactionGroups", &self.compaction_groups)?;
10657        }
10658        struct_ser.end()
10659    }
10660}
10661impl<'de> serde::Deserialize<'de> for RiseCtlListCompactionGroupResponse {
10662    #[allow(deprecated)]
10663    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10664    where
10665        D: serde::Deserializer<'de>,
10666    {
10667        const FIELDS: &[&str] = &[
10668            "status",
10669            "compaction_groups",
10670            "compactionGroups",
10671        ];
10672
10673        #[allow(clippy::enum_variant_names)]
10674        enum GeneratedField {
10675            Status,
10676            CompactionGroups,
10677        }
10678        impl<'de> serde::Deserialize<'de> for GeneratedField {
10679            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10680            where
10681                D: serde::Deserializer<'de>,
10682            {
10683                struct GeneratedVisitor;
10684
10685                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10686                    type Value = GeneratedField;
10687
10688                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10689                        write!(formatter, "expected one of: {:?}", &FIELDS)
10690                    }
10691
10692                    #[allow(unused_variables)]
10693                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10694                    where
10695                        E: serde::de::Error,
10696                    {
10697                        match value {
10698                            "status" => Ok(GeneratedField::Status),
10699                            "compactionGroups" | "compaction_groups" => Ok(GeneratedField::CompactionGroups),
10700                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10701                        }
10702                    }
10703                }
10704                deserializer.deserialize_identifier(GeneratedVisitor)
10705            }
10706        }
10707        struct GeneratedVisitor;
10708        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10709            type Value = RiseCtlListCompactionGroupResponse;
10710
10711            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10712                formatter.write_str("struct hummock.RiseCtlListCompactionGroupResponse")
10713            }
10714
10715            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlListCompactionGroupResponse, V::Error>
10716                where
10717                    V: serde::de::MapAccess<'de>,
10718            {
10719                let mut status__ = None;
10720                let mut compaction_groups__ = None;
10721                while let Some(k) = map_.next_key()? {
10722                    match k {
10723                        GeneratedField::Status => {
10724                            if status__.is_some() {
10725                                return Err(serde::de::Error::duplicate_field("status"));
10726                            }
10727                            status__ = map_.next_value()?;
10728                        }
10729                        GeneratedField::CompactionGroups => {
10730                            if compaction_groups__.is_some() {
10731                                return Err(serde::de::Error::duplicate_field("compactionGroups"));
10732                            }
10733                            compaction_groups__ = Some(map_.next_value()?);
10734                        }
10735                    }
10736                }
10737                Ok(RiseCtlListCompactionGroupResponse {
10738                    status: status__,
10739                    compaction_groups: compaction_groups__.unwrap_or_default(),
10740                })
10741            }
10742        }
10743        deserializer.deserialize_struct("hummock.RiseCtlListCompactionGroupResponse", FIELDS, GeneratedVisitor)
10744    }
10745}
10746impl serde::Serialize for RiseCtlListCompactionStatusRequest {
10747    #[allow(deprecated)]
10748    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10749    where
10750        S: serde::Serializer,
10751    {
10752        use serde::ser::SerializeStruct;
10753        let len = 0;
10754        let struct_ser = serializer.serialize_struct("hummock.RiseCtlListCompactionStatusRequest", len)?;
10755        struct_ser.end()
10756    }
10757}
10758impl<'de> serde::Deserialize<'de> for RiseCtlListCompactionStatusRequest {
10759    #[allow(deprecated)]
10760    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10761    where
10762        D: serde::Deserializer<'de>,
10763    {
10764        const FIELDS: &[&str] = &[
10765        ];
10766
10767        #[allow(clippy::enum_variant_names)]
10768        enum GeneratedField {
10769        }
10770        impl<'de> serde::Deserialize<'de> for GeneratedField {
10771            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10772            where
10773                D: serde::Deserializer<'de>,
10774            {
10775                struct GeneratedVisitor;
10776
10777                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10778                    type Value = GeneratedField;
10779
10780                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10781                        write!(formatter, "expected one of: {:?}", &FIELDS)
10782                    }
10783
10784                    #[allow(unused_variables)]
10785                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10786                    where
10787                        E: serde::de::Error,
10788                    {
10789                            Err(serde::de::Error::unknown_field(value, FIELDS))
10790                    }
10791                }
10792                deserializer.deserialize_identifier(GeneratedVisitor)
10793            }
10794        }
10795        struct GeneratedVisitor;
10796        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10797            type Value = RiseCtlListCompactionStatusRequest;
10798
10799            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10800                formatter.write_str("struct hummock.RiseCtlListCompactionStatusRequest")
10801            }
10802
10803            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlListCompactionStatusRequest, V::Error>
10804                where
10805                    V: serde::de::MapAccess<'de>,
10806            {
10807                while map_.next_key::<GeneratedField>()?.is_some() {
10808                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
10809                }
10810                Ok(RiseCtlListCompactionStatusRequest {
10811                })
10812            }
10813        }
10814        deserializer.deserialize_struct("hummock.RiseCtlListCompactionStatusRequest", FIELDS, GeneratedVisitor)
10815    }
10816}
10817impl serde::Serialize for RiseCtlListCompactionStatusResponse {
10818    #[allow(deprecated)]
10819    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10820    where
10821        S: serde::Serializer,
10822    {
10823        use serde::ser::SerializeStruct;
10824        let mut len = 0;
10825        if !self.compaction_statuses.is_empty() {
10826            len += 1;
10827        }
10828        if !self.task_assignment.is_empty() {
10829            len += 1;
10830        }
10831        if !self.task_progress.is_empty() {
10832            len += 1;
10833        }
10834        let mut struct_ser = serializer.serialize_struct("hummock.RiseCtlListCompactionStatusResponse", len)?;
10835        if !self.compaction_statuses.is_empty() {
10836            struct_ser.serialize_field("compactionStatuses", &self.compaction_statuses)?;
10837        }
10838        if !self.task_assignment.is_empty() {
10839            struct_ser.serialize_field("taskAssignment", &self.task_assignment)?;
10840        }
10841        if !self.task_progress.is_empty() {
10842            struct_ser.serialize_field("taskProgress", &self.task_progress)?;
10843        }
10844        struct_ser.end()
10845    }
10846}
10847impl<'de> serde::Deserialize<'de> for RiseCtlListCompactionStatusResponse {
10848    #[allow(deprecated)]
10849    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10850    where
10851        D: serde::Deserializer<'de>,
10852    {
10853        const FIELDS: &[&str] = &[
10854            "compaction_statuses",
10855            "compactionStatuses",
10856            "task_assignment",
10857            "taskAssignment",
10858            "task_progress",
10859            "taskProgress",
10860        ];
10861
10862        #[allow(clippy::enum_variant_names)]
10863        enum GeneratedField {
10864            CompactionStatuses,
10865            TaskAssignment,
10866            TaskProgress,
10867        }
10868        impl<'de> serde::Deserialize<'de> for GeneratedField {
10869            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10870            where
10871                D: serde::Deserializer<'de>,
10872            {
10873                struct GeneratedVisitor;
10874
10875                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10876                    type Value = GeneratedField;
10877
10878                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10879                        write!(formatter, "expected one of: {:?}", &FIELDS)
10880                    }
10881
10882                    #[allow(unused_variables)]
10883                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10884                    where
10885                        E: serde::de::Error,
10886                    {
10887                        match value {
10888                            "compactionStatuses" | "compaction_statuses" => Ok(GeneratedField::CompactionStatuses),
10889                            "taskAssignment" | "task_assignment" => Ok(GeneratedField::TaskAssignment),
10890                            "taskProgress" | "task_progress" => Ok(GeneratedField::TaskProgress),
10891                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10892                        }
10893                    }
10894                }
10895                deserializer.deserialize_identifier(GeneratedVisitor)
10896            }
10897        }
10898        struct GeneratedVisitor;
10899        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10900            type Value = RiseCtlListCompactionStatusResponse;
10901
10902            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10903                formatter.write_str("struct hummock.RiseCtlListCompactionStatusResponse")
10904            }
10905
10906            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlListCompactionStatusResponse, V::Error>
10907                where
10908                    V: serde::de::MapAccess<'de>,
10909            {
10910                let mut compaction_statuses__ = None;
10911                let mut task_assignment__ = None;
10912                let mut task_progress__ = None;
10913                while let Some(k) = map_.next_key()? {
10914                    match k {
10915                        GeneratedField::CompactionStatuses => {
10916                            if compaction_statuses__.is_some() {
10917                                return Err(serde::de::Error::duplicate_field("compactionStatuses"));
10918                            }
10919                            compaction_statuses__ = Some(map_.next_value()?);
10920                        }
10921                        GeneratedField::TaskAssignment => {
10922                            if task_assignment__.is_some() {
10923                                return Err(serde::de::Error::duplicate_field("taskAssignment"));
10924                            }
10925                            task_assignment__ = Some(map_.next_value()?);
10926                        }
10927                        GeneratedField::TaskProgress => {
10928                            if task_progress__.is_some() {
10929                                return Err(serde::de::Error::duplicate_field("taskProgress"));
10930                            }
10931                            task_progress__ = Some(map_.next_value()?);
10932                        }
10933                    }
10934                }
10935                Ok(RiseCtlListCompactionStatusResponse {
10936                    compaction_statuses: compaction_statuses__.unwrap_or_default(),
10937                    task_assignment: task_assignment__.unwrap_or_default(),
10938                    task_progress: task_progress__.unwrap_or_default(),
10939                })
10940            }
10941        }
10942        deserializer.deserialize_struct("hummock.RiseCtlListCompactionStatusResponse", FIELDS, GeneratedVisitor)
10943    }
10944}
10945impl serde::Serialize for RiseCtlPauseVersionCheckpointRequest {
10946    #[allow(deprecated)]
10947    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10948    where
10949        S: serde::Serializer,
10950    {
10951        use serde::ser::SerializeStruct;
10952        let len = 0;
10953        let struct_ser = serializer.serialize_struct("hummock.RiseCtlPauseVersionCheckpointRequest", len)?;
10954        struct_ser.end()
10955    }
10956}
10957impl<'de> serde::Deserialize<'de> for RiseCtlPauseVersionCheckpointRequest {
10958    #[allow(deprecated)]
10959    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10960    where
10961        D: serde::Deserializer<'de>,
10962    {
10963        const FIELDS: &[&str] = &[
10964        ];
10965
10966        #[allow(clippy::enum_variant_names)]
10967        enum GeneratedField {
10968        }
10969        impl<'de> serde::Deserialize<'de> for GeneratedField {
10970            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10971            where
10972                D: serde::Deserializer<'de>,
10973            {
10974                struct GeneratedVisitor;
10975
10976                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10977                    type Value = GeneratedField;
10978
10979                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10980                        write!(formatter, "expected one of: {:?}", &FIELDS)
10981                    }
10982
10983                    #[allow(unused_variables)]
10984                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10985                    where
10986                        E: serde::de::Error,
10987                    {
10988                            Err(serde::de::Error::unknown_field(value, FIELDS))
10989                    }
10990                }
10991                deserializer.deserialize_identifier(GeneratedVisitor)
10992            }
10993        }
10994        struct GeneratedVisitor;
10995        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10996            type Value = RiseCtlPauseVersionCheckpointRequest;
10997
10998            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10999                formatter.write_str("struct hummock.RiseCtlPauseVersionCheckpointRequest")
11000            }
11001
11002            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlPauseVersionCheckpointRequest, V::Error>
11003                where
11004                    V: serde::de::MapAccess<'de>,
11005            {
11006                while map_.next_key::<GeneratedField>()?.is_some() {
11007                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
11008                }
11009                Ok(RiseCtlPauseVersionCheckpointRequest {
11010                })
11011            }
11012        }
11013        deserializer.deserialize_struct("hummock.RiseCtlPauseVersionCheckpointRequest", FIELDS, GeneratedVisitor)
11014    }
11015}
11016impl serde::Serialize for RiseCtlPauseVersionCheckpointResponse {
11017    #[allow(deprecated)]
11018    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11019    where
11020        S: serde::Serializer,
11021    {
11022        use serde::ser::SerializeStruct;
11023        let len = 0;
11024        let struct_ser = serializer.serialize_struct("hummock.RiseCtlPauseVersionCheckpointResponse", len)?;
11025        struct_ser.end()
11026    }
11027}
11028impl<'de> serde::Deserialize<'de> for RiseCtlPauseVersionCheckpointResponse {
11029    #[allow(deprecated)]
11030    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11031    where
11032        D: serde::Deserializer<'de>,
11033    {
11034        const FIELDS: &[&str] = &[
11035        ];
11036
11037        #[allow(clippy::enum_variant_names)]
11038        enum GeneratedField {
11039        }
11040        impl<'de> serde::Deserialize<'de> for GeneratedField {
11041            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11042            where
11043                D: serde::Deserializer<'de>,
11044            {
11045                struct GeneratedVisitor;
11046
11047                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11048                    type Value = GeneratedField;
11049
11050                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11051                        write!(formatter, "expected one of: {:?}", &FIELDS)
11052                    }
11053
11054                    #[allow(unused_variables)]
11055                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11056                    where
11057                        E: serde::de::Error,
11058                    {
11059                            Err(serde::de::Error::unknown_field(value, FIELDS))
11060                    }
11061                }
11062                deserializer.deserialize_identifier(GeneratedVisitor)
11063            }
11064        }
11065        struct GeneratedVisitor;
11066        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11067            type Value = RiseCtlPauseVersionCheckpointResponse;
11068
11069            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11070                formatter.write_str("struct hummock.RiseCtlPauseVersionCheckpointResponse")
11071            }
11072
11073            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlPauseVersionCheckpointResponse, V::Error>
11074                where
11075                    V: serde::de::MapAccess<'de>,
11076            {
11077                while map_.next_key::<GeneratedField>()?.is_some() {
11078                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
11079                }
11080                Ok(RiseCtlPauseVersionCheckpointResponse {
11081                })
11082            }
11083        }
11084        deserializer.deserialize_struct("hummock.RiseCtlPauseVersionCheckpointResponse", FIELDS, GeneratedVisitor)
11085    }
11086}
11087impl serde::Serialize for RiseCtlRebuildTableStatsRequest {
11088    #[allow(deprecated)]
11089    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11090    where
11091        S: serde::Serializer,
11092    {
11093        use serde::ser::SerializeStruct;
11094        let len = 0;
11095        let struct_ser = serializer.serialize_struct("hummock.RiseCtlRebuildTableStatsRequest", len)?;
11096        struct_ser.end()
11097    }
11098}
11099impl<'de> serde::Deserialize<'de> for RiseCtlRebuildTableStatsRequest {
11100    #[allow(deprecated)]
11101    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11102    where
11103        D: serde::Deserializer<'de>,
11104    {
11105        const FIELDS: &[&str] = &[
11106        ];
11107
11108        #[allow(clippy::enum_variant_names)]
11109        enum GeneratedField {
11110        }
11111        impl<'de> serde::Deserialize<'de> for GeneratedField {
11112            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11113            where
11114                D: serde::Deserializer<'de>,
11115            {
11116                struct GeneratedVisitor;
11117
11118                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11119                    type Value = GeneratedField;
11120
11121                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11122                        write!(formatter, "expected one of: {:?}", &FIELDS)
11123                    }
11124
11125                    #[allow(unused_variables)]
11126                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11127                    where
11128                        E: serde::de::Error,
11129                    {
11130                            Err(serde::de::Error::unknown_field(value, FIELDS))
11131                    }
11132                }
11133                deserializer.deserialize_identifier(GeneratedVisitor)
11134            }
11135        }
11136        struct GeneratedVisitor;
11137        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11138            type Value = RiseCtlRebuildTableStatsRequest;
11139
11140            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11141                formatter.write_str("struct hummock.RiseCtlRebuildTableStatsRequest")
11142            }
11143
11144            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlRebuildTableStatsRequest, V::Error>
11145                where
11146                    V: serde::de::MapAccess<'de>,
11147            {
11148                while map_.next_key::<GeneratedField>()?.is_some() {
11149                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
11150                }
11151                Ok(RiseCtlRebuildTableStatsRequest {
11152                })
11153            }
11154        }
11155        deserializer.deserialize_struct("hummock.RiseCtlRebuildTableStatsRequest", FIELDS, GeneratedVisitor)
11156    }
11157}
11158impl serde::Serialize for RiseCtlRebuildTableStatsResponse {
11159    #[allow(deprecated)]
11160    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11161    where
11162        S: serde::Serializer,
11163    {
11164        use serde::ser::SerializeStruct;
11165        let len = 0;
11166        let struct_ser = serializer.serialize_struct("hummock.RiseCtlRebuildTableStatsResponse", len)?;
11167        struct_ser.end()
11168    }
11169}
11170impl<'de> serde::Deserialize<'de> for RiseCtlRebuildTableStatsResponse {
11171    #[allow(deprecated)]
11172    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11173    where
11174        D: serde::Deserializer<'de>,
11175    {
11176        const FIELDS: &[&str] = &[
11177        ];
11178
11179        #[allow(clippy::enum_variant_names)]
11180        enum GeneratedField {
11181        }
11182        impl<'de> serde::Deserialize<'de> for GeneratedField {
11183            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11184            where
11185                D: serde::Deserializer<'de>,
11186            {
11187                struct GeneratedVisitor;
11188
11189                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11190                    type Value = GeneratedField;
11191
11192                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11193                        write!(formatter, "expected one of: {:?}", &FIELDS)
11194                    }
11195
11196                    #[allow(unused_variables)]
11197                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11198                    where
11199                        E: serde::de::Error,
11200                    {
11201                            Err(serde::de::Error::unknown_field(value, FIELDS))
11202                    }
11203                }
11204                deserializer.deserialize_identifier(GeneratedVisitor)
11205            }
11206        }
11207        struct GeneratedVisitor;
11208        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11209            type Value = RiseCtlRebuildTableStatsResponse;
11210
11211            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11212                formatter.write_str("struct hummock.RiseCtlRebuildTableStatsResponse")
11213            }
11214
11215            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlRebuildTableStatsResponse, V::Error>
11216                where
11217                    V: serde::de::MapAccess<'de>,
11218            {
11219                while map_.next_key::<GeneratedField>()?.is_some() {
11220                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
11221                }
11222                Ok(RiseCtlRebuildTableStatsResponse {
11223                })
11224            }
11225        }
11226        deserializer.deserialize_struct("hummock.RiseCtlRebuildTableStatsResponse", FIELDS, GeneratedVisitor)
11227    }
11228}
11229impl serde::Serialize for RiseCtlResumeVersionCheckpointRequest {
11230    #[allow(deprecated)]
11231    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11232    where
11233        S: serde::Serializer,
11234    {
11235        use serde::ser::SerializeStruct;
11236        let len = 0;
11237        let struct_ser = serializer.serialize_struct("hummock.RiseCtlResumeVersionCheckpointRequest", len)?;
11238        struct_ser.end()
11239    }
11240}
11241impl<'de> serde::Deserialize<'de> for RiseCtlResumeVersionCheckpointRequest {
11242    #[allow(deprecated)]
11243    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11244    where
11245        D: serde::Deserializer<'de>,
11246    {
11247        const FIELDS: &[&str] = &[
11248        ];
11249
11250        #[allow(clippy::enum_variant_names)]
11251        enum GeneratedField {
11252        }
11253        impl<'de> serde::Deserialize<'de> for GeneratedField {
11254            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11255            where
11256                D: serde::Deserializer<'de>,
11257            {
11258                struct GeneratedVisitor;
11259
11260                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11261                    type Value = GeneratedField;
11262
11263                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11264                        write!(formatter, "expected one of: {:?}", &FIELDS)
11265                    }
11266
11267                    #[allow(unused_variables)]
11268                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11269                    where
11270                        E: serde::de::Error,
11271                    {
11272                            Err(serde::de::Error::unknown_field(value, FIELDS))
11273                    }
11274                }
11275                deserializer.deserialize_identifier(GeneratedVisitor)
11276            }
11277        }
11278        struct GeneratedVisitor;
11279        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11280            type Value = RiseCtlResumeVersionCheckpointRequest;
11281
11282            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11283                formatter.write_str("struct hummock.RiseCtlResumeVersionCheckpointRequest")
11284            }
11285
11286            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlResumeVersionCheckpointRequest, V::Error>
11287                where
11288                    V: serde::de::MapAccess<'de>,
11289            {
11290                while map_.next_key::<GeneratedField>()?.is_some() {
11291                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
11292                }
11293                Ok(RiseCtlResumeVersionCheckpointRequest {
11294                })
11295            }
11296        }
11297        deserializer.deserialize_struct("hummock.RiseCtlResumeVersionCheckpointRequest", FIELDS, GeneratedVisitor)
11298    }
11299}
11300impl serde::Serialize for RiseCtlResumeVersionCheckpointResponse {
11301    #[allow(deprecated)]
11302    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11303    where
11304        S: serde::Serializer,
11305    {
11306        use serde::ser::SerializeStruct;
11307        let len = 0;
11308        let struct_ser = serializer.serialize_struct("hummock.RiseCtlResumeVersionCheckpointResponse", len)?;
11309        struct_ser.end()
11310    }
11311}
11312impl<'de> serde::Deserialize<'de> for RiseCtlResumeVersionCheckpointResponse {
11313    #[allow(deprecated)]
11314    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11315    where
11316        D: serde::Deserializer<'de>,
11317    {
11318        const FIELDS: &[&str] = &[
11319        ];
11320
11321        #[allow(clippy::enum_variant_names)]
11322        enum GeneratedField {
11323        }
11324        impl<'de> serde::Deserialize<'de> for GeneratedField {
11325            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11326            where
11327                D: serde::Deserializer<'de>,
11328            {
11329                struct GeneratedVisitor;
11330
11331                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11332                    type Value = GeneratedField;
11333
11334                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11335                        write!(formatter, "expected one of: {:?}", &FIELDS)
11336                    }
11337
11338                    #[allow(unused_variables)]
11339                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11340                    where
11341                        E: serde::de::Error,
11342                    {
11343                            Err(serde::de::Error::unknown_field(value, FIELDS))
11344                    }
11345                }
11346                deserializer.deserialize_identifier(GeneratedVisitor)
11347            }
11348        }
11349        struct GeneratedVisitor;
11350        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11351            type Value = RiseCtlResumeVersionCheckpointResponse;
11352
11353            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11354                formatter.write_str("struct hummock.RiseCtlResumeVersionCheckpointResponse")
11355            }
11356
11357            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlResumeVersionCheckpointResponse, V::Error>
11358                where
11359                    V: serde::de::MapAccess<'de>,
11360            {
11361                while map_.next_key::<GeneratedField>()?.is_some() {
11362                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
11363                }
11364                Ok(RiseCtlResumeVersionCheckpointResponse {
11365                })
11366            }
11367        }
11368        deserializer.deserialize_struct("hummock.RiseCtlResumeVersionCheckpointResponse", FIELDS, GeneratedVisitor)
11369    }
11370}
11371impl serde::Serialize for RiseCtlUpdateCompactionConfigRequest {
11372    #[allow(deprecated)]
11373    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11374    where
11375        S: serde::Serializer,
11376    {
11377        use serde::ser::SerializeStruct;
11378        let mut len = 0;
11379        if !self.compaction_group_ids.is_empty() {
11380            len += 1;
11381        }
11382        if !self.configs.is_empty() {
11383            len += 1;
11384        }
11385        let mut struct_ser = serializer.serialize_struct("hummock.RiseCtlUpdateCompactionConfigRequest", len)?;
11386        if !self.compaction_group_ids.is_empty() {
11387            struct_ser.serialize_field("compactionGroupIds", &self.compaction_group_ids.iter().map(ToString::to_string).collect::<Vec<_>>())?;
11388        }
11389        if !self.configs.is_empty() {
11390            struct_ser.serialize_field("configs", &self.configs)?;
11391        }
11392        struct_ser.end()
11393    }
11394}
11395impl<'de> serde::Deserialize<'de> for RiseCtlUpdateCompactionConfigRequest {
11396    #[allow(deprecated)]
11397    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11398    where
11399        D: serde::Deserializer<'de>,
11400    {
11401        const FIELDS: &[&str] = &[
11402            "compaction_group_ids",
11403            "compactionGroupIds",
11404            "configs",
11405        ];
11406
11407        #[allow(clippy::enum_variant_names)]
11408        enum GeneratedField {
11409            CompactionGroupIds,
11410            Configs,
11411        }
11412        impl<'de> serde::Deserialize<'de> for GeneratedField {
11413            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11414            where
11415                D: serde::Deserializer<'de>,
11416            {
11417                struct GeneratedVisitor;
11418
11419                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11420                    type Value = GeneratedField;
11421
11422                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11423                        write!(formatter, "expected one of: {:?}", &FIELDS)
11424                    }
11425
11426                    #[allow(unused_variables)]
11427                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11428                    where
11429                        E: serde::de::Error,
11430                    {
11431                        match value {
11432                            "compactionGroupIds" | "compaction_group_ids" => Ok(GeneratedField::CompactionGroupIds),
11433                            "configs" => Ok(GeneratedField::Configs),
11434                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
11435                        }
11436                    }
11437                }
11438                deserializer.deserialize_identifier(GeneratedVisitor)
11439            }
11440        }
11441        struct GeneratedVisitor;
11442        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11443            type Value = RiseCtlUpdateCompactionConfigRequest;
11444
11445            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11446                formatter.write_str("struct hummock.RiseCtlUpdateCompactionConfigRequest")
11447            }
11448
11449            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlUpdateCompactionConfigRequest, V::Error>
11450                where
11451                    V: serde::de::MapAccess<'de>,
11452            {
11453                let mut compaction_group_ids__ = None;
11454                let mut configs__ = None;
11455                while let Some(k) = map_.next_key()? {
11456                    match k {
11457                        GeneratedField::CompactionGroupIds => {
11458                            if compaction_group_ids__.is_some() {
11459                                return Err(serde::de::Error::duplicate_field("compactionGroupIds"));
11460                            }
11461                            compaction_group_ids__ = 
11462                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
11463                                    .into_iter().map(|x| x.0).collect())
11464                            ;
11465                        }
11466                        GeneratedField::Configs => {
11467                            if configs__.is_some() {
11468                                return Err(serde::de::Error::duplicate_field("configs"));
11469                            }
11470                            configs__ = Some(map_.next_value()?);
11471                        }
11472                    }
11473                }
11474                Ok(RiseCtlUpdateCompactionConfigRequest {
11475                    compaction_group_ids: compaction_group_ids__.unwrap_or_default(),
11476                    configs: configs__.unwrap_or_default(),
11477                })
11478            }
11479        }
11480        deserializer.deserialize_struct("hummock.RiseCtlUpdateCompactionConfigRequest", FIELDS, GeneratedVisitor)
11481    }
11482}
11483impl serde::Serialize for rise_ctl_update_compaction_config_request::CompressionAlgorithm {
11484    #[allow(deprecated)]
11485    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11486    where
11487        S: serde::Serializer,
11488    {
11489        use serde::ser::SerializeStruct;
11490        let mut len = 0;
11491        if self.level != 0 {
11492            len += 1;
11493        }
11494        if !self.compression_algorithm.is_empty() {
11495            len += 1;
11496        }
11497        let mut struct_ser = serializer.serialize_struct("hummock.RiseCtlUpdateCompactionConfigRequest.CompressionAlgorithm", len)?;
11498        if self.level != 0 {
11499            struct_ser.serialize_field("level", &self.level)?;
11500        }
11501        if !self.compression_algorithm.is_empty() {
11502            struct_ser.serialize_field("compressionAlgorithm", &self.compression_algorithm)?;
11503        }
11504        struct_ser.end()
11505    }
11506}
11507impl<'de> serde::Deserialize<'de> for rise_ctl_update_compaction_config_request::CompressionAlgorithm {
11508    #[allow(deprecated)]
11509    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11510    where
11511        D: serde::Deserializer<'de>,
11512    {
11513        const FIELDS: &[&str] = &[
11514            "level",
11515            "compression_algorithm",
11516            "compressionAlgorithm",
11517        ];
11518
11519        #[allow(clippy::enum_variant_names)]
11520        enum GeneratedField {
11521            Level,
11522            CompressionAlgorithm,
11523        }
11524        impl<'de> serde::Deserialize<'de> for GeneratedField {
11525            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11526            where
11527                D: serde::Deserializer<'de>,
11528            {
11529                struct GeneratedVisitor;
11530
11531                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11532                    type Value = GeneratedField;
11533
11534                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11535                        write!(formatter, "expected one of: {:?}", &FIELDS)
11536                    }
11537
11538                    #[allow(unused_variables)]
11539                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11540                    where
11541                        E: serde::de::Error,
11542                    {
11543                        match value {
11544                            "level" => Ok(GeneratedField::Level),
11545                            "compressionAlgorithm" | "compression_algorithm" => Ok(GeneratedField::CompressionAlgorithm),
11546                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
11547                        }
11548                    }
11549                }
11550                deserializer.deserialize_identifier(GeneratedVisitor)
11551            }
11552        }
11553        struct GeneratedVisitor;
11554        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11555            type Value = rise_ctl_update_compaction_config_request::CompressionAlgorithm;
11556
11557            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11558                formatter.write_str("struct hummock.RiseCtlUpdateCompactionConfigRequest.CompressionAlgorithm")
11559            }
11560
11561            fn visit_map<V>(self, mut map_: V) -> std::result::Result<rise_ctl_update_compaction_config_request::CompressionAlgorithm, V::Error>
11562                where
11563                    V: serde::de::MapAccess<'de>,
11564            {
11565                let mut level__ = None;
11566                let mut compression_algorithm__ = None;
11567                while let Some(k) = map_.next_key()? {
11568                    match k {
11569                        GeneratedField::Level => {
11570                            if level__.is_some() {
11571                                return Err(serde::de::Error::duplicate_field("level"));
11572                            }
11573                            level__ = 
11574                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
11575                            ;
11576                        }
11577                        GeneratedField::CompressionAlgorithm => {
11578                            if compression_algorithm__.is_some() {
11579                                return Err(serde::de::Error::duplicate_field("compressionAlgorithm"));
11580                            }
11581                            compression_algorithm__ = Some(map_.next_value()?);
11582                        }
11583                    }
11584                }
11585                Ok(rise_ctl_update_compaction_config_request::CompressionAlgorithm {
11586                    level: level__.unwrap_or_default(),
11587                    compression_algorithm: compression_algorithm__.unwrap_or_default(),
11588                })
11589            }
11590        }
11591        deserializer.deserialize_struct("hummock.RiseCtlUpdateCompactionConfigRequest.CompressionAlgorithm", FIELDS, GeneratedVisitor)
11592    }
11593}
11594impl serde::Serialize for rise_ctl_update_compaction_config_request::MutableConfig {
11595    #[allow(deprecated)]
11596    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11597    where
11598        S: serde::Serializer,
11599    {
11600        use serde::ser::SerializeStruct;
11601        let mut len = 0;
11602        if self.mutable_config.is_some() {
11603            len += 1;
11604        }
11605        let mut struct_ser = serializer.serialize_struct("hummock.RiseCtlUpdateCompactionConfigRequest.MutableConfig", len)?;
11606        if let Some(v) = self.mutable_config.as_ref() {
11607            match v {
11608                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxBytesForLevelBase(v) => {
11609                    #[allow(clippy::needless_borrow)]
11610                    #[allow(clippy::needless_borrows_for_generic_args)]
11611                    struct_ser.serialize_field("maxBytesForLevelBase", ToString::to_string(&v).as_str())?;
11612                }
11613                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxBytesForLevelMultiplier(v) => {
11614                    #[allow(clippy::needless_borrow)]
11615                    #[allow(clippy::needless_borrows_for_generic_args)]
11616                    struct_ser.serialize_field("maxBytesForLevelMultiplier", ToString::to_string(&v).as_str())?;
11617                }
11618                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxCompactionBytes(v) => {
11619                    #[allow(clippy::needless_borrow)]
11620                    #[allow(clippy::needless_borrows_for_generic_args)]
11621                    struct_ser.serialize_field("maxCompactionBytes", ToString::to_string(&v).as_str())?;
11622                }
11623                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::SubLevelMaxCompactionBytes(v) => {
11624                    #[allow(clippy::needless_borrow)]
11625                    #[allow(clippy::needless_borrows_for_generic_args)]
11626                    struct_ser.serialize_field("subLevelMaxCompactionBytes", ToString::to_string(&v).as_str())?;
11627                }
11628                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0TierCompactFileNumber(v) => {
11629                    #[allow(clippy::needless_borrow)]
11630                    #[allow(clippy::needless_borrows_for_generic_args)]
11631                    struct_ser.serialize_field("level0TierCompactFileNumber", ToString::to_string(&v).as_str())?;
11632                }
11633                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::TargetFileSizeBase(v) => {
11634                    #[allow(clippy::needless_borrow)]
11635                    #[allow(clippy::needless_borrows_for_generic_args)]
11636                    struct_ser.serialize_field("targetFileSizeBase", ToString::to_string(&v).as_str())?;
11637                }
11638                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::CompactionFilterMask(v) => {
11639                    struct_ser.serialize_field("compactionFilterMask", v)?;
11640                }
11641                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxSubCompaction(v) => {
11642                    struct_ser.serialize_field("maxSubCompaction", v)?;
11643                }
11644                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0StopWriteThresholdSubLevelNumber(v) => {
11645                    #[allow(clippy::needless_borrow)]
11646                    #[allow(clippy::needless_borrows_for_generic_args)]
11647                    struct_ser.serialize_field("level0StopWriteThresholdSubLevelNumber", ToString::to_string(&v).as_str())?;
11648                }
11649                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0SubLevelCompactLevelCount(v) => {
11650                    struct_ser.serialize_field("level0SubLevelCompactLevelCount", v)?;
11651                }
11652                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0OverlappingSubLevelCompactLevelCount(v) => {
11653                    struct_ser.serialize_field("level0OverlappingSubLevelCompactLevelCount", v)?;
11654                }
11655                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxSpaceReclaimBytes(v) => {
11656                    #[allow(clippy::needless_borrow)]
11657                    #[allow(clippy::needless_borrows_for_generic_args)]
11658                    struct_ser.serialize_field("maxSpaceReclaimBytes", ToString::to_string(&v).as_str())?;
11659                }
11660                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0MaxCompactFileNumber(v) => {
11661                    #[allow(clippy::needless_borrow)]
11662                    #[allow(clippy::needless_borrows_for_generic_args)]
11663                    struct_ser.serialize_field("level0MaxCompactFileNumber", ToString::to_string(&v).as_str())?;
11664                }
11665                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::EnableEmergencyPicker(v) => {
11666                    struct_ser.serialize_field("enableEmergencyPicker", v)?;
11667                }
11668                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::TombstoneReclaimRatio(v) => {
11669                    struct_ser.serialize_field("tombstoneReclaimRatio", v)?;
11670                }
11671                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::CompressionAlgorithm(v) => {
11672                    struct_ser.serialize_field("compressionAlgorithm", v)?;
11673                }
11674                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxL0CompactLevelCount(v) => {
11675                    struct_ser.serialize_field("maxL0CompactLevelCount", v)?;
11676                }
11677                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::SstAllowedTrivialMoveMinSize(v) => {
11678                    #[allow(clippy::needless_borrow)]
11679                    #[allow(clippy::needless_borrows_for_generic_args)]
11680                    struct_ser.serialize_field("sstAllowedTrivialMoveMinSize", ToString::to_string(&v).as_str())?;
11681                }
11682                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::SplitWeightByVnode(v) => {
11683                    struct_ser.serialize_field("splitWeightByVnode", v)?;
11684                }
11685                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::DisableAutoGroupScheduling(v) => {
11686                    struct_ser.serialize_field("disableAutoGroupScheduling", v)?;
11687                }
11688                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxOverlappingLevelSize(v) => {
11689                    #[allow(clippy::needless_borrow)]
11690                    #[allow(clippy::needless_borrows_for_generic_args)]
11691                    struct_ser.serialize_field("maxOverlappingLevelSize", ToString::to_string(&v).as_str())?;
11692                }
11693                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::EmergencyLevel0SstFileCount(v) => {
11694                    struct_ser.serialize_field("emergencyLevel0SstFileCount", v)?;
11695                }
11696                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::EmergencyLevel0SubLevelPartition(v) => {
11697                    struct_ser.serialize_field("emergencyLevel0SubLevelPartition", v)?;
11698                }
11699                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0StopWriteThresholdMaxSstCount(v) => {
11700                    struct_ser.serialize_field("level0StopWriteThresholdMaxSstCount", v)?;
11701                }
11702                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0StopWriteThresholdMaxSize(v) => {
11703                    #[allow(clippy::needless_borrow)]
11704                    #[allow(clippy::needless_borrows_for_generic_args)]
11705                    struct_ser.serialize_field("level0StopWriteThresholdMaxSize", ToString::to_string(&v).as_str())?;
11706                }
11707                rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::SstAllowedTrivialMoveMaxCount(v) => {
11708                    struct_ser.serialize_field("sstAllowedTrivialMoveMaxCount", v)?;
11709                }
11710            }
11711        }
11712        struct_ser.end()
11713    }
11714}
11715impl<'de> serde::Deserialize<'de> for rise_ctl_update_compaction_config_request::MutableConfig {
11716    #[allow(deprecated)]
11717    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11718    where
11719        D: serde::Deserializer<'de>,
11720    {
11721        const FIELDS: &[&str] = &[
11722            "max_bytes_for_level_base",
11723            "maxBytesForLevelBase",
11724            "max_bytes_for_level_multiplier",
11725            "maxBytesForLevelMultiplier",
11726            "max_compaction_bytes",
11727            "maxCompactionBytes",
11728            "sub_level_max_compaction_bytes",
11729            "subLevelMaxCompactionBytes",
11730            "level0_tier_compact_file_number",
11731            "level0TierCompactFileNumber",
11732            "target_file_size_base",
11733            "targetFileSizeBase",
11734            "compaction_filter_mask",
11735            "compactionFilterMask",
11736            "max_sub_compaction",
11737            "maxSubCompaction",
11738            "level0_stop_write_threshold_sub_level_number",
11739            "level0StopWriteThresholdSubLevelNumber",
11740            "level0_sub_level_compact_level_count",
11741            "level0SubLevelCompactLevelCount",
11742            "level0_overlapping_sub_level_compact_level_count",
11743            "level0OverlappingSubLevelCompactLevelCount",
11744            "max_space_reclaim_bytes",
11745            "maxSpaceReclaimBytes",
11746            "level0_max_compact_file_number",
11747            "level0MaxCompactFileNumber",
11748            "enable_emergency_picker",
11749            "enableEmergencyPicker",
11750            "tombstone_reclaim_ratio",
11751            "tombstoneReclaimRatio",
11752            "compression_algorithm",
11753            "compressionAlgorithm",
11754            "max_l0_compact_level_count",
11755            "maxL0CompactLevelCount",
11756            "sst_allowed_trivial_move_min_size",
11757            "sstAllowedTrivialMoveMinSize",
11758            "split_weight_by_vnode",
11759            "splitWeightByVnode",
11760            "disable_auto_group_scheduling",
11761            "disableAutoGroupScheduling",
11762            "max_overlapping_level_size",
11763            "maxOverlappingLevelSize",
11764            "emergency_level0_sst_file_count",
11765            "emergencyLevel0SstFileCount",
11766            "emergency_level0_sub_level_partition",
11767            "emergencyLevel0SubLevelPartition",
11768            "level0_stop_write_threshold_max_sst_count",
11769            "level0StopWriteThresholdMaxSstCount",
11770            "level0_stop_write_threshold_max_size",
11771            "level0StopWriteThresholdMaxSize",
11772            "sst_allowed_trivial_move_max_count",
11773            "sstAllowedTrivialMoveMaxCount",
11774        ];
11775
11776        #[allow(clippy::enum_variant_names)]
11777        enum GeneratedField {
11778            MaxBytesForLevelBase,
11779            MaxBytesForLevelMultiplier,
11780            MaxCompactionBytes,
11781            SubLevelMaxCompactionBytes,
11782            Level0TierCompactFileNumber,
11783            TargetFileSizeBase,
11784            CompactionFilterMask,
11785            MaxSubCompaction,
11786            Level0StopWriteThresholdSubLevelNumber,
11787            Level0SubLevelCompactLevelCount,
11788            Level0OverlappingSubLevelCompactLevelCount,
11789            MaxSpaceReclaimBytes,
11790            Level0MaxCompactFileNumber,
11791            EnableEmergencyPicker,
11792            TombstoneReclaimRatio,
11793            CompressionAlgorithm,
11794            MaxL0CompactLevelCount,
11795            SstAllowedTrivialMoveMinSize,
11796            SplitWeightByVnode,
11797            DisableAutoGroupScheduling,
11798            MaxOverlappingLevelSize,
11799            EmergencyLevel0SstFileCount,
11800            EmergencyLevel0SubLevelPartition,
11801            Level0StopWriteThresholdMaxSstCount,
11802            Level0StopWriteThresholdMaxSize,
11803            SstAllowedTrivialMoveMaxCount,
11804        }
11805        impl<'de> serde::Deserialize<'de> for GeneratedField {
11806            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11807            where
11808                D: serde::Deserializer<'de>,
11809            {
11810                struct GeneratedVisitor;
11811
11812                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11813                    type Value = GeneratedField;
11814
11815                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11816                        write!(formatter, "expected one of: {:?}", &FIELDS)
11817                    }
11818
11819                    #[allow(unused_variables)]
11820                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11821                    where
11822                        E: serde::de::Error,
11823                    {
11824                        match value {
11825                            "maxBytesForLevelBase" | "max_bytes_for_level_base" => Ok(GeneratedField::MaxBytesForLevelBase),
11826                            "maxBytesForLevelMultiplier" | "max_bytes_for_level_multiplier" => Ok(GeneratedField::MaxBytesForLevelMultiplier),
11827                            "maxCompactionBytes" | "max_compaction_bytes" => Ok(GeneratedField::MaxCompactionBytes),
11828                            "subLevelMaxCompactionBytes" | "sub_level_max_compaction_bytes" => Ok(GeneratedField::SubLevelMaxCompactionBytes),
11829                            "level0TierCompactFileNumber" | "level0_tier_compact_file_number" => Ok(GeneratedField::Level0TierCompactFileNumber),
11830                            "targetFileSizeBase" | "target_file_size_base" => Ok(GeneratedField::TargetFileSizeBase),
11831                            "compactionFilterMask" | "compaction_filter_mask" => Ok(GeneratedField::CompactionFilterMask),
11832                            "maxSubCompaction" | "max_sub_compaction" => Ok(GeneratedField::MaxSubCompaction),
11833                            "level0StopWriteThresholdSubLevelNumber" | "level0_stop_write_threshold_sub_level_number" => Ok(GeneratedField::Level0StopWriteThresholdSubLevelNumber),
11834                            "level0SubLevelCompactLevelCount" | "level0_sub_level_compact_level_count" => Ok(GeneratedField::Level0SubLevelCompactLevelCount),
11835                            "level0OverlappingSubLevelCompactLevelCount" | "level0_overlapping_sub_level_compact_level_count" => Ok(GeneratedField::Level0OverlappingSubLevelCompactLevelCount),
11836                            "maxSpaceReclaimBytes" | "max_space_reclaim_bytes" => Ok(GeneratedField::MaxSpaceReclaimBytes),
11837                            "level0MaxCompactFileNumber" | "level0_max_compact_file_number" => Ok(GeneratedField::Level0MaxCompactFileNumber),
11838                            "enableEmergencyPicker" | "enable_emergency_picker" => Ok(GeneratedField::EnableEmergencyPicker),
11839                            "tombstoneReclaimRatio" | "tombstone_reclaim_ratio" => Ok(GeneratedField::TombstoneReclaimRatio),
11840                            "compressionAlgorithm" | "compression_algorithm" => Ok(GeneratedField::CompressionAlgorithm),
11841                            "maxL0CompactLevelCount" | "max_l0_compact_level_count" => Ok(GeneratedField::MaxL0CompactLevelCount),
11842                            "sstAllowedTrivialMoveMinSize" | "sst_allowed_trivial_move_min_size" => Ok(GeneratedField::SstAllowedTrivialMoveMinSize),
11843                            "splitWeightByVnode" | "split_weight_by_vnode" => Ok(GeneratedField::SplitWeightByVnode),
11844                            "disableAutoGroupScheduling" | "disable_auto_group_scheduling" => Ok(GeneratedField::DisableAutoGroupScheduling),
11845                            "maxOverlappingLevelSize" | "max_overlapping_level_size" => Ok(GeneratedField::MaxOverlappingLevelSize),
11846                            "emergencyLevel0SstFileCount" | "emergency_level0_sst_file_count" => Ok(GeneratedField::EmergencyLevel0SstFileCount),
11847                            "emergencyLevel0SubLevelPartition" | "emergency_level0_sub_level_partition" => Ok(GeneratedField::EmergencyLevel0SubLevelPartition),
11848                            "level0StopWriteThresholdMaxSstCount" | "level0_stop_write_threshold_max_sst_count" => Ok(GeneratedField::Level0StopWriteThresholdMaxSstCount),
11849                            "level0StopWriteThresholdMaxSize" | "level0_stop_write_threshold_max_size" => Ok(GeneratedField::Level0StopWriteThresholdMaxSize),
11850                            "sstAllowedTrivialMoveMaxCount" | "sst_allowed_trivial_move_max_count" => Ok(GeneratedField::SstAllowedTrivialMoveMaxCount),
11851                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
11852                        }
11853                    }
11854                }
11855                deserializer.deserialize_identifier(GeneratedVisitor)
11856            }
11857        }
11858        struct GeneratedVisitor;
11859        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11860            type Value = rise_ctl_update_compaction_config_request::MutableConfig;
11861
11862            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11863                formatter.write_str("struct hummock.RiseCtlUpdateCompactionConfigRequest.MutableConfig")
11864            }
11865
11866            fn visit_map<V>(self, mut map_: V) -> std::result::Result<rise_ctl_update_compaction_config_request::MutableConfig, V::Error>
11867                where
11868                    V: serde::de::MapAccess<'de>,
11869            {
11870                let mut mutable_config__ = None;
11871                while let Some(k) = map_.next_key()? {
11872                    match k {
11873                        GeneratedField::MaxBytesForLevelBase => {
11874                            if mutable_config__.is_some() {
11875                                return Err(serde::de::Error::duplicate_field("maxBytesForLevelBase"));
11876                            }
11877                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxBytesForLevelBase(x.0));
11878                        }
11879                        GeneratedField::MaxBytesForLevelMultiplier => {
11880                            if mutable_config__.is_some() {
11881                                return Err(serde::de::Error::duplicate_field("maxBytesForLevelMultiplier"));
11882                            }
11883                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxBytesForLevelMultiplier(x.0));
11884                        }
11885                        GeneratedField::MaxCompactionBytes => {
11886                            if mutable_config__.is_some() {
11887                                return Err(serde::de::Error::duplicate_field("maxCompactionBytes"));
11888                            }
11889                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxCompactionBytes(x.0));
11890                        }
11891                        GeneratedField::SubLevelMaxCompactionBytes => {
11892                            if mutable_config__.is_some() {
11893                                return Err(serde::de::Error::duplicate_field("subLevelMaxCompactionBytes"));
11894                            }
11895                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::SubLevelMaxCompactionBytes(x.0));
11896                        }
11897                        GeneratedField::Level0TierCompactFileNumber => {
11898                            if mutable_config__.is_some() {
11899                                return Err(serde::de::Error::duplicate_field("level0TierCompactFileNumber"));
11900                            }
11901                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0TierCompactFileNumber(x.0));
11902                        }
11903                        GeneratedField::TargetFileSizeBase => {
11904                            if mutable_config__.is_some() {
11905                                return Err(serde::de::Error::duplicate_field("targetFileSizeBase"));
11906                            }
11907                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::TargetFileSizeBase(x.0));
11908                        }
11909                        GeneratedField::CompactionFilterMask => {
11910                            if mutable_config__.is_some() {
11911                                return Err(serde::de::Error::duplicate_field("compactionFilterMask"));
11912                            }
11913                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::CompactionFilterMask(x.0));
11914                        }
11915                        GeneratedField::MaxSubCompaction => {
11916                            if mutable_config__.is_some() {
11917                                return Err(serde::de::Error::duplicate_field("maxSubCompaction"));
11918                            }
11919                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxSubCompaction(x.0));
11920                        }
11921                        GeneratedField::Level0StopWriteThresholdSubLevelNumber => {
11922                            if mutable_config__.is_some() {
11923                                return Err(serde::de::Error::duplicate_field("level0StopWriteThresholdSubLevelNumber"));
11924                            }
11925                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0StopWriteThresholdSubLevelNumber(x.0));
11926                        }
11927                        GeneratedField::Level0SubLevelCompactLevelCount => {
11928                            if mutable_config__.is_some() {
11929                                return Err(serde::de::Error::duplicate_field("level0SubLevelCompactLevelCount"));
11930                            }
11931                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0SubLevelCompactLevelCount(x.0));
11932                        }
11933                        GeneratedField::Level0OverlappingSubLevelCompactLevelCount => {
11934                            if mutable_config__.is_some() {
11935                                return Err(serde::de::Error::duplicate_field("level0OverlappingSubLevelCompactLevelCount"));
11936                            }
11937                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0OverlappingSubLevelCompactLevelCount(x.0));
11938                        }
11939                        GeneratedField::MaxSpaceReclaimBytes => {
11940                            if mutable_config__.is_some() {
11941                                return Err(serde::de::Error::duplicate_field("maxSpaceReclaimBytes"));
11942                            }
11943                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxSpaceReclaimBytes(x.0));
11944                        }
11945                        GeneratedField::Level0MaxCompactFileNumber => {
11946                            if mutable_config__.is_some() {
11947                                return Err(serde::de::Error::duplicate_field("level0MaxCompactFileNumber"));
11948                            }
11949                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0MaxCompactFileNumber(x.0));
11950                        }
11951                        GeneratedField::EnableEmergencyPicker => {
11952                            if mutable_config__.is_some() {
11953                                return Err(serde::de::Error::duplicate_field("enableEmergencyPicker"));
11954                            }
11955                            mutable_config__ = map_.next_value::<::std::option::Option<_>>()?.map(rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::EnableEmergencyPicker);
11956                        }
11957                        GeneratedField::TombstoneReclaimRatio => {
11958                            if mutable_config__.is_some() {
11959                                return Err(serde::de::Error::duplicate_field("tombstoneReclaimRatio"));
11960                            }
11961                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::TombstoneReclaimRatio(x.0));
11962                        }
11963                        GeneratedField::CompressionAlgorithm => {
11964                            if mutable_config__.is_some() {
11965                                return Err(serde::de::Error::duplicate_field("compressionAlgorithm"));
11966                            }
11967                            mutable_config__ = map_.next_value::<::std::option::Option<_>>()?.map(rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::CompressionAlgorithm)
11968;
11969                        }
11970                        GeneratedField::MaxL0CompactLevelCount => {
11971                            if mutable_config__.is_some() {
11972                                return Err(serde::de::Error::duplicate_field("maxL0CompactLevelCount"));
11973                            }
11974                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxL0CompactLevelCount(x.0));
11975                        }
11976                        GeneratedField::SstAllowedTrivialMoveMinSize => {
11977                            if mutable_config__.is_some() {
11978                                return Err(serde::de::Error::duplicate_field("sstAllowedTrivialMoveMinSize"));
11979                            }
11980                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::SstAllowedTrivialMoveMinSize(x.0));
11981                        }
11982                        GeneratedField::SplitWeightByVnode => {
11983                            if mutable_config__.is_some() {
11984                                return Err(serde::de::Error::duplicate_field("splitWeightByVnode"));
11985                            }
11986                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::SplitWeightByVnode(x.0));
11987                        }
11988                        GeneratedField::DisableAutoGroupScheduling => {
11989                            if mutable_config__.is_some() {
11990                                return Err(serde::de::Error::duplicate_field("disableAutoGroupScheduling"));
11991                            }
11992                            mutable_config__ = map_.next_value::<::std::option::Option<_>>()?.map(rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::DisableAutoGroupScheduling);
11993                        }
11994                        GeneratedField::MaxOverlappingLevelSize => {
11995                            if mutable_config__.is_some() {
11996                                return Err(serde::de::Error::duplicate_field("maxOverlappingLevelSize"));
11997                            }
11998                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::MaxOverlappingLevelSize(x.0));
11999                        }
12000                        GeneratedField::EmergencyLevel0SstFileCount => {
12001                            if mutable_config__.is_some() {
12002                                return Err(serde::de::Error::duplicate_field("emergencyLevel0SstFileCount"));
12003                            }
12004                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::EmergencyLevel0SstFileCount(x.0));
12005                        }
12006                        GeneratedField::EmergencyLevel0SubLevelPartition => {
12007                            if mutable_config__.is_some() {
12008                                return Err(serde::de::Error::duplicate_field("emergencyLevel0SubLevelPartition"));
12009                            }
12010                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::EmergencyLevel0SubLevelPartition(x.0));
12011                        }
12012                        GeneratedField::Level0StopWriteThresholdMaxSstCount => {
12013                            if mutable_config__.is_some() {
12014                                return Err(serde::de::Error::duplicate_field("level0StopWriteThresholdMaxSstCount"));
12015                            }
12016                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0StopWriteThresholdMaxSstCount(x.0));
12017                        }
12018                        GeneratedField::Level0StopWriteThresholdMaxSize => {
12019                            if mutable_config__.is_some() {
12020                                return Err(serde::de::Error::duplicate_field("level0StopWriteThresholdMaxSize"));
12021                            }
12022                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::Level0StopWriteThresholdMaxSize(x.0));
12023                        }
12024                        GeneratedField::SstAllowedTrivialMoveMaxCount => {
12025                            if mutable_config__.is_some() {
12026                                return Err(serde::de::Error::duplicate_field("sstAllowedTrivialMoveMaxCount"));
12027                            }
12028                            mutable_config__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| rise_ctl_update_compaction_config_request::mutable_config::MutableConfig::SstAllowedTrivialMoveMaxCount(x.0));
12029                        }
12030                    }
12031                }
12032                Ok(rise_ctl_update_compaction_config_request::MutableConfig {
12033                    mutable_config: mutable_config__,
12034                })
12035            }
12036        }
12037        deserializer.deserialize_struct("hummock.RiseCtlUpdateCompactionConfigRequest.MutableConfig", FIELDS, GeneratedVisitor)
12038    }
12039}
12040impl serde::Serialize for RiseCtlUpdateCompactionConfigResponse {
12041    #[allow(deprecated)]
12042    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12043    where
12044        S: serde::Serializer,
12045    {
12046        use serde::ser::SerializeStruct;
12047        let mut len = 0;
12048        if self.status.is_some() {
12049            len += 1;
12050        }
12051        let mut struct_ser = serializer.serialize_struct("hummock.RiseCtlUpdateCompactionConfigResponse", len)?;
12052        if let Some(v) = self.status.as_ref() {
12053            struct_ser.serialize_field("status", v)?;
12054        }
12055        struct_ser.end()
12056    }
12057}
12058impl<'de> serde::Deserialize<'de> for RiseCtlUpdateCompactionConfigResponse {
12059    #[allow(deprecated)]
12060    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12061    where
12062        D: serde::Deserializer<'de>,
12063    {
12064        const FIELDS: &[&str] = &[
12065            "status",
12066        ];
12067
12068        #[allow(clippy::enum_variant_names)]
12069        enum GeneratedField {
12070            Status,
12071        }
12072        impl<'de> serde::Deserialize<'de> for GeneratedField {
12073            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12074            where
12075                D: serde::Deserializer<'de>,
12076            {
12077                struct GeneratedVisitor;
12078
12079                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12080                    type Value = GeneratedField;
12081
12082                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12083                        write!(formatter, "expected one of: {:?}", &FIELDS)
12084                    }
12085
12086                    #[allow(unused_variables)]
12087                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12088                    where
12089                        E: serde::de::Error,
12090                    {
12091                        match value {
12092                            "status" => Ok(GeneratedField::Status),
12093                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12094                        }
12095                    }
12096                }
12097                deserializer.deserialize_identifier(GeneratedVisitor)
12098            }
12099        }
12100        struct GeneratedVisitor;
12101        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12102            type Value = RiseCtlUpdateCompactionConfigResponse;
12103
12104            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12105                formatter.write_str("struct hummock.RiseCtlUpdateCompactionConfigResponse")
12106            }
12107
12108            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RiseCtlUpdateCompactionConfigResponse, V::Error>
12109                where
12110                    V: serde::de::MapAccess<'de>,
12111            {
12112                let mut status__ = None;
12113                while let Some(k) = map_.next_key()? {
12114                    match k {
12115                        GeneratedField::Status => {
12116                            if status__.is_some() {
12117                                return Err(serde::de::Error::duplicate_field("status"));
12118                            }
12119                            status__ = map_.next_value()?;
12120                        }
12121                    }
12122                }
12123                Ok(RiseCtlUpdateCompactionConfigResponse {
12124                    status: status__,
12125                })
12126            }
12127        }
12128        deserializer.deserialize_struct("hummock.RiseCtlUpdateCompactionConfigResponse", FIELDS, GeneratedVisitor)
12129    }
12130}
12131impl serde::Serialize for SplitCompactionGroupRequest {
12132    #[allow(deprecated)]
12133    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12134    where
12135        S: serde::Serializer,
12136    {
12137        use serde::ser::SerializeStruct;
12138        let mut len = 0;
12139        if self.group_id != 0 {
12140            len += 1;
12141        }
12142        if !self.table_ids.is_empty() {
12143            len += 1;
12144        }
12145        if self.partition_vnode_count != 0 {
12146            len += 1;
12147        }
12148        let mut struct_ser = serializer.serialize_struct("hummock.SplitCompactionGroupRequest", len)?;
12149        if self.group_id != 0 {
12150            #[allow(clippy::needless_borrow)]
12151            #[allow(clippy::needless_borrows_for_generic_args)]
12152            struct_ser.serialize_field("groupId", ToString::to_string(&self.group_id).as_str())?;
12153        }
12154        if !self.table_ids.is_empty() {
12155            struct_ser.serialize_field("tableIds", &self.table_ids)?;
12156        }
12157        if self.partition_vnode_count != 0 {
12158            struct_ser.serialize_field("partitionVnodeCount", &self.partition_vnode_count)?;
12159        }
12160        struct_ser.end()
12161    }
12162}
12163impl<'de> serde::Deserialize<'de> for SplitCompactionGroupRequest {
12164    #[allow(deprecated)]
12165    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12166    where
12167        D: serde::Deserializer<'de>,
12168    {
12169        const FIELDS: &[&str] = &[
12170            "group_id",
12171            "groupId",
12172            "table_ids",
12173            "tableIds",
12174            "partition_vnode_count",
12175            "partitionVnodeCount",
12176        ];
12177
12178        #[allow(clippy::enum_variant_names)]
12179        enum GeneratedField {
12180            GroupId,
12181            TableIds,
12182            PartitionVnodeCount,
12183        }
12184        impl<'de> serde::Deserialize<'de> for GeneratedField {
12185            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12186            where
12187                D: serde::Deserializer<'de>,
12188            {
12189                struct GeneratedVisitor;
12190
12191                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12192                    type Value = GeneratedField;
12193
12194                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12195                        write!(formatter, "expected one of: {:?}", &FIELDS)
12196                    }
12197
12198                    #[allow(unused_variables)]
12199                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12200                    where
12201                        E: serde::de::Error,
12202                    {
12203                        match value {
12204                            "groupId" | "group_id" => Ok(GeneratedField::GroupId),
12205                            "tableIds" | "table_ids" => Ok(GeneratedField::TableIds),
12206                            "partitionVnodeCount" | "partition_vnode_count" => Ok(GeneratedField::PartitionVnodeCount),
12207                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12208                        }
12209                    }
12210                }
12211                deserializer.deserialize_identifier(GeneratedVisitor)
12212            }
12213        }
12214        struct GeneratedVisitor;
12215        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12216            type Value = SplitCompactionGroupRequest;
12217
12218            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12219                formatter.write_str("struct hummock.SplitCompactionGroupRequest")
12220            }
12221
12222            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SplitCompactionGroupRequest, V::Error>
12223                where
12224                    V: serde::de::MapAccess<'de>,
12225            {
12226                let mut group_id__ = None;
12227                let mut table_ids__ = None;
12228                let mut partition_vnode_count__ = None;
12229                while let Some(k) = map_.next_key()? {
12230                    match k {
12231                        GeneratedField::GroupId => {
12232                            if group_id__.is_some() {
12233                                return Err(serde::de::Error::duplicate_field("groupId"));
12234                            }
12235                            group_id__ = 
12236                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12237                            ;
12238                        }
12239                        GeneratedField::TableIds => {
12240                            if table_ids__.is_some() {
12241                                return Err(serde::de::Error::duplicate_field("tableIds"));
12242                            }
12243                            table_ids__ = 
12244                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
12245                                    .into_iter().map(|x| x.0).collect())
12246                            ;
12247                        }
12248                        GeneratedField::PartitionVnodeCount => {
12249                            if partition_vnode_count__.is_some() {
12250                                return Err(serde::de::Error::duplicate_field("partitionVnodeCount"));
12251                            }
12252                            partition_vnode_count__ = 
12253                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12254                            ;
12255                        }
12256                    }
12257                }
12258                Ok(SplitCompactionGroupRequest {
12259                    group_id: group_id__.unwrap_or_default(),
12260                    table_ids: table_ids__.unwrap_or_default(),
12261                    partition_vnode_count: partition_vnode_count__.unwrap_or_default(),
12262                })
12263            }
12264        }
12265        deserializer.deserialize_struct("hummock.SplitCompactionGroupRequest", FIELDS, GeneratedVisitor)
12266    }
12267}
12268impl serde::Serialize for SplitCompactionGroupResponse {
12269    #[allow(deprecated)]
12270    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12271    where
12272        S: serde::Serializer,
12273    {
12274        use serde::ser::SerializeStruct;
12275        let mut len = 0;
12276        if self.new_group_id != 0 {
12277            len += 1;
12278        }
12279        let mut struct_ser = serializer.serialize_struct("hummock.SplitCompactionGroupResponse", len)?;
12280        if self.new_group_id != 0 {
12281            #[allow(clippy::needless_borrow)]
12282            #[allow(clippy::needless_borrows_for_generic_args)]
12283            struct_ser.serialize_field("newGroupId", ToString::to_string(&self.new_group_id).as_str())?;
12284        }
12285        struct_ser.end()
12286    }
12287}
12288impl<'de> serde::Deserialize<'de> for SplitCompactionGroupResponse {
12289    #[allow(deprecated)]
12290    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12291    where
12292        D: serde::Deserializer<'de>,
12293    {
12294        const FIELDS: &[&str] = &[
12295            "new_group_id",
12296            "newGroupId",
12297        ];
12298
12299        #[allow(clippy::enum_variant_names)]
12300        enum GeneratedField {
12301            NewGroupId,
12302        }
12303        impl<'de> serde::Deserialize<'de> for GeneratedField {
12304            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12305            where
12306                D: serde::Deserializer<'de>,
12307            {
12308                struct GeneratedVisitor;
12309
12310                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12311                    type Value = GeneratedField;
12312
12313                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12314                        write!(formatter, "expected one of: {:?}", &FIELDS)
12315                    }
12316
12317                    #[allow(unused_variables)]
12318                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12319                    where
12320                        E: serde::de::Error,
12321                    {
12322                        match value {
12323                            "newGroupId" | "new_group_id" => Ok(GeneratedField::NewGroupId),
12324                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12325                        }
12326                    }
12327                }
12328                deserializer.deserialize_identifier(GeneratedVisitor)
12329            }
12330        }
12331        struct GeneratedVisitor;
12332        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12333            type Value = SplitCompactionGroupResponse;
12334
12335            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12336                formatter.write_str("struct hummock.SplitCompactionGroupResponse")
12337            }
12338
12339            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SplitCompactionGroupResponse, V::Error>
12340                where
12341                    V: serde::de::MapAccess<'de>,
12342            {
12343                let mut new_group_id__ = None;
12344                while let Some(k) = map_.next_key()? {
12345                    match k {
12346                        GeneratedField::NewGroupId => {
12347                            if new_group_id__.is_some() {
12348                                return Err(serde::de::Error::duplicate_field("newGroupId"));
12349                            }
12350                            new_group_id__ = 
12351                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12352                            ;
12353                        }
12354                    }
12355                }
12356                Ok(SplitCompactionGroupResponse {
12357                    new_group_id: new_group_id__.unwrap_or_default(),
12358                })
12359            }
12360        }
12361        deserializer.deserialize_struct("hummock.SplitCompactionGroupResponse", FIELDS, GeneratedVisitor)
12362    }
12363}
12364impl serde::Serialize for SstableInfo {
12365    #[allow(deprecated)]
12366    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12367    where
12368        S: serde::Serializer,
12369    {
12370        use serde::ser::SerializeStruct;
12371        let mut len = 0;
12372        if self.object_id != 0 {
12373            len += 1;
12374        }
12375        if self.sst_id != 0 {
12376            len += 1;
12377        }
12378        if self.key_range.is_some() {
12379            len += 1;
12380        }
12381        if self.file_size != 0 {
12382            len += 1;
12383        }
12384        if !self.table_ids.is_empty() {
12385            len += 1;
12386        }
12387        if self.meta_offset != 0 {
12388            len += 1;
12389        }
12390        if self.stale_key_count != 0 {
12391            len += 1;
12392        }
12393        if self.total_key_count != 0 {
12394            len += 1;
12395        }
12396        if self.min_epoch != 0 {
12397            len += 1;
12398        }
12399        if self.max_epoch != 0 {
12400            len += 1;
12401        }
12402        if self.uncompressed_file_size != 0 {
12403            len += 1;
12404        }
12405        if self.range_tombstone_count != 0 {
12406            len += 1;
12407        }
12408        if self.bloom_filter_kind != 0 {
12409            len += 1;
12410        }
12411        if self.sst_size != 0 {
12412            len += 1;
12413        }
12414        let mut struct_ser = serializer.serialize_struct("hummock.SstableInfo", len)?;
12415        if self.object_id != 0 {
12416            #[allow(clippy::needless_borrow)]
12417            #[allow(clippy::needless_borrows_for_generic_args)]
12418            struct_ser.serialize_field("objectId", ToString::to_string(&self.object_id).as_str())?;
12419        }
12420        if self.sst_id != 0 {
12421            #[allow(clippy::needless_borrow)]
12422            #[allow(clippy::needless_borrows_for_generic_args)]
12423            struct_ser.serialize_field("sstId", ToString::to_string(&self.sst_id).as_str())?;
12424        }
12425        if let Some(v) = self.key_range.as_ref() {
12426            struct_ser.serialize_field("keyRange", v)?;
12427        }
12428        if self.file_size != 0 {
12429            #[allow(clippy::needless_borrow)]
12430            #[allow(clippy::needless_borrows_for_generic_args)]
12431            struct_ser.serialize_field("fileSize", ToString::to_string(&self.file_size).as_str())?;
12432        }
12433        if !self.table_ids.is_empty() {
12434            struct_ser.serialize_field("tableIds", &self.table_ids)?;
12435        }
12436        if self.meta_offset != 0 {
12437            #[allow(clippy::needless_borrow)]
12438            #[allow(clippy::needless_borrows_for_generic_args)]
12439            struct_ser.serialize_field("metaOffset", ToString::to_string(&self.meta_offset).as_str())?;
12440        }
12441        if self.stale_key_count != 0 {
12442            #[allow(clippy::needless_borrow)]
12443            #[allow(clippy::needless_borrows_for_generic_args)]
12444            struct_ser.serialize_field("staleKeyCount", ToString::to_string(&self.stale_key_count).as_str())?;
12445        }
12446        if self.total_key_count != 0 {
12447            #[allow(clippy::needless_borrow)]
12448            #[allow(clippy::needless_borrows_for_generic_args)]
12449            struct_ser.serialize_field("totalKeyCount", ToString::to_string(&self.total_key_count).as_str())?;
12450        }
12451        if self.min_epoch != 0 {
12452            #[allow(clippy::needless_borrow)]
12453            #[allow(clippy::needless_borrows_for_generic_args)]
12454            struct_ser.serialize_field("minEpoch", ToString::to_string(&self.min_epoch).as_str())?;
12455        }
12456        if self.max_epoch != 0 {
12457            #[allow(clippy::needless_borrow)]
12458            #[allow(clippy::needless_borrows_for_generic_args)]
12459            struct_ser.serialize_field("maxEpoch", ToString::to_string(&self.max_epoch).as_str())?;
12460        }
12461        if self.uncompressed_file_size != 0 {
12462            #[allow(clippy::needless_borrow)]
12463            #[allow(clippy::needless_borrows_for_generic_args)]
12464            struct_ser.serialize_field("uncompressedFileSize", ToString::to_string(&self.uncompressed_file_size).as_str())?;
12465        }
12466        if self.range_tombstone_count != 0 {
12467            #[allow(clippy::needless_borrow)]
12468            #[allow(clippy::needless_borrows_for_generic_args)]
12469            struct_ser.serialize_field("rangeTombstoneCount", ToString::to_string(&self.range_tombstone_count).as_str())?;
12470        }
12471        if self.bloom_filter_kind != 0 {
12472            let v = BloomFilterType::try_from(self.bloom_filter_kind)
12473                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.bloom_filter_kind)))?;
12474            struct_ser.serialize_field("bloomFilterKind", &v)?;
12475        }
12476        if self.sst_size != 0 {
12477            #[allow(clippy::needless_borrow)]
12478            #[allow(clippy::needless_borrows_for_generic_args)]
12479            struct_ser.serialize_field("sstSize", ToString::to_string(&self.sst_size).as_str())?;
12480        }
12481        struct_ser.end()
12482    }
12483}
12484impl<'de> serde::Deserialize<'de> for SstableInfo {
12485    #[allow(deprecated)]
12486    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12487    where
12488        D: serde::Deserializer<'de>,
12489    {
12490        const FIELDS: &[&str] = &[
12491            "object_id",
12492            "objectId",
12493            "sst_id",
12494            "sstId",
12495            "key_range",
12496            "keyRange",
12497            "file_size",
12498            "fileSize",
12499            "table_ids",
12500            "tableIds",
12501            "meta_offset",
12502            "metaOffset",
12503            "stale_key_count",
12504            "staleKeyCount",
12505            "total_key_count",
12506            "totalKeyCount",
12507            "min_epoch",
12508            "minEpoch",
12509            "max_epoch",
12510            "maxEpoch",
12511            "uncompressed_file_size",
12512            "uncompressedFileSize",
12513            "range_tombstone_count",
12514            "rangeTombstoneCount",
12515            "bloom_filter_kind",
12516            "bloomFilterKind",
12517            "sst_size",
12518            "sstSize",
12519        ];
12520
12521        #[allow(clippy::enum_variant_names)]
12522        enum GeneratedField {
12523            ObjectId,
12524            SstId,
12525            KeyRange,
12526            FileSize,
12527            TableIds,
12528            MetaOffset,
12529            StaleKeyCount,
12530            TotalKeyCount,
12531            MinEpoch,
12532            MaxEpoch,
12533            UncompressedFileSize,
12534            RangeTombstoneCount,
12535            BloomFilterKind,
12536            SstSize,
12537        }
12538        impl<'de> serde::Deserialize<'de> for GeneratedField {
12539            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12540            where
12541                D: serde::Deserializer<'de>,
12542            {
12543                struct GeneratedVisitor;
12544
12545                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12546                    type Value = GeneratedField;
12547
12548                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12549                        write!(formatter, "expected one of: {:?}", &FIELDS)
12550                    }
12551
12552                    #[allow(unused_variables)]
12553                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12554                    where
12555                        E: serde::de::Error,
12556                    {
12557                        match value {
12558                            "objectId" | "object_id" => Ok(GeneratedField::ObjectId),
12559                            "sstId" | "sst_id" => Ok(GeneratedField::SstId),
12560                            "keyRange" | "key_range" => Ok(GeneratedField::KeyRange),
12561                            "fileSize" | "file_size" => Ok(GeneratedField::FileSize),
12562                            "tableIds" | "table_ids" => Ok(GeneratedField::TableIds),
12563                            "metaOffset" | "meta_offset" => Ok(GeneratedField::MetaOffset),
12564                            "staleKeyCount" | "stale_key_count" => Ok(GeneratedField::StaleKeyCount),
12565                            "totalKeyCount" | "total_key_count" => Ok(GeneratedField::TotalKeyCount),
12566                            "minEpoch" | "min_epoch" => Ok(GeneratedField::MinEpoch),
12567                            "maxEpoch" | "max_epoch" => Ok(GeneratedField::MaxEpoch),
12568                            "uncompressedFileSize" | "uncompressed_file_size" => Ok(GeneratedField::UncompressedFileSize),
12569                            "rangeTombstoneCount" | "range_tombstone_count" => Ok(GeneratedField::RangeTombstoneCount),
12570                            "bloomFilterKind" | "bloom_filter_kind" => Ok(GeneratedField::BloomFilterKind),
12571                            "sstSize" | "sst_size" => Ok(GeneratedField::SstSize),
12572                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12573                        }
12574                    }
12575                }
12576                deserializer.deserialize_identifier(GeneratedVisitor)
12577            }
12578        }
12579        struct GeneratedVisitor;
12580        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12581            type Value = SstableInfo;
12582
12583            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12584                formatter.write_str("struct hummock.SstableInfo")
12585            }
12586
12587            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SstableInfo, V::Error>
12588                where
12589                    V: serde::de::MapAccess<'de>,
12590            {
12591                let mut object_id__ = None;
12592                let mut sst_id__ = None;
12593                let mut key_range__ = None;
12594                let mut file_size__ = None;
12595                let mut table_ids__ = None;
12596                let mut meta_offset__ = None;
12597                let mut stale_key_count__ = None;
12598                let mut total_key_count__ = None;
12599                let mut min_epoch__ = None;
12600                let mut max_epoch__ = None;
12601                let mut uncompressed_file_size__ = None;
12602                let mut range_tombstone_count__ = None;
12603                let mut bloom_filter_kind__ = None;
12604                let mut sst_size__ = None;
12605                while let Some(k) = map_.next_key()? {
12606                    match k {
12607                        GeneratedField::ObjectId => {
12608                            if object_id__.is_some() {
12609                                return Err(serde::de::Error::duplicate_field("objectId"));
12610                            }
12611                            object_id__ = 
12612                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12613                            ;
12614                        }
12615                        GeneratedField::SstId => {
12616                            if sst_id__.is_some() {
12617                                return Err(serde::de::Error::duplicate_field("sstId"));
12618                            }
12619                            sst_id__ = 
12620                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12621                            ;
12622                        }
12623                        GeneratedField::KeyRange => {
12624                            if key_range__.is_some() {
12625                                return Err(serde::de::Error::duplicate_field("keyRange"));
12626                            }
12627                            key_range__ = map_.next_value()?;
12628                        }
12629                        GeneratedField::FileSize => {
12630                            if file_size__.is_some() {
12631                                return Err(serde::de::Error::duplicate_field("fileSize"));
12632                            }
12633                            file_size__ = 
12634                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12635                            ;
12636                        }
12637                        GeneratedField::TableIds => {
12638                            if table_ids__.is_some() {
12639                                return Err(serde::de::Error::duplicate_field("tableIds"));
12640                            }
12641                            table_ids__ = 
12642                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
12643                                    .into_iter().map(|x| x.0).collect())
12644                            ;
12645                        }
12646                        GeneratedField::MetaOffset => {
12647                            if meta_offset__.is_some() {
12648                                return Err(serde::de::Error::duplicate_field("metaOffset"));
12649                            }
12650                            meta_offset__ = 
12651                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12652                            ;
12653                        }
12654                        GeneratedField::StaleKeyCount => {
12655                            if stale_key_count__.is_some() {
12656                                return Err(serde::de::Error::duplicate_field("staleKeyCount"));
12657                            }
12658                            stale_key_count__ = 
12659                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12660                            ;
12661                        }
12662                        GeneratedField::TotalKeyCount => {
12663                            if total_key_count__.is_some() {
12664                                return Err(serde::de::Error::duplicate_field("totalKeyCount"));
12665                            }
12666                            total_key_count__ = 
12667                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12668                            ;
12669                        }
12670                        GeneratedField::MinEpoch => {
12671                            if min_epoch__.is_some() {
12672                                return Err(serde::de::Error::duplicate_field("minEpoch"));
12673                            }
12674                            min_epoch__ = 
12675                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12676                            ;
12677                        }
12678                        GeneratedField::MaxEpoch => {
12679                            if max_epoch__.is_some() {
12680                                return Err(serde::de::Error::duplicate_field("maxEpoch"));
12681                            }
12682                            max_epoch__ = 
12683                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12684                            ;
12685                        }
12686                        GeneratedField::UncompressedFileSize => {
12687                            if uncompressed_file_size__.is_some() {
12688                                return Err(serde::de::Error::duplicate_field("uncompressedFileSize"));
12689                            }
12690                            uncompressed_file_size__ = 
12691                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12692                            ;
12693                        }
12694                        GeneratedField::RangeTombstoneCount => {
12695                            if range_tombstone_count__.is_some() {
12696                                return Err(serde::de::Error::duplicate_field("rangeTombstoneCount"));
12697                            }
12698                            range_tombstone_count__ = 
12699                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12700                            ;
12701                        }
12702                        GeneratedField::BloomFilterKind => {
12703                            if bloom_filter_kind__.is_some() {
12704                                return Err(serde::de::Error::duplicate_field("bloomFilterKind"));
12705                            }
12706                            bloom_filter_kind__ = Some(map_.next_value::<BloomFilterType>()? as i32);
12707                        }
12708                        GeneratedField::SstSize => {
12709                            if sst_size__.is_some() {
12710                                return Err(serde::de::Error::duplicate_field("sstSize"));
12711                            }
12712                            sst_size__ = 
12713                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12714                            ;
12715                        }
12716                    }
12717                }
12718                Ok(SstableInfo {
12719                    object_id: object_id__.unwrap_or_default(),
12720                    sst_id: sst_id__.unwrap_or_default(),
12721                    key_range: key_range__,
12722                    file_size: file_size__.unwrap_or_default(),
12723                    table_ids: table_ids__.unwrap_or_default(),
12724                    meta_offset: meta_offset__.unwrap_or_default(),
12725                    stale_key_count: stale_key_count__.unwrap_or_default(),
12726                    total_key_count: total_key_count__.unwrap_or_default(),
12727                    min_epoch: min_epoch__.unwrap_or_default(),
12728                    max_epoch: max_epoch__.unwrap_or_default(),
12729                    uncompressed_file_size: uncompressed_file_size__.unwrap_or_default(),
12730                    range_tombstone_count: range_tombstone_count__.unwrap_or_default(),
12731                    bloom_filter_kind: bloom_filter_kind__.unwrap_or_default(),
12732                    sst_size: sst_size__.unwrap_or_default(),
12733                })
12734            }
12735        }
12736        deserializer.deserialize_struct("hummock.SstableInfo", FIELDS, GeneratedVisitor)
12737    }
12738}
12739impl serde::Serialize for StateTableInfo {
12740    #[allow(deprecated)]
12741    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12742    where
12743        S: serde::Serializer,
12744    {
12745        use serde::ser::SerializeStruct;
12746        let mut len = 0;
12747        if self.committed_epoch != 0 {
12748            len += 1;
12749        }
12750        if self.compaction_group_id != 0 {
12751            len += 1;
12752        }
12753        let mut struct_ser = serializer.serialize_struct("hummock.StateTableInfo", len)?;
12754        if self.committed_epoch != 0 {
12755            #[allow(clippy::needless_borrow)]
12756            #[allow(clippy::needless_borrows_for_generic_args)]
12757            struct_ser.serialize_field("committedEpoch", ToString::to_string(&self.committed_epoch).as_str())?;
12758        }
12759        if self.compaction_group_id != 0 {
12760            #[allow(clippy::needless_borrow)]
12761            #[allow(clippy::needless_borrows_for_generic_args)]
12762            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&self.compaction_group_id).as_str())?;
12763        }
12764        struct_ser.end()
12765    }
12766}
12767impl<'de> serde::Deserialize<'de> for StateTableInfo {
12768    #[allow(deprecated)]
12769    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12770    where
12771        D: serde::Deserializer<'de>,
12772    {
12773        const FIELDS: &[&str] = &[
12774            "committed_epoch",
12775            "committedEpoch",
12776            "compaction_group_id",
12777            "compactionGroupId",
12778        ];
12779
12780        #[allow(clippy::enum_variant_names)]
12781        enum GeneratedField {
12782            CommittedEpoch,
12783            CompactionGroupId,
12784        }
12785        impl<'de> serde::Deserialize<'de> for GeneratedField {
12786            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12787            where
12788                D: serde::Deserializer<'de>,
12789            {
12790                struct GeneratedVisitor;
12791
12792                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12793                    type Value = GeneratedField;
12794
12795                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12796                        write!(formatter, "expected one of: {:?}", &FIELDS)
12797                    }
12798
12799                    #[allow(unused_variables)]
12800                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12801                    where
12802                        E: serde::de::Error,
12803                    {
12804                        match value {
12805                            "committedEpoch" | "committed_epoch" => Ok(GeneratedField::CommittedEpoch),
12806                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
12807                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12808                        }
12809                    }
12810                }
12811                deserializer.deserialize_identifier(GeneratedVisitor)
12812            }
12813        }
12814        struct GeneratedVisitor;
12815        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12816            type Value = StateTableInfo;
12817
12818            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12819                formatter.write_str("struct hummock.StateTableInfo")
12820            }
12821
12822            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StateTableInfo, V::Error>
12823                where
12824                    V: serde::de::MapAccess<'de>,
12825            {
12826                let mut committed_epoch__ = None;
12827                let mut compaction_group_id__ = None;
12828                while let Some(k) = map_.next_key()? {
12829                    match k {
12830                        GeneratedField::CommittedEpoch => {
12831                            if committed_epoch__.is_some() {
12832                                return Err(serde::de::Error::duplicate_field("committedEpoch"));
12833                            }
12834                            committed_epoch__ = 
12835                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12836                            ;
12837                        }
12838                        GeneratedField::CompactionGroupId => {
12839                            if compaction_group_id__.is_some() {
12840                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
12841                            }
12842                            compaction_group_id__ = 
12843                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12844                            ;
12845                        }
12846                    }
12847                }
12848                Ok(StateTableInfo {
12849                    committed_epoch: committed_epoch__.unwrap_or_default(),
12850                    compaction_group_id: compaction_group_id__.unwrap_or_default(),
12851                })
12852            }
12853        }
12854        deserializer.deserialize_struct("hummock.StateTableInfo", FIELDS, GeneratedVisitor)
12855    }
12856}
12857impl serde::Serialize for StateTableInfoDelta {
12858    #[allow(deprecated)]
12859    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12860    where
12861        S: serde::Serializer,
12862    {
12863        use serde::ser::SerializeStruct;
12864        let mut len = 0;
12865        if self.committed_epoch != 0 {
12866            len += 1;
12867        }
12868        if self.compaction_group_id != 0 {
12869            len += 1;
12870        }
12871        let mut struct_ser = serializer.serialize_struct("hummock.StateTableInfoDelta", len)?;
12872        if self.committed_epoch != 0 {
12873            #[allow(clippy::needless_borrow)]
12874            #[allow(clippy::needless_borrows_for_generic_args)]
12875            struct_ser.serialize_field("committedEpoch", ToString::to_string(&self.committed_epoch).as_str())?;
12876        }
12877        if self.compaction_group_id != 0 {
12878            #[allow(clippy::needless_borrow)]
12879            #[allow(clippy::needless_borrows_for_generic_args)]
12880            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&self.compaction_group_id).as_str())?;
12881        }
12882        struct_ser.end()
12883    }
12884}
12885impl<'de> serde::Deserialize<'de> for StateTableInfoDelta {
12886    #[allow(deprecated)]
12887    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12888    where
12889        D: serde::Deserializer<'de>,
12890    {
12891        const FIELDS: &[&str] = &[
12892            "committed_epoch",
12893            "committedEpoch",
12894            "compaction_group_id",
12895            "compactionGroupId",
12896        ];
12897
12898        #[allow(clippy::enum_variant_names)]
12899        enum GeneratedField {
12900            CommittedEpoch,
12901            CompactionGroupId,
12902        }
12903        impl<'de> serde::Deserialize<'de> for GeneratedField {
12904            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12905            where
12906                D: serde::Deserializer<'de>,
12907            {
12908                struct GeneratedVisitor;
12909
12910                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12911                    type Value = GeneratedField;
12912
12913                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12914                        write!(formatter, "expected one of: {:?}", &FIELDS)
12915                    }
12916
12917                    #[allow(unused_variables)]
12918                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12919                    where
12920                        E: serde::de::Error,
12921                    {
12922                        match value {
12923                            "committedEpoch" | "committed_epoch" => Ok(GeneratedField::CommittedEpoch),
12924                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
12925                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12926                        }
12927                    }
12928                }
12929                deserializer.deserialize_identifier(GeneratedVisitor)
12930            }
12931        }
12932        struct GeneratedVisitor;
12933        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12934            type Value = StateTableInfoDelta;
12935
12936            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12937                formatter.write_str("struct hummock.StateTableInfoDelta")
12938            }
12939
12940            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StateTableInfoDelta, V::Error>
12941                where
12942                    V: serde::de::MapAccess<'de>,
12943            {
12944                let mut committed_epoch__ = None;
12945                let mut compaction_group_id__ = None;
12946                while let Some(k) = map_.next_key()? {
12947                    match k {
12948                        GeneratedField::CommittedEpoch => {
12949                            if committed_epoch__.is_some() {
12950                                return Err(serde::de::Error::duplicate_field("committedEpoch"));
12951                            }
12952                            committed_epoch__ = 
12953                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12954                            ;
12955                        }
12956                        GeneratedField::CompactionGroupId => {
12957                            if compaction_group_id__.is_some() {
12958                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
12959                            }
12960                            compaction_group_id__ = 
12961                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12962                            ;
12963                        }
12964                    }
12965                }
12966                Ok(StateTableInfoDelta {
12967                    committed_epoch: committed_epoch__.unwrap_or_default(),
12968                    compaction_group_id: compaction_group_id__.unwrap_or_default(),
12969                })
12970            }
12971        }
12972        deserializer.deserialize_struct("hummock.StateTableInfoDelta", FIELDS, GeneratedVisitor)
12973    }
12974}
12975impl serde::Serialize for SubscribeCompactionEventRequest {
12976    #[allow(deprecated)]
12977    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12978    where
12979        S: serde::Serializer,
12980    {
12981        use serde::ser::SerializeStruct;
12982        let mut len = 0;
12983        if self.create_at != 0 {
12984            len += 1;
12985        }
12986        if self.event.is_some() {
12987            len += 1;
12988        }
12989        let mut struct_ser = serializer.serialize_struct("hummock.SubscribeCompactionEventRequest", len)?;
12990        if self.create_at != 0 {
12991            #[allow(clippy::needless_borrow)]
12992            #[allow(clippy::needless_borrows_for_generic_args)]
12993            struct_ser.serialize_field("createAt", ToString::to_string(&self.create_at).as_str())?;
12994        }
12995        if let Some(v) = self.event.as_ref() {
12996            match v {
12997                subscribe_compaction_event_request::Event::Register(v) => {
12998                    struct_ser.serialize_field("register", v)?;
12999                }
13000                subscribe_compaction_event_request::Event::PullTask(v) => {
13001                    struct_ser.serialize_field("pullTask", v)?;
13002                }
13003                subscribe_compaction_event_request::Event::ReportTask(v) => {
13004                    struct_ser.serialize_field("reportTask", v)?;
13005                }
13006                subscribe_compaction_event_request::Event::HeartBeat(v) => {
13007                    struct_ser.serialize_field("heartBeat", v)?;
13008                }
13009            }
13010        }
13011        struct_ser.end()
13012    }
13013}
13014impl<'de> serde::Deserialize<'de> for SubscribeCompactionEventRequest {
13015    #[allow(deprecated)]
13016    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13017    where
13018        D: serde::Deserializer<'de>,
13019    {
13020        const FIELDS: &[&str] = &[
13021            "create_at",
13022            "createAt",
13023            "register",
13024            "pull_task",
13025            "pullTask",
13026            "report_task",
13027            "reportTask",
13028            "heart_beat",
13029            "heartBeat",
13030        ];
13031
13032        #[allow(clippy::enum_variant_names)]
13033        enum GeneratedField {
13034            CreateAt,
13035            Register,
13036            PullTask,
13037            ReportTask,
13038            HeartBeat,
13039        }
13040        impl<'de> serde::Deserialize<'de> for GeneratedField {
13041            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13042            where
13043                D: serde::Deserializer<'de>,
13044            {
13045                struct GeneratedVisitor;
13046
13047                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13048                    type Value = GeneratedField;
13049
13050                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13051                        write!(formatter, "expected one of: {:?}", &FIELDS)
13052                    }
13053
13054                    #[allow(unused_variables)]
13055                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13056                    where
13057                        E: serde::de::Error,
13058                    {
13059                        match value {
13060                            "createAt" | "create_at" => Ok(GeneratedField::CreateAt),
13061                            "register" => Ok(GeneratedField::Register),
13062                            "pullTask" | "pull_task" => Ok(GeneratedField::PullTask),
13063                            "reportTask" | "report_task" => Ok(GeneratedField::ReportTask),
13064                            "heartBeat" | "heart_beat" => Ok(GeneratedField::HeartBeat),
13065                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13066                        }
13067                    }
13068                }
13069                deserializer.deserialize_identifier(GeneratedVisitor)
13070            }
13071        }
13072        struct GeneratedVisitor;
13073        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13074            type Value = SubscribeCompactionEventRequest;
13075
13076            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13077                formatter.write_str("struct hummock.SubscribeCompactionEventRequest")
13078            }
13079
13080            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SubscribeCompactionEventRequest, V::Error>
13081                where
13082                    V: serde::de::MapAccess<'de>,
13083            {
13084                let mut create_at__ = None;
13085                let mut event__ = None;
13086                while let Some(k) = map_.next_key()? {
13087                    match k {
13088                        GeneratedField::CreateAt => {
13089                            if create_at__.is_some() {
13090                                return Err(serde::de::Error::duplicate_field("createAt"));
13091                            }
13092                            create_at__ = 
13093                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13094                            ;
13095                        }
13096                        GeneratedField::Register => {
13097                            if event__.is_some() {
13098                                return Err(serde::de::Error::duplicate_field("register"));
13099                            }
13100                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_request::Event::Register)
13101;
13102                        }
13103                        GeneratedField::PullTask => {
13104                            if event__.is_some() {
13105                                return Err(serde::de::Error::duplicate_field("pullTask"));
13106                            }
13107                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_request::Event::PullTask)
13108;
13109                        }
13110                        GeneratedField::ReportTask => {
13111                            if event__.is_some() {
13112                                return Err(serde::de::Error::duplicate_field("reportTask"));
13113                            }
13114                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_request::Event::ReportTask)
13115;
13116                        }
13117                        GeneratedField::HeartBeat => {
13118                            if event__.is_some() {
13119                                return Err(serde::de::Error::duplicate_field("heartBeat"));
13120                            }
13121                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_request::Event::HeartBeat)
13122;
13123                        }
13124                    }
13125                }
13126                Ok(SubscribeCompactionEventRequest {
13127                    create_at: create_at__.unwrap_or_default(),
13128                    event: event__,
13129                })
13130            }
13131        }
13132        deserializer.deserialize_struct("hummock.SubscribeCompactionEventRequest", FIELDS, GeneratedVisitor)
13133    }
13134}
13135impl serde::Serialize for subscribe_compaction_event_request::HeartBeat {
13136    #[allow(deprecated)]
13137    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13138    where
13139        S: serde::Serializer,
13140    {
13141        use serde::ser::SerializeStruct;
13142        let mut len = 0;
13143        if !self.progress.is_empty() {
13144            len += 1;
13145        }
13146        let mut struct_ser = serializer.serialize_struct("hummock.SubscribeCompactionEventRequest.HeartBeat", len)?;
13147        if !self.progress.is_empty() {
13148            struct_ser.serialize_field("progress", &self.progress)?;
13149        }
13150        struct_ser.end()
13151    }
13152}
13153impl<'de> serde::Deserialize<'de> for subscribe_compaction_event_request::HeartBeat {
13154    #[allow(deprecated)]
13155    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13156    where
13157        D: serde::Deserializer<'de>,
13158    {
13159        const FIELDS: &[&str] = &[
13160            "progress",
13161        ];
13162
13163        #[allow(clippy::enum_variant_names)]
13164        enum GeneratedField {
13165            Progress,
13166        }
13167        impl<'de> serde::Deserialize<'de> for GeneratedField {
13168            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13169            where
13170                D: serde::Deserializer<'de>,
13171            {
13172                struct GeneratedVisitor;
13173
13174                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13175                    type Value = GeneratedField;
13176
13177                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13178                        write!(formatter, "expected one of: {:?}", &FIELDS)
13179                    }
13180
13181                    #[allow(unused_variables)]
13182                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13183                    where
13184                        E: serde::de::Error,
13185                    {
13186                        match value {
13187                            "progress" => Ok(GeneratedField::Progress),
13188                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13189                        }
13190                    }
13191                }
13192                deserializer.deserialize_identifier(GeneratedVisitor)
13193            }
13194        }
13195        struct GeneratedVisitor;
13196        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13197            type Value = subscribe_compaction_event_request::HeartBeat;
13198
13199            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13200                formatter.write_str("struct hummock.SubscribeCompactionEventRequest.HeartBeat")
13201            }
13202
13203            fn visit_map<V>(self, mut map_: V) -> std::result::Result<subscribe_compaction_event_request::HeartBeat, V::Error>
13204                where
13205                    V: serde::de::MapAccess<'de>,
13206            {
13207                let mut progress__ = None;
13208                while let Some(k) = map_.next_key()? {
13209                    match k {
13210                        GeneratedField::Progress => {
13211                            if progress__.is_some() {
13212                                return Err(serde::de::Error::duplicate_field("progress"));
13213                            }
13214                            progress__ = Some(map_.next_value()?);
13215                        }
13216                    }
13217                }
13218                Ok(subscribe_compaction_event_request::HeartBeat {
13219                    progress: progress__.unwrap_or_default(),
13220                })
13221            }
13222        }
13223        deserializer.deserialize_struct("hummock.SubscribeCompactionEventRequest.HeartBeat", FIELDS, GeneratedVisitor)
13224    }
13225}
13226impl serde::Serialize for subscribe_compaction_event_request::PullTask {
13227    #[allow(deprecated)]
13228    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13229    where
13230        S: serde::Serializer,
13231    {
13232        use serde::ser::SerializeStruct;
13233        let mut len = 0;
13234        if self.pull_task_count != 0 {
13235            len += 1;
13236        }
13237        let mut struct_ser = serializer.serialize_struct("hummock.SubscribeCompactionEventRequest.PullTask", len)?;
13238        if self.pull_task_count != 0 {
13239            struct_ser.serialize_field("pullTaskCount", &self.pull_task_count)?;
13240        }
13241        struct_ser.end()
13242    }
13243}
13244impl<'de> serde::Deserialize<'de> for subscribe_compaction_event_request::PullTask {
13245    #[allow(deprecated)]
13246    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13247    where
13248        D: serde::Deserializer<'de>,
13249    {
13250        const FIELDS: &[&str] = &[
13251            "pull_task_count",
13252            "pullTaskCount",
13253        ];
13254
13255        #[allow(clippy::enum_variant_names)]
13256        enum GeneratedField {
13257            PullTaskCount,
13258        }
13259        impl<'de> serde::Deserialize<'de> for GeneratedField {
13260            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13261            where
13262                D: serde::Deserializer<'de>,
13263            {
13264                struct GeneratedVisitor;
13265
13266                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13267                    type Value = GeneratedField;
13268
13269                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13270                        write!(formatter, "expected one of: {:?}", &FIELDS)
13271                    }
13272
13273                    #[allow(unused_variables)]
13274                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13275                    where
13276                        E: serde::de::Error,
13277                    {
13278                        match value {
13279                            "pullTaskCount" | "pull_task_count" => Ok(GeneratedField::PullTaskCount),
13280                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13281                        }
13282                    }
13283                }
13284                deserializer.deserialize_identifier(GeneratedVisitor)
13285            }
13286        }
13287        struct GeneratedVisitor;
13288        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13289            type Value = subscribe_compaction_event_request::PullTask;
13290
13291            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13292                formatter.write_str("struct hummock.SubscribeCompactionEventRequest.PullTask")
13293            }
13294
13295            fn visit_map<V>(self, mut map_: V) -> std::result::Result<subscribe_compaction_event_request::PullTask, V::Error>
13296                where
13297                    V: serde::de::MapAccess<'de>,
13298            {
13299                let mut pull_task_count__ = None;
13300                while let Some(k) = map_.next_key()? {
13301                    match k {
13302                        GeneratedField::PullTaskCount => {
13303                            if pull_task_count__.is_some() {
13304                                return Err(serde::de::Error::duplicate_field("pullTaskCount"));
13305                            }
13306                            pull_task_count__ = 
13307                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13308                            ;
13309                        }
13310                    }
13311                }
13312                Ok(subscribe_compaction_event_request::PullTask {
13313                    pull_task_count: pull_task_count__.unwrap_or_default(),
13314                })
13315            }
13316        }
13317        deserializer.deserialize_struct("hummock.SubscribeCompactionEventRequest.PullTask", FIELDS, GeneratedVisitor)
13318    }
13319}
13320impl serde::Serialize for subscribe_compaction_event_request::Register {
13321    #[allow(deprecated)]
13322    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13323    where
13324        S: serde::Serializer,
13325    {
13326        use serde::ser::SerializeStruct;
13327        let mut len = 0;
13328        if self.context_id != 0 {
13329            len += 1;
13330        }
13331        let mut struct_ser = serializer.serialize_struct("hummock.SubscribeCompactionEventRequest.Register", len)?;
13332        if self.context_id != 0 {
13333            struct_ser.serialize_field("contextId", &self.context_id)?;
13334        }
13335        struct_ser.end()
13336    }
13337}
13338impl<'de> serde::Deserialize<'de> for subscribe_compaction_event_request::Register {
13339    #[allow(deprecated)]
13340    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13341    where
13342        D: serde::Deserializer<'de>,
13343    {
13344        const FIELDS: &[&str] = &[
13345            "context_id",
13346            "contextId",
13347        ];
13348
13349        #[allow(clippy::enum_variant_names)]
13350        enum GeneratedField {
13351            ContextId,
13352        }
13353        impl<'de> serde::Deserialize<'de> for GeneratedField {
13354            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13355            where
13356                D: serde::Deserializer<'de>,
13357            {
13358                struct GeneratedVisitor;
13359
13360                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13361                    type Value = GeneratedField;
13362
13363                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13364                        write!(formatter, "expected one of: {:?}", &FIELDS)
13365                    }
13366
13367                    #[allow(unused_variables)]
13368                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13369                    where
13370                        E: serde::de::Error,
13371                    {
13372                        match value {
13373                            "contextId" | "context_id" => Ok(GeneratedField::ContextId),
13374                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13375                        }
13376                    }
13377                }
13378                deserializer.deserialize_identifier(GeneratedVisitor)
13379            }
13380        }
13381        struct GeneratedVisitor;
13382        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13383            type Value = subscribe_compaction_event_request::Register;
13384
13385            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13386                formatter.write_str("struct hummock.SubscribeCompactionEventRequest.Register")
13387            }
13388
13389            fn visit_map<V>(self, mut map_: V) -> std::result::Result<subscribe_compaction_event_request::Register, V::Error>
13390                where
13391                    V: serde::de::MapAccess<'de>,
13392            {
13393                let mut context_id__ = None;
13394                while let Some(k) = map_.next_key()? {
13395                    match k {
13396                        GeneratedField::ContextId => {
13397                            if context_id__.is_some() {
13398                                return Err(serde::de::Error::duplicate_field("contextId"));
13399                            }
13400                            context_id__ = 
13401                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13402                            ;
13403                        }
13404                    }
13405                }
13406                Ok(subscribe_compaction_event_request::Register {
13407                    context_id: context_id__.unwrap_or_default(),
13408                })
13409            }
13410        }
13411        deserializer.deserialize_struct("hummock.SubscribeCompactionEventRequest.Register", FIELDS, GeneratedVisitor)
13412    }
13413}
13414impl serde::Serialize for subscribe_compaction_event_request::ReportTask {
13415    #[allow(deprecated)]
13416    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13417    where
13418        S: serde::Serializer,
13419    {
13420        use serde::ser::SerializeStruct;
13421        let mut len = 0;
13422        if !self.table_stats_change.is_empty() {
13423            len += 1;
13424        }
13425        if self.task_id != 0 {
13426            len += 1;
13427        }
13428        if self.task_status != 0 {
13429            len += 1;
13430        }
13431        if !self.sorted_output_ssts.is_empty() {
13432            len += 1;
13433        }
13434        if !self.object_timestamps.is_empty() {
13435            len += 1;
13436        }
13437        let mut struct_ser = serializer.serialize_struct("hummock.SubscribeCompactionEventRequest.ReportTask", len)?;
13438        if !self.table_stats_change.is_empty() {
13439            struct_ser.serialize_field("tableStatsChange", &self.table_stats_change)?;
13440        }
13441        if self.task_id != 0 {
13442            #[allow(clippy::needless_borrow)]
13443            #[allow(clippy::needless_borrows_for_generic_args)]
13444            struct_ser.serialize_field("taskId", ToString::to_string(&self.task_id).as_str())?;
13445        }
13446        if self.task_status != 0 {
13447            let v = compact_task::TaskStatus::try_from(self.task_status)
13448                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.task_status)))?;
13449            struct_ser.serialize_field("taskStatus", &v)?;
13450        }
13451        if !self.sorted_output_ssts.is_empty() {
13452            struct_ser.serialize_field("sortedOutputSsts", &self.sorted_output_ssts)?;
13453        }
13454        if !self.object_timestamps.is_empty() {
13455            let v: std::collections::HashMap<_, _> = self.object_timestamps.iter()
13456                .map(|(k, v)| (k, v.to_string())).collect();
13457            struct_ser.serialize_field("objectTimestamps", &v)?;
13458        }
13459        struct_ser.end()
13460    }
13461}
13462impl<'de> serde::Deserialize<'de> for subscribe_compaction_event_request::ReportTask {
13463    #[allow(deprecated)]
13464    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13465    where
13466        D: serde::Deserializer<'de>,
13467    {
13468        const FIELDS: &[&str] = &[
13469            "table_stats_change",
13470            "tableStatsChange",
13471            "task_id",
13472            "taskId",
13473            "task_status",
13474            "taskStatus",
13475            "sorted_output_ssts",
13476            "sortedOutputSsts",
13477            "object_timestamps",
13478            "objectTimestamps",
13479        ];
13480
13481        #[allow(clippy::enum_variant_names)]
13482        enum GeneratedField {
13483            TableStatsChange,
13484            TaskId,
13485            TaskStatus,
13486            SortedOutputSsts,
13487            ObjectTimestamps,
13488        }
13489        impl<'de> serde::Deserialize<'de> for GeneratedField {
13490            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13491            where
13492                D: serde::Deserializer<'de>,
13493            {
13494                struct GeneratedVisitor;
13495
13496                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13497                    type Value = GeneratedField;
13498
13499                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13500                        write!(formatter, "expected one of: {:?}", &FIELDS)
13501                    }
13502
13503                    #[allow(unused_variables)]
13504                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13505                    where
13506                        E: serde::de::Error,
13507                    {
13508                        match value {
13509                            "tableStatsChange" | "table_stats_change" => Ok(GeneratedField::TableStatsChange),
13510                            "taskId" | "task_id" => Ok(GeneratedField::TaskId),
13511                            "taskStatus" | "task_status" => Ok(GeneratedField::TaskStatus),
13512                            "sortedOutputSsts" | "sorted_output_ssts" => Ok(GeneratedField::SortedOutputSsts),
13513                            "objectTimestamps" | "object_timestamps" => Ok(GeneratedField::ObjectTimestamps),
13514                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13515                        }
13516                    }
13517                }
13518                deserializer.deserialize_identifier(GeneratedVisitor)
13519            }
13520        }
13521        struct GeneratedVisitor;
13522        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13523            type Value = subscribe_compaction_event_request::ReportTask;
13524
13525            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13526                formatter.write_str("struct hummock.SubscribeCompactionEventRequest.ReportTask")
13527            }
13528
13529            fn visit_map<V>(self, mut map_: V) -> std::result::Result<subscribe_compaction_event_request::ReportTask, V::Error>
13530                where
13531                    V: serde::de::MapAccess<'de>,
13532            {
13533                let mut table_stats_change__ = None;
13534                let mut task_id__ = None;
13535                let mut task_status__ = None;
13536                let mut sorted_output_ssts__ = None;
13537                let mut object_timestamps__ = None;
13538                while let Some(k) = map_.next_key()? {
13539                    match k {
13540                        GeneratedField::TableStatsChange => {
13541                            if table_stats_change__.is_some() {
13542                                return Err(serde::de::Error::duplicate_field("tableStatsChange"));
13543                            }
13544                            table_stats_change__ = Some(
13545                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
13546                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
13547                            );
13548                        }
13549                        GeneratedField::TaskId => {
13550                            if task_id__.is_some() {
13551                                return Err(serde::de::Error::duplicate_field("taskId"));
13552                            }
13553                            task_id__ = 
13554                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13555                            ;
13556                        }
13557                        GeneratedField::TaskStatus => {
13558                            if task_status__.is_some() {
13559                                return Err(serde::de::Error::duplicate_field("taskStatus"));
13560                            }
13561                            task_status__ = Some(map_.next_value::<compact_task::TaskStatus>()? as i32);
13562                        }
13563                        GeneratedField::SortedOutputSsts => {
13564                            if sorted_output_ssts__.is_some() {
13565                                return Err(serde::de::Error::duplicate_field("sortedOutputSsts"));
13566                            }
13567                            sorted_output_ssts__ = Some(map_.next_value()?);
13568                        }
13569                        GeneratedField::ObjectTimestamps => {
13570                            if object_timestamps__.is_some() {
13571                                return Err(serde::de::Error::duplicate_field("objectTimestamps"));
13572                            }
13573                            object_timestamps__ = Some(
13574                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, ::pbjson::private::NumberDeserialize<u64>>>()?
13575                                    .into_iter().map(|(k,v)| (k.0, v.0)).collect()
13576                            );
13577                        }
13578                    }
13579                }
13580                Ok(subscribe_compaction_event_request::ReportTask {
13581                    table_stats_change: table_stats_change__.unwrap_or_default(),
13582                    task_id: task_id__.unwrap_or_default(),
13583                    task_status: task_status__.unwrap_or_default(),
13584                    sorted_output_ssts: sorted_output_ssts__.unwrap_or_default(),
13585                    object_timestamps: object_timestamps__.unwrap_or_default(),
13586                })
13587            }
13588        }
13589        deserializer.deserialize_struct("hummock.SubscribeCompactionEventRequest.ReportTask", FIELDS, GeneratedVisitor)
13590    }
13591}
13592impl serde::Serialize for SubscribeCompactionEventResponse {
13593    #[allow(deprecated)]
13594    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13595    where
13596        S: serde::Serializer,
13597    {
13598        use serde::ser::SerializeStruct;
13599        let mut len = 0;
13600        if self.create_at != 0 {
13601            len += 1;
13602        }
13603        if self.event.is_some() {
13604            len += 1;
13605        }
13606        let mut struct_ser = serializer.serialize_struct("hummock.SubscribeCompactionEventResponse", len)?;
13607        if self.create_at != 0 {
13608            #[allow(clippy::needless_borrow)]
13609            #[allow(clippy::needless_borrows_for_generic_args)]
13610            struct_ser.serialize_field("createAt", ToString::to_string(&self.create_at).as_str())?;
13611        }
13612        if let Some(v) = self.event.as_ref() {
13613            match v {
13614                subscribe_compaction_event_response::Event::CompactTask(v) => {
13615                    struct_ser.serialize_field("compactTask", v)?;
13616                }
13617                subscribe_compaction_event_response::Event::VacuumTask(v) => {
13618                    struct_ser.serialize_field("vacuumTask", v)?;
13619                }
13620                subscribe_compaction_event_response::Event::FullScanTask(v) => {
13621                    struct_ser.serialize_field("fullScanTask", v)?;
13622                }
13623                subscribe_compaction_event_response::Event::ValidationTask(v) => {
13624                    struct_ser.serialize_field("validationTask", v)?;
13625                }
13626                subscribe_compaction_event_response::Event::CancelCompactTask(v) => {
13627                    struct_ser.serialize_field("cancelCompactTask", v)?;
13628                }
13629                subscribe_compaction_event_response::Event::PullTaskAck(v) => {
13630                    struct_ser.serialize_field("pullTaskAck", v)?;
13631                }
13632            }
13633        }
13634        struct_ser.end()
13635    }
13636}
13637impl<'de> serde::Deserialize<'de> for SubscribeCompactionEventResponse {
13638    #[allow(deprecated)]
13639    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13640    where
13641        D: serde::Deserializer<'de>,
13642    {
13643        const FIELDS: &[&str] = &[
13644            "create_at",
13645            "createAt",
13646            "compact_task",
13647            "compactTask",
13648            "vacuum_task",
13649            "vacuumTask",
13650            "full_scan_task",
13651            "fullScanTask",
13652            "validation_task",
13653            "validationTask",
13654            "cancel_compact_task",
13655            "cancelCompactTask",
13656            "pull_task_ack",
13657            "pullTaskAck",
13658        ];
13659
13660        #[allow(clippy::enum_variant_names)]
13661        enum GeneratedField {
13662            CreateAt,
13663            CompactTask,
13664            VacuumTask,
13665            FullScanTask,
13666            ValidationTask,
13667            CancelCompactTask,
13668            PullTaskAck,
13669        }
13670        impl<'de> serde::Deserialize<'de> for GeneratedField {
13671            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13672            where
13673                D: serde::Deserializer<'de>,
13674            {
13675                struct GeneratedVisitor;
13676
13677                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13678                    type Value = GeneratedField;
13679
13680                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13681                        write!(formatter, "expected one of: {:?}", &FIELDS)
13682                    }
13683
13684                    #[allow(unused_variables)]
13685                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13686                    where
13687                        E: serde::de::Error,
13688                    {
13689                        match value {
13690                            "createAt" | "create_at" => Ok(GeneratedField::CreateAt),
13691                            "compactTask" | "compact_task" => Ok(GeneratedField::CompactTask),
13692                            "vacuumTask" | "vacuum_task" => Ok(GeneratedField::VacuumTask),
13693                            "fullScanTask" | "full_scan_task" => Ok(GeneratedField::FullScanTask),
13694                            "validationTask" | "validation_task" => Ok(GeneratedField::ValidationTask),
13695                            "cancelCompactTask" | "cancel_compact_task" => Ok(GeneratedField::CancelCompactTask),
13696                            "pullTaskAck" | "pull_task_ack" => Ok(GeneratedField::PullTaskAck),
13697                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13698                        }
13699                    }
13700                }
13701                deserializer.deserialize_identifier(GeneratedVisitor)
13702            }
13703        }
13704        struct GeneratedVisitor;
13705        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13706            type Value = SubscribeCompactionEventResponse;
13707
13708            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13709                formatter.write_str("struct hummock.SubscribeCompactionEventResponse")
13710            }
13711
13712            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SubscribeCompactionEventResponse, V::Error>
13713                where
13714                    V: serde::de::MapAccess<'de>,
13715            {
13716                let mut create_at__ = None;
13717                let mut event__ = None;
13718                while let Some(k) = map_.next_key()? {
13719                    match k {
13720                        GeneratedField::CreateAt => {
13721                            if create_at__.is_some() {
13722                                return Err(serde::de::Error::duplicate_field("createAt"));
13723                            }
13724                            create_at__ = 
13725                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13726                            ;
13727                        }
13728                        GeneratedField::CompactTask => {
13729                            if event__.is_some() {
13730                                return Err(serde::de::Error::duplicate_field("compactTask"));
13731                            }
13732                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_response::Event::CompactTask)
13733;
13734                        }
13735                        GeneratedField::VacuumTask => {
13736                            if event__.is_some() {
13737                                return Err(serde::de::Error::duplicate_field("vacuumTask"));
13738                            }
13739                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_response::Event::VacuumTask)
13740;
13741                        }
13742                        GeneratedField::FullScanTask => {
13743                            if event__.is_some() {
13744                                return Err(serde::de::Error::duplicate_field("fullScanTask"));
13745                            }
13746                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_response::Event::FullScanTask)
13747;
13748                        }
13749                        GeneratedField::ValidationTask => {
13750                            if event__.is_some() {
13751                                return Err(serde::de::Error::duplicate_field("validationTask"));
13752                            }
13753                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_response::Event::ValidationTask)
13754;
13755                        }
13756                        GeneratedField::CancelCompactTask => {
13757                            if event__.is_some() {
13758                                return Err(serde::de::Error::duplicate_field("cancelCompactTask"));
13759                            }
13760                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_response::Event::CancelCompactTask)
13761;
13762                        }
13763                        GeneratedField::PullTaskAck => {
13764                            if event__.is_some() {
13765                                return Err(serde::de::Error::duplicate_field("pullTaskAck"));
13766                            }
13767                            event__ = map_.next_value::<::std::option::Option<_>>()?.map(subscribe_compaction_event_response::Event::PullTaskAck)
13768;
13769                        }
13770                    }
13771                }
13772                Ok(SubscribeCompactionEventResponse {
13773                    create_at: create_at__.unwrap_or_default(),
13774                    event: event__,
13775                })
13776            }
13777        }
13778        deserializer.deserialize_struct("hummock.SubscribeCompactionEventResponse", FIELDS, GeneratedVisitor)
13779    }
13780}
13781impl serde::Serialize for subscribe_compaction_event_response::PullTaskAck {
13782    #[allow(deprecated)]
13783    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13784    where
13785        S: serde::Serializer,
13786    {
13787        use serde::ser::SerializeStruct;
13788        let len = 0;
13789        let struct_ser = serializer.serialize_struct("hummock.SubscribeCompactionEventResponse.PullTaskAck", len)?;
13790        struct_ser.end()
13791    }
13792}
13793impl<'de> serde::Deserialize<'de> for subscribe_compaction_event_response::PullTaskAck {
13794    #[allow(deprecated)]
13795    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13796    where
13797        D: serde::Deserializer<'de>,
13798    {
13799        const FIELDS: &[&str] = &[
13800        ];
13801
13802        #[allow(clippy::enum_variant_names)]
13803        enum GeneratedField {
13804        }
13805        impl<'de> serde::Deserialize<'de> for GeneratedField {
13806            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13807            where
13808                D: serde::Deserializer<'de>,
13809            {
13810                struct GeneratedVisitor;
13811
13812                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13813                    type Value = GeneratedField;
13814
13815                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13816                        write!(formatter, "expected one of: {:?}", &FIELDS)
13817                    }
13818
13819                    #[allow(unused_variables)]
13820                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13821                    where
13822                        E: serde::de::Error,
13823                    {
13824                            Err(serde::de::Error::unknown_field(value, FIELDS))
13825                    }
13826                }
13827                deserializer.deserialize_identifier(GeneratedVisitor)
13828            }
13829        }
13830        struct GeneratedVisitor;
13831        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13832            type Value = subscribe_compaction_event_response::PullTaskAck;
13833
13834            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13835                formatter.write_str("struct hummock.SubscribeCompactionEventResponse.PullTaskAck")
13836            }
13837
13838            fn visit_map<V>(self, mut map_: V) -> std::result::Result<subscribe_compaction_event_response::PullTaskAck, V::Error>
13839                where
13840                    V: serde::de::MapAccess<'de>,
13841            {
13842                while map_.next_key::<GeneratedField>()?.is_some() {
13843                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
13844                }
13845                Ok(subscribe_compaction_event_response::PullTaskAck {
13846                })
13847            }
13848        }
13849        deserializer.deserialize_struct("hummock.SubscribeCompactionEventResponse.PullTaskAck", FIELDS, GeneratedVisitor)
13850    }
13851}
13852impl serde::Serialize for TableChangeLog {
13853    #[allow(deprecated)]
13854    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13855    where
13856        S: serde::Serializer,
13857    {
13858        use serde::ser::SerializeStruct;
13859        let mut len = 0;
13860        if !self.change_logs.is_empty() {
13861            len += 1;
13862        }
13863        let mut struct_ser = serializer.serialize_struct("hummock.TableChangeLog", len)?;
13864        if !self.change_logs.is_empty() {
13865            struct_ser.serialize_field("changeLogs", &self.change_logs)?;
13866        }
13867        struct_ser.end()
13868    }
13869}
13870impl<'de> serde::Deserialize<'de> for TableChangeLog {
13871    #[allow(deprecated)]
13872    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13873    where
13874        D: serde::Deserializer<'de>,
13875    {
13876        const FIELDS: &[&str] = &[
13877            "change_logs",
13878            "changeLogs",
13879        ];
13880
13881        #[allow(clippy::enum_variant_names)]
13882        enum GeneratedField {
13883            ChangeLogs,
13884        }
13885        impl<'de> serde::Deserialize<'de> for GeneratedField {
13886            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13887            where
13888                D: serde::Deserializer<'de>,
13889            {
13890                struct GeneratedVisitor;
13891
13892                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13893                    type Value = GeneratedField;
13894
13895                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13896                        write!(formatter, "expected one of: {:?}", &FIELDS)
13897                    }
13898
13899                    #[allow(unused_variables)]
13900                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13901                    where
13902                        E: serde::de::Error,
13903                    {
13904                        match value {
13905                            "changeLogs" | "change_logs" => Ok(GeneratedField::ChangeLogs),
13906                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13907                        }
13908                    }
13909                }
13910                deserializer.deserialize_identifier(GeneratedVisitor)
13911            }
13912        }
13913        struct GeneratedVisitor;
13914        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13915            type Value = TableChangeLog;
13916
13917            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13918                formatter.write_str("struct hummock.TableChangeLog")
13919            }
13920
13921            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TableChangeLog, V::Error>
13922                where
13923                    V: serde::de::MapAccess<'de>,
13924            {
13925                let mut change_logs__ = None;
13926                while let Some(k) = map_.next_key()? {
13927                    match k {
13928                        GeneratedField::ChangeLogs => {
13929                            if change_logs__.is_some() {
13930                                return Err(serde::de::Error::duplicate_field("changeLogs"));
13931                            }
13932                            change_logs__ = Some(map_.next_value()?);
13933                        }
13934                    }
13935                }
13936                Ok(TableChangeLog {
13937                    change_logs: change_logs__.unwrap_or_default(),
13938                })
13939            }
13940        }
13941        deserializer.deserialize_struct("hummock.TableChangeLog", FIELDS, GeneratedVisitor)
13942    }
13943}
13944impl serde::Serialize for TableOption {
13945    #[allow(deprecated)]
13946    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13947    where
13948        S: serde::Serializer,
13949    {
13950        use serde::ser::SerializeStruct;
13951        let mut len = 0;
13952        if self.retention_seconds.is_some() {
13953            len += 1;
13954        }
13955        let mut struct_ser = serializer.serialize_struct("hummock.TableOption", len)?;
13956        if let Some(v) = self.retention_seconds.as_ref() {
13957            struct_ser.serialize_field("retentionSeconds", v)?;
13958        }
13959        struct_ser.end()
13960    }
13961}
13962impl<'de> serde::Deserialize<'de> for TableOption {
13963    #[allow(deprecated)]
13964    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13965    where
13966        D: serde::Deserializer<'de>,
13967    {
13968        const FIELDS: &[&str] = &[
13969            "retention_seconds",
13970            "retentionSeconds",
13971        ];
13972
13973        #[allow(clippy::enum_variant_names)]
13974        enum GeneratedField {
13975            RetentionSeconds,
13976        }
13977        impl<'de> serde::Deserialize<'de> for GeneratedField {
13978            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13979            where
13980                D: serde::Deserializer<'de>,
13981            {
13982                struct GeneratedVisitor;
13983
13984                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13985                    type Value = GeneratedField;
13986
13987                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13988                        write!(formatter, "expected one of: {:?}", &FIELDS)
13989                    }
13990
13991                    #[allow(unused_variables)]
13992                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13993                    where
13994                        E: serde::de::Error,
13995                    {
13996                        match value {
13997                            "retentionSeconds" | "retention_seconds" => Ok(GeneratedField::RetentionSeconds),
13998                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13999                        }
14000                    }
14001                }
14002                deserializer.deserialize_identifier(GeneratedVisitor)
14003            }
14004        }
14005        struct GeneratedVisitor;
14006        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14007            type Value = TableOption;
14008
14009            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14010                formatter.write_str("struct hummock.TableOption")
14011            }
14012
14013            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TableOption, V::Error>
14014                where
14015                    V: serde::de::MapAccess<'de>,
14016            {
14017                let mut retention_seconds__ = None;
14018                while let Some(k) = map_.next_key()? {
14019                    match k {
14020                        GeneratedField::RetentionSeconds => {
14021                            if retention_seconds__.is_some() {
14022                                return Err(serde::de::Error::duplicate_field("retentionSeconds"));
14023                            }
14024                            retention_seconds__ = 
14025                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
14026                            ;
14027                        }
14028                    }
14029                }
14030                Ok(TableOption {
14031                    retention_seconds: retention_seconds__,
14032                })
14033            }
14034        }
14035        deserializer.deserialize_struct("hummock.TableOption", FIELDS, GeneratedVisitor)
14036    }
14037}
14038impl serde::Serialize for TableSchema {
14039    #[allow(deprecated)]
14040    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14041    where
14042        S: serde::Serializer,
14043    {
14044        use serde::ser::SerializeStruct;
14045        let mut len = 0;
14046        if !self.column_ids.is_empty() {
14047            len += 1;
14048        }
14049        let mut struct_ser = serializer.serialize_struct("hummock.TableSchema", len)?;
14050        if !self.column_ids.is_empty() {
14051            struct_ser.serialize_field("columnIds", &self.column_ids)?;
14052        }
14053        struct_ser.end()
14054    }
14055}
14056impl<'de> serde::Deserialize<'de> for TableSchema {
14057    #[allow(deprecated)]
14058    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14059    where
14060        D: serde::Deserializer<'de>,
14061    {
14062        const FIELDS: &[&str] = &[
14063            "column_ids",
14064            "columnIds",
14065        ];
14066
14067        #[allow(clippy::enum_variant_names)]
14068        enum GeneratedField {
14069            ColumnIds,
14070        }
14071        impl<'de> serde::Deserialize<'de> for GeneratedField {
14072            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14073            where
14074                D: serde::Deserializer<'de>,
14075            {
14076                struct GeneratedVisitor;
14077
14078                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14079                    type Value = GeneratedField;
14080
14081                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14082                        write!(formatter, "expected one of: {:?}", &FIELDS)
14083                    }
14084
14085                    #[allow(unused_variables)]
14086                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14087                    where
14088                        E: serde::de::Error,
14089                    {
14090                        match value {
14091                            "columnIds" | "column_ids" => Ok(GeneratedField::ColumnIds),
14092                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14093                        }
14094                    }
14095                }
14096                deserializer.deserialize_identifier(GeneratedVisitor)
14097            }
14098        }
14099        struct GeneratedVisitor;
14100        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14101            type Value = TableSchema;
14102
14103            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14104                formatter.write_str("struct hummock.TableSchema")
14105            }
14106
14107            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TableSchema, V::Error>
14108                where
14109                    V: serde::de::MapAccess<'de>,
14110            {
14111                let mut column_ids__ = None;
14112                while let Some(k) = map_.next_key()? {
14113                    match k {
14114                        GeneratedField::ColumnIds => {
14115                            if column_ids__.is_some() {
14116                                return Err(serde::de::Error::duplicate_field("columnIds"));
14117                            }
14118                            column_ids__ = 
14119                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
14120                                    .into_iter().map(|x| x.0).collect())
14121                            ;
14122                        }
14123                    }
14124                }
14125                Ok(TableSchema {
14126                    column_ids: column_ids__.unwrap_or_default(),
14127                })
14128            }
14129        }
14130        deserializer.deserialize_struct("hummock.TableSchema", FIELDS, GeneratedVisitor)
14131    }
14132}
14133impl serde::Serialize for TableStats {
14134    #[allow(deprecated)]
14135    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14136    where
14137        S: serde::Serializer,
14138    {
14139        use serde::ser::SerializeStruct;
14140        let mut len = 0;
14141        if self.total_key_size != 0 {
14142            len += 1;
14143        }
14144        if self.total_value_size != 0 {
14145            len += 1;
14146        }
14147        if self.total_key_count != 0 {
14148            len += 1;
14149        }
14150        if self.total_compressed_size != 0 {
14151            len += 1;
14152        }
14153        let mut struct_ser = serializer.serialize_struct("hummock.TableStats", len)?;
14154        if self.total_key_size != 0 {
14155            #[allow(clippy::needless_borrow)]
14156            #[allow(clippy::needless_borrows_for_generic_args)]
14157            struct_ser.serialize_field("totalKeySize", ToString::to_string(&self.total_key_size).as_str())?;
14158        }
14159        if self.total_value_size != 0 {
14160            #[allow(clippy::needless_borrow)]
14161            #[allow(clippy::needless_borrows_for_generic_args)]
14162            struct_ser.serialize_field("totalValueSize", ToString::to_string(&self.total_value_size).as_str())?;
14163        }
14164        if self.total_key_count != 0 {
14165            #[allow(clippy::needless_borrow)]
14166            #[allow(clippy::needless_borrows_for_generic_args)]
14167            struct_ser.serialize_field("totalKeyCount", ToString::to_string(&self.total_key_count).as_str())?;
14168        }
14169        if self.total_compressed_size != 0 {
14170            #[allow(clippy::needless_borrow)]
14171            #[allow(clippy::needless_borrows_for_generic_args)]
14172            struct_ser.serialize_field("totalCompressedSize", ToString::to_string(&self.total_compressed_size).as_str())?;
14173        }
14174        struct_ser.end()
14175    }
14176}
14177impl<'de> serde::Deserialize<'de> for TableStats {
14178    #[allow(deprecated)]
14179    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14180    where
14181        D: serde::Deserializer<'de>,
14182    {
14183        const FIELDS: &[&str] = &[
14184            "total_key_size",
14185            "totalKeySize",
14186            "total_value_size",
14187            "totalValueSize",
14188            "total_key_count",
14189            "totalKeyCount",
14190            "total_compressed_size",
14191            "totalCompressedSize",
14192        ];
14193
14194        #[allow(clippy::enum_variant_names)]
14195        enum GeneratedField {
14196            TotalKeySize,
14197            TotalValueSize,
14198            TotalKeyCount,
14199            TotalCompressedSize,
14200        }
14201        impl<'de> serde::Deserialize<'de> for GeneratedField {
14202            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14203            where
14204                D: serde::Deserializer<'de>,
14205            {
14206                struct GeneratedVisitor;
14207
14208                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14209                    type Value = GeneratedField;
14210
14211                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14212                        write!(formatter, "expected one of: {:?}", &FIELDS)
14213                    }
14214
14215                    #[allow(unused_variables)]
14216                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14217                    where
14218                        E: serde::de::Error,
14219                    {
14220                        match value {
14221                            "totalKeySize" | "total_key_size" => Ok(GeneratedField::TotalKeySize),
14222                            "totalValueSize" | "total_value_size" => Ok(GeneratedField::TotalValueSize),
14223                            "totalKeyCount" | "total_key_count" => Ok(GeneratedField::TotalKeyCount),
14224                            "totalCompressedSize" | "total_compressed_size" => Ok(GeneratedField::TotalCompressedSize),
14225                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14226                        }
14227                    }
14228                }
14229                deserializer.deserialize_identifier(GeneratedVisitor)
14230            }
14231        }
14232        struct GeneratedVisitor;
14233        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14234            type Value = TableStats;
14235
14236            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14237                formatter.write_str("struct hummock.TableStats")
14238            }
14239
14240            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TableStats, V::Error>
14241                where
14242                    V: serde::de::MapAccess<'de>,
14243            {
14244                let mut total_key_size__ = None;
14245                let mut total_value_size__ = None;
14246                let mut total_key_count__ = None;
14247                let mut total_compressed_size__ = None;
14248                while let Some(k) = map_.next_key()? {
14249                    match k {
14250                        GeneratedField::TotalKeySize => {
14251                            if total_key_size__.is_some() {
14252                                return Err(serde::de::Error::duplicate_field("totalKeySize"));
14253                            }
14254                            total_key_size__ = 
14255                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
14256                            ;
14257                        }
14258                        GeneratedField::TotalValueSize => {
14259                            if total_value_size__.is_some() {
14260                                return Err(serde::de::Error::duplicate_field("totalValueSize"));
14261                            }
14262                            total_value_size__ = 
14263                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
14264                            ;
14265                        }
14266                        GeneratedField::TotalKeyCount => {
14267                            if total_key_count__.is_some() {
14268                                return Err(serde::de::Error::duplicate_field("totalKeyCount"));
14269                            }
14270                            total_key_count__ = 
14271                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
14272                            ;
14273                        }
14274                        GeneratedField::TotalCompressedSize => {
14275                            if total_compressed_size__.is_some() {
14276                                return Err(serde::de::Error::duplicate_field("totalCompressedSize"));
14277                            }
14278                            total_compressed_size__ = 
14279                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
14280                            ;
14281                        }
14282                    }
14283                }
14284                Ok(TableStats {
14285                    total_key_size: total_key_size__.unwrap_or_default(),
14286                    total_value_size: total_value_size__.unwrap_or_default(),
14287                    total_key_count: total_key_count__.unwrap_or_default(),
14288                    total_compressed_size: total_compressed_size__.unwrap_or_default(),
14289                })
14290            }
14291        }
14292        deserializer.deserialize_struct("hummock.TableStats", FIELDS, GeneratedVisitor)
14293    }
14294}
14295impl serde::Serialize for TableWatermarks {
14296    #[allow(deprecated)]
14297    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14298    where
14299        S: serde::Serializer,
14300    {
14301        use serde::ser::SerializeStruct;
14302        let mut len = 0;
14303        if !self.epoch_watermarks.is_empty() {
14304            len += 1;
14305        }
14306        if self.is_ascending {
14307            len += 1;
14308        }
14309        if self.is_non_pk_prefix {
14310            len += 1;
14311        }
14312        let mut struct_ser = serializer.serialize_struct("hummock.TableWatermarks", len)?;
14313        if !self.epoch_watermarks.is_empty() {
14314            struct_ser.serialize_field("epochWatermarks", &self.epoch_watermarks)?;
14315        }
14316        if self.is_ascending {
14317            struct_ser.serialize_field("isAscending", &self.is_ascending)?;
14318        }
14319        if self.is_non_pk_prefix {
14320            struct_ser.serialize_field("isNonPkPrefix", &self.is_non_pk_prefix)?;
14321        }
14322        struct_ser.end()
14323    }
14324}
14325impl<'de> serde::Deserialize<'de> for TableWatermarks {
14326    #[allow(deprecated)]
14327    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14328    where
14329        D: serde::Deserializer<'de>,
14330    {
14331        const FIELDS: &[&str] = &[
14332            "epoch_watermarks",
14333            "epochWatermarks",
14334            "is_ascending",
14335            "isAscending",
14336            "is_non_pk_prefix",
14337            "isNonPkPrefix",
14338        ];
14339
14340        #[allow(clippy::enum_variant_names)]
14341        enum GeneratedField {
14342            EpochWatermarks,
14343            IsAscending,
14344            IsNonPkPrefix,
14345        }
14346        impl<'de> serde::Deserialize<'de> for GeneratedField {
14347            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14348            where
14349                D: serde::Deserializer<'de>,
14350            {
14351                struct GeneratedVisitor;
14352
14353                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14354                    type Value = GeneratedField;
14355
14356                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14357                        write!(formatter, "expected one of: {:?}", &FIELDS)
14358                    }
14359
14360                    #[allow(unused_variables)]
14361                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14362                    where
14363                        E: serde::de::Error,
14364                    {
14365                        match value {
14366                            "epochWatermarks" | "epoch_watermarks" => Ok(GeneratedField::EpochWatermarks),
14367                            "isAscending" | "is_ascending" => Ok(GeneratedField::IsAscending),
14368                            "isNonPkPrefix" | "is_non_pk_prefix" => Ok(GeneratedField::IsNonPkPrefix),
14369                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14370                        }
14371                    }
14372                }
14373                deserializer.deserialize_identifier(GeneratedVisitor)
14374            }
14375        }
14376        struct GeneratedVisitor;
14377        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14378            type Value = TableWatermarks;
14379
14380            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14381                formatter.write_str("struct hummock.TableWatermarks")
14382            }
14383
14384            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TableWatermarks, V::Error>
14385                where
14386                    V: serde::de::MapAccess<'de>,
14387            {
14388                let mut epoch_watermarks__ = None;
14389                let mut is_ascending__ = None;
14390                let mut is_non_pk_prefix__ = None;
14391                while let Some(k) = map_.next_key()? {
14392                    match k {
14393                        GeneratedField::EpochWatermarks => {
14394                            if epoch_watermarks__.is_some() {
14395                                return Err(serde::de::Error::duplicate_field("epochWatermarks"));
14396                            }
14397                            epoch_watermarks__ = Some(map_.next_value()?);
14398                        }
14399                        GeneratedField::IsAscending => {
14400                            if is_ascending__.is_some() {
14401                                return Err(serde::de::Error::duplicate_field("isAscending"));
14402                            }
14403                            is_ascending__ = Some(map_.next_value()?);
14404                        }
14405                        GeneratedField::IsNonPkPrefix => {
14406                            if is_non_pk_prefix__.is_some() {
14407                                return Err(serde::de::Error::duplicate_field("isNonPkPrefix"));
14408                            }
14409                            is_non_pk_prefix__ = Some(map_.next_value()?);
14410                        }
14411                    }
14412                }
14413                Ok(TableWatermarks {
14414                    epoch_watermarks: epoch_watermarks__.unwrap_or_default(),
14415                    is_ascending: is_ascending__.unwrap_or_default(),
14416                    is_non_pk_prefix: is_non_pk_prefix__.unwrap_or_default(),
14417                })
14418            }
14419        }
14420        deserializer.deserialize_struct("hummock.TableWatermarks", FIELDS, GeneratedVisitor)
14421    }
14422}
14423impl serde::Serialize for table_watermarks::EpochNewWatermarks {
14424    #[allow(deprecated)]
14425    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14426    where
14427        S: serde::Serializer,
14428    {
14429        use serde::ser::SerializeStruct;
14430        let mut len = 0;
14431        if !self.watermarks.is_empty() {
14432            len += 1;
14433        }
14434        if self.epoch != 0 {
14435            len += 1;
14436        }
14437        let mut struct_ser = serializer.serialize_struct("hummock.TableWatermarks.EpochNewWatermarks", len)?;
14438        if !self.watermarks.is_empty() {
14439            struct_ser.serialize_field("watermarks", &self.watermarks)?;
14440        }
14441        if self.epoch != 0 {
14442            #[allow(clippy::needless_borrow)]
14443            #[allow(clippy::needless_borrows_for_generic_args)]
14444            struct_ser.serialize_field("epoch", ToString::to_string(&self.epoch).as_str())?;
14445        }
14446        struct_ser.end()
14447    }
14448}
14449impl<'de> serde::Deserialize<'de> for table_watermarks::EpochNewWatermarks {
14450    #[allow(deprecated)]
14451    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14452    where
14453        D: serde::Deserializer<'de>,
14454    {
14455        const FIELDS: &[&str] = &[
14456            "watermarks",
14457            "epoch",
14458        ];
14459
14460        #[allow(clippy::enum_variant_names)]
14461        enum GeneratedField {
14462            Watermarks,
14463            Epoch,
14464        }
14465        impl<'de> serde::Deserialize<'de> for GeneratedField {
14466            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14467            where
14468                D: serde::Deserializer<'de>,
14469            {
14470                struct GeneratedVisitor;
14471
14472                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14473                    type Value = GeneratedField;
14474
14475                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14476                        write!(formatter, "expected one of: {:?}", &FIELDS)
14477                    }
14478
14479                    #[allow(unused_variables)]
14480                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14481                    where
14482                        E: serde::de::Error,
14483                    {
14484                        match value {
14485                            "watermarks" => Ok(GeneratedField::Watermarks),
14486                            "epoch" => Ok(GeneratedField::Epoch),
14487                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14488                        }
14489                    }
14490                }
14491                deserializer.deserialize_identifier(GeneratedVisitor)
14492            }
14493        }
14494        struct GeneratedVisitor;
14495        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14496            type Value = table_watermarks::EpochNewWatermarks;
14497
14498            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14499                formatter.write_str("struct hummock.TableWatermarks.EpochNewWatermarks")
14500            }
14501
14502            fn visit_map<V>(self, mut map_: V) -> std::result::Result<table_watermarks::EpochNewWatermarks, V::Error>
14503                where
14504                    V: serde::de::MapAccess<'de>,
14505            {
14506                let mut watermarks__ = None;
14507                let mut epoch__ = None;
14508                while let Some(k) = map_.next_key()? {
14509                    match k {
14510                        GeneratedField::Watermarks => {
14511                            if watermarks__.is_some() {
14512                                return Err(serde::de::Error::duplicate_field("watermarks"));
14513                            }
14514                            watermarks__ = Some(map_.next_value()?);
14515                        }
14516                        GeneratedField::Epoch => {
14517                            if epoch__.is_some() {
14518                                return Err(serde::de::Error::duplicate_field("epoch"));
14519                            }
14520                            epoch__ = 
14521                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
14522                            ;
14523                        }
14524                    }
14525                }
14526                Ok(table_watermarks::EpochNewWatermarks {
14527                    watermarks: watermarks__.unwrap_or_default(),
14528                    epoch: epoch__.unwrap_or_default(),
14529                })
14530            }
14531        }
14532        deserializer.deserialize_struct("hummock.TableWatermarks.EpochNewWatermarks", FIELDS, GeneratedVisitor)
14533    }
14534}
14535impl serde::Serialize for TriggerCompactionDeterministicRequest {
14536    #[allow(deprecated)]
14537    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14538    where
14539        S: serde::Serializer,
14540    {
14541        use serde::ser::SerializeStruct;
14542        let mut len = 0;
14543        if self.version_id != 0 {
14544            len += 1;
14545        }
14546        if !self.compaction_groups.is_empty() {
14547            len += 1;
14548        }
14549        let mut struct_ser = serializer.serialize_struct("hummock.TriggerCompactionDeterministicRequest", len)?;
14550        if self.version_id != 0 {
14551            #[allow(clippy::needless_borrow)]
14552            #[allow(clippy::needless_borrows_for_generic_args)]
14553            struct_ser.serialize_field("versionId", ToString::to_string(&self.version_id).as_str())?;
14554        }
14555        if !self.compaction_groups.is_empty() {
14556            struct_ser.serialize_field("compactionGroups", &self.compaction_groups.iter().map(ToString::to_string).collect::<Vec<_>>())?;
14557        }
14558        struct_ser.end()
14559    }
14560}
14561impl<'de> serde::Deserialize<'de> for TriggerCompactionDeterministicRequest {
14562    #[allow(deprecated)]
14563    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14564    where
14565        D: serde::Deserializer<'de>,
14566    {
14567        const FIELDS: &[&str] = &[
14568            "version_id",
14569            "versionId",
14570            "compaction_groups",
14571            "compactionGroups",
14572        ];
14573
14574        #[allow(clippy::enum_variant_names)]
14575        enum GeneratedField {
14576            VersionId,
14577            CompactionGroups,
14578        }
14579        impl<'de> serde::Deserialize<'de> for GeneratedField {
14580            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14581            where
14582                D: serde::Deserializer<'de>,
14583            {
14584                struct GeneratedVisitor;
14585
14586                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14587                    type Value = GeneratedField;
14588
14589                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14590                        write!(formatter, "expected one of: {:?}", &FIELDS)
14591                    }
14592
14593                    #[allow(unused_variables)]
14594                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14595                    where
14596                        E: serde::de::Error,
14597                    {
14598                        match value {
14599                            "versionId" | "version_id" => Ok(GeneratedField::VersionId),
14600                            "compactionGroups" | "compaction_groups" => Ok(GeneratedField::CompactionGroups),
14601                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14602                        }
14603                    }
14604                }
14605                deserializer.deserialize_identifier(GeneratedVisitor)
14606            }
14607        }
14608        struct GeneratedVisitor;
14609        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14610            type Value = TriggerCompactionDeterministicRequest;
14611
14612            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14613                formatter.write_str("struct hummock.TriggerCompactionDeterministicRequest")
14614            }
14615
14616            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TriggerCompactionDeterministicRequest, V::Error>
14617                where
14618                    V: serde::de::MapAccess<'de>,
14619            {
14620                let mut version_id__ = None;
14621                let mut compaction_groups__ = None;
14622                while let Some(k) = map_.next_key()? {
14623                    match k {
14624                        GeneratedField::VersionId => {
14625                            if version_id__.is_some() {
14626                                return Err(serde::de::Error::duplicate_field("versionId"));
14627                            }
14628                            version_id__ = 
14629                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
14630                            ;
14631                        }
14632                        GeneratedField::CompactionGroups => {
14633                            if compaction_groups__.is_some() {
14634                                return Err(serde::de::Error::duplicate_field("compactionGroups"));
14635                            }
14636                            compaction_groups__ = 
14637                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
14638                                    .into_iter().map(|x| x.0).collect())
14639                            ;
14640                        }
14641                    }
14642                }
14643                Ok(TriggerCompactionDeterministicRequest {
14644                    version_id: version_id__.unwrap_or_default(),
14645                    compaction_groups: compaction_groups__.unwrap_or_default(),
14646                })
14647            }
14648        }
14649        deserializer.deserialize_struct("hummock.TriggerCompactionDeterministicRequest", FIELDS, GeneratedVisitor)
14650    }
14651}
14652impl serde::Serialize for TriggerCompactionDeterministicResponse {
14653    #[allow(deprecated)]
14654    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14655    where
14656        S: serde::Serializer,
14657    {
14658        use serde::ser::SerializeStruct;
14659        let len = 0;
14660        let struct_ser = serializer.serialize_struct("hummock.TriggerCompactionDeterministicResponse", len)?;
14661        struct_ser.end()
14662    }
14663}
14664impl<'de> serde::Deserialize<'de> for TriggerCompactionDeterministicResponse {
14665    #[allow(deprecated)]
14666    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14667    where
14668        D: serde::Deserializer<'de>,
14669    {
14670        const FIELDS: &[&str] = &[
14671        ];
14672
14673        #[allow(clippy::enum_variant_names)]
14674        enum GeneratedField {
14675        }
14676        impl<'de> serde::Deserialize<'de> for GeneratedField {
14677            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14678            where
14679                D: serde::Deserializer<'de>,
14680            {
14681                struct GeneratedVisitor;
14682
14683                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14684                    type Value = GeneratedField;
14685
14686                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14687                        write!(formatter, "expected one of: {:?}", &FIELDS)
14688                    }
14689
14690                    #[allow(unused_variables)]
14691                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14692                    where
14693                        E: serde::de::Error,
14694                    {
14695                            Err(serde::de::Error::unknown_field(value, FIELDS))
14696                    }
14697                }
14698                deserializer.deserialize_identifier(GeneratedVisitor)
14699            }
14700        }
14701        struct GeneratedVisitor;
14702        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14703            type Value = TriggerCompactionDeterministicResponse;
14704
14705            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14706                formatter.write_str("struct hummock.TriggerCompactionDeterministicResponse")
14707            }
14708
14709            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TriggerCompactionDeterministicResponse, V::Error>
14710                where
14711                    V: serde::de::MapAccess<'de>,
14712            {
14713                while map_.next_key::<GeneratedField>()?.is_some() {
14714                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
14715                }
14716                Ok(TriggerCompactionDeterministicResponse {
14717                })
14718            }
14719        }
14720        deserializer.deserialize_struct("hummock.TriggerCompactionDeterministicResponse", FIELDS, GeneratedVisitor)
14721    }
14722}
14723impl serde::Serialize for TriggerFullGcRequest {
14724    #[allow(deprecated)]
14725    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14726    where
14727        S: serde::Serializer,
14728    {
14729        use serde::ser::SerializeStruct;
14730        let mut len = 0;
14731        if self.sst_retention_time_sec != 0 {
14732            len += 1;
14733        }
14734        if self.prefix.is_some() {
14735            len += 1;
14736        }
14737        let mut struct_ser = serializer.serialize_struct("hummock.TriggerFullGCRequest", len)?;
14738        if self.sst_retention_time_sec != 0 {
14739            #[allow(clippy::needless_borrow)]
14740            #[allow(clippy::needless_borrows_for_generic_args)]
14741            struct_ser.serialize_field("sstRetentionTimeSec", ToString::to_string(&self.sst_retention_time_sec).as_str())?;
14742        }
14743        if let Some(v) = self.prefix.as_ref() {
14744            struct_ser.serialize_field("prefix", v)?;
14745        }
14746        struct_ser.end()
14747    }
14748}
14749impl<'de> serde::Deserialize<'de> for TriggerFullGcRequest {
14750    #[allow(deprecated)]
14751    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14752    where
14753        D: serde::Deserializer<'de>,
14754    {
14755        const FIELDS: &[&str] = &[
14756            "sst_retention_time_sec",
14757            "sstRetentionTimeSec",
14758            "prefix",
14759        ];
14760
14761        #[allow(clippy::enum_variant_names)]
14762        enum GeneratedField {
14763            SstRetentionTimeSec,
14764            Prefix,
14765        }
14766        impl<'de> serde::Deserialize<'de> for GeneratedField {
14767            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14768            where
14769                D: serde::Deserializer<'de>,
14770            {
14771                struct GeneratedVisitor;
14772
14773                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14774                    type Value = GeneratedField;
14775
14776                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14777                        write!(formatter, "expected one of: {:?}", &FIELDS)
14778                    }
14779
14780                    #[allow(unused_variables)]
14781                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14782                    where
14783                        E: serde::de::Error,
14784                    {
14785                        match value {
14786                            "sstRetentionTimeSec" | "sst_retention_time_sec" => Ok(GeneratedField::SstRetentionTimeSec),
14787                            "prefix" => Ok(GeneratedField::Prefix),
14788                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14789                        }
14790                    }
14791                }
14792                deserializer.deserialize_identifier(GeneratedVisitor)
14793            }
14794        }
14795        struct GeneratedVisitor;
14796        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14797            type Value = TriggerFullGcRequest;
14798
14799            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14800                formatter.write_str("struct hummock.TriggerFullGCRequest")
14801            }
14802
14803            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TriggerFullGcRequest, V::Error>
14804                where
14805                    V: serde::de::MapAccess<'de>,
14806            {
14807                let mut sst_retention_time_sec__ = None;
14808                let mut prefix__ = None;
14809                while let Some(k) = map_.next_key()? {
14810                    match k {
14811                        GeneratedField::SstRetentionTimeSec => {
14812                            if sst_retention_time_sec__.is_some() {
14813                                return Err(serde::de::Error::duplicate_field("sstRetentionTimeSec"));
14814                            }
14815                            sst_retention_time_sec__ = 
14816                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
14817                            ;
14818                        }
14819                        GeneratedField::Prefix => {
14820                            if prefix__.is_some() {
14821                                return Err(serde::de::Error::duplicate_field("prefix"));
14822                            }
14823                            prefix__ = map_.next_value()?;
14824                        }
14825                    }
14826                }
14827                Ok(TriggerFullGcRequest {
14828                    sst_retention_time_sec: sst_retention_time_sec__.unwrap_or_default(),
14829                    prefix: prefix__,
14830                })
14831            }
14832        }
14833        deserializer.deserialize_struct("hummock.TriggerFullGCRequest", FIELDS, GeneratedVisitor)
14834    }
14835}
14836impl serde::Serialize for TriggerFullGcResponse {
14837    #[allow(deprecated)]
14838    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14839    where
14840        S: serde::Serializer,
14841    {
14842        use serde::ser::SerializeStruct;
14843        let mut len = 0;
14844        if self.status.is_some() {
14845            len += 1;
14846        }
14847        let mut struct_ser = serializer.serialize_struct("hummock.TriggerFullGCResponse", len)?;
14848        if let Some(v) = self.status.as_ref() {
14849            struct_ser.serialize_field("status", v)?;
14850        }
14851        struct_ser.end()
14852    }
14853}
14854impl<'de> serde::Deserialize<'de> for TriggerFullGcResponse {
14855    #[allow(deprecated)]
14856    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14857    where
14858        D: serde::Deserializer<'de>,
14859    {
14860        const FIELDS: &[&str] = &[
14861            "status",
14862        ];
14863
14864        #[allow(clippy::enum_variant_names)]
14865        enum GeneratedField {
14866            Status,
14867        }
14868        impl<'de> serde::Deserialize<'de> for GeneratedField {
14869            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14870            where
14871                D: serde::Deserializer<'de>,
14872            {
14873                struct GeneratedVisitor;
14874
14875                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14876                    type Value = GeneratedField;
14877
14878                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14879                        write!(formatter, "expected one of: {:?}", &FIELDS)
14880                    }
14881
14882                    #[allow(unused_variables)]
14883                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14884                    where
14885                        E: serde::de::Error,
14886                    {
14887                        match value {
14888                            "status" => Ok(GeneratedField::Status),
14889                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14890                        }
14891                    }
14892                }
14893                deserializer.deserialize_identifier(GeneratedVisitor)
14894            }
14895        }
14896        struct GeneratedVisitor;
14897        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14898            type Value = TriggerFullGcResponse;
14899
14900            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14901                formatter.write_str("struct hummock.TriggerFullGCResponse")
14902            }
14903
14904            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TriggerFullGcResponse, V::Error>
14905                where
14906                    V: serde::de::MapAccess<'de>,
14907            {
14908                let mut status__ = None;
14909                while let Some(k) = map_.next_key()? {
14910                    match k {
14911                        GeneratedField::Status => {
14912                            if status__.is_some() {
14913                                return Err(serde::de::Error::duplicate_field("status"));
14914                            }
14915                            status__ = map_.next_value()?;
14916                        }
14917                    }
14918                }
14919                Ok(TriggerFullGcResponse {
14920                    status: status__,
14921                })
14922            }
14923        }
14924        deserializer.deserialize_struct("hummock.TriggerFullGCResponse", FIELDS, GeneratedVisitor)
14925    }
14926}
14927impl serde::Serialize for TriggerManualCompactionRequest {
14928    #[allow(deprecated)]
14929    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14930    where
14931        S: serde::Serializer,
14932    {
14933        use serde::ser::SerializeStruct;
14934        let mut len = 0;
14935        if self.compaction_group_id != 0 {
14936            len += 1;
14937        }
14938        if self.key_range.is_some() {
14939            len += 1;
14940        }
14941        if self.table_id != 0 {
14942            len += 1;
14943        }
14944        if self.level != 0 {
14945            len += 1;
14946        }
14947        if !self.sst_ids.is_empty() {
14948            len += 1;
14949        }
14950        let mut struct_ser = serializer.serialize_struct("hummock.TriggerManualCompactionRequest", len)?;
14951        if self.compaction_group_id != 0 {
14952            #[allow(clippy::needless_borrow)]
14953            #[allow(clippy::needless_borrows_for_generic_args)]
14954            struct_ser.serialize_field("compactionGroupId", ToString::to_string(&self.compaction_group_id).as_str())?;
14955        }
14956        if let Some(v) = self.key_range.as_ref() {
14957            struct_ser.serialize_field("keyRange", v)?;
14958        }
14959        if self.table_id != 0 {
14960            struct_ser.serialize_field("tableId", &self.table_id)?;
14961        }
14962        if self.level != 0 {
14963            struct_ser.serialize_field("level", &self.level)?;
14964        }
14965        if !self.sst_ids.is_empty() {
14966            struct_ser.serialize_field("sstIds", &self.sst_ids.iter().map(ToString::to_string).collect::<Vec<_>>())?;
14967        }
14968        struct_ser.end()
14969    }
14970}
14971impl<'de> serde::Deserialize<'de> for TriggerManualCompactionRequest {
14972    #[allow(deprecated)]
14973    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14974    where
14975        D: serde::Deserializer<'de>,
14976    {
14977        const FIELDS: &[&str] = &[
14978            "compaction_group_id",
14979            "compactionGroupId",
14980            "key_range",
14981            "keyRange",
14982            "table_id",
14983            "tableId",
14984            "level",
14985            "sst_ids",
14986            "sstIds",
14987        ];
14988
14989        #[allow(clippy::enum_variant_names)]
14990        enum GeneratedField {
14991            CompactionGroupId,
14992            KeyRange,
14993            TableId,
14994            Level,
14995            SstIds,
14996        }
14997        impl<'de> serde::Deserialize<'de> for GeneratedField {
14998            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14999            where
15000                D: serde::Deserializer<'de>,
15001            {
15002                struct GeneratedVisitor;
15003
15004                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15005                    type Value = GeneratedField;
15006
15007                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15008                        write!(formatter, "expected one of: {:?}", &FIELDS)
15009                    }
15010
15011                    #[allow(unused_variables)]
15012                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15013                    where
15014                        E: serde::de::Error,
15015                    {
15016                        match value {
15017                            "compactionGroupId" | "compaction_group_id" => Ok(GeneratedField::CompactionGroupId),
15018                            "keyRange" | "key_range" => Ok(GeneratedField::KeyRange),
15019                            "tableId" | "table_id" => Ok(GeneratedField::TableId),
15020                            "level" => Ok(GeneratedField::Level),
15021                            "sstIds" | "sst_ids" => Ok(GeneratedField::SstIds),
15022                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15023                        }
15024                    }
15025                }
15026                deserializer.deserialize_identifier(GeneratedVisitor)
15027            }
15028        }
15029        struct GeneratedVisitor;
15030        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15031            type Value = TriggerManualCompactionRequest;
15032
15033            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15034                formatter.write_str("struct hummock.TriggerManualCompactionRequest")
15035            }
15036
15037            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TriggerManualCompactionRequest, V::Error>
15038                where
15039                    V: serde::de::MapAccess<'de>,
15040            {
15041                let mut compaction_group_id__ = None;
15042                let mut key_range__ = None;
15043                let mut table_id__ = None;
15044                let mut level__ = None;
15045                let mut sst_ids__ = None;
15046                while let Some(k) = map_.next_key()? {
15047                    match k {
15048                        GeneratedField::CompactionGroupId => {
15049                            if compaction_group_id__.is_some() {
15050                                return Err(serde::de::Error::duplicate_field("compactionGroupId"));
15051                            }
15052                            compaction_group_id__ = 
15053                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
15054                            ;
15055                        }
15056                        GeneratedField::KeyRange => {
15057                            if key_range__.is_some() {
15058                                return Err(serde::de::Error::duplicate_field("keyRange"));
15059                            }
15060                            key_range__ = map_.next_value()?;
15061                        }
15062                        GeneratedField::TableId => {
15063                            if table_id__.is_some() {
15064                                return Err(serde::de::Error::duplicate_field("tableId"));
15065                            }
15066                            table_id__ = 
15067                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
15068                            ;
15069                        }
15070                        GeneratedField::Level => {
15071                            if level__.is_some() {
15072                                return Err(serde::de::Error::duplicate_field("level"));
15073                            }
15074                            level__ = 
15075                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
15076                            ;
15077                        }
15078                        GeneratedField::SstIds => {
15079                            if sst_ids__.is_some() {
15080                                return Err(serde::de::Error::duplicate_field("sstIds"));
15081                            }
15082                            sst_ids__ = 
15083                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
15084                                    .into_iter().map(|x| x.0).collect())
15085                            ;
15086                        }
15087                    }
15088                }
15089                Ok(TriggerManualCompactionRequest {
15090                    compaction_group_id: compaction_group_id__.unwrap_or_default(),
15091                    key_range: key_range__,
15092                    table_id: table_id__.unwrap_or_default(),
15093                    level: level__.unwrap_or_default(),
15094                    sst_ids: sst_ids__.unwrap_or_default(),
15095                })
15096            }
15097        }
15098        deserializer.deserialize_struct("hummock.TriggerManualCompactionRequest", FIELDS, GeneratedVisitor)
15099    }
15100}
15101impl serde::Serialize for TriggerManualCompactionResponse {
15102    #[allow(deprecated)]
15103    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15104    where
15105        S: serde::Serializer,
15106    {
15107        use serde::ser::SerializeStruct;
15108        let mut len = 0;
15109        if self.status.is_some() {
15110            len += 1;
15111        }
15112        let mut struct_ser = serializer.serialize_struct("hummock.TriggerManualCompactionResponse", len)?;
15113        if let Some(v) = self.status.as_ref() {
15114            struct_ser.serialize_field("status", v)?;
15115        }
15116        struct_ser.end()
15117    }
15118}
15119impl<'de> serde::Deserialize<'de> for TriggerManualCompactionResponse {
15120    #[allow(deprecated)]
15121    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15122    where
15123        D: serde::Deserializer<'de>,
15124    {
15125        const FIELDS: &[&str] = &[
15126            "status",
15127        ];
15128
15129        #[allow(clippy::enum_variant_names)]
15130        enum GeneratedField {
15131            Status,
15132        }
15133        impl<'de> serde::Deserialize<'de> for GeneratedField {
15134            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15135            where
15136                D: serde::Deserializer<'de>,
15137            {
15138                struct GeneratedVisitor;
15139
15140                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15141                    type Value = GeneratedField;
15142
15143                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15144                        write!(formatter, "expected one of: {:?}", &FIELDS)
15145                    }
15146
15147                    #[allow(unused_variables)]
15148                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15149                    where
15150                        E: serde::de::Error,
15151                    {
15152                        match value {
15153                            "status" => Ok(GeneratedField::Status),
15154                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15155                        }
15156                    }
15157                }
15158                deserializer.deserialize_identifier(GeneratedVisitor)
15159            }
15160        }
15161        struct GeneratedVisitor;
15162        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15163            type Value = TriggerManualCompactionResponse;
15164
15165            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15166                formatter.write_str("struct hummock.TriggerManualCompactionResponse")
15167            }
15168
15169            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TriggerManualCompactionResponse, V::Error>
15170                where
15171                    V: serde::de::MapAccess<'de>,
15172            {
15173                let mut status__ = None;
15174                while let Some(k) = map_.next_key()? {
15175                    match k {
15176                        GeneratedField::Status => {
15177                            if status__.is_some() {
15178                                return Err(serde::de::Error::duplicate_field("status"));
15179                            }
15180                            status__ = map_.next_value()?;
15181                        }
15182                    }
15183                }
15184                Ok(TriggerManualCompactionResponse {
15185                    status: status__,
15186                })
15187            }
15188        }
15189        deserializer.deserialize_struct("hummock.TriggerManualCompactionResponse", FIELDS, GeneratedVisitor)
15190    }
15191}
15192impl serde::Serialize for UncommittedEpoch {
15193    #[allow(deprecated)]
15194    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15195    where
15196        S: serde::Serializer,
15197    {
15198        use serde::ser::SerializeStruct;
15199        let mut len = 0;
15200        if self.epoch != 0 {
15201            len += 1;
15202        }
15203        if !self.tables.is_empty() {
15204            len += 1;
15205        }
15206        let mut struct_ser = serializer.serialize_struct("hummock.UncommittedEpoch", len)?;
15207        if self.epoch != 0 {
15208            #[allow(clippy::needless_borrow)]
15209            #[allow(clippy::needless_borrows_for_generic_args)]
15210            struct_ser.serialize_field("epoch", ToString::to_string(&self.epoch).as_str())?;
15211        }
15212        if !self.tables.is_empty() {
15213            struct_ser.serialize_field("tables", &self.tables)?;
15214        }
15215        struct_ser.end()
15216    }
15217}
15218impl<'de> serde::Deserialize<'de> for UncommittedEpoch {
15219    #[allow(deprecated)]
15220    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15221    where
15222        D: serde::Deserializer<'de>,
15223    {
15224        const FIELDS: &[&str] = &[
15225            "epoch",
15226            "tables",
15227        ];
15228
15229        #[allow(clippy::enum_variant_names)]
15230        enum GeneratedField {
15231            Epoch,
15232            Tables,
15233        }
15234        impl<'de> serde::Deserialize<'de> for GeneratedField {
15235            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15236            where
15237                D: serde::Deserializer<'de>,
15238            {
15239                struct GeneratedVisitor;
15240
15241                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15242                    type Value = GeneratedField;
15243
15244                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15245                        write!(formatter, "expected one of: {:?}", &FIELDS)
15246                    }
15247
15248                    #[allow(unused_variables)]
15249                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15250                    where
15251                        E: serde::de::Error,
15252                    {
15253                        match value {
15254                            "epoch" => Ok(GeneratedField::Epoch),
15255                            "tables" => Ok(GeneratedField::Tables),
15256                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15257                        }
15258                    }
15259                }
15260                deserializer.deserialize_identifier(GeneratedVisitor)
15261            }
15262        }
15263        struct GeneratedVisitor;
15264        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15265            type Value = UncommittedEpoch;
15266
15267            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15268                formatter.write_str("struct hummock.UncommittedEpoch")
15269            }
15270
15271            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UncommittedEpoch, V::Error>
15272                where
15273                    V: serde::de::MapAccess<'de>,
15274            {
15275                let mut epoch__ = None;
15276                let mut tables__ = None;
15277                while let Some(k) = map_.next_key()? {
15278                    match k {
15279                        GeneratedField::Epoch => {
15280                            if epoch__.is_some() {
15281                                return Err(serde::de::Error::duplicate_field("epoch"));
15282                            }
15283                            epoch__ = 
15284                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
15285                            ;
15286                        }
15287                        GeneratedField::Tables => {
15288                            if tables__.is_some() {
15289                                return Err(serde::de::Error::duplicate_field("tables"));
15290                            }
15291                            tables__ = Some(map_.next_value()?);
15292                        }
15293                    }
15294                }
15295                Ok(UncommittedEpoch {
15296                    epoch: epoch__.unwrap_or_default(),
15297                    tables: tables__.unwrap_or_default(),
15298                })
15299            }
15300        }
15301        deserializer.deserialize_struct("hummock.UncommittedEpoch", FIELDS, GeneratedVisitor)
15302    }
15303}
15304impl serde::Serialize for UnpinVersionBeforeRequest {
15305    #[allow(deprecated)]
15306    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15307    where
15308        S: serde::Serializer,
15309    {
15310        use serde::ser::SerializeStruct;
15311        let mut len = 0;
15312        if self.context_id != 0 {
15313            len += 1;
15314        }
15315        if self.unpin_version_before != 0 {
15316            len += 1;
15317        }
15318        let mut struct_ser = serializer.serialize_struct("hummock.UnpinVersionBeforeRequest", len)?;
15319        if self.context_id != 0 {
15320            struct_ser.serialize_field("contextId", &self.context_id)?;
15321        }
15322        if self.unpin_version_before != 0 {
15323            #[allow(clippy::needless_borrow)]
15324            #[allow(clippy::needless_borrows_for_generic_args)]
15325            struct_ser.serialize_field("unpinVersionBefore", ToString::to_string(&self.unpin_version_before).as_str())?;
15326        }
15327        struct_ser.end()
15328    }
15329}
15330impl<'de> serde::Deserialize<'de> for UnpinVersionBeforeRequest {
15331    #[allow(deprecated)]
15332    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15333    where
15334        D: serde::Deserializer<'de>,
15335    {
15336        const FIELDS: &[&str] = &[
15337            "context_id",
15338            "contextId",
15339            "unpin_version_before",
15340            "unpinVersionBefore",
15341        ];
15342
15343        #[allow(clippy::enum_variant_names)]
15344        enum GeneratedField {
15345            ContextId,
15346            UnpinVersionBefore,
15347        }
15348        impl<'de> serde::Deserialize<'de> for GeneratedField {
15349            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15350            where
15351                D: serde::Deserializer<'de>,
15352            {
15353                struct GeneratedVisitor;
15354
15355                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15356                    type Value = GeneratedField;
15357
15358                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15359                        write!(formatter, "expected one of: {:?}", &FIELDS)
15360                    }
15361
15362                    #[allow(unused_variables)]
15363                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15364                    where
15365                        E: serde::de::Error,
15366                    {
15367                        match value {
15368                            "contextId" | "context_id" => Ok(GeneratedField::ContextId),
15369                            "unpinVersionBefore" | "unpin_version_before" => Ok(GeneratedField::UnpinVersionBefore),
15370                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15371                        }
15372                    }
15373                }
15374                deserializer.deserialize_identifier(GeneratedVisitor)
15375            }
15376        }
15377        struct GeneratedVisitor;
15378        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15379            type Value = UnpinVersionBeforeRequest;
15380
15381            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15382                formatter.write_str("struct hummock.UnpinVersionBeforeRequest")
15383            }
15384
15385            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnpinVersionBeforeRequest, V::Error>
15386                where
15387                    V: serde::de::MapAccess<'de>,
15388            {
15389                let mut context_id__ = None;
15390                let mut unpin_version_before__ = None;
15391                while let Some(k) = map_.next_key()? {
15392                    match k {
15393                        GeneratedField::ContextId => {
15394                            if context_id__.is_some() {
15395                                return Err(serde::de::Error::duplicate_field("contextId"));
15396                            }
15397                            context_id__ = 
15398                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
15399                            ;
15400                        }
15401                        GeneratedField::UnpinVersionBefore => {
15402                            if unpin_version_before__.is_some() {
15403                                return Err(serde::de::Error::duplicate_field("unpinVersionBefore"));
15404                            }
15405                            unpin_version_before__ = 
15406                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
15407                            ;
15408                        }
15409                    }
15410                }
15411                Ok(UnpinVersionBeforeRequest {
15412                    context_id: context_id__.unwrap_or_default(),
15413                    unpin_version_before: unpin_version_before__.unwrap_or_default(),
15414                })
15415            }
15416        }
15417        deserializer.deserialize_struct("hummock.UnpinVersionBeforeRequest", FIELDS, GeneratedVisitor)
15418    }
15419}
15420impl serde::Serialize for UnpinVersionBeforeResponse {
15421    #[allow(deprecated)]
15422    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15423    where
15424        S: serde::Serializer,
15425    {
15426        use serde::ser::SerializeStruct;
15427        let mut len = 0;
15428        if self.status.is_some() {
15429            len += 1;
15430        }
15431        let mut struct_ser = serializer.serialize_struct("hummock.UnpinVersionBeforeResponse", len)?;
15432        if let Some(v) = self.status.as_ref() {
15433            struct_ser.serialize_field("status", v)?;
15434        }
15435        struct_ser.end()
15436    }
15437}
15438impl<'de> serde::Deserialize<'de> for UnpinVersionBeforeResponse {
15439    #[allow(deprecated)]
15440    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15441    where
15442        D: serde::Deserializer<'de>,
15443    {
15444        const FIELDS: &[&str] = &[
15445            "status",
15446        ];
15447
15448        #[allow(clippy::enum_variant_names)]
15449        enum GeneratedField {
15450            Status,
15451        }
15452        impl<'de> serde::Deserialize<'de> for GeneratedField {
15453            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15454            where
15455                D: serde::Deserializer<'de>,
15456            {
15457                struct GeneratedVisitor;
15458
15459                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15460                    type Value = GeneratedField;
15461
15462                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15463                        write!(formatter, "expected one of: {:?}", &FIELDS)
15464                    }
15465
15466                    #[allow(unused_variables)]
15467                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15468                    where
15469                        E: serde::de::Error,
15470                    {
15471                        match value {
15472                            "status" => Ok(GeneratedField::Status),
15473                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15474                        }
15475                    }
15476                }
15477                deserializer.deserialize_identifier(GeneratedVisitor)
15478            }
15479        }
15480        struct GeneratedVisitor;
15481        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15482            type Value = UnpinVersionBeforeResponse;
15483
15484            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15485                formatter.write_str("struct hummock.UnpinVersionBeforeResponse")
15486            }
15487
15488            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnpinVersionBeforeResponse, V::Error>
15489                where
15490                    V: serde::de::MapAccess<'de>,
15491            {
15492                let mut status__ = None;
15493                while let Some(k) = map_.next_key()? {
15494                    match k {
15495                        GeneratedField::Status => {
15496                            if status__.is_some() {
15497                                return Err(serde::de::Error::duplicate_field("status"));
15498                            }
15499                            status__ = map_.next_value()?;
15500                        }
15501                    }
15502                }
15503                Ok(UnpinVersionBeforeResponse {
15504                    status: status__,
15505                })
15506            }
15507        }
15508        deserializer.deserialize_struct("hummock.UnpinVersionBeforeResponse", FIELDS, GeneratedVisitor)
15509    }
15510}
15511impl serde::Serialize for UnpinVersionRequest {
15512    #[allow(deprecated)]
15513    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15514    where
15515        S: serde::Serializer,
15516    {
15517        use serde::ser::SerializeStruct;
15518        let mut len = 0;
15519        if self.context_id != 0 {
15520            len += 1;
15521        }
15522        let mut struct_ser = serializer.serialize_struct("hummock.UnpinVersionRequest", len)?;
15523        if self.context_id != 0 {
15524            struct_ser.serialize_field("contextId", &self.context_id)?;
15525        }
15526        struct_ser.end()
15527    }
15528}
15529impl<'de> serde::Deserialize<'de> for UnpinVersionRequest {
15530    #[allow(deprecated)]
15531    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15532    where
15533        D: serde::Deserializer<'de>,
15534    {
15535        const FIELDS: &[&str] = &[
15536            "context_id",
15537            "contextId",
15538        ];
15539
15540        #[allow(clippy::enum_variant_names)]
15541        enum GeneratedField {
15542            ContextId,
15543        }
15544        impl<'de> serde::Deserialize<'de> for GeneratedField {
15545            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15546            where
15547                D: serde::Deserializer<'de>,
15548            {
15549                struct GeneratedVisitor;
15550
15551                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15552                    type Value = GeneratedField;
15553
15554                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15555                        write!(formatter, "expected one of: {:?}", &FIELDS)
15556                    }
15557
15558                    #[allow(unused_variables)]
15559                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15560                    where
15561                        E: serde::de::Error,
15562                    {
15563                        match value {
15564                            "contextId" | "context_id" => Ok(GeneratedField::ContextId),
15565                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15566                        }
15567                    }
15568                }
15569                deserializer.deserialize_identifier(GeneratedVisitor)
15570            }
15571        }
15572        struct GeneratedVisitor;
15573        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15574            type Value = UnpinVersionRequest;
15575
15576            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15577                formatter.write_str("struct hummock.UnpinVersionRequest")
15578            }
15579
15580            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnpinVersionRequest, V::Error>
15581                where
15582                    V: serde::de::MapAccess<'de>,
15583            {
15584                let mut context_id__ = None;
15585                while let Some(k) = map_.next_key()? {
15586                    match k {
15587                        GeneratedField::ContextId => {
15588                            if context_id__.is_some() {
15589                                return Err(serde::de::Error::duplicate_field("contextId"));
15590                            }
15591                            context_id__ = 
15592                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
15593                            ;
15594                        }
15595                    }
15596                }
15597                Ok(UnpinVersionRequest {
15598                    context_id: context_id__.unwrap_or_default(),
15599                })
15600            }
15601        }
15602        deserializer.deserialize_struct("hummock.UnpinVersionRequest", FIELDS, GeneratedVisitor)
15603    }
15604}
15605impl serde::Serialize for UnpinVersionResponse {
15606    #[allow(deprecated)]
15607    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15608    where
15609        S: serde::Serializer,
15610    {
15611        use serde::ser::SerializeStruct;
15612        let mut len = 0;
15613        if self.status.is_some() {
15614            len += 1;
15615        }
15616        let mut struct_ser = serializer.serialize_struct("hummock.UnpinVersionResponse", len)?;
15617        if let Some(v) = self.status.as_ref() {
15618            struct_ser.serialize_field("status", v)?;
15619        }
15620        struct_ser.end()
15621    }
15622}
15623impl<'de> serde::Deserialize<'de> for UnpinVersionResponse {
15624    #[allow(deprecated)]
15625    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15626    where
15627        D: serde::Deserializer<'de>,
15628    {
15629        const FIELDS: &[&str] = &[
15630            "status",
15631        ];
15632
15633        #[allow(clippy::enum_variant_names)]
15634        enum GeneratedField {
15635            Status,
15636        }
15637        impl<'de> serde::Deserialize<'de> for GeneratedField {
15638            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15639            where
15640                D: serde::Deserializer<'de>,
15641            {
15642                struct GeneratedVisitor;
15643
15644                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15645                    type Value = GeneratedField;
15646
15647                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15648                        write!(formatter, "expected one of: {:?}", &FIELDS)
15649                    }
15650
15651                    #[allow(unused_variables)]
15652                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15653                    where
15654                        E: serde::de::Error,
15655                    {
15656                        match value {
15657                            "status" => Ok(GeneratedField::Status),
15658                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15659                        }
15660                    }
15661                }
15662                deserializer.deserialize_identifier(GeneratedVisitor)
15663            }
15664        }
15665        struct GeneratedVisitor;
15666        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15667            type Value = UnpinVersionResponse;
15668
15669            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15670                formatter.write_str("struct hummock.UnpinVersionResponse")
15671            }
15672
15673            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnpinVersionResponse, V::Error>
15674                where
15675                    V: serde::de::MapAccess<'de>,
15676            {
15677                let mut status__ = None;
15678                while let Some(k) = map_.next_key()? {
15679                    match k {
15680                        GeneratedField::Status => {
15681                            if status__.is_some() {
15682                                return Err(serde::de::Error::duplicate_field("status"));
15683                            }
15684                            status__ = map_.next_value()?;
15685                        }
15686                    }
15687                }
15688                Ok(UnpinVersionResponse {
15689                    status: status__,
15690                })
15691            }
15692        }
15693        deserializer.deserialize_struct("hummock.UnpinVersionResponse", FIELDS, GeneratedVisitor)
15694    }
15695}
15696impl serde::Serialize for VacuumTask {
15697    #[allow(deprecated)]
15698    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15699    where
15700        S: serde::Serializer,
15701    {
15702        use serde::ser::SerializeStruct;
15703        let mut len = 0;
15704        if !self.sstable_object_ids.is_empty() {
15705            len += 1;
15706        }
15707        let mut struct_ser = serializer.serialize_struct("hummock.VacuumTask", len)?;
15708        if !self.sstable_object_ids.is_empty() {
15709            struct_ser.serialize_field("sstableObjectIds", &self.sstable_object_ids.iter().map(ToString::to_string).collect::<Vec<_>>())?;
15710        }
15711        struct_ser.end()
15712    }
15713}
15714impl<'de> serde::Deserialize<'de> for VacuumTask {
15715    #[allow(deprecated)]
15716    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15717    where
15718        D: serde::Deserializer<'de>,
15719    {
15720        const FIELDS: &[&str] = &[
15721            "sstable_object_ids",
15722            "sstableObjectIds",
15723        ];
15724
15725        #[allow(clippy::enum_variant_names)]
15726        enum GeneratedField {
15727            SstableObjectIds,
15728        }
15729        impl<'de> serde::Deserialize<'de> for GeneratedField {
15730            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15731            where
15732                D: serde::Deserializer<'de>,
15733            {
15734                struct GeneratedVisitor;
15735
15736                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15737                    type Value = GeneratedField;
15738
15739                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15740                        write!(formatter, "expected one of: {:?}", &FIELDS)
15741                    }
15742
15743                    #[allow(unused_variables)]
15744                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15745                    where
15746                        E: serde::de::Error,
15747                    {
15748                        match value {
15749                            "sstableObjectIds" | "sstable_object_ids" => Ok(GeneratedField::SstableObjectIds),
15750                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15751                        }
15752                    }
15753                }
15754                deserializer.deserialize_identifier(GeneratedVisitor)
15755            }
15756        }
15757        struct GeneratedVisitor;
15758        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15759            type Value = VacuumTask;
15760
15761            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15762                formatter.write_str("struct hummock.VacuumTask")
15763            }
15764
15765            fn visit_map<V>(self, mut map_: V) -> std::result::Result<VacuumTask, V::Error>
15766                where
15767                    V: serde::de::MapAccess<'de>,
15768            {
15769                let mut sstable_object_ids__ = None;
15770                while let Some(k) = map_.next_key()? {
15771                    match k {
15772                        GeneratedField::SstableObjectIds => {
15773                            if sstable_object_ids__.is_some() {
15774                                return Err(serde::de::Error::duplicate_field("sstableObjectIds"));
15775                            }
15776                            sstable_object_ids__ = 
15777                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
15778                                    .into_iter().map(|x| x.0).collect())
15779                            ;
15780                        }
15781                    }
15782                }
15783                Ok(VacuumTask {
15784                    sstable_object_ids: sstable_object_ids__.unwrap_or_default(),
15785                })
15786            }
15787        }
15788        deserializer.deserialize_struct("hummock.VacuumTask", FIELDS, GeneratedVisitor)
15789    }
15790}
15791impl serde::Serialize for ValidationTask {
15792    #[allow(deprecated)]
15793    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15794    where
15795        S: serde::Serializer,
15796    {
15797        use serde::ser::SerializeStruct;
15798        let mut len = 0;
15799        if !self.sst_infos.is_empty() {
15800            len += 1;
15801        }
15802        if !self.sst_id_to_worker_id.is_empty() {
15803            len += 1;
15804        }
15805        let mut struct_ser = serializer.serialize_struct("hummock.ValidationTask", len)?;
15806        if !self.sst_infos.is_empty() {
15807            struct_ser.serialize_field("sstInfos", &self.sst_infos)?;
15808        }
15809        if !self.sst_id_to_worker_id.is_empty() {
15810            struct_ser.serialize_field("sstIdToWorkerId", &self.sst_id_to_worker_id)?;
15811        }
15812        struct_ser.end()
15813    }
15814}
15815impl<'de> serde::Deserialize<'de> for ValidationTask {
15816    #[allow(deprecated)]
15817    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15818    where
15819        D: serde::Deserializer<'de>,
15820    {
15821        const FIELDS: &[&str] = &[
15822            "sst_infos",
15823            "sstInfos",
15824            "sst_id_to_worker_id",
15825            "sstIdToWorkerId",
15826        ];
15827
15828        #[allow(clippy::enum_variant_names)]
15829        enum GeneratedField {
15830            SstInfos,
15831            SstIdToWorkerId,
15832        }
15833        impl<'de> serde::Deserialize<'de> for GeneratedField {
15834            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15835            where
15836                D: serde::Deserializer<'de>,
15837            {
15838                struct GeneratedVisitor;
15839
15840                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15841                    type Value = GeneratedField;
15842
15843                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15844                        write!(formatter, "expected one of: {:?}", &FIELDS)
15845                    }
15846
15847                    #[allow(unused_variables)]
15848                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15849                    where
15850                        E: serde::de::Error,
15851                    {
15852                        match value {
15853                            "sstInfos" | "sst_infos" => Ok(GeneratedField::SstInfos),
15854                            "sstIdToWorkerId" | "sst_id_to_worker_id" => Ok(GeneratedField::SstIdToWorkerId),
15855                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15856                        }
15857                    }
15858                }
15859                deserializer.deserialize_identifier(GeneratedVisitor)
15860            }
15861        }
15862        struct GeneratedVisitor;
15863        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15864            type Value = ValidationTask;
15865
15866            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15867                formatter.write_str("struct hummock.ValidationTask")
15868            }
15869
15870            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ValidationTask, V::Error>
15871                where
15872                    V: serde::de::MapAccess<'de>,
15873            {
15874                let mut sst_infos__ = None;
15875                let mut sst_id_to_worker_id__ = None;
15876                while let Some(k) = map_.next_key()? {
15877                    match k {
15878                        GeneratedField::SstInfos => {
15879                            if sst_infos__.is_some() {
15880                                return Err(serde::de::Error::duplicate_field("sstInfos"));
15881                            }
15882                            sst_infos__ = Some(map_.next_value()?);
15883                        }
15884                        GeneratedField::SstIdToWorkerId => {
15885                            if sst_id_to_worker_id__.is_some() {
15886                                return Err(serde::de::Error::duplicate_field("sstIdToWorkerId"));
15887                            }
15888                            sst_id_to_worker_id__ = Some(
15889                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, ::pbjson::private::NumberDeserialize<u32>>>()?
15890                                    .into_iter().map(|(k,v)| (k.0, v.0)).collect()
15891                            );
15892                        }
15893                    }
15894                }
15895                Ok(ValidationTask {
15896                    sst_infos: sst_infos__.unwrap_or_default(),
15897                    sst_id_to_worker_id: sst_id_to_worker_id__.unwrap_or_default(),
15898                })
15899            }
15900        }
15901        deserializer.deserialize_struct("hummock.ValidationTask", FIELDS, GeneratedVisitor)
15902    }
15903}
15904impl serde::Serialize for VersionUpdatePayload {
15905    #[allow(deprecated)]
15906    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15907    where
15908        S: serde::Serializer,
15909    {
15910        use serde::ser::SerializeStruct;
15911        let mut len = 0;
15912        if self.payload.is_some() {
15913            len += 1;
15914        }
15915        let mut struct_ser = serializer.serialize_struct("hummock.VersionUpdatePayload", len)?;
15916        if let Some(v) = self.payload.as_ref() {
15917            match v {
15918                version_update_payload::Payload::VersionDeltas(v) => {
15919                    struct_ser.serialize_field("versionDeltas", v)?;
15920                }
15921                version_update_payload::Payload::PinnedVersion(v) => {
15922                    struct_ser.serialize_field("pinnedVersion", v)?;
15923                }
15924            }
15925        }
15926        struct_ser.end()
15927    }
15928}
15929impl<'de> serde::Deserialize<'de> for VersionUpdatePayload {
15930    #[allow(deprecated)]
15931    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15932    where
15933        D: serde::Deserializer<'de>,
15934    {
15935        const FIELDS: &[&str] = &[
15936            "version_deltas",
15937            "versionDeltas",
15938            "pinned_version",
15939            "pinnedVersion",
15940        ];
15941
15942        #[allow(clippy::enum_variant_names)]
15943        enum GeneratedField {
15944            VersionDeltas,
15945            PinnedVersion,
15946        }
15947        impl<'de> serde::Deserialize<'de> for GeneratedField {
15948            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
15949            where
15950                D: serde::Deserializer<'de>,
15951            {
15952                struct GeneratedVisitor;
15953
15954                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15955                    type Value = GeneratedField;
15956
15957                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15958                        write!(formatter, "expected one of: {:?}", &FIELDS)
15959                    }
15960
15961                    #[allow(unused_variables)]
15962                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
15963                    where
15964                        E: serde::de::Error,
15965                    {
15966                        match value {
15967                            "versionDeltas" | "version_deltas" => Ok(GeneratedField::VersionDeltas),
15968                            "pinnedVersion" | "pinned_version" => Ok(GeneratedField::PinnedVersion),
15969                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
15970                        }
15971                    }
15972                }
15973                deserializer.deserialize_identifier(GeneratedVisitor)
15974            }
15975        }
15976        struct GeneratedVisitor;
15977        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
15978            type Value = VersionUpdatePayload;
15979
15980            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15981                formatter.write_str("struct hummock.VersionUpdatePayload")
15982            }
15983
15984            fn visit_map<V>(self, mut map_: V) -> std::result::Result<VersionUpdatePayload, V::Error>
15985                where
15986                    V: serde::de::MapAccess<'de>,
15987            {
15988                let mut payload__ = None;
15989                while let Some(k) = map_.next_key()? {
15990                    match k {
15991                        GeneratedField::VersionDeltas => {
15992                            if payload__.is_some() {
15993                                return Err(serde::de::Error::duplicate_field("versionDeltas"));
15994                            }
15995                            payload__ = map_.next_value::<::std::option::Option<_>>()?.map(version_update_payload::Payload::VersionDeltas)
15996;
15997                        }
15998                        GeneratedField::PinnedVersion => {
15999                            if payload__.is_some() {
16000                                return Err(serde::de::Error::duplicate_field("pinnedVersion"));
16001                            }
16002                            payload__ = map_.next_value::<::std::option::Option<_>>()?.map(version_update_payload::Payload::PinnedVersion)
16003;
16004                        }
16005                    }
16006                }
16007                Ok(VersionUpdatePayload {
16008                    payload: payload__,
16009                })
16010            }
16011        }
16012        deserializer.deserialize_struct("hummock.VersionUpdatePayload", FIELDS, GeneratedVisitor)
16013    }
16014}
16015impl serde::Serialize for VnodeWatermark {
16016    #[allow(deprecated)]
16017    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16018    where
16019        S: serde::Serializer,
16020    {
16021        use serde::ser::SerializeStruct;
16022        let mut len = 0;
16023        if !self.watermark.is_empty() {
16024            len += 1;
16025        }
16026        if self.vnode_bitmap.is_some() {
16027            len += 1;
16028        }
16029        let mut struct_ser = serializer.serialize_struct("hummock.VnodeWatermark", len)?;
16030        if !self.watermark.is_empty() {
16031            #[allow(clippy::needless_borrow)]
16032            #[allow(clippy::needless_borrows_for_generic_args)]
16033            struct_ser.serialize_field("watermark", pbjson::private::base64::encode(&self.watermark).as_str())?;
16034        }
16035        if let Some(v) = self.vnode_bitmap.as_ref() {
16036            struct_ser.serialize_field("vnodeBitmap", v)?;
16037        }
16038        struct_ser.end()
16039    }
16040}
16041impl<'de> serde::Deserialize<'de> for VnodeWatermark {
16042    #[allow(deprecated)]
16043    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16044    where
16045        D: serde::Deserializer<'de>,
16046    {
16047        const FIELDS: &[&str] = &[
16048            "watermark",
16049            "vnode_bitmap",
16050            "vnodeBitmap",
16051        ];
16052
16053        #[allow(clippy::enum_variant_names)]
16054        enum GeneratedField {
16055            Watermark,
16056            VnodeBitmap,
16057        }
16058        impl<'de> serde::Deserialize<'de> for GeneratedField {
16059            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
16060            where
16061                D: serde::Deserializer<'de>,
16062            {
16063                struct GeneratedVisitor;
16064
16065                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
16066                    type Value = GeneratedField;
16067
16068                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16069                        write!(formatter, "expected one of: {:?}", &FIELDS)
16070                    }
16071
16072                    #[allow(unused_variables)]
16073                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
16074                    where
16075                        E: serde::de::Error,
16076                    {
16077                        match value {
16078                            "watermark" => Ok(GeneratedField::Watermark),
16079                            "vnodeBitmap" | "vnode_bitmap" => Ok(GeneratedField::VnodeBitmap),
16080                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
16081                        }
16082                    }
16083                }
16084                deserializer.deserialize_identifier(GeneratedVisitor)
16085            }
16086        }
16087        struct GeneratedVisitor;
16088        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
16089            type Value = VnodeWatermark;
16090
16091            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16092                formatter.write_str("struct hummock.VnodeWatermark")
16093            }
16094
16095            fn visit_map<V>(self, mut map_: V) -> std::result::Result<VnodeWatermark, V::Error>
16096                where
16097                    V: serde::de::MapAccess<'de>,
16098            {
16099                let mut watermark__ = None;
16100                let mut vnode_bitmap__ = None;
16101                while let Some(k) = map_.next_key()? {
16102                    match k {
16103                        GeneratedField::Watermark => {
16104                            if watermark__.is_some() {
16105                                return Err(serde::de::Error::duplicate_field("watermark"));
16106                            }
16107                            watermark__ = 
16108                                Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
16109                            ;
16110                        }
16111                        GeneratedField::VnodeBitmap => {
16112                            if vnode_bitmap__.is_some() {
16113                                return Err(serde::de::Error::duplicate_field("vnodeBitmap"));
16114                            }
16115                            vnode_bitmap__ = map_.next_value()?;
16116                        }
16117                    }
16118                }
16119                Ok(VnodeWatermark {
16120                    watermark: watermark__.unwrap_or_default(),
16121                    vnode_bitmap: vnode_bitmap__,
16122                })
16123            }
16124        }
16125        deserializer.deserialize_struct("hummock.VnodeWatermark", FIELDS, GeneratedVisitor)
16126    }
16127}
16128impl serde::Serialize for WriteLimits {
16129    #[allow(deprecated)]
16130    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16131    where
16132        S: serde::Serializer,
16133    {
16134        use serde::ser::SerializeStruct;
16135        let mut len = 0;
16136        if !self.write_limits.is_empty() {
16137            len += 1;
16138        }
16139        let mut struct_ser = serializer.serialize_struct("hummock.WriteLimits", len)?;
16140        if !self.write_limits.is_empty() {
16141            struct_ser.serialize_field("writeLimits", &self.write_limits)?;
16142        }
16143        struct_ser.end()
16144    }
16145}
16146impl<'de> serde::Deserialize<'de> for WriteLimits {
16147    #[allow(deprecated)]
16148    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16149    where
16150        D: serde::Deserializer<'de>,
16151    {
16152        const FIELDS: &[&str] = &[
16153            "write_limits",
16154            "writeLimits",
16155        ];
16156
16157        #[allow(clippy::enum_variant_names)]
16158        enum GeneratedField {
16159            WriteLimits,
16160        }
16161        impl<'de> serde::Deserialize<'de> for GeneratedField {
16162            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
16163            where
16164                D: serde::Deserializer<'de>,
16165            {
16166                struct GeneratedVisitor;
16167
16168                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
16169                    type Value = GeneratedField;
16170
16171                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16172                        write!(formatter, "expected one of: {:?}", &FIELDS)
16173                    }
16174
16175                    #[allow(unused_variables)]
16176                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
16177                    where
16178                        E: serde::de::Error,
16179                    {
16180                        match value {
16181                            "writeLimits" | "write_limits" => Ok(GeneratedField::WriteLimits),
16182                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
16183                        }
16184                    }
16185                }
16186                deserializer.deserialize_identifier(GeneratedVisitor)
16187            }
16188        }
16189        struct GeneratedVisitor;
16190        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
16191            type Value = WriteLimits;
16192
16193            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16194                formatter.write_str("struct hummock.WriteLimits")
16195            }
16196
16197            fn visit_map<V>(self, mut map_: V) -> std::result::Result<WriteLimits, V::Error>
16198                where
16199                    V: serde::de::MapAccess<'de>,
16200            {
16201                let mut write_limits__ = None;
16202                while let Some(k) = map_.next_key()? {
16203                    match k {
16204                        GeneratedField::WriteLimits => {
16205                            if write_limits__.is_some() {
16206                                return Err(serde::de::Error::duplicate_field("writeLimits"));
16207                            }
16208                            write_limits__ = Some(
16209                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u64>, _>>()?
16210                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
16211                            );
16212                        }
16213                    }
16214                }
16215                Ok(WriteLimits {
16216                    write_limits: write_limits__.unwrap_or_default(),
16217                })
16218            }
16219        }
16220        deserializer.deserialize_struct("hummock.WriteLimits", FIELDS, GeneratedVisitor)
16221    }
16222}
16223impl serde::Serialize for write_limits::WriteLimit {
16224    #[allow(deprecated)]
16225    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16226    where
16227        S: serde::Serializer,
16228    {
16229        use serde::ser::SerializeStruct;
16230        let mut len = 0;
16231        if !self.table_ids.is_empty() {
16232            len += 1;
16233        }
16234        if !self.reason.is_empty() {
16235            len += 1;
16236        }
16237        let mut struct_ser = serializer.serialize_struct("hummock.WriteLimits.WriteLimit", len)?;
16238        if !self.table_ids.is_empty() {
16239            struct_ser.serialize_field("tableIds", &self.table_ids)?;
16240        }
16241        if !self.reason.is_empty() {
16242            struct_ser.serialize_field("reason", &self.reason)?;
16243        }
16244        struct_ser.end()
16245    }
16246}
16247impl<'de> serde::Deserialize<'de> for write_limits::WriteLimit {
16248    #[allow(deprecated)]
16249    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16250    where
16251        D: serde::Deserializer<'de>,
16252    {
16253        const FIELDS: &[&str] = &[
16254            "table_ids",
16255            "tableIds",
16256            "reason",
16257        ];
16258
16259        #[allow(clippy::enum_variant_names)]
16260        enum GeneratedField {
16261            TableIds,
16262            Reason,
16263        }
16264        impl<'de> serde::Deserialize<'de> for GeneratedField {
16265            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
16266            where
16267                D: serde::Deserializer<'de>,
16268            {
16269                struct GeneratedVisitor;
16270
16271                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
16272                    type Value = GeneratedField;
16273
16274                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16275                        write!(formatter, "expected one of: {:?}", &FIELDS)
16276                    }
16277
16278                    #[allow(unused_variables)]
16279                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
16280                    where
16281                        E: serde::de::Error,
16282                    {
16283                        match value {
16284                            "tableIds" | "table_ids" => Ok(GeneratedField::TableIds),
16285                            "reason" => Ok(GeneratedField::Reason),
16286                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
16287                        }
16288                    }
16289                }
16290                deserializer.deserialize_identifier(GeneratedVisitor)
16291            }
16292        }
16293        struct GeneratedVisitor;
16294        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
16295            type Value = write_limits::WriteLimit;
16296
16297            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16298                formatter.write_str("struct hummock.WriteLimits.WriteLimit")
16299            }
16300
16301            fn visit_map<V>(self, mut map_: V) -> std::result::Result<write_limits::WriteLimit, V::Error>
16302                where
16303                    V: serde::de::MapAccess<'de>,
16304            {
16305                let mut table_ids__ = None;
16306                let mut reason__ = None;
16307                while let Some(k) = map_.next_key()? {
16308                    match k {
16309                        GeneratedField::TableIds => {
16310                            if table_ids__.is_some() {
16311                                return Err(serde::de::Error::duplicate_field("tableIds"));
16312                            }
16313                            table_ids__ = 
16314                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
16315                                    .into_iter().map(|x| x.0).collect())
16316                            ;
16317                        }
16318                        GeneratedField::Reason => {
16319                            if reason__.is_some() {
16320                                return Err(serde::de::Error::duplicate_field("reason"));
16321                            }
16322                            reason__ = Some(map_.next_value()?);
16323                        }
16324                    }
16325                }
16326                Ok(write_limits::WriteLimit {
16327                    table_ids: table_ids__.unwrap_or_default(),
16328                    reason: reason__.unwrap_or_default(),
16329                })
16330            }
16331        }
16332        deserializer.deserialize_struct("hummock.WriteLimits.WriteLimit", FIELDS, GeneratedVisitor)
16333    }
16334}