risingwave_pb/
stream_service.serde.rs

1use crate::stream_service::*;
2impl serde::Serialize for BarrierCompleteResponse {
3    #[allow(deprecated)]
4    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5    where
6        S: serde::Serializer,
7    {
8        use serde::ser::SerializeStruct;
9        let mut len = 0;
10        if !self.request_id.is_empty() {
11            len += 1;
12        }
13        if self.status.is_some() {
14            len += 1;
15        }
16        if !self.create_mview_progress.is_empty() {
17            len += 1;
18        }
19        if !self.synced_sstables.is_empty() {
20            len += 1;
21        }
22        if self.worker_id != 0 {
23            len += 1;
24        }
25        if !self.table_watermarks.is_empty() {
26            len += 1;
27        }
28        if !self.old_value_sstables.is_empty() {
29            len += 1;
30        }
31        if self.partial_graph_id != 0 {
32            len += 1;
33        }
34        if self.epoch != 0 {
35            len += 1;
36        }
37        if self.database_id != 0 {
38            len += 1;
39        }
40        let mut struct_ser = serializer.serialize_struct("stream_service.BarrierCompleteResponse", len)?;
41        if !self.request_id.is_empty() {
42            struct_ser.serialize_field("requestId", &self.request_id)?;
43        }
44        if let Some(v) = self.status.as_ref() {
45            struct_ser.serialize_field("status", v)?;
46        }
47        if !self.create_mview_progress.is_empty() {
48            struct_ser.serialize_field("createMviewProgress", &self.create_mview_progress)?;
49        }
50        if !self.synced_sstables.is_empty() {
51            struct_ser.serialize_field("syncedSstables", &self.synced_sstables)?;
52        }
53        if self.worker_id != 0 {
54            struct_ser.serialize_field("workerId", &self.worker_id)?;
55        }
56        if !self.table_watermarks.is_empty() {
57            struct_ser.serialize_field("tableWatermarks", &self.table_watermarks)?;
58        }
59        if !self.old_value_sstables.is_empty() {
60            struct_ser.serialize_field("oldValueSstables", &self.old_value_sstables)?;
61        }
62        if self.partial_graph_id != 0 {
63            struct_ser.serialize_field("partialGraphId", &self.partial_graph_id)?;
64        }
65        if self.epoch != 0 {
66            #[allow(clippy::needless_borrow)]
67            #[allow(clippy::needless_borrows_for_generic_args)]
68            struct_ser.serialize_field("epoch", ToString::to_string(&self.epoch).as_str())?;
69        }
70        if self.database_id != 0 {
71            struct_ser.serialize_field("databaseId", &self.database_id)?;
72        }
73        struct_ser.end()
74    }
75}
76impl<'de> serde::Deserialize<'de> for BarrierCompleteResponse {
77    #[allow(deprecated)]
78    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
79    where
80        D: serde::Deserializer<'de>,
81    {
82        const FIELDS: &[&str] = &[
83            "request_id",
84            "requestId",
85            "status",
86            "create_mview_progress",
87            "createMviewProgress",
88            "synced_sstables",
89            "syncedSstables",
90            "worker_id",
91            "workerId",
92            "table_watermarks",
93            "tableWatermarks",
94            "old_value_sstables",
95            "oldValueSstables",
96            "partial_graph_id",
97            "partialGraphId",
98            "epoch",
99            "database_id",
100            "databaseId",
101        ];
102
103        #[allow(clippy::enum_variant_names)]
104        enum GeneratedField {
105            RequestId,
106            Status,
107            CreateMviewProgress,
108            SyncedSstables,
109            WorkerId,
110            TableWatermarks,
111            OldValueSstables,
112            PartialGraphId,
113            Epoch,
114            DatabaseId,
115        }
116        impl<'de> serde::Deserialize<'de> for GeneratedField {
117            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
118            where
119                D: serde::Deserializer<'de>,
120            {
121                struct GeneratedVisitor;
122
123                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
124                    type Value = GeneratedField;
125
126                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
127                        write!(formatter, "expected one of: {:?}", &FIELDS)
128                    }
129
130                    #[allow(unused_variables)]
131                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
132                    where
133                        E: serde::de::Error,
134                    {
135                        match value {
136                            "requestId" | "request_id" => Ok(GeneratedField::RequestId),
137                            "status" => Ok(GeneratedField::Status),
138                            "createMviewProgress" | "create_mview_progress" => Ok(GeneratedField::CreateMviewProgress),
139                            "syncedSstables" | "synced_sstables" => Ok(GeneratedField::SyncedSstables),
140                            "workerId" | "worker_id" => Ok(GeneratedField::WorkerId),
141                            "tableWatermarks" | "table_watermarks" => Ok(GeneratedField::TableWatermarks),
142                            "oldValueSstables" | "old_value_sstables" => Ok(GeneratedField::OldValueSstables),
143                            "partialGraphId" | "partial_graph_id" => Ok(GeneratedField::PartialGraphId),
144                            "epoch" => Ok(GeneratedField::Epoch),
145                            "databaseId" | "database_id" => Ok(GeneratedField::DatabaseId),
146                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
147                        }
148                    }
149                }
150                deserializer.deserialize_identifier(GeneratedVisitor)
151            }
152        }
153        struct GeneratedVisitor;
154        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
155            type Value = BarrierCompleteResponse;
156
157            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
158                formatter.write_str("struct stream_service.BarrierCompleteResponse")
159            }
160
161            fn visit_map<V>(self, mut map_: V) -> std::result::Result<BarrierCompleteResponse, V::Error>
162                where
163                    V: serde::de::MapAccess<'de>,
164            {
165                let mut request_id__ = None;
166                let mut status__ = None;
167                let mut create_mview_progress__ = None;
168                let mut synced_sstables__ = None;
169                let mut worker_id__ = None;
170                let mut table_watermarks__ = None;
171                let mut old_value_sstables__ = None;
172                let mut partial_graph_id__ = None;
173                let mut epoch__ = None;
174                let mut database_id__ = None;
175                while let Some(k) = map_.next_key()? {
176                    match k {
177                        GeneratedField::RequestId => {
178                            if request_id__.is_some() {
179                                return Err(serde::de::Error::duplicate_field("requestId"));
180                            }
181                            request_id__ = Some(map_.next_value()?);
182                        }
183                        GeneratedField::Status => {
184                            if status__.is_some() {
185                                return Err(serde::de::Error::duplicate_field("status"));
186                            }
187                            status__ = map_.next_value()?;
188                        }
189                        GeneratedField::CreateMviewProgress => {
190                            if create_mview_progress__.is_some() {
191                                return Err(serde::de::Error::duplicate_field("createMviewProgress"));
192                            }
193                            create_mview_progress__ = Some(map_.next_value()?);
194                        }
195                        GeneratedField::SyncedSstables => {
196                            if synced_sstables__.is_some() {
197                                return Err(serde::de::Error::duplicate_field("syncedSstables"));
198                            }
199                            synced_sstables__ = Some(map_.next_value()?);
200                        }
201                        GeneratedField::WorkerId => {
202                            if worker_id__.is_some() {
203                                return Err(serde::de::Error::duplicate_field("workerId"));
204                            }
205                            worker_id__ = 
206                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
207                            ;
208                        }
209                        GeneratedField::TableWatermarks => {
210                            if table_watermarks__.is_some() {
211                                return Err(serde::de::Error::duplicate_field("tableWatermarks"));
212                            }
213                            table_watermarks__ = Some(
214                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
215                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
216                            );
217                        }
218                        GeneratedField::OldValueSstables => {
219                            if old_value_sstables__.is_some() {
220                                return Err(serde::de::Error::duplicate_field("oldValueSstables"));
221                            }
222                            old_value_sstables__ = Some(map_.next_value()?);
223                        }
224                        GeneratedField::PartialGraphId => {
225                            if partial_graph_id__.is_some() {
226                                return Err(serde::de::Error::duplicate_field("partialGraphId"));
227                            }
228                            partial_graph_id__ = 
229                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
230                            ;
231                        }
232                        GeneratedField::Epoch => {
233                            if epoch__.is_some() {
234                                return Err(serde::de::Error::duplicate_field("epoch"));
235                            }
236                            epoch__ = 
237                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
238                            ;
239                        }
240                        GeneratedField::DatabaseId => {
241                            if database_id__.is_some() {
242                                return Err(serde::de::Error::duplicate_field("databaseId"));
243                            }
244                            database_id__ = 
245                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
246                            ;
247                        }
248                    }
249                }
250                Ok(BarrierCompleteResponse {
251                    request_id: request_id__.unwrap_or_default(),
252                    status: status__,
253                    create_mview_progress: create_mview_progress__.unwrap_or_default(),
254                    synced_sstables: synced_sstables__.unwrap_or_default(),
255                    worker_id: worker_id__.unwrap_or_default(),
256                    table_watermarks: table_watermarks__.unwrap_or_default(),
257                    old_value_sstables: old_value_sstables__.unwrap_or_default(),
258                    partial_graph_id: partial_graph_id__.unwrap_or_default(),
259                    epoch: epoch__.unwrap_or_default(),
260                    database_id: database_id__.unwrap_or_default(),
261                })
262            }
263        }
264        deserializer.deserialize_struct("stream_service.BarrierCompleteResponse", FIELDS, GeneratedVisitor)
265    }
266}
267impl serde::Serialize for barrier_complete_response::CreateMviewProgress {
268    #[allow(deprecated)]
269    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
270    where
271        S: serde::Serializer,
272    {
273        use serde::ser::SerializeStruct;
274        let mut len = 0;
275        if self.backfill_actor_id != 0 {
276            len += 1;
277        }
278        if self.done {
279            len += 1;
280        }
281        if self.consumed_epoch != 0 {
282            len += 1;
283        }
284        if self.consumed_rows != 0 {
285            len += 1;
286        }
287        if self.pending_epoch_lag != 0 {
288            len += 1;
289        }
290        let mut struct_ser = serializer.serialize_struct("stream_service.BarrierCompleteResponse.CreateMviewProgress", len)?;
291        if self.backfill_actor_id != 0 {
292            struct_ser.serialize_field("backfillActorId", &self.backfill_actor_id)?;
293        }
294        if self.done {
295            struct_ser.serialize_field("done", &self.done)?;
296        }
297        if self.consumed_epoch != 0 {
298            #[allow(clippy::needless_borrow)]
299            #[allow(clippy::needless_borrows_for_generic_args)]
300            struct_ser.serialize_field("consumedEpoch", ToString::to_string(&self.consumed_epoch).as_str())?;
301        }
302        if self.consumed_rows != 0 {
303            #[allow(clippy::needless_borrow)]
304            #[allow(clippy::needless_borrows_for_generic_args)]
305            struct_ser.serialize_field("consumedRows", ToString::to_string(&self.consumed_rows).as_str())?;
306        }
307        if self.pending_epoch_lag != 0 {
308            #[allow(clippy::needless_borrow)]
309            #[allow(clippy::needless_borrows_for_generic_args)]
310            struct_ser.serialize_field("pendingEpochLag", ToString::to_string(&self.pending_epoch_lag).as_str())?;
311        }
312        struct_ser.end()
313    }
314}
315impl<'de> serde::Deserialize<'de> for barrier_complete_response::CreateMviewProgress {
316    #[allow(deprecated)]
317    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
318    where
319        D: serde::Deserializer<'de>,
320    {
321        const FIELDS: &[&str] = &[
322            "backfill_actor_id",
323            "backfillActorId",
324            "done",
325            "consumed_epoch",
326            "consumedEpoch",
327            "consumed_rows",
328            "consumedRows",
329            "pending_epoch_lag",
330            "pendingEpochLag",
331        ];
332
333        #[allow(clippy::enum_variant_names)]
334        enum GeneratedField {
335            BackfillActorId,
336            Done,
337            ConsumedEpoch,
338            ConsumedRows,
339            PendingEpochLag,
340        }
341        impl<'de> serde::Deserialize<'de> for GeneratedField {
342            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
343            where
344                D: serde::Deserializer<'de>,
345            {
346                struct GeneratedVisitor;
347
348                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
349                    type Value = GeneratedField;
350
351                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
352                        write!(formatter, "expected one of: {:?}", &FIELDS)
353                    }
354
355                    #[allow(unused_variables)]
356                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
357                    where
358                        E: serde::de::Error,
359                    {
360                        match value {
361                            "backfillActorId" | "backfill_actor_id" => Ok(GeneratedField::BackfillActorId),
362                            "done" => Ok(GeneratedField::Done),
363                            "consumedEpoch" | "consumed_epoch" => Ok(GeneratedField::ConsumedEpoch),
364                            "consumedRows" | "consumed_rows" => Ok(GeneratedField::ConsumedRows),
365                            "pendingEpochLag" | "pending_epoch_lag" => Ok(GeneratedField::PendingEpochLag),
366                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
367                        }
368                    }
369                }
370                deserializer.deserialize_identifier(GeneratedVisitor)
371            }
372        }
373        struct GeneratedVisitor;
374        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
375            type Value = barrier_complete_response::CreateMviewProgress;
376
377            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
378                formatter.write_str("struct stream_service.BarrierCompleteResponse.CreateMviewProgress")
379            }
380
381            fn visit_map<V>(self, mut map_: V) -> std::result::Result<barrier_complete_response::CreateMviewProgress, V::Error>
382                where
383                    V: serde::de::MapAccess<'de>,
384            {
385                let mut backfill_actor_id__ = None;
386                let mut done__ = None;
387                let mut consumed_epoch__ = None;
388                let mut consumed_rows__ = None;
389                let mut pending_epoch_lag__ = None;
390                while let Some(k) = map_.next_key()? {
391                    match k {
392                        GeneratedField::BackfillActorId => {
393                            if backfill_actor_id__.is_some() {
394                                return Err(serde::de::Error::duplicate_field("backfillActorId"));
395                            }
396                            backfill_actor_id__ = 
397                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
398                            ;
399                        }
400                        GeneratedField::Done => {
401                            if done__.is_some() {
402                                return Err(serde::de::Error::duplicate_field("done"));
403                            }
404                            done__ = Some(map_.next_value()?);
405                        }
406                        GeneratedField::ConsumedEpoch => {
407                            if consumed_epoch__.is_some() {
408                                return Err(serde::de::Error::duplicate_field("consumedEpoch"));
409                            }
410                            consumed_epoch__ = 
411                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
412                            ;
413                        }
414                        GeneratedField::ConsumedRows => {
415                            if consumed_rows__.is_some() {
416                                return Err(serde::de::Error::duplicate_field("consumedRows"));
417                            }
418                            consumed_rows__ = 
419                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
420                            ;
421                        }
422                        GeneratedField::PendingEpochLag => {
423                            if pending_epoch_lag__.is_some() {
424                                return Err(serde::de::Error::duplicate_field("pendingEpochLag"));
425                            }
426                            pending_epoch_lag__ = 
427                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
428                            ;
429                        }
430                    }
431                }
432                Ok(barrier_complete_response::CreateMviewProgress {
433                    backfill_actor_id: backfill_actor_id__.unwrap_or_default(),
434                    done: done__.unwrap_or_default(),
435                    consumed_epoch: consumed_epoch__.unwrap_or_default(),
436                    consumed_rows: consumed_rows__.unwrap_or_default(),
437                    pending_epoch_lag: pending_epoch_lag__.unwrap_or_default(),
438                })
439            }
440        }
441        deserializer.deserialize_struct("stream_service.BarrierCompleteResponse.CreateMviewProgress", FIELDS, GeneratedVisitor)
442    }
443}
444impl serde::Serialize for barrier_complete_response::LocalSstableInfo {
445    #[allow(deprecated)]
446    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
447    where
448        S: serde::Serializer,
449    {
450        use serde::ser::SerializeStruct;
451        let mut len = 0;
452        if self.sst.is_some() {
453            len += 1;
454        }
455        if !self.table_stats_map.is_empty() {
456            len += 1;
457        }
458        if self.created_at != 0 {
459            len += 1;
460        }
461        let mut struct_ser = serializer.serialize_struct("stream_service.BarrierCompleteResponse.LocalSstableInfo", len)?;
462        if let Some(v) = self.sst.as_ref() {
463            struct_ser.serialize_field("sst", v)?;
464        }
465        if !self.table_stats_map.is_empty() {
466            struct_ser.serialize_field("tableStatsMap", &self.table_stats_map)?;
467        }
468        if self.created_at != 0 {
469            #[allow(clippy::needless_borrow)]
470            #[allow(clippy::needless_borrows_for_generic_args)]
471            struct_ser.serialize_field("createdAt", ToString::to_string(&self.created_at).as_str())?;
472        }
473        struct_ser.end()
474    }
475}
476impl<'de> serde::Deserialize<'de> for barrier_complete_response::LocalSstableInfo {
477    #[allow(deprecated)]
478    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
479    where
480        D: serde::Deserializer<'de>,
481    {
482        const FIELDS: &[&str] = &[
483            "sst",
484            "table_stats_map",
485            "tableStatsMap",
486            "created_at",
487            "createdAt",
488        ];
489
490        #[allow(clippy::enum_variant_names)]
491        enum GeneratedField {
492            Sst,
493            TableStatsMap,
494            CreatedAt,
495        }
496        impl<'de> serde::Deserialize<'de> for GeneratedField {
497            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
498            where
499                D: serde::Deserializer<'de>,
500            {
501                struct GeneratedVisitor;
502
503                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
504                    type Value = GeneratedField;
505
506                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
507                        write!(formatter, "expected one of: {:?}", &FIELDS)
508                    }
509
510                    #[allow(unused_variables)]
511                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
512                    where
513                        E: serde::de::Error,
514                    {
515                        match value {
516                            "sst" => Ok(GeneratedField::Sst),
517                            "tableStatsMap" | "table_stats_map" => Ok(GeneratedField::TableStatsMap),
518                            "createdAt" | "created_at" => Ok(GeneratedField::CreatedAt),
519                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
520                        }
521                    }
522                }
523                deserializer.deserialize_identifier(GeneratedVisitor)
524            }
525        }
526        struct GeneratedVisitor;
527        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
528            type Value = barrier_complete_response::LocalSstableInfo;
529
530            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
531                formatter.write_str("struct stream_service.BarrierCompleteResponse.LocalSstableInfo")
532            }
533
534            fn visit_map<V>(self, mut map_: V) -> std::result::Result<barrier_complete_response::LocalSstableInfo, V::Error>
535                where
536                    V: serde::de::MapAccess<'de>,
537            {
538                let mut sst__ = None;
539                let mut table_stats_map__ = None;
540                let mut created_at__ = None;
541                while let Some(k) = map_.next_key()? {
542                    match k {
543                        GeneratedField::Sst => {
544                            if sst__.is_some() {
545                                return Err(serde::de::Error::duplicate_field("sst"));
546                            }
547                            sst__ = map_.next_value()?;
548                        }
549                        GeneratedField::TableStatsMap => {
550                            if table_stats_map__.is_some() {
551                                return Err(serde::de::Error::duplicate_field("tableStatsMap"));
552                            }
553                            table_stats_map__ = Some(
554                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
555                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
556                            );
557                        }
558                        GeneratedField::CreatedAt => {
559                            if created_at__.is_some() {
560                                return Err(serde::de::Error::duplicate_field("createdAt"));
561                            }
562                            created_at__ = 
563                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
564                            ;
565                        }
566                    }
567                }
568                Ok(barrier_complete_response::LocalSstableInfo {
569                    sst: sst__,
570                    table_stats_map: table_stats_map__.unwrap_or_default(),
571                    created_at: created_at__.unwrap_or_default(),
572                })
573            }
574        }
575        deserializer.deserialize_struct("stream_service.BarrierCompleteResponse.LocalSstableInfo", FIELDS, GeneratedVisitor)
576    }
577}
578impl serde::Serialize for GetMinUncommittedSstIdRequest {
579    #[allow(deprecated)]
580    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
581    where
582        S: serde::Serializer,
583    {
584        use serde::ser::SerializeStruct;
585        let len = 0;
586        let struct_ser = serializer.serialize_struct("stream_service.GetMinUncommittedSstIdRequest", len)?;
587        struct_ser.end()
588    }
589}
590impl<'de> serde::Deserialize<'de> for GetMinUncommittedSstIdRequest {
591    #[allow(deprecated)]
592    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
593    where
594        D: serde::Deserializer<'de>,
595    {
596        const FIELDS: &[&str] = &[
597        ];
598
599        #[allow(clippy::enum_variant_names)]
600        enum GeneratedField {
601        }
602        impl<'de> serde::Deserialize<'de> for GeneratedField {
603            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
604            where
605                D: serde::Deserializer<'de>,
606            {
607                struct GeneratedVisitor;
608
609                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
610                    type Value = GeneratedField;
611
612                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
613                        write!(formatter, "expected one of: {:?}", &FIELDS)
614                    }
615
616                    #[allow(unused_variables)]
617                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
618                    where
619                        E: serde::de::Error,
620                    {
621                            Err(serde::de::Error::unknown_field(value, FIELDS))
622                    }
623                }
624                deserializer.deserialize_identifier(GeneratedVisitor)
625            }
626        }
627        struct GeneratedVisitor;
628        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
629            type Value = GetMinUncommittedSstIdRequest;
630
631            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
632                formatter.write_str("struct stream_service.GetMinUncommittedSstIdRequest")
633            }
634
635            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetMinUncommittedSstIdRequest, V::Error>
636                where
637                    V: serde::de::MapAccess<'de>,
638            {
639                while map_.next_key::<GeneratedField>()?.is_some() {
640                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
641                }
642                Ok(GetMinUncommittedSstIdRequest {
643                })
644            }
645        }
646        deserializer.deserialize_struct("stream_service.GetMinUncommittedSstIdRequest", FIELDS, GeneratedVisitor)
647    }
648}
649impl serde::Serialize for GetMinUncommittedSstIdResponse {
650    #[allow(deprecated)]
651    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
652    where
653        S: serde::Serializer,
654    {
655        use serde::ser::SerializeStruct;
656        let mut len = 0;
657        if self.min_uncommitted_sst_id != 0 {
658            len += 1;
659        }
660        let mut struct_ser = serializer.serialize_struct("stream_service.GetMinUncommittedSstIdResponse", len)?;
661        if self.min_uncommitted_sst_id != 0 {
662            #[allow(clippy::needless_borrow)]
663            #[allow(clippy::needless_borrows_for_generic_args)]
664            struct_ser.serialize_field("minUncommittedSstId", ToString::to_string(&self.min_uncommitted_sst_id).as_str())?;
665        }
666        struct_ser.end()
667    }
668}
669impl<'de> serde::Deserialize<'de> for GetMinUncommittedSstIdResponse {
670    #[allow(deprecated)]
671    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
672    where
673        D: serde::Deserializer<'de>,
674    {
675        const FIELDS: &[&str] = &[
676            "min_uncommitted_sst_id",
677            "minUncommittedSstId",
678        ];
679
680        #[allow(clippy::enum_variant_names)]
681        enum GeneratedField {
682            MinUncommittedSstId,
683        }
684        impl<'de> serde::Deserialize<'de> for GeneratedField {
685            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
686            where
687                D: serde::Deserializer<'de>,
688            {
689                struct GeneratedVisitor;
690
691                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
692                    type Value = GeneratedField;
693
694                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
695                        write!(formatter, "expected one of: {:?}", &FIELDS)
696                    }
697
698                    #[allow(unused_variables)]
699                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
700                    where
701                        E: serde::de::Error,
702                    {
703                        match value {
704                            "minUncommittedSstId" | "min_uncommitted_sst_id" => Ok(GeneratedField::MinUncommittedSstId),
705                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
706                        }
707                    }
708                }
709                deserializer.deserialize_identifier(GeneratedVisitor)
710            }
711        }
712        struct GeneratedVisitor;
713        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
714            type Value = GetMinUncommittedSstIdResponse;
715
716            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
717                formatter.write_str("struct stream_service.GetMinUncommittedSstIdResponse")
718            }
719
720            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetMinUncommittedSstIdResponse, V::Error>
721                where
722                    V: serde::de::MapAccess<'de>,
723            {
724                let mut min_uncommitted_sst_id__ = None;
725                while let Some(k) = map_.next_key()? {
726                    match k {
727                        GeneratedField::MinUncommittedSstId => {
728                            if min_uncommitted_sst_id__.is_some() {
729                                return Err(serde::de::Error::duplicate_field("minUncommittedSstId"));
730                            }
731                            min_uncommitted_sst_id__ = 
732                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
733                            ;
734                        }
735                    }
736                }
737                Ok(GetMinUncommittedSstIdResponse {
738                    min_uncommitted_sst_id: min_uncommitted_sst_id__.unwrap_or_default(),
739                })
740            }
741        }
742        deserializer.deserialize_struct("stream_service.GetMinUncommittedSstIdResponse", FIELDS, GeneratedVisitor)
743    }
744}
745impl serde::Serialize for InjectBarrierRequest {
746    #[allow(deprecated)]
747    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
748    where
749        S: serde::Serializer,
750    {
751        use serde::ser::SerializeStruct;
752        let mut len = 0;
753        if !self.request_id.is_empty() {
754            len += 1;
755        }
756        if self.barrier.is_some() {
757            len += 1;
758        }
759        if self.database_id != 0 {
760            len += 1;
761        }
762        if !self.actor_ids_to_collect.is_empty() {
763            len += 1;
764        }
765        if !self.table_ids_to_sync.is_empty() {
766            len += 1;
767        }
768        if self.partial_graph_id != 0 {
769            len += 1;
770        }
771        if !self.broadcast_info.is_empty() {
772            len += 1;
773        }
774        if !self.actors_to_build.is_empty() {
775            len += 1;
776        }
777        if !self.subscriptions_to_add.is_empty() {
778            len += 1;
779        }
780        if !self.subscriptions_to_remove.is_empty() {
781            len += 1;
782        }
783        let mut struct_ser = serializer.serialize_struct("stream_service.InjectBarrierRequest", len)?;
784        if !self.request_id.is_empty() {
785            struct_ser.serialize_field("requestId", &self.request_id)?;
786        }
787        if let Some(v) = self.barrier.as_ref() {
788            struct_ser.serialize_field("barrier", v)?;
789        }
790        if self.database_id != 0 {
791            struct_ser.serialize_field("databaseId", &self.database_id)?;
792        }
793        if !self.actor_ids_to_collect.is_empty() {
794            struct_ser.serialize_field("actorIdsToCollect", &self.actor_ids_to_collect)?;
795        }
796        if !self.table_ids_to_sync.is_empty() {
797            struct_ser.serialize_field("tableIdsToSync", &self.table_ids_to_sync)?;
798        }
799        if self.partial_graph_id != 0 {
800            struct_ser.serialize_field("partialGraphId", &self.partial_graph_id)?;
801        }
802        if !self.broadcast_info.is_empty() {
803            struct_ser.serialize_field("broadcastInfo", &self.broadcast_info)?;
804        }
805        if !self.actors_to_build.is_empty() {
806            struct_ser.serialize_field("actorsToBuild", &self.actors_to_build)?;
807        }
808        if !self.subscriptions_to_add.is_empty() {
809            struct_ser.serialize_field("subscriptionsToAdd", &self.subscriptions_to_add)?;
810        }
811        if !self.subscriptions_to_remove.is_empty() {
812            struct_ser.serialize_field("subscriptionsToRemove", &self.subscriptions_to_remove)?;
813        }
814        struct_ser.end()
815    }
816}
817impl<'de> serde::Deserialize<'de> for InjectBarrierRequest {
818    #[allow(deprecated)]
819    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
820    where
821        D: serde::Deserializer<'de>,
822    {
823        const FIELDS: &[&str] = &[
824            "request_id",
825            "requestId",
826            "barrier",
827            "database_id",
828            "databaseId",
829            "actor_ids_to_collect",
830            "actorIdsToCollect",
831            "table_ids_to_sync",
832            "tableIdsToSync",
833            "partial_graph_id",
834            "partialGraphId",
835            "broadcast_info",
836            "broadcastInfo",
837            "actors_to_build",
838            "actorsToBuild",
839            "subscriptions_to_add",
840            "subscriptionsToAdd",
841            "subscriptions_to_remove",
842            "subscriptionsToRemove",
843        ];
844
845        #[allow(clippy::enum_variant_names)]
846        enum GeneratedField {
847            RequestId,
848            Barrier,
849            DatabaseId,
850            ActorIdsToCollect,
851            TableIdsToSync,
852            PartialGraphId,
853            BroadcastInfo,
854            ActorsToBuild,
855            SubscriptionsToAdd,
856            SubscriptionsToRemove,
857        }
858        impl<'de> serde::Deserialize<'de> for GeneratedField {
859            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
860            where
861                D: serde::Deserializer<'de>,
862            {
863                struct GeneratedVisitor;
864
865                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
866                    type Value = GeneratedField;
867
868                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
869                        write!(formatter, "expected one of: {:?}", &FIELDS)
870                    }
871
872                    #[allow(unused_variables)]
873                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
874                    where
875                        E: serde::de::Error,
876                    {
877                        match value {
878                            "requestId" | "request_id" => Ok(GeneratedField::RequestId),
879                            "barrier" => Ok(GeneratedField::Barrier),
880                            "databaseId" | "database_id" => Ok(GeneratedField::DatabaseId),
881                            "actorIdsToCollect" | "actor_ids_to_collect" => Ok(GeneratedField::ActorIdsToCollect),
882                            "tableIdsToSync" | "table_ids_to_sync" => Ok(GeneratedField::TableIdsToSync),
883                            "partialGraphId" | "partial_graph_id" => Ok(GeneratedField::PartialGraphId),
884                            "broadcastInfo" | "broadcast_info" => Ok(GeneratedField::BroadcastInfo),
885                            "actorsToBuild" | "actors_to_build" => Ok(GeneratedField::ActorsToBuild),
886                            "subscriptionsToAdd" | "subscriptions_to_add" => Ok(GeneratedField::SubscriptionsToAdd),
887                            "subscriptionsToRemove" | "subscriptions_to_remove" => Ok(GeneratedField::SubscriptionsToRemove),
888                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
889                        }
890                    }
891                }
892                deserializer.deserialize_identifier(GeneratedVisitor)
893            }
894        }
895        struct GeneratedVisitor;
896        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
897            type Value = InjectBarrierRequest;
898
899            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
900                formatter.write_str("struct stream_service.InjectBarrierRequest")
901            }
902
903            fn visit_map<V>(self, mut map_: V) -> std::result::Result<InjectBarrierRequest, V::Error>
904                where
905                    V: serde::de::MapAccess<'de>,
906            {
907                let mut request_id__ = None;
908                let mut barrier__ = None;
909                let mut database_id__ = None;
910                let mut actor_ids_to_collect__ = None;
911                let mut table_ids_to_sync__ = None;
912                let mut partial_graph_id__ = None;
913                let mut broadcast_info__ = None;
914                let mut actors_to_build__ = None;
915                let mut subscriptions_to_add__ = None;
916                let mut subscriptions_to_remove__ = None;
917                while let Some(k) = map_.next_key()? {
918                    match k {
919                        GeneratedField::RequestId => {
920                            if request_id__.is_some() {
921                                return Err(serde::de::Error::duplicate_field("requestId"));
922                            }
923                            request_id__ = Some(map_.next_value()?);
924                        }
925                        GeneratedField::Barrier => {
926                            if barrier__.is_some() {
927                                return Err(serde::de::Error::duplicate_field("barrier"));
928                            }
929                            barrier__ = map_.next_value()?;
930                        }
931                        GeneratedField::DatabaseId => {
932                            if database_id__.is_some() {
933                                return Err(serde::de::Error::duplicate_field("databaseId"));
934                            }
935                            database_id__ = 
936                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
937                            ;
938                        }
939                        GeneratedField::ActorIdsToCollect => {
940                            if actor_ids_to_collect__.is_some() {
941                                return Err(serde::de::Error::duplicate_field("actorIdsToCollect"));
942                            }
943                            actor_ids_to_collect__ = 
944                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
945                                    .into_iter().map(|x| x.0).collect())
946                            ;
947                        }
948                        GeneratedField::TableIdsToSync => {
949                            if table_ids_to_sync__.is_some() {
950                                return Err(serde::de::Error::duplicate_field("tableIdsToSync"));
951                            }
952                            table_ids_to_sync__ = 
953                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
954                                    .into_iter().map(|x| x.0).collect())
955                            ;
956                        }
957                        GeneratedField::PartialGraphId => {
958                            if partial_graph_id__.is_some() {
959                                return Err(serde::de::Error::duplicate_field("partialGraphId"));
960                            }
961                            partial_graph_id__ = 
962                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
963                            ;
964                        }
965                        GeneratedField::BroadcastInfo => {
966                            if broadcast_info__.is_some() {
967                                return Err(serde::de::Error::duplicate_field("broadcastInfo"));
968                            }
969                            broadcast_info__ = Some(map_.next_value()?);
970                        }
971                        GeneratedField::ActorsToBuild => {
972                            if actors_to_build__.is_some() {
973                                return Err(serde::de::Error::duplicate_field("actorsToBuild"));
974                            }
975                            actors_to_build__ = Some(map_.next_value()?);
976                        }
977                        GeneratedField::SubscriptionsToAdd => {
978                            if subscriptions_to_add__.is_some() {
979                                return Err(serde::de::Error::duplicate_field("subscriptionsToAdd"));
980                            }
981                            subscriptions_to_add__ = Some(map_.next_value()?);
982                        }
983                        GeneratedField::SubscriptionsToRemove => {
984                            if subscriptions_to_remove__.is_some() {
985                                return Err(serde::de::Error::duplicate_field("subscriptionsToRemove"));
986                            }
987                            subscriptions_to_remove__ = Some(map_.next_value()?);
988                        }
989                    }
990                }
991                Ok(InjectBarrierRequest {
992                    request_id: request_id__.unwrap_or_default(),
993                    barrier: barrier__,
994                    database_id: database_id__.unwrap_or_default(),
995                    actor_ids_to_collect: actor_ids_to_collect__.unwrap_or_default(),
996                    table_ids_to_sync: table_ids_to_sync__.unwrap_or_default(),
997                    partial_graph_id: partial_graph_id__.unwrap_or_default(),
998                    broadcast_info: broadcast_info__.unwrap_or_default(),
999                    actors_to_build: actors_to_build__.unwrap_or_default(),
1000                    subscriptions_to_add: subscriptions_to_add__.unwrap_or_default(),
1001                    subscriptions_to_remove: subscriptions_to_remove__.unwrap_or_default(),
1002                })
1003            }
1004        }
1005        deserializer.deserialize_struct("stream_service.InjectBarrierRequest", FIELDS, GeneratedVisitor)
1006    }
1007}
1008impl serde::Serialize for inject_barrier_request::BuildActorInfo {
1009    #[allow(deprecated)]
1010    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1011    where
1012        S: serde::Serializer,
1013    {
1014        use serde::ser::SerializeStruct;
1015        let mut len = 0;
1016        if self.actor_id != 0 {
1017            len += 1;
1018        }
1019        if !self.fragment_upstreams.is_empty() {
1020            len += 1;
1021        }
1022        if !self.dispatchers.is_empty() {
1023            len += 1;
1024        }
1025        if self.vnode_bitmap.is_some() {
1026            len += 1;
1027        }
1028        if !self.mview_definition.is_empty() {
1029            len += 1;
1030        }
1031        if self.expr_context.is_some() {
1032            len += 1;
1033        }
1034        let mut struct_ser = serializer.serialize_struct("stream_service.InjectBarrierRequest.BuildActorInfo", len)?;
1035        if self.actor_id != 0 {
1036            struct_ser.serialize_field("actorId", &self.actor_id)?;
1037        }
1038        if !self.fragment_upstreams.is_empty() {
1039            struct_ser.serialize_field("fragmentUpstreams", &self.fragment_upstreams)?;
1040        }
1041        if !self.dispatchers.is_empty() {
1042            struct_ser.serialize_field("dispatchers", &self.dispatchers)?;
1043        }
1044        if let Some(v) = self.vnode_bitmap.as_ref() {
1045            struct_ser.serialize_field("vnodeBitmap", v)?;
1046        }
1047        if !self.mview_definition.is_empty() {
1048            struct_ser.serialize_field("mviewDefinition", &self.mview_definition)?;
1049        }
1050        if let Some(v) = self.expr_context.as_ref() {
1051            struct_ser.serialize_field("exprContext", v)?;
1052        }
1053        struct_ser.end()
1054    }
1055}
1056impl<'de> serde::Deserialize<'de> for inject_barrier_request::BuildActorInfo {
1057    #[allow(deprecated)]
1058    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1059    where
1060        D: serde::Deserializer<'de>,
1061    {
1062        const FIELDS: &[&str] = &[
1063            "actor_id",
1064            "actorId",
1065            "fragment_upstreams",
1066            "fragmentUpstreams",
1067            "dispatchers",
1068            "vnode_bitmap",
1069            "vnodeBitmap",
1070            "mview_definition",
1071            "mviewDefinition",
1072            "expr_context",
1073            "exprContext",
1074        ];
1075
1076        #[allow(clippy::enum_variant_names)]
1077        enum GeneratedField {
1078            ActorId,
1079            FragmentUpstreams,
1080            Dispatchers,
1081            VnodeBitmap,
1082            MviewDefinition,
1083            ExprContext,
1084        }
1085        impl<'de> serde::Deserialize<'de> for GeneratedField {
1086            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1087            where
1088                D: serde::Deserializer<'de>,
1089            {
1090                struct GeneratedVisitor;
1091
1092                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1093                    type Value = GeneratedField;
1094
1095                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1096                        write!(formatter, "expected one of: {:?}", &FIELDS)
1097                    }
1098
1099                    #[allow(unused_variables)]
1100                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1101                    where
1102                        E: serde::de::Error,
1103                    {
1104                        match value {
1105                            "actorId" | "actor_id" => Ok(GeneratedField::ActorId),
1106                            "fragmentUpstreams" | "fragment_upstreams" => Ok(GeneratedField::FragmentUpstreams),
1107                            "dispatchers" => Ok(GeneratedField::Dispatchers),
1108                            "vnodeBitmap" | "vnode_bitmap" => Ok(GeneratedField::VnodeBitmap),
1109                            "mviewDefinition" | "mview_definition" => Ok(GeneratedField::MviewDefinition),
1110                            "exprContext" | "expr_context" => Ok(GeneratedField::ExprContext),
1111                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1112                        }
1113                    }
1114                }
1115                deserializer.deserialize_identifier(GeneratedVisitor)
1116            }
1117        }
1118        struct GeneratedVisitor;
1119        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1120            type Value = inject_barrier_request::BuildActorInfo;
1121
1122            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1123                formatter.write_str("struct stream_service.InjectBarrierRequest.BuildActorInfo")
1124            }
1125
1126            fn visit_map<V>(self, mut map_: V) -> std::result::Result<inject_barrier_request::BuildActorInfo, V::Error>
1127                where
1128                    V: serde::de::MapAccess<'de>,
1129            {
1130                let mut actor_id__ = None;
1131                let mut fragment_upstreams__ = None;
1132                let mut dispatchers__ = None;
1133                let mut vnode_bitmap__ = None;
1134                let mut mview_definition__ = None;
1135                let mut expr_context__ = None;
1136                while let Some(k) = map_.next_key()? {
1137                    match k {
1138                        GeneratedField::ActorId => {
1139                            if actor_id__.is_some() {
1140                                return Err(serde::de::Error::duplicate_field("actorId"));
1141                            }
1142                            actor_id__ = 
1143                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1144                            ;
1145                        }
1146                        GeneratedField::FragmentUpstreams => {
1147                            if fragment_upstreams__.is_some() {
1148                                return Err(serde::de::Error::duplicate_field("fragmentUpstreams"));
1149                            }
1150                            fragment_upstreams__ = Some(
1151                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
1152                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
1153                            );
1154                        }
1155                        GeneratedField::Dispatchers => {
1156                            if dispatchers__.is_some() {
1157                                return Err(serde::de::Error::duplicate_field("dispatchers"));
1158                            }
1159                            dispatchers__ = Some(map_.next_value()?);
1160                        }
1161                        GeneratedField::VnodeBitmap => {
1162                            if vnode_bitmap__.is_some() {
1163                                return Err(serde::de::Error::duplicate_field("vnodeBitmap"));
1164                            }
1165                            vnode_bitmap__ = map_.next_value()?;
1166                        }
1167                        GeneratedField::MviewDefinition => {
1168                            if mview_definition__.is_some() {
1169                                return Err(serde::de::Error::duplicate_field("mviewDefinition"));
1170                            }
1171                            mview_definition__ = Some(map_.next_value()?);
1172                        }
1173                        GeneratedField::ExprContext => {
1174                            if expr_context__.is_some() {
1175                                return Err(serde::de::Error::duplicate_field("exprContext"));
1176                            }
1177                            expr_context__ = map_.next_value()?;
1178                        }
1179                    }
1180                }
1181                Ok(inject_barrier_request::BuildActorInfo {
1182                    actor_id: actor_id__.unwrap_or_default(),
1183                    fragment_upstreams: fragment_upstreams__.unwrap_or_default(),
1184                    dispatchers: dispatchers__.unwrap_or_default(),
1185                    vnode_bitmap: vnode_bitmap__,
1186                    mview_definition: mview_definition__.unwrap_or_default(),
1187                    expr_context: expr_context__,
1188                })
1189            }
1190        }
1191        deserializer.deserialize_struct("stream_service.InjectBarrierRequest.BuildActorInfo", FIELDS, GeneratedVisitor)
1192    }
1193}
1194impl serde::Serialize for inject_barrier_request::build_actor_info::UpstreamActors {
1195    #[allow(deprecated)]
1196    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1197    where
1198        S: serde::Serializer,
1199    {
1200        use serde::ser::SerializeStruct;
1201        let mut len = 0;
1202        if !self.actors.is_empty() {
1203            len += 1;
1204        }
1205        let mut struct_ser = serializer.serialize_struct("stream_service.InjectBarrierRequest.BuildActorInfo.UpstreamActors", len)?;
1206        if !self.actors.is_empty() {
1207            struct_ser.serialize_field("actors", &self.actors)?;
1208        }
1209        struct_ser.end()
1210    }
1211}
1212impl<'de> serde::Deserialize<'de> for inject_barrier_request::build_actor_info::UpstreamActors {
1213    #[allow(deprecated)]
1214    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1215    where
1216        D: serde::Deserializer<'de>,
1217    {
1218        const FIELDS: &[&str] = &[
1219            "actors",
1220        ];
1221
1222        #[allow(clippy::enum_variant_names)]
1223        enum GeneratedField {
1224            Actors,
1225        }
1226        impl<'de> serde::Deserialize<'de> for GeneratedField {
1227            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1228            where
1229                D: serde::Deserializer<'de>,
1230            {
1231                struct GeneratedVisitor;
1232
1233                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1234                    type Value = GeneratedField;
1235
1236                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1237                        write!(formatter, "expected one of: {:?}", &FIELDS)
1238                    }
1239
1240                    #[allow(unused_variables)]
1241                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1242                    where
1243                        E: serde::de::Error,
1244                    {
1245                        match value {
1246                            "actors" => Ok(GeneratedField::Actors),
1247                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1248                        }
1249                    }
1250                }
1251                deserializer.deserialize_identifier(GeneratedVisitor)
1252            }
1253        }
1254        struct GeneratedVisitor;
1255        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1256            type Value = inject_barrier_request::build_actor_info::UpstreamActors;
1257
1258            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1259                formatter.write_str("struct stream_service.InjectBarrierRequest.BuildActorInfo.UpstreamActors")
1260            }
1261
1262            fn visit_map<V>(self, mut map_: V) -> std::result::Result<inject_barrier_request::build_actor_info::UpstreamActors, V::Error>
1263                where
1264                    V: serde::de::MapAccess<'de>,
1265            {
1266                let mut actors__ = None;
1267                while let Some(k) = map_.next_key()? {
1268                    match k {
1269                        GeneratedField::Actors => {
1270                            if actors__.is_some() {
1271                                return Err(serde::de::Error::duplicate_field("actors"));
1272                            }
1273                            actors__ = 
1274                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1275                                    .into_iter().map(|x| x.0).collect())
1276                            ;
1277                        }
1278                    }
1279                }
1280                Ok(inject_barrier_request::build_actor_info::UpstreamActors {
1281                    actors: actors__.unwrap_or_default(),
1282                })
1283            }
1284        }
1285        deserializer.deserialize_struct("stream_service.InjectBarrierRequest.BuildActorInfo.UpstreamActors", FIELDS, GeneratedVisitor)
1286    }
1287}
1288impl serde::Serialize for inject_barrier_request::FragmentBuildActorInfo {
1289    #[allow(deprecated)]
1290    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1291    where
1292        S: serde::Serializer,
1293    {
1294        use serde::ser::SerializeStruct;
1295        let mut len = 0;
1296        if self.fragment_id != 0 {
1297            len += 1;
1298        }
1299        if self.node.is_some() {
1300            len += 1;
1301        }
1302        if !self.actors.is_empty() {
1303            len += 1;
1304        }
1305        let mut struct_ser = serializer.serialize_struct("stream_service.InjectBarrierRequest.FragmentBuildActorInfo", len)?;
1306        if self.fragment_id != 0 {
1307            struct_ser.serialize_field("fragmentId", &self.fragment_id)?;
1308        }
1309        if let Some(v) = self.node.as_ref() {
1310            struct_ser.serialize_field("node", v)?;
1311        }
1312        if !self.actors.is_empty() {
1313            struct_ser.serialize_field("actors", &self.actors)?;
1314        }
1315        struct_ser.end()
1316    }
1317}
1318impl<'de> serde::Deserialize<'de> for inject_barrier_request::FragmentBuildActorInfo {
1319    #[allow(deprecated)]
1320    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1321    where
1322        D: serde::Deserializer<'de>,
1323    {
1324        const FIELDS: &[&str] = &[
1325            "fragment_id",
1326            "fragmentId",
1327            "node",
1328            "actors",
1329        ];
1330
1331        #[allow(clippy::enum_variant_names)]
1332        enum GeneratedField {
1333            FragmentId,
1334            Node,
1335            Actors,
1336        }
1337        impl<'de> serde::Deserialize<'de> for GeneratedField {
1338            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1339            where
1340                D: serde::Deserializer<'de>,
1341            {
1342                struct GeneratedVisitor;
1343
1344                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1345                    type Value = GeneratedField;
1346
1347                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1348                        write!(formatter, "expected one of: {:?}", &FIELDS)
1349                    }
1350
1351                    #[allow(unused_variables)]
1352                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1353                    where
1354                        E: serde::de::Error,
1355                    {
1356                        match value {
1357                            "fragmentId" | "fragment_id" => Ok(GeneratedField::FragmentId),
1358                            "node" => Ok(GeneratedField::Node),
1359                            "actors" => Ok(GeneratedField::Actors),
1360                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1361                        }
1362                    }
1363                }
1364                deserializer.deserialize_identifier(GeneratedVisitor)
1365            }
1366        }
1367        struct GeneratedVisitor;
1368        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1369            type Value = inject_barrier_request::FragmentBuildActorInfo;
1370
1371            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1372                formatter.write_str("struct stream_service.InjectBarrierRequest.FragmentBuildActorInfo")
1373            }
1374
1375            fn visit_map<V>(self, mut map_: V) -> std::result::Result<inject_barrier_request::FragmentBuildActorInfo, V::Error>
1376                where
1377                    V: serde::de::MapAccess<'de>,
1378            {
1379                let mut fragment_id__ = None;
1380                let mut node__ = None;
1381                let mut actors__ = None;
1382                while let Some(k) = map_.next_key()? {
1383                    match k {
1384                        GeneratedField::FragmentId => {
1385                            if fragment_id__.is_some() {
1386                                return Err(serde::de::Error::duplicate_field("fragmentId"));
1387                            }
1388                            fragment_id__ = 
1389                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1390                            ;
1391                        }
1392                        GeneratedField::Node => {
1393                            if node__.is_some() {
1394                                return Err(serde::de::Error::duplicate_field("node"));
1395                            }
1396                            node__ = map_.next_value()?;
1397                        }
1398                        GeneratedField::Actors => {
1399                            if actors__.is_some() {
1400                                return Err(serde::de::Error::duplicate_field("actors"));
1401                            }
1402                            actors__ = Some(map_.next_value()?);
1403                        }
1404                    }
1405                }
1406                Ok(inject_barrier_request::FragmentBuildActorInfo {
1407                    fragment_id: fragment_id__.unwrap_or_default(),
1408                    node: node__,
1409                    actors: actors__.unwrap_or_default(),
1410                })
1411            }
1412        }
1413        deserializer.deserialize_struct("stream_service.InjectBarrierRequest.FragmentBuildActorInfo", FIELDS, GeneratedVisitor)
1414    }
1415}
1416impl serde::Serialize for ScoredError {
1417    #[allow(deprecated)]
1418    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1419    where
1420        S: serde::Serializer,
1421    {
1422        use serde::ser::SerializeStruct;
1423        let mut len = 0;
1424        if !self.err_msg.is_empty() {
1425            len += 1;
1426        }
1427        if self.score != 0 {
1428            len += 1;
1429        }
1430        let mut struct_ser = serializer.serialize_struct("stream_service.ScoredError", len)?;
1431        if !self.err_msg.is_empty() {
1432            struct_ser.serialize_field("errMsg", &self.err_msg)?;
1433        }
1434        if self.score != 0 {
1435            struct_ser.serialize_field("score", &self.score)?;
1436        }
1437        struct_ser.end()
1438    }
1439}
1440impl<'de> serde::Deserialize<'de> for ScoredError {
1441    #[allow(deprecated)]
1442    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1443    where
1444        D: serde::Deserializer<'de>,
1445    {
1446        const FIELDS: &[&str] = &[
1447            "err_msg",
1448            "errMsg",
1449            "score",
1450        ];
1451
1452        #[allow(clippy::enum_variant_names)]
1453        enum GeneratedField {
1454            ErrMsg,
1455            Score,
1456        }
1457        impl<'de> serde::Deserialize<'de> for GeneratedField {
1458            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1459            where
1460                D: serde::Deserializer<'de>,
1461            {
1462                struct GeneratedVisitor;
1463
1464                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1465                    type Value = GeneratedField;
1466
1467                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1468                        write!(formatter, "expected one of: {:?}", &FIELDS)
1469                    }
1470
1471                    #[allow(unused_variables)]
1472                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1473                    where
1474                        E: serde::de::Error,
1475                    {
1476                        match value {
1477                            "errMsg" | "err_msg" => Ok(GeneratedField::ErrMsg),
1478                            "score" => Ok(GeneratedField::Score),
1479                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1480                        }
1481                    }
1482                }
1483                deserializer.deserialize_identifier(GeneratedVisitor)
1484            }
1485        }
1486        struct GeneratedVisitor;
1487        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1488            type Value = ScoredError;
1489
1490            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1491                formatter.write_str("struct stream_service.ScoredError")
1492            }
1493
1494            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScoredError, V::Error>
1495                where
1496                    V: serde::de::MapAccess<'de>,
1497            {
1498                let mut err_msg__ = None;
1499                let mut score__ = None;
1500                while let Some(k) = map_.next_key()? {
1501                    match k {
1502                        GeneratedField::ErrMsg => {
1503                            if err_msg__.is_some() {
1504                                return Err(serde::de::Error::duplicate_field("errMsg"));
1505                            }
1506                            err_msg__ = Some(map_.next_value()?);
1507                        }
1508                        GeneratedField::Score => {
1509                            if score__.is_some() {
1510                                return Err(serde::de::Error::duplicate_field("score"));
1511                            }
1512                            score__ = 
1513                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1514                            ;
1515                        }
1516                    }
1517                }
1518                Ok(ScoredError {
1519                    err_msg: err_msg__.unwrap_or_default(),
1520                    score: score__.unwrap_or_default(),
1521                })
1522            }
1523        }
1524        deserializer.deserialize_struct("stream_service.ScoredError", FIELDS, GeneratedVisitor)
1525    }
1526}
1527impl serde::Serialize for StreamingControlStreamRequest {
1528    #[allow(deprecated)]
1529    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1530    where
1531        S: serde::Serializer,
1532    {
1533        use serde::ser::SerializeStruct;
1534        let mut len = 0;
1535        if self.request.is_some() {
1536            len += 1;
1537        }
1538        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamRequest", len)?;
1539        if let Some(v) = self.request.as_ref() {
1540            match v {
1541                streaming_control_stream_request::Request::Init(v) => {
1542                    struct_ser.serialize_field("init", v)?;
1543                }
1544                streaming_control_stream_request::Request::InjectBarrier(v) => {
1545                    struct_ser.serialize_field("injectBarrier", v)?;
1546                }
1547                streaming_control_stream_request::Request::RemovePartialGraph(v) => {
1548                    struct_ser.serialize_field("removePartialGraph", v)?;
1549                }
1550                streaming_control_stream_request::Request::CreatePartialGraph(v) => {
1551                    struct_ser.serialize_field("createPartialGraph", v)?;
1552                }
1553                streaming_control_stream_request::Request::ResetDatabase(v) => {
1554                    struct_ser.serialize_field("resetDatabase", v)?;
1555                }
1556            }
1557        }
1558        struct_ser.end()
1559    }
1560}
1561impl<'de> serde::Deserialize<'de> for StreamingControlStreamRequest {
1562    #[allow(deprecated)]
1563    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1564    where
1565        D: serde::Deserializer<'de>,
1566    {
1567        const FIELDS: &[&str] = &[
1568            "init",
1569            "inject_barrier",
1570            "injectBarrier",
1571            "remove_partial_graph",
1572            "removePartialGraph",
1573            "create_partial_graph",
1574            "createPartialGraph",
1575            "reset_database",
1576            "resetDatabase",
1577        ];
1578
1579        #[allow(clippy::enum_variant_names)]
1580        enum GeneratedField {
1581            Init,
1582            InjectBarrier,
1583            RemovePartialGraph,
1584            CreatePartialGraph,
1585            ResetDatabase,
1586        }
1587        impl<'de> serde::Deserialize<'de> for GeneratedField {
1588            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1589            where
1590                D: serde::Deserializer<'de>,
1591            {
1592                struct GeneratedVisitor;
1593
1594                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1595                    type Value = GeneratedField;
1596
1597                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1598                        write!(formatter, "expected one of: {:?}", &FIELDS)
1599                    }
1600
1601                    #[allow(unused_variables)]
1602                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1603                    where
1604                        E: serde::de::Error,
1605                    {
1606                        match value {
1607                            "init" => Ok(GeneratedField::Init),
1608                            "injectBarrier" | "inject_barrier" => Ok(GeneratedField::InjectBarrier),
1609                            "removePartialGraph" | "remove_partial_graph" => Ok(GeneratedField::RemovePartialGraph),
1610                            "createPartialGraph" | "create_partial_graph" => Ok(GeneratedField::CreatePartialGraph),
1611                            "resetDatabase" | "reset_database" => Ok(GeneratedField::ResetDatabase),
1612                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1613                        }
1614                    }
1615                }
1616                deserializer.deserialize_identifier(GeneratedVisitor)
1617            }
1618        }
1619        struct GeneratedVisitor;
1620        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1621            type Value = StreamingControlStreamRequest;
1622
1623            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1624                formatter.write_str("struct stream_service.StreamingControlStreamRequest")
1625            }
1626
1627            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamingControlStreamRequest, V::Error>
1628                where
1629                    V: serde::de::MapAccess<'de>,
1630            {
1631                let mut request__ = None;
1632                while let Some(k) = map_.next_key()? {
1633                    match k {
1634                        GeneratedField::Init => {
1635                            if request__.is_some() {
1636                                return Err(serde::de::Error::duplicate_field("init"));
1637                            }
1638                            request__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_request::Request::Init)
1639;
1640                        }
1641                        GeneratedField::InjectBarrier => {
1642                            if request__.is_some() {
1643                                return Err(serde::de::Error::duplicate_field("injectBarrier"));
1644                            }
1645                            request__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_request::Request::InjectBarrier)
1646;
1647                        }
1648                        GeneratedField::RemovePartialGraph => {
1649                            if request__.is_some() {
1650                                return Err(serde::de::Error::duplicate_field("removePartialGraph"));
1651                            }
1652                            request__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_request::Request::RemovePartialGraph)
1653;
1654                        }
1655                        GeneratedField::CreatePartialGraph => {
1656                            if request__.is_some() {
1657                                return Err(serde::de::Error::duplicate_field("createPartialGraph"));
1658                            }
1659                            request__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_request::Request::CreatePartialGraph)
1660;
1661                        }
1662                        GeneratedField::ResetDatabase => {
1663                            if request__.is_some() {
1664                                return Err(serde::de::Error::duplicate_field("resetDatabase"));
1665                            }
1666                            request__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_request::Request::ResetDatabase)
1667;
1668                        }
1669                    }
1670                }
1671                Ok(StreamingControlStreamRequest {
1672                    request: request__,
1673                })
1674            }
1675        }
1676        deserializer.deserialize_struct("stream_service.StreamingControlStreamRequest", FIELDS, GeneratedVisitor)
1677    }
1678}
1679impl serde::Serialize for streaming_control_stream_request::CreatePartialGraphRequest {
1680    #[allow(deprecated)]
1681    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1682    where
1683        S: serde::Serializer,
1684    {
1685        use serde::ser::SerializeStruct;
1686        let mut len = 0;
1687        if self.partial_graph_id != 0 {
1688            len += 1;
1689        }
1690        if self.database_id != 0 {
1691            len += 1;
1692        }
1693        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamRequest.CreatePartialGraphRequest", len)?;
1694        if self.partial_graph_id != 0 {
1695            struct_ser.serialize_field("partialGraphId", &self.partial_graph_id)?;
1696        }
1697        if self.database_id != 0 {
1698            struct_ser.serialize_field("databaseId", &self.database_id)?;
1699        }
1700        struct_ser.end()
1701    }
1702}
1703impl<'de> serde::Deserialize<'de> for streaming_control_stream_request::CreatePartialGraphRequest {
1704    #[allow(deprecated)]
1705    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1706    where
1707        D: serde::Deserializer<'de>,
1708    {
1709        const FIELDS: &[&str] = &[
1710            "partial_graph_id",
1711            "partialGraphId",
1712            "database_id",
1713            "databaseId",
1714        ];
1715
1716        #[allow(clippy::enum_variant_names)]
1717        enum GeneratedField {
1718            PartialGraphId,
1719            DatabaseId,
1720        }
1721        impl<'de> serde::Deserialize<'de> for GeneratedField {
1722            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1723            where
1724                D: serde::Deserializer<'de>,
1725            {
1726                struct GeneratedVisitor;
1727
1728                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1729                    type Value = GeneratedField;
1730
1731                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1732                        write!(formatter, "expected one of: {:?}", &FIELDS)
1733                    }
1734
1735                    #[allow(unused_variables)]
1736                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1737                    where
1738                        E: serde::de::Error,
1739                    {
1740                        match value {
1741                            "partialGraphId" | "partial_graph_id" => Ok(GeneratedField::PartialGraphId),
1742                            "databaseId" | "database_id" => Ok(GeneratedField::DatabaseId),
1743                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1744                        }
1745                    }
1746                }
1747                deserializer.deserialize_identifier(GeneratedVisitor)
1748            }
1749        }
1750        struct GeneratedVisitor;
1751        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1752            type Value = streaming_control_stream_request::CreatePartialGraphRequest;
1753
1754            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1755                formatter.write_str("struct stream_service.StreamingControlStreamRequest.CreatePartialGraphRequest")
1756            }
1757
1758            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_request::CreatePartialGraphRequest, V::Error>
1759                where
1760                    V: serde::de::MapAccess<'de>,
1761            {
1762                let mut partial_graph_id__ = None;
1763                let mut database_id__ = None;
1764                while let Some(k) = map_.next_key()? {
1765                    match k {
1766                        GeneratedField::PartialGraphId => {
1767                            if partial_graph_id__.is_some() {
1768                                return Err(serde::de::Error::duplicate_field("partialGraphId"));
1769                            }
1770                            partial_graph_id__ = 
1771                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1772                            ;
1773                        }
1774                        GeneratedField::DatabaseId => {
1775                            if database_id__.is_some() {
1776                                return Err(serde::de::Error::duplicate_field("databaseId"));
1777                            }
1778                            database_id__ = 
1779                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1780                            ;
1781                        }
1782                    }
1783                }
1784                Ok(streaming_control_stream_request::CreatePartialGraphRequest {
1785                    partial_graph_id: partial_graph_id__.unwrap_or_default(),
1786                    database_id: database_id__.unwrap_or_default(),
1787                })
1788            }
1789        }
1790        deserializer.deserialize_struct("stream_service.StreamingControlStreamRequest.CreatePartialGraphRequest", FIELDS, GeneratedVisitor)
1791    }
1792}
1793impl serde::Serialize for streaming_control_stream_request::DatabaseInitialPartialGraph {
1794    #[allow(deprecated)]
1795    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1796    where
1797        S: serde::Serializer,
1798    {
1799        use serde::ser::SerializeStruct;
1800        let mut len = 0;
1801        if self.database_id != 0 {
1802            len += 1;
1803        }
1804        if !self.graphs.is_empty() {
1805            len += 1;
1806        }
1807        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamRequest.DatabaseInitialPartialGraph", len)?;
1808        if self.database_id != 0 {
1809            struct_ser.serialize_field("databaseId", &self.database_id)?;
1810        }
1811        if !self.graphs.is_empty() {
1812            struct_ser.serialize_field("graphs", &self.graphs)?;
1813        }
1814        struct_ser.end()
1815    }
1816}
1817impl<'de> serde::Deserialize<'de> for streaming_control_stream_request::DatabaseInitialPartialGraph {
1818    #[allow(deprecated)]
1819    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1820    where
1821        D: serde::Deserializer<'de>,
1822    {
1823        const FIELDS: &[&str] = &[
1824            "database_id",
1825            "databaseId",
1826            "graphs",
1827        ];
1828
1829        #[allow(clippy::enum_variant_names)]
1830        enum GeneratedField {
1831            DatabaseId,
1832            Graphs,
1833        }
1834        impl<'de> serde::Deserialize<'de> for GeneratedField {
1835            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1836            where
1837                D: serde::Deserializer<'de>,
1838            {
1839                struct GeneratedVisitor;
1840
1841                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1842                    type Value = GeneratedField;
1843
1844                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1845                        write!(formatter, "expected one of: {:?}", &FIELDS)
1846                    }
1847
1848                    #[allow(unused_variables)]
1849                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1850                    where
1851                        E: serde::de::Error,
1852                    {
1853                        match value {
1854                            "databaseId" | "database_id" => Ok(GeneratedField::DatabaseId),
1855                            "graphs" => Ok(GeneratedField::Graphs),
1856                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1857                        }
1858                    }
1859                }
1860                deserializer.deserialize_identifier(GeneratedVisitor)
1861            }
1862        }
1863        struct GeneratedVisitor;
1864        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1865            type Value = streaming_control_stream_request::DatabaseInitialPartialGraph;
1866
1867            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1868                formatter.write_str("struct stream_service.StreamingControlStreamRequest.DatabaseInitialPartialGraph")
1869            }
1870
1871            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_request::DatabaseInitialPartialGraph, V::Error>
1872                where
1873                    V: serde::de::MapAccess<'de>,
1874            {
1875                let mut database_id__ = None;
1876                let mut graphs__ = None;
1877                while let Some(k) = map_.next_key()? {
1878                    match k {
1879                        GeneratedField::DatabaseId => {
1880                            if database_id__.is_some() {
1881                                return Err(serde::de::Error::duplicate_field("databaseId"));
1882                            }
1883                            database_id__ = 
1884                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1885                            ;
1886                        }
1887                        GeneratedField::Graphs => {
1888                            if graphs__.is_some() {
1889                                return Err(serde::de::Error::duplicate_field("graphs"));
1890                            }
1891                            graphs__ = Some(map_.next_value()?);
1892                        }
1893                    }
1894                }
1895                Ok(streaming_control_stream_request::DatabaseInitialPartialGraph {
1896                    database_id: database_id__.unwrap_or_default(),
1897                    graphs: graphs__.unwrap_or_default(),
1898                })
1899            }
1900        }
1901        deserializer.deserialize_struct("stream_service.StreamingControlStreamRequest.DatabaseInitialPartialGraph", FIELDS, GeneratedVisitor)
1902    }
1903}
1904impl serde::Serialize for streaming_control_stream_request::InitRequest {
1905    #[allow(deprecated)]
1906    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1907    where
1908        S: serde::Serializer,
1909    {
1910        use serde::ser::SerializeStruct;
1911        let mut len = 0;
1912        if !self.databases.is_empty() {
1913            len += 1;
1914        }
1915        if !self.term_id.is_empty() {
1916            len += 1;
1917        }
1918        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamRequest.InitRequest", len)?;
1919        if !self.databases.is_empty() {
1920            struct_ser.serialize_field("databases", &self.databases)?;
1921        }
1922        if !self.term_id.is_empty() {
1923            struct_ser.serialize_field("termId", &self.term_id)?;
1924        }
1925        struct_ser.end()
1926    }
1927}
1928impl<'de> serde::Deserialize<'de> for streaming_control_stream_request::InitRequest {
1929    #[allow(deprecated)]
1930    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1931    where
1932        D: serde::Deserializer<'de>,
1933    {
1934        const FIELDS: &[&str] = &[
1935            "databases",
1936            "term_id",
1937            "termId",
1938        ];
1939
1940        #[allow(clippy::enum_variant_names)]
1941        enum GeneratedField {
1942            Databases,
1943            TermId,
1944        }
1945        impl<'de> serde::Deserialize<'de> for GeneratedField {
1946            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1947            where
1948                D: serde::Deserializer<'de>,
1949            {
1950                struct GeneratedVisitor;
1951
1952                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1953                    type Value = GeneratedField;
1954
1955                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1956                        write!(formatter, "expected one of: {:?}", &FIELDS)
1957                    }
1958
1959                    #[allow(unused_variables)]
1960                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1961                    where
1962                        E: serde::de::Error,
1963                    {
1964                        match value {
1965                            "databases" => Ok(GeneratedField::Databases),
1966                            "termId" | "term_id" => Ok(GeneratedField::TermId),
1967                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1968                        }
1969                    }
1970                }
1971                deserializer.deserialize_identifier(GeneratedVisitor)
1972            }
1973        }
1974        struct GeneratedVisitor;
1975        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1976            type Value = streaming_control_stream_request::InitRequest;
1977
1978            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1979                formatter.write_str("struct stream_service.StreamingControlStreamRequest.InitRequest")
1980            }
1981
1982            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_request::InitRequest, V::Error>
1983                where
1984                    V: serde::de::MapAccess<'de>,
1985            {
1986                let mut databases__ = None;
1987                let mut term_id__ = None;
1988                while let Some(k) = map_.next_key()? {
1989                    match k {
1990                        GeneratedField::Databases => {
1991                            if databases__.is_some() {
1992                                return Err(serde::de::Error::duplicate_field("databases"));
1993                            }
1994                            databases__ = Some(map_.next_value()?);
1995                        }
1996                        GeneratedField::TermId => {
1997                            if term_id__.is_some() {
1998                                return Err(serde::de::Error::duplicate_field("termId"));
1999                            }
2000                            term_id__ = Some(map_.next_value()?);
2001                        }
2002                    }
2003                }
2004                Ok(streaming_control_stream_request::InitRequest {
2005                    databases: databases__.unwrap_or_default(),
2006                    term_id: term_id__.unwrap_or_default(),
2007                })
2008            }
2009        }
2010        deserializer.deserialize_struct("stream_service.StreamingControlStreamRequest.InitRequest", FIELDS, GeneratedVisitor)
2011    }
2012}
2013impl serde::Serialize for streaming_control_stream_request::InitialPartialGraph {
2014    #[allow(deprecated)]
2015    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2016    where
2017        S: serde::Serializer,
2018    {
2019        use serde::ser::SerializeStruct;
2020        let mut len = 0;
2021        if self.partial_graph_id != 0 {
2022            len += 1;
2023        }
2024        if !self.subscriptions.is_empty() {
2025            len += 1;
2026        }
2027        if !self.actor_infos.is_empty() {
2028            len += 1;
2029        }
2030        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamRequest.InitialPartialGraph", len)?;
2031        if self.partial_graph_id != 0 {
2032            struct_ser.serialize_field("partialGraphId", &self.partial_graph_id)?;
2033        }
2034        if !self.subscriptions.is_empty() {
2035            struct_ser.serialize_field("subscriptions", &self.subscriptions)?;
2036        }
2037        if !self.actor_infos.is_empty() {
2038            struct_ser.serialize_field("actorInfos", &self.actor_infos)?;
2039        }
2040        struct_ser.end()
2041    }
2042}
2043impl<'de> serde::Deserialize<'de> for streaming_control_stream_request::InitialPartialGraph {
2044    #[allow(deprecated)]
2045    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2046    where
2047        D: serde::Deserializer<'de>,
2048    {
2049        const FIELDS: &[&str] = &[
2050            "partial_graph_id",
2051            "partialGraphId",
2052            "subscriptions",
2053            "actor_infos",
2054            "actorInfos",
2055        ];
2056
2057        #[allow(clippy::enum_variant_names)]
2058        enum GeneratedField {
2059            PartialGraphId,
2060            Subscriptions,
2061            ActorInfos,
2062        }
2063        impl<'de> serde::Deserialize<'de> for GeneratedField {
2064            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2065            where
2066                D: serde::Deserializer<'de>,
2067            {
2068                struct GeneratedVisitor;
2069
2070                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2071                    type Value = GeneratedField;
2072
2073                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2074                        write!(formatter, "expected one of: {:?}", &FIELDS)
2075                    }
2076
2077                    #[allow(unused_variables)]
2078                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2079                    where
2080                        E: serde::de::Error,
2081                    {
2082                        match value {
2083                            "partialGraphId" | "partial_graph_id" => Ok(GeneratedField::PartialGraphId),
2084                            "subscriptions" => Ok(GeneratedField::Subscriptions),
2085                            "actorInfos" | "actor_infos" => Ok(GeneratedField::ActorInfos),
2086                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2087                        }
2088                    }
2089                }
2090                deserializer.deserialize_identifier(GeneratedVisitor)
2091            }
2092        }
2093        struct GeneratedVisitor;
2094        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2095            type Value = streaming_control_stream_request::InitialPartialGraph;
2096
2097            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2098                formatter.write_str("struct stream_service.StreamingControlStreamRequest.InitialPartialGraph")
2099            }
2100
2101            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_request::InitialPartialGraph, V::Error>
2102                where
2103                    V: serde::de::MapAccess<'de>,
2104            {
2105                let mut partial_graph_id__ = None;
2106                let mut subscriptions__ = None;
2107                let mut actor_infos__ = None;
2108                while let Some(k) = map_.next_key()? {
2109                    match k {
2110                        GeneratedField::PartialGraphId => {
2111                            if partial_graph_id__.is_some() {
2112                                return Err(serde::de::Error::duplicate_field("partialGraphId"));
2113                            }
2114                            partial_graph_id__ = 
2115                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2116                            ;
2117                        }
2118                        GeneratedField::Subscriptions => {
2119                            if subscriptions__.is_some() {
2120                                return Err(serde::de::Error::duplicate_field("subscriptions"));
2121                            }
2122                            subscriptions__ = Some(map_.next_value()?);
2123                        }
2124                        GeneratedField::ActorInfos => {
2125                            if actor_infos__.is_some() {
2126                                return Err(serde::de::Error::duplicate_field("actorInfos"));
2127                            }
2128                            actor_infos__ = Some(map_.next_value()?);
2129                        }
2130                    }
2131                }
2132                Ok(streaming_control_stream_request::InitialPartialGraph {
2133                    partial_graph_id: partial_graph_id__.unwrap_or_default(),
2134                    subscriptions: subscriptions__.unwrap_or_default(),
2135                    actor_infos: actor_infos__.unwrap_or_default(),
2136                })
2137            }
2138        }
2139        deserializer.deserialize_struct("stream_service.StreamingControlStreamRequest.InitialPartialGraph", FIELDS, GeneratedVisitor)
2140    }
2141}
2142impl serde::Serialize for streaming_control_stream_request::RemovePartialGraphRequest {
2143    #[allow(deprecated)]
2144    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2145    where
2146        S: serde::Serializer,
2147    {
2148        use serde::ser::SerializeStruct;
2149        let mut len = 0;
2150        if !self.partial_graph_ids.is_empty() {
2151            len += 1;
2152        }
2153        if self.database_id != 0 {
2154            len += 1;
2155        }
2156        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamRequest.RemovePartialGraphRequest", len)?;
2157        if !self.partial_graph_ids.is_empty() {
2158            struct_ser.serialize_field("partialGraphIds", &self.partial_graph_ids)?;
2159        }
2160        if self.database_id != 0 {
2161            struct_ser.serialize_field("databaseId", &self.database_id)?;
2162        }
2163        struct_ser.end()
2164    }
2165}
2166impl<'de> serde::Deserialize<'de> for streaming_control_stream_request::RemovePartialGraphRequest {
2167    #[allow(deprecated)]
2168    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2169    where
2170        D: serde::Deserializer<'de>,
2171    {
2172        const FIELDS: &[&str] = &[
2173            "partial_graph_ids",
2174            "partialGraphIds",
2175            "database_id",
2176            "databaseId",
2177        ];
2178
2179        #[allow(clippy::enum_variant_names)]
2180        enum GeneratedField {
2181            PartialGraphIds,
2182            DatabaseId,
2183        }
2184        impl<'de> serde::Deserialize<'de> for GeneratedField {
2185            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2186            where
2187                D: serde::Deserializer<'de>,
2188            {
2189                struct GeneratedVisitor;
2190
2191                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2192                    type Value = GeneratedField;
2193
2194                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2195                        write!(formatter, "expected one of: {:?}", &FIELDS)
2196                    }
2197
2198                    #[allow(unused_variables)]
2199                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2200                    where
2201                        E: serde::de::Error,
2202                    {
2203                        match value {
2204                            "partialGraphIds" | "partial_graph_ids" => Ok(GeneratedField::PartialGraphIds),
2205                            "databaseId" | "database_id" => Ok(GeneratedField::DatabaseId),
2206                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2207                        }
2208                    }
2209                }
2210                deserializer.deserialize_identifier(GeneratedVisitor)
2211            }
2212        }
2213        struct GeneratedVisitor;
2214        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2215            type Value = streaming_control_stream_request::RemovePartialGraphRequest;
2216
2217            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2218                formatter.write_str("struct stream_service.StreamingControlStreamRequest.RemovePartialGraphRequest")
2219            }
2220
2221            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_request::RemovePartialGraphRequest, V::Error>
2222                where
2223                    V: serde::de::MapAccess<'de>,
2224            {
2225                let mut partial_graph_ids__ = None;
2226                let mut database_id__ = None;
2227                while let Some(k) = map_.next_key()? {
2228                    match k {
2229                        GeneratedField::PartialGraphIds => {
2230                            if partial_graph_ids__.is_some() {
2231                                return Err(serde::de::Error::duplicate_field("partialGraphIds"));
2232                            }
2233                            partial_graph_ids__ = 
2234                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2235                                    .into_iter().map(|x| x.0).collect())
2236                            ;
2237                        }
2238                        GeneratedField::DatabaseId => {
2239                            if database_id__.is_some() {
2240                                return Err(serde::de::Error::duplicate_field("databaseId"));
2241                            }
2242                            database_id__ = 
2243                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2244                            ;
2245                        }
2246                    }
2247                }
2248                Ok(streaming_control_stream_request::RemovePartialGraphRequest {
2249                    partial_graph_ids: partial_graph_ids__.unwrap_or_default(),
2250                    database_id: database_id__.unwrap_or_default(),
2251                })
2252            }
2253        }
2254        deserializer.deserialize_struct("stream_service.StreamingControlStreamRequest.RemovePartialGraphRequest", FIELDS, GeneratedVisitor)
2255    }
2256}
2257impl serde::Serialize for streaming_control_stream_request::ResetDatabaseRequest {
2258    #[allow(deprecated)]
2259    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2260    where
2261        S: serde::Serializer,
2262    {
2263        use serde::ser::SerializeStruct;
2264        let mut len = 0;
2265        if self.database_id != 0 {
2266            len += 1;
2267        }
2268        if self.reset_request_id != 0 {
2269            len += 1;
2270        }
2271        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamRequest.ResetDatabaseRequest", len)?;
2272        if self.database_id != 0 {
2273            struct_ser.serialize_field("databaseId", &self.database_id)?;
2274        }
2275        if self.reset_request_id != 0 {
2276            struct_ser.serialize_field("resetRequestId", &self.reset_request_id)?;
2277        }
2278        struct_ser.end()
2279    }
2280}
2281impl<'de> serde::Deserialize<'de> for streaming_control_stream_request::ResetDatabaseRequest {
2282    #[allow(deprecated)]
2283    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2284    where
2285        D: serde::Deserializer<'de>,
2286    {
2287        const FIELDS: &[&str] = &[
2288            "database_id",
2289            "databaseId",
2290            "reset_request_id",
2291            "resetRequestId",
2292        ];
2293
2294        #[allow(clippy::enum_variant_names)]
2295        enum GeneratedField {
2296            DatabaseId,
2297            ResetRequestId,
2298        }
2299        impl<'de> serde::Deserialize<'de> for GeneratedField {
2300            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2301            where
2302                D: serde::Deserializer<'de>,
2303            {
2304                struct GeneratedVisitor;
2305
2306                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2307                    type Value = GeneratedField;
2308
2309                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2310                        write!(formatter, "expected one of: {:?}", &FIELDS)
2311                    }
2312
2313                    #[allow(unused_variables)]
2314                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2315                    where
2316                        E: serde::de::Error,
2317                    {
2318                        match value {
2319                            "databaseId" | "database_id" => Ok(GeneratedField::DatabaseId),
2320                            "resetRequestId" | "reset_request_id" => Ok(GeneratedField::ResetRequestId),
2321                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2322                        }
2323                    }
2324                }
2325                deserializer.deserialize_identifier(GeneratedVisitor)
2326            }
2327        }
2328        struct GeneratedVisitor;
2329        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2330            type Value = streaming_control_stream_request::ResetDatabaseRequest;
2331
2332            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2333                formatter.write_str("struct stream_service.StreamingControlStreamRequest.ResetDatabaseRequest")
2334            }
2335
2336            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_request::ResetDatabaseRequest, V::Error>
2337                where
2338                    V: serde::de::MapAccess<'de>,
2339            {
2340                let mut database_id__ = None;
2341                let mut reset_request_id__ = None;
2342                while let Some(k) = map_.next_key()? {
2343                    match k {
2344                        GeneratedField::DatabaseId => {
2345                            if database_id__.is_some() {
2346                                return Err(serde::de::Error::duplicate_field("databaseId"));
2347                            }
2348                            database_id__ = 
2349                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2350                            ;
2351                        }
2352                        GeneratedField::ResetRequestId => {
2353                            if reset_request_id__.is_some() {
2354                                return Err(serde::de::Error::duplicate_field("resetRequestId"));
2355                            }
2356                            reset_request_id__ = 
2357                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2358                            ;
2359                        }
2360                    }
2361                }
2362                Ok(streaming_control_stream_request::ResetDatabaseRequest {
2363                    database_id: database_id__.unwrap_or_default(),
2364                    reset_request_id: reset_request_id__.unwrap_or_default(),
2365                })
2366            }
2367        }
2368        deserializer.deserialize_struct("stream_service.StreamingControlStreamRequest.ResetDatabaseRequest", FIELDS, GeneratedVisitor)
2369    }
2370}
2371impl serde::Serialize for StreamingControlStreamResponse {
2372    #[allow(deprecated)]
2373    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2374    where
2375        S: serde::Serializer,
2376    {
2377        use serde::ser::SerializeStruct;
2378        let mut len = 0;
2379        if self.response.is_some() {
2380            len += 1;
2381        }
2382        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamResponse", len)?;
2383        if let Some(v) = self.response.as_ref() {
2384            match v {
2385                streaming_control_stream_response::Response::Init(v) => {
2386                    struct_ser.serialize_field("init", v)?;
2387                }
2388                streaming_control_stream_response::Response::CompleteBarrier(v) => {
2389                    struct_ser.serialize_field("completeBarrier", v)?;
2390                }
2391                streaming_control_stream_response::Response::Shutdown(v) => {
2392                    struct_ser.serialize_field("shutdown", v)?;
2393                }
2394                streaming_control_stream_response::Response::ReportDatabaseFailure(v) => {
2395                    struct_ser.serialize_field("reportDatabaseFailure", v)?;
2396                }
2397                streaming_control_stream_response::Response::ResetDatabase(v) => {
2398                    struct_ser.serialize_field("resetDatabase", v)?;
2399                }
2400            }
2401        }
2402        struct_ser.end()
2403    }
2404}
2405impl<'de> serde::Deserialize<'de> for StreamingControlStreamResponse {
2406    #[allow(deprecated)]
2407    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2408    where
2409        D: serde::Deserializer<'de>,
2410    {
2411        const FIELDS: &[&str] = &[
2412            "init",
2413            "complete_barrier",
2414            "completeBarrier",
2415            "shutdown",
2416            "report_database_failure",
2417            "reportDatabaseFailure",
2418            "reset_database",
2419            "resetDatabase",
2420        ];
2421
2422        #[allow(clippy::enum_variant_names)]
2423        enum GeneratedField {
2424            Init,
2425            CompleteBarrier,
2426            Shutdown,
2427            ReportDatabaseFailure,
2428            ResetDatabase,
2429        }
2430        impl<'de> serde::Deserialize<'de> for GeneratedField {
2431            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2432            where
2433                D: serde::Deserializer<'de>,
2434            {
2435                struct GeneratedVisitor;
2436
2437                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2438                    type Value = GeneratedField;
2439
2440                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2441                        write!(formatter, "expected one of: {:?}", &FIELDS)
2442                    }
2443
2444                    #[allow(unused_variables)]
2445                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2446                    where
2447                        E: serde::de::Error,
2448                    {
2449                        match value {
2450                            "init" => Ok(GeneratedField::Init),
2451                            "completeBarrier" | "complete_barrier" => Ok(GeneratedField::CompleteBarrier),
2452                            "shutdown" => Ok(GeneratedField::Shutdown),
2453                            "reportDatabaseFailure" | "report_database_failure" => Ok(GeneratedField::ReportDatabaseFailure),
2454                            "resetDatabase" | "reset_database" => Ok(GeneratedField::ResetDatabase),
2455                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2456                        }
2457                    }
2458                }
2459                deserializer.deserialize_identifier(GeneratedVisitor)
2460            }
2461        }
2462        struct GeneratedVisitor;
2463        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2464            type Value = StreamingControlStreamResponse;
2465
2466            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2467                formatter.write_str("struct stream_service.StreamingControlStreamResponse")
2468            }
2469
2470            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamingControlStreamResponse, V::Error>
2471                where
2472                    V: serde::de::MapAccess<'de>,
2473            {
2474                let mut response__ = None;
2475                while let Some(k) = map_.next_key()? {
2476                    match k {
2477                        GeneratedField::Init => {
2478                            if response__.is_some() {
2479                                return Err(serde::de::Error::duplicate_field("init"));
2480                            }
2481                            response__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_response::Response::Init)
2482;
2483                        }
2484                        GeneratedField::CompleteBarrier => {
2485                            if response__.is_some() {
2486                                return Err(serde::de::Error::duplicate_field("completeBarrier"));
2487                            }
2488                            response__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_response::Response::CompleteBarrier)
2489;
2490                        }
2491                        GeneratedField::Shutdown => {
2492                            if response__.is_some() {
2493                                return Err(serde::de::Error::duplicate_field("shutdown"));
2494                            }
2495                            response__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_response::Response::Shutdown)
2496;
2497                        }
2498                        GeneratedField::ReportDatabaseFailure => {
2499                            if response__.is_some() {
2500                                return Err(serde::de::Error::duplicate_field("reportDatabaseFailure"));
2501                            }
2502                            response__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_response::Response::ReportDatabaseFailure)
2503;
2504                        }
2505                        GeneratedField::ResetDatabase => {
2506                            if response__.is_some() {
2507                                return Err(serde::de::Error::duplicate_field("resetDatabase"));
2508                            }
2509                            response__ = map_.next_value::<::std::option::Option<_>>()?.map(streaming_control_stream_response::Response::ResetDatabase)
2510;
2511                        }
2512                    }
2513                }
2514                Ok(StreamingControlStreamResponse {
2515                    response: response__,
2516                })
2517            }
2518        }
2519        deserializer.deserialize_struct("stream_service.StreamingControlStreamResponse", FIELDS, GeneratedVisitor)
2520    }
2521}
2522impl serde::Serialize for streaming_control_stream_response::InitResponse {
2523    #[allow(deprecated)]
2524    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2525    where
2526        S: serde::Serializer,
2527    {
2528        use serde::ser::SerializeStruct;
2529        let len = 0;
2530        let struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamResponse.InitResponse", len)?;
2531        struct_ser.end()
2532    }
2533}
2534impl<'de> serde::Deserialize<'de> for streaming_control_stream_response::InitResponse {
2535    #[allow(deprecated)]
2536    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2537    where
2538        D: serde::Deserializer<'de>,
2539    {
2540        const FIELDS: &[&str] = &[
2541        ];
2542
2543        #[allow(clippy::enum_variant_names)]
2544        enum GeneratedField {
2545        }
2546        impl<'de> serde::Deserialize<'de> for GeneratedField {
2547            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2548            where
2549                D: serde::Deserializer<'de>,
2550            {
2551                struct GeneratedVisitor;
2552
2553                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2554                    type Value = GeneratedField;
2555
2556                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2557                        write!(formatter, "expected one of: {:?}", &FIELDS)
2558                    }
2559
2560                    #[allow(unused_variables)]
2561                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2562                    where
2563                        E: serde::de::Error,
2564                    {
2565                            Err(serde::de::Error::unknown_field(value, FIELDS))
2566                    }
2567                }
2568                deserializer.deserialize_identifier(GeneratedVisitor)
2569            }
2570        }
2571        struct GeneratedVisitor;
2572        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2573            type Value = streaming_control_stream_response::InitResponse;
2574
2575            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2576                formatter.write_str("struct stream_service.StreamingControlStreamResponse.InitResponse")
2577            }
2578
2579            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_response::InitResponse, V::Error>
2580                where
2581                    V: serde::de::MapAccess<'de>,
2582            {
2583                while map_.next_key::<GeneratedField>()?.is_some() {
2584                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
2585                }
2586                Ok(streaming_control_stream_response::InitResponse {
2587                })
2588            }
2589        }
2590        deserializer.deserialize_struct("stream_service.StreamingControlStreamResponse.InitResponse", FIELDS, GeneratedVisitor)
2591    }
2592}
2593impl serde::Serialize for streaming_control_stream_response::ReportDatabaseFailureResponse {
2594    #[allow(deprecated)]
2595    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2596    where
2597        S: serde::Serializer,
2598    {
2599        use serde::ser::SerializeStruct;
2600        let mut len = 0;
2601        if self.database_id != 0 {
2602            len += 1;
2603        }
2604        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamResponse.ReportDatabaseFailureResponse", len)?;
2605        if self.database_id != 0 {
2606            struct_ser.serialize_field("databaseId", &self.database_id)?;
2607        }
2608        struct_ser.end()
2609    }
2610}
2611impl<'de> serde::Deserialize<'de> for streaming_control_stream_response::ReportDatabaseFailureResponse {
2612    #[allow(deprecated)]
2613    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2614    where
2615        D: serde::Deserializer<'de>,
2616    {
2617        const FIELDS: &[&str] = &[
2618            "database_id",
2619            "databaseId",
2620        ];
2621
2622        #[allow(clippy::enum_variant_names)]
2623        enum GeneratedField {
2624            DatabaseId,
2625        }
2626        impl<'de> serde::Deserialize<'de> for GeneratedField {
2627            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2628            where
2629                D: serde::Deserializer<'de>,
2630            {
2631                struct GeneratedVisitor;
2632
2633                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2634                    type Value = GeneratedField;
2635
2636                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2637                        write!(formatter, "expected one of: {:?}", &FIELDS)
2638                    }
2639
2640                    #[allow(unused_variables)]
2641                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2642                    where
2643                        E: serde::de::Error,
2644                    {
2645                        match value {
2646                            "databaseId" | "database_id" => Ok(GeneratedField::DatabaseId),
2647                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2648                        }
2649                    }
2650                }
2651                deserializer.deserialize_identifier(GeneratedVisitor)
2652            }
2653        }
2654        struct GeneratedVisitor;
2655        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2656            type Value = streaming_control_stream_response::ReportDatabaseFailureResponse;
2657
2658            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2659                formatter.write_str("struct stream_service.StreamingControlStreamResponse.ReportDatabaseFailureResponse")
2660            }
2661
2662            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_response::ReportDatabaseFailureResponse, V::Error>
2663                where
2664                    V: serde::de::MapAccess<'de>,
2665            {
2666                let mut database_id__ = None;
2667                while let Some(k) = map_.next_key()? {
2668                    match k {
2669                        GeneratedField::DatabaseId => {
2670                            if database_id__.is_some() {
2671                                return Err(serde::de::Error::duplicate_field("databaseId"));
2672                            }
2673                            database_id__ = 
2674                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2675                            ;
2676                        }
2677                    }
2678                }
2679                Ok(streaming_control_stream_response::ReportDatabaseFailureResponse {
2680                    database_id: database_id__.unwrap_or_default(),
2681                })
2682            }
2683        }
2684        deserializer.deserialize_struct("stream_service.StreamingControlStreamResponse.ReportDatabaseFailureResponse", FIELDS, GeneratedVisitor)
2685    }
2686}
2687impl serde::Serialize for streaming_control_stream_response::ResetDatabaseResponse {
2688    #[allow(deprecated)]
2689    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2690    where
2691        S: serde::Serializer,
2692    {
2693        use serde::ser::SerializeStruct;
2694        let mut len = 0;
2695        if self.database_id != 0 {
2696            len += 1;
2697        }
2698        if self.root_err.is_some() {
2699            len += 1;
2700        }
2701        if self.reset_request_id != 0 {
2702            len += 1;
2703        }
2704        let mut struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamResponse.ResetDatabaseResponse", len)?;
2705        if self.database_id != 0 {
2706            struct_ser.serialize_field("databaseId", &self.database_id)?;
2707        }
2708        if let Some(v) = self.root_err.as_ref() {
2709            struct_ser.serialize_field("rootErr", v)?;
2710        }
2711        if self.reset_request_id != 0 {
2712            struct_ser.serialize_field("resetRequestId", &self.reset_request_id)?;
2713        }
2714        struct_ser.end()
2715    }
2716}
2717impl<'de> serde::Deserialize<'de> for streaming_control_stream_response::ResetDatabaseResponse {
2718    #[allow(deprecated)]
2719    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2720    where
2721        D: serde::Deserializer<'de>,
2722    {
2723        const FIELDS: &[&str] = &[
2724            "database_id",
2725            "databaseId",
2726            "root_err",
2727            "rootErr",
2728            "reset_request_id",
2729            "resetRequestId",
2730        ];
2731
2732        #[allow(clippy::enum_variant_names)]
2733        enum GeneratedField {
2734            DatabaseId,
2735            RootErr,
2736            ResetRequestId,
2737        }
2738        impl<'de> serde::Deserialize<'de> for GeneratedField {
2739            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2740            where
2741                D: serde::Deserializer<'de>,
2742            {
2743                struct GeneratedVisitor;
2744
2745                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2746                    type Value = GeneratedField;
2747
2748                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2749                        write!(formatter, "expected one of: {:?}", &FIELDS)
2750                    }
2751
2752                    #[allow(unused_variables)]
2753                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2754                    where
2755                        E: serde::de::Error,
2756                    {
2757                        match value {
2758                            "databaseId" | "database_id" => Ok(GeneratedField::DatabaseId),
2759                            "rootErr" | "root_err" => Ok(GeneratedField::RootErr),
2760                            "resetRequestId" | "reset_request_id" => Ok(GeneratedField::ResetRequestId),
2761                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2762                        }
2763                    }
2764                }
2765                deserializer.deserialize_identifier(GeneratedVisitor)
2766            }
2767        }
2768        struct GeneratedVisitor;
2769        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2770            type Value = streaming_control_stream_response::ResetDatabaseResponse;
2771
2772            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2773                formatter.write_str("struct stream_service.StreamingControlStreamResponse.ResetDatabaseResponse")
2774            }
2775
2776            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_response::ResetDatabaseResponse, V::Error>
2777                where
2778                    V: serde::de::MapAccess<'de>,
2779            {
2780                let mut database_id__ = None;
2781                let mut root_err__ = None;
2782                let mut reset_request_id__ = None;
2783                while let Some(k) = map_.next_key()? {
2784                    match k {
2785                        GeneratedField::DatabaseId => {
2786                            if database_id__.is_some() {
2787                                return Err(serde::de::Error::duplicate_field("databaseId"));
2788                            }
2789                            database_id__ = 
2790                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2791                            ;
2792                        }
2793                        GeneratedField::RootErr => {
2794                            if root_err__.is_some() {
2795                                return Err(serde::de::Error::duplicate_field("rootErr"));
2796                            }
2797                            root_err__ = map_.next_value()?;
2798                        }
2799                        GeneratedField::ResetRequestId => {
2800                            if reset_request_id__.is_some() {
2801                                return Err(serde::de::Error::duplicate_field("resetRequestId"));
2802                            }
2803                            reset_request_id__ = 
2804                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2805                            ;
2806                        }
2807                    }
2808                }
2809                Ok(streaming_control_stream_response::ResetDatabaseResponse {
2810                    database_id: database_id__.unwrap_or_default(),
2811                    root_err: root_err__,
2812                    reset_request_id: reset_request_id__.unwrap_or_default(),
2813                })
2814            }
2815        }
2816        deserializer.deserialize_struct("stream_service.StreamingControlStreamResponse.ResetDatabaseResponse", FIELDS, GeneratedVisitor)
2817    }
2818}
2819impl serde::Serialize for streaming_control_stream_response::ShutdownResponse {
2820    #[allow(deprecated)]
2821    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2822    where
2823        S: serde::Serializer,
2824    {
2825        use serde::ser::SerializeStruct;
2826        let len = 0;
2827        let struct_ser = serializer.serialize_struct("stream_service.StreamingControlStreamResponse.ShutdownResponse", len)?;
2828        struct_ser.end()
2829    }
2830}
2831impl<'de> serde::Deserialize<'de> for streaming_control_stream_response::ShutdownResponse {
2832    #[allow(deprecated)]
2833    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2834    where
2835        D: serde::Deserializer<'de>,
2836    {
2837        const FIELDS: &[&str] = &[
2838        ];
2839
2840        #[allow(clippy::enum_variant_names)]
2841        enum GeneratedField {
2842        }
2843        impl<'de> serde::Deserialize<'de> for GeneratedField {
2844            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2845            where
2846                D: serde::Deserializer<'de>,
2847            {
2848                struct GeneratedVisitor;
2849
2850                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2851                    type Value = GeneratedField;
2852
2853                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2854                        write!(formatter, "expected one of: {:?}", &FIELDS)
2855                    }
2856
2857                    #[allow(unused_variables)]
2858                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2859                    where
2860                        E: serde::de::Error,
2861                    {
2862                            Err(serde::de::Error::unknown_field(value, FIELDS))
2863                    }
2864                }
2865                deserializer.deserialize_identifier(GeneratedVisitor)
2866            }
2867        }
2868        struct GeneratedVisitor;
2869        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2870            type Value = streaming_control_stream_response::ShutdownResponse;
2871
2872            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2873                formatter.write_str("struct stream_service.StreamingControlStreamResponse.ShutdownResponse")
2874            }
2875
2876            fn visit_map<V>(self, mut map_: V) -> std::result::Result<streaming_control_stream_response::ShutdownResponse, V::Error>
2877                where
2878                    V: serde::de::MapAccess<'de>,
2879            {
2880                while map_.next_key::<GeneratedField>()?.is_some() {
2881                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
2882                }
2883                Ok(streaming_control_stream_response::ShutdownResponse {
2884                })
2885            }
2886        }
2887        deserializer.deserialize_struct("stream_service.StreamingControlStreamResponse.ShutdownResponse", FIELDS, GeneratedVisitor)
2888    }
2889}