risingwave_pb/
stream_plan.serde.rs

1use crate::stream_plan::*;
2impl serde::Serialize for ActorMapping {
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.original_indices.is_empty() {
11            len += 1;
12        }
13        if !self.data.is_empty() {
14            len += 1;
15        }
16        let mut struct_ser = serializer.serialize_struct("stream_plan.ActorMapping", len)?;
17        if !self.original_indices.is_empty() {
18            struct_ser.serialize_field("originalIndices", &self.original_indices)?;
19        }
20        if !self.data.is_empty() {
21            struct_ser.serialize_field("data", &self.data)?;
22        }
23        struct_ser.end()
24    }
25}
26impl<'de> serde::Deserialize<'de> for ActorMapping {
27    #[allow(deprecated)]
28    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29    where
30        D: serde::Deserializer<'de>,
31    {
32        const FIELDS: &[&str] = &[
33            "original_indices",
34            "originalIndices",
35            "data",
36        ];
37
38        #[allow(clippy::enum_variant_names)]
39        enum GeneratedField {
40            OriginalIndices,
41            Data,
42        }
43        impl<'de> serde::Deserialize<'de> for GeneratedField {
44            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
45            where
46                D: serde::Deserializer<'de>,
47            {
48                struct GeneratedVisitor;
49
50                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
51                    type Value = GeneratedField;
52
53                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
54                        write!(formatter, "expected one of: {:?}", &FIELDS)
55                    }
56
57                    #[allow(unused_variables)]
58                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
59                    where
60                        E: serde::de::Error,
61                    {
62                        match value {
63                            "originalIndices" | "original_indices" => Ok(GeneratedField::OriginalIndices),
64                            "data" => Ok(GeneratedField::Data),
65                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
66                        }
67                    }
68                }
69                deserializer.deserialize_identifier(GeneratedVisitor)
70            }
71        }
72        struct GeneratedVisitor;
73        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
74            type Value = ActorMapping;
75
76            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
77                formatter.write_str("struct stream_plan.ActorMapping")
78            }
79
80            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ActorMapping, V::Error>
81                where
82                    V: serde::de::MapAccess<'de>,
83            {
84                let mut original_indices__ = None;
85                let mut data__ = None;
86                while let Some(k) = map_.next_key()? {
87                    match k {
88                        GeneratedField::OriginalIndices => {
89                            if original_indices__.is_some() {
90                                return Err(serde::de::Error::duplicate_field("originalIndices"));
91                            }
92                            original_indices__ = 
93                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
94                                    .into_iter().map(|x| x.0).collect())
95                            ;
96                        }
97                        GeneratedField::Data => {
98                            if data__.is_some() {
99                                return Err(serde::de::Error::duplicate_field("data"));
100                            }
101                            data__ = 
102                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
103                                    .into_iter().map(|x| x.0).collect())
104                            ;
105                        }
106                    }
107                }
108                Ok(ActorMapping {
109                    original_indices: original_indices__.unwrap_or_default(),
110                    data: data__.unwrap_or_default(),
111                })
112            }
113        }
114        deserializer.deserialize_struct("stream_plan.ActorMapping", FIELDS, GeneratedVisitor)
115    }
116}
117impl serde::Serialize for AddMutation {
118    #[allow(deprecated)]
119    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
120    where
121        S: serde::Serializer,
122    {
123        use serde::ser::SerializeStruct;
124        let mut len = 0;
125        if !self.actor_dispatchers.is_empty() {
126            len += 1;
127        }
128        if !self.added_actors.is_empty() {
129            len += 1;
130        }
131        if !self.actor_splits.is_empty() {
132            len += 1;
133        }
134        if self.pause {
135            len += 1;
136        }
137        if !self.subscriptions_to_add.is_empty() {
138            len += 1;
139        }
140        let mut struct_ser = serializer.serialize_struct("stream_plan.AddMutation", len)?;
141        if !self.actor_dispatchers.is_empty() {
142            struct_ser.serialize_field("actorDispatchers", &self.actor_dispatchers)?;
143        }
144        if !self.added_actors.is_empty() {
145            struct_ser.serialize_field("addedActors", &self.added_actors)?;
146        }
147        if !self.actor_splits.is_empty() {
148            struct_ser.serialize_field("actorSplits", &self.actor_splits)?;
149        }
150        if self.pause {
151            struct_ser.serialize_field("pause", &self.pause)?;
152        }
153        if !self.subscriptions_to_add.is_empty() {
154            struct_ser.serialize_field("subscriptionsToAdd", &self.subscriptions_to_add)?;
155        }
156        struct_ser.end()
157    }
158}
159impl<'de> serde::Deserialize<'de> for AddMutation {
160    #[allow(deprecated)]
161    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
162    where
163        D: serde::Deserializer<'de>,
164    {
165        const FIELDS: &[&str] = &[
166            "actor_dispatchers",
167            "actorDispatchers",
168            "added_actors",
169            "addedActors",
170            "actor_splits",
171            "actorSplits",
172            "pause",
173            "subscriptions_to_add",
174            "subscriptionsToAdd",
175        ];
176
177        #[allow(clippy::enum_variant_names)]
178        enum GeneratedField {
179            ActorDispatchers,
180            AddedActors,
181            ActorSplits,
182            Pause,
183            SubscriptionsToAdd,
184        }
185        impl<'de> serde::Deserialize<'de> for GeneratedField {
186            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
187            where
188                D: serde::Deserializer<'de>,
189            {
190                struct GeneratedVisitor;
191
192                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
193                    type Value = GeneratedField;
194
195                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
196                        write!(formatter, "expected one of: {:?}", &FIELDS)
197                    }
198
199                    #[allow(unused_variables)]
200                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
201                    where
202                        E: serde::de::Error,
203                    {
204                        match value {
205                            "actorDispatchers" | "actor_dispatchers" => Ok(GeneratedField::ActorDispatchers),
206                            "addedActors" | "added_actors" => Ok(GeneratedField::AddedActors),
207                            "actorSplits" | "actor_splits" => Ok(GeneratedField::ActorSplits),
208                            "pause" => Ok(GeneratedField::Pause),
209                            "subscriptionsToAdd" | "subscriptions_to_add" => Ok(GeneratedField::SubscriptionsToAdd),
210                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
211                        }
212                    }
213                }
214                deserializer.deserialize_identifier(GeneratedVisitor)
215            }
216        }
217        struct GeneratedVisitor;
218        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
219            type Value = AddMutation;
220
221            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
222                formatter.write_str("struct stream_plan.AddMutation")
223            }
224
225            fn visit_map<V>(self, mut map_: V) -> std::result::Result<AddMutation, V::Error>
226                where
227                    V: serde::de::MapAccess<'de>,
228            {
229                let mut actor_dispatchers__ = None;
230                let mut added_actors__ = None;
231                let mut actor_splits__ = None;
232                let mut pause__ = None;
233                let mut subscriptions_to_add__ = None;
234                while let Some(k) = map_.next_key()? {
235                    match k {
236                        GeneratedField::ActorDispatchers => {
237                            if actor_dispatchers__.is_some() {
238                                return Err(serde::de::Error::duplicate_field("actorDispatchers"));
239                            }
240                            actor_dispatchers__ = Some(
241                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
242                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
243                            );
244                        }
245                        GeneratedField::AddedActors => {
246                            if added_actors__.is_some() {
247                                return Err(serde::de::Error::duplicate_field("addedActors"));
248                            }
249                            added_actors__ = 
250                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
251                                    .into_iter().map(|x| x.0).collect())
252                            ;
253                        }
254                        GeneratedField::ActorSplits => {
255                            if actor_splits__.is_some() {
256                                return Err(serde::de::Error::duplicate_field("actorSplits"));
257                            }
258                            actor_splits__ = Some(
259                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
260                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
261                            );
262                        }
263                        GeneratedField::Pause => {
264                            if pause__.is_some() {
265                                return Err(serde::de::Error::duplicate_field("pause"));
266                            }
267                            pause__ = Some(map_.next_value()?);
268                        }
269                        GeneratedField::SubscriptionsToAdd => {
270                            if subscriptions_to_add__.is_some() {
271                                return Err(serde::de::Error::duplicate_field("subscriptionsToAdd"));
272                            }
273                            subscriptions_to_add__ = Some(map_.next_value()?);
274                        }
275                    }
276                }
277                Ok(AddMutation {
278                    actor_dispatchers: actor_dispatchers__.unwrap_or_default(),
279                    added_actors: added_actors__.unwrap_or_default(),
280                    actor_splits: actor_splits__.unwrap_or_default(),
281                    pause: pause__.unwrap_or_default(),
282                    subscriptions_to_add: subscriptions_to_add__.unwrap_or_default(),
283                })
284            }
285        }
286        deserializer.deserialize_struct("stream_plan.AddMutation", FIELDS, GeneratedVisitor)
287    }
288}
289impl serde::Serialize for AggCallState {
290    #[allow(deprecated)]
291    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
292    where
293        S: serde::Serializer,
294    {
295        use serde::ser::SerializeStruct;
296        let mut len = 0;
297        if self.inner.is_some() {
298            len += 1;
299        }
300        let mut struct_ser = serializer.serialize_struct("stream_plan.AggCallState", len)?;
301        if let Some(v) = self.inner.as_ref() {
302            match v {
303                agg_call_state::Inner::ValueState(v) => {
304                    struct_ser.serialize_field("valueState", v)?;
305                }
306                agg_call_state::Inner::MaterializedInputState(v) => {
307                    struct_ser.serialize_field("materializedInputState", v)?;
308                }
309            }
310        }
311        struct_ser.end()
312    }
313}
314impl<'de> serde::Deserialize<'de> for AggCallState {
315    #[allow(deprecated)]
316    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
317    where
318        D: serde::Deserializer<'de>,
319    {
320        const FIELDS: &[&str] = &[
321            "value_state",
322            "valueState",
323            "materialized_input_state",
324            "materializedInputState",
325        ];
326
327        #[allow(clippy::enum_variant_names)]
328        enum GeneratedField {
329            ValueState,
330            MaterializedInputState,
331        }
332        impl<'de> serde::Deserialize<'de> for GeneratedField {
333            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
334            where
335                D: serde::Deserializer<'de>,
336            {
337                struct GeneratedVisitor;
338
339                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
340                    type Value = GeneratedField;
341
342                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
343                        write!(formatter, "expected one of: {:?}", &FIELDS)
344                    }
345
346                    #[allow(unused_variables)]
347                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
348                    where
349                        E: serde::de::Error,
350                    {
351                        match value {
352                            "valueState" | "value_state" => Ok(GeneratedField::ValueState),
353                            "materializedInputState" | "materialized_input_state" => Ok(GeneratedField::MaterializedInputState),
354                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
355                        }
356                    }
357                }
358                deserializer.deserialize_identifier(GeneratedVisitor)
359            }
360        }
361        struct GeneratedVisitor;
362        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
363            type Value = AggCallState;
364
365            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
366                formatter.write_str("struct stream_plan.AggCallState")
367            }
368
369            fn visit_map<V>(self, mut map_: V) -> std::result::Result<AggCallState, V::Error>
370                where
371                    V: serde::de::MapAccess<'de>,
372            {
373                let mut inner__ = None;
374                while let Some(k) = map_.next_key()? {
375                    match k {
376                        GeneratedField::ValueState => {
377                            if inner__.is_some() {
378                                return Err(serde::de::Error::duplicate_field("valueState"));
379                            }
380                            inner__ = map_.next_value::<::std::option::Option<_>>()?.map(agg_call_state::Inner::ValueState)
381;
382                        }
383                        GeneratedField::MaterializedInputState => {
384                            if inner__.is_some() {
385                                return Err(serde::de::Error::duplicate_field("materializedInputState"));
386                            }
387                            inner__ = map_.next_value::<::std::option::Option<_>>()?.map(agg_call_state::Inner::MaterializedInputState)
388;
389                        }
390                    }
391                }
392                Ok(AggCallState {
393                    inner: inner__,
394                })
395            }
396        }
397        deserializer.deserialize_struct("stream_plan.AggCallState", FIELDS, GeneratedVisitor)
398    }
399}
400impl serde::Serialize for agg_call_state::MaterializedInputState {
401    #[allow(deprecated)]
402    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
403    where
404        S: serde::Serializer,
405    {
406        use serde::ser::SerializeStruct;
407        let mut len = 0;
408        if self.table.is_some() {
409            len += 1;
410        }
411        if !self.included_upstream_indices.is_empty() {
412            len += 1;
413        }
414        if !self.table_value_indices.is_empty() {
415            len += 1;
416        }
417        if !self.order_columns.is_empty() {
418            len += 1;
419        }
420        let mut struct_ser = serializer.serialize_struct("stream_plan.AggCallState.MaterializedInputState", len)?;
421        if let Some(v) = self.table.as_ref() {
422            struct_ser.serialize_field("table", v)?;
423        }
424        if !self.included_upstream_indices.is_empty() {
425            struct_ser.serialize_field("includedUpstreamIndices", &self.included_upstream_indices)?;
426        }
427        if !self.table_value_indices.is_empty() {
428            struct_ser.serialize_field("tableValueIndices", &self.table_value_indices)?;
429        }
430        if !self.order_columns.is_empty() {
431            struct_ser.serialize_field("orderColumns", &self.order_columns)?;
432        }
433        struct_ser.end()
434    }
435}
436impl<'de> serde::Deserialize<'de> for agg_call_state::MaterializedInputState {
437    #[allow(deprecated)]
438    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
439    where
440        D: serde::Deserializer<'de>,
441    {
442        const FIELDS: &[&str] = &[
443            "table",
444            "included_upstream_indices",
445            "includedUpstreamIndices",
446            "table_value_indices",
447            "tableValueIndices",
448            "order_columns",
449            "orderColumns",
450        ];
451
452        #[allow(clippy::enum_variant_names)]
453        enum GeneratedField {
454            Table,
455            IncludedUpstreamIndices,
456            TableValueIndices,
457            OrderColumns,
458        }
459        impl<'de> serde::Deserialize<'de> for GeneratedField {
460            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
461            where
462                D: serde::Deserializer<'de>,
463            {
464                struct GeneratedVisitor;
465
466                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
467                    type Value = GeneratedField;
468
469                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
470                        write!(formatter, "expected one of: {:?}", &FIELDS)
471                    }
472
473                    #[allow(unused_variables)]
474                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
475                    where
476                        E: serde::de::Error,
477                    {
478                        match value {
479                            "table" => Ok(GeneratedField::Table),
480                            "includedUpstreamIndices" | "included_upstream_indices" => Ok(GeneratedField::IncludedUpstreamIndices),
481                            "tableValueIndices" | "table_value_indices" => Ok(GeneratedField::TableValueIndices),
482                            "orderColumns" | "order_columns" => Ok(GeneratedField::OrderColumns),
483                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
484                        }
485                    }
486                }
487                deserializer.deserialize_identifier(GeneratedVisitor)
488            }
489        }
490        struct GeneratedVisitor;
491        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
492            type Value = agg_call_state::MaterializedInputState;
493
494            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
495                formatter.write_str("struct stream_plan.AggCallState.MaterializedInputState")
496            }
497
498            fn visit_map<V>(self, mut map_: V) -> std::result::Result<agg_call_state::MaterializedInputState, V::Error>
499                where
500                    V: serde::de::MapAccess<'de>,
501            {
502                let mut table__ = None;
503                let mut included_upstream_indices__ = None;
504                let mut table_value_indices__ = None;
505                let mut order_columns__ = None;
506                while let Some(k) = map_.next_key()? {
507                    match k {
508                        GeneratedField::Table => {
509                            if table__.is_some() {
510                                return Err(serde::de::Error::duplicate_field("table"));
511                            }
512                            table__ = map_.next_value()?;
513                        }
514                        GeneratedField::IncludedUpstreamIndices => {
515                            if included_upstream_indices__.is_some() {
516                                return Err(serde::de::Error::duplicate_field("includedUpstreamIndices"));
517                            }
518                            included_upstream_indices__ = 
519                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
520                                    .into_iter().map(|x| x.0).collect())
521                            ;
522                        }
523                        GeneratedField::TableValueIndices => {
524                            if table_value_indices__.is_some() {
525                                return Err(serde::de::Error::duplicate_field("tableValueIndices"));
526                            }
527                            table_value_indices__ = 
528                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
529                                    .into_iter().map(|x| x.0).collect())
530                            ;
531                        }
532                        GeneratedField::OrderColumns => {
533                            if order_columns__.is_some() {
534                                return Err(serde::de::Error::duplicate_field("orderColumns"));
535                            }
536                            order_columns__ = Some(map_.next_value()?);
537                        }
538                    }
539                }
540                Ok(agg_call_state::MaterializedInputState {
541                    table: table__,
542                    included_upstream_indices: included_upstream_indices__.unwrap_or_default(),
543                    table_value_indices: table_value_indices__.unwrap_or_default(),
544                    order_columns: order_columns__.unwrap_or_default(),
545                })
546            }
547        }
548        deserializer.deserialize_struct("stream_plan.AggCallState.MaterializedInputState", FIELDS, GeneratedVisitor)
549    }
550}
551impl serde::Serialize for agg_call_state::ValueState {
552    #[allow(deprecated)]
553    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
554    where
555        S: serde::Serializer,
556    {
557        use serde::ser::SerializeStruct;
558        let len = 0;
559        let struct_ser = serializer.serialize_struct("stream_plan.AggCallState.ValueState", len)?;
560        struct_ser.end()
561    }
562}
563impl<'de> serde::Deserialize<'de> for agg_call_state::ValueState {
564    #[allow(deprecated)]
565    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
566    where
567        D: serde::Deserializer<'de>,
568    {
569        const FIELDS: &[&str] = &[
570        ];
571
572        #[allow(clippy::enum_variant_names)]
573        enum GeneratedField {
574        }
575        impl<'de> serde::Deserialize<'de> for GeneratedField {
576            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
577            where
578                D: serde::Deserializer<'de>,
579            {
580                struct GeneratedVisitor;
581
582                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
583                    type Value = GeneratedField;
584
585                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
586                        write!(formatter, "expected one of: {:?}", &FIELDS)
587                    }
588
589                    #[allow(unused_variables)]
590                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
591                    where
592                        E: serde::de::Error,
593                    {
594                            Err(serde::de::Error::unknown_field(value, FIELDS))
595                    }
596                }
597                deserializer.deserialize_identifier(GeneratedVisitor)
598            }
599        }
600        struct GeneratedVisitor;
601        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
602            type Value = agg_call_state::ValueState;
603
604            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
605                formatter.write_str("struct stream_plan.AggCallState.ValueState")
606            }
607
608            fn visit_map<V>(self, mut map_: V) -> std::result::Result<agg_call_state::ValueState, V::Error>
609                where
610                    V: serde::de::MapAccess<'de>,
611            {
612                while map_.next_key::<GeneratedField>()?.is_some() {
613                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
614                }
615                Ok(agg_call_state::ValueState {
616                })
617            }
618        }
619        deserializer.deserialize_struct("stream_plan.AggCallState.ValueState", FIELDS, GeneratedVisitor)
620    }
621}
622impl serde::Serialize for AggNodeVersion {
623    #[allow(deprecated)]
624    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
625    where
626        S: serde::Serializer,
627    {
628        let variant = match self {
629            Self::Unspecified => "AGG_NODE_VERSION_UNSPECIFIED",
630            Self::Issue12140 => "AGG_NODE_VERSION_ISSUE_12140",
631            Self::Issue13465 => "AGG_NODE_VERSION_ISSUE_13465",
632        };
633        serializer.serialize_str(variant)
634    }
635}
636impl<'de> serde::Deserialize<'de> for AggNodeVersion {
637    #[allow(deprecated)]
638    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
639    where
640        D: serde::Deserializer<'de>,
641    {
642        const FIELDS: &[&str] = &[
643            "AGG_NODE_VERSION_UNSPECIFIED",
644            "AGG_NODE_VERSION_ISSUE_12140",
645            "AGG_NODE_VERSION_ISSUE_13465",
646        ];
647
648        struct GeneratedVisitor;
649
650        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
651            type Value = AggNodeVersion;
652
653            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
654                write!(formatter, "expected one of: {:?}", &FIELDS)
655            }
656
657            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
658            where
659                E: serde::de::Error,
660            {
661                i32::try_from(v)
662                    .ok()
663                    .and_then(|x| x.try_into().ok())
664                    .ok_or_else(|| {
665                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
666                    })
667            }
668
669            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
670            where
671                E: serde::de::Error,
672            {
673                i32::try_from(v)
674                    .ok()
675                    .and_then(|x| x.try_into().ok())
676                    .ok_or_else(|| {
677                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
678                    })
679            }
680
681            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
682            where
683                E: serde::de::Error,
684            {
685                match value {
686                    "AGG_NODE_VERSION_UNSPECIFIED" => Ok(AggNodeVersion::Unspecified),
687                    "AGG_NODE_VERSION_ISSUE_12140" => Ok(AggNodeVersion::Issue12140),
688                    "AGG_NODE_VERSION_ISSUE_13465" => Ok(AggNodeVersion::Issue13465),
689                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
690                }
691            }
692        }
693        deserializer.deserialize_any(GeneratedVisitor)
694    }
695}
696impl serde::Serialize for ArrangeNode {
697    #[allow(deprecated)]
698    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
699    where
700        S: serde::Serializer,
701    {
702        use serde::ser::SerializeStruct;
703        let mut len = 0;
704        if self.table_info.is_some() {
705            len += 1;
706        }
707        if !self.distribution_key.is_empty() {
708            len += 1;
709        }
710        if self.table.is_some() {
711            len += 1;
712        }
713        let mut struct_ser = serializer.serialize_struct("stream_plan.ArrangeNode", len)?;
714        if let Some(v) = self.table_info.as_ref() {
715            struct_ser.serialize_field("tableInfo", v)?;
716        }
717        if !self.distribution_key.is_empty() {
718            struct_ser.serialize_field("distributionKey", &self.distribution_key)?;
719        }
720        if let Some(v) = self.table.as_ref() {
721            struct_ser.serialize_field("table", v)?;
722        }
723        struct_ser.end()
724    }
725}
726impl<'de> serde::Deserialize<'de> for ArrangeNode {
727    #[allow(deprecated)]
728    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
729    where
730        D: serde::Deserializer<'de>,
731    {
732        const FIELDS: &[&str] = &[
733            "table_info",
734            "tableInfo",
735            "distribution_key",
736            "distributionKey",
737            "table",
738        ];
739
740        #[allow(clippy::enum_variant_names)]
741        enum GeneratedField {
742            TableInfo,
743            DistributionKey,
744            Table,
745        }
746        impl<'de> serde::Deserialize<'de> for GeneratedField {
747            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
748            where
749                D: serde::Deserializer<'de>,
750            {
751                struct GeneratedVisitor;
752
753                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
754                    type Value = GeneratedField;
755
756                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
757                        write!(formatter, "expected one of: {:?}", &FIELDS)
758                    }
759
760                    #[allow(unused_variables)]
761                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
762                    where
763                        E: serde::de::Error,
764                    {
765                        match value {
766                            "tableInfo" | "table_info" => Ok(GeneratedField::TableInfo),
767                            "distributionKey" | "distribution_key" => Ok(GeneratedField::DistributionKey),
768                            "table" => Ok(GeneratedField::Table),
769                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
770                        }
771                    }
772                }
773                deserializer.deserialize_identifier(GeneratedVisitor)
774            }
775        }
776        struct GeneratedVisitor;
777        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
778            type Value = ArrangeNode;
779
780            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
781                formatter.write_str("struct stream_plan.ArrangeNode")
782            }
783
784            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ArrangeNode, V::Error>
785                where
786                    V: serde::de::MapAccess<'de>,
787            {
788                let mut table_info__ = None;
789                let mut distribution_key__ = None;
790                let mut table__ = None;
791                while let Some(k) = map_.next_key()? {
792                    match k {
793                        GeneratedField::TableInfo => {
794                            if table_info__.is_some() {
795                                return Err(serde::de::Error::duplicate_field("tableInfo"));
796                            }
797                            table_info__ = map_.next_value()?;
798                        }
799                        GeneratedField::DistributionKey => {
800                            if distribution_key__.is_some() {
801                                return Err(serde::de::Error::duplicate_field("distributionKey"));
802                            }
803                            distribution_key__ = 
804                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
805                                    .into_iter().map(|x| x.0).collect())
806                            ;
807                        }
808                        GeneratedField::Table => {
809                            if table__.is_some() {
810                                return Err(serde::de::Error::duplicate_field("table"));
811                            }
812                            table__ = map_.next_value()?;
813                        }
814                    }
815                }
816                Ok(ArrangeNode {
817                    table_info: table_info__,
818                    distribution_key: distribution_key__.unwrap_or_default(),
819                    table: table__,
820                })
821            }
822        }
823        deserializer.deserialize_struct("stream_plan.ArrangeNode", FIELDS, GeneratedVisitor)
824    }
825}
826impl serde::Serialize for ArrangementInfo {
827    #[allow(deprecated)]
828    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
829    where
830        S: serde::Serializer,
831    {
832        use serde::ser::SerializeStruct;
833        let mut len = 0;
834        if !self.arrange_key_orders.is_empty() {
835            len += 1;
836        }
837        if !self.column_descs.is_empty() {
838            len += 1;
839        }
840        if self.table_desc.is_some() {
841            len += 1;
842        }
843        if !self.output_col_idx.is_empty() {
844            len += 1;
845        }
846        let mut struct_ser = serializer.serialize_struct("stream_plan.ArrangementInfo", len)?;
847        if !self.arrange_key_orders.is_empty() {
848            struct_ser.serialize_field("arrangeKeyOrders", &self.arrange_key_orders)?;
849        }
850        if !self.column_descs.is_empty() {
851            struct_ser.serialize_field("columnDescs", &self.column_descs)?;
852        }
853        if let Some(v) = self.table_desc.as_ref() {
854            struct_ser.serialize_field("tableDesc", v)?;
855        }
856        if !self.output_col_idx.is_empty() {
857            struct_ser.serialize_field("outputColIdx", &self.output_col_idx)?;
858        }
859        struct_ser.end()
860    }
861}
862impl<'de> serde::Deserialize<'de> for ArrangementInfo {
863    #[allow(deprecated)]
864    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
865    where
866        D: serde::Deserializer<'de>,
867    {
868        const FIELDS: &[&str] = &[
869            "arrange_key_orders",
870            "arrangeKeyOrders",
871            "column_descs",
872            "columnDescs",
873            "table_desc",
874            "tableDesc",
875            "output_col_idx",
876            "outputColIdx",
877        ];
878
879        #[allow(clippy::enum_variant_names)]
880        enum GeneratedField {
881            ArrangeKeyOrders,
882            ColumnDescs,
883            TableDesc,
884            OutputColIdx,
885        }
886        impl<'de> serde::Deserialize<'de> for GeneratedField {
887            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
888            where
889                D: serde::Deserializer<'de>,
890            {
891                struct GeneratedVisitor;
892
893                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
894                    type Value = GeneratedField;
895
896                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
897                        write!(formatter, "expected one of: {:?}", &FIELDS)
898                    }
899
900                    #[allow(unused_variables)]
901                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
902                    where
903                        E: serde::de::Error,
904                    {
905                        match value {
906                            "arrangeKeyOrders" | "arrange_key_orders" => Ok(GeneratedField::ArrangeKeyOrders),
907                            "columnDescs" | "column_descs" => Ok(GeneratedField::ColumnDescs),
908                            "tableDesc" | "table_desc" => Ok(GeneratedField::TableDesc),
909                            "outputColIdx" | "output_col_idx" => Ok(GeneratedField::OutputColIdx),
910                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
911                        }
912                    }
913                }
914                deserializer.deserialize_identifier(GeneratedVisitor)
915            }
916        }
917        struct GeneratedVisitor;
918        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
919            type Value = ArrangementInfo;
920
921            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
922                formatter.write_str("struct stream_plan.ArrangementInfo")
923            }
924
925            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ArrangementInfo, V::Error>
926                where
927                    V: serde::de::MapAccess<'de>,
928            {
929                let mut arrange_key_orders__ = None;
930                let mut column_descs__ = None;
931                let mut table_desc__ = None;
932                let mut output_col_idx__ = None;
933                while let Some(k) = map_.next_key()? {
934                    match k {
935                        GeneratedField::ArrangeKeyOrders => {
936                            if arrange_key_orders__.is_some() {
937                                return Err(serde::de::Error::duplicate_field("arrangeKeyOrders"));
938                            }
939                            arrange_key_orders__ = Some(map_.next_value()?);
940                        }
941                        GeneratedField::ColumnDescs => {
942                            if column_descs__.is_some() {
943                                return Err(serde::de::Error::duplicate_field("columnDescs"));
944                            }
945                            column_descs__ = Some(map_.next_value()?);
946                        }
947                        GeneratedField::TableDesc => {
948                            if table_desc__.is_some() {
949                                return Err(serde::de::Error::duplicate_field("tableDesc"));
950                            }
951                            table_desc__ = map_.next_value()?;
952                        }
953                        GeneratedField::OutputColIdx => {
954                            if output_col_idx__.is_some() {
955                                return Err(serde::de::Error::duplicate_field("outputColIdx"));
956                            }
957                            output_col_idx__ = 
958                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
959                                    .into_iter().map(|x| x.0).collect())
960                            ;
961                        }
962                    }
963                }
964                Ok(ArrangementInfo {
965                    arrange_key_orders: arrange_key_orders__.unwrap_or_default(),
966                    column_descs: column_descs__.unwrap_or_default(),
967                    table_desc: table_desc__,
968                    output_col_idx: output_col_idx__.unwrap_or_default(),
969                })
970            }
971        }
972        deserializer.deserialize_struct("stream_plan.ArrangementInfo", FIELDS, GeneratedVisitor)
973    }
974}
975impl serde::Serialize for AsOfJoinNode {
976    #[allow(deprecated)]
977    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
978    where
979        S: serde::Serializer,
980    {
981        use serde::ser::SerializeStruct;
982        let mut len = 0;
983        if self.join_type != 0 {
984            len += 1;
985        }
986        if !self.left_key.is_empty() {
987            len += 1;
988        }
989        if !self.right_key.is_empty() {
990            len += 1;
991        }
992        if self.left_table.is_some() {
993            len += 1;
994        }
995        if self.right_table.is_some() {
996            len += 1;
997        }
998        if !self.output_indices.is_empty() {
999            len += 1;
1000        }
1001        if !self.left_deduped_input_pk_indices.is_empty() {
1002            len += 1;
1003        }
1004        if !self.right_deduped_input_pk_indices.is_empty() {
1005            len += 1;
1006        }
1007        if !self.null_safe.is_empty() {
1008            len += 1;
1009        }
1010        if self.asof_desc.is_some() {
1011            len += 1;
1012        }
1013        let mut struct_ser = serializer.serialize_struct("stream_plan.AsOfJoinNode", len)?;
1014        if self.join_type != 0 {
1015            let v = super::plan_common::AsOfJoinType::try_from(self.join_type)
1016                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
1017            struct_ser.serialize_field("joinType", &v)?;
1018        }
1019        if !self.left_key.is_empty() {
1020            struct_ser.serialize_field("leftKey", &self.left_key)?;
1021        }
1022        if !self.right_key.is_empty() {
1023            struct_ser.serialize_field("rightKey", &self.right_key)?;
1024        }
1025        if let Some(v) = self.left_table.as_ref() {
1026            struct_ser.serialize_field("leftTable", v)?;
1027        }
1028        if let Some(v) = self.right_table.as_ref() {
1029            struct_ser.serialize_field("rightTable", v)?;
1030        }
1031        if !self.output_indices.is_empty() {
1032            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
1033        }
1034        if !self.left_deduped_input_pk_indices.is_empty() {
1035            struct_ser.serialize_field("leftDedupedInputPkIndices", &self.left_deduped_input_pk_indices)?;
1036        }
1037        if !self.right_deduped_input_pk_indices.is_empty() {
1038            struct_ser.serialize_field("rightDedupedInputPkIndices", &self.right_deduped_input_pk_indices)?;
1039        }
1040        if !self.null_safe.is_empty() {
1041            struct_ser.serialize_field("nullSafe", &self.null_safe)?;
1042        }
1043        if let Some(v) = self.asof_desc.as_ref() {
1044            struct_ser.serialize_field("asofDesc", v)?;
1045        }
1046        struct_ser.end()
1047    }
1048}
1049impl<'de> serde::Deserialize<'de> for AsOfJoinNode {
1050    #[allow(deprecated)]
1051    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1052    where
1053        D: serde::Deserializer<'de>,
1054    {
1055        const FIELDS: &[&str] = &[
1056            "join_type",
1057            "joinType",
1058            "left_key",
1059            "leftKey",
1060            "right_key",
1061            "rightKey",
1062            "left_table",
1063            "leftTable",
1064            "right_table",
1065            "rightTable",
1066            "output_indices",
1067            "outputIndices",
1068            "left_deduped_input_pk_indices",
1069            "leftDedupedInputPkIndices",
1070            "right_deduped_input_pk_indices",
1071            "rightDedupedInputPkIndices",
1072            "null_safe",
1073            "nullSafe",
1074            "asof_desc",
1075            "asofDesc",
1076        ];
1077
1078        #[allow(clippy::enum_variant_names)]
1079        enum GeneratedField {
1080            JoinType,
1081            LeftKey,
1082            RightKey,
1083            LeftTable,
1084            RightTable,
1085            OutputIndices,
1086            LeftDedupedInputPkIndices,
1087            RightDedupedInputPkIndices,
1088            NullSafe,
1089            AsofDesc,
1090        }
1091        impl<'de> serde::Deserialize<'de> for GeneratedField {
1092            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1093            where
1094                D: serde::Deserializer<'de>,
1095            {
1096                struct GeneratedVisitor;
1097
1098                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1099                    type Value = GeneratedField;
1100
1101                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1102                        write!(formatter, "expected one of: {:?}", &FIELDS)
1103                    }
1104
1105                    #[allow(unused_variables)]
1106                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1107                    where
1108                        E: serde::de::Error,
1109                    {
1110                        match value {
1111                            "joinType" | "join_type" => Ok(GeneratedField::JoinType),
1112                            "leftKey" | "left_key" => Ok(GeneratedField::LeftKey),
1113                            "rightKey" | "right_key" => Ok(GeneratedField::RightKey),
1114                            "leftTable" | "left_table" => Ok(GeneratedField::LeftTable),
1115                            "rightTable" | "right_table" => Ok(GeneratedField::RightTable),
1116                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
1117                            "leftDedupedInputPkIndices" | "left_deduped_input_pk_indices" => Ok(GeneratedField::LeftDedupedInputPkIndices),
1118                            "rightDedupedInputPkIndices" | "right_deduped_input_pk_indices" => Ok(GeneratedField::RightDedupedInputPkIndices),
1119                            "nullSafe" | "null_safe" => Ok(GeneratedField::NullSafe),
1120                            "asofDesc" | "asof_desc" => Ok(GeneratedField::AsofDesc),
1121                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1122                        }
1123                    }
1124                }
1125                deserializer.deserialize_identifier(GeneratedVisitor)
1126            }
1127        }
1128        struct GeneratedVisitor;
1129        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1130            type Value = AsOfJoinNode;
1131
1132            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1133                formatter.write_str("struct stream_plan.AsOfJoinNode")
1134            }
1135
1136            fn visit_map<V>(self, mut map_: V) -> std::result::Result<AsOfJoinNode, V::Error>
1137                where
1138                    V: serde::de::MapAccess<'de>,
1139            {
1140                let mut join_type__ = None;
1141                let mut left_key__ = None;
1142                let mut right_key__ = None;
1143                let mut left_table__ = None;
1144                let mut right_table__ = None;
1145                let mut output_indices__ = None;
1146                let mut left_deduped_input_pk_indices__ = None;
1147                let mut right_deduped_input_pk_indices__ = None;
1148                let mut null_safe__ = None;
1149                let mut asof_desc__ = None;
1150                while let Some(k) = map_.next_key()? {
1151                    match k {
1152                        GeneratedField::JoinType => {
1153                            if join_type__.is_some() {
1154                                return Err(serde::de::Error::duplicate_field("joinType"));
1155                            }
1156                            join_type__ = Some(map_.next_value::<super::plan_common::AsOfJoinType>()? as i32);
1157                        }
1158                        GeneratedField::LeftKey => {
1159                            if left_key__.is_some() {
1160                                return Err(serde::de::Error::duplicate_field("leftKey"));
1161                            }
1162                            left_key__ = 
1163                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1164                                    .into_iter().map(|x| x.0).collect())
1165                            ;
1166                        }
1167                        GeneratedField::RightKey => {
1168                            if right_key__.is_some() {
1169                                return Err(serde::de::Error::duplicate_field("rightKey"));
1170                            }
1171                            right_key__ = 
1172                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1173                                    .into_iter().map(|x| x.0).collect())
1174                            ;
1175                        }
1176                        GeneratedField::LeftTable => {
1177                            if left_table__.is_some() {
1178                                return Err(serde::de::Error::duplicate_field("leftTable"));
1179                            }
1180                            left_table__ = map_.next_value()?;
1181                        }
1182                        GeneratedField::RightTable => {
1183                            if right_table__.is_some() {
1184                                return Err(serde::de::Error::duplicate_field("rightTable"));
1185                            }
1186                            right_table__ = map_.next_value()?;
1187                        }
1188                        GeneratedField::OutputIndices => {
1189                            if output_indices__.is_some() {
1190                                return Err(serde::de::Error::duplicate_field("outputIndices"));
1191                            }
1192                            output_indices__ = 
1193                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1194                                    .into_iter().map(|x| x.0).collect())
1195                            ;
1196                        }
1197                        GeneratedField::LeftDedupedInputPkIndices => {
1198                            if left_deduped_input_pk_indices__.is_some() {
1199                                return Err(serde::de::Error::duplicate_field("leftDedupedInputPkIndices"));
1200                            }
1201                            left_deduped_input_pk_indices__ = 
1202                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1203                                    .into_iter().map(|x| x.0).collect())
1204                            ;
1205                        }
1206                        GeneratedField::RightDedupedInputPkIndices => {
1207                            if right_deduped_input_pk_indices__.is_some() {
1208                                return Err(serde::de::Error::duplicate_field("rightDedupedInputPkIndices"));
1209                            }
1210                            right_deduped_input_pk_indices__ = 
1211                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1212                                    .into_iter().map(|x| x.0).collect())
1213                            ;
1214                        }
1215                        GeneratedField::NullSafe => {
1216                            if null_safe__.is_some() {
1217                                return Err(serde::de::Error::duplicate_field("nullSafe"));
1218                            }
1219                            null_safe__ = Some(map_.next_value()?);
1220                        }
1221                        GeneratedField::AsofDesc => {
1222                            if asof_desc__.is_some() {
1223                                return Err(serde::de::Error::duplicate_field("asofDesc"));
1224                            }
1225                            asof_desc__ = map_.next_value()?;
1226                        }
1227                    }
1228                }
1229                Ok(AsOfJoinNode {
1230                    join_type: join_type__.unwrap_or_default(),
1231                    left_key: left_key__.unwrap_or_default(),
1232                    right_key: right_key__.unwrap_or_default(),
1233                    left_table: left_table__,
1234                    right_table: right_table__,
1235                    output_indices: output_indices__.unwrap_or_default(),
1236                    left_deduped_input_pk_indices: left_deduped_input_pk_indices__.unwrap_or_default(),
1237                    right_deduped_input_pk_indices: right_deduped_input_pk_indices__.unwrap_or_default(),
1238                    null_safe: null_safe__.unwrap_or_default(),
1239                    asof_desc: asof_desc__,
1240                })
1241            }
1242        }
1243        deserializer.deserialize_struct("stream_plan.AsOfJoinNode", FIELDS, GeneratedVisitor)
1244    }
1245}
1246impl serde::Serialize for Barrier {
1247    #[allow(deprecated)]
1248    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1249    where
1250        S: serde::Serializer,
1251    {
1252        use serde::ser::SerializeStruct;
1253        let mut len = 0;
1254        if self.epoch.is_some() {
1255            len += 1;
1256        }
1257        if self.mutation.is_some() {
1258            len += 1;
1259        }
1260        if !self.tracing_context.is_empty() {
1261            len += 1;
1262        }
1263        if self.kind != 0 {
1264            len += 1;
1265        }
1266        if !self.passed_actors.is_empty() {
1267            len += 1;
1268        }
1269        let mut struct_ser = serializer.serialize_struct("stream_plan.Barrier", len)?;
1270        if let Some(v) = self.epoch.as_ref() {
1271            struct_ser.serialize_field("epoch", v)?;
1272        }
1273        if let Some(v) = self.mutation.as_ref() {
1274            struct_ser.serialize_field("mutation", v)?;
1275        }
1276        if !self.tracing_context.is_empty() {
1277            struct_ser.serialize_field("tracingContext", &self.tracing_context)?;
1278        }
1279        if self.kind != 0 {
1280            let v = barrier::BarrierKind::try_from(self.kind)
1281                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.kind)))?;
1282            struct_ser.serialize_field("kind", &v)?;
1283        }
1284        if !self.passed_actors.is_empty() {
1285            struct_ser.serialize_field("passedActors", &self.passed_actors)?;
1286        }
1287        struct_ser.end()
1288    }
1289}
1290impl<'de> serde::Deserialize<'de> for Barrier {
1291    #[allow(deprecated)]
1292    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1293    where
1294        D: serde::Deserializer<'de>,
1295    {
1296        const FIELDS: &[&str] = &[
1297            "epoch",
1298            "mutation",
1299            "tracing_context",
1300            "tracingContext",
1301            "kind",
1302            "passed_actors",
1303            "passedActors",
1304        ];
1305
1306        #[allow(clippy::enum_variant_names)]
1307        enum GeneratedField {
1308            Epoch,
1309            Mutation,
1310            TracingContext,
1311            Kind,
1312            PassedActors,
1313        }
1314        impl<'de> serde::Deserialize<'de> for GeneratedField {
1315            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1316            where
1317                D: serde::Deserializer<'de>,
1318            {
1319                struct GeneratedVisitor;
1320
1321                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1322                    type Value = GeneratedField;
1323
1324                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1325                        write!(formatter, "expected one of: {:?}", &FIELDS)
1326                    }
1327
1328                    #[allow(unused_variables)]
1329                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1330                    where
1331                        E: serde::de::Error,
1332                    {
1333                        match value {
1334                            "epoch" => Ok(GeneratedField::Epoch),
1335                            "mutation" => Ok(GeneratedField::Mutation),
1336                            "tracingContext" | "tracing_context" => Ok(GeneratedField::TracingContext),
1337                            "kind" => Ok(GeneratedField::Kind),
1338                            "passedActors" | "passed_actors" => Ok(GeneratedField::PassedActors),
1339                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1340                        }
1341                    }
1342                }
1343                deserializer.deserialize_identifier(GeneratedVisitor)
1344            }
1345        }
1346        struct GeneratedVisitor;
1347        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1348            type Value = Barrier;
1349
1350            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1351                formatter.write_str("struct stream_plan.Barrier")
1352            }
1353
1354            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Barrier, V::Error>
1355                where
1356                    V: serde::de::MapAccess<'de>,
1357            {
1358                let mut epoch__ = None;
1359                let mut mutation__ = None;
1360                let mut tracing_context__ = None;
1361                let mut kind__ = None;
1362                let mut passed_actors__ = None;
1363                while let Some(k) = map_.next_key()? {
1364                    match k {
1365                        GeneratedField::Epoch => {
1366                            if epoch__.is_some() {
1367                                return Err(serde::de::Error::duplicate_field("epoch"));
1368                            }
1369                            epoch__ = map_.next_value()?;
1370                        }
1371                        GeneratedField::Mutation => {
1372                            if mutation__.is_some() {
1373                                return Err(serde::de::Error::duplicate_field("mutation"));
1374                            }
1375                            mutation__ = map_.next_value()?;
1376                        }
1377                        GeneratedField::TracingContext => {
1378                            if tracing_context__.is_some() {
1379                                return Err(serde::de::Error::duplicate_field("tracingContext"));
1380                            }
1381                            tracing_context__ = Some(
1382                                map_.next_value::<std::collections::HashMap<_, _>>()?
1383                            );
1384                        }
1385                        GeneratedField::Kind => {
1386                            if kind__.is_some() {
1387                                return Err(serde::de::Error::duplicate_field("kind"));
1388                            }
1389                            kind__ = Some(map_.next_value::<barrier::BarrierKind>()? as i32);
1390                        }
1391                        GeneratedField::PassedActors => {
1392                            if passed_actors__.is_some() {
1393                                return Err(serde::de::Error::duplicate_field("passedActors"));
1394                            }
1395                            passed_actors__ = 
1396                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1397                                    .into_iter().map(|x| x.0).collect())
1398                            ;
1399                        }
1400                    }
1401                }
1402                Ok(Barrier {
1403                    epoch: epoch__,
1404                    mutation: mutation__,
1405                    tracing_context: tracing_context__.unwrap_or_default(),
1406                    kind: kind__.unwrap_or_default(),
1407                    passed_actors: passed_actors__.unwrap_or_default(),
1408                })
1409            }
1410        }
1411        deserializer.deserialize_struct("stream_plan.Barrier", FIELDS, GeneratedVisitor)
1412    }
1413}
1414impl serde::Serialize for barrier::BarrierKind {
1415    #[allow(deprecated)]
1416    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1417    where
1418        S: serde::Serializer,
1419    {
1420        let variant = match self {
1421            Self::Unspecified => "BARRIER_KIND_UNSPECIFIED",
1422            Self::Initial => "BARRIER_KIND_INITIAL",
1423            Self::Barrier => "BARRIER_KIND_BARRIER",
1424            Self::Checkpoint => "BARRIER_KIND_CHECKPOINT",
1425        };
1426        serializer.serialize_str(variant)
1427    }
1428}
1429impl<'de> serde::Deserialize<'de> for barrier::BarrierKind {
1430    #[allow(deprecated)]
1431    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1432    where
1433        D: serde::Deserializer<'de>,
1434    {
1435        const FIELDS: &[&str] = &[
1436            "BARRIER_KIND_UNSPECIFIED",
1437            "BARRIER_KIND_INITIAL",
1438            "BARRIER_KIND_BARRIER",
1439            "BARRIER_KIND_CHECKPOINT",
1440        ];
1441
1442        struct GeneratedVisitor;
1443
1444        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1445            type Value = barrier::BarrierKind;
1446
1447            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1448                write!(formatter, "expected one of: {:?}", &FIELDS)
1449            }
1450
1451            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
1452            where
1453                E: serde::de::Error,
1454            {
1455                i32::try_from(v)
1456                    .ok()
1457                    .and_then(|x| x.try_into().ok())
1458                    .ok_or_else(|| {
1459                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
1460                    })
1461            }
1462
1463            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
1464            where
1465                E: serde::de::Error,
1466            {
1467                i32::try_from(v)
1468                    .ok()
1469                    .and_then(|x| x.try_into().ok())
1470                    .ok_or_else(|| {
1471                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
1472                    })
1473            }
1474
1475            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1476            where
1477                E: serde::de::Error,
1478            {
1479                match value {
1480                    "BARRIER_KIND_UNSPECIFIED" => Ok(barrier::BarrierKind::Unspecified),
1481                    "BARRIER_KIND_INITIAL" => Ok(barrier::BarrierKind::Initial),
1482                    "BARRIER_KIND_BARRIER" => Ok(barrier::BarrierKind::Barrier),
1483                    "BARRIER_KIND_CHECKPOINT" => Ok(barrier::BarrierKind::Checkpoint),
1484                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
1485                }
1486            }
1487        }
1488        deserializer.deserialize_any(GeneratedVisitor)
1489    }
1490}
1491impl serde::Serialize for BarrierMutation {
1492    #[allow(deprecated)]
1493    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1494    where
1495        S: serde::Serializer,
1496    {
1497        use serde::ser::SerializeStruct;
1498        let mut len = 0;
1499        if self.mutation.is_some() {
1500            len += 1;
1501        }
1502        let mut struct_ser = serializer.serialize_struct("stream_plan.BarrierMutation", len)?;
1503        if let Some(v) = self.mutation.as_ref() {
1504            match v {
1505                barrier_mutation::Mutation::Add(v) => {
1506                    struct_ser.serialize_field("add", v)?;
1507                }
1508                barrier_mutation::Mutation::Stop(v) => {
1509                    struct_ser.serialize_field("stop", v)?;
1510                }
1511                barrier_mutation::Mutation::Update(v) => {
1512                    struct_ser.serialize_field("update", v)?;
1513                }
1514                barrier_mutation::Mutation::Splits(v) => {
1515                    struct_ser.serialize_field("splits", v)?;
1516                }
1517                barrier_mutation::Mutation::Pause(v) => {
1518                    struct_ser.serialize_field("pause", v)?;
1519                }
1520                barrier_mutation::Mutation::Resume(v) => {
1521                    struct_ser.serialize_field("resume", v)?;
1522                }
1523                barrier_mutation::Mutation::Throttle(v) => {
1524                    struct_ser.serialize_field("throttle", v)?;
1525                }
1526                barrier_mutation::Mutation::DropSubscriptions(v) => {
1527                    struct_ser.serialize_field("dropSubscriptions", v)?;
1528                }
1529                barrier_mutation::Mutation::Combined(v) => {
1530                    struct_ser.serialize_field("combined", v)?;
1531                }
1532            }
1533        }
1534        struct_ser.end()
1535    }
1536}
1537impl<'de> serde::Deserialize<'de> for BarrierMutation {
1538    #[allow(deprecated)]
1539    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1540    where
1541        D: serde::Deserializer<'de>,
1542    {
1543        const FIELDS: &[&str] = &[
1544            "add",
1545            "stop",
1546            "update",
1547            "splits",
1548            "pause",
1549            "resume",
1550            "throttle",
1551            "drop_subscriptions",
1552            "dropSubscriptions",
1553            "combined",
1554        ];
1555
1556        #[allow(clippy::enum_variant_names)]
1557        enum GeneratedField {
1558            Add,
1559            Stop,
1560            Update,
1561            Splits,
1562            Pause,
1563            Resume,
1564            Throttle,
1565            DropSubscriptions,
1566            Combined,
1567        }
1568        impl<'de> serde::Deserialize<'de> for GeneratedField {
1569            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1570            where
1571                D: serde::Deserializer<'de>,
1572            {
1573                struct GeneratedVisitor;
1574
1575                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1576                    type Value = GeneratedField;
1577
1578                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1579                        write!(formatter, "expected one of: {:?}", &FIELDS)
1580                    }
1581
1582                    #[allow(unused_variables)]
1583                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1584                    where
1585                        E: serde::de::Error,
1586                    {
1587                        match value {
1588                            "add" => Ok(GeneratedField::Add),
1589                            "stop" => Ok(GeneratedField::Stop),
1590                            "update" => Ok(GeneratedField::Update),
1591                            "splits" => Ok(GeneratedField::Splits),
1592                            "pause" => Ok(GeneratedField::Pause),
1593                            "resume" => Ok(GeneratedField::Resume),
1594                            "throttle" => Ok(GeneratedField::Throttle),
1595                            "dropSubscriptions" | "drop_subscriptions" => Ok(GeneratedField::DropSubscriptions),
1596                            "combined" => Ok(GeneratedField::Combined),
1597                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1598                        }
1599                    }
1600                }
1601                deserializer.deserialize_identifier(GeneratedVisitor)
1602            }
1603        }
1604        struct GeneratedVisitor;
1605        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1606            type Value = BarrierMutation;
1607
1608            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1609                formatter.write_str("struct stream_plan.BarrierMutation")
1610            }
1611
1612            fn visit_map<V>(self, mut map_: V) -> std::result::Result<BarrierMutation, V::Error>
1613                where
1614                    V: serde::de::MapAccess<'de>,
1615            {
1616                let mut mutation__ = None;
1617                while let Some(k) = map_.next_key()? {
1618                    match k {
1619                        GeneratedField::Add => {
1620                            if mutation__.is_some() {
1621                                return Err(serde::de::Error::duplicate_field("add"));
1622                            }
1623                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::Add)
1624;
1625                        }
1626                        GeneratedField::Stop => {
1627                            if mutation__.is_some() {
1628                                return Err(serde::de::Error::duplicate_field("stop"));
1629                            }
1630                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::Stop)
1631;
1632                        }
1633                        GeneratedField::Update => {
1634                            if mutation__.is_some() {
1635                                return Err(serde::de::Error::duplicate_field("update"));
1636                            }
1637                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::Update)
1638;
1639                        }
1640                        GeneratedField::Splits => {
1641                            if mutation__.is_some() {
1642                                return Err(serde::de::Error::duplicate_field("splits"));
1643                            }
1644                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::Splits)
1645;
1646                        }
1647                        GeneratedField::Pause => {
1648                            if mutation__.is_some() {
1649                                return Err(serde::de::Error::duplicate_field("pause"));
1650                            }
1651                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::Pause)
1652;
1653                        }
1654                        GeneratedField::Resume => {
1655                            if mutation__.is_some() {
1656                                return Err(serde::de::Error::duplicate_field("resume"));
1657                            }
1658                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::Resume)
1659;
1660                        }
1661                        GeneratedField::Throttle => {
1662                            if mutation__.is_some() {
1663                                return Err(serde::de::Error::duplicate_field("throttle"));
1664                            }
1665                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::Throttle)
1666;
1667                        }
1668                        GeneratedField::DropSubscriptions => {
1669                            if mutation__.is_some() {
1670                                return Err(serde::de::Error::duplicate_field("dropSubscriptions"));
1671                            }
1672                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::DropSubscriptions)
1673;
1674                        }
1675                        GeneratedField::Combined => {
1676                            if mutation__.is_some() {
1677                                return Err(serde::de::Error::duplicate_field("combined"));
1678                            }
1679                            mutation__ = map_.next_value::<::std::option::Option<_>>()?.map(barrier_mutation::Mutation::Combined)
1680;
1681                        }
1682                    }
1683                }
1684                Ok(BarrierMutation {
1685                    mutation: mutation__,
1686                })
1687            }
1688        }
1689        deserializer.deserialize_struct("stream_plan.BarrierMutation", FIELDS, GeneratedVisitor)
1690    }
1691}
1692impl serde::Serialize for BarrierRecvNode {
1693    #[allow(deprecated)]
1694    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1695    where
1696        S: serde::Serializer,
1697    {
1698        use serde::ser::SerializeStruct;
1699        let len = 0;
1700        let struct_ser = serializer.serialize_struct("stream_plan.BarrierRecvNode", len)?;
1701        struct_ser.end()
1702    }
1703}
1704impl<'de> serde::Deserialize<'de> for BarrierRecvNode {
1705    #[allow(deprecated)]
1706    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1707    where
1708        D: serde::Deserializer<'de>,
1709    {
1710        const FIELDS: &[&str] = &[
1711        ];
1712
1713        #[allow(clippy::enum_variant_names)]
1714        enum GeneratedField {
1715        }
1716        impl<'de> serde::Deserialize<'de> for GeneratedField {
1717            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1718            where
1719                D: serde::Deserializer<'de>,
1720            {
1721                struct GeneratedVisitor;
1722
1723                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1724                    type Value = GeneratedField;
1725
1726                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1727                        write!(formatter, "expected one of: {:?}", &FIELDS)
1728                    }
1729
1730                    #[allow(unused_variables)]
1731                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1732                    where
1733                        E: serde::de::Error,
1734                    {
1735                            Err(serde::de::Error::unknown_field(value, FIELDS))
1736                    }
1737                }
1738                deserializer.deserialize_identifier(GeneratedVisitor)
1739            }
1740        }
1741        struct GeneratedVisitor;
1742        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1743            type Value = BarrierRecvNode;
1744
1745            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1746                formatter.write_str("struct stream_plan.BarrierRecvNode")
1747            }
1748
1749            fn visit_map<V>(self, mut map_: V) -> std::result::Result<BarrierRecvNode, V::Error>
1750                where
1751                    V: serde::de::MapAccess<'de>,
1752            {
1753                while map_.next_key::<GeneratedField>()?.is_some() {
1754                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
1755                }
1756                Ok(BarrierRecvNode {
1757                })
1758            }
1759        }
1760        deserializer.deserialize_struct("stream_plan.BarrierRecvNode", FIELDS, GeneratedVisitor)
1761    }
1762}
1763impl serde::Serialize for BatchPlanNode {
1764    #[allow(deprecated)]
1765    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1766    where
1767        S: serde::Serializer,
1768    {
1769        use serde::ser::SerializeStruct;
1770        let mut len = 0;
1771        if self.table_desc.is_some() {
1772            len += 1;
1773        }
1774        if !self.column_ids.is_empty() {
1775            len += 1;
1776        }
1777        let mut struct_ser = serializer.serialize_struct("stream_plan.BatchPlanNode", len)?;
1778        if let Some(v) = self.table_desc.as_ref() {
1779            struct_ser.serialize_field("tableDesc", v)?;
1780        }
1781        if !self.column_ids.is_empty() {
1782            struct_ser.serialize_field("columnIds", &self.column_ids)?;
1783        }
1784        struct_ser.end()
1785    }
1786}
1787impl<'de> serde::Deserialize<'de> for BatchPlanNode {
1788    #[allow(deprecated)]
1789    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1790    where
1791        D: serde::Deserializer<'de>,
1792    {
1793        const FIELDS: &[&str] = &[
1794            "table_desc",
1795            "tableDesc",
1796            "column_ids",
1797            "columnIds",
1798        ];
1799
1800        #[allow(clippy::enum_variant_names)]
1801        enum GeneratedField {
1802            TableDesc,
1803            ColumnIds,
1804        }
1805        impl<'de> serde::Deserialize<'de> for GeneratedField {
1806            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1807            where
1808                D: serde::Deserializer<'de>,
1809            {
1810                struct GeneratedVisitor;
1811
1812                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1813                    type Value = GeneratedField;
1814
1815                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1816                        write!(formatter, "expected one of: {:?}", &FIELDS)
1817                    }
1818
1819                    #[allow(unused_variables)]
1820                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1821                    where
1822                        E: serde::de::Error,
1823                    {
1824                        match value {
1825                            "tableDesc" | "table_desc" => Ok(GeneratedField::TableDesc),
1826                            "columnIds" | "column_ids" => Ok(GeneratedField::ColumnIds),
1827                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1828                        }
1829                    }
1830                }
1831                deserializer.deserialize_identifier(GeneratedVisitor)
1832            }
1833        }
1834        struct GeneratedVisitor;
1835        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1836            type Value = BatchPlanNode;
1837
1838            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1839                formatter.write_str("struct stream_plan.BatchPlanNode")
1840            }
1841
1842            fn visit_map<V>(self, mut map_: V) -> std::result::Result<BatchPlanNode, V::Error>
1843                where
1844                    V: serde::de::MapAccess<'de>,
1845            {
1846                let mut table_desc__ = None;
1847                let mut column_ids__ = None;
1848                while let Some(k) = map_.next_key()? {
1849                    match k {
1850                        GeneratedField::TableDesc => {
1851                            if table_desc__.is_some() {
1852                                return Err(serde::de::Error::duplicate_field("tableDesc"));
1853                            }
1854                            table_desc__ = map_.next_value()?;
1855                        }
1856                        GeneratedField::ColumnIds => {
1857                            if column_ids__.is_some() {
1858                                return Err(serde::de::Error::duplicate_field("columnIds"));
1859                            }
1860                            column_ids__ = 
1861                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
1862                                    .into_iter().map(|x| x.0).collect())
1863                            ;
1864                        }
1865                    }
1866                }
1867                Ok(BatchPlanNode {
1868                    table_desc: table_desc__,
1869                    column_ids: column_ids__.unwrap_or_default(),
1870                })
1871            }
1872        }
1873        deserializer.deserialize_struct("stream_plan.BatchPlanNode", FIELDS, GeneratedVisitor)
1874    }
1875}
1876impl serde::Serialize for CdcFilterNode {
1877    #[allow(deprecated)]
1878    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1879    where
1880        S: serde::Serializer,
1881    {
1882        use serde::ser::SerializeStruct;
1883        let mut len = 0;
1884        if self.search_condition.is_some() {
1885            len += 1;
1886        }
1887        if self.upstream_source_id != 0 {
1888            len += 1;
1889        }
1890        let mut struct_ser = serializer.serialize_struct("stream_plan.CdcFilterNode", len)?;
1891        if let Some(v) = self.search_condition.as_ref() {
1892            struct_ser.serialize_field("searchCondition", v)?;
1893        }
1894        if self.upstream_source_id != 0 {
1895            struct_ser.serialize_field("upstreamSourceId", &self.upstream_source_id)?;
1896        }
1897        struct_ser.end()
1898    }
1899}
1900impl<'de> serde::Deserialize<'de> for CdcFilterNode {
1901    #[allow(deprecated)]
1902    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1903    where
1904        D: serde::Deserializer<'de>,
1905    {
1906        const FIELDS: &[&str] = &[
1907            "search_condition",
1908            "searchCondition",
1909            "upstream_source_id",
1910            "upstreamSourceId",
1911        ];
1912
1913        #[allow(clippy::enum_variant_names)]
1914        enum GeneratedField {
1915            SearchCondition,
1916            UpstreamSourceId,
1917        }
1918        impl<'de> serde::Deserialize<'de> for GeneratedField {
1919            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
1920            where
1921                D: serde::Deserializer<'de>,
1922            {
1923                struct GeneratedVisitor;
1924
1925                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1926                    type Value = GeneratedField;
1927
1928                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1929                        write!(formatter, "expected one of: {:?}", &FIELDS)
1930                    }
1931
1932                    #[allow(unused_variables)]
1933                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
1934                    where
1935                        E: serde::de::Error,
1936                    {
1937                        match value {
1938                            "searchCondition" | "search_condition" => Ok(GeneratedField::SearchCondition),
1939                            "upstreamSourceId" | "upstream_source_id" => Ok(GeneratedField::UpstreamSourceId),
1940                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
1941                        }
1942                    }
1943                }
1944                deserializer.deserialize_identifier(GeneratedVisitor)
1945            }
1946        }
1947        struct GeneratedVisitor;
1948        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
1949            type Value = CdcFilterNode;
1950
1951            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1952                formatter.write_str("struct stream_plan.CdcFilterNode")
1953            }
1954
1955            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CdcFilterNode, V::Error>
1956                where
1957                    V: serde::de::MapAccess<'de>,
1958            {
1959                let mut search_condition__ = None;
1960                let mut upstream_source_id__ = None;
1961                while let Some(k) = map_.next_key()? {
1962                    match k {
1963                        GeneratedField::SearchCondition => {
1964                            if search_condition__.is_some() {
1965                                return Err(serde::de::Error::duplicate_field("searchCondition"));
1966                            }
1967                            search_condition__ = map_.next_value()?;
1968                        }
1969                        GeneratedField::UpstreamSourceId => {
1970                            if upstream_source_id__.is_some() {
1971                                return Err(serde::de::Error::duplicate_field("upstreamSourceId"));
1972                            }
1973                            upstream_source_id__ = 
1974                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
1975                            ;
1976                        }
1977                    }
1978                }
1979                Ok(CdcFilterNode {
1980                    search_condition: search_condition__,
1981                    upstream_source_id: upstream_source_id__.unwrap_or_default(),
1982                })
1983            }
1984        }
1985        deserializer.deserialize_struct("stream_plan.CdcFilterNode", FIELDS, GeneratedVisitor)
1986    }
1987}
1988impl serde::Serialize for ChangeLogNode {
1989    #[allow(deprecated)]
1990    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1991    where
1992        S: serde::Serializer,
1993    {
1994        use serde::ser::SerializeStruct;
1995        let mut len = 0;
1996        if self.need_op {
1997            len += 1;
1998        }
1999        let mut struct_ser = serializer.serialize_struct("stream_plan.ChangeLogNode", len)?;
2000        if self.need_op {
2001            struct_ser.serialize_field("needOp", &self.need_op)?;
2002        }
2003        struct_ser.end()
2004    }
2005}
2006impl<'de> serde::Deserialize<'de> for ChangeLogNode {
2007    #[allow(deprecated)]
2008    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2009    where
2010        D: serde::Deserializer<'de>,
2011    {
2012        const FIELDS: &[&str] = &[
2013            "need_op",
2014            "needOp",
2015        ];
2016
2017        #[allow(clippy::enum_variant_names)]
2018        enum GeneratedField {
2019            NeedOp,
2020        }
2021        impl<'de> serde::Deserialize<'de> for GeneratedField {
2022            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2023            where
2024                D: serde::Deserializer<'de>,
2025            {
2026                struct GeneratedVisitor;
2027
2028                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2029                    type Value = GeneratedField;
2030
2031                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2032                        write!(formatter, "expected one of: {:?}", &FIELDS)
2033                    }
2034
2035                    #[allow(unused_variables)]
2036                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2037                    where
2038                        E: serde::de::Error,
2039                    {
2040                        match value {
2041                            "needOp" | "need_op" => Ok(GeneratedField::NeedOp),
2042                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2043                        }
2044                    }
2045                }
2046                deserializer.deserialize_identifier(GeneratedVisitor)
2047            }
2048        }
2049        struct GeneratedVisitor;
2050        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2051            type Value = ChangeLogNode;
2052
2053            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2054                formatter.write_str("struct stream_plan.ChangeLogNode")
2055            }
2056
2057            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ChangeLogNode, V::Error>
2058                where
2059                    V: serde::de::MapAccess<'de>,
2060            {
2061                let mut need_op__ = None;
2062                while let Some(k) = map_.next_key()? {
2063                    match k {
2064                        GeneratedField::NeedOp => {
2065                            if need_op__.is_some() {
2066                                return Err(serde::de::Error::duplicate_field("needOp"));
2067                            }
2068                            need_op__ = Some(map_.next_value()?);
2069                        }
2070                    }
2071                }
2072                Ok(ChangeLogNode {
2073                    need_op: need_op__.unwrap_or_default(),
2074                })
2075            }
2076        }
2077        deserializer.deserialize_struct("stream_plan.ChangeLogNode", FIELDS, GeneratedVisitor)
2078    }
2079}
2080impl serde::Serialize for CombinedMutation {
2081    #[allow(deprecated)]
2082    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2083    where
2084        S: serde::Serializer,
2085    {
2086        use serde::ser::SerializeStruct;
2087        let mut len = 0;
2088        if !self.mutations.is_empty() {
2089            len += 1;
2090        }
2091        let mut struct_ser = serializer.serialize_struct("stream_plan.CombinedMutation", len)?;
2092        if !self.mutations.is_empty() {
2093            struct_ser.serialize_field("mutations", &self.mutations)?;
2094        }
2095        struct_ser.end()
2096    }
2097}
2098impl<'de> serde::Deserialize<'de> for CombinedMutation {
2099    #[allow(deprecated)]
2100    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2101    where
2102        D: serde::Deserializer<'de>,
2103    {
2104        const FIELDS: &[&str] = &[
2105            "mutations",
2106        ];
2107
2108        #[allow(clippy::enum_variant_names)]
2109        enum GeneratedField {
2110            Mutations,
2111        }
2112        impl<'de> serde::Deserialize<'de> for GeneratedField {
2113            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2114            where
2115                D: serde::Deserializer<'de>,
2116            {
2117                struct GeneratedVisitor;
2118
2119                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2120                    type Value = GeneratedField;
2121
2122                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2123                        write!(formatter, "expected one of: {:?}", &FIELDS)
2124                    }
2125
2126                    #[allow(unused_variables)]
2127                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2128                    where
2129                        E: serde::de::Error,
2130                    {
2131                        match value {
2132                            "mutations" => Ok(GeneratedField::Mutations),
2133                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2134                        }
2135                    }
2136                }
2137                deserializer.deserialize_identifier(GeneratedVisitor)
2138            }
2139        }
2140        struct GeneratedVisitor;
2141        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2142            type Value = CombinedMutation;
2143
2144            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2145                formatter.write_str("struct stream_plan.CombinedMutation")
2146            }
2147
2148            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CombinedMutation, V::Error>
2149                where
2150                    V: serde::de::MapAccess<'de>,
2151            {
2152                let mut mutations__ = None;
2153                while let Some(k) = map_.next_key()? {
2154                    match k {
2155                        GeneratedField::Mutations => {
2156                            if mutations__.is_some() {
2157                                return Err(serde::de::Error::duplicate_field("mutations"));
2158                            }
2159                            mutations__ = Some(map_.next_value()?);
2160                        }
2161                    }
2162                }
2163                Ok(CombinedMutation {
2164                    mutations: mutations__.unwrap_or_default(),
2165                })
2166            }
2167        }
2168        deserializer.deserialize_struct("stream_plan.CombinedMutation", FIELDS, GeneratedVisitor)
2169    }
2170}
2171impl serde::Serialize for DedupNode {
2172    #[allow(deprecated)]
2173    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2174    where
2175        S: serde::Serializer,
2176    {
2177        use serde::ser::SerializeStruct;
2178        let mut len = 0;
2179        if self.state_table.is_some() {
2180            len += 1;
2181        }
2182        if !self.dedup_column_indices.is_empty() {
2183            len += 1;
2184        }
2185        let mut struct_ser = serializer.serialize_struct("stream_plan.DedupNode", len)?;
2186        if let Some(v) = self.state_table.as_ref() {
2187            struct_ser.serialize_field("stateTable", v)?;
2188        }
2189        if !self.dedup_column_indices.is_empty() {
2190            struct_ser.serialize_field("dedupColumnIndices", &self.dedup_column_indices)?;
2191        }
2192        struct_ser.end()
2193    }
2194}
2195impl<'de> serde::Deserialize<'de> for DedupNode {
2196    #[allow(deprecated)]
2197    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2198    where
2199        D: serde::Deserializer<'de>,
2200    {
2201        const FIELDS: &[&str] = &[
2202            "state_table",
2203            "stateTable",
2204            "dedup_column_indices",
2205            "dedupColumnIndices",
2206        ];
2207
2208        #[allow(clippy::enum_variant_names)]
2209        enum GeneratedField {
2210            StateTable,
2211            DedupColumnIndices,
2212        }
2213        impl<'de> serde::Deserialize<'de> for GeneratedField {
2214            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2215            where
2216                D: serde::Deserializer<'de>,
2217            {
2218                struct GeneratedVisitor;
2219
2220                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2221                    type Value = GeneratedField;
2222
2223                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2224                        write!(formatter, "expected one of: {:?}", &FIELDS)
2225                    }
2226
2227                    #[allow(unused_variables)]
2228                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2229                    where
2230                        E: serde::de::Error,
2231                    {
2232                        match value {
2233                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
2234                            "dedupColumnIndices" | "dedup_column_indices" => Ok(GeneratedField::DedupColumnIndices),
2235                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2236                        }
2237                    }
2238                }
2239                deserializer.deserialize_identifier(GeneratedVisitor)
2240            }
2241        }
2242        struct GeneratedVisitor;
2243        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2244            type Value = DedupNode;
2245
2246            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2247                formatter.write_str("struct stream_plan.DedupNode")
2248            }
2249
2250            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DedupNode, V::Error>
2251                where
2252                    V: serde::de::MapAccess<'de>,
2253            {
2254                let mut state_table__ = None;
2255                let mut dedup_column_indices__ = None;
2256                while let Some(k) = map_.next_key()? {
2257                    match k {
2258                        GeneratedField::StateTable => {
2259                            if state_table__.is_some() {
2260                                return Err(serde::de::Error::duplicate_field("stateTable"));
2261                            }
2262                            state_table__ = map_.next_value()?;
2263                        }
2264                        GeneratedField::DedupColumnIndices => {
2265                            if dedup_column_indices__.is_some() {
2266                                return Err(serde::de::Error::duplicate_field("dedupColumnIndices"));
2267                            }
2268                            dedup_column_indices__ = 
2269                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2270                                    .into_iter().map(|x| x.0).collect())
2271                            ;
2272                        }
2273                    }
2274                }
2275                Ok(DedupNode {
2276                    state_table: state_table__,
2277                    dedup_column_indices: dedup_column_indices__.unwrap_or_default(),
2278                })
2279            }
2280        }
2281        deserializer.deserialize_struct("stream_plan.DedupNode", FIELDS, GeneratedVisitor)
2282    }
2283}
2284impl serde::Serialize for DeltaExpression {
2285    #[allow(deprecated)]
2286    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2287    where
2288        S: serde::Serializer,
2289    {
2290        use serde::ser::SerializeStruct;
2291        let mut len = 0;
2292        if self.delta_type != 0 {
2293            len += 1;
2294        }
2295        if self.delta.is_some() {
2296            len += 1;
2297        }
2298        let mut struct_ser = serializer.serialize_struct("stream_plan.DeltaExpression", len)?;
2299        if self.delta_type != 0 {
2300            let v = super::expr::expr_node::Type::try_from(self.delta_type)
2301                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.delta_type)))?;
2302            struct_ser.serialize_field("deltaType", &v)?;
2303        }
2304        if let Some(v) = self.delta.as_ref() {
2305            struct_ser.serialize_field("delta", v)?;
2306        }
2307        struct_ser.end()
2308    }
2309}
2310impl<'de> serde::Deserialize<'de> for DeltaExpression {
2311    #[allow(deprecated)]
2312    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2313    where
2314        D: serde::Deserializer<'de>,
2315    {
2316        const FIELDS: &[&str] = &[
2317            "delta_type",
2318            "deltaType",
2319            "delta",
2320        ];
2321
2322        #[allow(clippy::enum_variant_names)]
2323        enum GeneratedField {
2324            DeltaType,
2325            Delta,
2326        }
2327        impl<'de> serde::Deserialize<'de> for GeneratedField {
2328            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2329            where
2330                D: serde::Deserializer<'de>,
2331            {
2332                struct GeneratedVisitor;
2333
2334                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2335                    type Value = GeneratedField;
2336
2337                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2338                        write!(formatter, "expected one of: {:?}", &FIELDS)
2339                    }
2340
2341                    #[allow(unused_variables)]
2342                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2343                    where
2344                        E: serde::de::Error,
2345                    {
2346                        match value {
2347                            "deltaType" | "delta_type" => Ok(GeneratedField::DeltaType),
2348                            "delta" => Ok(GeneratedField::Delta),
2349                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2350                        }
2351                    }
2352                }
2353                deserializer.deserialize_identifier(GeneratedVisitor)
2354            }
2355        }
2356        struct GeneratedVisitor;
2357        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2358            type Value = DeltaExpression;
2359
2360            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2361                formatter.write_str("struct stream_plan.DeltaExpression")
2362            }
2363
2364            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DeltaExpression, V::Error>
2365                where
2366                    V: serde::de::MapAccess<'de>,
2367            {
2368                let mut delta_type__ = None;
2369                let mut delta__ = None;
2370                while let Some(k) = map_.next_key()? {
2371                    match k {
2372                        GeneratedField::DeltaType => {
2373                            if delta_type__.is_some() {
2374                                return Err(serde::de::Error::duplicate_field("deltaType"));
2375                            }
2376                            delta_type__ = Some(map_.next_value::<super::expr::expr_node::Type>()? as i32);
2377                        }
2378                        GeneratedField::Delta => {
2379                            if delta__.is_some() {
2380                                return Err(serde::de::Error::duplicate_field("delta"));
2381                            }
2382                            delta__ = map_.next_value()?;
2383                        }
2384                    }
2385                }
2386                Ok(DeltaExpression {
2387                    delta_type: delta_type__.unwrap_or_default(),
2388                    delta: delta__,
2389                })
2390            }
2391        }
2392        deserializer.deserialize_struct("stream_plan.DeltaExpression", FIELDS, GeneratedVisitor)
2393    }
2394}
2395impl serde::Serialize for DeltaIndexJoinNode {
2396    #[allow(deprecated)]
2397    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2398    where
2399        S: serde::Serializer,
2400    {
2401        use serde::ser::SerializeStruct;
2402        let mut len = 0;
2403        if self.join_type != 0 {
2404            len += 1;
2405        }
2406        if !self.left_key.is_empty() {
2407            len += 1;
2408        }
2409        if !self.right_key.is_empty() {
2410            len += 1;
2411        }
2412        if self.condition.is_some() {
2413            len += 1;
2414        }
2415        if self.left_table_id != 0 {
2416            len += 1;
2417        }
2418        if self.right_table_id != 0 {
2419            len += 1;
2420        }
2421        if self.left_info.is_some() {
2422            len += 1;
2423        }
2424        if self.right_info.is_some() {
2425            len += 1;
2426        }
2427        if !self.output_indices.is_empty() {
2428            len += 1;
2429        }
2430        let mut struct_ser = serializer.serialize_struct("stream_plan.DeltaIndexJoinNode", len)?;
2431        if self.join_type != 0 {
2432            let v = super::plan_common::JoinType::try_from(self.join_type)
2433                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
2434            struct_ser.serialize_field("joinType", &v)?;
2435        }
2436        if !self.left_key.is_empty() {
2437            struct_ser.serialize_field("leftKey", &self.left_key)?;
2438        }
2439        if !self.right_key.is_empty() {
2440            struct_ser.serialize_field("rightKey", &self.right_key)?;
2441        }
2442        if let Some(v) = self.condition.as_ref() {
2443            struct_ser.serialize_field("condition", v)?;
2444        }
2445        if self.left_table_id != 0 {
2446            struct_ser.serialize_field("leftTableId", &self.left_table_id)?;
2447        }
2448        if self.right_table_id != 0 {
2449            struct_ser.serialize_field("rightTableId", &self.right_table_id)?;
2450        }
2451        if let Some(v) = self.left_info.as_ref() {
2452            struct_ser.serialize_field("leftInfo", v)?;
2453        }
2454        if let Some(v) = self.right_info.as_ref() {
2455            struct_ser.serialize_field("rightInfo", v)?;
2456        }
2457        if !self.output_indices.is_empty() {
2458            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
2459        }
2460        struct_ser.end()
2461    }
2462}
2463impl<'de> serde::Deserialize<'de> for DeltaIndexJoinNode {
2464    #[allow(deprecated)]
2465    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2466    where
2467        D: serde::Deserializer<'de>,
2468    {
2469        const FIELDS: &[&str] = &[
2470            "join_type",
2471            "joinType",
2472            "left_key",
2473            "leftKey",
2474            "right_key",
2475            "rightKey",
2476            "condition",
2477            "left_table_id",
2478            "leftTableId",
2479            "right_table_id",
2480            "rightTableId",
2481            "left_info",
2482            "leftInfo",
2483            "right_info",
2484            "rightInfo",
2485            "output_indices",
2486            "outputIndices",
2487        ];
2488
2489        #[allow(clippy::enum_variant_names)]
2490        enum GeneratedField {
2491            JoinType,
2492            LeftKey,
2493            RightKey,
2494            Condition,
2495            LeftTableId,
2496            RightTableId,
2497            LeftInfo,
2498            RightInfo,
2499            OutputIndices,
2500        }
2501        impl<'de> serde::Deserialize<'de> for GeneratedField {
2502            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2503            where
2504                D: serde::Deserializer<'de>,
2505            {
2506                struct GeneratedVisitor;
2507
2508                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2509                    type Value = GeneratedField;
2510
2511                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2512                        write!(formatter, "expected one of: {:?}", &FIELDS)
2513                    }
2514
2515                    #[allow(unused_variables)]
2516                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2517                    where
2518                        E: serde::de::Error,
2519                    {
2520                        match value {
2521                            "joinType" | "join_type" => Ok(GeneratedField::JoinType),
2522                            "leftKey" | "left_key" => Ok(GeneratedField::LeftKey),
2523                            "rightKey" | "right_key" => Ok(GeneratedField::RightKey),
2524                            "condition" => Ok(GeneratedField::Condition),
2525                            "leftTableId" | "left_table_id" => Ok(GeneratedField::LeftTableId),
2526                            "rightTableId" | "right_table_id" => Ok(GeneratedField::RightTableId),
2527                            "leftInfo" | "left_info" => Ok(GeneratedField::LeftInfo),
2528                            "rightInfo" | "right_info" => Ok(GeneratedField::RightInfo),
2529                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
2530                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2531                        }
2532                    }
2533                }
2534                deserializer.deserialize_identifier(GeneratedVisitor)
2535            }
2536        }
2537        struct GeneratedVisitor;
2538        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2539            type Value = DeltaIndexJoinNode;
2540
2541            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2542                formatter.write_str("struct stream_plan.DeltaIndexJoinNode")
2543            }
2544
2545            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DeltaIndexJoinNode, V::Error>
2546                where
2547                    V: serde::de::MapAccess<'de>,
2548            {
2549                let mut join_type__ = None;
2550                let mut left_key__ = None;
2551                let mut right_key__ = None;
2552                let mut condition__ = None;
2553                let mut left_table_id__ = None;
2554                let mut right_table_id__ = None;
2555                let mut left_info__ = None;
2556                let mut right_info__ = None;
2557                let mut output_indices__ = None;
2558                while let Some(k) = map_.next_key()? {
2559                    match k {
2560                        GeneratedField::JoinType => {
2561                            if join_type__.is_some() {
2562                                return Err(serde::de::Error::duplicate_field("joinType"));
2563                            }
2564                            join_type__ = Some(map_.next_value::<super::plan_common::JoinType>()? as i32);
2565                        }
2566                        GeneratedField::LeftKey => {
2567                            if left_key__.is_some() {
2568                                return Err(serde::de::Error::duplicate_field("leftKey"));
2569                            }
2570                            left_key__ = 
2571                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2572                                    .into_iter().map(|x| x.0).collect())
2573                            ;
2574                        }
2575                        GeneratedField::RightKey => {
2576                            if right_key__.is_some() {
2577                                return Err(serde::de::Error::duplicate_field("rightKey"));
2578                            }
2579                            right_key__ = 
2580                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2581                                    .into_iter().map(|x| x.0).collect())
2582                            ;
2583                        }
2584                        GeneratedField::Condition => {
2585                            if condition__.is_some() {
2586                                return Err(serde::de::Error::duplicate_field("condition"));
2587                            }
2588                            condition__ = map_.next_value()?;
2589                        }
2590                        GeneratedField::LeftTableId => {
2591                            if left_table_id__.is_some() {
2592                                return Err(serde::de::Error::duplicate_field("leftTableId"));
2593                            }
2594                            left_table_id__ = 
2595                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2596                            ;
2597                        }
2598                        GeneratedField::RightTableId => {
2599                            if right_table_id__.is_some() {
2600                                return Err(serde::de::Error::duplicate_field("rightTableId"));
2601                            }
2602                            right_table_id__ = 
2603                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2604                            ;
2605                        }
2606                        GeneratedField::LeftInfo => {
2607                            if left_info__.is_some() {
2608                                return Err(serde::de::Error::duplicate_field("leftInfo"));
2609                            }
2610                            left_info__ = map_.next_value()?;
2611                        }
2612                        GeneratedField::RightInfo => {
2613                            if right_info__.is_some() {
2614                                return Err(serde::de::Error::duplicate_field("rightInfo"));
2615                            }
2616                            right_info__ = map_.next_value()?;
2617                        }
2618                        GeneratedField::OutputIndices => {
2619                            if output_indices__.is_some() {
2620                                return Err(serde::de::Error::duplicate_field("outputIndices"));
2621                            }
2622                            output_indices__ = 
2623                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2624                                    .into_iter().map(|x| x.0).collect())
2625                            ;
2626                        }
2627                    }
2628                }
2629                Ok(DeltaIndexJoinNode {
2630                    join_type: join_type__.unwrap_or_default(),
2631                    left_key: left_key__.unwrap_or_default(),
2632                    right_key: right_key__.unwrap_or_default(),
2633                    condition: condition__,
2634                    left_table_id: left_table_id__.unwrap_or_default(),
2635                    right_table_id: right_table_id__.unwrap_or_default(),
2636                    left_info: left_info__,
2637                    right_info: right_info__,
2638                    output_indices: output_indices__.unwrap_or_default(),
2639                })
2640            }
2641        }
2642        deserializer.deserialize_struct("stream_plan.DeltaIndexJoinNode", FIELDS, GeneratedVisitor)
2643    }
2644}
2645impl serde::Serialize for DispatchStrategy {
2646    #[allow(deprecated)]
2647    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2648    where
2649        S: serde::Serializer,
2650    {
2651        use serde::ser::SerializeStruct;
2652        let mut len = 0;
2653        if self.r#type != 0 {
2654            len += 1;
2655        }
2656        if !self.dist_key_indices.is_empty() {
2657            len += 1;
2658        }
2659        if !self.output_indices.is_empty() {
2660            len += 1;
2661        }
2662        let mut struct_ser = serializer.serialize_struct("stream_plan.DispatchStrategy", len)?;
2663        if self.r#type != 0 {
2664            let v = DispatcherType::try_from(self.r#type)
2665                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?;
2666            struct_ser.serialize_field("type", &v)?;
2667        }
2668        if !self.dist_key_indices.is_empty() {
2669            struct_ser.serialize_field("distKeyIndices", &self.dist_key_indices)?;
2670        }
2671        if !self.output_indices.is_empty() {
2672            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
2673        }
2674        struct_ser.end()
2675    }
2676}
2677impl<'de> serde::Deserialize<'de> for DispatchStrategy {
2678    #[allow(deprecated)]
2679    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2680    where
2681        D: serde::Deserializer<'de>,
2682    {
2683        const FIELDS: &[&str] = &[
2684            "type",
2685            "dist_key_indices",
2686            "distKeyIndices",
2687            "output_indices",
2688            "outputIndices",
2689        ];
2690
2691        #[allow(clippy::enum_variant_names)]
2692        enum GeneratedField {
2693            Type,
2694            DistKeyIndices,
2695            OutputIndices,
2696        }
2697        impl<'de> serde::Deserialize<'de> for GeneratedField {
2698            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2699            where
2700                D: serde::Deserializer<'de>,
2701            {
2702                struct GeneratedVisitor;
2703
2704                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2705                    type Value = GeneratedField;
2706
2707                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2708                        write!(formatter, "expected one of: {:?}", &FIELDS)
2709                    }
2710
2711                    #[allow(unused_variables)]
2712                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2713                    where
2714                        E: serde::de::Error,
2715                    {
2716                        match value {
2717                            "type" => Ok(GeneratedField::Type),
2718                            "distKeyIndices" | "dist_key_indices" => Ok(GeneratedField::DistKeyIndices),
2719                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
2720                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2721                        }
2722                    }
2723                }
2724                deserializer.deserialize_identifier(GeneratedVisitor)
2725            }
2726        }
2727        struct GeneratedVisitor;
2728        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2729            type Value = DispatchStrategy;
2730
2731            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2732                formatter.write_str("struct stream_plan.DispatchStrategy")
2733            }
2734
2735            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DispatchStrategy, V::Error>
2736                where
2737                    V: serde::de::MapAccess<'de>,
2738            {
2739                let mut r#type__ = None;
2740                let mut dist_key_indices__ = None;
2741                let mut output_indices__ = None;
2742                while let Some(k) = map_.next_key()? {
2743                    match k {
2744                        GeneratedField::Type => {
2745                            if r#type__.is_some() {
2746                                return Err(serde::de::Error::duplicate_field("type"));
2747                            }
2748                            r#type__ = Some(map_.next_value::<DispatcherType>()? as i32);
2749                        }
2750                        GeneratedField::DistKeyIndices => {
2751                            if dist_key_indices__.is_some() {
2752                                return Err(serde::de::Error::duplicate_field("distKeyIndices"));
2753                            }
2754                            dist_key_indices__ = 
2755                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2756                                    .into_iter().map(|x| x.0).collect())
2757                            ;
2758                        }
2759                        GeneratedField::OutputIndices => {
2760                            if output_indices__.is_some() {
2761                                return Err(serde::de::Error::duplicate_field("outputIndices"));
2762                            }
2763                            output_indices__ = 
2764                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2765                                    .into_iter().map(|x| x.0).collect())
2766                            ;
2767                        }
2768                    }
2769                }
2770                Ok(DispatchStrategy {
2771                    r#type: r#type__.unwrap_or_default(),
2772                    dist_key_indices: dist_key_indices__.unwrap_or_default(),
2773                    output_indices: output_indices__.unwrap_or_default(),
2774                })
2775            }
2776        }
2777        deserializer.deserialize_struct("stream_plan.DispatchStrategy", FIELDS, GeneratedVisitor)
2778    }
2779}
2780impl serde::Serialize for Dispatcher {
2781    #[allow(deprecated)]
2782    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2783    where
2784        S: serde::Serializer,
2785    {
2786        use serde::ser::SerializeStruct;
2787        let mut len = 0;
2788        if self.r#type != 0 {
2789            len += 1;
2790        }
2791        if !self.dist_key_indices.is_empty() {
2792            len += 1;
2793        }
2794        if !self.output_indices.is_empty() {
2795            len += 1;
2796        }
2797        if self.hash_mapping.is_some() {
2798            len += 1;
2799        }
2800        if self.dispatcher_id != 0 {
2801            len += 1;
2802        }
2803        if !self.downstream_actor_id.is_empty() {
2804            len += 1;
2805        }
2806        let mut struct_ser = serializer.serialize_struct("stream_plan.Dispatcher", len)?;
2807        if self.r#type != 0 {
2808            let v = DispatcherType::try_from(self.r#type)
2809                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?;
2810            struct_ser.serialize_field("type", &v)?;
2811        }
2812        if !self.dist_key_indices.is_empty() {
2813            struct_ser.serialize_field("distKeyIndices", &self.dist_key_indices)?;
2814        }
2815        if !self.output_indices.is_empty() {
2816            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
2817        }
2818        if let Some(v) = self.hash_mapping.as_ref() {
2819            struct_ser.serialize_field("hashMapping", v)?;
2820        }
2821        if self.dispatcher_id != 0 {
2822            #[allow(clippy::needless_borrow)]
2823            #[allow(clippy::needless_borrows_for_generic_args)]
2824            struct_ser.serialize_field("dispatcherId", ToString::to_string(&self.dispatcher_id).as_str())?;
2825        }
2826        if !self.downstream_actor_id.is_empty() {
2827            struct_ser.serialize_field("downstreamActorId", &self.downstream_actor_id)?;
2828        }
2829        struct_ser.end()
2830    }
2831}
2832impl<'de> serde::Deserialize<'de> for Dispatcher {
2833    #[allow(deprecated)]
2834    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2835    where
2836        D: serde::Deserializer<'de>,
2837    {
2838        const FIELDS: &[&str] = &[
2839            "type",
2840            "dist_key_indices",
2841            "distKeyIndices",
2842            "output_indices",
2843            "outputIndices",
2844            "hash_mapping",
2845            "hashMapping",
2846            "dispatcher_id",
2847            "dispatcherId",
2848            "downstream_actor_id",
2849            "downstreamActorId",
2850        ];
2851
2852        #[allow(clippy::enum_variant_names)]
2853        enum GeneratedField {
2854            Type,
2855            DistKeyIndices,
2856            OutputIndices,
2857            HashMapping,
2858            DispatcherId,
2859            DownstreamActorId,
2860        }
2861        impl<'de> serde::Deserialize<'de> for GeneratedField {
2862            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
2863            where
2864                D: serde::Deserializer<'de>,
2865            {
2866                struct GeneratedVisitor;
2867
2868                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2869                    type Value = GeneratedField;
2870
2871                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2872                        write!(formatter, "expected one of: {:?}", &FIELDS)
2873                    }
2874
2875                    #[allow(unused_variables)]
2876                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
2877                    where
2878                        E: serde::de::Error,
2879                    {
2880                        match value {
2881                            "type" => Ok(GeneratedField::Type),
2882                            "distKeyIndices" | "dist_key_indices" => Ok(GeneratedField::DistKeyIndices),
2883                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
2884                            "hashMapping" | "hash_mapping" => Ok(GeneratedField::HashMapping),
2885                            "dispatcherId" | "dispatcher_id" => Ok(GeneratedField::DispatcherId),
2886                            "downstreamActorId" | "downstream_actor_id" => Ok(GeneratedField::DownstreamActorId),
2887                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
2888                        }
2889                    }
2890                }
2891                deserializer.deserialize_identifier(GeneratedVisitor)
2892            }
2893        }
2894        struct GeneratedVisitor;
2895        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
2896            type Value = Dispatcher;
2897
2898            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2899                formatter.write_str("struct stream_plan.Dispatcher")
2900            }
2901
2902            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Dispatcher, V::Error>
2903                where
2904                    V: serde::de::MapAccess<'de>,
2905            {
2906                let mut r#type__ = None;
2907                let mut dist_key_indices__ = None;
2908                let mut output_indices__ = None;
2909                let mut hash_mapping__ = None;
2910                let mut dispatcher_id__ = None;
2911                let mut downstream_actor_id__ = None;
2912                while let Some(k) = map_.next_key()? {
2913                    match k {
2914                        GeneratedField::Type => {
2915                            if r#type__.is_some() {
2916                                return Err(serde::de::Error::duplicate_field("type"));
2917                            }
2918                            r#type__ = Some(map_.next_value::<DispatcherType>()? as i32);
2919                        }
2920                        GeneratedField::DistKeyIndices => {
2921                            if dist_key_indices__.is_some() {
2922                                return Err(serde::de::Error::duplicate_field("distKeyIndices"));
2923                            }
2924                            dist_key_indices__ = 
2925                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2926                                    .into_iter().map(|x| x.0).collect())
2927                            ;
2928                        }
2929                        GeneratedField::OutputIndices => {
2930                            if output_indices__.is_some() {
2931                                return Err(serde::de::Error::duplicate_field("outputIndices"));
2932                            }
2933                            output_indices__ = 
2934                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2935                                    .into_iter().map(|x| x.0).collect())
2936                            ;
2937                        }
2938                        GeneratedField::HashMapping => {
2939                            if hash_mapping__.is_some() {
2940                                return Err(serde::de::Error::duplicate_field("hashMapping"));
2941                            }
2942                            hash_mapping__ = map_.next_value()?;
2943                        }
2944                        GeneratedField::DispatcherId => {
2945                            if dispatcher_id__.is_some() {
2946                                return Err(serde::de::Error::duplicate_field("dispatcherId"));
2947                            }
2948                            dispatcher_id__ = 
2949                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
2950                            ;
2951                        }
2952                        GeneratedField::DownstreamActorId => {
2953                            if downstream_actor_id__.is_some() {
2954                                return Err(serde::de::Error::duplicate_field("downstreamActorId"));
2955                            }
2956                            downstream_actor_id__ = 
2957                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
2958                                    .into_iter().map(|x| x.0).collect())
2959                            ;
2960                        }
2961                    }
2962                }
2963                Ok(Dispatcher {
2964                    r#type: r#type__.unwrap_or_default(),
2965                    dist_key_indices: dist_key_indices__.unwrap_or_default(),
2966                    output_indices: output_indices__.unwrap_or_default(),
2967                    hash_mapping: hash_mapping__,
2968                    dispatcher_id: dispatcher_id__.unwrap_or_default(),
2969                    downstream_actor_id: downstream_actor_id__.unwrap_or_default(),
2970                })
2971            }
2972        }
2973        deserializer.deserialize_struct("stream_plan.Dispatcher", FIELDS, GeneratedVisitor)
2974    }
2975}
2976impl serde::Serialize for DispatcherType {
2977    #[allow(deprecated)]
2978    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2979    where
2980        S: serde::Serializer,
2981    {
2982        let variant = match self {
2983            Self::Unspecified => "DISPATCHER_TYPE_UNSPECIFIED",
2984            Self::Hash => "DISPATCHER_TYPE_HASH",
2985            Self::Broadcast => "DISPATCHER_TYPE_BROADCAST",
2986            Self::Simple => "DISPATCHER_TYPE_SIMPLE",
2987            Self::NoShuffle => "DISPATCHER_TYPE_NO_SHUFFLE",
2988        };
2989        serializer.serialize_str(variant)
2990    }
2991}
2992impl<'de> serde::Deserialize<'de> for DispatcherType {
2993    #[allow(deprecated)]
2994    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2995    where
2996        D: serde::Deserializer<'de>,
2997    {
2998        const FIELDS: &[&str] = &[
2999            "DISPATCHER_TYPE_UNSPECIFIED",
3000            "DISPATCHER_TYPE_HASH",
3001            "DISPATCHER_TYPE_BROADCAST",
3002            "DISPATCHER_TYPE_SIMPLE",
3003            "DISPATCHER_TYPE_NO_SHUFFLE",
3004        ];
3005
3006        struct GeneratedVisitor;
3007
3008        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3009            type Value = DispatcherType;
3010
3011            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3012                write!(formatter, "expected one of: {:?}", &FIELDS)
3013            }
3014
3015            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
3016            where
3017                E: serde::de::Error,
3018            {
3019                i32::try_from(v)
3020                    .ok()
3021                    .and_then(|x| x.try_into().ok())
3022                    .ok_or_else(|| {
3023                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
3024                    })
3025            }
3026
3027            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
3028            where
3029                E: serde::de::Error,
3030            {
3031                i32::try_from(v)
3032                    .ok()
3033                    .and_then(|x| x.try_into().ok())
3034                    .ok_or_else(|| {
3035                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
3036                    })
3037            }
3038
3039            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3040            where
3041                E: serde::de::Error,
3042            {
3043                match value {
3044                    "DISPATCHER_TYPE_UNSPECIFIED" => Ok(DispatcherType::Unspecified),
3045                    "DISPATCHER_TYPE_HASH" => Ok(DispatcherType::Hash),
3046                    "DISPATCHER_TYPE_BROADCAST" => Ok(DispatcherType::Broadcast),
3047                    "DISPATCHER_TYPE_SIMPLE" => Ok(DispatcherType::Simple),
3048                    "DISPATCHER_TYPE_NO_SHUFFLE" => Ok(DispatcherType::NoShuffle),
3049                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
3050                }
3051            }
3052        }
3053        deserializer.deserialize_any(GeneratedVisitor)
3054    }
3055}
3056impl serde::Serialize for Dispatchers {
3057    #[allow(deprecated)]
3058    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3059    where
3060        S: serde::Serializer,
3061    {
3062        use serde::ser::SerializeStruct;
3063        let mut len = 0;
3064        if !self.dispatchers.is_empty() {
3065            len += 1;
3066        }
3067        let mut struct_ser = serializer.serialize_struct("stream_plan.Dispatchers", len)?;
3068        if !self.dispatchers.is_empty() {
3069            struct_ser.serialize_field("dispatchers", &self.dispatchers)?;
3070        }
3071        struct_ser.end()
3072    }
3073}
3074impl<'de> serde::Deserialize<'de> for Dispatchers {
3075    #[allow(deprecated)]
3076    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3077    where
3078        D: serde::Deserializer<'de>,
3079    {
3080        const FIELDS: &[&str] = &[
3081            "dispatchers",
3082        ];
3083
3084        #[allow(clippy::enum_variant_names)]
3085        enum GeneratedField {
3086            Dispatchers,
3087        }
3088        impl<'de> serde::Deserialize<'de> for GeneratedField {
3089            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3090            where
3091                D: serde::Deserializer<'de>,
3092            {
3093                struct GeneratedVisitor;
3094
3095                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3096                    type Value = GeneratedField;
3097
3098                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3099                        write!(formatter, "expected one of: {:?}", &FIELDS)
3100                    }
3101
3102                    #[allow(unused_variables)]
3103                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3104                    where
3105                        E: serde::de::Error,
3106                    {
3107                        match value {
3108                            "dispatchers" => Ok(GeneratedField::Dispatchers),
3109                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3110                        }
3111                    }
3112                }
3113                deserializer.deserialize_identifier(GeneratedVisitor)
3114            }
3115        }
3116        struct GeneratedVisitor;
3117        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3118            type Value = Dispatchers;
3119
3120            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3121                formatter.write_str("struct stream_plan.Dispatchers")
3122            }
3123
3124            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Dispatchers, V::Error>
3125                where
3126                    V: serde::de::MapAccess<'de>,
3127            {
3128                let mut dispatchers__ = None;
3129                while let Some(k) = map_.next_key()? {
3130                    match k {
3131                        GeneratedField::Dispatchers => {
3132                            if dispatchers__.is_some() {
3133                                return Err(serde::de::Error::duplicate_field("dispatchers"));
3134                            }
3135                            dispatchers__ = Some(map_.next_value()?);
3136                        }
3137                    }
3138                }
3139                Ok(Dispatchers {
3140                    dispatchers: dispatchers__.unwrap_or_default(),
3141                })
3142            }
3143        }
3144        deserializer.deserialize_struct("stream_plan.Dispatchers", FIELDS, GeneratedVisitor)
3145    }
3146}
3147impl serde::Serialize for DmlNode {
3148    #[allow(deprecated)]
3149    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3150    where
3151        S: serde::Serializer,
3152    {
3153        use serde::ser::SerializeStruct;
3154        let mut len = 0;
3155        if self.table_id != 0 {
3156            len += 1;
3157        }
3158        if self.table_version_id != 0 {
3159            len += 1;
3160        }
3161        if !self.column_descs.is_empty() {
3162            len += 1;
3163        }
3164        if self.rate_limit.is_some() {
3165            len += 1;
3166        }
3167        let mut struct_ser = serializer.serialize_struct("stream_plan.DmlNode", len)?;
3168        if self.table_id != 0 {
3169            struct_ser.serialize_field("tableId", &self.table_id)?;
3170        }
3171        if self.table_version_id != 0 {
3172            #[allow(clippy::needless_borrow)]
3173            #[allow(clippy::needless_borrows_for_generic_args)]
3174            struct_ser.serialize_field("tableVersionId", ToString::to_string(&self.table_version_id).as_str())?;
3175        }
3176        if !self.column_descs.is_empty() {
3177            struct_ser.serialize_field("columnDescs", &self.column_descs)?;
3178        }
3179        if let Some(v) = self.rate_limit.as_ref() {
3180            struct_ser.serialize_field("rateLimit", v)?;
3181        }
3182        struct_ser.end()
3183    }
3184}
3185impl<'de> serde::Deserialize<'de> for DmlNode {
3186    #[allow(deprecated)]
3187    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3188    where
3189        D: serde::Deserializer<'de>,
3190    {
3191        const FIELDS: &[&str] = &[
3192            "table_id",
3193            "tableId",
3194            "table_version_id",
3195            "tableVersionId",
3196            "column_descs",
3197            "columnDescs",
3198            "rate_limit",
3199            "rateLimit",
3200        ];
3201
3202        #[allow(clippy::enum_variant_names)]
3203        enum GeneratedField {
3204            TableId,
3205            TableVersionId,
3206            ColumnDescs,
3207            RateLimit,
3208        }
3209        impl<'de> serde::Deserialize<'de> for GeneratedField {
3210            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3211            where
3212                D: serde::Deserializer<'de>,
3213            {
3214                struct GeneratedVisitor;
3215
3216                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3217                    type Value = GeneratedField;
3218
3219                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3220                        write!(formatter, "expected one of: {:?}", &FIELDS)
3221                    }
3222
3223                    #[allow(unused_variables)]
3224                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3225                    where
3226                        E: serde::de::Error,
3227                    {
3228                        match value {
3229                            "tableId" | "table_id" => Ok(GeneratedField::TableId),
3230                            "tableVersionId" | "table_version_id" => Ok(GeneratedField::TableVersionId),
3231                            "columnDescs" | "column_descs" => Ok(GeneratedField::ColumnDescs),
3232                            "rateLimit" | "rate_limit" => Ok(GeneratedField::RateLimit),
3233                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3234                        }
3235                    }
3236                }
3237                deserializer.deserialize_identifier(GeneratedVisitor)
3238            }
3239        }
3240        struct GeneratedVisitor;
3241        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3242            type Value = DmlNode;
3243
3244            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3245                formatter.write_str("struct stream_plan.DmlNode")
3246            }
3247
3248            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DmlNode, V::Error>
3249                where
3250                    V: serde::de::MapAccess<'de>,
3251            {
3252                let mut table_id__ = None;
3253                let mut table_version_id__ = None;
3254                let mut column_descs__ = None;
3255                let mut rate_limit__ = None;
3256                while let Some(k) = map_.next_key()? {
3257                    match k {
3258                        GeneratedField::TableId => {
3259                            if table_id__.is_some() {
3260                                return Err(serde::de::Error::duplicate_field("tableId"));
3261                            }
3262                            table_id__ = 
3263                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3264                            ;
3265                        }
3266                        GeneratedField::TableVersionId => {
3267                            if table_version_id__.is_some() {
3268                                return Err(serde::de::Error::duplicate_field("tableVersionId"));
3269                            }
3270                            table_version_id__ = 
3271                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3272                            ;
3273                        }
3274                        GeneratedField::ColumnDescs => {
3275                            if column_descs__.is_some() {
3276                                return Err(serde::de::Error::duplicate_field("columnDescs"));
3277                            }
3278                            column_descs__ = Some(map_.next_value()?);
3279                        }
3280                        GeneratedField::RateLimit => {
3281                            if rate_limit__.is_some() {
3282                                return Err(serde::de::Error::duplicate_field("rateLimit"));
3283                            }
3284                            rate_limit__ = 
3285                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
3286                            ;
3287                        }
3288                    }
3289                }
3290                Ok(DmlNode {
3291                    table_id: table_id__.unwrap_or_default(),
3292                    table_version_id: table_version_id__.unwrap_or_default(),
3293                    column_descs: column_descs__.unwrap_or_default(),
3294                    rate_limit: rate_limit__,
3295                })
3296            }
3297        }
3298        deserializer.deserialize_struct("stream_plan.DmlNode", FIELDS, GeneratedVisitor)
3299    }
3300}
3301impl serde::Serialize for DropSubscriptionsMutation {
3302    #[allow(deprecated)]
3303    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3304    where
3305        S: serde::Serializer,
3306    {
3307        use serde::ser::SerializeStruct;
3308        let mut len = 0;
3309        if !self.info.is_empty() {
3310            len += 1;
3311        }
3312        let mut struct_ser = serializer.serialize_struct("stream_plan.DropSubscriptionsMutation", len)?;
3313        if !self.info.is_empty() {
3314            struct_ser.serialize_field("info", &self.info)?;
3315        }
3316        struct_ser.end()
3317    }
3318}
3319impl<'de> serde::Deserialize<'de> for DropSubscriptionsMutation {
3320    #[allow(deprecated)]
3321    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3322    where
3323        D: serde::Deserializer<'de>,
3324    {
3325        const FIELDS: &[&str] = &[
3326            "info",
3327        ];
3328
3329        #[allow(clippy::enum_variant_names)]
3330        enum GeneratedField {
3331            Info,
3332        }
3333        impl<'de> serde::Deserialize<'de> for GeneratedField {
3334            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3335            where
3336                D: serde::Deserializer<'de>,
3337            {
3338                struct GeneratedVisitor;
3339
3340                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3341                    type Value = GeneratedField;
3342
3343                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3344                        write!(formatter, "expected one of: {:?}", &FIELDS)
3345                    }
3346
3347                    #[allow(unused_variables)]
3348                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3349                    where
3350                        E: serde::de::Error,
3351                    {
3352                        match value {
3353                            "info" => Ok(GeneratedField::Info),
3354                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3355                        }
3356                    }
3357                }
3358                deserializer.deserialize_identifier(GeneratedVisitor)
3359            }
3360        }
3361        struct GeneratedVisitor;
3362        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3363            type Value = DropSubscriptionsMutation;
3364
3365            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3366                formatter.write_str("struct stream_plan.DropSubscriptionsMutation")
3367            }
3368
3369            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DropSubscriptionsMutation, V::Error>
3370                where
3371                    V: serde::de::MapAccess<'de>,
3372            {
3373                let mut info__ = None;
3374                while let Some(k) = map_.next_key()? {
3375                    match k {
3376                        GeneratedField::Info => {
3377                            if info__.is_some() {
3378                                return Err(serde::de::Error::duplicate_field("info"));
3379                            }
3380                            info__ = Some(map_.next_value()?);
3381                        }
3382                    }
3383                }
3384                Ok(DropSubscriptionsMutation {
3385                    info: info__.unwrap_or_default(),
3386                })
3387            }
3388        }
3389        deserializer.deserialize_struct("stream_plan.DropSubscriptionsMutation", FIELDS, GeneratedVisitor)
3390    }
3391}
3392impl serde::Serialize for DynamicFilterNode {
3393    #[allow(deprecated)]
3394    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3395    where
3396        S: serde::Serializer,
3397    {
3398        use serde::ser::SerializeStruct;
3399        let mut len = 0;
3400        if self.left_key != 0 {
3401            len += 1;
3402        }
3403        if self.condition.is_some() {
3404            len += 1;
3405        }
3406        if self.left_table.is_some() {
3407            len += 1;
3408        }
3409        if self.right_table.is_some() {
3410            len += 1;
3411        }
3412        if self.condition_always_relax {
3413            len += 1;
3414        }
3415        let mut struct_ser = serializer.serialize_struct("stream_plan.DynamicFilterNode", len)?;
3416        if self.left_key != 0 {
3417            struct_ser.serialize_field("leftKey", &self.left_key)?;
3418        }
3419        if let Some(v) = self.condition.as_ref() {
3420            struct_ser.serialize_field("condition", v)?;
3421        }
3422        if let Some(v) = self.left_table.as_ref() {
3423            struct_ser.serialize_field("leftTable", v)?;
3424        }
3425        if let Some(v) = self.right_table.as_ref() {
3426            struct_ser.serialize_field("rightTable", v)?;
3427        }
3428        if self.condition_always_relax {
3429            struct_ser.serialize_field("conditionAlwaysRelax", &self.condition_always_relax)?;
3430        }
3431        struct_ser.end()
3432    }
3433}
3434impl<'de> serde::Deserialize<'de> for DynamicFilterNode {
3435    #[allow(deprecated)]
3436    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3437    where
3438        D: serde::Deserializer<'de>,
3439    {
3440        const FIELDS: &[&str] = &[
3441            "left_key",
3442            "leftKey",
3443            "condition",
3444            "left_table",
3445            "leftTable",
3446            "right_table",
3447            "rightTable",
3448            "condition_always_relax",
3449            "conditionAlwaysRelax",
3450        ];
3451
3452        #[allow(clippy::enum_variant_names)]
3453        enum GeneratedField {
3454            LeftKey,
3455            Condition,
3456            LeftTable,
3457            RightTable,
3458            ConditionAlwaysRelax,
3459        }
3460        impl<'de> serde::Deserialize<'de> for GeneratedField {
3461            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3462            where
3463                D: serde::Deserializer<'de>,
3464            {
3465                struct GeneratedVisitor;
3466
3467                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3468                    type Value = GeneratedField;
3469
3470                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3471                        write!(formatter, "expected one of: {:?}", &FIELDS)
3472                    }
3473
3474                    #[allow(unused_variables)]
3475                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3476                    where
3477                        E: serde::de::Error,
3478                    {
3479                        match value {
3480                            "leftKey" | "left_key" => Ok(GeneratedField::LeftKey),
3481                            "condition" => Ok(GeneratedField::Condition),
3482                            "leftTable" | "left_table" => Ok(GeneratedField::LeftTable),
3483                            "rightTable" | "right_table" => Ok(GeneratedField::RightTable),
3484                            "conditionAlwaysRelax" | "condition_always_relax" => Ok(GeneratedField::ConditionAlwaysRelax),
3485                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3486                        }
3487                    }
3488                }
3489                deserializer.deserialize_identifier(GeneratedVisitor)
3490            }
3491        }
3492        struct GeneratedVisitor;
3493        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3494            type Value = DynamicFilterNode;
3495
3496            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3497                formatter.write_str("struct stream_plan.DynamicFilterNode")
3498            }
3499
3500            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DynamicFilterNode, V::Error>
3501                where
3502                    V: serde::de::MapAccess<'de>,
3503            {
3504                let mut left_key__ = None;
3505                let mut condition__ = None;
3506                let mut left_table__ = None;
3507                let mut right_table__ = None;
3508                let mut condition_always_relax__ = None;
3509                while let Some(k) = map_.next_key()? {
3510                    match k {
3511                        GeneratedField::LeftKey => {
3512                            if left_key__.is_some() {
3513                                return Err(serde::de::Error::duplicate_field("leftKey"));
3514                            }
3515                            left_key__ = 
3516                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
3517                            ;
3518                        }
3519                        GeneratedField::Condition => {
3520                            if condition__.is_some() {
3521                                return Err(serde::de::Error::duplicate_field("condition"));
3522                            }
3523                            condition__ = map_.next_value()?;
3524                        }
3525                        GeneratedField::LeftTable => {
3526                            if left_table__.is_some() {
3527                                return Err(serde::de::Error::duplicate_field("leftTable"));
3528                            }
3529                            left_table__ = map_.next_value()?;
3530                        }
3531                        GeneratedField::RightTable => {
3532                            if right_table__.is_some() {
3533                                return Err(serde::de::Error::duplicate_field("rightTable"));
3534                            }
3535                            right_table__ = map_.next_value()?;
3536                        }
3537                        GeneratedField::ConditionAlwaysRelax => {
3538                            if condition_always_relax__.is_some() {
3539                                return Err(serde::de::Error::duplicate_field("conditionAlwaysRelax"));
3540                            }
3541                            condition_always_relax__ = Some(map_.next_value()?);
3542                        }
3543                    }
3544                }
3545                Ok(DynamicFilterNode {
3546                    left_key: left_key__.unwrap_or_default(),
3547                    condition: condition__,
3548                    left_table: left_table__,
3549                    right_table: right_table__,
3550                    condition_always_relax: condition_always_relax__.unwrap_or_default(),
3551                })
3552            }
3553        }
3554        deserializer.deserialize_struct("stream_plan.DynamicFilterNode", FIELDS, GeneratedVisitor)
3555    }
3556}
3557impl serde::Serialize for EowcOverWindowNode {
3558    #[allow(deprecated)]
3559    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3560    where
3561        S: serde::Serializer,
3562    {
3563        use serde::ser::SerializeStruct;
3564        let mut len = 0;
3565        if !self.calls.is_empty() {
3566            len += 1;
3567        }
3568        if !self.partition_by.is_empty() {
3569            len += 1;
3570        }
3571        if !self.order_by.is_empty() {
3572            len += 1;
3573        }
3574        if self.state_table.is_some() {
3575            len += 1;
3576        }
3577        let mut struct_ser = serializer.serialize_struct("stream_plan.EowcOverWindowNode", len)?;
3578        if !self.calls.is_empty() {
3579            struct_ser.serialize_field("calls", &self.calls)?;
3580        }
3581        if !self.partition_by.is_empty() {
3582            struct_ser.serialize_field("partitionBy", &self.partition_by)?;
3583        }
3584        if !self.order_by.is_empty() {
3585            struct_ser.serialize_field("orderBy", &self.order_by)?;
3586        }
3587        if let Some(v) = self.state_table.as_ref() {
3588            struct_ser.serialize_field("stateTable", v)?;
3589        }
3590        struct_ser.end()
3591    }
3592}
3593impl<'de> serde::Deserialize<'de> for EowcOverWindowNode {
3594    #[allow(deprecated)]
3595    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3596    where
3597        D: serde::Deserializer<'de>,
3598    {
3599        const FIELDS: &[&str] = &[
3600            "calls",
3601            "partition_by",
3602            "partitionBy",
3603            "order_by",
3604            "orderBy",
3605            "state_table",
3606            "stateTable",
3607        ];
3608
3609        #[allow(clippy::enum_variant_names)]
3610        enum GeneratedField {
3611            Calls,
3612            PartitionBy,
3613            OrderBy,
3614            StateTable,
3615        }
3616        impl<'de> serde::Deserialize<'de> for GeneratedField {
3617            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3618            where
3619                D: serde::Deserializer<'de>,
3620            {
3621                struct GeneratedVisitor;
3622
3623                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3624                    type Value = GeneratedField;
3625
3626                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3627                        write!(formatter, "expected one of: {:?}", &FIELDS)
3628                    }
3629
3630                    #[allow(unused_variables)]
3631                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3632                    where
3633                        E: serde::de::Error,
3634                    {
3635                        match value {
3636                            "calls" => Ok(GeneratedField::Calls),
3637                            "partitionBy" | "partition_by" => Ok(GeneratedField::PartitionBy),
3638                            "orderBy" | "order_by" => Ok(GeneratedField::OrderBy),
3639                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
3640                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3641                        }
3642                    }
3643                }
3644                deserializer.deserialize_identifier(GeneratedVisitor)
3645            }
3646        }
3647        struct GeneratedVisitor;
3648        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3649            type Value = EowcOverWindowNode;
3650
3651            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3652                formatter.write_str("struct stream_plan.EowcOverWindowNode")
3653            }
3654
3655            fn visit_map<V>(self, mut map_: V) -> std::result::Result<EowcOverWindowNode, V::Error>
3656                where
3657                    V: serde::de::MapAccess<'de>,
3658            {
3659                let mut calls__ = None;
3660                let mut partition_by__ = None;
3661                let mut order_by__ = None;
3662                let mut state_table__ = None;
3663                while let Some(k) = map_.next_key()? {
3664                    match k {
3665                        GeneratedField::Calls => {
3666                            if calls__.is_some() {
3667                                return Err(serde::de::Error::duplicate_field("calls"));
3668                            }
3669                            calls__ = Some(map_.next_value()?);
3670                        }
3671                        GeneratedField::PartitionBy => {
3672                            if partition_by__.is_some() {
3673                                return Err(serde::de::Error::duplicate_field("partitionBy"));
3674                            }
3675                            partition_by__ = 
3676                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
3677                                    .into_iter().map(|x| x.0).collect())
3678                            ;
3679                        }
3680                        GeneratedField::OrderBy => {
3681                            if order_by__.is_some() {
3682                                return Err(serde::de::Error::duplicate_field("orderBy"));
3683                            }
3684                            order_by__ = Some(map_.next_value()?);
3685                        }
3686                        GeneratedField::StateTable => {
3687                            if state_table__.is_some() {
3688                                return Err(serde::de::Error::duplicate_field("stateTable"));
3689                            }
3690                            state_table__ = map_.next_value()?;
3691                        }
3692                    }
3693                }
3694                Ok(EowcOverWindowNode {
3695                    calls: calls__.unwrap_or_default(),
3696                    partition_by: partition_by__.unwrap_or_default(),
3697                    order_by: order_by__.unwrap_or_default(),
3698                    state_table: state_table__,
3699                })
3700            }
3701        }
3702        deserializer.deserialize_struct("stream_plan.EowcOverWindowNode", FIELDS, GeneratedVisitor)
3703    }
3704}
3705impl serde::Serialize for ExchangeNode {
3706    #[allow(deprecated)]
3707    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3708    where
3709        S: serde::Serializer,
3710    {
3711        use serde::ser::SerializeStruct;
3712        let mut len = 0;
3713        if self.strategy.is_some() {
3714            len += 1;
3715        }
3716        let mut struct_ser = serializer.serialize_struct("stream_plan.ExchangeNode", len)?;
3717        if let Some(v) = self.strategy.as_ref() {
3718            struct_ser.serialize_field("strategy", v)?;
3719        }
3720        struct_ser.end()
3721    }
3722}
3723impl<'de> serde::Deserialize<'de> for ExchangeNode {
3724    #[allow(deprecated)]
3725    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3726    where
3727        D: serde::Deserializer<'de>,
3728    {
3729        const FIELDS: &[&str] = &[
3730            "strategy",
3731        ];
3732
3733        #[allow(clippy::enum_variant_names)]
3734        enum GeneratedField {
3735            Strategy,
3736        }
3737        impl<'de> serde::Deserialize<'de> for GeneratedField {
3738            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3739            where
3740                D: serde::Deserializer<'de>,
3741            {
3742                struct GeneratedVisitor;
3743
3744                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3745                    type Value = GeneratedField;
3746
3747                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3748                        write!(formatter, "expected one of: {:?}", &FIELDS)
3749                    }
3750
3751                    #[allow(unused_variables)]
3752                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3753                    where
3754                        E: serde::de::Error,
3755                    {
3756                        match value {
3757                            "strategy" => Ok(GeneratedField::Strategy),
3758                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3759                        }
3760                    }
3761                }
3762                deserializer.deserialize_identifier(GeneratedVisitor)
3763            }
3764        }
3765        struct GeneratedVisitor;
3766        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3767            type Value = ExchangeNode;
3768
3769            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3770                formatter.write_str("struct stream_plan.ExchangeNode")
3771            }
3772
3773            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ExchangeNode, V::Error>
3774                where
3775                    V: serde::de::MapAccess<'de>,
3776            {
3777                let mut strategy__ = None;
3778                while let Some(k) = map_.next_key()? {
3779                    match k {
3780                        GeneratedField::Strategy => {
3781                            if strategy__.is_some() {
3782                                return Err(serde::de::Error::duplicate_field("strategy"));
3783                            }
3784                            strategy__ = map_.next_value()?;
3785                        }
3786                    }
3787                }
3788                Ok(ExchangeNode {
3789                    strategy: strategy__,
3790                })
3791            }
3792        }
3793        deserializer.deserialize_struct("stream_plan.ExchangeNode", FIELDS, GeneratedVisitor)
3794    }
3795}
3796impl serde::Serialize for ExpandNode {
3797    #[allow(deprecated)]
3798    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3799    where
3800        S: serde::Serializer,
3801    {
3802        use serde::ser::SerializeStruct;
3803        let mut len = 0;
3804        if !self.column_subsets.is_empty() {
3805            len += 1;
3806        }
3807        let mut struct_ser = serializer.serialize_struct("stream_plan.ExpandNode", len)?;
3808        if !self.column_subsets.is_empty() {
3809            struct_ser.serialize_field("columnSubsets", &self.column_subsets)?;
3810        }
3811        struct_ser.end()
3812    }
3813}
3814impl<'de> serde::Deserialize<'de> for ExpandNode {
3815    #[allow(deprecated)]
3816    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3817    where
3818        D: serde::Deserializer<'de>,
3819    {
3820        const FIELDS: &[&str] = &[
3821            "column_subsets",
3822            "columnSubsets",
3823        ];
3824
3825        #[allow(clippy::enum_variant_names)]
3826        enum GeneratedField {
3827            ColumnSubsets,
3828        }
3829        impl<'de> serde::Deserialize<'de> for GeneratedField {
3830            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3831            where
3832                D: serde::Deserializer<'de>,
3833            {
3834                struct GeneratedVisitor;
3835
3836                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3837                    type Value = GeneratedField;
3838
3839                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3840                        write!(formatter, "expected one of: {:?}", &FIELDS)
3841                    }
3842
3843                    #[allow(unused_variables)]
3844                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3845                    where
3846                        E: serde::de::Error,
3847                    {
3848                        match value {
3849                            "columnSubsets" | "column_subsets" => Ok(GeneratedField::ColumnSubsets),
3850                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3851                        }
3852                    }
3853                }
3854                deserializer.deserialize_identifier(GeneratedVisitor)
3855            }
3856        }
3857        struct GeneratedVisitor;
3858        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3859            type Value = ExpandNode;
3860
3861            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3862                formatter.write_str("struct stream_plan.ExpandNode")
3863            }
3864
3865            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ExpandNode, V::Error>
3866                where
3867                    V: serde::de::MapAccess<'de>,
3868            {
3869                let mut column_subsets__ = None;
3870                while let Some(k) = map_.next_key()? {
3871                    match k {
3872                        GeneratedField::ColumnSubsets => {
3873                            if column_subsets__.is_some() {
3874                                return Err(serde::de::Error::duplicate_field("columnSubsets"));
3875                            }
3876                            column_subsets__ = Some(map_.next_value()?);
3877                        }
3878                    }
3879                }
3880                Ok(ExpandNode {
3881                    column_subsets: column_subsets__.unwrap_or_default(),
3882                })
3883            }
3884        }
3885        deserializer.deserialize_struct("stream_plan.ExpandNode", FIELDS, GeneratedVisitor)
3886    }
3887}
3888impl serde::Serialize for expand_node::Subset {
3889    #[allow(deprecated)]
3890    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3891    where
3892        S: serde::Serializer,
3893    {
3894        use serde::ser::SerializeStruct;
3895        let mut len = 0;
3896        if !self.column_indices.is_empty() {
3897            len += 1;
3898        }
3899        let mut struct_ser = serializer.serialize_struct("stream_plan.ExpandNode.Subset", len)?;
3900        if !self.column_indices.is_empty() {
3901            struct_ser.serialize_field("columnIndices", &self.column_indices)?;
3902        }
3903        struct_ser.end()
3904    }
3905}
3906impl<'de> serde::Deserialize<'de> for expand_node::Subset {
3907    #[allow(deprecated)]
3908    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3909    where
3910        D: serde::Deserializer<'de>,
3911    {
3912        const FIELDS: &[&str] = &[
3913            "column_indices",
3914            "columnIndices",
3915        ];
3916
3917        #[allow(clippy::enum_variant_names)]
3918        enum GeneratedField {
3919            ColumnIndices,
3920        }
3921        impl<'de> serde::Deserialize<'de> for GeneratedField {
3922            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
3923            where
3924                D: serde::Deserializer<'de>,
3925            {
3926                struct GeneratedVisitor;
3927
3928                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3929                    type Value = GeneratedField;
3930
3931                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3932                        write!(formatter, "expected one of: {:?}", &FIELDS)
3933                    }
3934
3935                    #[allow(unused_variables)]
3936                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
3937                    where
3938                        E: serde::de::Error,
3939                    {
3940                        match value {
3941                            "columnIndices" | "column_indices" => Ok(GeneratedField::ColumnIndices),
3942                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
3943                        }
3944                    }
3945                }
3946                deserializer.deserialize_identifier(GeneratedVisitor)
3947            }
3948        }
3949        struct GeneratedVisitor;
3950        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
3951            type Value = expand_node::Subset;
3952
3953            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3954                formatter.write_str("struct stream_plan.ExpandNode.Subset")
3955            }
3956
3957            fn visit_map<V>(self, mut map_: V) -> std::result::Result<expand_node::Subset, V::Error>
3958                where
3959                    V: serde::de::MapAccess<'de>,
3960            {
3961                let mut column_indices__ = None;
3962                while let Some(k) = map_.next_key()? {
3963                    match k {
3964                        GeneratedField::ColumnIndices => {
3965                            if column_indices__.is_some() {
3966                                return Err(serde::de::Error::duplicate_field("columnIndices"));
3967                            }
3968                            column_indices__ = 
3969                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
3970                                    .into_iter().map(|x| x.0).collect())
3971                            ;
3972                        }
3973                    }
3974                }
3975                Ok(expand_node::Subset {
3976                    column_indices: column_indices__.unwrap_or_default(),
3977                })
3978            }
3979        }
3980        deserializer.deserialize_struct("stream_plan.ExpandNode.Subset", FIELDS, GeneratedVisitor)
3981    }
3982}
3983impl serde::Serialize for FilterNode {
3984    #[allow(deprecated)]
3985    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3986    where
3987        S: serde::Serializer,
3988    {
3989        use serde::ser::SerializeStruct;
3990        let mut len = 0;
3991        if self.search_condition.is_some() {
3992            len += 1;
3993        }
3994        let mut struct_ser = serializer.serialize_struct("stream_plan.FilterNode", len)?;
3995        if let Some(v) = self.search_condition.as_ref() {
3996            struct_ser.serialize_field("searchCondition", v)?;
3997        }
3998        struct_ser.end()
3999    }
4000}
4001impl<'de> serde::Deserialize<'de> for FilterNode {
4002    #[allow(deprecated)]
4003    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4004    where
4005        D: serde::Deserializer<'de>,
4006    {
4007        const FIELDS: &[&str] = &[
4008            "search_condition",
4009            "searchCondition",
4010        ];
4011
4012        #[allow(clippy::enum_variant_names)]
4013        enum GeneratedField {
4014            SearchCondition,
4015        }
4016        impl<'de> serde::Deserialize<'de> for GeneratedField {
4017            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4018            where
4019                D: serde::Deserializer<'de>,
4020            {
4021                struct GeneratedVisitor;
4022
4023                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4024                    type Value = GeneratedField;
4025
4026                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4027                        write!(formatter, "expected one of: {:?}", &FIELDS)
4028                    }
4029
4030                    #[allow(unused_variables)]
4031                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4032                    where
4033                        E: serde::de::Error,
4034                    {
4035                        match value {
4036                            "searchCondition" | "search_condition" => Ok(GeneratedField::SearchCondition),
4037                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4038                        }
4039                    }
4040                }
4041                deserializer.deserialize_identifier(GeneratedVisitor)
4042            }
4043        }
4044        struct GeneratedVisitor;
4045        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4046            type Value = FilterNode;
4047
4048            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4049                formatter.write_str("struct stream_plan.FilterNode")
4050            }
4051
4052            fn visit_map<V>(self, mut map_: V) -> std::result::Result<FilterNode, V::Error>
4053                where
4054                    V: serde::de::MapAccess<'de>,
4055            {
4056                let mut search_condition__ = None;
4057                while let Some(k) = map_.next_key()? {
4058                    match k {
4059                        GeneratedField::SearchCondition => {
4060                            if search_condition__.is_some() {
4061                                return Err(serde::de::Error::duplicate_field("searchCondition"));
4062                            }
4063                            search_condition__ = map_.next_value()?;
4064                        }
4065                    }
4066                }
4067                Ok(FilterNode {
4068                    search_condition: search_condition__,
4069                })
4070            }
4071        }
4072        deserializer.deserialize_struct("stream_plan.FilterNode", FIELDS, GeneratedVisitor)
4073    }
4074}
4075impl serde::Serialize for FragmentTypeFlag {
4076    #[allow(deprecated)]
4077    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4078    where
4079        S: serde::Serializer,
4080    {
4081        let variant = match self {
4082            Self::FragmentUnspecified => "FRAGMENT_TYPE_FLAG_FRAGMENT_UNSPECIFIED",
4083            Self::Source => "FRAGMENT_TYPE_FLAG_SOURCE",
4084            Self::Mview => "FRAGMENT_TYPE_FLAG_MVIEW",
4085            Self::Sink => "FRAGMENT_TYPE_FLAG_SINK",
4086            Self::Now => "FRAGMENT_TYPE_FLAG_NOW",
4087            Self::StreamScan => "FRAGMENT_TYPE_FLAG_STREAM_SCAN",
4088            Self::BarrierRecv => "FRAGMENT_TYPE_FLAG_BARRIER_RECV",
4089            Self::Values => "FRAGMENT_TYPE_FLAG_VALUES",
4090            Self::Dml => "FRAGMENT_TYPE_FLAG_DML",
4091            Self::CdcFilter => "FRAGMENT_TYPE_FLAG_CDC_FILTER",
4092            Self::SourceScan => "FRAGMENT_TYPE_FLAG_SOURCE_SCAN",
4093            Self::SnapshotBackfillStreamScan => "FRAGMENT_TYPE_FLAG_SNAPSHOT_BACKFILL_STREAM_SCAN",
4094            Self::FsFetch => "FRAGMENT_TYPE_FLAG_FS_FETCH",
4095            Self::CrossDbSnapshotBackfillStreamScan => "FRAGMENT_TYPE_FLAG_CROSS_DB_SNAPSHOT_BACKFILL_STREAM_SCAN",
4096        };
4097        serializer.serialize_str(variant)
4098    }
4099}
4100impl<'de> serde::Deserialize<'de> for FragmentTypeFlag {
4101    #[allow(deprecated)]
4102    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4103    where
4104        D: serde::Deserializer<'de>,
4105    {
4106        const FIELDS: &[&str] = &[
4107            "FRAGMENT_TYPE_FLAG_FRAGMENT_UNSPECIFIED",
4108            "FRAGMENT_TYPE_FLAG_SOURCE",
4109            "FRAGMENT_TYPE_FLAG_MVIEW",
4110            "FRAGMENT_TYPE_FLAG_SINK",
4111            "FRAGMENT_TYPE_FLAG_NOW",
4112            "FRAGMENT_TYPE_FLAG_STREAM_SCAN",
4113            "FRAGMENT_TYPE_FLAG_BARRIER_RECV",
4114            "FRAGMENT_TYPE_FLAG_VALUES",
4115            "FRAGMENT_TYPE_FLAG_DML",
4116            "FRAGMENT_TYPE_FLAG_CDC_FILTER",
4117            "FRAGMENT_TYPE_FLAG_SOURCE_SCAN",
4118            "FRAGMENT_TYPE_FLAG_SNAPSHOT_BACKFILL_STREAM_SCAN",
4119            "FRAGMENT_TYPE_FLAG_FS_FETCH",
4120            "FRAGMENT_TYPE_FLAG_CROSS_DB_SNAPSHOT_BACKFILL_STREAM_SCAN",
4121        ];
4122
4123        struct GeneratedVisitor;
4124
4125        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4126            type Value = FragmentTypeFlag;
4127
4128            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4129                write!(formatter, "expected one of: {:?}", &FIELDS)
4130            }
4131
4132            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
4133            where
4134                E: serde::de::Error,
4135            {
4136                i32::try_from(v)
4137                    .ok()
4138                    .and_then(|x| x.try_into().ok())
4139                    .ok_or_else(|| {
4140                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
4141                    })
4142            }
4143
4144            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
4145            where
4146                E: serde::de::Error,
4147            {
4148                i32::try_from(v)
4149                    .ok()
4150                    .and_then(|x| x.try_into().ok())
4151                    .ok_or_else(|| {
4152                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
4153                    })
4154            }
4155
4156            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4157            where
4158                E: serde::de::Error,
4159            {
4160                match value {
4161                    "FRAGMENT_TYPE_FLAG_FRAGMENT_UNSPECIFIED" => Ok(FragmentTypeFlag::FragmentUnspecified),
4162                    "FRAGMENT_TYPE_FLAG_SOURCE" => Ok(FragmentTypeFlag::Source),
4163                    "FRAGMENT_TYPE_FLAG_MVIEW" => Ok(FragmentTypeFlag::Mview),
4164                    "FRAGMENT_TYPE_FLAG_SINK" => Ok(FragmentTypeFlag::Sink),
4165                    "FRAGMENT_TYPE_FLAG_NOW" => Ok(FragmentTypeFlag::Now),
4166                    "FRAGMENT_TYPE_FLAG_STREAM_SCAN" => Ok(FragmentTypeFlag::StreamScan),
4167                    "FRAGMENT_TYPE_FLAG_BARRIER_RECV" => Ok(FragmentTypeFlag::BarrierRecv),
4168                    "FRAGMENT_TYPE_FLAG_VALUES" => Ok(FragmentTypeFlag::Values),
4169                    "FRAGMENT_TYPE_FLAG_DML" => Ok(FragmentTypeFlag::Dml),
4170                    "FRAGMENT_TYPE_FLAG_CDC_FILTER" => Ok(FragmentTypeFlag::CdcFilter),
4171                    "FRAGMENT_TYPE_FLAG_SOURCE_SCAN" => Ok(FragmentTypeFlag::SourceScan),
4172                    "FRAGMENT_TYPE_FLAG_SNAPSHOT_BACKFILL_STREAM_SCAN" => Ok(FragmentTypeFlag::SnapshotBackfillStreamScan),
4173                    "FRAGMENT_TYPE_FLAG_FS_FETCH" => Ok(FragmentTypeFlag::FsFetch),
4174                    "FRAGMENT_TYPE_FLAG_CROSS_DB_SNAPSHOT_BACKFILL_STREAM_SCAN" => Ok(FragmentTypeFlag::CrossDbSnapshotBackfillStreamScan),
4175                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
4176                }
4177            }
4178        }
4179        deserializer.deserialize_any(GeneratedVisitor)
4180    }
4181}
4182impl serde::Serialize for GlobalApproxPercentileNode {
4183    #[allow(deprecated)]
4184    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4185    where
4186        S: serde::Serializer,
4187    {
4188        use serde::ser::SerializeStruct;
4189        let mut len = 0;
4190        if self.base != 0. {
4191            len += 1;
4192        }
4193        if self.quantile != 0. {
4194            len += 1;
4195        }
4196        if self.bucket_state_table.is_some() {
4197            len += 1;
4198        }
4199        if self.count_state_table.is_some() {
4200            len += 1;
4201        }
4202        let mut struct_ser = serializer.serialize_struct("stream_plan.GlobalApproxPercentileNode", len)?;
4203        if self.base != 0. {
4204            struct_ser.serialize_field("base", &self.base)?;
4205        }
4206        if self.quantile != 0. {
4207            struct_ser.serialize_field("quantile", &self.quantile)?;
4208        }
4209        if let Some(v) = self.bucket_state_table.as_ref() {
4210            struct_ser.serialize_field("bucketStateTable", v)?;
4211        }
4212        if let Some(v) = self.count_state_table.as_ref() {
4213            struct_ser.serialize_field("countStateTable", v)?;
4214        }
4215        struct_ser.end()
4216    }
4217}
4218impl<'de> serde::Deserialize<'de> for GlobalApproxPercentileNode {
4219    #[allow(deprecated)]
4220    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4221    where
4222        D: serde::Deserializer<'de>,
4223    {
4224        const FIELDS: &[&str] = &[
4225            "base",
4226            "quantile",
4227            "bucket_state_table",
4228            "bucketStateTable",
4229            "count_state_table",
4230            "countStateTable",
4231        ];
4232
4233        #[allow(clippy::enum_variant_names)]
4234        enum GeneratedField {
4235            Base,
4236            Quantile,
4237            BucketStateTable,
4238            CountStateTable,
4239        }
4240        impl<'de> serde::Deserialize<'de> for GeneratedField {
4241            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4242            where
4243                D: serde::Deserializer<'de>,
4244            {
4245                struct GeneratedVisitor;
4246
4247                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4248                    type Value = GeneratedField;
4249
4250                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4251                        write!(formatter, "expected one of: {:?}", &FIELDS)
4252                    }
4253
4254                    #[allow(unused_variables)]
4255                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4256                    where
4257                        E: serde::de::Error,
4258                    {
4259                        match value {
4260                            "base" => Ok(GeneratedField::Base),
4261                            "quantile" => Ok(GeneratedField::Quantile),
4262                            "bucketStateTable" | "bucket_state_table" => Ok(GeneratedField::BucketStateTable),
4263                            "countStateTable" | "count_state_table" => Ok(GeneratedField::CountStateTable),
4264                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4265                        }
4266                    }
4267                }
4268                deserializer.deserialize_identifier(GeneratedVisitor)
4269            }
4270        }
4271        struct GeneratedVisitor;
4272        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4273            type Value = GlobalApproxPercentileNode;
4274
4275            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4276                formatter.write_str("struct stream_plan.GlobalApproxPercentileNode")
4277            }
4278
4279            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GlobalApproxPercentileNode, V::Error>
4280                where
4281                    V: serde::de::MapAccess<'de>,
4282            {
4283                let mut base__ = None;
4284                let mut quantile__ = None;
4285                let mut bucket_state_table__ = None;
4286                let mut count_state_table__ = None;
4287                while let Some(k) = map_.next_key()? {
4288                    match k {
4289                        GeneratedField::Base => {
4290                            if base__.is_some() {
4291                                return Err(serde::de::Error::duplicate_field("base"));
4292                            }
4293                            base__ = 
4294                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4295                            ;
4296                        }
4297                        GeneratedField::Quantile => {
4298                            if quantile__.is_some() {
4299                                return Err(serde::de::Error::duplicate_field("quantile"));
4300                            }
4301                            quantile__ = 
4302                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4303                            ;
4304                        }
4305                        GeneratedField::BucketStateTable => {
4306                            if bucket_state_table__.is_some() {
4307                                return Err(serde::de::Error::duplicate_field("bucketStateTable"));
4308                            }
4309                            bucket_state_table__ = map_.next_value()?;
4310                        }
4311                        GeneratedField::CountStateTable => {
4312                            if count_state_table__.is_some() {
4313                                return Err(serde::de::Error::duplicate_field("countStateTable"));
4314                            }
4315                            count_state_table__ = map_.next_value()?;
4316                        }
4317                    }
4318                }
4319                Ok(GlobalApproxPercentileNode {
4320                    base: base__.unwrap_or_default(),
4321                    quantile: quantile__.unwrap_or_default(),
4322                    bucket_state_table: bucket_state_table__,
4323                    count_state_table: count_state_table__,
4324                })
4325            }
4326        }
4327        deserializer.deserialize_struct("stream_plan.GlobalApproxPercentileNode", FIELDS, GeneratedVisitor)
4328    }
4329}
4330impl serde::Serialize for GroupTopNNode {
4331    #[allow(deprecated)]
4332    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4333    where
4334        S: serde::Serializer,
4335    {
4336        use serde::ser::SerializeStruct;
4337        let mut len = 0;
4338        if self.limit != 0 {
4339            len += 1;
4340        }
4341        if self.offset != 0 {
4342            len += 1;
4343        }
4344        if !self.group_key.is_empty() {
4345            len += 1;
4346        }
4347        if self.table.is_some() {
4348            len += 1;
4349        }
4350        if !self.order_by.is_empty() {
4351            len += 1;
4352        }
4353        if self.with_ties {
4354            len += 1;
4355        }
4356        let mut struct_ser = serializer.serialize_struct("stream_plan.GroupTopNNode", len)?;
4357        if self.limit != 0 {
4358            #[allow(clippy::needless_borrow)]
4359            #[allow(clippy::needless_borrows_for_generic_args)]
4360            struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?;
4361        }
4362        if self.offset != 0 {
4363            #[allow(clippy::needless_borrow)]
4364            #[allow(clippy::needless_borrows_for_generic_args)]
4365            struct_ser.serialize_field("offset", ToString::to_string(&self.offset).as_str())?;
4366        }
4367        if !self.group_key.is_empty() {
4368            struct_ser.serialize_field("groupKey", &self.group_key)?;
4369        }
4370        if let Some(v) = self.table.as_ref() {
4371            struct_ser.serialize_field("table", v)?;
4372        }
4373        if !self.order_by.is_empty() {
4374            struct_ser.serialize_field("orderBy", &self.order_by)?;
4375        }
4376        if self.with_ties {
4377            struct_ser.serialize_field("withTies", &self.with_ties)?;
4378        }
4379        struct_ser.end()
4380    }
4381}
4382impl<'de> serde::Deserialize<'de> for GroupTopNNode {
4383    #[allow(deprecated)]
4384    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4385    where
4386        D: serde::Deserializer<'de>,
4387    {
4388        const FIELDS: &[&str] = &[
4389            "limit",
4390            "offset",
4391            "group_key",
4392            "groupKey",
4393            "table",
4394            "order_by",
4395            "orderBy",
4396            "with_ties",
4397            "withTies",
4398        ];
4399
4400        #[allow(clippy::enum_variant_names)]
4401        enum GeneratedField {
4402            Limit,
4403            Offset,
4404            GroupKey,
4405            Table,
4406            OrderBy,
4407            WithTies,
4408        }
4409        impl<'de> serde::Deserialize<'de> for GeneratedField {
4410            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4411            where
4412                D: serde::Deserializer<'de>,
4413            {
4414                struct GeneratedVisitor;
4415
4416                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4417                    type Value = GeneratedField;
4418
4419                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4420                        write!(formatter, "expected one of: {:?}", &FIELDS)
4421                    }
4422
4423                    #[allow(unused_variables)]
4424                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4425                    where
4426                        E: serde::de::Error,
4427                    {
4428                        match value {
4429                            "limit" => Ok(GeneratedField::Limit),
4430                            "offset" => Ok(GeneratedField::Offset),
4431                            "groupKey" | "group_key" => Ok(GeneratedField::GroupKey),
4432                            "table" => Ok(GeneratedField::Table),
4433                            "orderBy" | "order_by" => Ok(GeneratedField::OrderBy),
4434                            "withTies" | "with_ties" => Ok(GeneratedField::WithTies),
4435                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4436                        }
4437                    }
4438                }
4439                deserializer.deserialize_identifier(GeneratedVisitor)
4440            }
4441        }
4442        struct GeneratedVisitor;
4443        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4444            type Value = GroupTopNNode;
4445
4446            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4447                formatter.write_str("struct stream_plan.GroupTopNNode")
4448            }
4449
4450            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GroupTopNNode, V::Error>
4451                where
4452                    V: serde::de::MapAccess<'de>,
4453            {
4454                let mut limit__ = None;
4455                let mut offset__ = None;
4456                let mut group_key__ = None;
4457                let mut table__ = None;
4458                let mut order_by__ = None;
4459                let mut with_ties__ = None;
4460                while let Some(k) = map_.next_key()? {
4461                    match k {
4462                        GeneratedField::Limit => {
4463                            if limit__.is_some() {
4464                                return Err(serde::de::Error::duplicate_field("limit"));
4465                            }
4466                            limit__ = 
4467                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4468                            ;
4469                        }
4470                        GeneratedField::Offset => {
4471                            if offset__.is_some() {
4472                                return Err(serde::de::Error::duplicate_field("offset"));
4473                            }
4474                            offset__ = 
4475                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4476                            ;
4477                        }
4478                        GeneratedField::GroupKey => {
4479                            if group_key__.is_some() {
4480                                return Err(serde::de::Error::duplicate_field("groupKey"));
4481                            }
4482                            group_key__ = 
4483                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
4484                                    .into_iter().map(|x| x.0).collect())
4485                            ;
4486                        }
4487                        GeneratedField::Table => {
4488                            if table__.is_some() {
4489                                return Err(serde::de::Error::duplicate_field("table"));
4490                            }
4491                            table__ = map_.next_value()?;
4492                        }
4493                        GeneratedField::OrderBy => {
4494                            if order_by__.is_some() {
4495                                return Err(serde::de::Error::duplicate_field("orderBy"));
4496                            }
4497                            order_by__ = Some(map_.next_value()?);
4498                        }
4499                        GeneratedField::WithTies => {
4500                            if with_ties__.is_some() {
4501                                return Err(serde::de::Error::duplicate_field("withTies"));
4502                            }
4503                            with_ties__ = Some(map_.next_value()?);
4504                        }
4505                    }
4506                }
4507                Ok(GroupTopNNode {
4508                    limit: limit__.unwrap_or_default(),
4509                    offset: offset__.unwrap_or_default(),
4510                    group_key: group_key__.unwrap_or_default(),
4511                    table: table__,
4512                    order_by: order_by__.unwrap_or_default(),
4513                    with_ties: with_ties__.unwrap_or_default(),
4514                })
4515            }
4516        }
4517        deserializer.deserialize_struct("stream_plan.GroupTopNNode", FIELDS, GeneratedVisitor)
4518    }
4519}
4520impl serde::Serialize for HashAggNode {
4521    #[allow(deprecated)]
4522    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4523    where
4524        S: serde::Serializer,
4525    {
4526        use serde::ser::SerializeStruct;
4527        let mut len = 0;
4528        if !self.group_key.is_empty() {
4529            len += 1;
4530        }
4531        if !self.agg_calls.is_empty() {
4532            len += 1;
4533        }
4534        if !self.agg_call_states.is_empty() {
4535            len += 1;
4536        }
4537        if self.intermediate_state_table.is_some() {
4538            len += 1;
4539        }
4540        if self.is_append_only {
4541            len += 1;
4542        }
4543        if !self.distinct_dedup_tables.is_empty() {
4544            len += 1;
4545        }
4546        if self.row_count_index != 0 {
4547            len += 1;
4548        }
4549        if self.emit_on_window_close {
4550            len += 1;
4551        }
4552        if self.version != 0 {
4553            len += 1;
4554        }
4555        let mut struct_ser = serializer.serialize_struct("stream_plan.HashAggNode", len)?;
4556        if !self.group_key.is_empty() {
4557            struct_ser.serialize_field("groupKey", &self.group_key)?;
4558        }
4559        if !self.agg_calls.is_empty() {
4560            struct_ser.serialize_field("aggCalls", &self.agg_calls)?;
4561        }
4562        if !self.agg_call_states.is_empty() {
4563            struct_ser.serialize_field("aggCallStates", &self.agg_call_states)?;
4564        }
4565        if let Some(v) = self.intermediate_state_table.as_ref() {
4566            struct_ser.serialize_field("intermediateStateTable", v)?;
4567        }
4568        if self.is_append_only {
4569            struct_ser.serialize_field("isAppendOnly", &self.is_append_only)?;
4570        }
4571        if !self.distinct_dedup_tables.is_empty() {
4572            struct_ser.serialize_field("distinctDedupTables", &self.distinct_dedup_tables)?;
4573        }
4574        if self.row_count_index != 0 {
4575            struct_ser.serialize_field("rowCountIndex", &self.row_count_index)?;
4576        }
4577        if self.emit_on_window_close {
4578            struct_ser.serialize_field("emitOnWindowClose", &self.emit_on_window_close)?;
4579        }
4580        if self.version != 0 {
4581            let v = AggNodeVersion::try_from(self.version)
4582                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.version)))?;
4583            struct_ser.serialize_field("version", &v)?;
4584        }
4585        struct_ser.end()
4586    }
4587}
4588impl<'de> serde::Deserialize<'de> for HashAggNode {
4589    #[allow(deprecated)]
4590    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4591    where
4592        D: serde::Deserializer<'de>,
4593    {
4594        const FIELDS: &[&str] = &[
4595            "group_key",
4596            "groupKey",
4597            "agg_calls",
4598            "aggCalls",
4599            "agg_call_states",
4600            "aggCallStates",
4601            "intermediate_state_table",
4602            "intermediateStateTable",
4603            "is_append_only",
4604            "isAppendOnly",
4605            "distinct_dedup_tables",
4606            "distinctDedupTables",
4607            "row_count_index",
4608            "rowCountIndex",
4609            "emit_on_window_close",
4610            "emitOnWindowClose",
4611            "version",
4612        ];
4613
4614        #[allow(clippy::enum_variant_names)]
4615        enum GeneratedField {
4616            GroupKey,
4617            AggCalls,
4618            AggCallStates,
4619            IntermediateStateTable,
4620            IsAppendOnly,
4621            DistinctDedupTables,
4622            RowCountIndex,
4623            EmitOnWindowClose,
4624            Version,
4625        }
4626        impl<'de> serde::Deserialize<'de> for GeneratedField {
4627            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4628            where
4629                D: serde::Deserializer<'de>,
4630            {
4631                struct GeneratedVisitor;
4632
4633                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4634                    type Value = GeneratedField;
4635
4636                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4637                        write!(formatter, "expected one of: {:?}", &FIELDS)
4638                    }
4639
4640                    #[allow(unused_variables)]
4641                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4642                    where
4643                        E: serde::de::Error,
4644                    {
4645                        match value {
4646                            "groupKey" | "group_key" => Ok(GeneratedField::GroupKey),
4647                            "aggCalls" | "agg_calls" => Ok(GeneratedField::AggCalls),
4648                            "aggCallStates" | "agg_call_states" => Ok(GeneratedField::AggCallStates),
4649                            "intermediateStateTable" | "intermediate_state_table" => Ok(GeneratedField::IntermediateStateTable),
4650                            "isAppendOnly" | "is_append_only" => Ok(GeneratedField::IsAppendOnly),
4651                            "distinctDedupTables" | "distinct_dedup_tables" => Ok(GeneratedField::DistinctDedupTables),
4652                            "rowCountIndex" | "row_count_index" => Ok(GeneratedField::RowCountIndex),
4653                            "emitOnWindowClose" | "emit_on_window_close" => Ok(GeneratedField::EmitOnWindowClose),
4654                            "version" => Ok(GeneratedField::Version),
4655                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4656                        }
4657                    }
4658                }
4659                deserializer.deserialize_identifier(GeneratedVisitor)
4660            }
4661        }
4662        struct GeneratedVisitor;
4663        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4664            type Value = HashAggNode;
4665
4666            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4667                formatter.write_str("struct stream_plan.HashAggNode")
4668            }
4669
4670            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HashAggNode, V::Error>
4671                where
4672                    V: serde::de::MapAccess<'de>,
4673            {
4674                let mut group_key__ = None;
4675                let mut agg_calls__ = None;
4676                let mut agg_call_states__ = None;
4677                let mut intermediate_state_table__ = None;
4678                let mut is_append_only__ = None;
4679                let mut distinct_dedup_tables__ = None;
4680                let mut row_count_index__ = None;
4681                let mut emit_on_window_close__ = None;
4682                let mut version__ = None;
4683                while let Some(k) = map_.next_key()? {
4684                    match k {
4685                        GeneratedField::GroupKey => {
4686                            if group_key__.is_some() {
4687                                return Err(serde::de::Error::duplicate_field("groupKey"));
4688                            }
4689                            group_key__ = 
4690                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
4691                                    .into_iter().map(|x| x.0).collect())
4692                            ;
4693                        }
4694                        GeneratedField::AggCalls => {
4695                            if agg_calls__.is_some() {
4696                                return Err(serde::de::Error::duplicate_field("aggCalls"));
4697                            }
4698                            agg_calls__ = Some(map_.next_value()?);
4699                        }
4700                        GeneratedField::AggCallStates => {
4701                            if agg_call_states__.is_some() {
4702                                return Err(serde::de::Error::duplicate_field("aggCallStates"));
4703                            }
4704                            agg_call_states__ = Some(map_.next_value()?);
4705                        }
4706                        GeneratedField::IntermediateStateTable => {
4707                            if intermediate_state_table__.is_some() {
4708                                return Err(serde::de::Error::duplicate_field("intermediateStateTable"));
4709                            }
4710                            intermediate_state_table__ = map_.next_value()?;
4711                        }
4712                        GeneratedField::IsAppendOnly => {
4713                            if is_append_only__.is_some() {
4714                                return Err(serde::de::Error::duplicate_field("isAppendOnly"));
4715                            }
4716                            is_append_only__ = Some(map_.next_value()?);
4717                        }
4718                        GeneratedField::DistinctDedupTables => {
4719                            if distinct_dedup_tables__.is_some() {
4720                                return Err(serde::de::Error::duplicate_field("distinctDedupTables"));
4721                            }
4722                            distinct_dedup_tables__ = Some(
4723                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
4724                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
4725                            );
4726                        }
4727                        GeneratedField::RowCountIndex => {
4728                            if row_count_index__.is_some() {
4729                                return Err(serde::de::Error::duplicate_field("rowCountIndex"));
4730                            }
4731                            row_count_index__ = 
4732                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
4733                            ;
4734                        }
4735                        GeneratedField::EmitOnWindowClose => {
4736                            if emit_on_window_close__.is_some() {
4737                                return Err(serde::de::Error::duplicate_field("emitOnWindowClose"));
4738                            }
4739                            emit_on_window_close__ = Some(map_.next_value()?);
4740                        }
4741                        GeneratedField::Version => {
4742                            if version__.is_some() {
4743                                return Err(serde::de::Error::duplicate_field("version"));
4744                            }
4745                            version__ = Some(map_.next_value::<AggNodeVersion>()? as i32);
4746                        }
4747                    }
4748                }
4749                Ok(HashAggNode {
4750                    group_key: group_key__.unwrap_or_default(),
4751                    agg_calls: agg_calls__.unwrap_or_default(),
4752                    agg_call_states: agg_call_states__.unwrap_or_default(),
4753                    intermediate_state_table: intermediate_state_table__,
4754                    is_append_only: is_append_only__.unwrap_or_default(),
4755                    distinct_dedup_tables: distinct_dedup_tables__.unwrap_or_default(),
4756                    row_count_index: row_count_index__.unwrap_or_default(),
4757                    emit_on_window_close: emit_on_window_close__.unwrap_or_default(),
4758                    version: version__.unwrap_or_default(),
4759                })
4760            }
4761        }
4762        deserializer.deserialize_struct("stream_plan.HashAggNode", FIELDS, GeneratedVisitor)
4763    }
4764}
4765impl serde::Serialize for HashJoinNode {
4766    #[allow(deprecated)]
4767    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4768    where
4769        S: serde::Serializer,
4770    {
4771        use serde::ser::SerializeStruct;
4772        let mut len = 0;
4773        if self.join_type != 0 {
4774            len += 1;
4775        }
4776        if !self.left_key.is_empty() {
4777            len += 1;
4778        }
4779        if !self.right_key.is_empty() {
4780            len += 1;
4781        }
4782        if self.condition.is_some() {
4783            len += 1;
4784        }
4785        if !self.inequality_pairs.is_empty() {
4786            len += 1;
4787        }
4788        if self.left_table.is_some() {
4789            len += 1;
4790        }
4791        if self.right_table.is_some() {
4792            len += 1;
4793        }
4794        if self.left_degree_table.is_some() {
4795            len += 1;
4796        }
4797        if self.right_degree_table.is_some() {
4798            len += 1;
4799        }
4800        if !self.output_indices.is_empty() {
4801            len += 1;
4802        }
4803        if !self.left_deduped_input_pk_indices.is_empty() {
4804            len += 1;
4805        }
4806        if !self.right_deduped_input_pk_indices.is_empty() {
4807            len += 1;
4808        }
4809        if !self.null_safe.is_empty() {
4810            len += 1;
4811        }
4812        if self.is_append_only {
4813            len += 1;
4814        }
4815        let mut struct_ser = serializer.serialize_struct("stream_plan.HashJoinNode", len)?;
4816        if self.join_type != 0 {
4817            let v = super::plan_common::JoinType::try_from(self.join_type)
4818                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
4819            struct_ser.serialize_field("joinType", &v)?;
4820        }
4821        if !self.left_key.is_empty() {
4822            struct_ser.serialize_field("leftKey", &self.left_key)?;
4823        }
4824        if !self.right_key.is_empty() {
4825            struct_ser.serialize_field("rightKey", &self.right_key)?;
4826        }
4827        if let Some(v) = self.condition.as_ref() {
4828            struct_ser.serialize_field("condition", v)?;
4829        }
4830        if !self.inequality_pairs.is_empty() {
4831            struct_ser.serialize_field("inequalityPairs", &self.inequality_pairs)?;
4832        }
4833        if let Some(v) = self.left_table.as_ref() {
4834            struct_ser.serialize_field("leftTable", v)?;
4835        }
4836        if let Some(v) = self.right_table.as_ref() {
4837            struct_ser.serialize_field("rightTable", v)?;
4838        }
4839        if let Some(v) = self.left_degree_table.as_ref() {
4840            struct_ser.serialize_field("leftDegreeTable", v)?;
4841        }
4842        if let Some(v) = self.right_degree_table.as_ref() {
4843            struct_ser.serialize_field("rightDegreeTable", v)?;
4844        }
4845        if !self.output_indices.is_empty() {
4846            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
4847        }
4848        if !self.left_deduped_input_pk_indices.is_empty() {
4849            struct_ser.serialize_field("leftDedupedInputPkIndices", &self.left_deduped_input_pk_indices)?;
4850        }
4851        if !self.right_deduped_input_pk_indices.is_empty() {
4852            struct_ser.serialize_field("rightDedupedInputPkIndices", &self.right_deduped_input_pk_indices)?;
4853        }
4854        if !self.null_safe.is_empty() {
4855            struct_ser.serialize_field("nullSafe", &self.null_safe)?;
4856        }
4857        if self.is_append_only {
4858            struct_ser.serialize_field("isAppendOnly", &self.is_append_only)?;
4859        }
4860        struct_ser.end()
4861    }
4862}
4863impl<'de> serde::Deserialize<'de> for HashJoinNode {
4864    #[allow(deprecated)]
4865    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4866    where
4867        D: serde::Deserializer<'de>,
4868    {
4869        const FIELDS: &[&str] = &[
4870            "join_type",
4871            "joinType",
4872            "left_key",
4873            "leftKey",
4874            "right_key",
4875            "rightKey",
4876            "condition",
4877            "inequality_pairs",
4878            "inequalityPairs",
4879            "left_table",
4880            "leftTable",
4881            "right_table",
4882            "rightTable",
4883            "left_degree_table",
4884            "leftDegreeTable",
4885            "right_degree_table",
4886            "rightDegreeTable",
4887            "output_indices",
4888            "outputIndices",
4889            "left_deduped_input_pk_indices",
4890            "leftDedupedInputPkIndices",
4891            "right_deduped_input_pk_indices",
4892            "rightDedupedInputPkIndices",
4893            "null_safe",
4894            "nullSafe",
4895            "is_append_only",
4896            "isAppendOnly",
4897        ];
4898
4899        #[allow(clippy::enum_variant_names)]
4900        enum GeneratedField {
4901            JoinType,
4902            LeftKey,
4903            RightKey,
4904            Condition,
4905            InequalityPairs,
4906            LeftTable,
4907            RightTable,
4908            LeftDegreeTable,
4909            RightDegreeTable,
4910            OutputIndices,
4911            LeftDedupedInputPkIndices,
4912            RightDedupedInputPkIndices,
4913            NullSafe,
4914            IsAppendOnly,
4915        }
4916        impl<'de> serde::Deserialize<'de> for GeneratedField {
4917            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
4918            where
4919                D: serde::Deserializer<'de>,
4920            {
4921                struct GeneratedVisitor;
4922
4923                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4924                    type Value = GeneratedField;
4925
4926                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4927                        write!(formatter, "expected one of: {:?}", &FIELDS)
4928                    }
4929
4930                    #[allow(unused_variables)]
4931                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
4932                    where
4933                        E: serde::de::Error,
4934                    {
4935                        match value {
4936                            "joinType" | "join_type" => Ok(GeneratedField::JoinType),
4937                            "leftKey" | "left_key" => Ok(GeneratedField::LeftKey),
4938                            "rightKey" | "right_key" => Ok(GeneratedField::RightKey),
4939                            "condition" => Ok(GeneratedField::Condition),
4940                            "inequalityPairs" | "inequality_pairs" => Ok(GeneratedField::InequalityPairs),
4941                            "leftTable" | "left_table" => Ok(GeneratedField::LeftTable),
4942                            "rightTable" | "right_table" => Ok(GeneratedField::RightTable),
4943                            "leftDegreeTable" | "left_degree_table" => Ok(GeneratedField::LeftDegreeTable),
4944                            "rightDegreeTable" | "right_degree_table" => Ok(GeneratedField::RightDegreeTable),
4945                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
4946                            "leftDedupedInputPkIndices" | "left_deduped_input_pk_indices" => Ok(GeneratedField::LeftDedupedInputPkIndices),
4947                            "rightDedupedInputPkIndices" | "right_deduped_input_pk_indices" => Ok(GeneratedField::RightDedupedInputPkIndices),
4948                            "nullSafe" | "null_safe" => Ok(GeneratedField::NullSafe),
4949                            "isAppendOnly" | "is_append_only" => Ok(GeneratedField::IsAppendOnly),
4950                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
4951                        }
4952                    }
4953                }
4954                deserializer.deserialize_identifier(GeneratedVisitor)
4955            }
4956        }
4957        struct GeneratedVisitor;
4958        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
4959            type Value = HashJoinNode;
4960
4961            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4962                formatter.write_str("struct stream_plan.HashJoinNode")
4963            }
4964
4965            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HashJoinNode, V::Error>
4966                where
4967                    V: serde::de::MapAccess<'de>,
4968            {
4969                let mut join_type__ = None;
4970                let mut left_key__ = None;
4971                let mut right_key__ = None;
4972                let mut condition__ = None;
4973                let mut inequality_pairs__ = None;
4974                let mut left_table__ = None;
4975                let mut right_table__ = None;
4976                let mut left_degree_table__ = None;
4977                let mut right_degree_table__ = None;
4978                let mut output_indices__ = None;
4979                let mut left_deduped_input_pk_indices__ = None;
4980                let mut right_deduped_input_pk_indices__ = None;
4981                let mut null_safe__ = None;
4982                let mut is_append_only__ = None;
4983                while let Some(k) = map_.next_key()? {
4984                    match k {
4985                        GeneratedField::JoinType => {
4986                            if join_type__.is_some() {
4987                                return Err(serde::de::Error::duplicate_field("joinType"));
4988                            }
4989                            join_type__ = Some(map_.next_value::<super::plan_common::JoinType>()? as i32);
4990                        }
4991                        GeneratedField::LeftKey => {
4992                            if left_key__.is_some() {
4993                                return Err(serde::de::Error::duplicate_field("leftKey"));
4994                            }
4995                            left_key__ = 
4996                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
4997                                    .into_iter().map(|x| x.0).collect())
4998                            ;
4999                        }
5000                        GeneratedField::RightKey => {
5001                            if right_key__.is_some() {
5002                                return Err(serde::de::Error::duplicate_field("rightKey"));
5003                            }
5004                            right_key__ = 
5005                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5006                                    .into_iter().map(|x| x.0).collect())
5007                            ;
5008                        }
5009                        GeneratedField::Condition => {
5010                            if condition__.is_some() {
5011                                return Err(serde::de::Error::duplicate_field("condition"));
5012                            }
5013                            condition__ = map_.next_value()?;
5014                        }
5015                        GeneratedField::InequalityPairs => {
5016                            if inequality_pairs__.is_some() {
5017                                return Err(serde::de::Error::duplicate_field("inequalityPairs"));
5018                            }
5019                            inequality_pairs__ = Some(map_.next_value()?);
5020                        }
5021                        GeneratedField::LeftTable => {
5022                            if left_table__.is_some() {
5023                                return Err(serde::de::Error::duplicate_field("leftTable"));
5024                            }
5025                            left_table__ = map_.next_value()?;
5026                        }
5027                        GeneratedField::RightTable => {
5028                            if right_table__.is_some() {
5029                                return Err(serde::de::Error::duplicate_field("rightTable"));
5030                            }
5031                            right_table__ = map_.next_value()?;
5032                        }
5033                        GeneratedField::LeftDegreeTable => {
5034                            if left_degree_table__.is_some() {
5035                                return Err(serde::de::Error::duplicate_field("leftDegreeTable"));
5036                            }
5037                            left_degree_table__ = map_.next_value()?;
5038                        }
5039                        GeneratedField::RightDegreeTable => {
5040                            if right_degree_table__.is_some() {
5041                                return Err(serde::de::Error::duplicate_field("rightDegreeTable"));
5042                            }
5043                            right_degree_table__ = map_.next_value()?;
5044                        }
5045                        GeneratedField::OutputIndices => {
5046                            if output_indices__.is_some() {
5047                                return Err(serde::de::Error::duplicate_field("outputIndices"));
5048                            }
5049                            output_indices__ = 
5050                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5051                                    .into_iter().map(|x| x.0).collect())
5052                            ;
5053                        }
5054                        GeneratedField::LeftDedupedInputPkIndices => {
5055                            if left_deduped_input_pk_indices__.is_some() {
5056                                return Err(serde::de::Error::duplicate_field("leftDedupedInputPkIndices"));
5057                            }
5058                            left_deduped_input_pk_indices__ = 
5059                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5060                                    .into_iter().map(|x| x.0).collect())
5061                            ;
5062                        }
5063                        GeneratedField::RightDedupedInputPkIndices => {
5064                            if right_deduped_input_pk_indices__.is_some() {
5065                                return Err(serde::de::Error::duplicate_field("rightDedupedInputPkIndices"));
5066                            }
5067                            right_deduped_input_pk_indices__ = 
5068                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5069                                    .into_iter().map(|x| x.0).collect())
5070                            ;
5071                        }
5072                        GeneratedField::NullSafe => {
5073                            if null_safe__.is_some() {
5074                                return Err(serde::de::Error::duplicate_field("nullSafe"));
5075                            }
5076                            null_safe__ = Some(map_.next_value()?);
5077                        }
5078                        GeneratedField::IsAppendOnly => {
5079                            if is_append_only__.is_some() {
5080                                return Err(serde::de::Error::duplicate_field("isAppendOnly"));
5081                            }
5082                            is_append_only__ = Some(map_.next_value()?);
5083                        }
5084                    }
5085                }
5086                Ok(HashJoinNode {
5087                    join_type: join_type__.unwrap_or_default(),
5088                    left_key: left_key__.unwrap_or_default(),
5089                    right_key: right_key__.unwrap_or_default(),
5090                    condition: condition__,
5091                    inequality_pairs: inequality_pairs__.unwrap_or_default(),
5092                    left_table: left_table__,
5093                    right_table: right_table__,
5094                    left_degree_table: left_degree_table__,
5095                    right_degree_table: right_degree_table__,
5096                    output_indices: output_indices__.unwrap_or_default(),
5097                    left_deduped_input_pk_indices: left_deduped_input_pk_indices__.unwrap_or_default(),
5098                    right_deduped_input_pk_indices: right_deduped_input_pk_indices__.unwrap_or_default(),
5099                    null_safe: null_safe__.unwrap_or_default(),
5100                    is_append_only: is_append_only__.unwrap_or_default(),
5101                })
5102            }
5103        }
5104        deserializer.deserialize_struct("stream_plan.HashJoinNode", FIELDS, GeneratedVisitor)
5105    }
5106}
5107impl serde::Serialize for HopWindowNode {
5108    #[allow(deprecated)]
5109    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5110    where
5111        S: serde::Serializer,
5112    {
5113        use serde::ser::SerializeStruct;
5114        let mut len = 0;
5115        if self.time_col != 0 {
5116            len += 1;
5117        }
5118        if self.window_slide.is_some() {
5119            len += 1;
5120        }
5121        if self.window_size.is_some() {
5122            len += 1;
5123        }
5124        if !self.output_indices.is_empty() {
5125            len += 1;
5126        }
5127        if !self.window_start_exprs.is_empty() {
5128            len += 1;
5129        }
5130        if !self.window_end_exprs.is_empty() {
5131            len += 1;
5132        }
5133        let mut struct_ser = serializer.serialize_struct("stream_plan.HopWindowNode", len)?;
5134        if self.time_col != 0 {
5135            struct_ser.serialize_field("timeCol", &self.time_col)?;
5136        }
5137        if let Some(v) = self.window_slide.as_ref() {
5138            struct_ser.serialize_field("windowSlide", v)?;
5139        }
5140        if let Some(v) = self.window_size.as_ref() {
5141            struct_ser.serialize_field("windowSize", v)?;
5142        }
5143        if !self.output_indices.is_empty() {
5144            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
5145        }
5146        if !self.window_start_exprs.is_empty() {
5147            struct_ser.serialize_field("windowStartExprs", &self.window_start_exprs)?;
5148        }
5149        if !self.window_end_exprs.is_empty() {
5150            struct_ser.serialize_field("windowEndExprs", &self.window_end_exprs)?;
5151        }
5152        struct_ser.end()
5153    }
5154}
5155impl<'de> serde::Deserialize<'de> for HopWindowNode {
5156    #[allow(deprecated)]
5157    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5158    where
5159        D: serde::Deserializer<'de>,
5160    {
5161        const FIELDS: &[&str] = &[
5162            "time_col",
5163            "timeCol",
5164            "window_slide",
5165            "windowSlide",
5166            "window_size",
5167            "windowSize",
5168            "output_indices",
5169            "outputIndices",
5170            "window_start_exprs",
5171            "windowStartExprs",
5172            "window_end_exprs",
5173            "windowEndExprs",
5174        ];
5175
5176        #[allow(clippy::enum_variant_names)]
5177        enum GeneratedField {
5178            TimeCol,
5179            WindowSlide,
5180            WindowSize,
5181            OutputIndices,
5182            WindowStartExprs,
5183            WindowEndExprs,
5184        }
5185        impl<'de> serde::Deserialize<'de> for GeneratedField {
5186            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5187            where
5188                D: serde::Deserializer<'de>,
5189            {
5190                struct GeneratedVisitor;
5191
5192                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5193                    type Value = GeneratedField;
5194
5195                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5196                        write!(formatter, "expected one of: {:?}", &FIELDS)
5197                    }
5198
5199                    #[allow(unused_variables)]
5200                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5201                    where
5202                        E: serde::de::Error,
5203                    {
5204                        match value {
5205                            "timeCol" | "time_col" => Ok(GeneratedField::TimeCol),
5206                            "windowSlide" | "window_slide" => Ok(GeneratedField::WindowSlide),
5207                            "windowSize" | "window_size" => Ok(GeneratedField::WindowSize),
5208                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
5209                            "windowStartExprs" | "window_start_exprs" => Ok(GeneratedField::WindowStartExprs),
5210                            "windowEndExprs" | "window_end_exprs" => Ok(GeneratedField::WindowEndExprs),
5211                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5212                        }
5213                    }
5214                }
5215                deserializer.deserialize_identifier(GeneratedVisitor)
5216            }
5217        }
5218        struct GeneratedVisitor;
5219        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5220            type Value = HopWindowNode;
5221
5222            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5223                formatter.write_str("struct stream_plan.HopWindowNode")
5224            }
5225
5226            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HopWindowNode, V::Error>
5227                where
5228                    V: serde::de::MapAccess<'de>,
5229            {
5230                let mut time_col__ = None;
5231                let mut window_slide__ = None;
5232                let mut window_size__ = None;
5233                let mut output_indices__ = None;
5234                let mut window_start_exprs__ = None;
5235                let mut window_end_exprs__ = None;
5236                while let Some(k) = map_.next_key()? {
5237                    match k {
5238                        GeneratedField::TimeCol => {
5239                            if time_col__.is_some() {
5240                                return Err(serde::de::Error::duplicate_field("timeCol"));
5241                            }
5242                            time_col__ = 
5243                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5244                            ;
5245                        }
5246                        GeneratedField::WindowSlide => {
5247                            if window_slide__.is_some() {
5248                                return Err(serde::de::Error::duplicate_field("windowSlide"));
5249                            }
5250                            window_slide__ = map_.next_value()?;
5251                        }
5252                        GeneratedField::WindowSize => {
5253                            if window_size__.is_some() {
5254                                return Err(serde::de::Error::duplicate_field("windowSize"));
5255                            }
5256                            window_size__ = map_.next_value()?;
5257                        }
5258                        GeneratedField::OutputIndices => {
5259                            if output_indices__.is_some() {
5260                                return Err(serde::de::Error::duplicate_field("outputIndices"));
5261                            }
5262                            output_indices__ = 
5263                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5264                                    .into_iter().map(|x| x.0).collect())
5265                            ;
5266                        }
5267                        GeneratedField::WindowStartExprs => {
5268                            if window_start_exprs__.is_some() {
5269                                return Err(serde::de::Error::duplicate_field("windowStartExprs"));
5270                            }
5271                            window_start_exprs__ = Some(map_.next_value()?);
5272                        }
5273                        GeneratedField::WindowEndExprs => {
5274                            if window_end_exprs__.is_some() {
5275                                return Err(serde::de::Error::duplicate_field("windowEndExprs"));
5276                            }
5277                            window_end_exprs__ = Some(map_.next_value()?);
5278                        }
5279                    }
5280                }
5281                Ok(HopWindowNode {
5282                    time_col: time_col__.unwrap_or_default(),
5283                    window_slide: window_slide__,
5284                    window_size: window_size__,
5285                    output_indices: output_indices__.unwrap_or_default(),
5286                    window_start_exprs: window_start_exprs__.unwrap_or_default(),
5287                    window_end_exprs: window_end_exprs__.unwrap_or_default(),
5288                })
5289            }
5290        }
5291        deserializer.deserialize_struct("stream_plan.HopWindowNode", FIELDS, GeneratedVisitor)
5292    }
5293}
5294impl serde::Serialize for InequalityPair {
5295    #[allow(deprecated)]
5296    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5297    where
5298        S: serde::Serializer,
5299    {
5300        use serde::ser::SerializeStruct;
5301        let mut len = 0;
5302        if self.key_required_larger != 0 {
5303            len += 1;
5304        }
5305        if self.key_required_smaller != 0 {
5306            len += 1;
5307        }
5308        if self.clean_state {
5309            len += 1;
5310        }
5311        if self.delta_expression.is_some() {
5312            len += 1;
5313        }
5314        let mut struct_ser = serializer.serialize_struct("stream_plan.InequalityPair", len)?;
5315        if self.key_required_larger != 0 {
5316            struct_ser.serialize_field("keyRequiredLarger", &self.key_required_larger)?;
5317        }
5318        if self.key_required_smaller != 0 {
5319            struct_ser.serialize_field("keyRequiredSmaller", &self.key_required_smaller)?;
5320        }
5321        if self.clean_state {
5322            struct_ser.serialize_field("cleanState", &self.clean_state)?;
5323        }
5324        if let Some(v) = self.delta_expression.as_ref() {
5325            struct_ser.serialize_field("deltaExpression", v)?;
5326        }
5327        struct_ser.end()
5328    }
5329}
5330impl<'de> serde::Deserialize<'de> for InequalityPair {
5331    #[allow(deprecated)]
5332    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5333    where
5334        D: serde::Deserializer<'de>,
5335    {
5336        const FIELDS: &[&str] = &[
5337            "key_required_larger",
5338            "keyRequiredLarger",
5339            "key_required_smaller",
5340            "keyRequiredSmaller",
5341            "clean_state",
5342            "cleanState",
5343            "delta_expression",
5344            "deltaExpression",
5345        ];
5346
5347        #[allow(clippy::enum_variant_names)]
5348        enum GeneratedField {
5349            KeyRequiredLarger,
5350            KeyRequiredSmaller,
5351            CleanState,
5352            DeltaExpression,
5353        }
5354        impl<'de> serde::Deserialize<'de> for GeneratedField {
5355            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5356            where
5357                D: serde::Deserializer<'de>,
5358            {
5359                struct GeneratedVisitor;
5360
5361                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5362                    type Value = GeneratedField;
5363
5364                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5365                        write!(formatter, "expected one of: {:?}", &FIELDS)
5366                    }
5367
5368                    #[allow(unused_variables)]
5369                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5370                    where
5371                        E: serde::de::Error,
5372                    {
5373                        match value {
5374                            "keyRequiredLarger" | "key_required_larger" => Ok(GeneratedField::KeyRequiredLarger),
5375                            "keyRequiredSmaller" | "key_required_smaller" => Ok(GeneratedField::KeyRequiredSmaller),
5376                            "cleanState" | "clean_state" => Ok(GeneratedField::CleanState),
5377                            "deltaExpression" | "delta_expression" => Ok(GeneratedField::DeltaExpression),
5378                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5379                        }
5380                    }
5381                }
5382                deserializer.deserialize_identifier(GeneratedVisitor)
5383            }
5384        }
5385        struct GeneratedVisitor;
5386        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5387            type Value = InequalityPair;
5388
5389            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5390                formatter.write_str("struct stream_plan.InequalityPair")
5391            }
5392
5393            fn visit_map<V>(self, mut map_: V) -> std::result::Result<InequalityPair, V::Error>
5394                where
5395                    V: serde::de::MapAccess<'de>,
5396            {
5397                let mut key_required_larger__ = None;
5398                let mut key_required_smaller__ = None;
5399                let mut clean_state__ = None;
5400                let mut delta_expression__ = None;
5401                while let Some(k) = map_.next_key()? {
5402                    match k {
5403                        GeneratedField::KeyRequiredLarger => {
5404                            if key_required_larger__.is_some() {
5405                                return Err(serde::de::Error::duplicate_field("keyRequiredLarger"));
5406                            }
5407                            key_required_larger__ = 
5408                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5409                            ;
5410                        }
5411                        GeneratedField::KeyRequiredSmaller => {
5412                            if key_required_smaller__.is_some() {
5413                                return Err(serde::de::Error::duplicate_field("keyRequiredSmaller"));
5414                            }
5415                            key_required_smaller__ = 
5416                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5417                            ;
5418                        }
5419                        GeneratedField::CleanState => {
5420                            if clean_state__.is_some() {
5421                                return Err(serde::de::Error::duplicate_field("cleanState"));
5422                            }
5423                            clean_state__ = Some(map_.next_value()?);
5424                        }
5425                        GeneratedField::DeltaExpression => {
5426                            if delta_expression__.is_some() {
5427                                return Err(serde::de::Error::duplicate_field("deltaExpression"));
5428                            }
5429                            delta_expression__ = map_.next_value()?;
5430                        }
5431                    }
5432                }
5433                Ok(InequalityPair {
5434                    key_required_larger: key_required_larger__.unwrap_or_default(),
5435                    key_required_smaller: key_required_smaller__.unwrap_or_default(),
5436                    clean_state: clean_state__.unwrap_or_default(),
5437                    delta_expression: delta_expression__,
5438                })
5439            }
5440        }
5441        deserializer.deserialize_struct("stream_plan.InequalityPair", FIELDS, GeneratedVisitor)
5442    }
5443}
5444impl serde::Serialize for LocalApproxPercentileNode {
5445    #[allow(deprecated)]
5446    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5447    where
5448        S: serde::Serializer,
5449    {
5450        use serde::ser::SerializeStruct;
5451        let mut len = 0;
5452        if self.base != 0. {
5453            len += 1;
5454        }
5455        if self.percentile_index != 0 {
5456            len += 1;
5457        }
5458        let mut struct_ser = serializer.serialize_struct("stream_plan.LocalApproxPercentileNode", len)?;
5459        if self.base != 0. {
5460            struct_ser.serialize_field("base", &self.base)?;
5461        }
5462        if self.percentile_index != 0 {
5463            struct_ser.serialize_field("percentileIndex", &self.percentile_index)?;
5464        }
5465        struct_ser.end()
5466    }
5467}
5468impl<'de> serde::Deserialize<'de> for LocalApproxPercentileNode {
5469    #[allow(deprecated)]
5470    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5471    where
5472        D: serde::Deserializer<'de>,
5473    {
5474        const FIELDS: &[&str] = &[
5475            "base",
5476            "percentile_index",
5477            "percentileIndex",
5478        ];
5479
5480        #[allow(clippy::enum_variant_names)]
5481        enum GeneratedField {
5482            Base,
5483            PercentileIndex,
5484        }
5485        impl<'de> serde::Deserialize<'de> for GeneratedField {
5486            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5487            where
5488                D: serde::Deserializer<'de>,
5489            {
5490                struct GeneratedVisitor;
5491
5492                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5493                    type Value = GeneratedField;
5494
5495                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5496                        write!(formatter, "expected one of: {:?}", &FIELDS)
5497                    }
5498
5499                    #[allow(unused_variables)]
5500                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5501                    where
5502                        E: serde::de::Error,
5503                    {
5504                        match value {
5505                            "base" => Ok(GeneratedField::Base),
5506                            "percentileIndex" | "percentile_index" => Ok(GeneratedField::PercentileIndex),
5507                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5508                        }
5509                    }
5510                }
5511                deserializer.deserialize_identifier(GeneratedVisitor)
5512            }
5513        }
5514        struct GeneratedVisitor;
5515        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5516            type Value = LocalApproxPercentileNode;
5517
5518            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5519                formatter.write_str("struct stream_plan.LocalApproxPercentileNode")
5520            }
5521
5522            fn visit_map<V>(self, mut map_: V) -> std::result::Result<LocalApproxPercentileNode, V::Error>
5523                where
5524                    V: serde::de::MapAccess<'de>,
5525            {
5526                let mut base__ = None;
5527                let mut percentile_index__ = None;
5528                while let Some(k) = map_.next_key()? {
5529                    match k {
5530                        GeneratedField::Base => {
5531                            if base__.is_some() {
5532                                return Err(serde::de::Error::duplicate_field("base"));
5533                            }
5534                            base__ = 
5535                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5536                            ;
5537                        }
5538                        GeneratedField::PercentileIndex => {
5539                            if percentile_index__.is_some() {
5540                                return Err(serde::de::Error::duplicate_field("percentileIndex"));
5541                            }
5542                            percentile_index__ = 
5543                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5544                            ;
5545                        }
5546                    }
5547                }
5548                Ok(LocalApproxPercentileNode {
5549                    base: base__.unwrap_or_default(),
5550                    percentile_index: percentile_index__.unwrap_or_default(),
5551                })
5552            }
5553        }
5554        deserializer.deserialize_struct("stream_plan.LocalApproxPercentileNode", FIELDS, GeneratedVisitor)
5555    }
5556}
5557impl serde::Serialize for LookupNode {
5558    #[allow(deprecated)]
5559    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5560    where
5561        S: serde::Serializer,
5562    {
5563        use serde::ser::SerializeStruct;
5564        let mut len = 0;
5565        if !self.arrange_key.is_empty() {
5566            len += 1;
5567        }
5568        if !self.stream_key.is_empty() {
5569            len += 1;
5570        }
5571        if self.use_current_epoch {
5572            len += 1;
5573        }
5574        if !self.column_mapping.is_empty() {
5575            len += 1;
5576        }
5577        if self.arrangement_table_info.is_some() {
5578            len += 1;
5579        }
5580        if self.arrangement_table_id.is_some() {
5581            len += 1;
5582        }
5583        let mut struct_ser = serializer.serialize_struct("stream_plan.LookupNode", len)?;
5584        if !self.arrange_key.is_empty() {
5585            struct_ser.serialize_field("arrangeKey", &self.arrange_key)?;
5586        }
5587        if !self.stream_key.is_empty() {
5588            struct_ser.serialize_field("streamKey", &self.stream_key)?;
5589        }
5590        if self.use_current_epoch {
5591            struct_ser.serialize_field("useCurrentEpoch", &self.use_current_epoch)?;
5592        }
5593        if !self.column_mapping.is_empty() {
5594            struct_ser.serialize_field("columnMapping", &self.column_mapping)?;
5595        }
5596        if let Some(v) = self.arrangement_table_info.as_ref() {
5597            struct_ser.serialize_field("arrangementTableInfo", v)?;
5598        }
5599        if let Some(v) = self.arrangement_table_id.as_ref() {
5600            match v {
5601                lookup_node::ArrangementTableId::TableId(v) => {
5602                    struct_ser.serialize_field("tableId", v)?;
5603                }
5604                lookup_node::ArrangementTableId::IndexId(v) => {
5605                    struct_ser.serialize_field("indexId", v)?;
5606                }
5607            }
5608        }
5609        struct_ser.end()
5610    }
5611}
5612impl<'de> serde::Deserialize<'de> for LookupNode {
5613    #[allow(deprecated)]
5614    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5615    where
5616        D: serde::Deserializer<'de>,
5617    {
5618        const FIELDS: &[&str] = &[
5619            "arrange_key",
5620            "arrangeKey",
5621            "stream_key",
5622            "streamKey",
5623            "use_current_epoch",
5624            "useCurrentEpoch",
5625            "column_mapping",
5626            "columnMapping",
5627            "arrangement_table_info",
5628            "arrangementTableInfo",
5629            "table_id",
5630            "tableId",
5631            "index_id",
5632            "indexId",
5633        ];
5634
5635        #[allow(clippy::enum_variant_names)]
5636        enum GeneratedField {
5637            ArrangeKey,
5638            StreamKey,
5639            UseCurrentEpoch,
5640            ColumnMapping,
5641            ArrangementTableInfo,
5642            TableId,
5643            IndexId,
5644        }
5645        impl<'de> serde::Deserialize<'de> for GeneratedField {
5646            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5647            where
5648                D: serde::Deserializer<'de>,
5649            {
5650                struct GeneratedVisitor;
5651
5652                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5653                    type Value = GeneratedField;
5654
5655                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5656                        write!(formatter, "expected one of: {:?}", &FIELDS)
5657                    }
5658
5659                    #[allow(unused_variables)]
5660                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5661                    where
5662                        E: serde::de::Error,
5663                    {
5664                        match value {
5665                            "arrangeKey" | "arrange_key" => Ok(GeneratedField::ArrangeKey),
5666                            "streamKey" | "stream_key" => Ok(GeneratedField::StreamKey),
5667                            "useCurrentEpoch" | "use_current_epoch" => Ok(GeneratedField::UseCurrentEpoch),
5668                            "columnMapping" | "column_mapping" => Ok(GeneratedField::ColumnMapping),
5669                            "arrangementTableInfo" | "arrangement_table_info" => Ok(GeneratedField::ArrangementTableInfo),
5670                            "tableId" | "table_id" => Ok(GeneratedField::TableId),
5671                            "indexId" | "index_id" => Ok(GeneratedField::IndexId),
5672                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5673                        }
5674                    }
5675                }
5676                deserializer.deserialize_identifier(GeneratedVisitor)
5677            }
5678        }
5679        struct GeneratedVisitor;
5680        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5681            type Value = LookupNode;
5682
5683            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5684                formatter.write_str("struct stream_plan.LookupNode")
5685            }
5686
5687            fn visit_map<V>(self, mut map_: V) -> std::result::Result<LookupNode, V::Error>
5688                where
5689                    V: serde::de::MapAccess<'de>,
5690            {
5691                let mut arrange_key__ = None;
5692                let mut stream_key__ = None;
5693                let mut use_current_epoch__ = None;
5694                let mut column_mapping__ = None;
5695                let mut arrangement_table_info__ = None;
5696                let mut arrangement_table_id__ = None;
5697                while let Some(k) = map_.next_key()? {
5698                    match k {
5699                        GeneratedField::ArrangeKey => {
5700                            if arrange_key__.is_some() {
5701                                return Err(serde::de::Error::duplicate_field("arrangeKey"));
5702                            }
5703                            arrange_key__ = 
5704                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5705                                    .into_iter().map(|x| x.0).collect())
5706                            ;
5707                        }
5708                        GeneratedField::StreamKey => {
5709                            if stream_key__.is_some() {
5710                                return Err(serde::de::Error::duplicate_field("streamKey"));
5711                            }
5712                            stream_key__ = 
5713                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5714                                    .into_iter().map(|x| x.0).collect())
5715                            ;
5716                        }
5717                        GeneratedField::UseCurrentEpoch => {
5718                            if use_current_epoch__.is_some() {
5719                                return Err(serde::de::Error::duplicate_field("useCurrentEpoch"));
5720                            }
5721                            use_current_epoch__ = Some(map_.next_value()?);
5722                        }
5723                        GeneratedField::ColumnMapping => {
5724                            if column_mapping__.is_some() {
5725                                return Err(serde::de::Error::duplicate_field("columnMapping"));
5726                            }
5727                            column_mapping__ = 
5728                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5729                                    .into_iter().map(|x| x.0).collect())
5730                            ;
5731                        }
5732                        GeneratedField::ArrangementTableInfo => {
5733                            if arrangement_table_info__.is_some() {
5734                                return Err(serde::de::Error::duplicate_field("arrangementTableInfo"));
5735                            }
5736                            arrangement_table_info__ = map_.next_value()?;
5737                        }
5738                        GeneratedField::TableId => {
5739                            if arrangement_table_id__.is_some() {
5740                                return Err(serde::de::Error::duplicate_field("tableId"));
5741                            }
5742                            arrangement_table_id__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| lookup_node::ArrangementTableId::TableId(x.0));
5743                        }
5744                        GeneratedField::IndexId => {
5745                            if arrangement_table_id__.is_some() {
5746                                return Err(serde::de::Error::duplicate_field("indexId"));
5747                            }
5748                            arrangement_table_id__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| lookup_node::ArrangementTableId::IndexId(x.0));
5749                        }
5750                    }
5751                }
5752                Ok(LookupNode {
5753                    arrange_key: arrange_key__.unwrap_or_default(),
5754                    stream_key: stream_key__.unwrap_or_default(),
5755                    use_current_epoch: use_current_epoch__.unwrap_or_default(),
5756                    column_mapping: column_mapping__.unwrap_or_default(),
5757                    arrangement_table_info: arrangement_table_info__,
5758                    arrangement_table_id: arrangement_table_id__,
5759                })
5760            }
5761        }
5762        deserializer.deserialize_struct("stream_plan.LookupNode", FIELDS, GeneratedVisitor)
5763    }
5764}
5765impl serde::Serialize for LookupUnionNode {
5766    #[allow(deprecated)]
5767    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5768    where
5769        S: serde::Serializer,
5770    {
5771        use serde::ser::SerializeStruct;
5772        let mut len = 0;
5773        if !self.order.is_empty() {
5774            len += 1;
5775        }
5776        let mut struct_ser = serializer.serialize_struct("stream_plan.LookupUnionNode", len)?;
5777        if !self.order.is_empty() {
5778            struct_ser.serialize_field("order", &self.order)?;
5779        }
5780        struct_ser.end()
5781    }
5782}
5783impl<'de> serde::Deserialize<'de> for LookupUnionNode {
5784    #[allow(deprecated)]
5785    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5786    where
5787        D: serde::Deserializer<'de>,
5788    {
5789        const FIELDS: &[&str] = &[
5790            "order",
5791        ];
5792
5793        #[allow(clippy::enum_variant_names)]
5794        enum GeneratedField {
5795            Order,
5796        }
5797        impl<'de> serde::Deserialize<'de> for GeneratedField {
5798            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5799            where
5800                D: serde::Deserializer<'de>,
5801            {
5802                struct GeneratedVisitor;
5803
5804                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5805                    type Value = GeneratedField;
5806
5807                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5808                        write!(formatter, "expected one of: {:?}", &FIELDS)
5809                    }
5810
5811                    #[allow(unused_variables)]
5812                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5813                    where
5814                        E: serde::de::Error,
5815                    {
5816                        match value {
5817                            "order" => Ok(GeneratedField::Order),
5818                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5819                        }
5820                    }
5821                }
5822                deserializer.deserialize_identifier(GeneratedVisitor)
5823            }
5824        }
5825        struct GeneratedVisitor;
5826        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5827            type Value = LookupUnionNode;
5828
5829            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5830                formatter.write_str("struct stream_plan.LookupUnionNode")
5831            }
5832
5833            fn visit_map<V>(self, mut map_: V) -> std::result::Result<LookupUnionNode, V::Error>
5834                where
5835                    V: serde::de::MapAccess<'de>,
5836            {
5837                let mut order__ = None;
5838                while let Some(k) = map_.next_key()? {
5839                    match k {
5840                        GeneratedField::Order => {
5841                            if order__.is_some() {
5842                                return Err(serde::de::Error::duplicate_field("order"));
5843                            }
5844                            order__ = 
5845                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
5846                                    .into_iter().map(|x| x.0).collect())
5847                            ;
5848                        }
5849                    }
5850                }
5851                Ok(LookupUnionNode {
5852                    order: order__.unwrap_or_default(),
5853                })
5854            }
5855        }
5856        deserializer.deserialize_struct("stream_plan.LookupUnionNode", FIELDS, GeneratedVisitor)
5857    }
5858}
5859impl serde::Serialize for MaterializeNode {
5860    #[allow(deprecated)]
5861    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5862    where
5863        S: serde::Serializer,
5864    {
5865        use serde::ser::SerializeStruct;
5866        let mut len = 0;
5867        if self.table_id != 0 {
5868            len += 1;
5869        }
5870        if !self.column_orders.is_empty() {
5871            len += 1;
5872        }
5873        if self.table.is_some() {
5874            len += 1;
5875        }
5876        let mut struct_ser = serializer.serialize_struct("stream_plan.MaterializeNode", len)?;
5877        if self.table_id != 0 {
5878            struct_ser.serialize_field("tableId", &self.table_id)?;
5879        }
5880        if !self.column_orders.is_empty() {
5881            struct_ser.serialize_field("columnOrders", &self.column_orders)?;
5882        }
5883        if let Some(v) = self.table.as_ref() {
5884            struct_ser.serialize_field("table", v)?;
5885        }
5886        struct_ser.end()
5887    }
5888}
5889impl<'de> serde::Deserialize<'de> for MaterializeNode {
5890    #[allow(deprecated)]
5891    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5892    where
5893        D: serde::Deserializer<'de>,
5894    {
5895        const FIELDS: &[&str] = &[
5896            "table_id",
5897            "tableId",
5898            "column_orders",
5899            "columnOrders",
5900            "table",
5901        ];
5902
5903        #[allow(clippy::enum_variant_names)]
5904        enum GeneratedField {
5905            TableId,
5906            ColumnOrders,
5907            Table,
5908        }
5909        impl<'de> serde::Deserialize<'de> for GeneratedField {
5910            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
5911            where
5912                D: serde::Deserializer<'de>,
5913            {
5914                struct GeneratedVisitor;
5915
5916                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5917                    type Value = GeneratedField;
5918
5919                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5920                        write!(formatter, "expected one of: {:?}", &FIELDS)
5921                    }
5922
5923                    #[allow(unused_variables)]
5924                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
5925                    where
5926                        E: serde::de::Error,
5927                    {
5928                        match value {
5929                            "tableId" | "table_id" => Ok(GeneratedField::TableId),
5930                            "columnOrders" | "column_orders" => Ok(GeneratedField::ColumnOrders),
5931                            "table" => Ok(GeneratedField::Table),
5932                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
5933                        }
5934                    }
5935                }
5936                deserializer.deserialize_identifier(GeneratedVisitor)
5937            }
5938        }
5939        struct GeneratedVisitor;
5940        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
5941            type Value = MaterializeNode;
5942
5943            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5944                formatter.write_str("struct stream_plan.MaterializeNode")
5945            }
5946
5947            fn visit_map<V>(self, mut map_: V) -> std::result::Result<MaterializeNode, V::Error>
5948                where
5949                    V: serde::de::MapAccess<'de>,
5950            {
5951                let mut table_id__ = None;
5952                let mut column_orders__ = None;
5953                let mut table__ = None;
5954                while let Some(k) = map_.next_key()? {
5955                    match k {
5956                        GeneratedField::TableId => {
5957                            if table_id__.is_some() {
5958                                return Err(serde::de::Error::duplicate_field("tableId"));
5959                            }
5960                            table_id__ = 
5961                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
5962                            ;
5963                        }
5964                        GeneratedField::ColumnOrders => {
5965                            if column_orders__.is_some() {
5966                                return Err(serde::de::Error::duplicate_field("columnOrders"));
5967                            }
5968                            column_orders__ = Some(map_.next_value()?);
5969                        }
5970                        GeneratedField::Table => {
5971                            if table__.is_some() {
5972                                return Err(serde::de::Error::duplicate_field("table"));
5973                            }
5974                            table__ = map_.next_value()?;
5975                        }
5976                    }
5977                }
5978                Ok(MaterializeNode {
5979                    table_id: table_id__.unwrap_or_default(),
5980                    column_orders: column_orders__.unwrap_or_default(),
5981                    table: table__,
5982                })
5983            }
5984        }
5985        deserializer.deserialize_struct("stream_plan.MaterializeNode", FIELDS, GeneratedVisitor)
5986    }
5987}
5988impl serde::Serialize for MaterializedExprsNode {
5989    #[allow(deprecated)]
5990    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5991    where
5992        S: serde::Serializer,
5993    {
5994        use serde::ser::SerializeStruct;
5995        let mut len = 0;
5996        if !self.exprs.is_empty() {
5997            len += 1;
5998        }
5999        if self.state_table.is_some() {
6000            len += 1;
6001        }
6002        if self.state_clean_col_idx.is_some() {
6003            len += 1;
6004        }
6005        let mut struct_ser = serializer.serialize_struct("stream_plan.MaterializedExprsNode", len)?;
6006        if !self.exprs.is_empty() {
6007            struct_ser.serialize_field("exprs", &self.exprs)?;
6008        }
6009        if let Some(v) = self.state_table.as_ref() {
6010            struct_ser.serialize_field("stateTable", v)?;
6011        }
6012        if let Some(v) = self.state_clean_col_idx.as_ref() {
6013            struct_ser.serialize_field("stateCleanColIdx", v)?;
6014        }
6015        struct_ser.end()
6016    }
6017}
6018impl<'de> serde::Deserialize<'de> for MaterializedExprsNode {
6019    #[allow(deprecated)]
6020    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6021    where
6022        D: serde::Deserializer<'de>,
6023    {
6024        const FIELDS: &[&str] = &[
6025            "exprs",
6026            "state_table",
6027            "stateTable",
6028            "state_clean_col_idx",
6029            "stateCleanColIdx",
6030        ];
6031
6032        #[allow(clippy::enum_variant_names)]
6033        enum GeneratedField {
6034            Exprs,
6035            StateTable,
6036            StateCleanColIdx,
6037        }
6038        impl<'de> serde::Deserialize<'de> for GeneratedField {
6039            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6040            where
6041                D: serde::Deserializer<'de>,
6042            {
6043                struct GeneratedVisitor;
6044
6045                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6046                    type Value = GeneratedField;
6047
6048                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6049                        write!(formatter, "expected one of: {:?}", &FIELDS)
6050                    }
6051
6052                    #[allow(unused_variables)]
6053                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6054                    where
6055                        E: serde::de::Error,
6056                    {
6057                        match value {
6058                            "exprs" => Ok(GeneratedField::Exprs),
6059                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
6060                            "stateCleanColIdx" | "state_clean_col_idx" => Ok(GeneratedField::StateCleanColIdx),
6061                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6062                        }
6063                    }
6064                }
6065                deserializer.deserialize_identifier(GeneratedVisitor)
6066            }
6067        }
6068        struct GeneratedVisitor;
6069        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6070            type Value = MaterializedExprsNode;
6071
6072            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6073                formatter.write_str("struct stream_plan.MaterializedExprsNode")
6074            }
6075
6076            fn visit_map<V>(self, mut map_: V) -> std::result::Result<MaterializedExprsNode, V::Error>
6077                where
6078                    V: serde::de::MapAccess<'de>,
6079            {
6080                let mut exprs__ = None;
6081                let mut state_table__ = None;
6082                let mut state_clean_col_idx__ = None;
6083                while let Some(k) = map_.next_key()? {
6084                    match k {
6085                        GeneratedField::Exprs => {
6086                            if exprs__.is_some() {
6087                                return Err(serde::de::Error::duplicate_field("exprs"));
6088                            }
6089                            exprs__ = Some(map_.next_value()?);
6090                        }
6091                        GeneratedField::StateTable => {
6092                            if state_table__.is_some() {
6093                                return Err(serde::de::Error::duplicate_field("stateTable"));
6094                            }
6095                            state_table__ = map_.next_value()?;
6096                        }
6097                        GeneratedField::StateCleanColIdx => {
6098                            if state_clean_col_idx__.is_some() {
6099                                return Err(serde::de::Error::duplicate_field("stateCleanColIdx"));
6100                            }
6101                            state_clean_col_idx__ = 
6102                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
6103                            ;
6104                        }
6105                    }
6106                }
6107                Ok(MaterializedExprsNode {
6108                    exprs: exprs__.unwrap_or_default(),
6109                    state_table: state_table__,
6110                    state_clean_col_idx: state_clean_col_idx__,
6111                })
6112            }
6113        }
6114        deserializer.deserialize_struct("stream_plan.MaterializedExprsNode", FIELDS, GeneratedVisitor)
6115    }
6116}
6117impl serde::Serialize for MergeNode {
6118    #[allow(deprecated)]
6119    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6120    where
6121        S: serde::Serializer,
6122    {
6123        use serde::ser::SerializeStruct;
6124        let mut len = 0;
6125        if !self.upstream_actor_id.is_empty() {
6126            len += 1;
6127        }
6128        if self.upstream_fragment_id != 0 {
6129            len += 1;
6130        }
6131        if self.upstream_dispatcher_type != 0 {
6132            len += 1;
6133        }
6134        if !self.fields.is_empty() {
6135            len += 1;
6136        }
6137        let mut struct_ser = serializer.serialize_struct("stream_plan.MergeNode", len)?;
6138        if !self.upstream_actor_id.is_empty() {
6139            struct_ser.serialize_field("upstreamActorId", &self.upstream_actor_id)?;
6140        }
6141        if self.upstream_fragment_id != 0 {
6142            struct_ser.serialize_field("upstreamFragmentId", &self.upstream_fragment_id)?;
6143        }
6144        if self.upstream_dispatcher_type != 0 {
6145            let v = DispatcherType::try_from(self.upstream_dispatcher_type)
6146                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.upstream_dispatcher_type)))?;
6147            struct_ser.serialize_field("upstreamDispatcherType", &v)?;
6148        }
6149        if !self.fields.is_empty() {
6150            struct_ser.serialize_field("fields", &self.fields)?;
6151        }
6152        struct_ser.end()
6153    }
6154}
6155impl<'de> serde::Deserialize<'de> for MergeNode {
6156    #[allow(deprecated)]
6157    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6158    where
6159        D: serde::Deserializer<'de>,
6160    {
6161        const FIELDS: &[&str] = &[
6162            "upstream_actor_id",
6163            "upstreamActorId",
6164            "upstream_fragment_id",
6165            "upstreamFragmentId",
6166            "upstream_dispatcher_type",
6167            "upstreamDispatcherType",
6168            "fields",
6169        ];
6170
6171        #[allow(clippy::enum_variant_names)]
6172        enum GeneratedField {
6173            UpstreamActorId,
6174            UpstreamFragmentId,
6175            UpstreamDispatcherType,
6176            Fields,
6177        }
6178        impl<'de> serde::Deserialize<'de> for GeneratedField {
6179            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6180            where
6181                D: serde::Deserializer<'de>,
6182            {
6183                struct GeneratedVisitor;
6184
6185                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6186                    type Value = GeneratedField;
6187
6188                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6189                        write!(formatter, "expected one of: {:?}", &FIELDS)
6190                    }
6191
6192                    #[allow(unused_variables)]
6193                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6194                    where
6195                        E: serde::de::Error,
6196                    {
6197                        match value {
6198                            "upstreamActorId" | "upstream_actor_id" => Ok(GeneratedField::UpstreamActorId),
6199                            "upstreamFragmentId" | "upstream_fragment_id" => Ok(GeneratedField::UpstreamFragmentId),
6200                            "upstreamDispatcherType" | "upstream_dispatcher_type" => Ok(GeneratedField::UpstreamDispatcherType),
6201                            "fields" => Ok(GeneratedField::Fields),
6202                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6203                        }
6204                    }
6205                }
6206                deserializer.deserialize_identifier(GeneratedVisitor)
6207            }
6208        }
6209        struct GeneratedVisitor;
6210        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6211            type Value = MergeNode;
6212
6213            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6214                formatter.write_str("struct stream_plan.MergeNode")
6215            }
6216
6217            fn visit_map<V>(self, mut map_: V) -> std::result::Result<MergeNode, V::Error>
6218                where
6219                    V: serde::de::MapAccess<'de>,
6220            {
6221                let mut upstream_actor_id__ = None;
6222                let mut upstream_fragment_id__ = None;
6223                let mut upstream_dispatcher_type__ = None;
6224                let mut fields__ = None;
6225                while let Some(k) = map_.next_key()? {
6226                    match k {
6227                        GeneratedField::UpstreamActorId => {
6228                            if upstream_actor_id__.is_some() {
6229                                return Err(serde::de::Error::duplicate_field("upstreamActorId"));
6230                            }
6231                            upstream_actor_id__ = 
6232                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
6233                                    .into_iter().map(|x| x.0).collect())
6234                            ;
6235                        }
6236                        GeneratedField::UpstreamFragmentId => {
6237                            if upstream_fragment_id__.is_some() {
6238                                return Err(serde::de::Error::duplicate_field("upstreamFragmentId"));
6239                            }
6240                            upstream_fragment_id__ = 
6241                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
6242                            ;
6243                        }
6244                        GeneratedField::UpstreamDispatcherType => {
6245                            if upstream_dispatcher_type__.is_some() {
6246                                return Err(serde::de::Error::duplicate_field("upstreamDispatcherType"));
6247                            }
6248                            upstream_dispatcher_type__ = Some(map_.next_value::<DispatcherType>()? as i32);
6249                        }
6250                        GeneratedField::Fields => {
6251                            if fields__.is_some() {
6252                                return Err(serde::de::Error::duplicate_field("fields"));
6253                            }
6254                            fields__ = Some(map_.next_value()?);
6255                        }
6256                    }
6257                }
6258                Ok(MergeNode {
6259                    upstream_actor_id: upstream_actor_id__.unwrap_or_default(),
6260                    upstream_fragment_id: upstream_fragment_id__.unwrap_or_default(),
6261                    upstream_dispatcher_type: upstream_dispatcher_type__.unwrap_or_default(),
6262                    fields: fields__.unwrap_or_default(),
6263                })
6264            }
6265        }
6266        deserializer.deserialize_struct("stream_plan.MergeNode", FIELDS, GeneratedVisitor)
6267    }
6268}
6269impl serde::Serialize for NoOpNode {
6270    #[allow(deprecated)]
6271    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6272    where
6273        S: serde::Serializer,
6274    {
6275        use serde::ser::SerializeStruct;
6276        let len = 0;
6277        let struct_ser = serializer.serialize_struct("stream_plan.NoOpNode", len)?;
6278        struct_ser.end()
6279    }
6280}
6281impl<'de> serde::Deserialize<'de> for NoOpNode {
6282    #[allow(deprecated)]
6283    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6284    where
6285        D: serde::Deserializer<'de>,
6286    {
6287        const FIELDS: &[&str] = &[
6288        ];
6289
6290        #[allow(clippy::enum_variant_names)]
6291        enum GeneratedField {
6292        }
6293        impl<'de> serde::Deserialize<'de> for GeneratedField {
6294            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6295            where
6296                D: serde::Deserializer<'de>,
6297            {
6298                struct GeneratedVisitor;
6299
6300                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6301                    type Value = GeneratedField;
6302
6303                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6304                        write!(formatter, "expected one of: {:?}", &FIELDS)
6305                    }
6306
6307                    #[allow(unused_variables)]
6308                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6309                    where
6310                        E: serde::de::Error,
6311                    {
6312                            Err(serde::de::Error::unknown_field(value, FIELDS))
6313                    }
6314                }
6315                deserializer.deserialize_identifier(GeneratedVisitor)
6316            }
6317        }
6318        struct GeneratedVisitor;
6319        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6320            type Value = NoOpNode;
6321
6322            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6323                formatter.write_str("struct stream_plan.NoOpNode")
6324            }
6325
6326            fn visit_map<V>(self, mut map_: V) -> std::result::Result<NoOpNode, V::Error>
6327                where
6328                    V: serde::de::MapAccess<'de>,
6329            {
6330                while map_.next_key::<GeneratedField>()?.is_some() {
6331                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
6332                }
6333                Ok(NoOpNode {
6334                })
6335            }
6336        }
6337        deserializer.deserialize_struct("stream_plan.NoOpNode", FIELDS, GeneratedVisitor)
6338    }
6339}
6340impl serde::Serialize for NowModeGenerateSeries {
6341    #[allow(deprecated)]
6342    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6343    where
6344        S: serde::Serializer,
6345    {
6346        use serde::ser::SerializeStruct;
6347        let mut len = 0;
6348        if self.start_timestamp.is_some() {
6349            len += 1;
6350        }
6351        if self.interval.is_some() {
6352            len += 1;
6353        }
6354        let mut struct_ser = serializer.serialize_struct("stream_plan.NowModeGenerateSeries", len)?;
6355        if let Some(v) = self.start_timestamp.as_ref() {
6356            struct_ser.serialize_field("startTimestamp", v)?;
6357        }
6358        if let Some(v) = self.interval.as_ref() {
6359            struct_ser.serialize_field("interval", v)?;
6360        }
6361        struct_ser.end()
6362    }
6363}
6364impl<'de> serde::Deserialize<'de> for NowModeGenerateSeries {
6365    #[allow(deprecated)]
6366    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6367    where
6368        D: serde::Deserializer<'de>,
6369    {
6370        const FIELDS: &[&str] = &[
6371            "start_timestamp",
6372            "startTimestamp",
6373            "interval",
6374        ];
6375
6376        #[allow(clippy::enum_variant_names)]
6377        enum GeneratedField {
6378            StartTimestamp,
6379            Interval,
6380        }
6381        impl<'de> serde::Deserialize<'de> for GeneratedField {
6382            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6383            where
6384                D: serde::Deserializer<'de>,
6385            {
6386                struct GeneratedVisitor;
6387
6388                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6389                    type Value = GeneratedField;
6390
6391                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6392                        write!(formatter, "expected one of: {:?}", &FIELDS)
6393                    }
6394
6395                    #[allow(unused_variables)]
6396                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6397                    where
6398                        E: serde::de::Error,
6399                    {
6400                        match value {
6401                            "startTimestamp" | "start_timestamp" => Ok(GeneratedField::StartTimestamp),
6402                            "interval" => Ok(GeneratedField::Interval),
6403                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6404                        }
6405                    }
6406                }
6407                deserializer.deserialize_identifier(GeneratedVisitor)
6408            }
6409        }
6410        struct GeneratedVisitor;
6411        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6412            type Value = NowModeGenerateSeries;
6413
6414            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6415                formatter.write_str("struct stream_plan.NowModeGenerateSeries")
6416            }
6417
6418            fn visit_map<V>(self, mut map_: V) -> std::result::Result<NowModeGenerateSeries, V::Error>
6419                where
6420                    V: serde::de::MapAccess<'de>,
6421            {
6422                let mut start_timestamp__ = None;
6423                let mut interval__ = None;
6424                while let Some(k) = map_.next_key()? {
6425                    match k {
6426                        GeneratedField::StartTimestamp => {
6427                            if start_timestamp__.is_some() {
6428                                return Err(serde::de::Error::duplicate_field("startTimestamp"));
6429                            }
6430                            start_timestamp__ = map_.next_value()?;
6431                        }
6432                        GeneratedField::Interval => {
6433                            if interval__.is_some() {
6434                                return Err(serde::de::Error::duplicate_field("interval"));
6435                            }
6436                            interval__ = map_.next_value()?;
6437                        }
6438                    }
6439                }
6440                Ok(NowModeGenerateSeries {
6441                    start_timestamp: start_timestamp__,
6442                    interval: interval__,
6443                })
6444            }
6445        }
6446        deserializer.deserialize_struct("stream_plan.NowModeGenerateSeries", FIELDS, GeneratedVisitor)
6447    }
6448}
6449impl serde::Serialize for NowModeUpdateCurrent {
6450    #[allow(deprecated)]
6451    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6452    where
6453        S: serde::Serializer,
6454    {
6455        use serde::ser::SerializeStruct;
6456        let len = 0;
6457        let struct_ser = serializer.serialize_struct("stream_plan.NowModeUpdateCurrent", len)?;
6458        struct_ser.end()
6459    }
6460}
6461impl<'de> serde::Deserialize<'de> for NowModeUpdateCurrent {
6462    #[allow(deprecated)]
6463    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6464    where
6465        D: serde::Deserializer<'de>,
6466    {
6467        const FIELDS: &[&str] = &[
6468        ];
6469
6470        #[allow(clippy::enum_variant_names)]
6471        enum GeneratedField {
6472        }
6473        impl<'de> serde::Deserialize<'de> for GeneratedField {
6474            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6475            where
6476                D: serde::Deserializer<'de>,
6477            {
6478                struct GeneratedVisitor;
6479
6480                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6481                    type Value = GeneratedField;
6482
6483                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6484                        write!(formatter, "expected one of: {:?}", &FIELDS)
6485                    }
6486
6487                    #[allow(unused_variables)]
6488                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6489                    where
6490                        E: serde::de::Error,
6491                    {
6492                            Err(serde::de::Error::unknown_field(value, FIELDS))
6493                    }
6494                }
6495                deserializer.deserialize_identifier(GeneratedVisitor)
6496            }
6497        }
6498        struct GeneratedVisitor;
6499        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6500            type Value = NowModeUpdateCurrent;
6501
6502            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6503                formatter.write_str("struct stream_plan.NowModeUpdateCurrent")
6504            }
6505
6506            fn visit_map<V>(self, mut map_: V) -> std::result::Result<NowModeUpdateCurrent, V::Error>
6507                where
6508                    V: serde::de::MapAccess<'de>,
6509            {
6510                while map_.next_key::<GeneratedField>()?.is_some() {
6511                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
6512                }
6513                Ok(NowModeUpdateCurrent {
6514                })
6515            }
6516        }
6517        deserializer.deserialize_struct("stream_plan.NowModeUpdateCurrent", FIELDS, GeneratedVisitor)
6518    }
6519}
6520impl serde::Serialize for NowNode {
6521    #[allow(deprecated)]
6522    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6523    where
6524        S: serde::Serializer,
6525    {
6526        use serde::ser::SerializeStruct;
6527        let mut len = 0;
6528        if self.state_table.is_some() {
6529            len += 1;
6530        }
6531        if self.mode.is_some() {
6532            len += 1;
6533        }
6534        let mut struct_ser = serializer.serialize_struct("stream_plan.NowNode", len)?;
6535        if let Some(v) = self.state_table.as_ref() {
6536            struct_ser.serialize_field("stateTable", v)?;
6537        }
6538        if let Some(v) = self.mode.as_ref() {
6539            match v {
6540                now_node::Mode::UpdateCurrent(v) => {
6541                    struct_ser.serialize_field("updateCurrent", v)?;
6542                }
6543                now_node::Mode::GenerateSeries(v) => {
6544                    struct_ser.serialize_field("generateSeries", v)?;
6545                }
6546            }
6547        }
6548        struct_ser.end()
6549    }
6550}
6551impl<'de> serde::Deserialize<'de> for NowNode {
6552    #[allow(deprecated)]
6553    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6554    where
6555        D: serde::Deserializer<'de>,
6556    {
6557        const FIELDS: &[&str] = &[
6558            "state_table",
6559            "stateTable",
6560            "update_current",
6561            "updateCurrent",
6562            "generate_series",
6563            "generateSeries",
6564        ];
6565
6566        #[allow(clippy::enum_variant_names)]
6567        enum GeneratedField {
6568            StateTable,
6569            UpdateCurrent,
6570            GenerateSeries,
6571        }
6572        impl<'de> serde::Deserialize<'de> for GeneratedField {
6573            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6574            where
6575                D: serde::Deserializer<'de>,
6576            {
6577                struct GeneratedVisitor;
6578
6579                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6580                    type Value = GeneratedField;
6581
6582                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6583                        write!(formatter, "expected one of: {:?}", &FIELDS)
6584                    }
6585
6586                    #[allow(unused_variables)]
6587                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6588                    where
6589                        E: serde::de::Error,
6590                    {
6591                        match value {
6592                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
6593                            "updateCurrent" | "update_current" => Ok(GeneratedField::UpdateCurrent),
6594                            "generateSeries" | "generate_series" => Ok(GeneratedField::GenerateSeries),
6595                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6596                        }
6597                    }
6598                }
6599                deserializer.deserialize_identifier(GeneratedVisitor)
6600            }
6601        }
6602        struct GeneratedVisitor;
6603        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6604            type Value = NowNode;
6605
6606            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6607                formatter.write_str("struct stream_plan.NowNode")
6608            }
6609
6610            fn visit_map<V>(self, mut map_: V) -> std::result::Result<NowNode, V::Error>
6611                where
6612                    V: serde::de::MapAccess<'de>,
6613            {
6614                let mut state_table__ = None;
6615                let mut mode__ = None;
6616                while let Some(k) = map_.next_key()? {
6617                    match k {
6618                        GeneratedField::StateTable => {
6619                            if state_table__.is_some() {
6620                                return Err(serde::de::Error::duplicate_field("stateTable"));
6621                            }
6622                            state_table__ = map_.next_value()?;
6623                        }
6624                        GeneratedField::UpdateCurrent => {
6625                            if mode__.is_some() {
6626                                return Err(serde::de::Error::duplicate_field("updateCurrent"));
6627                            }
6628                            mode__ = map_.next_value::<::std::option::Option<_>>()?.map(now_node::Mode::UpdateCurrent)
6629;
6630                        }
6631                        GeneratedField::GenerateSeries => {
6632                            if mode__.is_some() {
6633                                return Err(serde::de::Error::duplicate_field("generateSeries"));
6634                            }
6635                            mode__ = map_.next_value::<::std::option::Option<_>>()?.map(now_node::Mode::GenerateSeries)
6636;
6637                        }
6638                    }
6639                }
6640                Ok(NowNode {
6641                    state_table: state_table__,
6642                    mode: mode__,
6643                })
6644            }
6645        }
6646        deserializer.deserialize_struct("stream_plan.NowNode", FIELDS, GeneratedVisitor)
6647    }
6648}
6649impl serde::Serialize for OverWindowCachePolicy {
6650    #[allow(deprecated)]
6651    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6652    where
6653        S: serde::Serializer,
6654    {
6655        let variant = match self {
6656            Self::Unspecified => "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED",
6657            Self::Full => "OVER_WINDOW_CACHE_POLICY_FULL",
6658            Self::Recent => "OVER_WINDOW_CACHE_POLICY_RECENT",
6659            Self::RecentFirstN => "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N",
6660            Self::RecentLastN => "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N",
6661        };
6662        serializer.serialize_str(variant)
6663    }
6664}
6665impl<'de> serde::Deserialize<'de> for OverWindowCachePolicy {
6666    #[allow(deprecated)]
6667    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6668    where
6669        D: serde::Deserializer<'de>,
6670    {
6671        const FIELDS: &[&str] = &[
6672            "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED",
6673            "OVER_WINDOW_CACHE_POLICY_FULL",
6674            "OVER_WINDOW_CACHE_POLICY_RECENT",
6675            "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N",
6676            "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N",
6677        ];
6678
6679        struct GeneratedVisitor;
6680
6681        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6682            type Value = OverWindowCachePolicy;
6683
6684            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6685                write!(formatter, "expected one of: {:?}", &FIELDS)
6686            }
6687
6688            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
6689            where
6690                E: serde::de::Error,
6691            {
6692                i32::try_from(v)
6693                    .ok()
6694                    .and_then(|x| x.try_into().ok())
6695                    .ok_or_else(|| {
6696                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
6697                    })
6698            }
6699
6700            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
6701            where
6702                E: serde::de::Error,
6703            {
6704                i32::try_from(v)
6705                    .ok()
6706                    .and_then(|x| x.try_into().ok())
6707                    .ok_or_else(|| {
6708                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
6709                    })
6710            }
6711
6712            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6713            where
6714                E: serde::de::Error,
6715            {
6716                match value {
6717                    "OVER_WINDOW_CACHE_POLICY_UNSPECIFIED" => Ok(OverWindowCachePolicy::Unspecified),
6718                    "OVER_WINDOW_CACHE_POLICY_FULL" => Ok(OverWindowCachePolicy::Full),
6719                    "OVER_WINDOW_CACHE_POLICY_RECENT" => Ok(OverWindowCachePolicy::Recent),
6720                    "OVER_WINDOW_CACHE_POLICY_RECENT_FIRST_N" => Ok(OverWindowCachePolicy::RecentFirstN),
6721                    "OVER_WINDOW_CACHE_POLICY_RECENT_LAST_N" => Ok(OverWindowCachePolicy::RecentLastN),
6722                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
6723                }
6724            }
6725        }
6726        deserializer.deserialize_any(GeneratedVisitor)
6727    }
6728}
6729impl serde::Serialize for OverWindowNode {
6730    #[allow(deprecated)]
6731    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6732    where
6733        S: serde::Serializer,
6734    {
6735        use serde::ser::SerializeStruct;
6736        let mut len = 0;
6737        if !self.calls.is_empty() {
6738            len += 1;
6739        }
6740        if !self.partition_by.is_empty() {
6741            len += 1;
6742        }
6743        if !self.order_by.is_empty() {
6744            len += 1;
6745        }
6746        if self.state_table.is_some() {
6747            len += 1;
6748        }
6749        if self.cache_policy != 0 {
6750            len += 1;
6751        }
6752        let mut struct_ser = serializer.serialize_struct("stream_plan.OverWindowNode", len)?;
6753        if !self.calls.is_empty() {
6754            struct_ser.serialize_field("calls", &self.calls)?;
6755        }
6756        if !self.partition_by.is_empty() {
6757            struct_ser.serialize_field("partitionBy", &self.partition_by)?;
6758        }
6759        if !self.order_by.is_empty() {
6760            struct_ser.serialize_field("orderBy", &self.order_by)?;
6761        }
6762        if let Some(v) = self.state_table.as_ref() {
6763            struct_ser.serialize_field("stateTable", v)?;
6764        }
6765        if self.cache_policy != 0 {
6766            let v = OverWindowCachePolicy::try_from(self.cache_policy)
6767                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.cache_policy)))?;
6768            struct_ser.serialize_field("cachePolicy", &v)?;
6769        }
6770        struct_ser.end()
6771    }
6772}
6773impl<'de> serde::Deserialize<'de> for OverWindowNode {
6774    #[allow(deprecated)]
6775    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6776    where
6777        D: serde::Deserializer<'de>,
6778    {
6779        const FIELDS: &[&str] = &[
6780            "calls",
6781            "partition_by",
6782            "partitionBy",
6783            "order_by",
6784            "orderBy",
6785            "state_table",
6786            "stateTable",
6787            "cache_policy",
6788            "cachePolicy",
6789        ];
6790
6791        #[allow(clippy::enum_variant_names)]
6792        enum GeneratedField {
6793            Calls,
6794            PartitionBy,
6795            OrderBy,
6796            StateTable,
6797            CachePolicy,
6798        }
6799        impl<'de> serde::Deserialize<'de> for GeneratedField {
6800            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6801            where
6802                D: serde::Deserializer<'de>,
6803            {
6804                struct GeneratedVisitor;
6805
6806                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6807                    type Value = GeneratedField;
6808
6809                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6810                        write!(formatter, "expected one of: {:?}", &FIELDS)
6811                    }
6812
6813                    #[allow(unused_variables)]
6814                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6815                    where
6816                        E: serde::de::Error,
6817                    {
6818                        match value {
6819                            "calls" => Ok(GeneratedField::Calls),
6820                            "partitionBy" | "partition_by" => Ok(GeneratedField::PartitionBy),
6821                            "orderBy" | "order_by" => Ok(GeneratedField::OrderBy),
6822                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
6823                            "cachePolicy" | "cache_policy" => Ok(GeneratedField::CachePolicy),
6824                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
6825                        }
6826                    }
6827                }
6828                deserializer.deserialize_identifier(GeneratedVisitor)
6829            }
6830        }
6831        struct GeneratedVisitor;
6832        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6833            type Value = OverWindowNode;
6834
6835            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6836                formatter.write_str("struct stream_plan.OverWindowNode")
6837            }
6838
6839            fn visit_map<V>(self, mut map_: V) -> std::result::Result<OverWindowNode, V::Error>
6840                where
6841                    V: serde::de::MapAccess<'de>,
6842            {
6843                let mut calls__ = None;
6844                let mut partition_by__ = None;
6845                let mut order_by__ = None;
6846                let mut state_table__ = None;
6847                let mut cache_policy__ = None;
6848                while let Some(k) = map_.next_key()? {
6849                    match k {
6850                        GeneratedField::Calls => {
6851                            if calls__.is_some() {
6852                                return Err(serde::de::Error::duplicate_field("calls"));
6853                            }
6854                            calls__ = Some(map_.next_value()?);
6855                        }
6856                        GeneratedField::PartitionBy => {
6857                            if partition_by__.is_some() {
6858                                return Err(serde::de::Error::duplicate_field("partitionBy"));
6859                            }
6860                            partition_by__ = 
6861                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
6862                                    .into_iter().map(|x| x.0).collect())
6863                            ;
6864                        }
6865                        GeneratedField::OrderBy => {
6866                            if order_by__.is_some() {
6867                                return Err(serde::de::Error::duplicate_field("orderBy"));
6868                            }
6869                            order_by__ = Some(map_.next_value()?);
6870                        }
6871                        GeneratedField::StateTable => {
6872                            if state_table__.is_some() {
6873                                return Err(serde::de::Error::duplicate_field("stateTable"));
6874                            }
6875                            state_table__ = map_.next_value()?;
6876                        }
6877                        GeneratedField::CachePolicy => {
6878                            if cache_policy__.is_some() {
6879                                return Err(serde::de::Error::duplicate_field("cachePolicy"));
6880                            }
6881                            cache_policy__ = Some(map_.next_value::<OverWindowCachePolicy>()? as i32);
6882                        }
6883                    }
6884                }
6885                Ok(OverWindowNode {
6886                    calls: calls__.unwrap_or_default(),
6887                    partition_by: partition_by__.unwrap_or_default(),
6888                    order_by: order_by__.unwrap_or_default(),
6889                    state_table: state_table__,
6890                    cache_policy: cache_policy__.unwrap_or_default(),
6891                })
6892            }
6893        }
6894        deserializer.deserialize_struct("stream_plan.OverWindowNode", FIELDS, GeneratedVisitor)
6895    }
6896}
6897impl serde::Serialize for PauseMutation {
6898    #[allow(deprecated)]
6899    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6900    where
6901        S: serde::Serializer,
6902    {
6903        use serde::ser::SerializeStruct;
6904        let len = 0;
6905        let struct_ser = serializer.serialize_struct("stream_plan.PauseMutation", len)?;
6906        struct_ser.end()
6907    }
6908}
6909impl<'de> serde::Deserialize<'de> for PauseMutation {
6910    #[allow(deprecated)]
6911    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6912    where
6913        D: serde::Deserializer<'de>,
6914    {
6915        const FIELDS: &[&str] = &[
6916        ];
6917
6918        #[allow(clippy::enum_variant_names)]
6919        enum GeneratedField {
6920        }
6921        impl<'de> serde::Deserialize<'de> for GeneratedField {
6922            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
6923            where
6924                D: serde::Deserializer<'de>,
6925            {
6926                struct GeneratedVisitor;
6927
6928                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6929                    type Value = GeneratedField;
6930
6931                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6932                        write!(formatter, "expected one of: {:?}", &FIELDS)
6933                    }
6934
6935                    #[allow(unused_variables)]
6936                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
6937                    where
6938                        E: serde::de::Error,
6939                    {
6940                            Err(serde::de::Error::unknown_field(value, FIELDS))
6941                    }
6942                }
6943                deserializer.deserialize_identifier(GeneratedVisitor)
6944            }
6945        }
6946        struct GeneratedVisitor;
6947        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
6948            type Value = PauseMutation;
6949
6950            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6951                formatter.write_str("struct stream_plan.PauseMutation")
6952            }
6953
6954            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PauseMutation, V::Error>
6955                where
6956                    V: serde::de::MapAccess<'de>,
6957            {
6958                while map_.next_key::<GeneratedField>()?.is_some() {
6959                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
6960                }
6961                Ok(PauseMutation {
6962                })
6963            }
6964        }
6965        deserializer.deserialize_struct("stream_plan.PauseMutation", FIELDS, GeneratedVisitor)
6966    }
6967}
6968impl serde::Serialize for ProjectNode {
6969    #[allow(deprecated)]
6970    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6971    where
6972        S: serde::Serializer,
6973    {
6974        use serde::ser::SerializeStruct;
6975        let mut len = 0;
6976        if !self.select_list.is_empty() {
6977            len += 1;
6978        }
6979        if !self.watermark_input_cols.is_empty() {
6980            len += 1;
6981        }
6982        if !self.watermark_output_cols.is_empty() {
6983            len += 1;
6984        }
6985        if !self.nondecreasing_exprs.is_empty() {
6986            len += 1;
6987        }
6988        if self.noop_update_hint {
6989            len += 1;
6990        }
6991        let mut struct_ser = serializer.serialize_struct("stream_plan.ProjectNode", len)?;
6992        if !self.select_list.is_empty() {
6993            struct_ser.serialize_field("selectList", &self.select_list)?;
6994        }
6995        if !self.watermark_input_cols.is_empty() {
6996            struct_ser.serialize_field("watermarkInputCols", &self.watermark_input_cols)?;
6997        }
6998        if !self.watermark_output_cols.is_empty() {
6999            struct_ser.serialize_field("watermarkOutputCols", &self.watermark_output_cols)?;
7000        }
7001        if !self.nondecreasing_exprs.is_empty() {
7002            struct_ser.serialize_field("nondecreasingExprs", &self.nondecreasing_exprs)?;
7003        }
7004        if self.noop_update_hint {
7005            struct_ser.serialize_field("noopUpdateHint", &self.noop_update_hint)?;
7006        }
7007        struct_ser.end()
7008    }
7009}
7010impl<'de> serde::Deserialize<'de> for ProjectNode {
7011    #[allow(deprecated)]
7012    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7013    where
7014        D: serde::Deserializer<'de>,
7015    {
7016        const FIELDS: &[&str] = &[
7017            "select_list",
7018            "selectList",
7019            "watermark_input_cols",
7020            "watermarkInputCols",
7021            "watermark_output_cols",
7022            "watermarkOutputCols",
7023            "nondecreasing_exprs",
7024            "nondecreasingExprs",
7025            "noop_update_hint",
7026            "noopUpdateHint",
7027        ];
7028
7029        #[allow(clippy::enum_variant_names)]
7030        enum GeneratedField {
7031            SelectList,
7032            WatermarkInputCols,
7033            WatermarkOutputCols,
7034            NondecreasingExprs,
7035            NoopUpdateHint,
7036        }
7037        impl<'de> serde::Deserialize<'de> for GeneratedField {
7038            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7039            where
7040                D: serde::Deserializer<'de>,
7041            {
7042                struct GeneratedVisitor;
7043
7044                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7045                    type Value = GeneratedField;
7046
7047                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7048                        write!(formatter, "expected one of: {:?}", &FIELDS)
7049                    }
7050
7051                    #[allow(unused_variables)]
7052                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7053                    where
7054                        E: serde::de::Error,
7055                    {
7056                        match value {
7057                            "selectList" | "select_list" => Ok(GeneratedField::SelectList),
7058                            "watermarkInputCols" | "watermark_input_cols" => Ok(GeneratedField::WatermarkInputCols),
7059                            "watermarkOutputCols" | "watermark_output_cols" => Ok(GeneratedField::WatermarkOutputCols),
7060                            "nondecreasingExprs" | "nondecreasing_exprs" => Ok(GeneratedField::NondecreasingExprs),
7061                            "noopUpdateHint" | "noop_update_hint" => Ok(GeneratedField::NoopUpdateHint),
7062                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7063                        }
7064                    }
7065                }
7066                deserializer.deserialize_identifier(GeneratedVisitor)
7067            }
7068        }
7069        struct GeneratedVisitor;
7070        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7071            type Value = ProjectNode;
7072
7073            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7074                formatter.write_str("struct stream_plan.ProjectNode")
7075            }
7076
7077            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProjectNode, V::Error>
7078                where
7079                    V: serde::de::MapAccess<'de>,
7080            {
7081                let mut select_list__ = None;
7082                let mut watermark_input_cols__ = None;
7083                let mut watermark_output_cols__ = None;
7084                let mut nondecreasing_exprs__ = None;
7085                let mut noop_update_hint__ = None;
7086                while let Some(k) = map_.next_key()? {
7087                    match k {
7088                        GeneratedField::SelectList => {
7089                            if select_list__.is_some() {
7090                                return Err(serde::de::Error::duplicate_field("selectList"));
7091                            }
7092                            select_list__ = Some(map_.next_value()?);
7093                        }
7094                        GeneratedField::WatermarkInputCols => {
7095                            if watermark_input_cols__.is_some() {
7096                                return Err(serde::de::Error::duplicate_field("watermarkInputCols"));
7097                            }
7098                            watermark_input_cols__ = 
7099                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7100                                    .into_iter().map(|x| x.0).collect())
7101                            ;
7102                        }
7103                        GeneratedField::WatermarkOutputCols => {
7104                            if watermark_output_cols__.is_some() {
7105                                return Err(serde::de::Error::duplicate_field("watermarkOutputCols"));
7106                            }
7107                            watermark_output_cols__ = 
7108                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7109                                    .into_iter().map(|x| x.0).collect())
7110                            ;
7111                        }
7112                        GeneratedField::NondecreasingExprs => {
7113                            if nondecreasing_exprs__.is_some() {
7114                                return Err(serde::de::Error::duplicate_field("nondecreasingExprs"));
7115                            }
7116                            nondecreasing_exprs__ = 
7117                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7118                                    .into_iter().map(|x| x.0).collect())
7119                            ;
7120                        }
7121                        GeneratedField::NoopUpdateHint => {
7122                            if noop_update_hint__.is_some() {
7123                                return Err(serde::de::Error::duplicate_field("noopUpdateHint"));
7124                            }
7125                            noop_update_hint__ = Some(map_.next_value()?);
7126                        }
7127                    }
7128                }
7129                Ok(ProjectNode {
7130                    select_list: select_list__.unwrap_or_default(),
7131                    watermark_input_cols: watermark_input_cols__.unwrap_or_default(),
7132                    watermark_output_cols: watermark_output_cols__.unwrap_or_default(),
7133                    nondecreasing_exprs: nondecreasing_exprs__.unwrap_or_default(),
7134                    noop_update_hint: noop_update_hint__.unwrap_or_default(),
7135                })
7136            }
7137        }
7138        deserializer.deserialize_struct("stream_plan.ProjectNode", FIELDS, GeneratedVisitor)
7139    }
7140}
7141impl serde::Serialize for ProjectSetNode {
7142    #[allow(deprecated)]
7143    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7144    where
7145        S: serde::Serializer,
7146    {
7147        use serde::ser::SerializeStruct;
7148        let mut len = 0;
7149        if !self.select_list.is_empty() {
7150            len += 1;
7151        }
7152        if !self.watermark_input_cols.is_empty() {
7153            len += 1;
7154        }
7155        if !self.watermark_expr_indices.is_empty() {
7156            len += 1;
7157        }
7158        if !self.nondecreasing_exprs.is_empty() {
7159            len += 1;
7160        }
7161        let mut struct_ser = serializer.serialize_struct("stream_plan.ProjectSetNode", len)?;
7162        if !self.select_list.is_empty() {
7163            struct_ser.serialize_field("selectList", &self.select_list)?;
7164        }
7165        if !self.watermark_input_cols.is_empty() {
7166            struct_ser.serialize_field("watermarkInputCols", &self.watermark_input_cols)?;
7167        }
7168        if !self.watermark_expr_indices.is_empty() {
7169            struct_ser.serialize_field("watermarkExprIndices", &self.watermark_expr_indices)?;
7170        }
7171        if !self.nondecreasing_exprs.is_empty() {
7172            struct_ser.serialize_field("nondecreasingExprs", &self.nondecreasing_exprs)?;
7173        }
7174        struct_ser.end()
7175    }
7176}
7177impl<'de> serde::Deserialize<'de> for ProjectSetNode {
7178    #[allow(deprecated)]
7179    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7180    where
7181        D: serde::Deserializer<'de>,
7182    {
7183        const FIELDS: &[&str] = &[
7184            "select_list",
7185            "selectList",
7186            "watermark_input_cols",
7187            "watermarkInputCols",
7188            "watermark_expr_indices",
7189            "watermarkExprIndices",
7190            "nondecreasing_exprs",
7191            "nondecreasingExprs",
7192        ];
7193
7194        #[allow(clippy::enum_variant_names)]
7195        enum GeneratedField {
7196            SelectList,
7197            WatermarkInputCols,
7198            WatermarkExprIndices,
7199            NondecreasingExprs,
7200        }
7201        impl<'de> serde::Deserialize<'de> for GeneratedField {
7202            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7203            where
7204                D: serde::Deserializer<'de>,
7205            {
7206                struct GeneratedVisitor;
7207
7208                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7209                    type Value = GeneratedField;
7210
7211                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7212                        write!(formatter, "expected one of: {:?}", &FIELDS)
7213                    }
7214
7215                    #[allow(unused_variables)]
7216                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7217                    where
7218                        E: serde::de::Error,
7219                    {
7220                        match value {
7221                            "selectList" | "select_list" => Ok(GeneratedField::SelectList),
7222                            "watermarkInputCols" | "watermark_input_cols" => Ok(GeneratedField::WatermarkInputCols),
7223                            "watermarkExprIndices" | "watermark_expr_indices" => Ok(GeneratedField::WatermarkExprIndices),
7224                            "nondecreasingExprs" | "nondecreasing_exprs" => Ok(GeneratedField::NondecreasingExprs),
7225                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7226                        }
7227                    }
7228                }
7229                deserializer.deserialize_identifier(GeneratedVisitor)
7230            }
7231        }
7232        struct GeneratedVisitor;
7233        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7234            type Value = ProjectSetNode;
7235
7236            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7237                formatter.write_str("struct stream_plan.ProjectSetNode")
7238            }
7239
7240            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProjectSetNode, V::Error>
7241                where
7242                    V: serde::de::MapAccess<'de>,
7243            {
7244                let mut select_list__ = None;
7245                let mut watermark_input_cols__ = None;
7246                let mut watermark_expr_indices__ = None;
7247                let mut nondecreasing_exprs__ = None;
7248                while let Some(k) = map_.next_key()? {
7249                    match k {
7250                        GeneratedField::SelectList => {
7251                            if select_list__.is_some() {
7252                                return Err(serde::de::Error::duplicate_field("selectList"));
7253                            }
7254                            select_list__ = Some(map_.next_value()?);
7255                        }
7256                        GeneratedField::WatermarkInputCols => {
7257                            if watermark_input_cols__.is_some() {
7258                                return Err(serde::de::Error::duplicate_field("watermarkInputCols"));
7259                            }
7260                            watermark_input_cols__ = 
7261                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7262                                    .into_iter().map(|x| x.0).collect())
7263                            ;
7264                        }
7265                        GeneratedField::WatermarkExprIndices => {
7266                            if watermark_expr_indices__.is_some() {
7267                                return Err(serde::de::Error::duplicate_field("watermarkExprIndices"));
7268                            }
7269                            watermark_expr_indices__ = 
7270                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7271                                    .into_iter().map(|x| x.0).collect())
7272                            ;
7273                        }
7274                        GeneratedField::NondecreasingExprs => {
7275                            if nondecreasing_exprs__.is_some() {
7276                                return Err(serde::de::Error::duplicate_field("nondecreasingExprs"));
7277                            }
7278                            nondecreasing_exprs__ = 
7279                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7280                                    .into_iter().map(|x| x.0).collect())
7281                            ;
7282                        }
7283                    }
7284                }
7285                Ok(ProjectSetNode {
7286                    select_list: select_list__.unwrap_or_default(),
7287                    watermark_input_cols: watermark_input_cols__.unwrap_or_default(),
7288                    watermark_expr_indices: watermark_expr_indices__.unwrap_or_default(),
7289                    nondecreasing_exprs: nondecreasing_exprs__.unwrap_or_default(),
7290                })
7291            }
7292        }
7293        deserializer.deserialize_struct("stream_plan.ProjectSetNode", FIELDS, GeneratedVisitor)
7294    }
7295}
7296impl serde::Serialize for ResumeMutation {
7297    #[allow(deprecated)]
7298    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7299    where
7300        S: serde::Serializer,
7301    {
7302        use serde::ser::SerializeStruct;
7303        let len = 0;
7304        let struct_ser = serializer.serialize_struct("stream_plan.ResumeMutation", len)?;
7305        struct_ser.end()
7306    }
7307}
7308impl<'de> serde::Deserialize<'de> for ResumeMutation {
7309    #[allow(deprecated)]
7310    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7311    where
7312        D: serde::Deserializer<'de>,
7313    {
7314        const FIELDS: &[&str] = &[
7315        ];
7316
7317        #[allow(clippy::enum_variant_names)]
7318        enum GeneratedField {
7319        }
7320        impl<'de> serde::Deserialize<'de> for GeneratedField {
7321            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7322            where
7323                D: serde::Deserializer<'de>,
7324            {
7325                struct GeneratedVisitor;
7326
7327                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7328                    type Value = GeneratedField;
7329
7330                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7331                        write!(formatter, "expected one of: {:?}", &FIELDS)
7332                    }
7333
7334                    #[allow(unused_variables)]
7335                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7336                    where
7337                        E: serde::de::Error,
7338                    {
7339                            Err(serde::de::Error::unknown_field(value, FIELDS))
7340                    }
7341                }
7342                deserializer.deserialize_identifier(GeneratedVisitor)
7343            }
7344        }
7345        struct GeneratedVisitor;
7346        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7347            type Value = ResumeMutation;
7348
7349            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7350                formatter.write_str("struct stream_plan.ResumeMutation")
7351            }
7352
7353            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ResumeMutation, V::Error>
7354                where
7355                    V: serde::de::MapAccess<'de>,
7356            {
7357                while map_.next_key::<GeneratedField>()?.is_some() {
7358                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
7359                }
7360                Ok(ResumeMutation {
7361                })
7362            }
7363        }
7364        deserializer.deserialize_struct("stream_plan.ResumeMutation", FIELDS, GeneratedVisitor)
7365    }
7366}
7367impl serde::Serialize for RowIdGenNode {
7368    #[allow(deprecated)]
7369    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7370    where
7371        S: serde::Serializer,
7372    {
7373        use serde::ser::SerializeStruct;
7374        let mut len = 0;
7375        if self.row_id_index != 0 {
7376            len += 1;
7377        }
7378        let mut struct_ser = serializer.serialize_struct("stream_plan.RowIdGenNode", len)?;
7379        if self.row_id_index != 0 {
7380            #[allow(clippy::needless_borrow)]
7381            #[allow(clippy::needless_borrows_for_generic_args)]
7382            struct_ser.serialize_field("rowIdIndex", ToString::to_string(&self.row_id_index).as_str())?;
7383        }
7384        struct_ser.end()
7385    }
7386}
7387impl<'de> serde::Deserialize<'de> for RowIdGenNode {
7388    #[allow(deprecated)]
7389    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7390    where
7391        D: serde::Deserializer<'de>,
7392    {
7393        const FIELDS: &[&str] = &[
7394            "row_id_index",
7395            "rowIdIndex",
7396        ];
7397
7398        #[allow(clippy::enum_variant_names)]
7399        enum GeneratedField {
7400            RowIdIndex,
7401        }
7402        impl<'de> serde::Deserialize<'de> for GeneratedField {
7403            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7404            where
7405                D: serde::Deserializer<'de>,
7406            {
7407                struct GeneratedVisitor;
7408
7409                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7410                    type Value = GeneratedField;
7411
7412                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7413                        write!(formatter, "expected one of: {:?}", &FIELDS)
7414                    }
7415
7416                    #[allow(unused_variables)]
7417                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7418                    where
7419                        E: serde::de::Error,
7420                    {
7421                        match value {
7422                            "rowIdIndex" | "row_id_index" => Ok(GeneratedField::RowIdIndex),
7423                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7424                        }
7425                    }
7426                }
7427                deserializer.deserialize_identifier(GeneratedVisitor)
7428            }
7429        }
7430        struct GeneratedVisitor;
7431        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7432            type Value = RowIdGenNode;
7433
7434            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7435                formatter.write_str("struct stream_plan.RowIdGenNode")
7436            }
7437
7438            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RowIdGenNode, V::Error>
7439                where
7440                    V: serde::de::MapAccess<'de>,
7441            {
7442                let mut row_id_index__ = None;
7443                while let Some(k) = map_.next_key()? {
7444                    match k {
7445                        GeneratedField::RowIdIndex => {
7446                            if row_id_index__.is_some() {
7447                                return Err(serde::de::Error::duplicate_field("rowIdIndex"));
7448                            }
7449                            row_id_index__ = 
7450                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7451                            ;
7452                        }
7453                    }
7454                }
7455                Ok(RowIdGenNode {
7456                    row_id_index: row_id_index__.unwrap_or_default(),
7457                })
7458            }
7459        }
7460        deserializer.deserialize_struct("stream_plan.RowIdGenNode", FIELDS, GeneratedVisitor)
7461    }
7462}
7463impl serde::Serialize for RowMergeNode {
7464    #[allow(deprecated)]
7465    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7466    where
7467        S: serde::Serializer,
7468    {
7469        use serde::ser::SerializeStruct;
7470        let mut len = 0;
7471        if self.lhs_mapping.is_some() {
7472            len += 1;
7473        }
7474        if self.rhs_mapping.is_some() {
7475            len += 1;
7476        }
7477        let mut struct_ser = serializer.serialize_struct("stream_plan.RowMergeNode", len)?;
7478        if let Some(v) = self.lhs_mapping.as_ref() {
7479            struct_ser.serialize_field("lhsMapping", v)?;
7480        }
7481        if let Some(v) = self.rhs_mapping.as_ref() {
7482            struct_ser.serialize_field("rhsMapping", v)?;
7483        }
7484        struct_ser.end()
7485    }
7486}
7487impl<'de> serde::Deserialize<'de> for RowMergeNode {
7488    #[allow(deprecated)]
7489    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7490    where
7491        D: serde::Deserializer<'de>,
7492    {
7493        const FIELDS: &[&str] = &[
7494            "lhs_mapping",
7495            "lhsMapping",
7496            "rhs_mapping",
7497            "rhsMapping",
7498        ];
7499
7500        #[allow(clippy::enum_variant_names)]
7501        enum GeneratedField {
7502            LhsMapping,
7503            RhsMapping,
7504        }
7505        impl<'de> serde::Deserialize<'de> for GeneratedField {
7506            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7507            where
7508                D: serde::Deserializer<'de>,
7509            {
7510                struct GeneratedVisitor;
7511
7512                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7513                    type Value = GeneratedField;
7514
7515                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7516                        write!(formatter, "expected one of: {:?}", &FIELDS)
7517                    }
7518
7519                    #[allow(unused_variables)]
7520                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7521                    where
7522                        E: serde::de::Error,
7523                    {
7524                        match value {
7525                            "lhsMapping" | "lhs_mapping" => Ok(GeneratedField::LhsMapping),
7526                            "rhsMapping" | "rhs_mapping" => Ok(GeneratedField::RhsMapping),
7527                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7528                        }
7529                    }
7530                }
7531                deserializer.deserialize_identifier(GeneratedVisitor)
7532            }
7533        }
7534        struct GeneratedVisitor;
7535        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7536            type Value = RowMergeNode;
7537
7538            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7539                formatter.write_str("struct stream_plan.RowMergeNode")
7540            }
7541
7542            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RowMergeNode, V::Error>
7543                where
7544                    V: serde::de::MapAccess<'de>,
7545            {
7546                let mut lhs_mapping__ = None;
7547                let mut rhs_mapping__ = None;
7548                while let Some(k) = map_.next_key()? {
7549                    match k {
7550                        GeneratedField::LhsMapping => {
7551                            if lhs_mapping__.is_some() {
7552                                return Err(serde::de::Error::duplicate_field("lhsMapping"));
7553                            }
7554                            lhs_mapping__ = map_.next_value()?;
7555                        }
7556                        GeneratedField::RhsMapping => {
7557                            if rhs_mapping__.is_some() {
7558                                return Err(serde::de::Error::duplicate_field("rhsMapping"));
7559                            }
7560                            rhs_mapping__ = map_.next_value()?;
7561                        }
7562                    }
7563                }
7564                Ok(RowMergeNode {
7565                    lhs_mapping: lhs_mapping__,
7566                    rhs_mapping: rhs_mapping__,
7567                })
7568            }
7569        }
7570        deserializer.deserialize_struct("stream_plan.RowMergeNode", FIELDS, GeneratedVisitor)
7571    }
7572}
7573impl serde::Serialize for SimpleAggNode {
7574    #[allow(deprecated)]
7575    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7576    where
7577        S: serde::Serializer,
7578    {
7579        use serde::ser::SerializeStruct;
7580        let mut len = 0;
7581        if !self.agg_calls.is_empty() {
7582            len += 1;
7583        }
7584        if !self.distribution_key.is_empty() {
7585            len += 1;
7586        }
7587        if !self.agg_call_states.is_empty() {
7588            len += 1;
7589        }
7590        if self.intermediate_state_table.is_some() {
7591            len += 1;
7592        }
7593        if self.is_append_only {
7594            len += 1;
7595        }
7596        if !self.distinct_dedup_tables.is_empty() {
7597            len += 1;
7598        }
7599        if self.row_count_index != 0 {
7600            len += 1;
7601        }
7602        if self.version != 0 {
7603            len += 1;
7604        }
7605        if self.must_output_per_barrier {
7606            len += 1;
7607        }
7608        let mut struct_ser = serializer.serialize_struct("stream_plan.SimpleAggNode", len)?;
7609        if !self.agg_calls.is_empty() {
7610            struct_ser.serialize_field("aggCalls", &self.agg_calls)?;
7611        }
7612        if !self.distribution_key.is_empty() {
7613            struct_ser.serialize_field("distributionKey", &self.distribution_key)?;
7614        }
7615        if !self.agg_call_states.is_empty() {
7616            struct_ser.serialize_field("aggCallStates", &self.agg_call_states)?;
7617        }
7618        if let Some(v) = self.intermediate_state_table.as_ref() {
7619            struct_ser.serialize_field("intermediateStateTable", v)?;
7620        }
7621        if self.is_append_only {
7622            struct_ser.serialize_field("isAppendOnly", &self.is_append_only)?;
7623        }
7624        if !self.distinct_dedup_tables.is_empty() {
7625            struct_ser.serialize_field("distinctDedupTables", &self.distinct_dedup_tables)?;
7626        }
7627        if self.row_count_index != 0 {
7628            struct_ser.serialize_field("rowCountIndex", &self.row_count_index)?;
7629        }
7630        if self.version != 0 {
7631            let v = AggNodeVersion::try_from(self.version)
7632                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.version)))?;
7633            struct_ser.serialize_field("version", &v)?;
7634        }
7635        if self.must_output_per_barrier {
7636            struct_ser.serialize_field("mustOutputPerBarrier", &self.must_output_per_barrier)?;
7637        }
7638        struct_ser.end()
7639    }
7640}
7641impl<'de> serde::Deserialize<'de> for SimpleAggNode {
7642    #[allow(deprecated)]
7643    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7644    where
7645        D: serde::Deserializer<'de>,
7646    {
7647        const FIELDS: &[&str] = &[
7648            "agg_calls",
7649            "aggCalls",
7650            "distribution_key",
7651            "distributionKey",
7652            "agg_call_states",
7653            "aggCallStates",
7654            "intermediate_state_table",
7655            "intermediateStateTable",
7656            "is_append_only",
7657            "isAppendOnly",
7658            "distinct_dedup_tables",
7659            "distinctDedupTables",
7660            "row_count_index",
7661            "rowCountIndex",
7662            "version",
7663            "must_output_per_barrier",
7664            "mustOutputPerBarrier",
7665        ];
7666
7667        #[allow(clippy::enum_variant_names)]
7668        enum GeneratedField {
7669            AggCalls,
7670            DistributionKey,
7671            AggCallStates,
7672            IntermediateStateTable,
7673            IsAppendOnly,
7674            DistinctDedupTables,
7675            RowCountIndex,
7676            Version,
7677            MustOutputPerBarrier,
7678        }
7679        impl<'de> serde::Deserialize<'de> for GeneratedField {
7680            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7681            where
7682                D: serde::Deserializer<'de>,
7683            {
7684                struct GeneratedVisitor;
7685
7686                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7687                    type Value = GeneratedField;
7688
7689                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7690                        write!(formatter, "expected one of: {:?}", &FIELDS)
7691                    }
7692
7693                    #[allow(unused_variables)]
7694                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7695                    where
7696                        E: serde::de::Error,
7697                    {
7698                        match value {
7699                            "aggCalls" | "agg_calls" => Ok(GeneratedField::AggCalls),
7700                            "distributionKey" | "distribution_key" => Ok(GeneratedField::DistributionKey),
7701                            "aggCallStates" | "agg_call_states" => Ok(GeneratedField::AggCallStates),
7702                            "intermediateStateTable" | "intermediate_state_table" => Ok(GeneratedField::IntermediateStateTable),
7703                            "isAppendOnly" | "is_append_only" => Ok(GeneratedField::IsAppendOnly),
7704                            "distinctDedupTables" | "distinct_dedup_tables" => Ok(GeneratedField::DistinctDedupTables),
7705                            "rowCountIndex" | "row_count_index" => Ok(GeneratedField::RowCountIndex),
7706                            "version" => Ok(GeneratedField::Version),
7707                            "mustOutputPerBarrier" | "must_output_per_barrier" => Ok(GeneratedField::MustOutputPerBarrier),
7708                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
7709                        }
7710                    }
7711                }
7712                deserializer.deserialize_identifier(GeneratedVisitor)
7713            }
7714        }
7715        struct GeneratedVisitor;
7716        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7717            type Value = SimpleAggNode;
7718
7719            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7720                formatter.write_str("struct stream_plan.SimpleAggNode")
7721            }
7722
7723            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SimpleAggNode, V::Error>
7724                where
7725                    V: serde::de::MapAccess<'de>,
7726            {
7727                let mut agg_calls__ = None;
7728                let mut distribution_key__ = None;
7729                let mut agg_call_states__ = None;
7730                let mut intermediate_state_table__ = None;
7731                let mut is_append_only__ = None;
7732                let mut distinct_dedup_tables__ = None;
7733                let mut row_count_index__ = None;
7734                let mut version__ = None;
7735                let mut must_output_per_barrier__ = None;
7736                while let Some(k) = map_.next_key()? {
7737                    match k {
7738                        GeneratedField::AggCalls => {
7739                            if agg_calls__.is_some() {
7740                                return Err(serde::de::Error::duplicate_field("aggCalls"));
7741                            }
7742                            agg_calls__ = Some(map_.next_value()?);
7743                        }
7744                        GeneratedField::DistributionKey => {
7745                            if distribution_key__.is_some() {
7746                                return Err(serde::de::Error::duplicate_field("distributionKey"));
7747                            }
7748                            distribution_key__ = 
7749                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
7750                                    .into_iter().map(|x| x.0).collect())
7751                            ;
7752                        }
7753                        GeneratedField::AggCallStates => {
7754                            if agg_call_states__.is_some() {
7755                                return Err(serde::de::Error::duplicate_field("aggCallStates"));
7756                            }
7757                            agg_call_states__ = Some(map_.next_value()?);
7758                        }
7759                        GeneratedField::IntermediateStateTable => {
7760                            if intermediate_state_table__.is_some() {
7761                                return Err(serde::de::Error::duplicate_field("intermediateStateTable"));
7762                            }
7763                            intermediate_state_table__ = map_.next_value()?;
7764                        }
7765                        GeneratedField::IsAppendOnly => {
7766                            if is_append_only__.is_some() {
7767                                return Err(serde::de::Error::duplicate_field("isAppendOnly"));
7768                            }
7769                            is_append_only__ = Some(map_.next_value()?);
7770                        }
7771                        GeneratedField::DistinctDedupTables => {
7772                            if distinct_dedup_tables__.is_some() {
7773                                return Err(serde::de::Error::duplicate_field("distinctDedupTables"));
7774                            }
7775                            distinct_dedup_tables__ = Some(
7776                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
7777                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
7778                            );
7779                        }
7780                        GeneratedField::RowCountIndex => {
7781                            if row_count_index__.is_some() {
7782                                return Err(serde::de::Error::duplicate_field("rowCountIndex"));
7783                            }
7784                            row_count_index__ = 
7785                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
7786                            ;
7787                        }
7788                        GeneratedField::Version => {
7789                            if version__.is_some() {
7790                                return Err(serde::de::Error::duplicate_field("version"));
7791                            }
7792                            version__ = Some(map_.next_value::<AggNodeVersion>()? as i32);
7793                        }
7794                        GeneratedField::MustOutputPerBarrier => {
7795                            if must_output_per_barrier__.is_some() {
7796                                return Err(serde::de::Error::duplicate_field("mustOutputPerBarrier"));
7797                            }
7798                            must_output_per_barrier__ = Some(map_.next_value()?);
7799                        }
7800                    }
7801                }
7802                Ok(SimpleAggNode {
7803                    agg_calls: agg_calls__.unwrap_or_default(),
7804                    distribution_key: distribution_key__.unwrap_or_default(),
7805                    agg_call_states: agg_call_states__.unwrap_or_default(),
7806                    intermediate_state_table: intermediate_state_table__,
7807                    is_append_only: is_append_only__.unwrap_or_default(),
7808                    distinct_dedup_tables: distinct_dedup_tables__.unwrap_or_default(),
7809                    row_count_index: row_count_index__.unwrap_or_default(),
7810                    version: version__.unwrap_or_default(),
7811                    must_output_per_barrier: must_output_per_barrier__.unwrap_or_default(),
7812                })
7813            }
7814        }
7815        deserializer.deserialize_struct("stream_plan.SimpleAggNode", FIELDS, GeneratedVisitor)
7816    }
7817}
7818impl serde::Serialize for SinkDesc {
7819    #[allow(deprecated)]
7820    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7821    where
7822        S: serde::Serializer,
7823    {
7824        use serde::ser::SerializeStruct;
7825        let mut len = 0;
7826        if self.id != 0 {
7827            len += 1;
7828        }
7829        if !self.name.is_empty() {
7830            len += 1;
7831        }
7832        if !self.definition.is_empty() {
7833            len += 1;
7834        }
7835        if !self.plan_pk.is_empty() {
7836            len += 1;
7837        }
7838        if !self.downstream_pk.is_empty() {
7839            len += 1;
7840        }
7841        if !self.distribution_key.is_empty() {
7842            len += 1;
7843        }
7844        if !self.properties.is_empty() {
7845            len += 1;
7846        }
7847        if self.sink_type != 0 {
7848            len += 1;
7849        }
7850        if !self.column_catalogs.is_empty() {
7851            len += 1;
7852        }
7853        if !self.db_name.is_empty() {
7854            len += 1;
7855        }
7856        if !self.sink_from_name.is_empty() {
7857            len += 1;
7858        }
7859        if self.format_desc.is_some() {
7860            len += 1;
7861        }
7862        if self.target_table.is_some() {
7863            len += 1;
7864        }
7865        if self.extra_partition_col_idx.is_some() {
7866            len += 1;
7867        }
7868        if !self.secret_refs.is_empty() {
7869            len += 1;
7870        }
7871        let mut struct_ser = serializer.serialize_struct("stream_plan.SinkDesc", len)?;
7872        if self.id != 0 {
7873            struct_ser.serialize_field("id", &self.id)?;
7874        }
7875        if !self.name.is_empty() {
7876            struct_ser.serialize_field("name", &self.name)?;
7877        }
7878        if !self.definition.is_empty() {
7879            struct_ser.serialize_field("definition", &self.definition)?;
7880        }
7881        if !self.plan_pk.is_empty() {
7882            struct_ser.serialize_field("planPk", &self.plan_pk)?;
7883        }
7884        if !self.downstream_pk.is_empty() {
7885            struct_ser.serialize_field("downstreamPk", &self.downstream_pk)?;
7886        }
7887        if !self.distribution_key.is_empty() {
7888            struct_ser.serialize_field("distributionKey", &self.distribution_key)?;
7889        }
7890        if !self.properties.is_empty() {
7891            struct_ser.serialize_field("properties", &self.properties)?;
7892        }
7893        if self.sink_type != 0 {
7894            let v = super::catalog::SinkType::try_from(self.sink_type)
7895                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.sink_type)))?;
7896            struct_ser.serialize_field("sinkType", &v)?;
7897        }
7898        if !self.column_catalogs.is_empty() {
7899            struct_ser.serialize_field("columnCatalogs", &self.column_catalogs)?;
7900        }
7901        if !self.db_name.is_empty() {
7902            struct_ser.serialize_field("dbName", &self.db_name)?;
7903        }
7904        if !self.sink_from_name.is_empty() {
7905            struct_ser.serialize_field("sinkFromName", &self.sink_from_name)?;
7906        }
7907        if let Some(v) = self.format_desc.as_ref() {
7908            struct_ser.serialize_field("formatDesc", v)?;
7909        }
7910        if let Some(v) = self.target_table.as_ref() {
7911            struct_ser.serialize_field("targetTable", v)?;
7912        }
7913        if let Some(v) = self.extra_partition_col_idx.as_ref() {
7914            #[allow(clippy::needless_borrow)]
7915            #[allow(clippy::needless_borrows_for_generic_args)]
7916            struct_ser.serialize_field("extraPartitionColIdx", ToString::to_string(&v).as_str())?;
7917        }
7918        if !self.secret_refs.is_empty() {
7919            struct_ser.serialize_field("secretRefs", &self.secret_refs)?;
7920        }
7921        struct_ser.end()
7922    }
7923}
7924impl<'de> serde::Deserialize<'de> for SinkDesc {
7925    #[allow(deprecated)]
7926    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7927    where
7928        D: serde::Deserializer<'de>,
7929    {
7930        const FIELDS: &[&str] = &[
7931            "id",
7932            "name",
7933            "definition",
7934            "plan_pk",
7935            "planPk",
7936            "downstream_pk",
7937            "downstreamPk",
7938            "distribution_key",
7939            "distributionKey",
7940            "properties",
7941            "sink_type",
7942            "sinkType",
7943            "column_catalogs",
7944            "columnCatalogs",
7945            "db_name",
7946            "dbName",
7947            "sink_from_name",
7948            "sinkFromName",
7949            "format_desc",
7950            "formatDesc",
7951            "target_table",
7952            "targetTable",
7953            "extra_partition_col_idx",
7954            "extraPartitionColIdx",
7955            "secret_refs",
7956            "secretRefs",
7957        ];
7958
7959        #[allow(clippy::enum_variant_names)]
7960        enum GeneratedField {
7961            Id,
7962            Name,
7963            Definition,
7964            PlanPk,
7965            DownstreamPk,
7966            DistributionKey,
7967            Properties,
7968            SinkType,
7969            ColumnCatalogs,
7970            DbName,
7971            SinkFromName,
7972            FormatDesc,
7973            TargetTable,
7974            ExtraPartitionColIdx,
7975            SecretRefs,
7976        }
7977        impl<'de> serde::Deserialize<'de> for GeneratedField {
7978            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
7979            where
7980                D: serde::Deserializer<'de>,
7981            {
7982                struct GeneratedVisitor;
7983
7984                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
7985                    type Value = GeneratedField;
7986
7987                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7988                        write!(formatter, "expected one of: {:?}", &FIELDS)
7989                    }
7990
7991                    #[allow(unused_variables)]
7992                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
7993                    where
7994                        E: serde::de::Error,
7995                    {
7996                        match value {
7997                            "id" => Ok(GeneratedField::Id),
7998                            "name" => Ok(GeneratedField::Name),
7999                            "definition" => Ok(GeneratedField::Definition),
8000                            "planPk" | "plan_pk" => Ok(GeneratedField::PlanPk),
8001                            "downstreamPk" | "downstream_pk" => Ok(GeneratedField::DownstreamPk),
8002                            "distributionKey" | "distribution_key" => Ok(GeneratedField::DistributionKey),
8003                            "properties" => Ok(GeneratedField::Properties),
8004                            "sinkType" | "sink_type" => Ok(GeneratedField::SinkType),
8005                            "columnCatalogs" | "column_catalogs" => Ok(GeneratedField::ColumnCatalogs),
8006                            "dbName" | "db_name" => Ok(GeneratedField::DbName),
8007                            "sinkFromName" | "sink_from_name" => Ok(GeneratedField::SinkFromName),
8008                            "formatDesc" | "format_desc" => Ok(GeneratedField::FormatDesc),
8009                            "targetTable" | "target_table" => Ok(GeneratedField::TargetTable),
8010                            "extraPartitionColIdx" | "extra_partition_col_idx" => Ok(GeneratedField::ExtraPartitionColIdx),
8011                            "secretRefs" | "secret_refs" => Ok(GeneratedField::SecretRefs),
8012                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8013                        }
8014                    }
8015                }
8016                deserializer.deserialize_identifier(GeneratedVisitor)
8017            }
8018        }
8019        struct GeneratedVisitor;
8020        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8021            type Value = SinkDesc;
8022
8023            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8024                formatter.write_str("struct stream_plan.SinkDesc")
8025            }
8026
8027            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SinkDesc, V::Error>
8028                where
8029                    V: serde::de::MapAccess<'de>,
8030            {
8031                let mut id__ = None;
8032                let mut name__ = None;
8033                let mut definition__ = None;
8034                let mut plan_pk__ = None;
8035                let mut downstream_pk__ = None;
8036                let mut distribution_key__ = None;
8037                let mut properties__ = None;
8038                let mut sink_type__ = None;
8039                let mut column_catalogs__ = None;
8040                let mut db_name__ = None;
8041                let mut sink_from_name__ = None;
8042                let mut format_desc__ = None;
8043                let mut target_table__ = None;
8044                let mut extra_partition_col_idx__ = None;
8045                let mut secret_refs__ = None;
8046                while let Some(k) = map_.next_key()? {
8047                    match k {
8048                        GeneratedField::Id => {
8049                            if id__.is_some() {
8050                                return Err(serde::de::Error::duplicate_field("id"));
8051                            }
8052                            id__ = 
8053                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
8054                            ;
8055                        }
8056                        GeneratedField::Name => {
8057                            if name__.is_some() {
8058                                return Err(serde::de::Error::duplicate_field("name"));
8059                            }
8060                            name__ = Some(map_.next_value()?);
8061                        }
8062                        GeneratedField::Definition => {
8063                            if definition__.is_some() {
8064                                return Err(serde::de::Error::duplicate_field("definition"));
8065                            }
8066                            definition__ = Some(map_.next_value()?);
8067                        }
8068                        GeneratedField::PlanPk => {
8069                            if plan_pk__.is_some() {
8070                                return Err(serde::de::Error::duplicate_field("planPk"));
8071                            }
8072                            plan_pk__ = Some(map_.next_value()?);
8073                        }
8074                        GeneratedField::DownstreamPk => {
8075                            if downstream_pk__.is_some() {
8076                                return Err(serde::de::Error::duplicate_field("downstreamPk"));
8077                            }
8078                            downstream_pk__ = 
8079                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
8080                                    .into_iter().map(|x| x.0).collect())
8081                            ;
8082                        }
8083                        GeneratedField::DistributionKey => {
8084                            if distribution_key__.is_some() {
8085                                return Err(serde::de::Error::duplicate_field("distributionKey"));
8086                            }
8087                            distribution_key__ = 
8088                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
8089                                    .into_iter().map(|x| x.0).collect())
8090                            ;
8091                        }
8092                        GeneratedField::Properties => {
8093                            if properties__.is_some() {
8094                                return Err(serde::de::Error::duplicate_field("properties"));
8095                            }
8096                            properties__ = Some(
8097                                map_.next_value::<std::collections::BTreeMap<_, _>>()?
8098                            );
8099                        }
8100                        GeneratedField::SinkType => {
8101                            if sink_type__.is_some() {
8102                                return Err(serde::de::Error::duplicate_field("sinkType"));
8103                            }
8104                            sink_type__ = Some(map_.next_value::<super::catalog::SinkType>()? as i32);
8105                        }
8106                        GeneratedField::ColumnCatalogs => {
8107                            if column_catalogs__.is_some() {
8108                                return Err(serde::de::Error::duplicate_field("columnCatalogs"));
8109                            }
8110                            column_catalogs__ = Some(map_.next_value()?);
8111                        }
8112                        GeneratedField::DbName => {
8113                            if db_name__.is_some() {
8114                                return Err(serde::de::Error::duplicate_field("dbName"));
8115                            }
8116                            db_name__ = Some(map_.next_value()?);
8117                        }
8118                        GeneratedField::SinkFromName => {
8119                            if sink_from_name__.is_some() {
8120                                return Err(serde::de::Error::duplicate_field("sinkFromName"));
8121                            }
8122                            sink_from_name__ = Some(map_.next_value()?);
8123                        }
8124                        GeneratedField::FormatDesc => {
8125                            if format_desc__.is_some() {
8126                                return Err(serde::de::Error::duplicate_field("formatDesc"));
8127                            }
8128                            format_desc__ = map_.next_value()?;
8129                        }
8130                        GeneratedField::TargetTable => {
8131                            if target_table__.is_some() {
8132                                return Err(serde::de::Error::duplicate_field("targetTable"));
8133                            }
8134                            target_table__ = 
8135                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
8136                            ;
8137                        }
8138                        GeneratedField::ExtraPartitionColIdx => {
8139                            if extra_partition_col_idx__.is_some() {
8140                                return Err(serde::de::Error::duplicate_field("extraPartitionColIdx"));
8141                            }
8142                            extra_partition_col_idx__ = 
8143                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
8144                            ;
8145                        }
8146                        GeneratedField::SecretRefs => {
8147                            if secret_refs__.is_some() {
8148                                return Err(serde::de::Error::duplicate_field("secretRefs"));
8149                            }
8150                            secret_refs__ = Some(
8151                                map_.next_value::<std::collections::BTreeMap<_, _>>()?
8152                            );
8153                        }
8154                    }
8155                }
8156                Ok(SinkDesc {
8157                    id: id__.unwrap_or_default(),
8158                    name: name__.unwrap_or_default(),
8159                    definition: definition__.unwrap_or_default(),
8160                    plan_pk: plan_pk__.unwrap_or_default(),
8161                    downstream_pk: downstream_pk__.unwrap_or_default(),
8162                    distribution_key: distribution_key__.unwrap_or_default(),
8163                    properties: properties__.unwrap_or_default(),
8164                    sink_type: sink_type__.unwrap_or_default(),
8165                    column_catalogs: column_catalogs__.unwrap_or_default(),
8166                    db_name: db_name__.unwrap_or_default(),
8167                    sink_from_name: sink_from_name__.unwrap_or_default(),
8168                    format_desc: format_desc__,
8169                    target_table: target_table__,
8170                    extra_partition_col_idx: extra_partition_col_idx__,
8171                    secret_refs: secret_refs__.unwrap_or_default(),
8172                })
8173            }
8174        }
8175        deserializer.deserialize_struct("stream_plan.SinkDesc", FIELDS, GeneratedVisitor)
8176    }
8177}
8178impl serde::Serialize for SinkLogStoreType {
8179    #[allow(deprecated)]
8180    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8181    where
8182        S: serde::Serializer,
8183    {
8184        let variant = match self {
8185            Self::Unspecified => "SINK_LOG_STORE_TYPE_UNSPECIFIED",
8186            Self::KvLogStore => "SINK_LOG_STORE_TYPE_KV_LOG_STORE",
8187            Self::InMemoryLogStore => "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE",
8188        };
8189        serializer.serialize_str(variant)
8190    }
8191}
8192impl<'de> serde::Deserialize<'de> for SinkLogStoreType {
8193    #[allow(deprecated)]
8194    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8195    where
8196        D: serde::Deserializer<'de>,
8197    {
8198        const FIELDS: &[&str] = &[
8199            "SINK_LOG_STORE_TYPE_UNSPECIFIED",
8200            "SINK_LOG_STORE_TYPE_KV_LOG_STORE",
8201            "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE",
8202        ];
8203
8204        struct GeneratedVisitor;
8205
8206        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8207            type Value = SinkLogStoreType;
8208
8209            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8210                write!(formatter, "expected one of: {:?}", &FIELDS)
8211            }
8212
8213            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
8214            where
8215                E: serde::de::Error,
8216            {
8217                i32::try_from(v)
8218                    .ok()
8219                    .and_then(|x| x.try_into().ok())
8220                    .ok_or_else(|| {
8221                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
8222                    })
8223            }
8224
8225            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
8226            where
8227                E: serde::de::Error,
8228            {
8229                i32::try_from(v)
8230                    .ok()
8231                    .and_then(|x| x.try_into().ok())
8232                    .ok_or_else(|| {
8233                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
8234                    })
8235            }
8236
8237            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8238            where
8239                E: serde::de::Error,
8240            {
8241                match value {
8242                    "SINK_LOG_STORE_TYPE_UNSPECIFIED" => Ok(SinkLogStoreType::Unspecified),
8243                    "SINK_LOG_STORE_TYPE_KV_LOG_STORE" => Ok(SinkLogStoreType::KvLogStore),
8244                    "SINK_LOG_STORE_TYPE_IN_MEMORY_LOG_STORE" => Ok(SinkLogStoreType::InMemoryLogStore),
8245                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
8246                }
8247            }
8248        }
8249        deserializer.deserialize_any(GeneratedVisitor)
8250    }
8251}
8252impl serde::Serialize for SinkNode {
8253    #[allow(deprecated)]
8254    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8255    where
8256        S: serde::Serializer,
8257    {
8258        use serde::ser::SerializeStruct;
8259        let mut len = 0;
8260        if self.sink_desc.is_some() {
8261            len += 1;
8262        }
8263        if self.table.is_some() {
8264            len += 1;
8265        }
8266        if self.log_store_type != 0 {
8267            len += 1;
8268        }
8269        if self.rate_limit.is_some() {
8270            len += 1;
8271        }
8272        let mut struct_ser = serializer.serialize_struct("stream_plan.SinkNode", len)?;
8273        if let Some(v) = self.sink_desc.as_ref() {
8274            struct_ser.serialize_field("sinkDesc", v)?;
8275        }
8276        if let Some(v) = self.table.as_ref() {
8277            struct_ser.serialize_field("table", v)?;
8278        }
8279        if self.log_store_type != 0 {
8280            let v = SinkLogStoreType::try_from(self.log_store_type)
8281                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.log_store_type)))?;
8282            struct_ser.serialize_field("logStoreType", &v)?;
8283        }
8284        if let Some(v) = self.rate_limit.as_ref() {
8285            struct_ser.serialize_field("rateLimit", v)?;
8286        }
8287        struct_ser.end()
8288    }
8289}
8290impl<'de> serde::Deserialize<'de> for SinkNode {
8291    #[allow(deprecated)]
8292    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8293    where
8294        D: serde::Deserializer<'de>,
8295    {
8296        const FIELDS: &[&str] = &[
8297            "sink_desc",
8298            "sinkDesc",
8299            "table",
8300            "log_store_type",
8301            "logStoreType",
8302            "rate_limit",
8303            "rateLimit",
8304        ];
8305
8306        #[allow(clippy::enum_variant_names)]
8307        enum GeneratedField {
8308            SinkDesc,
8309            Table,
8310            LogStoreType,
8311            RateLimit,
8312        }
8313        impl<'de> serde::Deserialize<'de> for GeneratedField {
8314            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8315            where
8316                D: serde::Deserializer<'de>,
8317            {
8318                struct GeneratedVisitor;
8319
8320                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8321                    type Value = GeneratedField;
8322
8323                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8324                        write!(formatter, "expected one of: {:?}", &FIELDS)
8325                    }
8326
8327                    #[allow(unused_variables)]
8328                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8329                    where
8330                        E: serde::de::Error,
8331                    {
8332                        match value {
8333                            "sinkDesc" | "sink_desc" => Ok(GeneratedField::SinkDesc),
8334                            "table" => Ok(GeneratedField::Table),
8335                            "logStoreType" | "log_store_type" => Ok(GeneratedField::LogStoreType),
8336                            "rateLimit" | "rate_limit" => Ok(GeneratedField::RateLimit),
8337                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8338                        }
8339                    }
8340                }
8341                deserializer.deserialize_identifier(GeneratedVisitor)
8342            }
8343        }
8344        struct GeneratedVisitor;
8345        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8346            type Value = SinkNode;
8347
8348            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8349                formatter.write_str("struct stream_plan.SinkNode")
8350            }
8351
8352            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SinkNode, V::Error>
8353                where
8354                    V: serde::de::MapAccess<'de>,
8355            {
8356                let mut sink_desc__ = None;
8357                let mut table__ = None;
8358                let mut log_store_type__ = None;
8359                let mut rate_limit__ = None;
8360                while let Some(k) = map_.next_key()? {
8361                    match k {
8362                        GeneratedField::SinkDesc => {
8363                            if sink_desc__.is_some() {
8364                                return Err(serde::de::Error::duplicate_field("sinkDesc"));
8365                            }
8366                            sink_desc__ = map_.next_value()?;
8367                        }
8368                        GeneratedField::Table => {
8369                            if table__.is_some() {
8370                                return Err(serde::de::Error::duplicate_field("table"));
8371                            }
8372                            table__ = map_.next_value()?;
8373                        }
8374                        GeneratedField::LogStoreType => {
8375                            if log_store_type__.is_some() {
8376                                return Err(serde::de::Error::duplicate_field("logStoreType"));
8377                            }
8378                            log_store_type__ = Some(map_.next_value::<SinkLogStoreType>()? as i32);
8379                        }
8380                        GeneratedField::RateLimit => {
8381                            if rate_limit__.is_some() {
8382                                return Err(serde::de::Error::duplicate_field("rateLimit"));
8383                            }
8384                            rate_limit__ = 
8385                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
8386                            ;
8387                        }
8388                    }
8389                }
8390                Ok(SinkNode {
8391                    sink_desc: sink_desc__,
8392                    table: table__,
8393                    log_store_type: log_store_type__.unwrap_or_default(),
8394                    rate_limit: rate_limit__,
8395                })
8396            }
8397        }
8398        deserializer.deserialize_struct("stream_plan.SinkNode", FIELDS, GeneratedVisitor)
8399    }
8400}
8401impl serde::Serialize for SortNode {
8402    #[allow(deprecated)]
8403    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8404    where
8405        S: serde::Serializer,
8406    {
8407        use serde::ser::SerializeStruct;
8408        let mut len = 0;
8409        if self.state_table.is_some() {
8410            len += 1;
8411        }
8412        if self.sort_column_index != 0 {
8413            len += 1;
8414        }
8415        let mut struct_ser = serializer.serialize_struct("stream_plan.SortNode", len)?;
8416        if let Some(v) = self.state_table.as_ref() {
8417            struct_ser.serialize_field("stateTable", v)?;
8418        }
8419        if self.sort_column_index != 0 {
8420            struct_ser.serialize_field("sortColumnIndex", &self.sort_column_index)?;
8421        }
8422        struct_ser.end()
8423    }
8424}
8425impl<'de> serde::Deserialize<'de> for SortNode {
8426    #[allow(deprecated)]
8427    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8428    where
8429        D: serde::Deserializer<'de>,
8430    {
8431        const FIELDS: &[&str] = &[
8432            "state_table",
8433            "stateTable",
8434            "sort_column_index",
8435            "sortColumnIndex",
8436        ];
8437
8438        #[allow(clippy::enum_variant_names)]
8439        enum GeneratedField {
8440            StateTable,
8441            SortColumnIndex,
8442        }
8443        impl<'de> serde::Deserialize<'de> for GeneratedField {
8444            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8445            where
8446                D: serde::Deserializer<'de>,
8447            {
8448                struct GeneratedVisitor;
8449
8450                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8451                    type Value = GeneratedField;
8452
8453                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8454                        write!(formatter, "expected one of: {:?}", &FIELDS)
8455                    }
8456
8457                    #[allow(unused_variables)]
8458                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8459                    where
8460                        E: serde::de::Error,
8461                    {
8462                        match value {
8463                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
8464                            "sortColumnIndex" | "sort_column_index" => Ok(GeneratedField::SortColumnIndex),
8465                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8466                        }
8467                    }
8468                }
8469                deserializer.deserialize_identifier(GeneratedVisitor)
8470            }
8471        }
8472        struct GeneratedVisitor;
8473        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8474            type Value = SortNode;
8475
8476            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8477                formatter.write_str("struct stream_plan.SortNode")
8478            }
8479
8480            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SortNode, V::Error>
8481                where
8482                    V: serde::de::MapAccess<'de>,
8483            {
8484                let mut state_table__ = None;
8485                let mut sort_column_index__ = None;
8486                while let Some(k) = map_.next_key()? {
8487                    match k {
8488                        GeneratedField::StateTable => {
8489                            if state_table__.is_some() {
8490                                return Err(serde::de::Error::duplicate_field("stateTable"));
8491                            }
8492                            state_table__ = map_.next_value()?;
8493                        }
8494                        GeneratedField::SortColumnIndex => {
8495                            if sort_column_index__.is_some() {
8496                                return Err(serde::de::Error::duplicate_field("sortColumnIndex"));
8497                            }
8498                            sort_column_index__ = 
8499                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
8500                            ;
8501                        }
8502                    }
8503                }
8504                Ok(SortNode {
8505                    state_table: state_table__,
8506                    sort_column_index: sort_column_index__.unwrap_or_default(),
8507                })
8508            }
8509        }
8510        deserializer.deserialize_struct("stream_plan.SortNode", FIELDS, GeneratedVisitor)
8511    }
8512}
8513impl serde::Serialize for SourceBackfillNode {
8514    #[allow(deprecated)]
8515    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8516    where
8517        S: serde::Serializer,
8518    {
8519        use serde::ser::SerializeStruct;
8520        let mut len = 0;
8521        if self.upstream_source_id != 0 {
8522            len += 1;
8523        }
8524        if self.row_id_index.is_some() {
8525            len += 1;
8526        }
8527        if !self.columns.is_empty() {
8528            len += 1;
8529        }
8530        if self.info.is_some() {
8531            len += 1;
8532        }
8533        if !self.source_name.is_empty() {
8534            len += 1;
8535        }
8536        if !self.with_properties.is_empty() {
8537            len += 1;
8538        }
8539        if self.rate_limit.is_some() {
8540            len += 1;
8541        }
8542        if self.state_table.is_some() {
8543            len += 1;
8544        }
8545        if !self.secret_refs.is_empty() {
8546            len += 1;
8547        }
8548        let mut struct_ser = serializer.serialize_struct("stream_plan.SourceBackfillNode", len)?;
8549        if self.upstream_source_id != 0 {
8550            struct_ser.serialize_field("upstreamSourceId", &self.upstream_source_id)?;
8551        }
8552        if let Some(v) = self.row_id_index.as_ref() {
8553            struct_ser.serialize_field("rowIdIndex", v)?;
8554        }
8555        if !self.columns.is_empty() {
8556            struct_ser.serialize_field("columns", &self.columns)?;
8557        }
8558        if let Some(v) = self.info.as_ref() {
8559            struct_ser.serialize_field("info", v)?;
8560        }
8561        if !self.source_name.is_empty() {
8562            struct_ser.serialize_field("sourceName", &self.source_name)?;
8563        }
8564        if !self.with_properties.is_empty() {
8565            struct_ser.serialize_field("withProperties", &self.with_properties)?;
8566        }
8567        if let Some(v) = self.rate_limit.as_ref() {
8568            struct_ser.serialize_field("rateLimit", v)?;
8569        }
8570        if let Some(v) = self.state_table.as_ref() {
8571            struct_ser.serialize_field("stateTable", v)?;
8572        }
8573        if !self.secret_refs.is_empty() {
8574            struct_ser.serialize_field("secretRefs", &self.secret_refs)?;
8575        }
8576        struct_ser.end()
8577    }
8578}
8579impl<'de> serde::Deserialize<'de> for SourceBackfillNode {
8580    #[allow(deprecated)]
8581    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8582    where
8583        D: serde::Deserializer<'de>,
8584    {
8585        const FIELDS: &[&str] = &[
8586            "upstream_source_id",
8587            "upstreamSourceId",
8588            "row_id_index",
8589            "rowIdIndex",
8590            "columns",
8591            "info",
8592            "source_name",
8593            "sourceName",
8594            "with_properties",
8595            "withProperties",
8596            "rate_limit",
8597            "rateLimit",
8598            "state_table",
8599            "stateTable",
8600            "secret_refs",
8601            "secretRefs",
8602        ];
8603
8604        #[allow(clippy::enum_variant_names)]
8605        enum GeneratedField {
8606            UpstreamSourceId,
8607            RowIdIndex,
8608            Columns,
8609            Info,
8610            SourceName,
8611            WithProperties,
8612            RateLimit,
8613            StateTable,
8614            SecretRefs,
8615        }
8616        impl<'de> serde::Deserialize<'de> for GeneratedField {
8617            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8618            where
8619                D: serde::Deserializer<'de>,
8620            {
8621                struct GeneratedVisitor;
8622
8623                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8624                    type Value = GeneratedField;
8625
8626                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8627                        write!(formatter, "expected one of: {:?}", &FIELDS)
8628                    }
8629
8630                    #[allow(unused_variables)]
8631                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8632                    where
8633                        E: serde::de::Error,
8634                    {
8635                        match value {
8636                            "upstreamSourceId" | "upstream_source_id" => Ok(GeneratedField::UpstreamSourceId),
8637                            "rowIdIndex" | "row_id_index" => Ok(GeneratedField::RowIdIndex),
8638                            "columns" => Ok(GeneratedField::Columns),
8639                            "info" => Ok(GeneratedField::Info),
8640                            "sourceName" | "source_name" => Ok(GeneratedField::SourceName),
8641                            "withProperties" | "with_properties" => Ok(GeneratedField::WithProperties),
8642                            "rateLimit" | "rate_limit" => Ok(GeneratedField::RateLimit),
8643                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
8644                            "secretRefs" | "secret_refs" => Ok(GeneratedField::SecretRefs),
8645                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8646                        }
8647                    }
8648                }
8649                deserializer.deserialize_identifier(GeneratedVisitor)
8650            }
8651        }
8652        struct GeneratedVisitor;
8653        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8654            type Value = SourceBackfillNode;
8655
8656            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8657                formatter.write_str("struct stream_plan.SourceBackfillNode")
8658            }
8659
8660            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SourceBackfillNode, V::Error>
8661                where
8662                    V: serde::de::MapAccess<'de>,
8663            {
8664                let mut upstream_source_id__ = None;
8665                let mut row_id_index__ = None;
8666                let mut columns__ = None;
8667                let mut info__ = None;
8668                let mut source_name__ = None;
8669                let mut with_properties__ = None;
8670                let mut rate_limit__ = None;
8671                let mut state_table__ = None;
8672                let mut secret_refs__ = None;
8673                while let Some(k) = map_.next_key()? {
8674                    match k {
8675                        GeneratedField::UpstreamSourceId => {
8676                            if upstream_source_id__.is_some() {
8677                                return Err(serde::de::Error::duplicate_field("upstreamSourceId"));
8678                            }
8679                            upstream_source_id__ = 
8680                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
8681                            ;
8682                        }
8683                        GeneratedField::RowIdIndex => {
8684                            if row_id_index__.is_some() {
8685                                return Err(serde::de::Error::duplicate_field("rowIdIndex"));
8686                            }
8687                            row_id_index__ = 
8688                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
8689                            ;
8690                        }
8691                        GeneratedField::Columns => {
8692                            if columns__.is_some() {
8693                                return Err(serde::de::Error::duplicate_field("columns"));
8694                            }
8695                            columns__ = Some(map_.next_value()?);
8696                        }
8697                        GeneratedField::Info => {
8698                            if info__.is_some() {
8699                                return Err(serde::de::Error::duplicate_field("info"));
8700                            }
8701                            info__ = map_.next_value()?;
8702                        }
8703                        GeneratedField::SourceName => {
8704                            if source_name__.is_some() {
8705                                return Err(serde::de::Error::duplicate_field("sourceName"));
8706                            }
8707                            source_name__ = Some(map_.next_value()?);
8708                        }
8709                        GeneratedField::WithProperties => {
8710                            if with_properties__.is_some() {
8711                                return Err(serde::de::Error::duplicate_field("withProperties"));
8712                            }
8713                            with_properties__ = Some(
8714                                map_.next_value::<std::collections::BTreeMap<_, _>>()?
8715                            );
8716                        }
8717                        GeneratedField::RateLimit => {
8718                            if rate_limit__.is_some() {
8719                                return Err(serde::de::Error::duplicate_field("rateLimit"));
8720                            }
8721                            rate_limit__ = 
8722                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
8723                            ;
8724                        }
8725                        GeneratedField::StateTable => {
8726                            if state_table__.is_some() {
8727                                return Err(serde::de::Error::duplicate_field("stateTable"));
8728                            }
8729                            state_table__ = map_.next_value()?;
8730                        }
8731                        GeneratedField::SecretRefs => {
8732                            if secret_refs__.is_some() {
8733                                return Err(serde::de::Error::duplicate_field("secretRefs"));
8734                            }
8735                            secret_refs__ = Some(
8736                                map_.next_value::<std::collections::BTreeMap<_, _>>()?
8737                            );
8738                        }
8739                    }
8740                }
8741                Ok(SourceBackfillNode {
8742                    upstream_source_id: upstream_source_id__.unwrap_or_default(),
8743                    row_id_index: row_id_index__,
8744                    columns: columns__.unwrap_or_default(),
8745                    info: info__,
8746                    source_name: source_name__.unwrap_or_default(),
8747                    with_properties: with_properties__.unwrap_or_default(),
8748                    rate_limit: rate_limit__,
8749                    state_table: state_table__,
8750                    secret_refs: secret_refs__.unwrap_or_default(),
8751                })
8752            }
8753        }
8754        deserializer.deserialize_struct("stream_plan.SourceBackfillNode", FIELDS, GeneratedVisitor)
8755    }
8756}
8757impl serde::Serialize for SourceChangeSplitMutation {
8758    #[allow(deprecated)]
8759    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8760    where
8761        S: serde::Serializer,
8762    {
8763        use serde::ser::SerializeStruct;
8764        let mut len = 0;
8765        if !self.actor_splits.is_empty() {
8766            len += 1;
8767        }
8768        let mut struct_ser = serializer.serialize_struct("stream_plan.SourceChangeSplitMutation", len)?;
8769        if !self.actor_splits.is_empty() {
8770            struct_ser.serialize_field("actorSplits", &self.actor_splits)?;
8771        }
8772        struct_ser.end()
8773    }
8774}
8775impl<'de> serde::Deserialize<'de> for SourceChangeSplitMutation {
8776    #[allow(deprecated)]
8777    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8778    where
8779        D: serde::Deserializer<'de>,
8780    {
8781        const FIELDS: &[&str] = &[
8782            "actor_splits",
8783            "actorSplits",
8784        ];
8785
8786        #[allow(clippy::enum_variant_names)]
8787        enum GeneratedField {
8788            ActorSplits,
8789        }
8790        impl<'de> serde::Deserialize<'de> for GeneratedField {
8791            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8792            where
8793                D: serde::Deserializer<'de>,
8794            {
8795                struct GeneratedVisitor;
8796
8797                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8798                    type Value = GeneratedField;
8799
8800                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8801                        write!(formatter, "expected one of: {:?}", &FIELDS)
8802                    }
8803
8804                    #[allow(unused_variables)]
8805                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8806                    where
8807                        E: serde::de::Error,
8808                    {
8809                        match value {
8810                            "actorSplits" | "actor_splits" => Ok(GeneratedField::ActorSplits),
8811                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8812                        }
8813                    }
8814                }
8815                deserializer.deserialize_identifier(GeneratedVisitor)
8816            }
8817        }
8818        struct GeneratedVisitor;
8819        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8820            type Value = SourceChangeSplitMutation;
8821
8822            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8823                formatter.write_str("struct stream_plan.SourceChangeSplitMutation")
8824            }
8825
8826            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SourceChangeSplitMutation, V::Error>
8827                where
8828                    V: serde::de::MapAccess<'de>,
8829            {
8830                let mut actor_splits__ = None;
8831                while let Some(k) = map_.next_key()? {
8832                    match k {
8833                        GeneratedField::ActorSplits => {
8834                            if actor_splits__.is_some() {
8835                                return Err(serde::de::Error::duplicate_field("actorSplits"));
8836                            }
8837                            actor_splits__ = Some(
8838                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
8839                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
8840                            );
8841                        }
8842                    }
8843                }
8844                Ok(SourceChangeSplitMutation {
8845                    actor_splits: actor_splits__.unwrap_or_default(),
8846                })
8847            }
8848        }
8849        deserializer.deserialize_struct("stream_plan.SourceChangeSplitMutation", FIELDS, GeneratedVisitor)
8850    }
8851}
8852impl serde::Serialize for SourceNode {
8853    #[allow(deprecated)]
8854    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8855    where
8856        S: serde::Serializer,
8857    {
8858        use serde::ser::SerializeStruct;
8859        let mut len = 0;
8860        if self.source_inner.is_some() {
8861            len += 1;
8862        }
8863        let mut struct_ser = serializer.serialize_struct("stream_plan.SourceNode", len)?;
8864        if let Some(v) = self.source_inner.as_ref() {
8865            struct_ser.serialize_field("sourceInner", v)?;
8866        }
8867        struct_ser.end()
8868    }
8869}
8870impl<'de> serde::Deserialize<'de> for SourceNode {
8871    #[allow(deprecated)]
8872    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8873    where
8874        D: serde::Deserializer<'de>,
8875    {
8876        const FIELDS: &[&str] = &[
8877            "source_inner",
8878            "sourceInner",
8879        ];
8880
8881        #[allow(clippy::enum_variant_names)]
8882        enum GeneratedField {
8883            SourceInner,
8884        }
8885        impl<'de> serde::Deserialize<'de> for GeneratedField {
8886            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8887            where
8888                D: serde::Deserializer<'de>,
8889            {
8890                struct GeneratedVisitor;
8891
8892                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8893                    type Value = GeneratedField;
8894
8895                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8896                        write!(formatter, "expected one of: {:?}", &FIELDS)
8897                    }
8898
8899                    #[allow(unused_variables)]
8900                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8901                    where
8902                        E: serde::de::Error,
8903                    {
8904                        match value {
8905                            "sourceInner" | "source_inner" => Ok(GeneratedField::SourceInner),
8906                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8907                        }
8908                    }
8909                }
8910                deserializer.deserialize_identifier(GeneratedVisitor)
8911            }
8912        }
8913        struct GeneratedVisitor;
8914        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8915            type Value = SourceNode;
8916
8917            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8918                formatter.write_str("struct stream_plan.SourceNode")
8919            }
8920
8921            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SourceNode, V::Error>
8922                where
8923                    V: serde::de::MapAccess<'de>,
8924            {
8925                let mut source_inner__ = None;
8926                while let Some(k) = map_.next_key()? {
8927                    match k {
8928                        GeneratedField::SourceInner => {
8929                            if source_inner__.is_some() {
8930                                return Err(serde::de::Error::duplicate_field("sourceInner"));
8931                            }
8932                            source_inner__ = map_.next_value()?;
8933                        }
8934                    }
8935                }
8936                Ok(SourceNode {
8937                    source_inner: source_inner__,
8938                })
8939            }
8940        }
8941        deserializer.deserialize_struct("stream_plan.SourceNode", FIELDS, GeneratedVisitor)
8942    }
8943}
8944impl serde::Serialize for StopMutation {
8945    #[allow(deprecated)]
8946    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8947    where
8948        S: serde::Serializer,
8949    {
8950        use serde::ser::SerializeStruct;
8951        let mut len = 0;
8952        if !self.actors.is_empty() {
8953            len += 1;
8954        }
8955        let mut struct_ser = serializer.serialize_struct("stream_plan.StopMutation", len)?;
8956        if !self.actors.is_empty() {
8957            struct_ser.serialize_field("actors", &self.actors)?;
8958        }
8959        struct_ser.end()
8960    }
8961}
8962impl<'de> serde::Deserialize<'de> for StopMutation {
8963    #[allow(deprecated)]
8964    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8965    where
8966        D: serde::Deserializer<'de>,
8967    {
8968        const FIELDS: &[&str] = &[
8969            "actors",
8970        ];
8971
8972        #[allow(clippy::enum_variant_names)]
8973        enum GeneratedField {
8974            Actors,
8975        }
8976        impl<'de> serde::Deserialize<'de> for GeneratedField {
8977            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
8978            where
8979                D: serde::Deserializer<'de>,
8980            {
8981                struct GeneratedVisitor;
8982
8983                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
8984                    type Value = GeneratedField;
8985
8986                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8987                        write!(formatter, "expected one of: {:?}", &FIELDS)
8988                    }
8989
8990                    #[allow(unused_variables)]
8991                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
8992                    where
8993                        E: serde::de::Error,
8994                    {
8995                        match value {
8996                            "actors" => Ok(GeneratedField::Actors),
8997                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
8998                        }
8999                    }
9000                }
9001                deserializer.deserialize_identifier(GeneratedVisitor)
9002            }
9003        }
9004        struct GeneratedVisitor;
9005        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9006            type Value = StopMutation;
9007
9008            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9009                formatter.write_str("struct stream_plan.StopMutation")
9010            }
9011
9012            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StopMutation, V::Error>
9013                where
9014                    V: serde::de::MapAccess<'de>,
9015            {
9016                let mut actors__ = None;
9017                while let Some(k) = map_.next_key()? {
9018                    match k {
9019                        GeneratedField::Actors => {
9020                            if actors__.is_some() {
9021                                return Err(serde::de::Error::duplicate_field("actors"));
9022                            }
9023                            actors__ = 
9024                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
9025                                    .into_iter().map(|x| x.0).collect())
9026                            ;
9027                        }
9028                    }
9029                }
9030                Ok(StopMutation {
9031                    actors: actors__.unwrap_or_default(),
9032                })
9033            }
9034        }
9035        deserializer.deserialize_struct("stream_plan.StopMutation", FIELDS, GeneratedVisitor)
9036    }
9037}
9038impl serde::Serialize for StreamActor {
9039    #[allow(deprecated)]
9040    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9041    where
9042        S: serde::Serializer,
9043    {
9044        use serde::ser::SerializeStruct;
9045        let mut len = 0;
9046        if self.actor_id != 0 {
9047            len += 1;
9048        }
9049        if self.fragment_id != 0 {
9050            len += 1;
9051        }
9052        if !self.dispatcher.is_empty() {
9053            len += 1;
9054        }
9055        if self.vnode_bitmap.is_some() {
9056            len += 1;
9057        }
9058        if !self.mview_definition.is_empty() {
9059            len += 1;
9060        }
9061        if self.expr_context.is_some() {
9062            len += 1;
9063        }
9064        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamActor", len)?;
9065        if self.actor_id != 0 {
9066            struct_ser.serialize_field("actorId", &self.actor_id)?;
9067        }
9068        if self.fragment_id != 0 {
9069            struct_ser.serialize_field("fragmentId", &self.fragment_id)?;
9070        }
9071        if !self.dispatcher.is_empty() {
9072            struct_ser.serialize_field("dispatcher", &self.dispatcher)?;
9073        }
9074        if let Some(v) = self.vnode_bitmap.as_ref() {
9075            struct_ser.serialize_field("vnodeBitmap", v)?;
9076        }
9077        if !self.mview_definition.is_empty() {
9078            struct_ser.serialize_field("mviewDefinition", &self.mview_definition)?;
9079        }
9080        if let Some(v) = self.expr_context.as_ref() {
9081            struct_ser.serialize_field("exprContext", v)?;
9082        }
9083        struct_ser.end()
9084    }
9085}
9086impl<'de> serde::Deserialize<'de> for StreamActor {
9087    #[allow(deprecated)]
9088    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9089    where
9090        D: serde::Deserializer<'de>,
9091    {
9092        const FIELDS: &[&str] = &[
9093            "actor_id",
9094            "actorId",
9095            "fragment_id",
9096            "fragmentId",
9097            "dispatcher",
9098            "vnode_bitmap",
9099            "vnodeBitmap",
9100            "mview_definition",
9101            "mviewDefinition",
9102            "expr_context",
9103            "exprContext",
9104        ];
9105
9106        #[allow(clippy::enum_variant_names)]
9107        enum GeneratedField {
9108            ActorId,
9109            FragmentId,
9110            Dispatcher,
9111            VnodeBitmap,
9112            MviewDefinition,
9113            ExprContext,
9114        }
9115        impl<'de> serde::Deserialize<'de> for GeneratedField {
9116            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9117            where
9118                D: serde::Deserializer<'de>,
9119            {
9120                struct GeneratedVisitor;
9121
9122                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9123                    type Value = GeneratedField;
9124
9125                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9126                        write!(formatter, "expected one of: {:?}", &FIELDS)
9127                    }
9128
9129                    #[allow(unused_variables)]
9130                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9131                    where
9132                        E: serde::de::Error,
9133                    {
9134                        match value {
9135                            "actorId" | "actor_id" => Ok(GeneratedField::ActorId),
9136                            "fragmentId" | "fragment_id" => Ok(GeneratedField::FragmentId),
9137                            "dispatcher" => Ok(GeneratedField::Dispatcher),
9138                            "vnodeBitmap" | "vnode_bitmap" => Ok(GeneratedField::VnodeBitmap),
9139                            "mviewDefinition" | "mview_definition" => Ok(GeneratedField::MviewDefinition),
9140                            "exprContext" | "expr_context" => Ok(GeneratedField::ExprContext),
9141                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9142                        }
9143                    }
9144                }
9145                deserializer.deserialize_identifier(GeneratedVisitor)
9146            }
9147        }
9148        struct GeneratedVisitor;
9149        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9150            type Value = StreamActor;
9151
9152            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9153                formatter.write_str("struct stream_plan.StreamActor")
9154            }
9155
9156            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamActor, V::Error>
9157                where
9158                    V: serde::de::MapAccess<'de>,
9159            {
9160                let mut actor_id__ = None;
9161                let mut fragment_id__ = None;
9162                let mut dispatcher__ = None;
9163                let mut vnode_bitmap__ = None;
9164                let mut mview_definition__ = None;
9165                let mut expr_context__ = None;
9166                while let Some(k) = map_.next_key()? {
9167                    match k {
9168                        GeneratedField::ActorId => {
9169                            if actor_id__.is_some() {
9170                                return Err(serde::de::Error::duplicate_field("actorId"));
9171                            }
9172                            actor_id__ = 
9173                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9174                            ;
9175                        }
9176                        GeneratedField::FragmentId => {
9177                            if fragment_id__.is_some() {
9178                                return Err(serde::de::Error::duplicate_field("fragmentId"));
9179                            }
9180                            fragment_id__ = 
9181                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9182                            ;
9183                        }
9184                        GeneratedField::Dispatcher => {
9185                            if dispatcher__.is_some() {
9186                                return Err(serde::de::Error::duplicate_field("dispatcher"));
9187                            }
9188                            dispatcher__ = Some(map_.next_value()?);
9189                        }
9190                        GeneratedField::VnodeBitmap => {
9191                            if vnode_bitmap__.is_some() {
9192                                return Err(serde::de::Error::duplicate_field("vnodeBitmap"));
9193                            }
9194                            vnode_bitmap__ = map_.next_value()?;
9195                        }
9196                        GeneratedField::MviewDefinition => {
9197                            if mview_definition__.is_some() {
9198                                return Err(serde::de::Error::duplicate_field("mviewDefinition"));
9199                            }
9200                            mview_definition__ = Some(map_.next_value()?);
9201                        }
9202                        GeneratedField::ExprContext => {
9203                            if expr_context__.is_some() {
9204                                return Err(serde::de::Error::duplicate_field("exprContext"));
9205                            }
9206                            expr_context__ = map_.next_value()?;
9207                        }
9208                    }
9209                }
9210                Ok(StreamActor {
9211                    actor_id: actor_id__.unwrap_or_default(),
9212                    fragment_id: fragment_id__.unwrap_or_default(),
9213                    dispatcher: dispatcher__.unwrap_or_default(),
9214                    vnode_bitmap: vnode_bitmap__,
9215                    mview_definition: mview_definition__.unwrap_or_default(),
9216                    expr_context: expr_context__,
9217                })
9218            }
9219        }
9220        deserializer.deserialize_struct("stream_plan.StreamActor", FIELDS, GeneratedVisitor)
9221    }
9222}
9223impl serde::Serialize for StreamCdcScanNode {
9224    #[allow(deprecated)]
9225    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9226    where
9227        S: serde::Serializer,
9228    {
9229        use serde::ser::SerializeStruct;
9230        let mut len = 0;
9231        if self.table_id != 0 {
9232            len += 1;
9233        }
9234        if !self.upstream_column_ids.is_empty() {
9235            len += 1;
9236        }
9237        if !self.output_indices.is_empty() {
9238            len += 1;
9239        }
9240        if self.state_table.is_some() {
9241            len += 1;
9242        }
9243        if self.cdc_table_desc.is_some() {
9244            len += 1;
9245        }
9246        if self.rate_limit.is_some() {
9247            len += 1;
9248        }
9249        if self.disable_backfill {
9250            len += 1;
9251        }
9252        if self.options.is_some() {
9253            len += 1;
9254        }
9255        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamCdcScanNode", len)?;
9256        if self.table_id != 0 {
9257            struct_ser.serialize_field("tableId", &self.table_id)?;
9258        }
9259        if !self.upstream_column_ids.is_empty() {
9260            struct_ser.serialize_field("upstreamColumnIds", &self.upstream_column_ids)?;
9261        }
9262        if !self.output_indices.is_empty() {
9263            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
9264        }
9265        if let Some(v) = self.state_table.as_ref() {
9266            struct_ser.serialize_field("stateTable", v)?;
9267        }
9268        if let Some(v) = self.cdc_table_desc.as_ref() {
9269            struct_ser.serialize_field("cdcTableDesc", v)?;
9270        }
9271        if let Some(v) = self.rate_limit.as_ref() {
9272            struct_ser.serialize_field("rateLimit", v)?;
9273        }
9274        if self.disable_backfill {
9275            struct_ser.serialize_field("disableBackfill", &self.disable_backfill)?;
9276        }
9277        if let Some(v) = self.options.as_ref() {
9278            struct_ser.serialize_field("options", v)?;
9279        }
9280        struct_ser.end()
9281    }
9282}
9283impl<'de> serde::Deserialize<'de> for StreamCdcScanNode {
9284    #[allow(deprecated)]
9285    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9286    where
9287        D: serde::Deserializer<'de>,
9288    {
9289        const FIELDS: &[&str] = &[
9290            "table_id",
9291            "tableId",
9292            "upstream_column_ids",
9293            "upstreamColumnIds",
9294            "output_indices",
9295            "outputIndices",
9296            "state_table",
9297            "stateTable",
9298            "cdc_table_desc",
9299            "cdcTableDesc",
9300            "rate_limit",
9301            "rateLimit",
9302            "disable_backfill",
9303            "disableBackfill",
9304            "options",
9305        ];
9306
9307        #[allow(clippy::enum_variant_names)]
9308        enum GeneratedField {
9309            TableId,
9310            UpstreamColumnIds,
9311            OutputIndices,
9312            StateTable,
9313            CdcTableDesc,
9314            RateLimit,
9315            DisableBackfill,
9316            Options,
9317        }
9318        impl<'de> serde::Deserialize<'de> for GeneratedField {
9319            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9320            where
9321                D: serde::Deserializer<'de>,
9322            {
9323                struct GeneratedVisitor;
9324
9325                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9326                    type Value = GeneratedField;
9327
9328                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9329                        write!(formatter, "expected one of: {:?}", &FIELDS)
9330                    }
9331
9332                    #[allow(unused_variables)]
9333                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9334                    where
9335                        E: serde::de::Error,
9336                    {
9337                        match value {
9338                            "tableId" | "table_id" => Ok(GeneratedField::TableId),
9339                            "upstreamColumnIds" | "upstream_column_ids" => Ok(GeneratedField::UpstreamColumnIds),
9340                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
9341                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
9342                            "cdcTableDesc" | "cdc_table_desc" => Ok(GeneratedField::CdcTableDesc),
9343                            "rateLimit" | "rate_limit" => Ok(GeneratedField::RateLimit),
9344                            "disableBackfill" | "disable_backfill" => Ok(GeneratedField::DisableBackfill),
9345                            "options" => Ok(GeneratedField::Options),
9346                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9347                        }
9348                    }
9349                }
9350                deserializer.deserialize_identifier(GeneratedVisitor)
9351            }
9352        }
9353        struct GeneratedVisitor;
9354        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9355            type Value = StreamCdcScanNode;
9356
9357            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9358                formatter.write_str("struct stream_plan.StreamCdcScanNode")
9359            }
9360
9361            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamCdcScanNode, V::Error>
9362                where
9363                    V: serde::de::MapAccess<'de>,
9364            {
9365                let mut table_id__ = None;
9366                let mut upstream_column_ids__ = None;
9367                let mut output_indices__ = None;
9368                let mut state_table__ = None;
9369                let mut cdc_table_desc__ = None;
9370                let mut rate_limit__ = None;
9371                let mut disable_backfill__ = None;
9372                let mut options__ = None;
9373                while let Some(k) = map_.next_key()? {
9374                    match k {
9375                        GeneratedField::TableId => {
9376                            if table_id__.is_some() {
9377                                return Err(serde::de::Error::duplicate_field("tableId"));
9378                            }
9379                            table_id__ = 
9380                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9381                            ;
9382                        }
9383                        GeneratedField::UpstreamColumnIds => {
9384                            if upstream_column_ids__.is_some() {
9385                                return Err(serde::de::Error::duplicate_field("upstreamColumnIds"));
9386                            }
9387                            upstream_column_ids__ = 
9388                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
9389                                    .into_iter().map(|x| x.0).collect())
9390                            ;
9391                        }
9392                        GeneratedField::OutputIndices => {
9393                            if output_indices__.is_some() {
9394                                return Err(serde::de::Error::duplicate_field("outputIndices"));
9395                            }
9396                            output_indices__ = 
9397                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
9398                                    .into_iter().map(|x| x.0).collect())
9399                            ;
9400                        }
9401                        GeneratedField::StateTable => {
9402                            if state_table__.is_some() {
9403                                return Err(serde::de::Error::duplicate_field("stateTable"));
9404                            }
9405                            state_table__ = map_.next_value()?;
9406                        }
9407                        GeneratedField::CdcTableDesc => {
9408                            if cdc_table_desc__.is_some() {
9409                                return Err(serde::de::Error::duplicate_field("cdcTableDesc"));
9410                            }
9411                            cdc_table_desc__ = map_.next_value()?;
9412                        }
9413                        GeneratedField::RateLimit => {
9414                            if rate_limit__.is_some() {
9415                                return Err(serde::de::Error::duplicate_field("rateLimit"));
9416                            }
9417                            rate_limit__ = 
9418                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
9419                            ;
9420                        }
9421                        GeneratedField::DisableBackfill => {
9422                            if disable_backfill__.is_some() {
9423                                return Err(serde::de::Error::duplicate_field("disableBackfill"));
9424                            }
9425                            disable_backfill__ = Some(map_.next_value()?);
9426                        }
9427                        GeneratedField::Options => {
9428                            if options__.is_some() {
9429                                return Err(serde::de::Error::duplicate_field("options"));
9430                            }
9431                            options__ = map_.next_value()?;
9432                        }
9433                    }
9434                }
9435                Ok(StreamCdcScanNode {
9436                    table_id: table_id__.unwrap_or_default(),
9437                    upstream_column_ids: upstream_column_ids__.unwrap_or_default(),
9438                    output_indices: output_indices__.unwrap_or_default(),
9439                    state_table: state_table__,
9440                    cdc_table_desc: cdc_table_desc__,
9441                    rate_limit: rate_limit__,
9442                    disable_backfill: disable_backfill__.unwrap_or_default(),
9443                    options: options__,
9444                })
9445            }
9446        }
9447        deserializer.deserialize_struct("stream_plan.StreamCdcScanNode", FIELDS, GeneratedVisitor)
9448    }
9449}
9450impl serde::Serialize for StreamCdcScanOptions {
9451    #[allow(deprecated)]
9452    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9453    where
9454        S: serde::Serializer,
9455    {
9456        use serde::ser::SerializeStruct;
9457        let mut len = 0;
9458        if self.disable_backfill {
9459            len += 1;
9460        }
9461        if self.snapshot_barrier_interval != 0 {
9462            len += 1;
9463        }
9464        if self.snapshot_batch_size != 0 {
9465            len += 1;
9466        }
9467        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamCdcScanOptions", len)?;
9468        if self.disable_backfill {
9469            struct_ser.serialize_field("disableBackfill", &self.disable_backfill)?;
9470        }
9471        if self.snapshot_barrier_interval != 0 {
9472            struct_ser.serialize_field("snapshotBarrierInterval", &self.snapshot_barrier_interval)?;
9473        }
9474        if self.snapshot_batch_size != 0 {
9475            struct_ser.serialize_field("snapshotBatchSize", &self.snapshot_batch_size)?;
9476        }
9477        struct_ser.end()
9478    }
9479}
9480impl<'de> serde::Deserialize<'de> for StreamCdcScanOptions {
9481    #[allow(deprecated)]
9482    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9483    where
9484        D: serde::Deserializer<'de>,
9485    {
9486        const FIELDS: &[&str] = &[
9487            "disable_backfill",
9488            "disableBackfill",
9489            "snapshot_barrier_interval",
9490            "snapshotBarrierInterval",
9491            "snapshot_batch_size",
9492            "snapshotBatchSize",
9493        ];
9494
9495        #[allow(clippy::enum_variant_names)]
9496        enum GeneratedField {
9497            DisableBackfill,
9498            SnapshotBarrierInterval,
9499            SnapshotBatchSize,
9500        }
9501        impl<'de> serde::Deserialize<'de> for GeneratedField {
9502            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9503            where
9504                D: serde::Deserializer<'de>,
9505            {
9506                struct GeneratedVisitor;
9507
9508                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9509                    type Value = GeneratedField;
9510
9511                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9512                        write!(formatter, "expected one of: {:?}", &FIELDS)
9513                    }
9514
9515                    #[allow(unused_variables)]
9516                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9517                    where
9518                        E: serde::de::Error,
9519                    {
9520                        match value {
9521                            "disableBackfill" | "disable_backfill" => Ok(GeneratedField::DisableBackfill),
9522                            "snapshotBarrierInterval" | "snapshot_barrier_interval" => Ok(GeneratedField::SnapshotBarrierInterval),
9523                            "snapshotBatchSize" | "snapshot_batch_size" => Ok(GeneratedField::SnapshotBatchSize),
9524                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9525                        }
9526                    }
9527                }
9528                deserializer.deserialize_identifier(GeneratedVisitor)
9529            }
9530        }
9531        struct GeneratedVisitor;
9532        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9533            type Value = StreamCdcScanOptions;
9534
9535            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9536                formatter.write_str("struct stream_plan.StreamCdcScanOptions")
9537            }
9538
9539            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamCdcScanOptions, V::Error>
9540                where
9541                    V: serde::de::MapAccess<'de>,
9542            {
9543                let mut disable_backfill__ = None;
9544                let mut snapshot_barrier_interval__ = None;
9545                let mut snapshot_batch_size__ = None;
9546                while let Some(k) = map_.next_key()? {
9547                    match k {
9548                        GeneratedField::DisableBackfill => {
9549                            if disable_backfill__.is_some() {
9550                                return Err(serde::de::Error::duplicate_field("disableBackfill"));
9551                            }
9552                            disable_backfill__ = Some(map_.next_value()?);
9553                        }
9554                        GeneratedField::SnapshotBarrierInterval => {
9555                            if snapshot_barrier_interval__.is_some() {
9556                                return Err(serde::de::Error::duplicate_field("snapshotBarrierInterval"));
9557                            }
9558                            snapshot_barrier_interval__ = 
9559                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9560                            ;
9561                        }
9562                        GeneratedField::SnapshotBatchSize => {
9563                            if snapshot_batch_size__.is_some() {
9564                                return Err(serde::de::Error::duplicate_field("snapshotBatchSize"));
9565                            }
9566                            snapshot_batch_size__ = 
9567                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9568                            ;
9569                        }
9570                    }
9571                }
9572                Ok(StreamCdcScanOptions {
9573                    disable_backfill: disable_backfill__.unwrap_or_default(),
9574                    snapshot_barrier_interval: snapshot_barrier_interval__.unwrap_or_default(),
9575                    snapshot_batch_size: snapshot_batch_size__.unwrap_or_default(),
9576                })
9577            }
9578        }
9579        deserializer.deserialize_struct("stream_plan.StreamCdcScanOptions", FIELDS, GeneratedVisitor)
9580    }
9581}
9582impl serde::Serialize for StreamContext {
9583    #[allow(deprecated)]
9584    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9585    where
9586        S: serde::Serializer,
9587    {
9588        use serde::ser::SerializeStruct;
9589        let mut len = 0;
9590        if !self.timezone.is_empty() {
9591            len += 1;
9592        }
9593        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamContext", len)?;
9594        if !self.timezone.is_empty() {
9595            struct_ser.serialize_field("timezone", &self.timezone)?;
9596        }
9597        struct_ser.end()
9598    }
9599}
9600impl<'de> serde::Deserialize<'de> for StreamContext {
9601    #[allow(deprecated)]
9602    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9603    where
9604        D: serde::Deserializer<'de>,
9605    {
9606        const FIELDS: &[&str] = &[
9607            "timezone",
9608        ];
9609
9610        #[allow(clippy::enum_variant_names)]
9611        enum GeneratedField {
9612            Timezone,
9613        }
9614        impl<'de> serde::Deserialize<'de> for GeneratedField {
9615            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9616            where
9617                D: serde::Deserializer<'de>,
9618            {
9619                struct GeneratedVisitor;
9620
9621                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9622                    type Value = GeneratedField;
9623
9624                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9625                        write!(formatter, "expected one of: {:?}", &FIELDS)
9626                    }
9627
9628                    #[allow(unused_variables)]
9629                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9630                    where
9631                        E: serde::de::Error,
9632                    {
9633                        match value {
9634                            "timezone" => Ok(GeneratedField::Timezone),
9635                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9636                        }
9637                    }
9638                }
9639                deserializer.deserialize_identifier(GeneratedVisitor)
9640            }
9641        }
9642        struct GeneratedVisitor;
9643        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9644            type Value = StreamContext;
9645
9646            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9647                formatter.write_str("struct stream_plan.StreamContext")
9648            }
9649
9650            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamContext, V::Error>
9651                where
9652                    V: serde::de::MapAccess<'de>,
9653            {
9654                let mut timezone__ = None;
9655                while let Some(k) = map_.next_key()? {
9656                    match k {
9657                        GeneratedField::Timezone => {
9658                            if timezone__.is_some() {
9659                                return Err(serde::de::Error::duplicate_field("timezone"));
9660                            }
9661                            timezone__ = Some(map_.next_value()?);
9662                        }
9663                    }
9664                }
9665                Ok(StreamContext {
9666                    timezone: timezone__.unwrap_or_default(),
9667                })
9668            }
9669        }
9670        deserializer.deserialize_struct("stream_plan.StreamContext", FIELDS, GeneratedVisitor)
9671    }
9672}
9673impl serde::Serialize for StreamFragmentGraph {
9674    #[allow(deprecated)]
9675    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9676    where
9677        S: serde::Serializer,
9678    {
9679        use serde::ser::SerializeStruct;
9680        let mut len = 0;
9681        if !self.fragments.is_empty() {
9682            len += 1;
9683        }
9684        if !self.edges.is_empty() {
9685            len += 1;
9686        }
9687        if !self.dependent_table_ids.is_empty() {
9688            len += 1;
9689        }
9690        if self.table_ids_cnt != 0 {
9691            len += 1;
9692        }
9693        if self.ctx.is_some() {
9694            len += 1;
9695        }
9696        if self.parallelism.is_some() {
9697            len += 1;
9698        }
9699        if self.max_parallelism != 0 {
9700            len += 1;
9701        }
9702        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamFragmentGraph", len)?;
9703        if !self.fragments.is_empty() {
9704            struct_ser.serialize_field("fragments", &self.fragments)?;
9705        }
9706        if !self.edges.is_empty() {
9707            struct_ser.serialize_field("edges", &self.edges)?;
9708        }
9709        if !self.dependent_table_ids.is_empty() {
9710            struct_ser.serialize_field("dependentTableIds", &self.dependent_table_ids)?;
9711        }
9712        if self.table_ids_cnt != 0 {
9713            struct_ser.serialize_field("tableIdsCnt", &self.table_ids_cnt)?;
9714        }
9715        if let Some(v) = self.ctx.as_ref() {
9716            struct_ser.serialize_field("ctx", v)?;
9717        }
9718        if let Some(v) = self.parallelism.as_ref() {
9719            struct_ser.serialize_field("parallelism", v)?;
9720        }
9721        if self.max_parallelism != 0 {
9722            struct_ser.serialize_field("maxParallelism", &self.max_parallelism)?;
9723        }
9724        struct_ser.end()
9725    }
9726}
9727impl<'de> serde::Deserialize<'de> for StreamFragmentGraph {
9728    #[allow(deprecated)]
9729    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9730    where
9731        D: serde::Deserializer<'de>,
9732    {
9733        const FIELDS: &[&str] = &[
9734            "fragments",
9735            "edges",
9736            "dependent_table_ids",
9737            "dependentTableIds",
9738            "table_ids_cnt",
9739            "tableIdsCnt",
9740            "ctx",
9741            "parallelism",
9742            "max_parallelism",
9743            "maxParallelism",
9744        ];
9745
9746        #[allow(clippy::enum_variant_names)]
9747        enum GeneratedField {
9748            Fragments,
9749            Edges,
9750            DependentTableIds,
9751            TableIdsCnt,
9752            Ctx,
9753            Parallelism,
9754            MaxParallelism,
9755        }
9756        impl<'de> serde::Deserialize<'de> for GeneratedField {
9757            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9758            where
9759                D: serde::Deserializer<'de>,
9760            {
9761                struct GeneratedVisitor;
9762
9763                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9764                    type Value = GeneratedField;
9765
9766                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9767                        write!(formatter, "expected one of: {:?}", &FIELDS)
9768                    }
9769
9770                    #[allow(unused_variables)]
9771                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9772                    where
9773                        E: serde::de::Error,
9774                    {
9775                        match value {
9776                            "fragments" => Ok(GeneratedField::Fragments),
9777                            "edges" => Ok(GeneratedField::Edges),
9778                            "dependentTableIds" | "dependent_table_ids" => Ok(GeneratedField::DependentTableIds),
9779                            "tableIdsCnt" | "table_ids_cnt" => Ok(GeneratedField::TableIdsCnt),
9780                            "ctx" => Ok(GeneratedField::Ctx),
9781                            "parallelism" => Ok(GeneratedField::Parallelism),
9782                            "maxParallelism" | "max_parallelism" => Ok(GeneratedField::MaxParallelism),
9783                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9784                        }
9785                    }
9786                }
9787                deserializer.deserialize_identifier(GeneratedVisitor)
9788            }
9789        }
9790        struct GeneratedVisitor;
9791        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9792            type Value = StreamFragmentGraph;
9793
9794            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9795                formatter.write_str("struct stream_plan.StreamFragmentGraph")
9796            }
9797
9798            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamFragmentGraph, V::Error>
9799                where
9800                    V: serde::de::MapAccess<'de>,
9801            {
9802                let mut fragments__ = None;
9803                let mut edges__ = None;
9804                let mut dependent_table_ids__ = None;
9805                let mut table_ids_cnt__ = None;
9806                let mut ctx__ = None;
9807                let mut parallelism__ = None;
9808                let mut max_parallelism__ = None;
9809                while let Some(k) = map_.next_key()? {
9810                    match k {
9811                        GeneratedField::Fragments => {
9812                            if fragments__.is_some() {
9813                                return Err(serde::de::Error::duplicate_field("fragments"));
9814                            }
9815                            fragments__ = Some(
9816                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
9817                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
9818                            );
9819                        }
9820                        GeneratedField::Edges => {
9821                            if edges__.is_some() {
9822                                return Err(serde::de::Error::duplicate_field("edges"));
9823                            }
9824                            edges__ = Some(map_.next_value()?);
9825                        }
9826                        GeneratedField::DependentTableIds => {
9827                            if dependent_table_ids__.is_some() {
9828                                return Err(serde::de::Error::duplicate_field("dependentTableIds"));
9829                            }
9830                            dependent_table_ids__ = 
9831                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
9832                                    .into_iter().map(|x| x.0).collect())
9833                            ;
9834                        }
9835                        GeneratedField::TableIdsCnt => {
9836                            if table_ids_cnt__.is_some() {
9837                                return Err(serde::de::Error::duplicate_field("tableIdsCnt"));
9838                            }
9839                            table_ids_cnt__ = 
9840                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9841                            ;
9842                        }
9843                        GeneratedField::Ctx => {
9844                            if ctx__.is_some() {
9845                                return Err(serde::de::Error::duplicate_field("ctx"));
9846                            }
9847                            ctx__ = map_.next_value()?;
9848                        }
9849                        GeneratedField::Parallelism => {
9850                            if parallelism__.is_some() {
9851                                return Err(serde::de::Error::duplicate_field("parallelism"));
9852                            }
9853                            parallelism__ = map_.next_value()?;
9854                        }
9855                        GeneratedField::MaxParallelism => {
9856                            if max_parallelism__.is_some() {
9857                                return Err(serde::de::Error::duplicate_field("maxParallelism"));
9858                            }
9859                            max_parallelism__ = 
9860                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9861                            ;
9862                        }
9863                    }
9864                }
9865                Ok(StreamFragmentGraph {
9866                    fragments: fragments__.unwrap_or_default(),
9867                    edges: edges__.unwrap_or_default(),
9868                    dependent_table_ids: dependent_table_ids__.unwrap_or_default(),
9869                    table_ids_cnt: table_ids_cnt__.unwrap_or_default(),
9870                    ctx: ctx__,
9871                    parallelism: parallelism__,
9872                    max_parallelism: max_parallelism__.unwrap_or_default(),
9873                })
9874            }
9875        }
9876        deserializer.deserialize_struct("stream_plan.StreamFragmentGraph", FIELDS, GeneratedVisitor)
9877    }
9878}
9879impl serde::Serialize for stream_fragment_graph::Parallelism {
9880    #[allow(deprecated)]
9881    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9882    where
9883        S: serde::Serializer,
9884    {
9885        use serde::ser::SerializeStruct;
9886        let mut len = 0;
9887        if self.parallelism != 0 {
9888            len += 1;
9889        }
9890        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamFragmentGraph.Parallelism", len)?;
9891        if self.parallelism != 0 {
9892            #[allow(clippy::needless_borrow)]
9893            #[allow(clippy::needless_borrows_for_generic_args)]
9894            struct_ser.serialize_field("parallelism", ToString::to_string(&self.parallelism).as_str())?;
9895        }
9896        struct_ser.end()
9897    }
9898}
9899impl<'de> serde::Deserialize<'de> for stream_fragment_graph::Parallelism {
9900    #[allow(deprecated)]
9901    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9902    where
9903        D: serde::Deserializer<'de>,
9904    {
9905        const FIELDS: &[&str] = &[
9906            "parallelism",
9907        ];
9908
9909        #[allow(clippy::enum_variant_names)]
9910        enum GeneratedField {
9911            Parallelism,
9912        }
9913        impl<'de> serde::Deserialize<'de> for GeneratedField {
9914            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
9915            where
9916                D: serde::Deserializer<'de>,
9917            {
9918                struct GeneratedVisitor;
9919
9920                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9921                    type Value = GeneratedField;
9922
9923                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9924                        write!(formatter, "expected one of: {:?}", &FIELDS)
9925                    }
9926
9927                    #[allow(unused_variables)]
9928                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
9929                    where
9930                        E: serde::de::Error,
9931                    {
9932                        match value {
9933                            "parallelism" => Ok(GeneratedField::Parallelism),
9934                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
9935                        }
9936                    }
9937                }
9938                deserializer.deserialize_identifier(GeneratedVisitor)
9939            }
9940        }
9941        struct GeneratedVisitor;
9942        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
9943            type Value = stream_fragment_graph::Parallelism;
9944
9945            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9946                formatter.write_str("struct stream_plan.StreamFragmentGraph.Parallelism")
9947            }
9948
9949            fn visit_map<V>(self, mut map_: V) -> std::result::Result<stream_fragment_graph::Parallelism, V::Error>
9950                where
9951                    V: serde::de::MapAccess<'de>,
9952            {
9953                let mut parallelism__ = None;
9954                while let Some(k) = map_.next_key()? {
9955                    match k {
9956                        GeneratedField::Parallelism => {
9957                            if parallelism__.is_some() {
9958                                return Err(serde::de::Error::duplicate_field("parallelism"));
9959                            }
9960                            parallelism__ = 
9961                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
9962                            ;
9963                        }
9964                    }
9965                }
9966                Ok(stream_fragment_graph::Parallelism {
9967                    parallelism: parallelism__.unwrap_or_default(),
9968                })
9969            }
9970        }
9971        deserializer.deserialize_struct("stream_plan.StreamFragmentGraph.Parallelism", FIELDS, GeneratedVisitor)
9972    }
9973}
9974impl serde::Serialize for stream_fragment_graph::StreamFragment {
9975    #[allow(deprecated)]
9976    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9977    where
9978        S: serde::Serializer,
9979    {
9980        use serde::ser::SerializeStruct;
9981        let mut len = 0;
9982        if self.fragment_id != 0 {
9983            len += 1;
9984        }
9985        if self.node.is_some() {
9986            len += 1;
9987        }
9988        if self.fragment_type_mask != 0 {
9989            len += 1;
9990        }
9991        if self.requires_singleton {
9992            len += 1;
9993        }
9994        if self.table_ids_cnt != 0 {
9995            len += 1;
9996        }
9997        if !self.upstream_table_ids.is_empty() {
9998            len += 1;
9999        }
10000        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamFragmentGraph.StreamFragment", len)?;
10001        if self.fragment_id != 0 {
10002            struct_ser.serialize_field("fragmentId", &self.fragment_id)?;
10003        }
10004        if let Some(v) = self.node.as_ref() {
10005            struct_ser.serialize_field("node", v)?;
10006        }
10007        if self.fragment_type_mask != 0 {
10008            struct_ser.serialize_field("fragmentTypeMask", &self.fragment_type_mask)?;
10009        }
10010        if self.requires_singleton {
10011            struct_ser.serialize_field("requiresSingleton", &self.requires_singleton)?;
10012        }
10013        if self.table_ids_cnt != 0 {
10014            struct_ser.serialize_field("tableIdsCnt", &self.table_ids_cnt)?;
10015        }
10016        if !self.upstream_table_ids.is_empty() {
10017            struct_ser.serialize_field("upstreamTableIds", &self.upstream_table_ids)?;
10018        }
10019        struct_ser.end()
10020    }
10021}
10022impl<'de> serde::Deserialize<'de> for stream_fragment_graph::StreamFragment {
10023    #[allow(deprecated)]
10024    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10025    where
10026        D: serde::Deserializer<'de>,
10027    {
10028        const FIELDS: &[&str] = &[
10029            "fragment_id",
10030            "fragmentId",
10031            "node",
10032            "fragment_type_mask",
10033            "fragmentTypeMask",
10034            "requires_singleton",
10035            "requiresSingleton",
10036            "table_ids_cnt",
10037            "tableIdsCnt",
10038            "upstream_table_ids",
10039            "upstreamTableIds",
10040        ];
10041
10042        #[allow(clippy::enum_variant_names)]
10043        enum GeneratedField {
10044            FragmentId,
10045            Node,
10046            FragmentTypeMask,
10047            RequiresSingleton,
10048            TableIdsCnt,
10049            UpstreamTableIds,
10050        }
10051        impl<'de> serde::Deserialize<'de> for GeneratedField {
10052            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10053            where
10054                D: serde::Deserializer<'de>,
10055            {
10056                struct GeneratedVisitor;
10057
10058                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10059                    type Value = GeneratedField;
10060
10061                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10062                        write!(formatter, "expected one of: {:?}", &FIELDS)
10063                    }
10064
10065                    #[allow(unused_variables)]
10066                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10067                    where
10068                        E: serde::de::Error,
10069                    {
10070                        match value {
10071                            "fragmentId" | "fragment_id" => Ok(GeneratedField::FragmentId),
10072                            "node" => Ok(GeneratedField::Node),
10073                            "fragmentTypeMask" | "fragment_type_mask" => Ok(GeneratedField::FragmentTypeMask),
10074                            "requiresSingleton" | "requires_singleton" => Ok(GeneratedField::RequiresSingleton),
10075                            "tableIdsCnt" | "table_ids_cnt" => Ok(GeneratedField::TableIdsCnt),
10076                            "upstreamTableIds" | "upstream_table_ids" => Ok(GeneratedField::UpstreamTableIds),
10077                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10078                        }
10079                    }
10080                }
10081                deserializer.deserialize_identifier(GeneratedVisitor)
10082            }
10083        }
10084        struct GeneratedVisitor;
10085        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10086            type Value = stream_fragment_graph::StreamFragment;
10087
10088            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10089                formatter.write_str("struct stream_plan.StreamFragmentGraph.StreamFragment")
10090            }
10091
10092            fn visit_map<V>(self, mut map_: V) -> std::result::Result<stream_fragment_graph::StreamFragment, V::Error>
10093                where
10094                    V: serde::de::MapAccess<'de>,
10095            {
10096                let mut fragment_id__ = None;
10097                let mut node__ = None;
10098                let mut fragment_type_mask__ = None;
10099                let mut requires_singleton__ = None;
10100                let mut table_ids_cnt__ = None;
10101                let mut upstream_table_ids__ = None;
10102                while let Some(k) = map_.next_key()? {
10103                    match k {
10104                        GeneratedField::FragmentId => {
10105                            if fragment_id__.is_some() {
10106                                return Err(serde::de::Error::duplicate_field("fragmentId"));
10107                            }
10108                            fragment_id__ = 
10109                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
10110                            ;
10111                        }
10112                        GeneratedField::Node => {
10113                            if node__.is_some() {
10114                                return Err(serde::de::Error::duplicate_field("node"));
10115                            }
10116                            node__ = map_.next_value()?;
10117                        }
10118                        GeneratedField::FragmentTypeMask => {
10119                            if fragment_type_mask__.is_some() {
10120                                return Err(serde::de::Error::duplicate_field("fragmentTypeMask"));
10121                            }
10122                            fragment_type_mask__ = 
10123                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
10124                            ;
10125                        }
10126                        GeneratedField::RequiresSingleton => {
10127                            if requires_singleton__.is_some() {
10128                                return Err(serde::de::Error::duplicate_field("requiresSingleton"));
10129                            }
10130                            requires_singleton__ = Some(map_.next_value()?);
10131                        }
10132                        GeneratedField::TableIdsCnt => {
10133                            if table_ids_cnt__.is_some() {
10134                                return Err(serde::de::Error::duplicate_field("tableIdsCnt"));
10135                            }
10136                            table_ids_cnt__ = 
10137                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
10138                            ;
10139                        }
10140                        GeneratedField::UpstreamTableIds => {
10141                            if upstream_table_ids__.is_some() {
10142                                return Err(serde::de::Error::duplicate_field("upstreamTableIds"));
10143                            }
10144                            upstream_table_ids__ = 
10145                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
10146                                    .into_iter().map(|x| x.0).collect())
10147                            ;
10148                        }
10149                    }
10150                }
10151                Ok(stream_fragment_graph::StreamFragment {
10152                    fragment_id: fragment_id__.unwrap_or_default(),
10153                    node: node__,
10154                    fragment_type_mask: fragment_type_mask__.unwrap_or_default(),
10155                    requires_singleton: requires_singleton__.unwrap_or_default(),
10156                    table_ids_cnt: table_ids_cnt__.unwrap_or_default(),
10157                    upstream_table_ids: upstream_table_ids__.unwrap_or_default(),
10158                })
10159            }
10160        }
10161        deserializer.deserialize_struct("stream_plan.StreamFragmentGraph.StreamFragment", FIELDS, GeneratedVisitor)
10162    }
10163}
10164impl serde::Serialize for stream_fragment_graph::StreamFragmentEdge {
10165    #[allow(deprecated)]
10166    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10167    where
10168        S: serde::Serializer,
10169    {
10170        use serde::ser::SerializeStruct;
10171        let mut len = 0;
10172        if self.dispatch_strategy.is_some() {
10173            len += 1;
10174        }
10175        if self.link_id != 0 {
10176            len += 1;
10177        }
10178        if self.upstream_id != 0 {
10179            len += 1;
10180        }
10181        if self.downstream_id != 0 {
10182            len += 1;
10183        }
10184        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamFragmentGraph.StreamFragmentEdge", len)?;
10185        if let Some(v) = self.dispatch_strategy.as_ref() {
10186            struct_ser.serialize_field("dispatchStrategy", v)?;
10187        }
10188        if self.link_id != 0 {
10189            #[allow(clippy::needless_borrow)]
10190            #[allow(clippy::needless_borrows_for_generic_args)]
10191            struct_ser.serialize_field("linkId", ToString::to_string(&self.link_id).as_str())?;
10192        }
10193        if self.upstream_id != 0 {
10194            struct_ser.serialize_field("upstreamId", &self.upstream_id)?;
10195        }
10196        if self.downstream_id != 0 {
10197            struct_ser.serialize_field("downstreamId", &self.downstream_id)?;
10198        }
10199        struct_ser.end()
10200    }
10201}
10202impl<'de> serde::Deserialize<'de> for stream_fragment_graph::StreamFragmentEdge {
10203    #[allow(deprecated)]
10204    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10205    where
10206        D: serde::Deserializer<'de>,
10207    {
10208        const FIELDS: &[&str] = &[
10209            "dispatch_strategy",
10210            "dispatchStrategy",
10211            "link_id",
10212            "linkId",
10213            "upstream_id",
10214            "upstreamId",
10215            "downstream_id",
10216            "downstreamId",
10217        ];
10218
10219        #[allow(clippy::enum_variant_names)]
10220        enum GeneratedField {
10221            DispatchStrategy,
10222            LinkId,
10223            UpstreamId,
10224            DownstreamId,
10225        }
10226        impl<'de> serde::Deserialize<'de> for GeneratedField {
10227            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10228            where
10229                D: serde::Deserializer<'de>,
10230            {
10231                struct GeneratedVisitor;
10232
10233                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10234                    type Value = GeneratedField;
10235
10236                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10237                        write!(formatter, "expected one of: {:?}", &FIELDS)
10238                    }
10239
10240                    #[allow(unused_variables)]
10241                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10242                    where
10243                        E: serde::de::Error,
10244                    {
10245                        match value {
10246                            "dispatchStrategy" | "dispatch_strategy" => Ok(GeneratedField::DispatchStrategy),
10247                            "linkId" | "link_id" => Ok(GeneratedField::LinkId),
10248                            "upstreamId" | "upstream_id" => Ok(GeneratedField::UpstreamId),
10249                            "downstreamId" | "downstream_id" => Ok(GeneratedField::DownstreamId),
10250                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10251                        }
10252                    }
10253                }
10254                deserializer.deserialize_identifier(GeneratedVisitor)
10255            }
10256        }
10257        struct GeneratedVisitor;
10258        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10259            type Value = stream_fragment_graph::StreamFragmentEdge;
10260
10261            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10262                formatter.write_str("struct stream_plan.StreamFragmentGraph.StreamFragmentEdge")
10263            }
10264
10265            fn visit_map<V>(self, mut map_: V) -> std::result::Result<stream_fragment_graph::StreamFragmentEdge, V::Error>
10266                where
10267                    V: serde::de::MapAccess<'de>,
10268            {
10269                let mut dispatch_strategy__ = None;
10270                let mut link_id__ = None;
10271                let mut upstream_id__ = None;
10272                let mut downstream_id__ = None;
10273                while let Some(k) = map_.next_key()? {
10274                    match k {
10275                        GeneratedField::DispatchStrategy => {
10276                            if dispatch_strategy__.is_some() {
10277                                return Err(serde::de::Error::duplicate_field("dispatchStrategy"));
10278                            }
10279                            dispatch_strategy__ = map_.next_value()?;
10280                        }
10281                        GeneratedField::LinkId => {
10282                            if link_id__.is_some() {
10283                                return Err(serde::de::Error::duplicate_field("linkId"));
10284                            }
10285                            link_id__ = 
10286                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
10287                            ;
10288                        }
10289                        GeneratedField::UpstreamId => {
10290                            if upstream_id__.is_some() {
10291                                return Err(serde::de::Error::duplicate_field("upstreamId"));
10292                            }
10293                            upstream_id__ = 
10294                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
10295                            ;
10296                        }
10297                        GeneratedField::DownstreamId => {
10298                            if downstream_id__.is_some() {
10299                                return Err(serde::de::Error::duplicate_field("downstreamId"));
10300                            }
10301                            downstream_id__ = 
10302                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
10303                            ;
10304                        }
10305                    }
10306                }
10307                Ok(stream_fragment_graph::StreamFragmentEdge {
10308                    dispatch_strategy: dispatch_strategy__,
10309                    link_id: link_id__.unwrap_or_default(),
10310                    upstream_id: upstream_id__.unwrap_or_default(),
10311                    downstream_id: downstream_id__.unwrap_or_default(),
10312                })
10313            }
10314        }
10315        deserializer.deserialize_struct("stream_plan.StreamFragmentGraph.StreamFragmentEdge", FIELDS, GeneratedVisitor)
10316    }
10317}
10318impl serde::Serialize for StreamFsFetch {
10319    #[allow(deprecated)]
10320    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10321    where
10322        S: serde::Serializer,
10323    {
10324        use serde::ser::SerializeStruct;
10325        let mut len = 0;
10326        if self.source_id != 0 {
10327            len += 1;
10328        }
10329        if self.state_table.is_some() {
10330            len += 1;
10331        }
10332        if self.row_id_index.is_some() {
10333            len += 1;
10334        }
10335        if !self.columns.is_empty() {
10336            len += 1;
10337        }
10338        if !self.with_properties.is_empty() {
10339            len += 1;
10340        }
10341        if self.info.is_some() {
10342            len += 1;
10343        }
10344        if !self.source_name.is_empty() {
10345            len += 1;
10346        }
10347        if self.rate_limit.is_some() {
10348            len += 1;
10349        }
10350        if !self.secret_refs.is_empty() {
10351            len += 1;
10352        }
10353        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamFsFetch", len)?;
10354        if self.source_id != 0 {
10355            struct_ser.serialize_field("sourceId", &self.source_id)?;
10356        }
10357        if let Some(v) = self.state_table.as_ref() {
10358            struct_ser.serialize_field("stateTable", v)?;
10359        }
10360        if let Some(v) = self.row_id_index.as_ref() {
10361            struct_ser.serialize_field("rowIdIndex", v)?;
10362        }
10363        if !self.columns.is_empty() {
10364            struct_ser.serialize_field("columns", &self.columns)?;
10365        }
10366        if !self.with_properties.is_empty() {
10367            struct_ser.serialize_field("withProperties", &self.with_properties)?;
10368        }
10369        if let Some(v) = self.info.as_ref() {
10370            struct_ser.serialize_field("info", v)?;
10371        }
10372        if !self.source_name.is_empty() {
10373            struct_ser.serialize_field("sourceName", &self.source_name)?;
10374        }
10375        if let Some(v) = self.rate_limit.as_ref() {
10376            struct_ser.serialize_field("rateLimit", v)?;
10377        }
10378        if !self.secret_refs.is_empty() {
10379            struct_ser.serialize_field("secretRefs", &self.secret_refs)?;
10380        }
10381        struct_ser.end()
10382    }
10383}
10384impl<'de> serde::Deserialize<'de> for StreamFsFetch {
10385    #[allow(deprecated)]
10386    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10387    where
10388        D: serde::Deserializer<'de>,
10389    {
10390        const FIELDS: &[&str] = &[
10391            "source_id",
10392            "sourceId",
10393            "state_table",
10394            "stateTable",
10395            "row_id_index",
10396            "rowIdIndex",
10397            "columns",
10398            "with_properties",
10399            "withProperties",
10400            "info",
10401            "source_name",
10402            "sourceName",
10403            "rate_limit",
10404            "rateLimit",
10405            "secret_refs",
10406            "secretRefs",
10407        ];
10408
10409        #[allow(clippy::enum_variant_names)]
10410        enum GeneratedField {
10411            SourceId,
10412            StateTable,
10413            RowIdIndex,
10414            Columns,
10415            WithProperties,
10416            Info,
10417            SourceName,
10418            RateLimit,
10419            SecretRefs,
10420        }
10421        impl<'de> serde::Deserialize<'de> for GeneratedField {
10422            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10423            where
10424                D: serde::Deserializer<'de>,
10425            {
10426                struct GeneratedVisitor;
10427
10428                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10429                    type Value = GeneratedField;
10430
10431                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10432                        write!(formatter, "expected one of: {:?}", &FIELDS)
10433                    }
10434
10435                    #[allow(unused_variables)]
10436                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10437                    where
10438                        E: serde::de::Error,
10439                    {
10440                        match value {
10441                            "sourceId" | "source_id" => Ok(GeneratedField::SourceId),
10442                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
10443                            "rowIdIndex" | "row_id_index" => Ok(GeneratedField::RowIdIndex),
10444                            "columns" => Ok(GeneratedField::Columns),
10445                            "withProperties" | "with_properties" => Ok(GeneratedField::WithProperties),
10446                            "info" => Ok(GeneratedField::Info),
10447                            "sourceName" | "source_name" => Ok(GeneratedField::SourceName),
10448                            "rateLimit" | "rate_limit" => Ok(GeneratedField::RateLimit),
10449                            "secretRefs" | "secret_refs" => Ok(GeneratedField::SecretRefs),
10450                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10451                        }
10452                    }
10453                }
10454                deserializer.deserialize_identifier(GeneratedVisitor)
10455            }
10456        }
10457        struct GeneratedVisitor;
10458        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10459            type Value = StreamFsFetch;
10460
10461            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10462                formatter.write_str("struct stream_plan.StreamFsFetch")
10463            }
10464
10465            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamFsFetch, V::Error>
10466                where
10467                    V: serde::de::MapAccess<'de>,
10468            {
10469                let mut source_id__ = None;
10470                let mut state_table__ = None;
10471                let mut row_id_index__ = None;
10472                let mut columns__ = None;
10473                let mut with_properties__ = None;
10474                let mut info__ = None;
10475                let mut source_name__ = None;
10476                let mut rate_limit__ = None;
10477                let mut secret_refs__ = None;
10478                while let Some(k) = map_.next_key()? {
10479                    match k {
10480                        GeneratedField::SourceId => {
10481                            if source_id__.is_some() {
10482                                return Err(serde::de::Error::duplicate_field("sourceId"));
10483                            }
10484                            source_id__ = 
10485                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
10486                            ;
10487                        }
10488                        GeneratedField::StateTable => {
10489                            if state_table__.is_some() {
10490                                return Err(serde::de::Error::duplicate_field("stateTable"));
10491                            }
10492                            state_table__ = map_.next_value()?;
10493                        }
10494                        GeneratedField::RowIdIndex => {
10495                            if row_id_index__.is_some() {
10496                                return Err(serde::de::Error::duplicate_field("rowIdIndex"));
10497                            }
10498                            row_id_index__ = 
10499                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
10500                            ;
10501                        }
10502                        GeneratedField::Columns => {
10503                            if columns__.is_some() {
10504                                return Err(serde::de::Error::duplicate_field("columns"));
10505                            }
10506                            columns__ = Some(map_.next_value()?);
10507                        }
10508                        GeneratedField::WithProperties => {
10509                            if with_properties__.is_some() {
10510                                return Err(serde::de::Error::duplicate_field("withProperties"));
10511                            }
10512                            with_properties__ = Some(
10513                                map_.next_value::<std::collections::BTreeMap<_, _>>()?
10514                            );
10515                        }
10516                        GeneratedField::Info => {
10517                            if info__.is_some() {
10518                                return Err(serde::de::Error::duplicate_field("info"));
10519                            }
10520                            info__ = map_.next_value()?;
10521                        }
10522                        GeneratedField::SourceName => {
10523                            if source_name__.is_some() {
10524                                return Err(serde::de::Error::duplicate_field("sourceName"));
10525                            }
10526                            source_name__ = Some(map_.next_value()?);
10527                        }
10528                        GeneratedField::RateLimit => {
10529                            if rate_limit__.is_some() {
10530                                return Err(serde::de::Error::duplicate_field("rateLimit"));
10531                            }
10532                            rate_limit__ = 
10533                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
10534                            ;
10535                        }
10536                        GeneratedField::SecretRefs => {
10537                            if secret_refs__.is_some() {
10538                                return Err(serde::de::Error::duplicate_field("secretRefs"));
10539                            }
10540                            secret_refs__ = Some(
10541                                map_.next_value::<std::collections::BTreeMap<_, _>>()?
10542                            );
10543                        }
10544                    }
10545                }
10546                Ok(StreamFsFetch {
10547                    source_id: source_id__.unwrap_or_default(),
10548                    state_table: state_table__,
10549                    row_id_index: row_id_index__,
10550                    columns: columns__.unwrap_or_default(),
10551                    with_properties: with_properties__.unwrap_or_default(),
10552                    info: info__,
10553                    source_name: source_name__.unwrap_or_default(),
10554                    rate_limit: rate_limit__,
10555                    secret_refs: secret_refs__.unwrap_or_default(),
10556                })
10557            }
10558        }
10559        deserializer.deserialize_struct("stream_plan.StreamFsFetch", FIELDS, GeneratedVisitor)
10560    }
10561}
10562impl serde::Serialize for StreamFsFetchNode {
10563    #[allow(deprecated)]
10564    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10565    where
10566        S: serde::Serializer,
10567    {
10568        use serde::ser::SerializeStruct;
10569        let mut len = 0;
10570        if self.node_inner.is_some() {
10571            len += 1;
10572        }
10573        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamFsFetchNode", len)?;
10574        if let Some(v) = self.node_inner.as_ref() {
10575            struct_ser.serialize_field("nodeInner", v)?;
10576        }
10577        struct_ser.end()
10578    }
10579}
10580impl<'de> serde::Deserialize<'de> for StreamFsFetchNode {
10581    #[allow(deprecated)]
10582    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10583    where
10584        D: serde::Deserializer<'de>,
10585    {
10586        const FIELDS: &[&str] = &[
10587            "node_inner",
10588            "nodeInner",
10589        ];
10590
10591        #[allow(clippy::enum_variant_names)]
10592        enum GeneratedField {
10593            NodeInner,
10594        }
10595        impl<'de> serde::Deserialize<'de> for GeneratedField {
10596            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10597            where
10598                D: serde::Deserializer<'de>,
10599            {
10600                struct GeneratedVisitor;
10601
10602                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10603                    type Value = GeneratedField;
10604
10605                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10606                        write!(formatter, "expected one of: {:?}", &FIELDS)
10607                    }
10608
10609                    #[allow(unused_variables)]
10610                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10611                    where
10612                        E: serde::de::Error,
10613                    {
10614                        match value {
10615                            "nodeInner" | "node_inner" => Ok(GeneratedField::NodeInner),
10616                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10617                        }
10618                    }
10619                }
10620                deserializer.deserialize_identifier(GeneratedVisitor)
10621            }
10622        }
10623        struct GeneratedVisitor;
10624        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10625            type Value = StreamFsFetchNode;
10626
10627            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10628                formatter.write_str("struct stream_plan.StreamFsFetchNode")
10629            }
10630
10631            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamFsFetchNode, V::Error>
10632                where
10633                    V: serde::de::MapAccess<'de>,
10634            {
10635                let mut node_inner__ = None;
10636                while let Some(k) = map_.next_key()? {
10637                    match k {
10638                        GeneratedField::NodeInner => {
10639                            if node_inner__.is_some() {
10640                                return Err(serde::de::Error::duplicate_field("nodeInner"));
10641                            }
10642                            node_inner__ = map_.next_value()?;
10643                        }
10644                    }
10645                }
10646                Ok(StreamFsFetchNode {
10647                    node_inner: node_inner__,
10648                })
10649            }
10650        }
10651        deserializer.deserialize_struct("stream_plan.StreamFsFetchNode", FIELDS, GeneratedVisitor)
10652    }
10653}
10654impl serde::Serialize for StreamMessage {
10655    #[allow(deprecated)]
10656    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10657    where
10658        S: serde::Serializer,
10659    {
10660        use serde::ser::SerializeStruct;
10661        let mut len = 0;
10662        if self.stream_message.is_some() {
10663            len += 1;
10664        }
10665        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamMessage", len)?;
10666        if let Some(v) = self.stream_message.as_ref() {
10667            match v {
10668                stream_message::StreamMessage::StreamChunk(v) => {
10669                    struct_ser.serialize_field("streamChunk", v)?;
10670                }
10671                stream_message::StreamMessage::Barrier(v) => {
10672                    struct_ser.serialize_field("barrier", v)?;
10673                }
10674                stream_message::StreamMessage::Watermark(v) => {
10675                    struct_ser.serialize_field("watermark", v)?;
10676                }
10677            }
10678        }
10679        struct_ser.end()
10680    }
10681}
10682impl<'de> serde::Deserialize<'de> for StreamMessage {
10683    #[allow(deprecated)]
10684    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10685    where
10686        D: serde::Deserializer<'de>,
10687    {
10688        const FIELDS: &[&str] = &[
10689            "stream_chunk",
10690            "streamChunk",
10691            "barrier",
10692            "watermark",
10693        ];
10694
10695        #[allow(clippy::enum_variant_names)]
10696        enum GeneratedField {
10697            StreamChunk,
10698            Barrier,
10699            Watermark,
10700        }
10701        impl<'de> serde::Deserialize<'de> for GeneratedField {
10702            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10703            where
10704                D: serde::Deserializer<'de>,
10705            {
10706                struct GeneratedVisitor;
10707
10708                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10709                    type Value = GeneratedField;
10710
10711                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10712                        write!(formatter, "expected one of: {:?}", &FIELDS)
10713                    }
10714
10715                    #[allow(unused_variables)]
10716                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10717                    where
10718                        E: serde::de::Error,
10719                    {
10720                        match value {
10721                            "streamChunk" | "stream_chunk" => Ok(GeneratedField::StreamChunk),
10722                            "barrier" => Ok(GeneratedField::Barrier),
10723                            "watermark" => Ok(GeneratedField::Watermark),
10724                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10725                        }
10726                    }
10727                }
10728                deserializer.deserialize_identifier(GeneratedVisitor)
10729            }
10730        }
10731        struct GeneratedVisitor;
10732        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10733            type Value = StreamMessage;
10734
10735            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10736                formatter.write_str("struct stream_plan.StreamMessage")
10737            }
10738
10739            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamMessage, V::Error>
10740                where
10741                    V: serde::de::MapAccess<'de>,
10742            {
10743                let mut stream_message__ = None;
10744                while let Some(k) = map_.next_key()? {
10745                    match k {
10746                        GeneratedField::StreamChunk => {
10747                            if stream_message__.is_some() {
10748                                return Err(serde::de::Error::duplicate_field("streamChunk"));
10749                            }
10750                            stream_message__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_message::StreamMessage::StreamChunk)
10751;
10752                        }
10753                        GeneratedField::Barrier => {
10754                            if stream_message__.is_some() {
10755                                return Err(serde::de::Error::duplicate_field("barrier"));
10756                            }
10757                            stream_message__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_message::StreamMessage::Barrier)
10758;
10759                        }
10760                        GeneratedField::Watermark => {
10761                            if stream_message__.is_some() {
10762                                return Err(serde::de::Error::duplicate_field("watermark"));
10763                            }
10764                            stream_message__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_message::StreamMessage::Watermark)
10765;
10766                        }
10767                    }
10768                }
10769                Ok(StreamMessage {
10770                    stream_message: stream_message__,
10771                })
10772            }
10773        }
10774        deserializer.deserialize_struct("stream_plan.StreamMessage", FIELDS, GeneratedVisitor)
10775    }
10776}
10777impl serde::Serialize for StreamMessageBatch {
10778    #[allow(deprecated)]
10779    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10780    where
10781        S: serde::Serializer,
10782    {
10783        use serde::ser::SerializeStruct;
10784        let mut len = 0;
10785        if self.stream_message_batch.is_some() {
10786            len += 1;
10787        }
10788        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamMessageBatch", len)?;
10789        if let Some(v) = self.stream_message_batch.as_ref() {
10790            match v {
10791                stream_message_batch::StreamMessageBatch::StreamChunk(v) => {
10792                    struct_ser.serialize_field("streamChunk", v)?;
10793                }
10794                stream_message_batch::StreamMessageBatch::BarrierBatch(v) => {
10795                    struct_ser.serialize_field("barrierBatch", v)?;
10796                }
10797                stream_message_batch::StreamMessageBatch::Watermark(v) => {
10798                    struct_ser.serialize_field("watermark", v)?;
10799                }
10800            }
10801        }
10802        struct_ser.end()
10803    }
10804}
10805impl<'de> serde::Deserialize<'de> for StreamMessageBatch {
10806    #[allow(deprecated)]
10807    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10808    where
10809        D: serde::Deserializer<'de>,
10810    {
10811        const FIELDS: &[&str] = &[
10812            "stream_chunk",
10813            "streamChunk",
10814            "barrier_batch",
10815            "barrierBatch",
10816            "watermark",
10817        ];
10818
10819        #[allow(clippy::enum_variant_names)]
10820        enum GeneratedField {
10821            StreamChunk,
10822            BarrierBatch,
10823            Watermark,
10824        }
10825        impl<'de> serde::Deserialize<'de> for GeneratedField {
10826            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10827            where
10828                D: serde::Deserializer<'de>,
10829            {
10830                struct GeneratedVisitor;
10831
10832                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10833                    type Value = GeneratedField;
10834
10835                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10836                        write!(formatter, "expected one of: {:?}", &FIELDS)
10837                    }
10838
10839                    #[allow(unused_variables)]
10840                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10841                    where
10842                        E: serde::de::Error,
10843                    {
10844                        match value {
10845                            "streamChunk" | "stream_chunk" => Ok(GeneratedField::StreamChunk),
10846                            "barrierBatch" | "barrier_batch" => Ok(GeneratedField::BarrierBatch),
10847                            "watermark" => Ok(GeneratedField::Watermark),
10848                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10849                        }
10850                    }
10851                }
10852                deserializer.deserialize_identifier(GeneratedVisitor)
10853            }
10854        }
10855        struct GeneratedVisitor;
10856        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10857            type Value = StreamMessageBatch;
10858
10859            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10860                formatter.write_str("struct stream_plan.StreamMessageBatch")
10861            }
10862
10863            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamMessageBatch, V::Error>
10864                where
10865                    V: serde::de::MapAccess<'de>,
10866            {
10867                let mut stream_message_batch__ = None;
10868                while let Some(k) = map_.next_key()? {
10869                    match k {
10870                        GeneratedField::StreamChunk => {
10871                            if stream_message_batch__.is_some() {
10872                                return Err(serde::de::Error::duplicate_field("streamChunk"));
10873                            }
10874                            stream_message_batch__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_message_batch::StreamMessageBatch::StreamChunk)
10875;
10876                        }
10877                        GeneratedField::BarrierBatch => {
10878                            if stream_message_batch__.is_some() {
10879                                return Err(serde::de::Error::duplicate_field("barrierBatch"));
10880                            }
10881                            stream_message_batch__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_message_batch::StreamMessageBatch::BarrierBatch)
10882;
10883                        }
10884                        GeneratedField::Watermark => {
10885                            if stream_message_batch__.is_some() {
10886                                return Err(serde::de::Error::duplicate_field("watermark"));
10887                            }
10888                            stream_message_batch__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_message_batch::StreamMessageBatch::Watermark)
10889;
10890                        }
10891                    }
10892                }
10893                Ok(StreamMessageBatch {
10894                    stream_message_batch: stream_message_batch__,
10895                })
10896            }
10897        }
10898        deserializer.deserialize_struct("stream_plan.StreamMessageBatch", FIELDS, GeneratedVisitor)
10899    }
10900}
10901impl serde::Serialize for stream_message_batch::BarrierBatch {
10902    #[allow(deprecated)]
10903    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10904    where
10905        S: serde::Serializer,
10906    {
10907        use serde::ser::SerializeStruct;
10908        let mut len = 0;
10909        if !self.barriers.is_empty() {
10910            len += 1;
10911        }
10912        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamMessageBatch.BarrierBatch", len)?;
10913        if !self.barriers.is_empty() {
10914            struct_ser.serialize_field("barriers", &self.barriers)?;
10915        }
10916        struct_ser.end()
10917    }
10918}
10919impl<'de> serde::Deserialize<'de> for stream_message_batch::BarrierBatch {
10920    #[allow(deprecated)]
10921    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10922    where
10923        D: serde::Deserializer<'de>,
10924    {
10925        const FIELDS: &[&str] = &[
10926            "barriers",
10927        ];
10928
10929        #[allow(clippy::enum_variant_names)]
10930        enum GeneratedField {
10931            Barriers,
10932        }
10933        impl<'de> serde::Deserialize<'de> for GeneratedField {
10934            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
10935            where
10936                D: serde::Deserializer<'de>,
10937            {
10938                struct GeneratedVisitor;
10939
10940                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10941                    type Value = GeneratedField;
10942
10943                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10944                        write!(formatter, "expected one of: {:?}", &FIELDS)
10945                    }
10946
10947                    #[allow(unused_variables)]
10948                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
10949                    where
10950                        E: serde::de::Error,
10951                    {
10952                        match value {
10953                            "barriers" => Ok(GeneratedField::Barriers),
10954                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
10955                        }
10956                    }
10957                }
10958                deserializer.deserialize_identifier(GeneratedVisitor)
10959            }
10960        }
10961        struct GeneratedVisitor;
10962        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
10963            type Value = stream_message_batch::BarrierBatch;
10964
10965            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10966                formatter.write_str("struct stream_plan.StreamMessageBatch.BarrierBatch")
10967            }
10968
10969            fn visit_map<V>(self, mut map_: V) -> std::result::Result<stream_message_batch::BarrierBatch, V::Error>
10970                where
10971                    V: serde::de::MapAccess<'de>,
10972            {
10973                let mut barriers__ = None;
10974                while let Some(k) = map_.next_key()? {
10975                    match k {
10976                        GeneratedField::Barriers => {
10977                            if barriers__.is_some() {
10978                                return Err(serde::de::Error::duplicate_field("barriers"));
10979                            }
10980                            barriers__ = Some(map_.next_value()?);
10981                        }
10982                    }
10983                }
10984                Ok(stream_message_batch::BarrierBatch {
10985                    barriers: barriers__.unwrap_or_default(),
10986                })
10987            }
10988        }
10989        deserializer.deserialize_struct("stream_plan.StreamMessageBatch.BarrierBatch", FIELDS, GeneratedVisitor)
10990    }
10991}
10992impl serde::Serialize for StreamNode {
10993    #[allow(deprecated)]
10994    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10995    where
10996        S: serde::Serializer,
10997    {
10998        use serde::ser::SerializeStruct;
10999        let mut len = 0;
11000        if self.operator_id != 0 {
11001            len += 1;
11002        }
11003        if !self.input.is_empty() {
11004            len += 1;
11005        }
11006        if !self.stream_key.is_empty() {
11007            len += 1;
11008        }
11009        if self.append_only {
11010            len += 1;
11011        }
11012        if !self.identity.is_empty() {
11013            len += 1;
11014        }
11015        if !self.fields.is_empty() {
11016            len += 1;
11017        }
11018        if self.node_body.is_some() {
11019            len += 1;
11020        }
11021        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamNode", len)?;
11022        if self.operator_id != 0 {
11023            #[allow(clippy::needless_borrow)]
11024            #[allow(clippy::needless_borrows_for_generic_args)]
11025            struct_ser.serialize_field("operatorId", ToString::to_string(&self.operator_id).as_str())?;
11026        }
11027        if !self.input.is_empty() {
11028            struct_ser.serialize_field("input", &self.input)?;
11029        }
11030        if !self.stream_key.is_empty() {
11031            struct_ser.serialize_field("streamKey", &self.stream_key)?;
11032        }
11033        if self.append_only {
11034            struct_ser.serialize_field("appendOnly", &self.append_only)?;
11035        }
11036        if !self.identity.is_empty() {
11037            struct_ser.serialize_field("identity", &self.identity)?;
11038        }
11039        if !self.fields.is_empty() {
11040            struct_ser.serialize_field("fields", &self.fields)?;
11041        }
11042        if let Some(v) = self.node_body.as_ref() {
11043            match v {
11044                stream_node::NodeBody::Source(v) => {
11045                    struct_ser.serialize_field("source", v)?;
11046                }
11047                stream_node::NodeBody::Project(v) => {
11048                    struct_ser.serialize_field("project", v)?;
11049                }
11050                stream_node::NodeBody::Filter(v) => {
11051                    struct_ser.serialize_field("filter", v)?;
11052                }
11053                stream_node::NodeBody::Materialize(v) => {
11054                    struct_ser.serialize_field("materialize", v)?;
11055                }
11056                stream_node::NodeBody::StatelessSimpleAgg(v) => {
11057                    struct_ser.serialize_field("statelessSimpleAgg", v)?;
11058                }
11059                stream_node::NodeBody::SimpleAgg(v) => {
11060                    struct_ser.serialize_field("simpleAgg", v)?;
11061                }
11062                stream_node::NodeBody::HashAgg(v) => {
11063                    struct_ser.serialize_field("hashAgg", v)?;
11064                }
11065                stream_node::NodeBody::AppendOnlyTopN(v) => {
11066                    struct_ser.serialize_field("appendOnlyTopN", v)?;
11067                }
11068                stream_node::NodeBody::HashJoin(v) => {
11069                    struct_ser.serialize_field("hashJoin", v)?;
11070                }
11071                stream_node::NodeBody::TopN(v) => {
11072                    struct_ser.serialize_field("topN", v)?;
11073                }
11074                stream_node::NodeBody::HopWindow(v) => {
11075                    struct_ser.serialize_field("hopWindow", v)?;
11076                }
11077                stream_node::NodeBody::Merge(v) => {
11078                    struct_ser.serialize_field("merge", v)?;
11079                }
11080                stream_node::NodeBody::Exchange(v) => {
11081                    struct_ser.serialize_field("exchange", v)?;
11082                }
11083                stream_node::NodeBody::StreamScan(v) => {
11084                    struct_ser.serialize_field("streamScan", v)?;
11085                }
11086                stream_node::NodeBody::BatchPlan(v) => {
11087                    struct_ser.serialize_field("batchPlan", v)?;
11088                }
11089                stream_node::NodeBody::Lookup(v) => {
11090                    struct_ser.serialize_field("lookup", v)?;
11091                }
11092                stream_node::NodeBody::Arrange(v) => {
11093                    struct_ser.serialize_field("arrange", v)?;
11094                }
11095                stream_node::NodeBody::LookupUnion(v) => {
11096                    struct_ser.serialize_field("lookupUnion", v)?;
11097                }
11098                stream_node::NodeBody::Union(v) => {
11099                    struct_ser.serialize_field("union", v)?;
11100                }
11101                stream_node::NodeBody::DeltaIndexJoin(v) => {
11102                    struct_ser.serialize_field("deltaIndexJoin", v)?;
11103                }
11104                stream_node::NodeBody::Sink(v) => {
11105                    struct_ser.serialize_field("sink", v)?;
11106                }
11107                stream_node::NodeBody::Expand(v) => {
11108                    struct_ser.serialize_field("expand", v)?;
11109                }
11110                stream_node::NodeBody::DynamicFilter(v) => {
11111                    struct_ser.serialize_field("dynamicFilter", v)?;
11112                }
11113                stream_node::NodeBody::ProjectSet(v) => {
11114                    struct_ser.serialize_field("projectSet", v)?;
11115                }
11116                stream_node::NodeBody::GroupTopN(v) => {
11117                    struct_ser.serialize_field("groupTopN", v)?;
11118                }
11119                stream_node::NodeBody::Sort(v) => {
11120                    struct_ser.serialize_field("sort", v)?;
11121                }
11122                stream_node::NodeBody::WatermarkFilter(v) => {
11123                    struct_ser.serialize_field("watermarkFilter", v)?;
11124                }
11125                stream_node::NodeBody::Dml(v) => {
11126                    struct_ser.serialize_field("dml", v)?;
11127                }
11128                stream_node::NodeBody::RowIdGen(v) => {
11129                    struct_ser.serialize_field("rowIdGen", v)?;
11130                }
11131                stream_node::NodeBody::Now(v) => {
11132                    struct_ser.serialize_field("now", v)?;
11133                }
11134                stream_node::NodeBody::AppendOnlyGroupTopN(v) => {
11135                    struct_ser.serialize_field("appendOnlyGroupTopN", v)?;
11136                }
11137                stream_node::NodeBody::TemporalJoin(v) => {
11138                    struct_ser.serialize_field("temporalJoin", v)?;
11139                }
11140                stream_node::NodeBody::BarrierRecv(v) => {
11141                    struct_ser.serialize_field("barrierRecv", v)?;
11142                }
11143                stream_node::NodeBody::Values(v) => {
11144                    struct_ser.serialize_field("values", v)?;
11145                }
11146                stream_node::NodeBody::AppendOnlyDedup(v) => {
11147                    struct_ser.serialize_field("appendOnlyDedup", v)?;
11148                }
11149                stream_node::NodeBody::NoOp(v) => {
11150                    struct_ser.serialize_field("noOp", v)?;
11151                }
11152                stream_node::NodeBody::EowcOverWindow(v) => {
11153                    struct_ser.serialize_field("eowcOverWindow", v)?;
11154                }
11155                stream_node::NodeBody::OverWindow(v) => {
11156                    struct_ser.serialize_field("overWindow", v)?;
11157                }
11158                stream_node::NodeBody::StreamFsFetch(v) => {
11159                    struct_ser.serialize_field("streamFsFetch", v)?;
11160                }
11161                stream_node::NodeBody::StreamCdcScan(v) => {
11162                    struct_ser.serialize_field("streamCdcScan", v)?;
11163                }
11164                stream_node::NodeBody::CdcFilter(v) => {
11165                    struct_ser.serialize_field("cdcFilter", v)?;
11166                }
11167                stream_node::NodeBody::SourceBackfill(v) => {
11168                    struct_ser.serialize_field("sourceBackfill", v)?;
11169                }
11170                stream_node::NodeBody::Changelog(v) => {
11171                    struct_ser.serialize_field("changelog", v)?;
11172                }
11173                stream_node::NodeBody::LocalApproxPercentile(v) => {
11174                    struct_ser.serialize_field("localApproxPercentile", v)?;
11175                }
11176                stream_node::NodeBody::GlobalApproxPercentile(v) => {
11177                    struct_ser.serialize_field("globalApproxPercentile", v)?;
11178                }
11179                stream_node::NodeBody::RowMerge(v) => {
11180                    struct_ser.serialize_field("rowMerge", v)?;
11181                }
11182                stream_node::NodeBody::AsOfJoin(v) => {
11183                    struct_ser.serialize_field("asOfJoin", v)?;
11184                }
11185                stream_node::NodeBody::SyncLogStore(v) => {
11186                    struct_ser.serialize_field("syncLogStore", v)?;
11187                }
11188                stream_node::NodeBody::MaterializedExprs(v) => {
11189                    struct_ser.serialize_field("materializedExprs", v)?;
11190                }
11191            }
11192        }
11193        struct_ser.end()
11194    }
11195}
11196impl<'de> serde::Deserialize<'de> for StreamNode {
11197    #[allow(deprecated)]
11198    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11199    where
11200        D: serde::Deserializer<'de>,
11201    {
11202        const FIELDS: &[&str] = &[
11203            "operator_id",
11204            "operatorId",
11205            "input",
11206            "stream_key",
11207            "streamKey",
11208            "append_only",
11209            "appendOnly",
11210            "identity",
11211            "fields",
11212            "source",
11213            "project",
11214            "filter",
11215            "materialize",
11216            "stateless_simple_agg",
11217            "statelessSimpleAgg",
11218            "simple_agg",
11219            "simpleAgg",
11220            "hash_agg",
11221            "hashAgg",
11222            "append_only_top_n",
11223            "appendOnlyTopN",
11224            "hash_join",
11225            "hashJoin",
11226            "top_n",
11227            "topN",
11228            "hop_window",
11229            "hopWindow",
11230            "merge",
11231            "exchange",
11232            "stream_scan",
11233            "streamScan",
11234            "batch_plan",
11235            "batchPlan",
11236            "lookup",
11237            "arrange",
11238            "lookup_union",
11239            "lookupUnion",
11240            "union",
11241            "delta_index_join",
11242            "deltaIndexJoin",
11243            "sink",
11244            "expand",
11245            "dynamic_filter",
11246            "dynamicFilter",
11247            "project_set",
11248            "projectSet",
11249            "group_top_n",
11250            "groupTopN",
11251            "sort",
11252            "watermark_filter",
11253            "watermarkFilter",
11254            "dml",
11255            "row_id_gen",
11256            "rowIdGen",
11257            "now",
11258            "append_only_group_top_n",
11259            "appendOnlyGroupTopN",
11260            "temporal_join",
11261            "temporalJoin",
11262            "barrier_recv",
11263            "barrierRecv",
11264            "values",
11265            "append_only_dedup",
11266            "appendOnlyDedup",
11267            "no_op",
11268            "noOp",
11269            "eowc_over_window",
11270            "eowcOverWindow",
11271            "over_window",
11272            "overWindow",
11273            "stream_fs_fetch",
11274            "streamFsFetch",
11275            "stream_cdc_scan",
11276            "streamCdcScan",
11277            "cdc_filter",
11278            "cdcFilter",
11279            "source_backfill",
11280            "sourceBackfill",
11281            "changelog",
11282            "local_approx_percentile",
11283            "localApproxPercentile",
11284            "global_approx_percentile",
11285            "globalApproxPercentile",
11286            "row_merge",
11287            "rowMerge",
11288            "as_of_join",
11289            "asOfJoin",
11290            "sync_log_store",
11291            "syncLogStore",
11292            "materialized_exprs",
11293            "materializedExprs",
11294        ];
11295
11296        #[allow(clippy::enum_variant_names)]
11297        enum GeneratedField {
11298            OperatorId,
11299            Input,
11300            StreamKey,
11301            AppendOnly,
11302            Identity,
11303            Fields,
11304            Source,
11305            Project,
11306            Filter,
11307            Materialize,
11308            StatelessSimpleAgg,
11309            SimpleAgg,
11310            HashAgg,
11311            AppendOnlyTopN,
11312            HashJoin,
11313            TopN,
11314            HopWindow,
11315            Merge,
11316            Exchange,
11317            StreamScan,
11318            BatchPlan,
11319            Lookup,
11320            Arrange,
11321            LookupUnion,
11322            Union,
11323            DeltaIndexJoin,
11324            Sink,
11325            Expand,
11326            DynamicFilter,
11327            ProjectSet,
11328            GroupTopN,
11329            Sort,
11330            WatermarkFilter,
11331            Dml,
11332            RowIdGen,
11333            Now,
11334            AppendOnlyGroupTopN,
11335            TemporalJoin,
11336            BarrierRecv,
11337            Values,
11338            AppendOnlyDedup,
11339            NoOp,
11340            EowcOverWindow,
11341            OverWindow,
11342            StreamFsFetch,
11343            StreamCdcScan,
11344            CdcFilter,
11345            SourceBackfill,
11346            Changelog,
11347            LocalApproxPercentile,
11348            GlobalApproxPercentile,
11349            RowMerge,
11350            AsOfJoin,
11351            SyncLogStore,
11352            MaterializedExprs,
11353        }
11354        impl<'de> serde::Deserialize<'de> for GeneratedField {
11355            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11356            where
11357                D: serde::Deserializer<'de>,
11358            {
11359                struct GeneratedVisitor;
11360
11361                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11362                    type Value = GeneratedField;
11363
11364                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11365                        write!(formatter, "expected one of: {:?}", &FIELDS)
11366                    }
11367
11368                    #[allow(unused_variables)]
11369                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11370                    where
11371                        E: serde::de::Error,
11372                    {
11373                        match value {
11374                            "operatorId" | "operator_id" => Ok(GeneratedField::OperatorId),
11375                            "input" => Ok(GeneratedField::Input),
11376                            "streamKey" | "stream_key" => Ok(GeneratedField::StreamKey),
11377                            "appendOnly" | "append_only" => Ok(GeneratedField::AppendOnly),
11378                            "identity" => Ok(GeneratedField::Identity),
11379                            "fields" => Ok(GeneratedField::Fields),
11380                            "source" => Ok(GeneratedField::Source),
11381                            "project" => Ok(GeneratedField::Project),
11382                            "filter" => Ok(GeneratedField::Filter),
11383                            "materialize" => Ok(GeneratedField::Materialize),
11384                            "statelessSimpleAgg" | "stateless_simple_agg" => Ok(GeneratedField::StatelessSimpleAgg),
11385                            "simpleAgg" | "simple_agg" => Ok(GeneratedField::SimpleAgg),
11386                            "hashAgg" | "hash_agg" => Ok(GeneratedField::HashAgg),
11387                            "appendOnlyTopN" | "append_only_top_n" => Ok(GeneratedField::AppendOnlyTopN),
11388                            "hashJoin" | "hash_join" => Ok(GeneratedField::HashJoin),
11389                            "topN" | "top_n" => Ok(GeneratedField::TopN),
11390                            "hopWindow" | "hop_window" => Ok(GeneratedField::HopWindow),
11391                            "merge" => Ok(GeneratedField::Merge),
11392                            "exchange" => Ok(GeneratedField::Exchange),
11393                            "streamScan" | "stream_scan" => Ok(GeneratedField::StreamScan),
11394                            "batchPlan" | "batch_plan" => Ok(GeneratedField::BatchPlan),
11395                            "lookup" => Ok(GeneratedField::Lookup),
11396                            "arrange" => Ok(GeneratedField::Arrange),
11397                            "lookupUnion" | "lookup_union" => Ok(GeneratedField::LookupUnion),
11398                            "union" => Ok(GeneratedField::Union),
11399                            "deltaIndexJoin" | "delta_index_join" => Ok(GeneratedField::DeltaIndexJoin),
11400                            "sink" => Ok(GeneratedField::Sink),
11401                            "expand" => Ok(GeneratedField::Expand),
11402                            "dynamicFilter" | "dynamic_filter" => Ok(GeneratedField::DynamicFilter),
11403                            "projectSet" | "project_set" => Ok(GeneratedField::ProjectSet),
11404                            "groupTopN" | "group_top_n" => Ok(GeneratedField::GroupTopN),
11405                            "sort" => Ok(GeneratedField::Sort),
11406                            "watermarkFilter" | "watermark_filter" => Ok(GeneratedField::WatermarkFilter),
11407                            "dml" => Ok(GeneratedField::Dml),
11408                            "rowIdGen" | "row_id_gen" => Ok(GeneratedField::RowIdGen),
11409                            "now" => Ok(GeneratedField::Now),
11410                            "appendOnlyGroupTopN" | "append_only_group_top_n" => Ok(GeneratedField::AppendOnlyGroupTopN),
11411                            "temporalJoin" | "temporal_join" => Ok(GeneratedField::TemporalJoin),
11412                            "barrierRecv" | "barrier_recv" => Ok(GeneratedField::BarrierRecv),
11413                            "values" => Ok(GeneratedField::Values),
11414                            "appendOnlyDedup" | "append_only_dedup" => Ok(GeneratedField::AppendOnlyDedup),
11415                            "noOp" | "no_op" => Ok(GeneratedField::NoOp),
11416                            "eowcOverWindow" | "eowc_over_window" => Ok(GeneratedField::EowcOverWindow),
11417                            "overWindow" | "over_window" => Ok(GeneratedField::OverWindow),
11418                            "streamFsFetch" | "stream_fs_fetch" => Ok(GeneratedField::StreamFsFetch),
11419                            "streamCdcScan" | "stream_cdc_scan" => Ok(GeneratedField::StreamCdcScan),
11420                            "cdcFilter" | "cdc_filter" => Ok(GeneratedField::CdcFilter),
11421                            "sourceBackfill" | "source_backfill" => Ok(GeneratedField::SourceBackfill),
11422                            "changelog" => Ok(GeneratedField::Changelog),
11423                            "localApproxPercentile" | "local_approx_percentile" => Ok(GeneratedField::LocalApproxPercentile),
11424                            "globalApproxPercentile" | "global_approx_percentile" => Ok(GeneratedField::GlobalApproxPercentile),
11425                            "rowMerge" | "row_merge" => Ok(GeneratedField::RowMerge),
11426                            "asOfJoin" | "as_of_join" => Ok(GeneratedField::AsOfJoin),
11427                            "syncLogStore" | "sync_log_store" => Ok(GeneratedField::SyncLogStore),
11428                            "materializedExprs" | "materialized_exprs" => Ok(GeneratedField::MaterializedExprs),
11429                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
11430                        }
11431                    }
11432                }
11433                deserializer.deserialize_identifier(GeneratedVisitor)
11434            }
11435        }
11436        struct GeneratedVisitor;
11437        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11438            type Value = StreamNode;
11439
11440            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11441                formatter.write_str("struct stream_plan.StreamNode")
11442            }
11443
11444            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamNode, V::Error>
11445                where
11446                    V: serde::de::MapAccess<'de>,
11447            {
11448                let mut operator_id__ = None;
11449                let mut input__ = None;
11450                let mut stream_key__ = None;
11451                let mut append_only__ = None;
11452                let mut identity__ = None;
11453                let mut fields__ = None;
11454                let mut node_body__ = None;
11455                while let Some(k) = map_.next_key()? {
11456                    match k {
11457                        GeneratedField::OperatorId => {
11458                            if operator_id__.is_some() {
11459                                return Err(serde::de::Error::duplicate_field("operatorId"));
11460                            }
11461                            operator_id__ = 
11462                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
11463                            ;
11464                        }
11465                        GeneratedField::Input => {
11466                            if input__.is_some() {
11467                                return Err(serde::de::Error::duplicate_field("input"));
11468                            }
11469                            input__ = Some(map_.next_value()?);
11470                        }
11471                        GeneratedField::StreamKey => {
11472                            if stream_key__.is_some() {
11473                                return Err(serde::de::Error::duplicate_field("streamKey"));
11474                            }
11475                            stream_key__ = 
11476                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
11477                                    .into_iter().map(|x| x.0).collect())
11478                            ;
11479                        }
11480                        GeneratedField::AppendOnly => {
11481                            if append_only__.is_some() {
11482                                return Err(serde::de::Error::duplicate_field("appendOnly"));
11483                            }
11484                            append_only__ = Some(map_.next_value()?);
11485                        }
11486                        GeneratedField::Identity => {
11487                            if identity__.is_some() {
11488                                return Err(serde::de::Error::duplicate_field("identity"));
11489                            }
11490                            identity__ = Some(map_.next_value()?);
11491                        }
11492                        GeneratedField::Fields => {
11493                            if fields__.is_some() {
11494                                return Err(serde::de::Error::duplicate_field("fields"));
11495                            }
11496                            fields__ = Some(map_.next_value()?);
11497                        }
11498                        GeneratedField::Source => {
11499                            if node_body__.is_some() {
11500                                return Err(serde::de::Error::duplicate_field("source"));
11501                            }
11502                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Source)
11503;
11504                        }
11505                        GeneratedField::Project => {
11506                            if node_body__.is_some() {
11507                                return Err(serde::de::Error::duplicate_field("project"));
11508                            }
11509                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Project)
11510;
11511                        }
11512                        GeneratedField::Filter => {
11513                            if node_body__.is_some() {
11514                                return Err(serde::de::Error::duplicate_field("filter"));
11515                            }
11516                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Filter)
11517;
11518                        }
11519                        GeneratedField::Materialize => {
11520                            if node_body__.is_some() {
11521                                return Err(serde::de::Error::duplicate_field("materialize"));
11522                            }
11523                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Materialize)
11524;
11525                        }
11526                        GeneratedField::StatelessSimpleAgg => {
11527                            if node_body__.is_some() {
11528                                return Err(serde::de::Error::duplicate_field("statelessSimpleAgg"));
11529                            }
11530                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::StatelessSimpleAgg)
11531;
11532                        }
11533                        GeneratedField::SimpleAgg => {
11534                            if node_body__.is_some() {
11535                                return Err(serde::de::Error::duplicate_field("simpleAgg"));
11536                            }
11537                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::SimpleAgg)
11538;
11539                        }
11540                        GeneratedField::HashAgg => {
11541                            if node_body__.is_some() {
11542                                return Err(serde::de::Error::duplicate_field("hashAgg"));
11543                            }
11544                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::HashAgg)
11545;
11546                        }
11547                        GeneratedField::AppendOnlyTopN => {
11548                            if node_body__.is_some() {
11549                                return Err(serde::de::Error::duplicate_field("appendOnlyTopN"));
11550                            }
11551                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::AppendOnlyTopN)
11552;
11553                        }
11554                        GeneratedField::HashJoin => {
11555                            if node_body__.is_some() {
11556                                return Err(serde::de::Error::duplicate_field("hashJoin"));
11557                            }
11558                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::HashJoin)
11559;
11560                        }
11561                        GeneratedField::TopN => {
11562                            if node_body__.is_some() {
11563                                return Err(serde::de::Error::duplicate_field("topN"));
11564                            }
11565                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::TopN)
11566;
11567                        }
11568                        GeneratedField::HopWindow => {
11569                            if node_body__.is_some() {
11570                                return Err(serde::de::Error::duplicate_field("hopWindow"));
11571                            }
11572                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::HopWindow)
11573;
11574                        }
11575                        GeneratedField::Merge => {
11576                            if node_body__.is_some() {
11577                                return Err(serde::de::Error::duplicate_field("merge"));
11578                            }
11579                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Merge)
11580;
11581                        }
11582                        GeneratedField::Exchange => {
11583                            if node_body__.is_some() {
11584                                return Err(serde::de::Error::duplicate_field("exchange"));
11585                            }
11586                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Exchange)
11587;
11588                        }
11589                        GeneratedField::StreamScan => {
11590                            if node_body__.is_some() {
11591                                return Err(serde::de::Error::duplicate_field("streamScan"));
11592                            }
11593                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::StreamScan)
11594;
11595                        }
11596                        GeneratedField::BatchPlan => {
11597                            if node_body__.is_some() {
11598                                return Err(serde::de::Error::duplicate_field("batchPlan"));
11599                            }
11600                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::BatchPlan)
11601;
11602                        }
11603                        GeneratedField::Lookup => {
11604                            if node_body__.is_some() {
11605                                return Err(serde::de::Error::duplicate_field("lookup"));
11606                            }
11607                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Lookup)
11608;
11609                        }
11610                        GeneratedField::Arrange => {
11611                            if node_body__.is_some() {
11612                                return Err(serde::de::Error::duplicate_field("arrange"));
11613                            }
11614                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Arrange)
11615;
11616                        }
11617                        GeneratedField::LookupUnion => {
11618                            if node_body__.is_some() {
11619                                return Err(serde::de::Error::duplicate_field("lookupUnion"));
11620                            }
11621                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::LookupUnion)
11622;
11623                        }
11624                        GeneratedField::Union => {
11625                            if node_body__.is_some() {
11626                                return Err(serde::de::Error::duplicate_field("union"));
11627                            }
11628                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Union)
11629;
11630                        }
11631                        GeneratedField::DeltaIndexJoin => {
11632                            if node_body__.is_some() {
11633                                return Err(serde::de::Error::duplicate_field("deltaIndexJoin"));
11634                            }
11635                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::DeltaIndexJoin)
11636;
11637                        }
11638                        GeneratedField::Sink => {
11639                            if node_body__.is_some() {
11640                                return Err(serde::de::Error::duplicate_field("sink"));
11641                            }
11642                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Sink)
11643;
11644                        }
11645                        GeneratedField::Expand => {
11646                            if node_body__.is_some() {
11647                                return Err(serde::de::Error::duplicate_field("expand"));
11648                            }
11649                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Expand)
11650;
11651                        }
11652                        GeneratedField::DynamicFilter => {
11653                            if node_body__.is_some() {
11654                                return Err(serde::de::Error::duplicate_field("dynamicFilter"));
11655                            }
11656                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::DynamicFilter)
11657;
11658                        }
11659                        GeneratedField::ProjectSet => {
11660                            if node_body__.is_some() {
11661                                return Err(serde::de::Error::duplicate_field("projectSet"));
11662                            }
11663                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::ProjectSet)
11664;
11665                        }
11666                        GeneratedField::GroupTopN => {
11667                            if node_body__.is_some() {
11668                                return Err(serde::de::Error::duplicate_field("groupTopN"));
11669                            }
11670                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::GroupTopN)
11671;
11672                        }
11673                        GeneratedField::Sort => {
11674                            if node_body__.is_some() {
11675                                return Err(serde::de::Error::duplicate_field("sort"));
11676                            }
11677                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Sort)
11678;
11679                        }
11680                        GeneratedField::WatermarkFilter => {
11681                            if node_body__.is_some() {
11682                                return Err(serde::de::Error::duplicate_field("watermarkFilter"));
11683                            }
11684                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::WatermarkFilter)
11685;
11686                        }
11687                        GeneratedField::Dml => {
11688                            if node_body__.is_some() {
11689                                return Err(serde::de::Error::duplicate_field("dml"));
11690                            }
11691                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Dml)
11692;
11693                        }
11694                        GeneratedField::RowIdGen => {
11695                            if node_body__.is_some() {
11696                                return Err(serde::de::Error::duplicate_field("rowIdGen"));
11697                            }
11698                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::RowIdGen)
11699;
11700                        }
11701                        GeneratedField::Now => {
11702                            if node_body__.is_some() {
11703                                return Err(serde::de::Error::duplicate_field("now"));
11704                            }
11705                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Now)
11706;
11707                        }
11708                        GeneratedField::AppendOnlyGroupTopN => {
11709                            if node_body__.is_some() {
11710                                return Err(serde::de::Error::duplicate_field("appendOnlyGroupTopN"));
11711                            }
11712                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::AppendOnlyGroupTopN)
11713;
11714                        }
11715                        GeneratedField::TemporalJoin => {
11716                            if node_body__.is_some() {
11717                                return Err(serde::de::Error::duplicate_field("temporalJoin"));
11718                            }
11719                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::TemporalJoin)
11720;
11721                        }
11722                        GeneratedField::BarrierRecv => {
11723                            if node_body__.is_some() {
11724                                return Err(serde::de::Error::duplicate_field("barrierRecv"));
11725                            }
11726                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::BarrierRecv)
11727;
11728                        }
11729                        GeneratedField::Values => {
11730                            if node_body__.is_some() {
11731                                return Err(serde::de::Error::duplicate_field("values"));
11732                            }
11733                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Values)
11734;
11735                        }
11736                        GeneratedField::AppendOnlyDedup => {
11737                            if node_body__.is_some() {
11738                                return Err(serde::de::Error::duplicate_field("appendOnlyDedup"));
11739                            }
11740                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::AppendOnlyDedup)
11741;
11742                        }
11743                        GeneratedField::NoOp => {
11744                            if node_body__.is_some() {
11745                                return Err(serde::de::Error::duplicate_field("noOp"));
11746                            }
11747                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::NoOp)
11748;
11749                        }
11750                        GeneratedField::EowcOverWindow => {
11751                            if node_body__.is_some() {
11752                                return Err(serde::de::Error::duplicate_field("eowcOverWindow"));
11753                            }
11754                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::EowcOverWindow)
11755;
11756                        }
11757                        GeneratedField::OverWindow => {
11758                            if node_body__.is_some() {
11759                                return Err(serde::de::Error::duplicate_field("overWindow"));
11760                            }
11761                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::OverWindow)
11762;
11763                        }
11764                        GeneratedField::StreamFsFetch => {
11765                            if node_body__.is_some() {
11766                                return Err(serde::de::Error::duplicate_field("streamFsFetch"));
11767                            }
11768                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::StreamFsFetch)
11769;
11770                        }
11771                        GeneratedField::StreamCdcScan => {
11772                            if node_body__.is_some() {
11773                                return Err(serde::de::Error::duplicate_field("streamCdcScan"));
11774                            }
11775                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::StreamCdcScan)
11776;
11777                        }
11778                        GeneratedField::CdcFilter => {
11779                            if node_body__.is_some() {
11780                                return Err(serde::de::Error::duplicate_field("cdcFilter"));
11781                            }
11782                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::CdcFilter)
11783;
11784                        }
11785                        GeneratedField::SourceBackfill => {
11786                            if node_body__.is_some() {
11787                                return Err(serde::de::Error::duplicate_field("sourceBackfill"));
11788                            }
11789                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::SourceBackfill)
11790;
11791                        }
11792                        GeneratedField::Changelog => {
11793                            if node_body__.is_some() {
11794                                return Err(serde::de::Error::duplicate_field("changelog"));
11795                            }
11796                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::Changelog)
11797;
11798                        }
11799                        GeneratedField::LocalApproxPercentile => {
11800                            if node_body__.is_some() {
11801                                return Err(serde::de::Error::duplicate_field("localApproxPercentile"));
11802                            }
11803                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::LocalApproxPercentile)
11804;
11805                        }
11806                        GeneratedField::GlobalApproxPercentile => {
11807                            if node_body__.is_some() {
11808                                return Err(serde::de::Error::duplicate_field("globalApproxPercentile"));
11809                            }
11810                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::GlobalApproxPercentile)
11811;
11812                        }
11813                        GeneratedField::RowMerge => {
11814                            if node_body__.is_some() {
11815                                return Err(serde::de::Error::duplicate_field("rowMerge"));
11816                            }
11817                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::RowMerge)
11818;
11819                        }
11820                        GeneratedField::AsOfJoin => {
11821                            if node_body__.is_some() {
11822                                return Err(serde::de::Error::duplicate_field("asOfJoin"));
11823                            }
11824                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::AsOfJoin)
11825;
11826                        }
11827                        GeneratedField::SyncLogStore => {
11828                            if node_body__.is_some() {
11829                                return Err(serde::de::Error::duplicate_field("syncLogStore"));
11830                            }
11831                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::SyncLogStore)
11832;
11833                        }
11834                        GeneratedField::MaterializedExprs => {
11835                            if node_body__.is_some() {
11836                                return Err(serde::de::Error::duplicate_field("materializedExprs"));
11837                            }
11838                            node_body__ = map_.next_value::<::std::option::Option<_>>()?.map(stream_node::NodeBody::MaterializedExprs)
11839;
11840                        }
11841                    }
11842                }
11843                Ok(StreamNode {
11844                    operator_id: operator_id__.unwrap_or_default(),
11845                    input: input__.unwrap_or_default(),
11846                    stream_key: stream_key__.unwrap_or_default(),
11847                    append_only: append_only__.unwrap_or_default(),
11848                    identity: identity__.unwrap_or_default(),
11849                    fields: fields__.unwrap_or_default(),
11850                    node_body: node_body__,
11851                })
11852            }
11853        }
11854        deserializer.deserialize_struct("stream_plan.StreamNode", FIELDS, GeneratedVisitor)
11855    }
11856}
11857impl serde::Serialize for StreamScanNode {
11858    #[allow(deprecated)]
11859    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11860    where
11861        S: serde::Serializer,
11862    {
11863        use serde::ser::SerializeStruct;
11864        let mut len = 0;
11865        if self.table_id != 0 {
11866            len += 1;
11867        }
11868        if !self.upstream_column_ids.is_empty() {
11869            len += 1;
11870        }
11871        if !self.output_indices.is_empty() {
11872            len += 1;
11873        }
11874        if self.stream_scan_type != 0 {
11875            len += 1;
11876        }
11877        if self.state_table.is_some() {
11878            len += 1;
11879        }
11880        if self.table_desc.is_some() {
11881            len += 1;
11882        }
11883        if self.rate_limit.is_some() {
11884            len += 1;
11885        }
11886        if self.snapshot_read_barrier_interval != 0 {
11887            len += 1;
11888        }
11889        if self.arrangement_table.is_some() {
11890            len += 1;
11891        }
11892        if self.snapshot_backfill_epoch.is_some() {
11893            len += 1;
11894        }
11895        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamScanNode", len)?;
11896        if self.table_id != 0 {
11897            struct_ser.serialize_field("tableId", &self.table_id)?;
11898        }
11899        if !self.upstream_column_ids.is_empty() {
11900            struct_ser.serialize_field("upstreamColumnIds", &self.upstream_column_ids)?;
11901        }
11902        if !self.output_indices.is_empty() {
11903            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
11904        }
11905        if self.stream_scan_type != 0 {
11906            let v = StreamScanType::try_from(self.stream_scan_type)
11907                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.stream_scan_type)))?;
11908            struct_ser.serialize_field("streamScanType", &v)?;
11909        }
11910        if let Some(v) = self.state_table.as_ref() {
11911            struct_ser.serialize_field("stateTable", v)?;
11912        }
11913        if let Some(v) = self.table_desc.as_ref() {
11914            struct_ser.serialize_field("tableDesc", v)?;
11915        }
11916        if let Some(v) = self.rate_limit.as_ref() {
11917            struct_ser.serialize_field("rateLimit", v)?;
11918        }
11919        if self.snapshot_read_barrier_interval != 0 {
11920            struct_ser.serialize_field("snapshotReadBarrierInterval", &self.snapshot_read_barrier_interval)?;
11921        }
11922        if let Some(v) = self.arrangement_table.as_ref() {
11923            struct_ser.serialize_field("arrangementTable", v)?;
11924        }
11925        if let Some(v) = self.snapshot_backfill_epoch.as_ref() {
11926            #[allow(clippy::needless_borrow)]
11927            #[allow(clippy::needless_borrows_for_generic_args)]
11928            struct_ser.serialize_field("snapshotBackfillEpoch", ToString::to_string(&v).as_str())?;
11929        }
11930        struct_ser.end()
11931    }
11932}
11933impl<'de> serde::Deserialize<'de> for StreamScanNode {
11934    #[allow(deprecated)]
11935    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11936    where
11937        D: serde::Deserializer<'de>,
11938    {
11939        const FIELDS: &[&str] = &[
11940            "table_id",
11941            "tableId",
11942            "upstream_column_ids",
11943            "upstreamColumnIds",
11944            "output_indices",
11945            "outputIndices",
11946            "stream_scan_type",
11947            "streamScanType",
11948            "state_table",
11949            "stateTable",
11950            "table_desc",
11951            "tableDesc",
11952            "rate_limit",
11953            "rateLimit",
11954            "snapshot_read_barrier_interval",
11955            "snapshotReadBarrierInterval",
11956            "arrangement_table",
11957            "arrangementTable",
11958            "snapshot_backfill_epoch",
11959            "snapshotBackfillEpoch",
11960        ];
11961
11962        #[allow(clippy::enum_variant_names)]
11963        enum GeneratedField {
11964            TableId,
11965            UpstreamColumnIds,
11966            OutputIndices,
11967            StreamScanType,
11968            StateTable,
11969            TableDesc,
11970            RateLimit,
11971            SnapshotReadBarrierInterval,
11972            ArrangementTable,
11973            SnapshotBackfillEpoch,
11974        }
11975        impl<'de> serde::Deserialize<'de> for GeneratedField {
11976            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
11977            where
11978                D: serde::Deserializer<'de>,
11979            {
11980                struct GeneratedVisitor;
11981
11982                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
11983                    type Value = GeneratedField;
11984
11985                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11986                        write!(formatter, "expected one of: {:?}", &FIELDS)
11987                    }
11988
11989                    #[allow(unused_variables)]
11990                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
11991                    where
11992                        E: serde::de::Error,
11993                    {
11994                        match value {
11995                            "tableId" | "table_id" => Ok(GeneratedField::TableId),
11996                            "upstreamColumnIds" | "upstream_column_ids" => Ok(GeneratedField::UpstreamColumnIds),
11997                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
11998                            "streamScanType" | "stream_scan_type" => Ok(GeneratedField::StreamScanType),
11999                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
12000                            "tableDesc" | "table_desc" => Ok(GeneratedField::TableDesc),
12001                            "rateLimit" | "rate_limit" => Ok(GeneratedField::RateLimit),
12002                            "snapshotReadBarrierInterval" | "snapshot_read_barrier_interval" => Ok(GeneratedField::SnapshotReadBarrierInterval),
12003                            "arrangementTable" | "arrangement_table" => Ok(GeneratedField::ArrangementTable),
12004                            "snapshotBackfillEpoch" | "snapshot_backfill_epoch" => Ok(GeneratedField::SnapshotBackfillEpoch),
12005                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12006                        }
12007                    }
12008                }
12009                deserializer.deserialize_identifier(GeneratedVisitor)
12010            }
12011        }
12012        struct GeneratedVisitor;
12013        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12014            type Value = StreamScanNode;
12015
12016            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12017                formatter.write_str("struct stream_plan.StreamScanNode")
12018            }
12019
12020            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamScanNode, V::Error>
12021                where
12022                    V: serde::de::MapAccess<'de>,
12023            {
12024                let mut table_id__ = None;
12025                let mut upstream_column_ids__ = None;
12026                let mut output_indices__ = None;
12027                let mut stream_scan_type__ = None;
12028                let mut state_table__ = None;
12029                let mut table_desc__ = None;
12030                let mut rate_limit__ = None;
12031                let mut snapshot_read_barrier_interval__ = None;
12032                let mut arrangement_table__ = None;
12033                let mut snapshot_backfill_epoch__ = None;
12034                while let Some(k) = map_.next_key()? {
12035                    match k {
12036                        GeneratedField::TableId => {
12037                            if table_id__.is_some() {
12038                                return Err(serde::de::Error::duplicate_field("tableId"));
12039                            }
12040                            table_id__ = 
12041                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12042                            ;
12043                        }
12044                        GeneratedField::UpstreamColumnIds => {
12045                            if upstream_column_ids__.is_some() {
12046                                return Err(serde::de::Error::duplicate_field("upstreamColumnIds"));
12047                            }
12048                            upstream_column_ids__ = 
12049                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
12050                                    .into_iter().map(|x| x.0).collect())
12051                            ;
12052                        }
12053                        GeneratedField::OutputIndices => {
12054                            if output_indices__.is_some() {
12055                                return Err(serde::de::Error::duplicate_field("outputIndices"));
12056                            }
12057                            output_indices__ = 
12058                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
12059                                    .into_iter().map(|x| x.0).collect())
12060                            ;
12061                        }
12062                        GeneratedField::StreamScanType => {
12063                            if stream_scan_type__.is_some() {
12064                                return Err(serde::de::Error::duplicate_field("streamScanType"));
12065                            }
12066                            stream_scan_type__ = Some(map_.next_value::<StreamScanType>()? as i32);
12067                        }
12068                        GeneratedField::StateTable => {
12069                            if state_table__.is_some() {
12070                                return Err(serde::de::Error::duplicate_field("stateTable"));
12071                            }
12072                            state_table__ = map_.next_value()?;
12073                        }
12074                        GeneratedField::TableDesc => {
12075                            if table_desc__.is_some() {
12076                                return Err(serde::de::Error::duplicate_field("tableDesc"));
12077                            }
12078                            table_desc__ = map_.next_value()?;
12079                        }
12080                        GeneratedField::RateLimit => {
12081                            if rate_limit__.is_some() {
12082                                return Err(serde::de::Error::duplicate_field("rateLimit"));
12083                            }
12084                            rate_limit__ = 
12085                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
12086                            ;
12087                        }
12088                        GeneratedField::SnapshotReadBarrierInterval => {
12089                            if snapshot_read_barrier_interval__.is_some() {
12090                                return Err(serde::de::Error::duplicate_field("snapshotReadBarrierInterval"));
12091                            }
12092                            snapshot_read_barrier_interval__ = 
12093                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12094                            ;
12095                        }
12096                        GeneratedField::ArrangementTable => {
12097                            if arrangement_table__.is_some() {
12098                                return Err(serde::de::Error::duplicate_field("arrangementTable"));
12099                            }
12100                            arrangement_table__ = map_.next_value()?;
12101                        }
12102                        GeneratedField::SnapshotBackfillEpoch => {
12103                            if snapshot_backfill_epoch__.is_some() {
12104                                return Err(serde::de::Error::duplicate_field("snapshotBackfillEpoch"));
12105                            }
12106                            snapshot_backfill_epoch__ = 
12107                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
12108                            ;
12109                        }
12110                    }
12111                }
12112                Ok(StreamScanNode {
12113                    table_id: table_id__.unwrap_or_default(),
12114                    upstream_column_ids: upstream_column_ids__.unwrap_or_default(),
12115                    output_indices: output_indices__.unwrap_or_default(),
12116                    stream_scan_type: stream_scan_type__.unwrap_or_default(),
12117                    state_table: state_table__,
12118                    table_desc: table_desc__,
12119                    rate_limit: rate_limit__,
12120                    snapshot_read_barrier_interval: snapshot_read_barrier_interval__.unwrap_or_default(),
12121                    arrangement_table: arrangement_table__,
12122                    snapshot_backfill_epoch: snapshot_backfill_epoch__,
12123                })
12124            }
12125        }
12126        deserializer.deserialize_struct("stream_plan.StreamScanNode", FIELDS, GeneratedVisitor)
12127    }
12128}
12129impl serde::Serialize for StreamScanType {
12130    #[allow(deprecated)]
12131    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12132    where
12133        S: serde::Serializer,
12134    {
12135        let variant = match self {
12136            Self::Unspecified => "STREAM_SCAN_TYPE_UNSPECIFIED",
12137            Self::Chain => "STREAM_SCAN_TYPE_CHAIN",
12138            Self::Rearrange => "STREAM_SCAN_TYPE_REARRANGE",
12139            Self::Backfill => "STREAM_SCAN_TYPE_BACKFILL",
12140            Self::UpstreamOnly => "STREAM_SCAN_TYPE_UPSTREAM_ONLY",
12141            Self::ArrangementBackfill => "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL",
12142            Self::SnapshotBackfill => "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL",
12143            Self::CrossDbSnapshotBackfill => "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL",
12144        };
12145        serializer.serialize_str(variant)
12146    }
12147}
12148impl<'de> serde::Deserialize<'de> for StreamScanType {
12149    #[allow(deprecated)]
12150    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12151    where
12152        D: serde::Deserializer<'de>,
12153    {
12154        const FIELDS: &[&str] = &[
12155            "STREAM_SCAN_TYPE_UNSPECIFIED",
12156            "STREAM_SCAN_TYPE_CHAIN",
12157            "STREAM_SCAN_TYPE_REARRANGE",
12158            "STREAM_SCAN_TYPE_BACKFILL",
12159            "STREAM_SCAN_TYPE_UPSTREAM_ONLY",
12160            "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL",
12161            "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL",
12162            "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL",
12163        ];
12164
12165        struct GeneratedVisitor;
12166
12167        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12168            type Value = StreamScanType;
12169
12170            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12171                write!(formatter, "expected one of: {:?}", &FIELDS)
12172            }
12173
12174            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
12175            where
12176                E: serde::de::Error,
12177            {
12178                i32::try_from(v)
12179                    .ok()
12180                    .and_then(|x| x.try_into().ok())
12181                    .ok_or_else(|| {
12182                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
12183                    })
12184            }
12185
12186            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
12187            where
12188                E: serde::de::Error,
12189            {
12190                i32::try_from(v)
12191                    .ok()
12192                    .and_then(|x| x.try_into().ok())
12193                    .ok_or_else(|| {
12194                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
12195                    })
12196            }
12197
12198            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12199            where
12200                E: serde::de::Error,
12201            {
12202                match value {
12203                    "STREAM_SCAN_TYPE_UNSPECIFIED" => Ok(StreamScanType::Unspecified),
12204                    "STREAM_SCAN_TYPE_CHAIN" => Ok(StreamScanType::Chain),
12205                    "STREAM_SCAN_TYPE_REARRANGE" => Ok(StreamScanType::Rearrange),
12206                    "STREAM_SCAN_TYPE_BACKFILL" => Ok(StreamScanType::Backfill),
12207                    "STREAM_SCAN_TYPE_UPSTREAM_ONLY" => Ok(StreamScanType::UpstreamOnly),
12208                    "STREAM_SCAN_TYPE_ARRANGEMENT_BACKFILL" => Ok(StreamScanType::ArrangementBackfill),
12209                    "STREAM_SCAN_TYPE_SNAPSHOT_BACKFILL" => Ok(StreamScanType::SnapshotBackfill),
12210                    "STREAM_SCAN_TYPE_CROSS_DB_SNAPSHOT_BACKFILL" => Ok(StreamScanType::CrossDbSnapshotBackfill),
12211                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
12212                }
12213            }
12214        }
12215        deserializer.deserialize_any(GeneratedVisitor)
12216    }
12217}
12218impl serde::Serialize for StreamSource {
12219    #[allow(deprecated)]
12220    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12221    where
12222        S: serde::Serializer,
12223    {
12224        use serde::ser::SerializeStruct;
12225        let mut len = 0;
12226        if self.source_id != 0 {
12227            len += 1;
12228        }
12229        if self.state_table.is_some() {
12230            len += 1;
12231        }
12232        if self.row_id_index.is_some() {
12233            len += 1;
12234        }
12235        if !self.columns.is_empty() {
12236            len += 1;
12237        }
12238        if !self.with_properties.is_empty() {
12239            len += 1;
12240        }
12241        if self.info.is_some() {
12242            len += 1;
12243        }
12244        if !self.source_name.is_empty() {
12245            len += 1;
12246        }
12247        if self.rate_limit.is_some() {
12248            len += 1;
12249        }
12250        if !self.secret_refs.is_empty() {
12251            len += 1;
12252        }
12253        let mut struct_ser = serializer.serialize_struct("stream_plan.StreamSource", len)?;
12254        if self.source_id != 0 {
12255            struct_ser.serialize_field("sourceId", &self.source_id)?;
12256        }
12257        if let Some(v) = self.state_table.as_ref() {
12258            struct_ser.serialize_field("stateTable", v)?;
12259        }
12260        if let Some(v) = self.row_id_index.as_ref() {
12261            struct_ser.serialize_field("rowIdIndex", v)?;
12262        }
12263        if !self.columns.is_empty() {
12264            struct_ser.serialize_field("columns", &self.columns)?;
12265        }
12266        if !self.with_properties.is_empty() {
12267            struct_ser.serialize_field("withProperties", &self.with_properties)?;
12268        }
12269        if let Some(v) = self.info.as_ref() {
12270            struct_ser.serialize_field("info", v)?;
12271        }
12272        if !self.source_name.is_empty() {
12273            struct_ser.serialize_field("sourceName", &self.source_name)?;
12274        }
12275        if let Some(v) = self.rate_limit.as_ref() {
12276            struct_ser.serialize_field("rateLimit", v)?;
12277        }
12278        if !self.secret_refs.is_empty() {
12279            struct_ser.serialize_field("secretRefs", &self.secret_refs)?;
12280        }
12281        struct_ser.end()
12282    }
12283}
12284impl<'de> serde::Deserialize<'de> for StreamSource {
12285    #[allow(deprecated)]
12286    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12287    where
12288        D: serde::Deserializer<'de>,
12289    {
12290        const FIELDS: &[&str] = &[
12291            "source_id",
12292            "sourceId",
12293            "state_table",
12294            "stateTable",
12295            "row_id_index",
12296            "rowIdIndex",
12297            "columns",
12298            "with_properties",
12299            "withProperties",
12300            "info",
12301            "source_name",
12302            "sourceName",
12303            "rate_limit",
12304            "rateLimit",
12305            "secret_refs",
12306            "secretRefs",
12307        ];
12308
12309        #[allow(clippy::enum_variant_names)]
12310        enum GeneratedField {
12311            SourceId,
12312            StateTable,
12313            RowIdIndex,
12314            Columns,
12315            WithProperties,
12316            Info,
12317            SourceName,
12318            RateLimit,
12319            SecretRefs,
12320        }
12321        impl<'de> serde::Deserialize<'de> for GeneratedField {
12322            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12323            where
12324                D: serde::Deserializer<'de>,
12325            {
12326                struct GeneratedVisitor;
12327
12328                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12329                    type Value = GeneratedField;
12330
12331                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12332                        write!(formatter, "expected one of: {:?}", &FIELDS)
12333                    }
12334
12335                    #[allow(unused_variables)]
12336                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12337                    where
12338                        E: serde::de::Error,
12339                    {
12340                        match value {
12341                            "sourceId" | "source_id" => Ok(GeneratedField::SourceId),
12342                            "stateTable" | "state_table" => Ok(GeneratedField::StateTable),
12343                            "rowIdIndex" | "row_id_index" => Ok(GeneratedField::RowIdIndex),
12344                            "columns" => Ok(GeneratedField::Columns),
12345                            "withProperties" | "with_properties" => Ok(GeneratedField::WithProperties),
12346                            "info" => Ok(GeneratedField::Info),
12347                            "sourceName" | "source_name" => Ok(GeneratedField::SourceName),
12348                            "rateLimit" | "rate_limit" => Ok(GeneratedField::RateLimit),
12349                            "secretRefs" | "secret_refs" => Ok(GeneratedField::SecretRefs),
12350                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12351                        }
12352                    }
12353                }
12354                deserializer.deserialize_identifier(GeneratedVisitor)
12355            }
12356        }
12357        struct GeneratedVisitor;
12358        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12359            type Value = StreamSource;
12360
12361            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12362                formatter.write_str("struct stream_plan.StreamSource")
12363            }
12364
12365            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamSource, V::Error>
12366                where
12367                    V: serde::de::MapAccess<'de>,
12368            {
12369                let mut source_id__ = None;
12370                let mut state_table__ = None;
12371                let mut row_id_index__ = None;
12372                let mut columns__ = None;
12373                let mut with_properties__ = None;
12374                let mut info__ = None;
12375                let mut source_name__ = None;
12376                let mut rate_limit__ = None;
12377                let mut secret_refs__ = None;
12378                while let Some(k) = map_.next_key()? {
12379                    match k {
12380                        GeneratedField::SourceId => {
12381                            if source_id__.is_some() {
12382                                return Err(serde::de::Error::duplicate_field("sourceId"));
12383                            }
12384                            source_id__ = 
12385                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12386                            ;
12387                        }
12388                        GeneratedField::StateTable => {
12389                            if state_table__.is_some() {
12390                                return Err(serde::de::Error::duplicate_field("stateTable"));
12391                            }
12392                            state_table__ = map_.next_value()?;
12393                        }
12394                        GeneratedField::RowIdIndex => {
12395                            if row_id_index__.is_some() {
12396                                return Err(serde::de::Error::duplicate_field("rowIdIndex"));
12397                            }
12398                            row_id_index__ = 
12399                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
12400                            ;
12401                        }
12402                        GeneratedField::Columns => {
12403                            if columns__.is_some() {
12404                                return Err(serde::de::Error::duplicate_field("columns"));
12405                            }
12406                            columns__ = Some(map_.next_value()?);
12407                        }
12408                        GeneratedField::WithProperties => {
12409                            if with_properties__.is_some() {
12410                                return Err(serde::de::Error::duplicate_field("withProperties"));
12411                            }
12412                            with_properties__ = Some(
12413                                map_.next_value::<std::collections::BTreeMap<_, _>>()?
12414                            );
12415                        }
12416                        GeneratedField::Info => {
12417                            if info__.is_some() {
12418                                return Err(serde::de::Error::duplicate_field("info"));
12419                            }
12420                            info__ = map_.next_value()?;
12421                        }
12422                        GeneratedField::SourceName => {
12423                            if source_name__.is_some() {
12424                                return Err(serde::de::Error::duplicate_field("sourceName"));
12425                            }
12426                            source_name__ = Some(map_.next_value()?);
12427                        }
12428                        GeneratedField::RateLimit => {
12429                            if rate_limit__.is_some() {
12430                                return Err(serde::de::Error::duplicate_field("rateLimit"));
12431                            }
12432                            rate_limit__ = 
12433                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
12434                            ;
12435                        }
12436                        GeneratedField::SecretRefs => {
12437                            if secret_refs__.is_some() {
12438                                return Err(serde::de::Error::duplicate_field("secretRefs"));
12439                            }
12440                            secret_refs__ = Some(
12441                                map_.next_value::<std::collections::BTreeMap<_, _>>()?
12442                            );
12443                        }
12444                    }
12445                }
12446                Ok(StreamSource {
12447                    source_id: source_id__.unwrap_or_default(),
12448                    state_table: state_table__,
12449                    row_id_index: row_id_index__,
12450                    columns: columns__.unwrap_or_default(),
12451                    with_properties: with_properties__.unwrap_or_default(),
12452                    info: info__,
12453                    source_name: source_name__.unwrap_or_default(),
12454                    rate_limit: rate_limit__,
12455                    secret_refs: secret_refs__.unwrap_or_default(),
12456                })
12457            }
12458        }
12459        deserializer.deserialize_struct("stream_plan.StreamSource", FIELDS, GeneratedVisitor)
12460    }
12461}
12462impl serde::Serialize for SubscriptionUpstreamInfo {
12463    #[allow(deprecated)]
12464    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12465    where
12466        S: serde::Serializer,
12467    {
12468        use serde::ser::SerializeStruct;
12469        let mut len = 0;
12470        if self.subscriber_id != 0 {
12471            len += 1;
12472        }
12473        if self.upstream_mv_table_id != 0 {
12474            len += 1;
12475        }
12476        let mut struct_ser = serializer.serialize_struct("stream_plan.SubscriptionUpstreamInfo", len)?;
12477        if self.subscriber_id != 0 {
12478            struct_ser.serialize_field("subscriberId", &self.subscriber_id)?;
12479        }
12480        if self.upstream_mv_table_id != 0 {
12481            struct_ser.serialize_field("upstreamMvTableId", &self.upstream_mv_table_id)?;
12482        }
12483        struct_ser.end()
12484    }
12485}
12486impl<'de> serde::Deserialize<'de> for SubscriptionUpstreamInfo {
12487    #[allow(deprecated)]
12488    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12489    where
12490        D: serde::Deserializer<'de>,
12491    {
12492        const FIELDS: &[&str] = &[
12493            "subscriber_id",
12494            "subscriberId",
12495            "upstream_mv_table_id",
12496            "upstreamMvTableId",
12497        ];
12498
12499        #[allow(clippy::enum_variant_names)]
12500        enum GeneratedField {
12501            SubscriberId,
12502            UpstreamMvTableId,
12503        }
12504        impl<'de> serde::Deserialize<'de> for GeneratedField {
12505            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12506            where
12507                D: serde::Deserializer<'de>,
12508            {
12509                struct GeneratedVisitor;
12510
12511                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12512                    type Value = GeneratedField;
12513
12514                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12515                        write!(formatter, "expected one of: {:?}", &FIELDS)
12516                    }
12517
12518                    #[allow(unused_variables)]
12519                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12520                    where
12521                        E: serde::de::Error,
12522                    {
12523                        match value {
12524                            "subscriberId" | "subscriber_id" => Ok(GeneratedField::SubscriberId),
12525                            "upstreamMvTableId" | "upstream_mv_table_id" => Ok(GeneratedField::UpstreamMvTableId),
12526                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12527                        }
12528                    }
12529                }
12530                deserializer.deserialize_identifier(GeneratedVisitor)
12531            }
12532        }
12533        struct GeneratedVisitor;
12534        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12535            type Value = SubscriptionUpstreamInfo;
12536
12537            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12538                formatter.write_str("struct stream_plan.SubscriptionUpstreamInfo")
12539            }
12540
12541            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SubscriptionUpstreamInfo, V::Error>
12542                where
12543                    V: serde::de::MapAccess<'de>,
12544            {
12545                let mut subscriber_id__ = None;
12546                let mut upstream_mv_table_id__ = None;
12547                while let Some(k) = map_.next_key()? {
12548                    match k {
12549                        GeneratedField::SubscriberId => {
12550                            if subscriber_id__.is_some() {
12551                                return Err(serde::de::Error::duplicate_field("subscriberId"));
12552                            }
12553                            subscriber_id__ = 
12554                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12555                            ;
12556                        }
12557                        GeneratedField::UpstreamMvTableId => {
12558                            if upstream_mv_table_id__.is_some() {
12559                                return Err(serde::de::Error::duplicate_field("upstreamMvTableId"));
12560                            }
12561                            upstream_mv_table_id__ = 
12562                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12563                            ;
12564                        }
12565                    }
12566                }
12567                Ok(SubscriptionUpstreamInfo {
12568                    subscriber_id: subscriber_id__.unwrap_or_default(),
12569                    upstream_mv_table_id: upstream_mv_table_id__.unwrap_or_default(),
12570                })
12571            }
12572        }
12573        deserializer.deserialize_struct("stream_plan.SubscriptionUpstreamInfo", FIELDS, GeneratedVisitor)
12574    }
12575}
12576impl serde::Serialize for SyncLogStoreNode {
12577    #[allow(deprecated)]
12578    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12579    where
12580        S: serde::Serializer,
12581    {
12582        use serde::ser::SerializeStruct;
12583        let mut len = 0;
12584        if self.log_store_table.is_some() {
12585            len += 1;
12586        }
12587        if self.pause_duration_ms != 0 {
12588            len += 1;
12589        }
12590        if self.buffer_size != 0 {
12591            len += 1;
12592        }
12593        let mut struct_ser = serializer.serialize_struct("stream_plan.SyncLogStoreNode", len)?;
12594        if let Some(v) = self.log_store_table.as_ref() {
12595            struct_ser.serialize_field("logStoreTable", v)?;
12596        }
12597        if self.pause_duration_ms != 0 {
12598            struct_ser.serialize_field("pauseDurationMs", &self.pause_duration_ms)?;
12599        }
12600        if self.buffer_size != 0 {
12601            struct_ser.serialize_field("bufferSize", &self.buffer_size)?;
12602        }
12603        struct_ser.end()
12604    }
12605}
12606impl<'de> serde::Deserialize<'de> for SyncLogStoreNode {
12607    #[allow(deprecated)]
12608    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12609    where
12610        D: serde::Deserializer<'de>,
12611    {
12612        const FIELDS: &[&str] = &[
12613            "log_store_table",
12614            "logStoreTable",
12615            "pause_duration_ms",
12616            "pauseDurationMs",
12617            "buffer_size",
12618            "bufferSize",
12619        ];
12620
12621        #[allow(clippy::enum_variant_names)]
12622        enum GeneratedField {
12623            LogStoreTable,
12624            PauseDurationMs,
12625            BufferSize,
12626        }
12627        impl<'de> serde::Deserialize<'de> for GeneratedField {
12628            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12629            where
12630                D: serde::Deserializer<'de>,
12631            {
12632                struct GeneratedVisitor;
12633
12634                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12635                    type Value = GeneratedField;
12636
12637                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12638                        write!(formatter, "expected one of: {:?}", &FIELDS)
12639                    }
12640
12641                    #[allow(unused_variables)]
12642                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12643                    where
12644                        E: serde::de::Error,
12645                    {
12646                        match value {
12647                            "logStoreTable" | "log_store_table" => Ok(GeneratedField::LogStoreTable),
12648                            "pauseDurationMs" | "pause_duration_ms" => Ok(GeneratedField::PauseDurationMs),
12649                            "bufferSize" | "buffer_size" => Ok(GeneratedField::BufferSize),
12650                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12651                        }
12652                    }
12653                }
12654                deserializer.deserialize_identifier(GeneratedVisitor)
12655            }
12656        }
12657        struct GeneratedVisitor;
12658        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12659            type Value = SyncLogStoreNode;
12660
12661            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12662                formatter.write_str("struct stream_plan.SyncLogStoreNode")
12663            }
12664
12665            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SyncLogStoreNode, V::Error>
12666                where
12667                    V: serde::de::MapAccess<'de>,
12668            {
12669                let mut log_store_table__ = None;
12670                let mut pause_duration_ms__ = None;
12671                let mut buffer_size__ = None;
12672                while let Some(k) = map_.next_key()? {
12673                    match k {
12674                        GeneratedField::LogStoreTable => {
12675                            if log_store_table__.is_some() {
12676                                return Err(serde::de::Error::duplicate_field("logStoreTable"));
12677                            }
12678                            log_store_table__ = map_.next_value()?;
12679                        }
12680                        GeneratedField::PauseDurationMs => {
12681                            if pause_duration_ms__.is_some() {
12682                                return Err(serde::de::Error::duplicate_field("pauseDurationMs"));
12683                            }
12684                            pause_duration_ms__ = 
12685                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12686                            ;
12687                        }
12688                        GeneratedField::BufferSize => {
12689                            if buffer_size__.is_some() {
12690                                return Err(serde::de::Error::duplicate_field("bufferSize"));
12691                            }
12692                            buffer_size__ = 
12693                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
12694                            ;
12695                        }
12696                    }
12697                }
12698                Ok(SyncLogStoreNode {
12699                    log_store_table: log_store_table__,
12700                    pause_duration_ms: pause_duration_ms__.unwrap_or_default(),
12701                    buffer_size: buffer_size__.unwrap_or_default(),
12702                })
12703            }
12704        }
12705        deserializer.deserialize_struct("stream_plan.SyncLogStoreNode", FIELDS, GeneratedVisitor)
12706    }
12707}
12708impl serde::Serialize for TemporalJoinNode {
12709    #[allow(deprecated)]
12710    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12711    where
12712        S: serde::Serializer,
12713    {
12714        use serde::ser::SerializeStruct;
12715        let mut len = 0;
12716        if self.join_type != 0 {
12717            len += 1;
12718        }
12719        if !self.left_key.is_empty() {
12720            len += 1;
12721        }
12722        if !self.right_key.is_empty() {
12723            len += 1;
12724        }
12725        if !self.null_safe.is_empty() {
12726            len += 1;
12727        }
12728        if self.condition.is_some() {
12729            len += 1;
12730        }
12731        if !self.output_indices.is_empty() {
12732            len += 1;
12733        }
12734        if self.table_desc.is_some() {
12735            len += 1;
12736        }
12737        if !self.table_output_indices.is_empty() {
12738            len += 1;
12739        }
12740        if self.memo_table.is_some() {
12741            len += 1;
12742        }
12743        if self.is_nested_loop {
12744            len += 1;
12745        }
12746        let mut struct_ser = serializer.serialize_struct("stream_plan.TemporalJoinNode", len)?;
12747        if self.join_type != 0 {
12748            let v = super::plan_common::JoinType::try_from(self.join_type)
12749                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
12750            struct_ser.serialize_field("joinType", &v)?;
12751        }
12752        if !self.left_key.is_empty() {
12753            struct_ser.serialize_field("leftKey", &self.left_key)?;
12754        }
12755        if !self.right_key.is_empty() {
12756            struct_ser.serialize_field("rightKey", &self.right_key)?;
12757        }
12758        if !self.null_safe.is_empty() {
12759            struct_ser.serialize_field("nullSafe", &self.null_safe)?;
12760        }
12761        if let Some(v) = self.condition.as_ref() {
12762            struct_ser.serialize_field("condition", v)?;
12763        }
12764        if !self.output_indices.is_empty() {
12765            struct_ser.serialize_field("outputIndices", &self.output_indices)?;
12766        }
12767        if let Some(v) = self.table_desc.as_ref() {
12768            struct_ser.serialize_field("tableDesc", v)?;
12769        }
12770        if !self.table_output_indices.is_empty() {
12771            struct_ser.serialize_field("tableOutputIndices", &self.table_output_indices)?;
12772        }
12773        if let Some(v) = self.memo_table.as_ref() {
12774            struct_ser.serialize_field("memoTable", v)?;
12775        }
12776        if self.is_nested_loop {
12777            struct_ser.serialize_field("isNestedLoop", &self.is_nested_loop)?;
12778        }
12779        struct_ser.end()
12780    }
12781}
12782impl<'de> serde::Deserialize<'de> for TemporalJoinNode {
12783    #[allow(deprecated)]
12784    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12785    where
12786        D: serde::Deserializer<'de>,
12787    {
12788        const FIELDS: &[&str] = &[
12789            "join_type",
12790            "joinType",
12791            "left_key",
12792            "leftKey",
12793            "right_key",
12794            "rightKey",
12795            "null_safe",
12796            "nullSafe",
12797            "condition",
12798            "output_indices",
12799            "outputIndices",
12800            "table_desc",
12801            "tableDesc",
12802            "table_output_indices",
12803            "tableOutputIndices",
12804            "memo_table",
12805            "memoTable",
12806            "is_nested_loop",
12807            "isNestedLoop",
12808        ];
12809
12810        #[allow(clippy::enum_variant_names)]
12811        enum GeneratedField {
12812            JoinType,
12813            LeftKey,
12814            RightKey,
12815            NullSafe,
12816            Condition,
12817            OutputIndices,
12818            TableDesc,
12819            TableOutputIndices,
12820            MemoTable,
12821            IsNestedLoop,
12822        }
12823        impl<'de> serde::Deserialize<'de> for GeneratedField {
12824            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
12825            where
12826                D: serde::Deserializer<'de>,
12827            {
12828                struct GeneratedVisitor;
12829
12830                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12831                    type Value = GeneratedField;
12832
12833                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12834                        write!(formatter, "expected one of: {:?}", &FIELDS)
12835                    }
12836
12837                    #[allow(unused_variables)]
12838                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
12839                    where
12840                        E: serde::de::Error,
12841                    {
12842                        match value {
12843                            "joinType" | "join_type" => Ok(GeneratedField::JoinType),
12844                            "leftKey" | "left_key" => Ok(GeneratedField::LeftKey),
12845                            "rightKey" | "right_key" => Ok(GeneratedField::RightKey),
12846                            "nullSafe" | "null_safe" => Ok(GeneratedField::NullSafe),
12847                            "condition" => Ok(GeneratedField::Condition),
12848                            "outputIndices" | "output_indices" => Ok(GeneratedField::OutputIndices),
12849                            "tableDesc" | "table_desc" => Ok(GeneratedField::TableDesc),
12850                            "tableOutputIndices" | "table_output_indices" => Ok(GeneratedField::TableOutputIndices),
12851                            "memoTable" | "memo_table" => Ok(GeneratedField::MemoTable),
12852                            "isNestedLoop" | "is_nested_loop" => Ok(GeneratedField::IsNestedLoop),
12853                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
12854                        }
12855                    }
12856                }
12857                deserializer.deserialize_identifier(GeneratedVisitor)
12858            }
12859        }
12860        struct GeneratedVisitor;
12861        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
12862            type Value = TemporalJoinNode;
12863
12864            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12865                formatter.write_str("struct stream_plan.TemporalJoinNode")
12866            }
12867
12868            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TemporalJoinNode, V::Error>
12869                where
12870                    V: serde::de::MapAccess<'de>,
12871            {
12872                let mut join_type__ = None;
12873                let mut left_key__ = None;
12874                let mut right_key__ = None;
12875                let mut null_safe__ = None;
12876                let mut condition__ = None;
12877                let mut output_indices__ = None;
12878                let mut table_desc__ = None;
12879                let mut table_output_indices__ = None;
12880                let mut memo_table__ = None;
12881                let mut is_nested_loop__ = None;
12882                while let Some(k) = map_.next_key()? {
12883                    match k {
12884                        GeneratedField::JoinType => {
12885                            if join_type__.is_some() {
12886                                return Err(serde::de::Error::duplicate_field("joinType"));
12887                            }
12888                            join_type__ = Some(map_.next_value::<super::plan_common::JoinType>()? as i32);
12889                        }
12890                        GeneratedField::LeftKey => {
12891                            if left_key__.is_some() {
12892                                return Err(serde::de::Error::duplicate_field("leftKey"));
12893                            }
12894                            left_key__ = 
12895                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
12896                                    .into_iter().map(|x| x.0).collect())
12897                            ;
12898                        }
12899                        GeneratedField::RightKey => {
12900                            if right_key__.is_some() {
12901                                return Err(serde::de::Error::duplicate_field("rightKey"));
12902                            }
12903                            right_key__ = 
12904                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
12905                                    .into_iter().map(|x| x.0).collect())
12906                            ;
12907                        }
12908                        GeneratedField::NullSafe => {
12909                            if null_safe__.is_some() {
12910                                return Err(serde::de::Error::duplicate_field("nullSafe"));
12911                            }
12912                            null_safe__ = Some(map_.next_value()?);
12913                        }
12914                        GeneratedField::Condition => {
12915                            if condition__.is_some() {
12916                                return Err(serde::de::Error::duplicate_field("condition"));
12917                            }
12918                            condition__ = map_.next_value()?;
12919                        }
12920                        GeneratedField::OutputIndices => {
12921                            if output_indices__.is_some() {
12922                                return Err(serde::de::Error::duplicate_field("outputIndices"));
12923                            }
12924                            output_indices__ = 
12925                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
12926                                    .into_iter().map(|x| x.0).collect())
12927                            ;
12928                        }
12929                        GeneratedField::TableDesc => {
12930                            if table_desc__.is_some() {
12931                                return Err(serde::de::Error::duplicate_field("tableDesc"));
12932                            }
12933                            table_desc__ = map_.next_value()?;
12934                        }
12935                        GeneratedField::TableOutputIndices => {
12936                            if table_output_indices__.is_some() {
12937                                return Err(serde::de::Error::duplicate_field("tableOutputIndices"));
12938                            }
12939                            table_output_indices__ = 
12940                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
12941                                    .into_iter().map(|x| x.0).collect())
12942                            ;
12943                        }
12944                        GeneratedField::MemoTable => {
12945                            if memo_table__.is_some() {
12946                                return Err(serde::de::Error::duplicate_field("memoTable"));
12947                            }
12948                            memo_table__ = map_.next_value()?;
12949                        }
12950                        GeneratedField::IsNestedLoop => {
12951                            if is_nested_loop__.is_some() {
12952                                return Err(serde::de::Error::duplicate_field("isNestedLoop"));
12953                            }
12954                            is_nested_loop__ = Some(map_.next_value()?);
12955                        }
12956                    }
12957                }
12958                Ok(TemporalJoinNode {
12959                    join_type: join_type__.unwrap_or_default(),
12960                    left_key: left_key__.unwrap_or_default(),
12961                    right_key: right_key__.unwrap_or_default(),
12962                    null_safe: null_safe__.unwrap_or_default(),
12963                    condition: condition__,
12964                    output_indices: output_indices__.unwrap_or_default(),
12965                    table_desc: table_desc__,
12966                    table_output_indices: table_output_indices__.unwrap_or_default(),
12967                    memo_table: memo_table__,
12968                    is_nested_loop: is_nested_loop__.unwrap_or_default(),
12969                })
12970            }
12971        }
12972        deserializer.deserialize_struct("stream_plan.TemporalJoinNode", FIELDS, GeneratedVisitor)
12973    }
12974}
12975impl serde::Serialize for ThrottleMutation {
12976    #[allow(deprecated)]
12977    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12978    where
12979        S: serde::Serializer,
12980    {
12981        use serde::ser::SerializeStruct;
12982        let mut len = 0;
12983        if !self.actor_throttle.is_empty() {
12984            len += 1;
12985        }
12986        let mut struct_ser = serializer.serialize_struct("stream_plan.ThrottleMutation", len)?;
12987        if !self.actor_throttle.is_empty() {
12988            struct_ser.serialize_field("actorThrottle", &self.actor_throttle)?;
12989        }
12990        struct_ser.end()
12991    }
12992}
12993impl<'de> serde::Deserialize<'de> for ThrottleMutation {
12994    #[allow(deprecated)]
12995    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12996    where
12997        D: serde::Deserializer<'de>,
12998    {
12999        const FIELDS: &[&str] = &[
13000            "actor_throttle",
13001            "actorThrottle",
13002        ];
13003
13004        #[allow(clippy::enum_variant_names)]
13005        enum GeneratedField {
13006            ActorThrottle,
13007        }
13008        impl<'de> serde::Deserialize<'de> for GeneratedField {
13009            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13010            where
13011                D: serde::Deserializer<'de>,
13012            {
13013                struct GeneratedVisitor;
13014
13015                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13016                    type Value = GeneratedField;
13017
13018                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13019                        write!(formatter, "expected one of: {:?}", &FIELDS)
13020                    }
13021
13022                    #[allow(unused_variables)]
13023                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13024                    where
13025                        E: serde::de::Error,
13026                    {
13027                        match value {
13028                            "actorThrottle" | "actor_throttle" => Ok(GeneratedField::ActorThrottle),
13029                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13030                        }
13031                    }
13032                }
13033                deserializer.deserialize_identifier(GeneratedVisitor)
13034            }
13035        }
13036        struct GeneratedVisitor;
13037        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13038            type Value = ThrottleMutation;
13039
13040            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13041                formatter.write_str("struct stream_plan.ThrottleMutation")
13042            }
13043
13044            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ThrottleMutation, V::Error>
13045                where
13046                    V: serde::de::MapAccess<'de>,
13047            {
13048                let mut actor_throttle__ = None;
13049                while let Some(k) = map_.next_key()? {
13050                    match k {
13051                        GeneratedField::ActorThrottle => {
13052                            if actor_throttle__.is_some() {
13053                                return Err(serde::de::Error::duplicate_field("actorThrottle"));
13054                            }
13055                            actor_throttle__ = Some(
13056                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
13057                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
13058                            );
13059                        }
13060                    }
13061                }
13062                Ok(ThrottleMutation {
13063                    actor_throttle: actor_throttle__.unwrap_or_default(),
13064                })
13065            }
13066        }
13067        deserializer.deserialize_struct("stream_plan.ThrottleMutation", FIELDS, GeneratedVisitor)
13068    }
13069}
13070impl serde::Serialize for throttle_mutation::RateLimit {
13071    #[allow(deprecated)]
13072    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13073    where
13074        S: serde::Serializer,
13075    {
13076        use serde::ser::SerializeStruct;
13077        let mut len = 0;
13078        if self.rate_limit.is_some() {
13079            len += 1;
13080        }
13081        let mut struct_ser = serializer.serialize_struct("stream_plan.ThrottleMutation.RateLimit", len)?;
13082        if let Some(v) = self.rate_limit.as_ref() {
13083            struct_ser.serialize_field("rateLimit", v)?;
13084        }
13085        struct_ser.end()
13086    }
13087}
13088impl<'de> serde::Deserialize<'de> for throttle_mutation::RateLimit {
13089    #[allow(deprecated)]
13090    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13091    where
13092        D: serde::Deserializer<'de>,
13093    {
13094        const FIELDS: &[&str] = &[
13095            "rate_limit",
13096            "rateLimit",
13097        ];
13098
13099        #[allow(clippy::enum_variant_names)]
13100        enum GeneratedField {
13101            RateLimit,
13102        }
13103        impl<'de> serde::Deserialize<'de> for GeneratedField {
13104            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13105            where
13106                D: serde::Deserializer<'de>,
13107            {
13108                struct GeneratedVisitor;
13109
13110                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13111                    type Value = GeneratedField;
13112
13113                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13114                        write!(formatter, "expected one of: {:?}", &FIELDS)
13115                    }
13116
13117                    #[allow(unused_variables)]
13118                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13119                    where
13120                        E: serde::de::Error,
13121                    {
13122                        match value {
13123                            "rateLimit" | "rate_limit" => Ok(GeneratedField::RateLimit),
13124                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13125                        }
13126                    }
13127                }
13128                deserializer.deserialize_identifier(GeneratedVisitor)
13129            }
13130        }
13131        struct GeneratedVisitor;
13132        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13133            type Value = throttle_mutation::RateLimit;
13134
13135            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13136                formatter.write_str("struct stream_plan.ThrottleMutation.RateLimit")
13137            }
13138
13139            fn visit_map<V>(self, mut map_: V) -> std::result::Result<throttle_mutation::RateLimit, V::Error>
13140                where
13141                    V: serde::de::MapAccess<'de>,
13142            {
13143                let mut rate_limit__ = None;
13144                while let Some(k) = map_.next_key()? {
13145                    match k {
13146                        GeneratedField::RateLimit => {
13147                            if rate_limit__.is_some() {
13148                                return Err(serde::de::Error::duplicate_field("rateLimit"));
13149                            }
13150                            rate_limit__ = 
13151                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
13152                            ;
13153                        }
13154                    }
13155                }
13156                Ok(throttle_mutation::RateLimit {
13157                    rate_limit: rate_limit__,
13158                })
13159            }
13160        }
13161        deserializer.deserialize_struct("stream_plan.ThrottleMutation.RateLimit", FIELDS, GeneratedVisitor)
13162    }
13163}
13164impl serde::Serialize for TopNNode {
13165    #[allow(deprecated)]
13166    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13167    where
13168        S: serde::Serializer,
13169    {
13170        use serde::ser::SerializeStruct;
13171        let mut len = 0;
13172        if self.limit != 0 {
13173            len += 1;
13174        }
13175        if self.offset != 0 {
13176            len += 1;
13177        }
13178        if self.table.is_some() {
13179            len += 1;
13180        }
13181        if !self.order_by.is_empty() {
13182            len += 1;
13183        }
13184        if self.with_ties {
13185            len += 1;
13186        }
13187        let mut struct_ser = serializer.serialize_struct("stream_plan.TopNNode", len)?;
13188        if self.limit != 0 {
13189            #[allow(clippy::needless_borrow)]
13190            #[allow(clippy::needless_borrows_for_generic_args)]
13191            struct_ser.serialize_field("limit", ToString::to_string(&self.limit).as_str())?;
13192        }
13193        if self.offset != 0 {
13194            #[allow(clippy::needless_borrow)]
13195            #[allow(clippy::needless_borrows_for_generic_args)]
13196            struct_ser.serialize_field("offset", ToString::to_string(&self.offset).as_str())?;
13197        }
13198        if let Some(v) = self.table.as_ref() {
13199            struct_ser.serialize_field("table", v)?;
13200        }
13201        if !self.order_by.is_empty() {
13202            struct_ser.serialize_field("orderBy", &self.order_by)?;
13203        }
13204        if self.with_ties {
13205            struct_ser.serialize_field("withTies", &self.with_ties)?;
13206        }
13207        struct_ser.end()
13208    }
13209}
13210impl<'de> serde::Deserialize<'de> for TopNNode {
13211    #[allow(deprecated)]
13212    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13213    where
13214        D: serde::Deserializer<'de>,
13215    {
13216        const FIELDS: &[&str] = &[
13217            "limit",
13218            "offset",
13219            "table",
13220            "order_by",
13221            "orderBy",
13222            "with_ties",
13223            "withTies",
13224        ];
13225
13226        #[allow(clippy::enum_variant_names)]
13227        enum GeneratedField {
13228            Limit,
13229            Offset,
13230            Table,
13231            OrderBy,
13232            WithTies,
13233        }
13234        impl<'de> serde::Deserialize<'de> for GeneratedField {
13235            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13236            where
13237                D: serde::Deserializer<'de>,
13238            {
13239                struct GeneratedVisitor;
13240
13241                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13242                    type Value = GeneratedField;
13243
13244                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13245                        write!(formatter, "expected one of: {:?}", &FIELDS)
13246                    }
13247
13248                    #[allow(unused_variables)]
13249                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13250                    where
13251                        E: serde::de::Error,
13252                    {
13253                        match value {
13254                            "limit" => Ok(GeneratedField::Limit),
13255                            "offset" => Ok(GeneratedField::Offset),
13256                            "table" => Ok(GeneratedField::Table),
13257                            "orderBy" | "order_by" => Ok(GeneratedField::OrderBy),
13258                            "withTies" | "with_ties" => Ok(GeneratedField::WithTies),
13259                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13260                        }
13261                    }
13262                }
13263                deserializer.deserialize_identifier(GeneratedVisitor)
13264            }
13265        }
13266        struct GeneratedVisitor;
13267        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13268            type Value = TopNNode;
13269
13270            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13271                formatter.write_str("struct stream_plan.TopNNode")
13272            }
13273
13274            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TopNNode, V::Error>
13275                where
13276                    V: serde::de::MapAccess<'de>,
13277            {
13278                let mut limit__ = None;
13279                let mut offset__ = None;
13280                let mut table__ = None;
13281                let mut order_by__ = None;
13282                let mut with_ties__ = None;
13283                while let Some(k) = map_.next_key()? {
13284                    match k {
13285                        GeneratedField::Limit => {
13286                            if limit__.is_some() {
13287                                return Err(serde::de::Error::duplicate_field("limit"));
13288                            }
13289                            limit__ = 
13290                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13291                            ;
13292                        }
13293                        GeneratedField::Offset => {
13294                            if offset__.is_some() {
13295                                return Err(serde::de::Error::duplicate_field("offset"));
13296                            }
13297                            offset__ = 
13298                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13299                            ;
13300                        }
13301                        GeneratedField::Table => {
13302                            if table__.is_some() {
13303                                return Err(serde::de::Error::duplicate_field("table"));
13304                            }
13305                            table__ = map_.next_value()?;
13306                        }
13307                        GeneratedField::OrderBy => {
13308                            if order_by__.is_some() {
13309                                return Err(serde::de::Error::duplicate_field("orderBy"));
13310                            }
13311                            order_by__ = Some(map_.next_value()?);
13312                        }
13313                        GeneratedField::WithTies => {
13314                            if with_ties__.is_some() {
13315                                return Err(serde::de::Error::duplicate_field("withTies"));
13316                            }
13317                            with_ties__ = Some(map_.next_value()?);
13318                        }
13319                    }
13320                }
13321                Ok(TopNNode {
13322                    limit: limit__.unwrap_or_default(),
13323                    offset: offset__.unwrap_or_default(),
13324                    table: table__,
13325                    order_by: order_by__.unwrap_or_default(),
13326                    with_ties: with_ties__.unwrap_or_default(),
13327                })
13328            }
13329        }
13330        deserializer.deserialize_struct("stream_plan.TopNNode", FIELDS, GeneratedVisitor)
13331    }
13332}
13333impl serde::Serialize for UnionNode {
13334    #[allow(deprecated)]
13335    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13336    where
13337        S: serde::Serializer,
13338    {
13339        use serde::ser::SerializeStruct;
13340        let len = 0;
13341        let struct_ser = serializer.serialize_struct("stream_plan.UnionNode", len)?;
13342        struct_ser.end()
13343    }
13344}
13345impl<'de> serde::Deserialize<'de> for UnionNode {
13346    #[allow(deprecated)]
13347    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13348    where
13349        D: serde::Deserializer<'de>,
13350    {
13351        const FIELDS: &[&str] = &[
13352        ];
13353
13354        #[allow(clippy::enum_variant_names)]
13355        enum GeneratedField {
13356        }
13357        impl<'de> serde::Deserialize<'de> for GeneratedField {
13358            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13359            where
13360                D: serde::Deserializer<'de>,
13361            {
13362                struct GeneratedVisitor;
13363
13364                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13365                    type Value = GeneratedField;
13366
13367                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13368                        write!(formatter, "expected one of: {:?}", &FIELDS)
13369                    }
13370
13371                    #[allow(unused_variables)]
13372                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13373                    where
13374                        E: serde::de::Error,
13375                    {
13376                            Err(serde::de::Error::unknown_field(value, FIELDS))
13377                    }
13378                }
13379                deserializer.deserialize_identifier(GeneratedVisitor)
13380            }
13381        }
13382        struct GeneratedVisitor;
13383        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13384            type Value = UnionNode;
13385
13386            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13387                formatter.write_str("struct stream_plan.UnionNode")
13388            }
13389
13390            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnionNode, V::Error>
13391                where
13392                    V: serde::de::MapAccess<'de>,
13393            {
13394                while map_.next_key::<GeneratedField>()?.is_some() {
13395                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;
13396                }
13397                Ok(UnionNode {
13398                })
13399            }
13400        }
13401        deserializer.deserialize_struct("stream_plan.UnionNode", FIELDS, GeneratedVisitor)
13402    }
13403}
13404impl serde::Serialize for UpdateMutation {
13405    #[allow(deprecated)]
13406    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13407    where
13408        S: serde::Serializer,
13409    {
13410        use serde::ser::SerializeStruct;
13411        let mut len = 0;
13412        if !self.dispatcher_update.is_empty() {
13413            len += 1;
13414        }
13415        if !self.merge_update.is_empty() {
13416            len += 1;
13417        }
13418        if !self.actor_vnode_bitmap_update.is_empty() {
13419            len += 1;
13420        }
13421        if !self.dropped_actors.is_empty() {
13422            len += 1;
13423        }
13424        if !self.actor_splits.is_empty() {
13425            len += 1;
13426        }
13427        if !self.actor_new_dispatchers.is_empty() {
13428            len += 1;
13429        }
13430        let mut struct_ser = serializer.serialize_struct("stream_plan.UpdateMutation", len)?;
13431        if !self.dispatcher_update.is_empty() {
13432            struct_ser.serialize_field("dispatcherUpdate", &self.dispatcher_update)?;
13433        }
13434        if !self.merge_update.is_empty() {
13435            struct_ser.serialize_field("mergeUpdate", &self.merge_update)?;
13436        }
13437        if !self.actor_vnode_bitmap_update.is_empty() {
13438            struct_ser.serialize_field("actorVnodeBitmapUpdate", &self.actor_vnode_bitmap_update)?;
13439        }
13440        if !self.dropped_actors.is_empty() {
13441            struct_ser.serialize_field("droppedActors", &self.dropped_actors)?;
13442        }
13443        if !self.actor_splits.is_empty() {
13444            struct_ser.serialize_field("actorSplits", &self.actor_splits)?;
13445        }
13446        if !self.actor_new_dispatchers.is_empty() {
13447            struct_ser.serialize_field("actorNewDispatchers", &self.actor_new_dispatchers)?;
13448        }
13449        struct_ser.end()
13450    }
13451}
13452impl<'de> serde::Deserialize<'de> for UpdateMutation {
13453    #[allow(deprecated)]
13454    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13455    where
13456        D: serde::Deserializer<'de>,
13457    {
13458        const FIELDS: &[&str] = &[
13459            "dispatcher_update",
13460            "dispatcherUpdate",
13461            "merge_update",
13462            "mergeUpdate",
13463            "actor_vnode_bitmap_update",
13464            "actorVnodeBitmapUpdate",
13465            "dropped_actors",
13466            "droppedActors",
13467            "actor_splits",
13468            "actorSplits",
13469            "actor_new_dispatchers",
13470            "actorNewDispatchers",
13471        ];
13472
13473        #[allow(clippy::enum_variant_names)]
13474        enum GeneratedField {
13475            DispatcherUpdate,
13476            MergeUpdate,
13477            ActorVnodeBitmapUpdate,
13478            DroppedActors,
13479            ActorSplits,
13480            ActorNewDispatchers,
13481        }
13482        impl<'de> serde::Deserialize<'de> for GeneratedField {
13483            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13484            where
13485                D: serde::Deserializer<'de>,
13486            {
13487                struct GeneratedVisitor;
13488
13489                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13490                    type Value = GeneratedField;
13491
13492                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13493                        write!(formatter, "expected one of: {:?}", &FIELDS)
13494                    }
13495
13496                    #[allow(unused_variables)]
13497                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13498                    where
13499                        E: serde::de::Error,
13500                    {
13501                        match value {
13502                            "dispatcherUpdate" | "dispatcher_update" => Ok(GeneratedField::DispatcherUpdate),
13503                            "mergeUpdate" | "merge_update" => Ok(GeneratedField::MergeUpdate),
13504                            "actorVnodeBitmapUpdate" | "actor_vnode_bitmap_update" => Ok(GeneratedField::ActorVnodeBitmapUpdate),
13505                            "droppedActors" | "dropped_actors" => Ok(GeneratedField::DroppedActors),
13506                            "actorSplits" | "actor_splits" => Ok(GeneratedField::ActorSplits),
13507                            "actorNewDispatchers" | "actor_new_dispatchers" => Ok(GeneratedField::ActorNewDispatchers),
13508                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13509                        }
13510                    }
13511                }
13512                deserializer.deserialize_identifier(GeneratedVisitor)
13513            }
13514        }
13515        struct GeneratedVisitor;
13516        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13517            type Value = UpdateMutation;
13518
13519            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13520                formatter.write_str("struct stream_plan.UpdateMutation")
13521            }
13522
13523            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UpdateMutation, V::Error>
13524                where
13525                    V: serde::de::MapAccess<'de>,
13526            {
13527                let mut dispatcher_update__ = None;
13528                let mut merge_update__ = None;
13529                let mut actor_vnode_bitmap_update__ = None;
13530                let mut dropped_actors__ = None;
13531                let mut actor_splits__ = None;
13532                let mut actor_new_dispatchers__ = None;
13533                while let Some(k) = map_.next_key()? {
13534                    match k {
13535                        GeneratedField::DispatcherUpdate => {
13536                            if dispatcher_update__.is_some() {
13537                                return Err(serde::de::Error::duplicate_field("dispatcherUpdate"));
13538                            }
13539                            dispatcher_update__ = Some(map_.next_value()?);
13540                        }
13541                        GeneratedField::MergeUpdate => {
13542                            if merge_update__.is_some() {
13543                                return Err(serde::de::Error::duplicate_field("mergeUpdate"));
13544                            }
13545                            merge_update__ = Some(map_.next_value()?);
13546                        }
13547                        GeneratedField::ActorVnodeBitmapUpdate => {
13548                            if actor_vnode_bitmap_update__.is_some() {
13549                                return Err(serde::de::Error::duplicate_field("actorVnodeBitmapUpdate"));
13550                            }
13551                            actor_vnode_bitmap_update__ = Some(
13552                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
13553                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
13554                            );
13555                        }
13556                        GeneratedField::DroppedActors => {
13557                            if dropped_actors__.is_some() {
13558                                return Err(serde::de::Error::duplicate_field("droppedActors"));
13559                            }
13560                            dropped_actors__ = 
13561                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
13562                                    .into_iter().map(|x| x.0).collect())
13563                            ;
13564                        }
13565                        GeneratedField::ActorSplits => {
13566                            if actor_splits__.is_some() {
13567                                return Err(serde::de::Error::duplicate_field("actorSplits"));
13568                            }
13569                            actor_splits__ = Some(
13570                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
13571                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
13572                            );
13573                        }
13574                        GeneratedField::ActorNewDispatchers => {
13575                            if actor_new_dispatchers__.is_some() {
13576                                return Err(serde::de::Error::duplicate_field("actorNewDispatchers"));
13577                            }
13578                            actor_new_dispatchers__ = Some(
13579                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
13580                                    .into_iter().map(|(k,v)| (k.0, v)).collect()
13581                            );
13582                        }
13583                    }
13584                }
13585                Ok(UpdateMutation {
13586                    dispatcher_update: dispatcher_update__.unwrap_or_default(),
13587                    merge_update: merge_update__.unwrap_or_default(),
13588                    actor_vnode_bitmap_update: actor_vnode_bitmap_update__.unwrap_or_default(),
13589                    dropped_actors: dropped_actors__.unwrap_or_default(),
13590                    actor_splits: actor_splits__.unwrap_or_default(),
13591                    actor_new_dispatchers: actor_new_dispatchers__.unwrap_or_default(),
13592                })
13593            }
13594        }
13595        deserializer.deserialize_struct("stream_plan.UpdateMutation", FIELDS, GeneratedVisitor)
13596    }
13597}
13598impl serde::Serialize for update_mutation::DispatcherUpdate {
13599    #[allow(deprecated)]
13600    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13601    where
13602        S: serde::Serializer,
13603    {
13604        use serde::ser::SerializeStruct;
13605        let mut len = 0;
13606        if self.actor_id != 0 {
13607            len += 1;
13608        }
13609        if self.dispatcher_id != 0 {
13610            len += 1;
13611        }
13612        if self.hash_mapping.is_some() {
13613            len += 1;
13614        }
13615        if !self.added_downstream_actor_id.is_empty() {
13616            len += 1;
13617        }
13618        if !self.removed_downstream_actor_id.is_empty() {
13619            len += 1;
13620        }
13621        let mut struct_ser = serializer.serialize_struct("stream_plan.UpdateMutation.DispatcherUpdate", len)?;
13622        if self.actor_id != 0 {
13623            struct_ser.serialize_field("actorId", &self.actor_id)?;
13624        }
13625        if self.dispatcher_id != 0 {
13626            #[allow(clippy::needless_borrow)]
13627            #[allow(clippy::needless_borrows_for_generic_args)]
13628            struct_ser.serialize_field("dispatcherId", ToString::to_string(&self.dispatcher_id).as_str())?;
13629        }
13630        if let Some(v) = self.hash_mapping.as_ref() {
13631            struct_ser.serialize_field("hashMapping", v)?;
13632        }
13633        if !self.added_downstream_actor_id.is_empty() {
13634            struct_ser.serialize_field("addedDownstreamActorId", &self.added_downstream_actor_id)?;
13635        }
13636        if !self.removed_downstream_actor_id.is_empty() {
13637            struct_ser.serialize_field("removedDownstreamActorId", &self.removed_downstream_actor_id)?;
13638        }
13639        struct_ser.end()
13640    }
13641}
13642impl<'de> serde::Deserialize<'de> for update_mutation::DispatcherUpdate {
13643    #[allow(deprecated)]
13644    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13645    where
13646        D: serde::Deserializer<'de>,
13647    {
13648        const FIELDS: &[&str] = &[
13649            "actor_id",
13650            "actorId",
13651            "dispatcher_id",
13652            "dispatcherId",
13653            "hash_mapping",
13654            "hashMapping",
13655            "added_downstream_actor_id",
13656            "addedDownstreamActorId",
13657            "removed_downstream_actor_id",
13658            "removedDownstreamActorId",
13659        ];
13660
13661        #[allow(clippy::enum_variant_names)]
13662        enum GeneratedField {
13663            ActorId,
13664            DispatcherId,
13665            HashMapping,
13666            AddedDownstreamActorId,
13667            RemovedDownstreamActorId,
13668        }
13669        impl<'de> serde::Deserialize<'de> for GeneratedField {
13670            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13671            where
13672                D: serde::Deserializer<'de>,
13673            {
13674                struct GeneratedVisitor;
13675
13676                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13677                    type Value = GeneratedField;
13678
13679                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13680                        write!(formatter, "expected one of: {:?}", &FIELDS)
13681                    }
13682
13683                    #[allow(unused_variables)]
13684                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13685                    where
13686                        E: serde::de::Error,
13687                    {
13688                        match value {
13689                            "actorId" | "actor_id" => Ok(GeneratedField::ActorId),
13690                            "dispatcherId" | "dispatcher_id" => Ok(GeneratedField::DispatcherId),
13691                            "hashMapping" | "hash_mapping" => Ok(GeneratedField::HashMapping),
13692                            "addedDownstreamActorId" | "added_downstream_actor_id" => Ok(GeneratedField::AddedDownstreamActorId),
13693                            "removedDownstreamActorId" | "removed_downstream_actor_id" => Ok(GeneratedField::RemovedDownstreamActorId),
13694                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13695                        }
13696                    }
13697                }
13698                deserializer.deserialize_identifier(GeneratedVisitor)
13699            }
13700        }
13701        struct GeneratedVisitor;
13702        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13703            type Value = update_mutation::DispatcherUpdate;
13704
13705            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13706                formatter.write_str("struct stream_plan.UpdateMutation.DispatcherUpdate")
13707            }
13708
13709            fn visit_map<V>(self, mut map_: V) -> std::result::Result<update_mutation::DispatcherUpdate, V::Error>
13710                where
13711                    V: serde::de::MapAccess<'de>,
13712            {
13713                let mut actor_id__ = None;
13714                let mut dispatcher_id__ = None;
13715                let mut hash_mapping__ = None;
13716                let mut added_downstream_actor_id__ = None;
13717                let mut removed_downstream_actor_id__ = None;
13718                while let Some(k) = map_.next_key()? {
13719                    match k {
13720                        GeneratedField::ActorId => {
13721                            if actor_id__.is_some() {
13722                                return Err(serde::de::Error::duplicate_field("actorId"));
13723                            }
13724                            actor_id__ = 
13725                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13726                            ;
13727                        }
13728                        GeneratedField::DispatcherId => {
13729                            if dispatcher_id__.is_some() {
13730                                return Err(serde::de::Error::duplicate_field("dispatcherId"));
13731                            }
13732                            dispatcher_id__ = 
13733                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13734                            ;
13735                        }
13736                        GeneratedField::HashMapping => {
13737                            if hash_mapping__.is_some() {
13738                                return Err(serde::de::Error::duplicate_field("hashMapping"));
13739                            }
13740                            hash_mapping__ = map_.next_value()?;
13741                        }
13742                        GeneratedField::AddedDownstreamActorId => {
13743                            if added_downstream_actor_id__.is_some() {
13744                                return Err(serde::de::Error::duplicate_field("addedDownstreamActorId"));
13745                            }
13746                            added_downstream_actor_id__ = 
13747                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
13748                                    .into_iter().map(|x| x.0).collect())
13749                            ;
13750                        }
13751                        GeneratedField::RemovedDownstreamActorId => {
13752                            if removed_downstream_actor_id__.is_some() {
13753                                return Err(serde::de::Error::duplicate_field("removedDownstreamActorId"));
13754                            }
13755                            removed_downstream_actor_id__ = 
13756                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
13757                                    .into_iter().map(|x| x.0).collect())
13758                            ;
13759                        }
13760                    }
13761                }
13762                Ok(update_mutation::DispatcherUpdate {
13763                    actor_id: actor_id__.unwrap_or_default(),
13764                    dispatcher_id: dispatcher_id__.unwrap_or_default(),
13765                    hash_mapping: hash_mapping__,
13766                    added_downstream_actor_id: added_downstream_actor_id__.unwrap_or_default(),
13767                    removed_downstream_actor_id: removed_downstream_actor_id__.unwrap_or_default(),
13768                })
13769            }
13770        }
13771        deserializer.deserialize_struct("stream_plan.UpdateMutation.DispatcherUpdate", FIELDS, GeneratedVisitor)
13772    }
13773}
13774impl serde::Serialize for update_mutation::MergeUpdate {
13775    #[allow(deprecated)]
13776    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13777    where
13778        S: serde::Serializer,
13779    {
13780        use serde::ser::SerializeStruct;
13781        let mut len = 0;
13782        if self.actor_id != 0 {
13783            len += 1;
13784        }
13785        if self.upstream_fragment_id != 0 {
13786            len += 1;
13787        }
13788        if self.new_upstream_fragment_id.is_some() {
13789            len += 1;
13790        }
13791        if !self.added_upstream_actor_id.is_empty() {
13792            len += 1;
13793        }
13794        if !self.removed_upstream_actor_id.is_empty() {
13795            len += 1;
13796        }
13797        let mut struct_ser = serializer.serialize_struct("stream_plan.UpdateMutation.MergeUpdate", len)?;
13798        if self.actor_id != 0 {
13799            struct_ser.serialize_field("actorId", &self.actor_id)?;
13800        }
13801        if self.upstream_fragment_id != 0 {
13802            struct_ser.serialize_field("upstreamFragmentId", &self.upstream_fragment_id)?;
13803        }
13804        if let Some(v) = self.new_upstream_fragment_id.as_ref() {
13805            struct_ser.serialize_field("newUpstreamFragmentId", v)?;
13806        }
13807        if !self.added_upstream_actor_id.is_empty() {
13808            struct_ser.serialize_field("addedUpstreamActorId", &self.added_upstream_actor_id)?;
13809        }
13810        if !self.removed_upstream_actor_id.is_empty() {
13811            struct_ser.serialize_field("removedUpstreamActorId", &self.removed_upstream_actor_id)?;
13812        }
13813        struct_ser.end()
13814    }
13815}
13816impl<'de> serde::Deserialize<'de> for update_mutation::MergeUpdate {
13817    #[allow(deprecated)]
13818    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13819    where
13820        D: serde::Deserializer<'de>,
13821    {
13822        const FIELDS: &[&str] = &[
13823            "actor_id",
13824            "actorId",
13825            "upstream_fragment_id",
13826            "upstreamFragmentId",
13827            "new_upstream_fragment_id",
13828            "newUpstreamFragmentId",
13829            "added_upstream_actor_id",
13830            "addedUpstreamActorId",
13831            "removed_upstream_actor_id",
13832            "removedUpstreamActorId",
13833        ];
13834
13835        #[allow(clippy::enum_variant_names)]
13836        enum GeneratedField {
13837            ActorId,
13838            UpstreamFragmentId,
13839            NewUpstreamFragmentId,
13840            AddedUpstreamActorId,
13841            RemovedUpstreamActorId,
13842        }
13843        impl<'de> serde::Deserialize<'de> for GeneratedField {
13844            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13845            where
13846                D: serde::Deserializer<'de>,
13847            {
13848                struct GeneratedVisitor;
13849
13850                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13851                    type Value = GeneratedField;
13852
13853                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13854                        write!(formatter, "expected one of: {:?}", &FIELDS)
13855                    }
13856
13857                    #[allow(unused_variables)]
13858                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
13859                    where
13860                        E: serde::de::Error,
13861                    {
13862                        match value {
13863                            "actorId" | "actor_id" => Ok(GeneratedField::ActorId),
13864                            "upstreamFragmentId" | "upstream_fragment_id" => Ok(GeneratedField::UpstreamFragmentId),
13865                            "newUpstreamFragmentId" | "new_upstream_fragment_id" => Ok(GeneratedField::NewUpstreamFragmentId),
13866                            "addedUpstreamActorId" | "added_upstream_actor_id" => Ok(GeneratedField::AddedUpstreamActorId),
13867                            "removedUpstreamActorId" | "removed_upstream_actor_id" => Ok(GeneratedField::RemovedUpstreamActorId),
13868                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
13869                        }
13870                    }
13871                }
13872                deserializer.deserialize_identifier(GeneratedVisitor)
13873            }
13874        }
13875        struct GeneratedVisitor;
13876        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13877            type Value = update_mutation::MergeUpdate;
13878
13879            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13880                formatter.write_str("struct stream_plan.UpdateMutation.MergeUpdate")
13881            }
13882
13883            fn visit_map<V>(self, mut map_: V) -> std::result::Result<update_mutation::MergeUpdate, V::Error>
13884                where
13885                    V: serde::de::MapAccess<'de>,
13886            {
13887                let mut actor_id__ = None;
13888                let mut upstream_fragment_id__ = None;
13889                let mut new_upstream_fragment_id__ = None;
13890                let mut added_upstream_actor_id__ = None;
13891                let mut removed_upstream_actor_id__ = None;
13892                while let Some(k) = map_.next_key()? {
13893                    match k {
13894                        GeneratedField::ActorId => {
13895                            if actor_id__.is_some() {
13896                                return Err(serde::de::Error::duplicate_field("actorId"));
13897                            }
13898                            actor_id__ = 
13899                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13900                            ;
13901                        }
13902                        GeneratedField::UpstreamFragmentId => {
13903                            if upstream_fragment_id__.is_some() {
13904                                return Err(serde::de::Error::duplicate_field("upstreamFragmentId"));
13905                            }
13906                            upstream_fragment_id__ = 
13907                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
13908                            ;
13909                        }
13910                        GeneratedField::NewUpstreamFragmentId => {
13911                            if new_upstream_fragment_id__.is_some() {
13912                                return Err(serde::de::Error::duplicate_field("newUpstreamFragmentId"));
13913                            }
13914                            new_upstream_fragment_id__ = 
13915                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
13916                            ;
13917                        }
13918                        GeneratedField::AddedUpstreamActorId => {
13919                            if added_upstream_actor_id__.is_some() {
13920                                return Err(serde::de::Error::duplicate_field("addedUpstreamActorId"));
13921                            }
13922                            added_upstream_actor_id__ = 
13923                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
13924                                    .into_iter().map(|x| x.0).collect())
13925                            ;
13926                        }
13927                        GeneratedField::RemovedUpstreamActorId => {
13928                            if removed_upstream_actor_id__.is_some() {
13929                                return Err(serde::de::Error::duplicate_field("removedUpstreamActorId"));
13930                            }
13931                            removed_upstream_actor_id__ = 
13932                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
13933                                    .into_iter().map(|x| x.0).collect())
13934                            ;
13935                        }
13936                    }
13937                }
13938                Ok(update_mutation::MergeUpdate {
13939                    actor_id: actor_id__.unwrap_or_default(),
13940                    upstream_fragment_id: upstream_fragment_id__.unwrap_or_default(),
13941                    new_upstream_fragment_id: new_upstream_fragment_id__,
13942                    added_upstream_actor_id: added_upstream_actor_id__.unwrap_or_default(),
13943                    removed_upstream_actor_id: removed_upstream_actor_id__.unwrap_or_default(),
13944                })
13945            }
13946        }
13947        deserializer.deserialize_struct("stream_plan.UpdateMutation.MergeUpdate", FIELDS, GeneratedVisitor)
13948    }
13949}
13950impl serde::Serialize for ValuesNode {
13951    #[allow(deprecated)]
13952    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13953    where
13954        S: serde::Serializer,
13955    {
13956        use serde::ser::SerializeStruct;
13957        let mut len = 0;
13958        if !self.tuples.is_empty() {
13959            len += 1;
13960        }
13961        if !self.fields.is_empty() {
13962            len += 1;
13963        }
13964        let mut struct_ser = serializer.serialize_struct("stream_plan.ValuesNode", len)?;
13965        if !self.tuples.is_empty() {
13966            struct_ser.serialize_field("tuples", &self.tuples)?;
13967        }
13968        if !self.fields.is_empty() {
13969            struct_ser.serialize_field("fields", &self.fields)?;
13970        }
13971        struct_ser.end()
13972    }
13973}
13974impl<'de> serde::Deserialize<'de> for ValuesNode {
13975    #[allow(deprecated)]
13976    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13977    where
13978        D: serde::Deserializer<'de>,
13979    {
13980        const FIELDS: &[&str] = &[
13981            "tuples",
13982            "fields",
13983        ];
13984
13985        #[allow(clippy::enum_variant_names)]
13986        enum GeneratedField {
13987            Tuples,
13988            Fields,
13989        }
13990        impl<'de> serde::Deserialize<'de> for GeneratedField {
13991            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
13992            where
13993                D: serde::Deserializer<'de>,
13994            {
13995                struct GeneratedVisitor;
13996
13997                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
13998                    type Value = GeneratedField;
13999
14000                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14001                        write!(formatter, "expected one of: {:?}", &FIELDS)
14002                    }
14003
14004                    #[allow(unused_variables)]
14005                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14006                    where
14007                        E: serde::de::Error,
14008                    {
14009                        match value {
14010                            "tuples" => Ok(GeneratedField::Tuples),
14011                            "fields" => Ok(GeneratedField::Fields),
14012                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14013                        }
14014                    }
14015                }
14016                deserializer.deserialize_identifier(GeneratedVisitor)
14017            }
14018        }
14019        struct GeneratedVisitor;
14020        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14021            type Value = ValuesNode;
14022
14023            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14024                formatter.write_str("struct stream_plan.ValuesNode")
14025            }
14026
14027            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ValuesNode, V::Error>
14028                where
14029                    V: serde::de::MapAccess<'de>,
14030            {
14031                let mut tuples__ = None;
14032                let mut fields__ = None;
14033                while let Some(k) = map_.next_key()? {
14034                    match k {
14035                        GeneratedField::Tuples => {
14036                            if tuples__.is_some() {
14037                                return Err(serde::de::Error::duplicate_field("tuples"));
14038                            }
14039                            tuples__ = Some(map_.next_value()?);
14040                        }
14041                        GeneratedField::Fields => {
14042                            if fields__.is_some() {
14043                                return Err(serde::de::Error::duplicate_field("fields"));
14044                            }
14045                            fields__ = Some(map_.next_value()?);
14046                        }
14047                    }
14048                }
14049                Ok(ValuesNode {
14050                    tuples: tuples__.unwrap_or_default(),
14051                    fields: fields__.unwrap_or_default(),
14052                })
14053            }
14054        }
14055        deserializer.deserialize_struct("stream_plan.ValuesNode", FIELDS, GeneratedVisitor)
14056    }
14057}
14058impl serde::Serialize for values_node::ExprTuple {
14059    #[allow(deprecated)]
14060    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14061    where
14062        S: serde::Serializer,
14063    {
14064        use serde::ser::SerializeStruct;
14065        let mut len = 0;
14066        if !self.cells.is_empty() {
14067            len += 1;
14068        }
14069        let mut struct_ser = serializer.serialize_struct("stream_plan.ValuesNode.ExprTuple", len)?;
14070        if !self.cells.is_empty() {
14071            struct_ser.serialize_field("cells", &self.cells)?;
14072        }
14073        struct_ser.end()
14074    }
14075}
14076impl<'de> serde::Deserialize<'de> for values_node::ExprTuple {
14077    #[allow(deprecated)]
14078    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14079    where
14080        D: serde::Deserializer<'de>,
14081    {
14082        const FIELDS: &[&str] = &[
14083            "cells",
14084        ];
14085
14086        #[allow(clippy::enum_variant_names)]
14087        enum GeneratedField {
14088            Cells,
14089        }
14090        impl<'de> serde::Deserialize<'de> for GeneratedField {
14091            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14092            where
14093                D: serde::Deserializer<'de>,
14094            {
14095                struct GeneratedVisitor;
14096
14097                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14098                    type Value = GeneratedField;
14099
14100                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14101                        write!(formatter, "expected one of: {:?}", &FIELDS)
14102                    }
14103
14104                    #[allow(unused_variables)]
14105                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14106                    where
14107                        E: serde::de::Error,
14108                    {
14109                        match value {
14110                            "cells" => Ok(GeneratedField::Cells),
14111                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14112                        }
14113                    }
14114                }
14115                deserializer.deserialize_identifier(GeneratedVisitor)
14116            }
14117        }
14118        struct GeneratedVisitor;
14119        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14120            type Value = values_node::ExprTuple;
14121
14122            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14123                formatter.write_str("struct stream_plan.ValuesNode.ExprTuple")
14124            }
14125
14126            fn visit_map<V>(self, mut map_: V) -> std::result::Result<values_node::ExprTuple, V::Error>
14127                where
14128                    V: serde::de::MapAccess<'de>,
14129            {
14130                let mut cells__ = None;
14131                while let Some(k) = map_.next_key()? {
14132                    match k {
14133                        GeneratedField::Cells => {
14134                            if cells__.is_some() {
14135                                return Err(serde::de::Error::duplicate_field("cells"));
14136                            }
14137                            cells__ = Some(map_.next_value()?);
14138                        }
14139                    }
14140                }
14141                Ok(values_node::ExprTuple {
14142                    cells: cells__.unwrap_or_default(),
14143                })
14144            }
14145        }
14146        deserializer.deserialize_struct("stream_plan.ValuesNode.ExprTuple", FIELDS, GeneratedVisitor)
14147    }
14148}
14149impl serde::Serialize for Watermark {
14150    #[allow(deprecated)]
14151    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14152    where
14153        S: serde::Serializer,
14154    {
14155        use serde::ser::SerializeStruct;
14156        let mut len = 0;
14157        if self.column.is_some() {
14158            len += 1;
14159        }
14160        if self.val.is_some() {
14161            len += 1;
14162        }
14163        let mut struct_ser = serializer.serialize_struct("stream_plan.Watermark", len)?;
14164        if let Some(v) = self.column.as_ref() {
14165            struct_ser.serialize_field("column", v)?;
14166        }
14167        if let Some(v) = self.val.as_ref() {
14168            struct_ser.serialize_field("val", v)?;
14169        }
14170        struct_ser.end()
14171    }
14172}
14173impl<'de> serde::Deserialize<'de> for Watermark {
14174    #[allow(deprecated)]
14175    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14176    where
14177        D: serde::Deserializer<'de>,
14178    {
14179        const FIELDS: &[&str] = &[
14180            "column",
14181            "val",
14182        ];
14183
14184        #[allow(clippy::enum_variant_names)]
14185        enum GeneratedField {
14186            Column,
14187            Val,
14188        }
14189        impl<'de> serde::Deserialize<'de> for GeneratedField {
14190            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14191            where
14192                D: serde::Deserializer<'de>,
14193            {
14194                struct GeneratedVisitor;
14195
14196                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14197                    type Value = GeneratedField;
14198
14199                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14200                        write!(formatter, "expected one of: {:?}", &FIELDS)
14201                    }
14202
14203                    #[allow(unused_variables)]
14204                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14205                    where
14206                        E: serde::de::Error,
14207                    {
14208                        match value {
14209                            "column" => Ok(GeneratedField::Column),
14210                            "val" => Ok(GeneratedField::Val),
14211                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14212                        }
14213                    }
14214                }
14215                deserializer.deserialize_identifier(GeneratedVisitor)
14216            }
14217        }
14218        struct GeneratedVisitor;
14219        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14220            type Value = Watermark;
14221
14222            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14223                formatter.write_str("struct stream_plan.Watermark")
14224            }
14225
14226            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Watermark, V::Error>
14227                where
14228                    V: serde::de::MapAccess<'de>,
14229            {
14230                let mut column__ = None;
14231                let mut val__ = None;
14232                while let Some(k) = map_.next_key()? {
14233                    match k {
14234                        GeneratedField::Column => {
14235                            if column__.is_some() {
14236                                return Err(serde::de::Error::duplicate_field("column"));
14237                            }
14238                            column__ = map_.next_value()?;
14239                        }
14240                        GeneratedField::Val => {
14241                            if val__.is_some() {
14242                                return Err(serde::de::Error::duplicate_field("val"));
14243                            }
14244                            val__ = map_.next_value()?;
14245                        }
14246                    }
14247                }
14248                Ok(Watermark {
14249                    column: column__,
14250                    val: val__,
14251                })
14252            }
14253        }
14254        deserializer.deserialize_struct("stream_plan.Watermark", FIELDS, GeneratedVisitor)
14255    }
14256}
14257impl serde::Serialize for WatermarkFilterNode {
14258    #[allow(deprecated)]
14259    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14260    where
14261        S: serde::Serializer,
14262    {
14263        use serde::ser::SerializeStruct;
14264        let mut len = 0;
14265        if !self.watermark_descs.is_empty() {
14266            len += 1;
14267        }
14268        if !self.tables.is_empty() {
14269            len += 1;
14270        }
14271        let mut struct_ser = serializer.serialize_struct("stream_plan.WatermarkFilterNode", len)?;
14272        if !self.watermark_descs.is_empty() {
14273            struct_ser.serialize_field("watermarkDescs", &self.watermark_descs)?;
14274        }
14275        if !self.tables.is_empty() {
14276            struct_ser.serialize_field("tables", &self.tables)?;
14277        }
14278        struct_ser.end()
14279    }
14280}
14281impl<'de> serde::Deserialize<'de> for WatermarkFilterNode {
14282    #[allow(deprecated)]
14283    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14284    where
14285        D: serde::Deserializer<'de>,
14286    {
14287        const FIELDS: &[&str] = &[
14288            "watermark_descs",
14289            "watermarkDescs",
14290            "tables",
14291        ];
14292
14293        #[allow(clippy::enum_variant_names)]
14294        enum GeneratedField {
14295            WatermarkDescs,
14296            Tables,
14297        }
14298        impl<'de> serde::Deserialize<'de> for GeneratedField {
14299            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
14300            where
14301                D: serde::Deserializer<'de>,
14302            {
14303                struct GeneratedVisitor;
14304
14305                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14306                    type Value = GeneratedField;
14307
14308                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14309                        write!(formatter, "expected one of: {:?}", &FIELDS)
14310                    }
14311
14312                    #[allow(unused_variables)]
14313                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
14314                    where
14315                        E: serde::de::Error,
14316                    {
14317                        match value {
14318                            "watermarkDescs" | "watermark_descs" => Ok(GeneratedField::WatermarkDescs),
14319                            "tables" => Ok(GeneratedField::Tables),
14320                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
14321                        }
14322                    }
14323                }
14324                deserializer.deserialize_identifier(GeneratedVisitor)
14325            }
14326        }
14327        struct GeneratedVisitor;
14328        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
14329            type Value = WatermarkFilterNode;
14330
14331            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14332                formatter.write_str("struct stream_plan.WatermarkFilterNode")
14333            }
14334
14335            fn visit_map<V>(self, mut map_: V) -> std::result::Result<WatermarkFilterNode, V::Error>
14336                where
14337                    V: serde::de::MapAccess<'de>,
14338            {
14339                let mut watermark_descs__ = None;
14340                let mut tables__ = None;
14341                while let Some(k) = map_.next_key()? {
14342                    match k {
14343                        GeneratedField::WatermarkDescs => {
14344                            if watermark_descs__.is_some() {
14345                                return Err(serde::de::Error::duplicate_field("watermarkDescs"));
14346                            }
14347                            watermark_descs__ = Some(map_.next_value()?);
14348                        }
14349                        GeneratedField::Tables => {
14350                            if tables__.is_some() {
14351                                return Err(serde::de::Error::duplicate_field("tables"));
14352                            }
14353                            tables__ = Some(map_.next_value()?);
14354                        }
14355                    }
14356                }
14357                Ok(WatermarkFilterNode {
14358                    watermark_descs: watermark_descs__.unwrap_or_default(),
14359                    tables: tables__.unwrap_or_default(),
14360                })
14361            }
14362        }
14363        deserializer.deserialize_struct("stream_plan.WatermarkFilterNode", FIELDS, GeneratedVisitor)
14364    }
14365}