Skip to main content

headwaters_proto/proto/
headwaters.read.v1.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// Kind of a graph node or search hit. `DATASET_FIELD` is column-level and only
4/// appears in column-lineage graphs.
5#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
6#[repr(i32)]
7pub enum EntityKind {
8    ENTITY_KIND_UNSPECIFIED = 0i32,
9    JOB = 1i32,
10    DATASET = 2i32,
11    DATASET_FIELD = 3i32,
12}
13impl EntityKind {
14    ///Idiomatic alias for [`Self::ENTITY_KIND_UNSPECIFIED`]; `Debug` prints the variant name.
15    #[allow(non_upper_case_globals)]
16    pub const EntityKindUnspecified: Self = Self::ENTITY_KIND_UNSPECIFIED;
17    ///Idiomatic alias for [`Self::JOB`]; `Debug` prints the variant name.
18    #[allow(non_upper_case_globals)]
19    pub const Job: Self = Self::JOB;
20    ///Idiomatic alias for [`Self::DATASET`]; `Debug` prints the variant name.
21    #[allow(non_upper_case_globals)]
22    pub const Dataset: Self = Self::DATASET;
23    ///Idiomatic alias for [`Self::DATASET_FIELD`]; `Debug` prints the variant name.
24    #[allow(non_upper_case_globals)]
25    pub const DatasetField: Self = Self::DATASET_FIELD;
26}
27impl ::core::default::Default for EntityKind {
28    fn default() -> Self {
29        Self::ENTITY_KIND_UNSPECIFIED
30    }
31}
32impl ::serde::Serialize for EntityKind {
33    fn serialize<S: ::serde::Serializer>(
34        &self,
35        s: S,
36    ) -> ::core::result::Result<S::Ok, S::Error> {
37        s.serialize_str(::buffa::Enumeration::proto_name(self))
38    }
39}
40impl<'de> ::serde::Deserialize<'de> for EntityKind {
41    fn deserialize<D: ::serde::Deserializer<'de>>(
42        d: D,
43    ) -> ::core::result::Result<Self, D::Error> {
44        struct _V;
45        impl ::serde::de::Visitor<'_> for _V {
46            type Value = EntityKind;
47            fn expecting(
48                &self,
49                f: &mut ::core::fmt::Formatter<'_>,
50            ) -> ::core::fmt::Result {
51                f.write_str(
52                    concat!("a string, integer, or null for ", stringify!(EntityKind)),
53                )
54            }
55            fn visit_str<E: ::serde::de::Error>(
56                self,
57                v: &str,
58            ) -> ::core::result::Result<EntityKind, E> {
59                <EntityKind as ::buffa::Enumeration>::from_proto_name(v)
60                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
61            }
62            fn visit_i64<E: ::serde::de::Error>(
63                self,
64                v: i64,
65            ) -> ::core::result::Result<EntityKind, E> {
66                let v32 = i32::try_from(v)
67                    .map_err(|_| {
68                        ::serde::de::Error::custom(
69                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
70                        )
71                    })?;
72                <EntityKind as ::buffa::Enumeration>::from_i32(v32)
73                    .ok_or_else(|| {
74                        ::serde::de::Error::custom(
75                            ::buffa::alloc::format!("unknown enum value {v32}"),
76                        )
77                    })
78            }
79            fn visit_u64<E: ::serde::de::Error>(
80                self,
81                v: u64,
82            ) -> ::core::result::Result<EntityKind, E> {
83                let v32 = i32::try_from(v)
84                    .map_err(|_| {
85                        ::serde::de::Error::custom(
86                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
87                        )
88                    })?;
89                <EntityKind as ::buffa::Enumeration>::from_i32(v32)
90                    .ok_or_else(|| {
91                        ::serde::de::Error::custom(
92                            ::buffa::alloc::format!("unknown enum value {v32}"),
93                        )
94                    })
95            }
96            fn visit_unit<E: ::serde::de::Error>(
97                self,
98            ) -> ::core::result::Result<EntityKind, E> {
99                ::core::result::Result::Ok(::core::default::Default::default())
100            }
101        }
102        d.deserialize_any(_V)
103    }
104}
105impl ::buffa::json_helpers::ProtoElemJson for EntityKind {
106    fn serialize_proto_json<S: ::serde::Serializer>(
107        v: &Self,
108        s: S,
109    ) -> ::core::result::Result<S::Ok, S::Error> {
110        ::serde::Serialize::serialize(v, s)
111    }
112    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
113        d: D,
114    ) -> ::core::result::Result<Self, D::Error> {
115        <Self as ::serde::Deserialize>::deserialize(d)
116    }
117}
118impl ::buffa::Enumeration for EntityKind {
119    fn from_i32(value: i32) -> ::core::option::Option<Self> {
120        match value {
121            0i32 => ::core::option::Option::Some(Self::ENTITY_KIND_UNSPECIFIED),
122            1i32 => ::core::option::Option::Some(Self::JOB),
123            2i32 => ::core::option::Option::Some(Self::DATASET),
124            3i32 => ::core::option::Option::Some(Self::DATASET_FIELD),
125            _ => ::core::option::Option::None,
126        }
127    }
128    fn to_i32(&self) -> i32 {
129        *self as i32
130    }
131    fn proto_name(&self) -> &'static str {
132        match self {
133            Self::ENTITY_KIND_UNSPECIFIED => "ENTITY_KIND_UNSPECIFIED",
134            Self::JOB => "JOB",
135            Self::DATASET => "DATASET",
136            Self::DATASET_FIELD => "DATASET_FIELD",
137        }
138    }
139    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
140        match name {
141            "ENTITY_KIND_UNSPECIFIED" => {
142                ::core::option::Option::Some(Self::ENTITY_KIND_UNSPECIFIED)
143            }
144            "JOB" => ::core::option::Option::Some(Self::JOB),
145            "DATASET" => ::core::option::Option::Some(Self::DATASET),
146            "DATASET_FIELD" => ::core::option::Option::Some(Self::DATASET_FIELD),
147            _ => ::core::option::Option::None,
148        }
149    }
150    fn values() -> &'static [Self] {
151        &[Self::ENTITY_KIND_UNSPECIFIED, Self::JOB, Self::DATASET, Self::DATASET_FIELD]
152    }
153}
154/// How a job processes data. Currently always `BATCH` — the event log does not
155/// yet distinguish streaming jobs.
156#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
157#[repr(i32)]
158pub enum JobType {
159    JOB_TYPE_UNSPECIFIED = 0i32,
160    BATCH = 1i32,
161}
162impl JobType {
163    ///Idiomatic alias for [`Self::JOB_TYPE_UNSPECIFIED`]; `Debug` prints the variant name.
164    #[allow(non_upper_case_globals)]
165    pub const JobTypeUnspecified: Self = Self::JOB_TYPE_UNSPECIFIED;
166    ///Idiomatic alias for [`Self::BATCH`]; `Debug` prints the variant name.
167    #[allow(non_upper_case_globals)]
168    pub const Batch: Self = Self::BATCH;
169}
170impl ::core::default::Default for JobType {
171    fn default() -> Self {
172        Self::JOB_TYPE_UNSPECIFIED
173    }
174}
175impl ::serde::Serialize for JobType {
176    fn serialize<S: ::serde::Serializer>(
177        &self,
178        s: S,
179    ) -> ::core::result::Result<S::Ok, S::Error> {
180        s.serialize_str(::buffa::Enumeration::proto_name(self))
181    }
182}
183impl<'de> ::serde::Deserialize<'de> for JobType {
184    fn deserialize<D: ::serde::Deserializer<'de>>(
185        d: D,
186    ) -> ::core::result::Result<Self, D::Error> {
187        struct _V;
188        impl ::serde::de::Visitor<'_> for _V {
189            type Value = JobType;
190            fn expecting(
191                &self,
192                f: &mut ::core::fmt::Formatter<'_>,
193            ) -> ::core::fmt::Result {
194                f.write_str(
195                    concat!("a string, integer, or null for ", stringify!(JobType)),
196                )
197            }
198            fn visit_str<E: ::serde::de::Error>(
199                self,
200                v: &str,
201            ) -> ::core::result::Result<JobType, E> {
202                <JobType as ::buffa::Enumeration>::from_proto_name(v)
203                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
204            }
205            fn visit_i64<E: ::serde::de::Error>(
206                self,
207                v: i64,
208            ) -> ::core::result::Result<JobType, E> {
209                let v32 = i32::try_from(v)
210                    .map_err(|_| {
211                        ::serde::de::Error::custom(
212                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
213                        )
214                    })?;
215                <JobType as ::buffa::Enumeration>::from_i32(v32)
216                    .ok_or_else(|| {
217                        ::serde::de::Error::custom(
218                            ::buffa::alloc::format!("unknown enum value {v32}"),
219                        )
220                    })
221            }
222            fn visit_u64<E: ::serde::de::Error>(
223                self,
224                v: u64,
225            ) -> ::core::result::Result<JobType, E> {
226                let v32 = i32::try_from(v)
227                    .map_err(|_| {
228                        ::serde::de::Error::custom(
229                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
230                        )
231                    })?;
232                <JobType as ::buffa::Enumeration>::from_i32(v32)
233                    .ok_or_else(|| {
234                        ::serde::de::Error::custom(
235                            ::buffa::alloc::format!("unknown enum value {v32}"),
236                        )
237                    })
238            }
239            fn visit_unit<E: ::serde::de::Error>(
240                self,
241            ) -> ::core::result::Result<JobType, E> {
242                ::core::result::Result::Ok(::core::default::Default::default())
243            }
244        }
245        d.deserialize_any(_V)
246    }
247}
248impl ::buffa::json_helpers::ProtoElemJson for JobType {
249    fn serialize_proto_json<S: ::serde::Serializer>(
250        v: &Self,
251        s: S,
252    ) -> ::core::result::Result<S::Ok, S::Error> {
253        ::serde::Serialize::serialize(v, s)
254    }
255    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
256        d: D,
257    ) -> ::core::result::Result<Self, D::Error> {
258        <Self as ::serde::Deserialize>::deserialize(d)
259    }
260}
261impl ::buffa::Enumeration for JobType {
262    fn from_i32(value: i32) -> ::core::option::Option<Self> {
263        match value {
264            0i32 => ::core::option::Option::Some(Self::JOB_TYPE_UNSPECIFIED),
265            1i32 => ::core::option::Option::Some(Self::BATCH),
266            _ => ::core::option::Option::None,
267        }
268    }
269    fn to_i32(&self) -> i32 {
270        *self as i32
271    }
272    fn proto_name(&self) -> &'static str {
273        match self {
274            Self::JOB_TYPE_UNSPECIFIED => "JOB_TYPE_UNSPECIFIED",
275            Self::BATCH => "BATCH",
276        }
277    }
278    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
279        match name {
280            "JOB_TYPE_UNSPECIFIED" => {
281                ::core::option::Option::Some(Self::JOB_TYPE_UNSPECIFIED)
282            }
283            "BATCH" => ::core::option::Option::Some(Self::BATCH),
284            _ => ::core::option::Option::None,
285        }
286    }
287    fn values() -> &'static [Self] {
288        &[Self::JOB_TYPE_UNSPECIFIED, Self::BATCH]
289    }
290}
291/// Storage kind of a dataset. Currently always `DB_TABLE`.
292#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
293#[repr(i32)]
294pub enum DatasetType {
295    DATASET_TYPE_UNSPECIFIED = 0i32,
296    DB_TABLE = 1i32,
297}
298impl DatasetType {
299    ///Idiomatic alias for [`Self::DATASET_TYPE_UNSPECIFIED`]; `Debug` prints the variant name.
300    #[allow(non_upper_case_globals)]
301    pub const DatasetTypeUnspecified: Self = Self::DATASET_TYPE_UNSPECIFIED;
302    ///Idiomatic alias for [`Self::DB_TABLE`]; `Debug` prints the variant name.
303    #[allow(non_upper_case_globals)]
304    pub const DbTable: Self = Self::DB_TABLE;
305}
306impl ::core::default::Default for DatasetType {
307    fn default() -> Self {
308        Self::DATASET_TYPE_UNSPECIFIED
309    }
310}
311impl ::serde::Serialize for DatasetType {
312    fn serialize<S: ::serde::Serializer>(
313        &self,
314        s: S,
315    ) -> ::core::result::Result<S::Ok, S::Error> {
316        s.serialize_str(::buffa::Enumeration::proto_name(self))
317    }
318}
319impl<'de> ::serde::Deserialize<'de> for DatasetType {
320    fn deserialize<D: ::serde::Deserializer<'de>>(
321        d: D,
322    ) -> ::core::result::Result<Self, D::Error> {
323        struct _V;
324        impl ::serde::de::Visitor<'_> for _V {
325            type Value = DatasetType;
326            fn expecting(
327                &self,
328                f: &mut ::core::fmt::Formatter<'_>,
329            ) -> ::core::fmt::Result {
330                f.write_str(
331                    concat!("a string, integer, or null for ", stringify!(DatasetType)),
332                )
333            }
334            fn visit_str<E: ::serde::de::Error>(
335                self,
336                v: &str,
337            ) -> ::core::result::Result<DatasetType, E> {
338                <DatasetType as ::buffa::Enumeration>::from_proto_name(v)
339                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
340            }
341            fn visit_i64<E: ::serde::de::Error>(
342                self,
343                v: i64,
344            ) -> ::core::result::Result<DatasetType, E> {
345                let v32 = i32::try_from(v)
346                    .map_err(|_| {
347                        ::serde::de::Error::custom(
348                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
349                        )
350                    })?;
351                <DatasetType as ::buffa::Enumeration>::from_i32(v32)
352                    .ok_or_else(|| {
353                        ::serde::de::Error::custom(
354                            ::buffa::alloc::format!("unknown enum value {v32}"),
355                        )
356                    })
357            }
358            fn visit_u64<E: ::serde::de::Error>(
359                self,
360                v: u64,
361            ) -> ::core::result::Result<DatasetType, E> {
362                let v32 = i32::try_from(v)
363                    .map_err(|_| {
364                        ::serde::de::Error::custom(
365                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
366                        )
367                    })?;
368                <DatasetType as ::buffa::Enumeration>::from_i32(v32)
369                    .ok_or_else(|| {
370                        ::serde::de::Error::custom(
371                            ::buffa::alloc::format!("unknown enum value {v32}"),
372                        )
373                    })
374            }
375            fn visit_unit<E: ::serde::de::Error>(
376                self,
377            ) -> ::core::result::Result<DatasetType, E> {
378                ::core::result::Result::Ok(::core::default::Default::default())
379            }
380        }
381        d.deserialize_any(_V)
382    }
383}
384impl ::buffa::json_helpers::ProtoElemJson for DatasetType {
385    fn serialize_proto_json<S: ::serde::Serializer>(
386        v: &Self,
387        s: S,
388    ) -> ::core::result::Result<S::Ok, S::Error> {
389        ::serde::Serialize::serialize(v, s)
390    }
391    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
392        d: D,
393    ) -> ::core::result::Result<Self, D::Error> {
394        <Self as ::serde::Deserialize>::deserialize(d)
395    }
396}
397impl ::buffa::Enumeration for DatasetType {
398    fn from_i32(value: i32) -> ::core::option::Option<Self> {
399        match value {
400            0i32 => ::core::option::Option::Some(Self::DATASET_TYPE_UNSPECIFIED),
401            1i32 => ::core::option::Option::Some(Self::DB_TABLE),
402            _ => ::core::option::Option::None,
403        }
404    }
405    fn to_i32(&self) -> i32 {
406        *self as i32
407    }
408    fn proto_name(&self) -> &'static str {
409        match self {
410            Self::DATASET_TYPE_UNSPECIFIED => "DATASET_TYPE_UNSPECIFIED",
411            Self::DB_TABLE => "DB_TABLE",
412        }
413    }
414    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
415        match name {
416            "DATASET_TYPE_UNSPECIFIED" => {
417                ::core::option::Option::Some(Self::DATASET_TYPE_UNSPECIFIED)
418            }
419            "DB_TABLE" => ::core::option::Option::Some(Self::DB_TABLE),
420            _ => ::core::option::Option::None,
421        }
422    }
423    fn values() -> &'static [Self] {
424        &[Self::DATASET_TYPE_UNSPECIFIED, Self::DB_TABLE]
425    }
426}
427/// Lifecycle state of a run, derived from its OpenLineage events. `COMPLETED` /
428/// `FAILED` / `ABORTED` are terminal.
429#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
430#[repr(i32)]
431pub enum RunState {
432    RUN_STATE_UNSPECIFIED = 0i32,
433    NEW = 1i32,
434    RUNNING = 2i32,
435    COMPLETED = 3i32,
436    FAILED = 4i32,
437    ABORTED = 5i32,
438}
439impl RunState {
440    ///Idiomatic alias for [`Self::RUN_STATE_UNSPECIFIED`]; `Debug` prints the variant name.
441    #[allow(non_upper_case_globals)]
442    pub const RunStateUnspecified: Self = Self::RUN_STATE_UNSPECIFIED;
443    ///Idiomatic alias for [`Self::NEW`]; `Debug` prints the variant name.
444    #[allow(non_upper_case_globals)]
445    pub const New: Self = Self::NEW;
446    ///Idiomatic alias for [`Self::RUNNING`]; `Debug` prints the variant name.
447    #[allow(non_upper_case_globals)]
448    pub const Running: Self = Self::RUNNING;
449    ///Idiomatic alias for [`Self::COMPLETED`]; `Debug` prints the variant name.
450    #[allow(non_upper_case_globals)]
451    pub const Completed: Self = Self::COMPLETED;
452    ///Idiomatic alias for [`Self::FAILED`]; `Debug` prints the variant name.
453    #[allow(non_upper_case_globals)]
454    pub const Failed: Self = Self::FAILED;
455    ///Idiomatic alias for [`Self::ABORTED`]; `Debug` prints the variant name.
456    #[allow(non_upper_case_globals)]
457    pub const Aborted: Self = Self::ABORTED;
458}
459impl ::core::default::Default for RunState {
460    fn default() -> Self {
461        Self::RUN_STATE_UNSPECIFIED
462    }
463}
464impl ::serde::Serialize for RunState {
465    fn serialize<S: ::serde::Serializer>(
466        &self,
467        s: S,
468    ) -> ::core::result::Result<S::Ok, S::Error> {
469        s.serialize_str(::buffa::Enumeration::proto_name(self))
470    }
471}
472impl<'de> ::serde::Deserialize<'de> for RunState {
473    fn deserialize<D: ::serde::Deserializer<'de>>(
474        d: D,
475    ) -> ::core::result::Result<Self, D::Error> {
476        struct _V;
477        impl ::serde::de::Visitor<'_> for _V {
478            type Value = RunState;
479            fn expecting(
480                &self,
481                f: &mut ::core::fmt::Formatter<'_>,
482            ) -> ::core::fmt::Result {
483                f.write_str(
484                    concat!("a string, integer, or null for ", stringify!(RunState)),
485                )
486            }
487            fn visit_str<E: ::serde::de::Error>(
488                self,
489                v: &str,
490            ) -> ::core::result::Result<RunState, E> {
491                <RunState as ::buffa::Enumeration>::from_proto_name(v)
492                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
493            }
494            fn visit_i64<E: ::serde::de::Error>(
495                self,
496                v: i64,
497            ) -> ::core::result::Result<RunState, E> {
498                let v32 = i32::try_from(v)
499                    .map_err(|_| {
500                        ::serde::de::Error::custom(
501                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
502                        )
503                    })?;
504                <RunState as ::buffa::Enumeration>::from_i32(v32)
505                    .ok_or_else(|| {
506                        ::serde::de::Error::custom(
507                            ::buffa::alloc::format!("unknown enum value {v32}"),
508                        )
509                    })
510            }
511            fn visit_u64<E: ::serde::de::Error>(
512                self,
513                v: u64,
514            ) -> ::core::result::Result<RunState, E> {
515                let v32 = i32::try_from(v)
516                    .map_err(|_| {
517                        ::serde::de::Error::custom(
518                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
519                        )
520                    })?;
521                <RunState as ::buffa::Enumeration>::from_i32(v32)
522                    .ok_or_else(|| {
523                        ::serde::de::Error::custom(
524                            ::buffa::alloc::format!("unknown enum value {v32}"),
525                        )
526                    })
527            }
528            fn visit_unit<E: ::serde::de::Error>(
529                self,
530            ) -> ::core::result::Result<RunState, E> {
531                ::core::result::Result::Ok(::core::default::Default::default())
532            }
533        }
534        d.deserialize_any(_V)
535    }
536}
537impl ::buffa::json_helpers::ProtoElemJson for RunState {
538    fn serialize_proto_json<S: ::serde::Serializer>(
539        v: &Self,
540        s: S,
541    ) -> ::core::result::Result<S::Ok, S::Error> {
542        ::serde::Serialize::serialize(v, s)
543    }
544    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
545        d: D,
546    ) -> ::core::result::Result<Self, D::Error> {
547        <Self as ::serde::Deserialize>::deserialize(d)
548    }
549}
550impl ::buffa::Enumeration for RunState {
551    fn from_i32(value: i32) -> ::core::option::Option<Self> {
552        match value {
553            0i32 => ::core::option::Option::Some(Self::RUN_STATE_UNSPECIFIED),
554            1i32 => ::core::option::Option::Some(Self::NEW),
555            2i32 => ::core::option::Option::Some(Self::RUNNING),
556            3i32 => ::core::option::Option::Some(Self::COMPLETED),
557            4i32 => ::core::option::Option::Some(Self::FAILED),
558            5i32 => ::core::option::Option::Some(Self::ABORTED),
559            _ => ::core::option::Option::None,
560        }
561    }
562    fn to_i32(&self) -> i32 {
563        *self as i32
564    }
565    fn proto_name(&self) -> &'static str {
566        match self {
567            Self::RUN_STATE_UNSPECIFIED => "RUN_STATE_UNSPECIFIED",
568            Self::NEW => "NEW",
569            Self::RUNNING => "RUNNING",
570            Self::COMPLETED => "COMPLETED",
571            Self::FAILED => "FAILED",
572            Self::ABORTED => "ABORTED",
573        }
574    }
575    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
576        match name {
577            "RUN_STATE_UNSPECIFIED" => {
578                ::core::option::Option::Some(Self::RUN_STATE_UNSPECIFIED)
579            }
580            "NEW" => ::core::option::Option::Some(Self::NEW),
581            "RUNNING" => ::core::option::Option::Some(Self::RUNNING),
582            "COMPLETED" => ::core::option::Option::Some(Self::COMPLETED),
583            "FAILED" => ::core::option::Option::Some(Self::FAILED),
584            "ABORTED" => ::core::option::Option::Some(Self::ABORTED),
585            _ => ::core::option::Option::None,
586        }
587    }
588    fn values() -> &'static [Self] {
589        &[
590            Self::RUN_STATE_UNSPECIFIED,
591            Self::NEW,
592            Self::RUNNING,
593            Self::COMPLETED,
594            Self::FAILED,
595            Self::ABORTED,
596        ]
597    }
598}
599/// A `{namespace, name}` reference to a job or dataset.
600#[derive(Clone, PartialEq, Default)]
601#[derive(::serde::Serialize, ::serde::Deserialize)]
602#[serde(default)]
603pub struct EntityId {
604    /// Field 1: `namespace`
605    #[serde(
606        rename = "namespace",
607        with = "::buffa::json_helpers::proto_string",
608        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
609    )]
610    pub namespace: ::buffa::alloc::string::String,
611    /// Field 2: `name`
612    #[serde(
613        rename = "name",
614        with = "::buffa::json_helpers::proto_string",
615        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
616    )]
617    pub name: ::buffa::alloc::string::String,
618    #[serde(skip)]
619    #[doc(hidden)]
620    pub __buffa_unknown_fields: ::buffa::UnknownFields,
621}
622impl ::core::fmt::Debug for EntityId {
623    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
624        f.debug_struct("EntityId")
625            .field("namespace", &self.namespace)
626            .field("name", &self.name)
627            .finish()
628    }
629}
630impl EntityId {
631    /// Protobuf type URL for this message, for use with `Any::pack` and
632    /// `Any::unpack_if`.
633    ///
634    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
635    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.EntityId";
636}
637impl ::buffa::DefaultInstance for EntityId {
638    fn default_instance() -> &'static Self {
639        static VALUE: ::buffa::__private::OnceBox<EntityId> = ::buffa::__private::OnceBox::new();
640        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
641    }
642}
643impl ::buffa::MessageName for EntityId {
644    const PACKAGE: &'static str = "headwaters.read.v1";
645    const NAME: &'static str = "EntityId";
646    const FULL_NAME: &'static str = "headwaters.read.v1.EntityId";
647    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.EntityId";
648}
649impl ::buffa::Message for EntityId {
650    /// Returns the total encoded size in bytes.
651    ///
652    /// The result is a `u32`; the protobuf specification requires all
653    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
654    /// compliant message will never overflow this type.
655    #[allow(clippy::let_and_return)]
656    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
657        #[allow(unused_imports)]
658        use ::buffa::Enumeration as _;
659        let mut size = 0u32;
660        if !self.namespace.is_empty() {
661            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
662        }
663        if !self.name.is_empty() {
664            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
665        }
666        size += self.__buffa_unknown_fields.encoded_len() as u32;
667        size
668    }
669    fn write_to(
670        &self,
671        _cache: &mut ::buffa::SizeCache,
672        buf: &mut impl ::buffa::bytes::BufMut,
673    ) {
674        #[allow(unused_imports)]
675        use ::buffa::Enumeration as _;
676        if !self.namespace.is_empty() {
677            ::buffa::encoding::Tag::new(
678                    1u32,
679                    ::buffa::encoding::WireType::LengthDelimited,
680                )
681                .encode(buf);
682            ::buffa::types::encode_string(&self.namespace, buf);
683        }
684        if !self.name.is_empty() {
685            ::buffa::encoding::Tag::new(
686                    2u32,
687                    ::buffa::encoding::WireType::LengthDelimited,
688                )
689                .encode(buf);
690            ::buffa::types::encode_string(&self.name, buf);
691        }
692        self.__buffa_unknown_fields.write_to(buf);
693    }
694    fn merge_field(
695        &mut self,
696        tag: ::buffa::encoding::Tag,
697        buf: &mut impl ::buffa::bytes::Buf,
698        depth: u32,
699    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
700        #[allow(unused_imports)]
701        use ::buffa::bytes::Buf as _;
702        #[allow(unused_imports)]
703        use ::buffa::Enumeration as _;
704        match tag.field_number() {
705            1u32 => {
706                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
707                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
708                        field_number: 1u32,
709                        expected: 2u8,
710                        actual: tag.wire_type() as u8,
711                    });
712                }
713                ::buffa::types::merge_string(&mut self.namespace, buf)?;
714            }
715            2u32 => {
716                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
717                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
718                        field_number: 2u32,
719                        expected: 2u8,
720                        actual: tag.wire_type() as u8,
721                    });
722                }
723                ::buffa::types::merge_string(&mut self.name, buf)?;
724            }
725            _ => {
726                self.__buffa_unknown_fields
727                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
728            }
729        }
730        ::core::result::Result::Ok(())
731    }
732    fn clear(&mut self) {
733        self.namespace.clear();
734        self.name.clear();
735        self.__buffa_unknown_fields.clear();
736    }
737}
738impl ::buffa::ExtensionSet for EntityId {
739    const PROTO_FQN: &'static str = "headwaters.read.v1.EntityId";
740    fn unknown_fields(&self) -> &::buffa::UnknownFields {
741        &self.__buffa_unknown_fields
742    }
743    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
744        &mut self.__buffa_unknown_fields
745    }
746}
747impl ::buffa::json_helpers::ProtoElemJson for EntityId {
748    fn serialize_proto_json<S: ::serde::Serializer>(
749        v: &Self,
750        s: S,
751    ) -> ::core::result::Result<S::Ok, S::Error> {
752        ::serde::Serialize::serialize(v, s)
753    }
754    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
755        d: D,
756    ) -> ::core::result::Result<Self, D::Error> {
757        <Self as ::serde::Deserialize>::deserialize(d)
758    }
759}
760#[doc(hidden)]
761pub const __ENTITY_ID_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
762    type_url: "type.googleapis.com/headwaters.read.v1.EntityId",
763    to_json: ::buffa::type_registry::any_to_json::<EntityId>,
764    from_json: ::buffa::type_registry::any_from_json::<EntityId>,
765    is_wkt: false,
766};
767/// --- namespaces ---
768///
769/// A namespace: the grouping that scopes job and dataset names.
770#[derive(Clone, PartialEq, Default)]
771#[derive(::serde::Serialize, ::serde::Deserialize)]
772#[serde(default)]
773pub struct Namespace {
774    /// Field 1: `name`
775    #[serde(
776        rename = "name",
777        with = "::buffa::json_helpers::proto_string",
778        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
779    )]
780    pub name: ::buffa::alloc::string::String,
781    /// Field 2: `created_at`
782    #[serde(
783        rename = "createdAt",
784        alias = "created_at",
785        with = "::buffa::json_helpers::proto_string",
786        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
787    )]
788    pub created_at: ::buffa::alloc::string::String,
789    /// Field 3: `updated_at`
790    #[serde(
791        rename = "updatedAt",
792        alias = "updated_at",
793        with = "::buffa::json_helpers::proto_string",
794        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
795    )]
796    pub updated_at: ::buffa::alloc::string::String,
797    /// Field 4: `owner_name`
798    #[serde(
799        rename = "ownerName",
800        alias = "owner_name",
801        with = "::buffa::json_helpers::proto_string",
802        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
803    )]
804    pub owner_name: ::buffa::alloc::string::String,
805    /// Field 5: `description`
806    #[serde(
807        rename = "description",
808        with = "::buffa::json_helpers::proto_string",
809        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
810    )]
811    pub description: ::buffa::alloc::string::String,
812    /// True if the namespace is hidden from default listings.
813    ///
814    /// Field 6: `is_hidden`
815    #[serde(
816        rename = "isHidden",
817        alias = "is_hidden",
818        with = "::buffa::json_helpers::proto_bool",
819        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
820    )]
821    pub is_hidden: bool,
822    #[serde(skip)]
823    #[doc(hidden)]
824    pub __buffa_unknown_fields: ::buffa::UnknownFields,
825}
826impl ::core::fmt::Debug for Namespace {
827    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
828        f.debug_struct("Namespace")
829            .field("name", &self.name)
830            .field("created_at", &self.created_at)
831            .field("updated_at", &self.updated_at)
832            .field("owner_name", &self.owner_name)
833            .field("description", &self.description)
834            .field("is_hidden", &self.is_hidden)
835            .finish()
836    }
837}
838impl Namespace {
839    /// Protobuf type URL for this message, for use with `Any::pack` and
840    /// `Any::unpack_if`.
841    ///
842    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
843    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Namespace";
844}
845impl ::buffa::DefaultInstance for Namespace {
846    fn default_instance() -> &'static Self {
847        static VALUE: ::buffa::__private::OnceBox<Namespace> = ::buffa::__private::OnceBox::new();
848        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
849    }
850}
851impl ::buffa::MessageName for Namespace {
852    const PACKAGE: &'static str = "headwaters.read.v1";
853    const NAME: &'static str = "Namespace";
854    const FULL_NAME: &'static str = "headwaters.read.v1.Namespace";
855    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Namespace";
856}
857impl ::buffa::Message for Namespace {
858    /// Returns the total encoded size in bytes.
859    ///
860    /// The result is a `u32`; the protobuf specification requires all
861    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
862    /// compliant message will never overflow this type.
863    #[allow(clippy::let_and_return)]
864    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
865        #[allow(unused_imports)]
866        use ::buffa::Enumeration as _;
867        let mut size = 0u32;
868        if !self.name.is_empty() {
869            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
870        }
871        if !self.created_at.is_empty() {
872            size += 1u32 + ::buffa::types::string_encoded_len(&self.created_at) as u32;
873        }
874        if !self.updated_at.is_empty() {
875            size += 1u32 + ::buffa::types::string_encoded_len(&self.updated_at) as u32;
876        }
877        if !self.owner_name.is_empty() {
878            size += 1u32 + ::buffa::types::string_encoded_len(&self.owner_name) as u32;
879        }
880        if !self.description.is_empty() {
881            size += 1u32 + ::buffa::types::string_encoded_len(&self.description) as u32;
882        }
883        if self.is_hidden {
884            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
885        }
886        size += self.__buffa_unknown_fields.encoded_len() as u32;
887        size
888    }
889    fn write_to(
890        &self,
891        _cache: &mut ::buffa::SizeCache,
892        buf: &mut impl ::buffa::bytes::BufMut,
893    ) {
894        #[allow(unused_imports)]
895        use ::buffa::Enumeration as _;
896        if !self.name.is_empty() {
897            ::buffa::encoding::Tag::new(
898                    1u32,
899                    ::buffa::encoding::WireType::LengthDelimited,
900                )
901                .encode(buf);
902            ::buffa::types::encode_string(&self.name, buf);
903        }
904        if !self.created_at.is_empty() {
905            ::buffa::encoding::Tag::new(
906                    2u32,
907                    ::buffa::encoding::WireType::LengthDelimited,
908                )
909                .encode(buf);
910            ::buffa::types::encode_string(&self.created_at, buf);
911        }
912        if !self.updated_at.is_empty() {
913            ::buffa::encoding::Tag::new(
914                    3u32,
915                    ::buffa::encoding::WireType::LengthDelimited,
916                )
917                .encode(buf);
918            ::buffa::types::encode_string(&self.updated_at, buf);
919        }
920        if !self.owner_name.is_empty() {
921            ::buffa::encoding::Tag::new(
922                    4u32,
923                    ::buffa::encoding::WireType::LengthDelimited,
924                )
925                .encode(buf);
926            ::buffa::types::encode_string(&self.owner_name, buf);
927        }
928        if !self.description.is_empty() {
929            ::buffa::encoding::Tag::new(
930                    5u32,
931                    ::buffa::encoding::WireType::LengthDelimited,
932                )
933                .encode(buf);
934            ::buffa::types::encode_string(&self.description, buf);
935        }
936        if self.is_hidden {
937            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
938                .encode(buf);
939            ::buffa::types::encode_bool(self.is_hidden, buf);
940        }
941        self.__buffa_unknown_fields.write_to(buf);
942    }
943    fn merge_field(
944        &mut self,
945        tag: ::buffa::encoding::Tag,
946        buf: &mut impl ::buffa::bytes::Buf,
947        depth: u32,
948    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
949        #[allow(unused_imports)]
950        use ::buffa::bytes::Buf as _;
951        #[allow(unused_imports)]
952        use ::buffa::Enumeration as _;
953        match tag.field_number() {
954            1u32 => {
955                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
956                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
957                        field_number: 1u32,
958                        expected: 2u8,
959                        actual: tag.wire_type() as u8,
960                    });
961                }
962                ::buffa::types::merge_string(&mut self.name, buf)?;
963            }
964            2u32 => {
965                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
966                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
967                        field_number: 2u32,
968                        expected: 2u8,
969                        actual: tag.wire_type() as u8,
970                    });
971                }
972                ::buffa::types::merge_string(&mut self.created_at, buf)?;
973            }
974            3u32 => {
975                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
976                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
977                        field_number: 3u32,
978                        expected: 2u8,
979                        actual: tag.wire_type() as u8,
980                    });
981                }
982                ::buffa::types::merge_string(&mut self.updated_at, buf)?;
983            }
984            4u32 => {
985                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
986                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
987                        field_number: 4u32,
988                        expected: 2u8,
989                        actual: tag.wire_type() as u8,
990                    });
991                }
992                ::buffa::types::merge_string(&mut self.owner_name, buf)?;
993            }
994            5u32 => {
995                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
996                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
997                        field_number: 5u32,
998                        expected: 2u8,
999                        actual: tag.wire_type() as u8,
1000                    });
1001                }
1002                ::buffa::types::merge_string(&mut self.description, buf)?;
1003            }
1004            6u32 => {
1005                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1006                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1007                        field_number: 6u32,
1008                        expected: 0u8,
1009                        actual: tag.wire_type() as u8,
1010                    });
1011                }
1012                self.is_hidden = ::buffa::types::decode_bool(buf)?;
1013            }
1014            _ => {
1015                self.__buffa_unknown_fields
1016                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1017            }
1018        }
1019        ::core::result::Result::Ok(())
1020    }
1021    fn clear(&mut self) {
1022        self.name.clear();
1023        self.created_at.clear();
1024        self.updated_at.clear();
1025        self.owner_name.clear();
1026        self.description.clear();
1027        self.is_hidden = false;
1028        self.__buffa_unknown_fields.clear();
1029    }
1030}
1031impl ::buffa::ExtensionSet for Namespace {
1032    const PROTO_FQN: &'static str = "headwaters.read.v1.Namespace";
1033    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1034        &self.__buffa_unknown_fields
1035    }
1036    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1037        &mut self.__buffa_unknown_fields
1038    }
1039}
1040impl ::buffa::json_helpers::ProtoElemJson for Namespace {
1041    fn serialize_proto_json<S: ::serde::Serializer>(
1042        v: &Self,
1043        s: S,
1044    ) -> ::core::result::Result<S::Ok, S::Error> {
1045        ::serde::Serialize::serialize(v, s)
1046    }
1047    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1048        d: D,
1049    ) -> ::core::result::Result<Self, D::Error> {
1050        <Self as ::serde::Deserialize>::deserialize(d)
1051    }
1052}
1053#[doc(hidden)]
1054pub const __NAMESPACE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1055    type_url: "type.googleapis.com/headwaters.read.v1.Namespace",
1056    to_json: ::buffa::type_registry::any_to_json::<Namespace>,
1057    from_json: ::buffa::type_registry::any_from_json::<Namespace>,
1058    is_wkt: false,
1059};
1060#[derive(Clone, PartialEq, Default)]
1061#[derive(::serde::Serialize, ::serde::Deserialize)]
1062#[serde(default)]
1063pub struct ListNamespacesResponse {
1064    /// Field 1: `namespaces`
1065    #[serde(
1066        rename = "namespaces",
1067        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1068        deserialize_with = "::buffa::json_helpers::null_as_default"
1069    )]
1070    pub namespaces: ::buffa::alloc::vec::Vec<Namespace>,
1071    #[serde(skip)]
1072    #[doc(hidden)]
1073    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1074}
1075impl ::core::fmt::Debug for ListNamespacesResponse {
1076    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1077        f.debug_struct("ListNamespacesResponse")
1078            .field("namespaces", &self.namespaces)
1079            .finish()
1080    }
1081}
1082impl ListNamespacesResponse {
1083    /// Protobuf type URL for this message, for use with `Any::pack` and
1084    /// `Any::unpack_if`.
1085    ///
1086    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1087    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListNamespacesResponse";
1088}
1089impl ::buffa::DefaultInstance for ListNamespacesResponse {
1090    fn default_instance() -> &'static Self {
1091        static VALUE: ::buffa::__private::OnceBox<ListNamespacesResponse> = ::buffa::__private::OnceBox::new();
1092        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1093    }
1094}
1095impl ::buffa::MessageName for ListNamespacesResponse {
1096    const PACKAGE: &'static str = "headwaters.read.v1";
1097    const NAME: &'static str = "ListNamespacesResponse";
1098    const FULL_NAME: &'static str = "headwaters.read.v1.ListNamespacesResponse";
1099    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListNamespacesResponse";
1100}
1101impl ::buffa::Message for ListNamespacesResponse {
1102    /// Returns the total encoded size in bytes.
1103    ///
1104    /// The result is a `u32`; the protobuf specification requires all
1105    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1106    /// compliant message will never overflow this type.
1107    #[allow(clippy::let_and_return)]
1108    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1109        #[allow(unused_imports)]
1110        use ::buffa::Enumeration as _;
1111        let mut size = 0u32;
1112        for v in &self.namespaces {
1113            let __slot = __cache.reserve();
1114            let inner_size = v.compute_size(__cache);
1115            __cache.set(__slot, inner_size);
1116            size
1117                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1118                    + inner_size;
1119        }
1120        size += self.__buffa_unknown_fields.encoded_len() as u32;
1121        size
1122    }
1123    fn write_to(
1124        &self,
1125        __cache: &mut ::buffa::SizeCache,
1126        buf: &mut impl ::buffa::bytes::BufMut,
1127    ) {
1128        #[allow(unused_imports)]
1129        use ::buffa::Enumeration as _;
1130        for v in &self.namespaces {
1131            ::buffa::encoding::Tag::new(
1132                    1u32,
1133                    ::buffa::encoding::WireType::LengthDelimited,
1134                )
1135                .encode(buf);
1136            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1137            v.write_to(__cache, buf);
1138        }
1139        self.__buffa_unknown_fields.write_to(buf);
1140    }
1141    fn merge_field(
1142        &mut self,
1143        tag: ::buffa::encoding::Tag,
1144        buf: &mut impl ::buffa::bytes::Buf,
1145        depth: u32,
1146    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1147        #[allow(unused_imports)]
1148        use ::buffa::bytes::Buf as _;
1149        #[allow(unused_imports)]
1150        use ::buffa::Enumeration as _;
1151        match tag.field_number() {
1152            1u32 => {
1153                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1154                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1155                        field_number: 1u32,
1156                        expected: 2u8,
1157                        actual: tag.wire_type() as u8,
1158                    });
1159                }
1160                let mut elem = ::core::default::Default::default();
1161                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1162                self.namespaces.push(elem);
1163            }
1164            _ => {
1165                self.__buffa_unknown_fields
1166                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1167            }
1168        }
1169        ::core::result::Result::Ok(())
1170    }
1171    fn clear(&mut self) {
1172        self.namespaces.clear();
1173        self.__buffa_unknown_fields.clear();
1174    }
1175}
1176impl ::buffa::ExtensionSet for ListNamespacesResponse {
1177    const PROTO_FQN: &'static str = "headwaters.read.v1.ListNamespacesResponse";
1178    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1179        &self.__buffa_unknown_fields
1180    }
1181    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1182        &mut self.__buffa_unknown_fields
1183    }
1184}
1185impl ::buffa::json_helpers::ProtoElemJson for ListNamespacesResponse {
1186    fn serialize_proto_json<S: ::serde::Serializer>(
1187        v: &Self,
1188        s: S,
1189    ) -> ::core::result::Result<S::Ok, S::Error> {
1190        ::serde::Serialize::serialize(v, s)
1191    }
1192    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1193        d: D,
1194    ) -> ::core::result::Result<Self, D::Error> {
1195        <Self as ::serde::Deserialize>::deserialize(d)
1196    }
1197}
1198#[doc(hidden)]
1199pub const __LIST_NAMESPACES_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1200    type_url: "type.googleapis.com/headwaters.read.v1.ListNamespacesResponse",
1201    to_json: ::buffa::type_registry::any_to_json::<ListNamespacesResponse>,
1202    from_json: ::buffa::type_registry::any_from_json::<ListNamespacesResponse>,
1203    is_wkt: false,
1204};
1205/// --- jobs ---
1206///
1207/// A job: a recurring process that reads input datasets and writes output
1208/// datasets.
1209#[derive(Clone, PartialEq, Default)]
1210#[derive(::serde::Serialize, ::serde::Deserialize)]
1211#[serde(default)]
1212pub struct JobDetail {
1213    /// Field 1: `id`
1214    #[serde(
1215        rename = "id",
1216        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1217    )]
1218    pub id: ::buffa::MessageField<EntityId>,
1219    /// Field 2: `type`
1220    #[serde(
1221        rename = "type",
1222        with = "::buffa::json_helpers::proto_enum",
1223        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1224    )]
1225    pub r#type: ::buffa::EnumValue<JobType>,
1226    /// Fully-qualified job name.
1227    ///
1228    /// Field 3: `name`
1229    #[serde(
1230        rename = "name",
1231        with = "::buffa::json_helpers::proto_string",
1232        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1233    )]
1234    pub name: ::buffa::alloc::string::String,
1235    /// Last path segment of `name` (e.g. `name` `etl.daily` → `daily`).
1236    ///
1237    /// Field 4: `simple_name`
1238    #[serde(
1239        rename = "simpleName",
1240        alias = "simple_name",
1241        with = "::buffa::json_helpers::proto_string",
1242        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1243    )]
1244    pub simple_name: ::buffa::alloc::string::String,
1245    /// Field 5: `namespace`
1246    #[serde(
1247        rename = "namespace",
1248        with = "::buffa::json_helpers::proto_string",
1249        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1250    )]
1251    pub namespace: ::buffa::alloc::string::String,
1252    /// Field 6: `created_at`
1253    #[serde(
1254        rename = "createdAt",
1255        alias = "created_at",
1256        with = "::buffa::json_helpers::proto_string",
1257        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1258    )]
1259    pub created_at: ::buffa::alloc::string::String,
1260    /// Field 7: `updated_at`
1261    #[serde(
1262        rename = "updatedAt",
1263        alias = "updated_at",
1264        with = "::buffa::json_helpers::proto_string",
1265        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1266    )]
1267    pub updated_at: ::buffa::alloc::string::String,
1268    /// Datasets this job reads / writes, as `{namespace, name}` references.
1269    ///
1270    /// Field 8: `inputs`
1271    #[serde(
1272        rename = "inputs",
1273        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1274        deserialize_with = "::buffa::json_helpers::null_as_default"
1275    )]
1276    pub inputs: ::buffa::alloc::vec::Vec<EntityId>,
1277    /// Field 9: `outputs`
1278    #[serde(
1279        rename = "outputs",
1280        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1281        deserialize_with = "::buffa::json_helpers::null_as_default"
1282    )]
1283    pub outputs: ::buffa::alloc::vec::Vec<EntityId>,
1284    /// Source location of the job's code (e.g. a repository URL), if reported.
1285    ///
1286    /// Field 10: `location`
1287    #[serde(
1288        rename = "location",
1289        with = "::buffa::json_helpers::proto_string",
1290        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1291    )]
1292    pub location: ::buffa::alloc::string::String,
1293    /// Field 11: `description`
1294    #[serde(
1295        rename = "description",
1296        with = "::buffa::json_helpers::proto_string",
1297        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1298    )]
1299    pub description: ::buffa::alloc::string::String,
1300    /// The most recent run; the same object as `latest_runs[0]` when present.
1301    ///
1302    /// Field 12: `latest_run`
1303    #[serde(
1304        rename = "latestRun",
1305        alias = "latest_run",
1306        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1307    )]
1308    pub latest_run: ::buffa::MessageField<RunDetail>,
1309    /// Field 13: `latest_runs`
1310    #[serde(
1311        rename = "latestRuns",
1312        alias = "latest_runs",
1313        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1314        deserialize_with = "::buffa::json_helpers::null_as_default"
1315    )]
1316    pub latest_runs: ::buffa::alloc::vec::Vec<RunDetail>,
1317    /// Field 14: `tags`
1318    #[serde(
1319        rename = "tags",
1320        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1321        deserialize_with = "::buffa::json_helpers::null_as_default"
1322    )]
1323    pub tags: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
1324    /// Field 15: `parent_job_name`
1325    #[serde(
1326        rename = "parentJobName",
1327        alias = "parent_job_name",
1328        with = "::buffa::json_helpers::proto_string",
1329        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1330    )]
1331    pub parent_job_name: ::buffa::alloc::string::String,
1332    /// Field 16: `parent_job_uuid`
1333    #[serde(
1334        rename = "parentJobUuid",
1335        alias = "parent_job_uuid",
1336        with = "::buffa::json_helpers::proto_string",
1337        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1338    )]
1339    pub parent_job_uuid: ::buffa::alloc::string::String,
1340    /// Opaque UUID that changes whenever the job's inputs, outputs, or metadata
1341    /// change. Use it to detect that a job's shape has moved.
1342    ///
1343    /// Field 17: `current_version`
1344    #[serde(
1345        rename = "currentVersion",
1346        alias = "current_version",
1347        with = "::buffa::json_helpers::proto_string",
1348        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1349    )]
1350    pub current_version: ::buffa::alloc::string::String,
1351    #[serde(skip)]
1352    #[doc(hidden)]
1353    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1354}
1355impl ::core::fmt::Debug for JobDetail {
1356    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1357        f.debug_struct("JobDetail")
1358            .field("id", &self.id)
1359            .field("r#type", &self.r#type)
1360            .field("name", &self.name)
1361            .field("simple_name", &self.simple_name)
1362            .field("namespace", &self.namespace)
1363            .field("created_at", &self.created_at)
1364            .field("updated_at", &self.updated_at)
1365            .field("inputs", &self.inputs)
1366            .field("outputs", &self.outputs)
1367            .field("location", &self.location)
1368            .field("description", &self.description)
1369            .field("latest_run", &self.latest_run)
1370            .field("latest_runs", &self.latest_runs)
1371            .field("tags", &self.tags)
1372            .field("parent_job_name", &self.parent_job_name)
1373            .field("parent_job_uuid", &self.parent_job_uuid)
1374            .field("current_version", &self.current_version)
1375            .finish()
1376    }
1377}
1378impl JobDetail {
1379    /// Protobuf type URL for this message, for use with `Any::pack` and
1380    /// `Any::unpack_if`.
1381    ///
1382    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1383    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.JobDetail";
1384}
1385impl ::buffa::DefaultInstance for JobDetail {
1386    fn default_instance() -> &'static Self {
1387        static VALUE: ::buffa::__private::OnceBox<JobDetail> = ::buffa::__private::OnceBox::new();
1388        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1389    }
1390}
1391impl ::buffa::MessageName for JobDetail {
1392    const PACKAGE: &'static str = "headwaters.read.v1";
1393    const NAME: &'static str = "JobDetail";
1394    const FULL_NAME: &'static str = "headwaters.read.v1.JobDetail";
1395    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.JobDetail";
1396}
1397impl ::buffa::Message for JobDetail {
1398    /// Returns the total encoded size in bytes.
1399    ///
1400    /// The result is a `u32`; the protobuf specification requires all
1401    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1402    /// compliant message will never overflow this type.
1403    #[allow(clippy::let_and_return)]
1404    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1405        #[allow(unused_imports)]
1406        use ::buffa::Enumeration as _;
1407        let mut size = 0u32;
1408        if self.id.is_set() {
1409            let __slot = __cache.reserve();
1410            let inner_size = self.id.compute_size(__cache);
1411            __cache.set(__slot, inner_size);
1412            size
1413                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1414                    + inner_size;
1415        }
1416        {
1417            let val = self.r#type.to_i32();
1418            if val != 0 {
1419                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1420            }
1421        }
1422        if !self.name.is_empty() {
1423            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1424        }
1425        if !self.simple_name.is_empty() {
1426            size += 1u32 + ::buffa::types::string_encoded_len(&self.simple_name) as u32;
1427        }
1428        if !self.namespace.is_empty() {
1429            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
1430        }
1431        if !self.created_at.is_empty() {
1432            size += 1u32 + ::buffa::types::string_encoded_len(&self.created_at) as u32;
1433        }
1434        if !self.updated_at.is_empty() {
1435            size += 1u32 + ::buffa::types::string_encoded_len(&self.updated_at) as u32;
1436        }
1437        for v in &self.inputs {
1438            let __slot = __cache.reserve();
1439            let inner_size = v.compute_size(__cache);
1440            __cache.set(__slot, inner_size);
1441            size
1442                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1443                    + inner_size;
1444        }
1445        for v in &self.outputs {
1446            let __slot = __cache.reserve();
1447            let inner_size = v.compute_size(__cache);
1448            __cache.set(__slot, inner_size);
1449            size
1450                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1451                    + inner_size;
1452        }
1453        if !self.location.is_empty() {
1454            size += 1u32 + ::buffa::types::string_encoded_len(&self.location) as u32;
1455        }
1456        if !self.description.is_empty() {
1457            size += 1u32 + ::buffa::types::string_encoded_len(&self.description) as u32;
1458        }
1459        if self.latest_run.is_set() {
1460            let __slot = __cache.reserve();
1461            let inner_size = self.latest_run.compute_size(__cache);
1462            __cache.set(__slot, inner_size);
1463            size
1464                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1465                    + inner_size;
1466        }
1467        for v in &self.latest_runs {
1468            let __slot = __cache.reserve();
1469            let inner_size = v.compute_size(__cache);
1470            __cache.set(__slot, inner_size);
1471            size
1472                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1473                    + inner_size;
1474        }
1475        for v in &self.tags {
1476            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1477        }
1478        if !self.parent_job_name.is_empty() {
1479            size
1480                += 1u32
1481                    + ::buffa::types::string_encoded_len(&self.parent_job_name) as u32;
1482        }
1483        if !self.parent_job_uuid.is_empty() {
1484            size
1485                += 2u32
1486                    + ::buffa::types::string_encoded_len(&self.parent_job_uuid) as u32;
1487        }
1488        if !self.current_version.is_empty() {
1489            size
1490                += 2u32
1491                    + ::buffa::types::string_encoded_len(&self.current_version) as u32;
1492        }
1493        size += self.__buffa_unknown_fields.encoded_len() as u32;
1494        size
1495    }
1496    fn write_to(
1497        &self,
1498        __cache: &mut ::buffa::SizeCache,
1499        buf: &mut impl ::buffa::bytes::BufMut,
1500    ) {
1501        #[allow(unused_imports)]
1502        use ::buffa::Enumeration as _;
1503        if self.id.is_set() {
1504            ::buffa::encoding::Tag::new(
1505                    1u32,
1506                    ::buffa::encoding::WireType::LengthDelimited,
1507                )
1508                .encode(buf);
1509            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1510            self.id.write_to(__cache, buf);
1511        }
1512        {
1513            let val = self.r#type.to_i32();
1514            if val != 0 {
1515                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1516                    .encode(buf);
1517                ::buffa::types::encode_int32(val, buf);
1518            }
1519        }
1520        if !self.name.is_empty() {
1521            ::buffa::encoding::Tag::new(
1522                    3u32,
1523                    ::buffa::encoding::WireType::LengthDelimited,
1524                )
1525                .encode(buf);
1526            ::buffa::types::encode_string(&self.name, buf);
1527        }
1528        if !self.simple_name.is_empty() {
1529            ::buffa::encoding::Tag::new(
1530                    4u32,
1531                    ::buffa::encoding::WireType::LengthDelimited,
1532                )
1533                .encode(buf);
1534            ::buffa::types::encode_string(&self.simple_name, buf);
1535        }
1536        if !self.namespace.is_empty() {
1537            ::buffa::encoding::Tag::new(
1538                    5u32,
1539                    ::buffa::encoding::WireType::LengthDelimited,
1540                )
1541                .encode(buf);
1542            ::buffa::types::encode_string(&self.namespace, buf);
1543        }
1544        if !self.created_at.is_empty() {
1545            ::buffa::encoding::Tag::new(
1546                    6u32,
1547                    ::buffa::encoding::WireType::LengthDelimited,
1548                )
1549                .encode(buf);
1550            ::buffa::types::encode_string(&self.created_at, buf);
1551        }
1552        if !self.updated_at.is_empty() {
1553            ::buffa::encoding::Tag::new(
1554                    7u32,
1555                    ::buffa::encoding::WireType::LengthDelimited,
1556                )
1557                .encode(buf);
1558            ::buffa::types::encode_string(&self.updated_at, buf);
1559        }
1560        for v in &self.inputs {
1561            ::buffa::encoding::Tag::new(
1562                    8u32,
1563                    ::buffa::encoding::WireType::LengthDelimited,
1564                )
1565                .encode(buf);
1566            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1567            v.write_to(__cache, buf);
1568        }
1569        for v in &self.outputs {
1570            ::buffa::encoding::Tag::new(
1571                    9u32,
1572                    ::buffa::encoding::WireType::LengthDelimited,
1573                )
1574                .encode(buf);
1575            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1576            v.write_to(__cache, buf);
1577        }
1578        if !self.location.is_empty() {
1579            ::buffa::encoding::Tag::new(
1580                    10u32,
1581                    ::buffa::encoding::WireType::LengthDelimited,
1582                )
1583                .encode(buf);
1584            ::buffa::types::encode_string(&self.location, buf);
1585        }
1586        if !self.description.is_empty() {
1587            ::buffa::encoding::Tag::new(
1588                    11u32,
1589                    ::buffa::encoding::WireType::LengthDelimited,
1590                )
1591                .encode(buf);
1592            ::buffa::types::encode_string(&self.description, buf);
1593        }
1594        if self.latest_run.is_set() {
1595            ::buffa::encoding::Tag::new(
1596                    12u32,
1597                    ::buffa::encoding::WireType::LengthDelimited,
1598                )
1599                .encode(buf);
1600            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1601            self.latest_run.write_to(__cache, buf);
1602        }
1603        for v in &self.latest_runs {
1604            ::buffa::encoding::Tag::new(
1605                    13u32,
1606                    ::buffa::encoding::WireType::LengthDelimited,
1607                )
1608                .encode(buf);
1609            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1610            v.write_to(__cache, buf);
1611        }
1612        for v in &self.tags {
1613            ::buffa::encoding::Tag::new(
1614                    14u32,
1615                    ::buffa::encoding::WireType::LengthDelimited,
1616                )
1617                .encode(buf);
1618            ::buffa::types::encode_string(v, buf);
1619        }
1620        if !self.parent_job_name.is_empty() {
1621            ::buffa::encoding::Tag::new(
1622                    15u32,
1623                    ::buffa::encoding::WireType::LengthDelimited,
1624                )
1625                .encode(buf);
1626            ::buffa::types::encode_string(&self.parent_job_name, buf);
1627        }
1628        if !self.parent_job_uuid.is_empty() {
1629            ::buffa::encoding::Tag::new(
1630                    16u32,
1631                    ::buffa::encoding::WireType::LengthDelimited,
1632                )
1633                .encode(buf);
1634            ::buffa::types::encode_string(&self.parent_job_uuid, buf);
1635        }
1636        if !self.current_version.is_empty() {
1637            ::buffa::encoding::Tag::new(
1638                    17u32,
1639                    ::buffa::encoding::WireType::LengthDelimited,
1640                )
1641                .encode(buf);
1642            ::buffa::types::encode_string(&self.current_version, buf);
1643        }
1644        self.__buffa_unknown_fields.write_to(buf);
1645    }
1646    fn merge_field(
1647        &mut self,
1648        tag: ::buffa::encoding::Tag,
1649        buf: &mut impl ::buffa::bytes::Buf,
1650        depth: u32,
1651    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1652        #[allow(unused_imports)]
1653        use ::buffa::bytes::Buf as _;
1654        #[allow(unused_imports)]
1655        use ::buffa::Enumeration as _;
1656        match tag.field_number() {
1657            1u32 => {
1658                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1659                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1660                        field_number: 1u32,
1661                        expected: 2u8,
1662                        actual: tag.wire_type() as u8,
1663                    });
1664                }
1665                ::buffa::Message::merge_length_delimited(
1666                    self.id.get_or_insert_default(),
1667                    buf,
1668                    depth,
1669                )?;
1670            }
1671            2u32 => {
1672                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1673                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1674                        field_number: 2u32,
1675                        expected: 0u8,
1676                        actual: tag.wire_type() as u8,
1677                    });
1678                }
1679                self.r#type = ::buffa::EnumValue::from(
1680                    ::buffa::types::decode_int32(buf)?,
1681                );
1682            }
1683            3u32 => {
1684                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1685                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1686                        field_number: 3u32,
1687                        expected: 2u8,
1688                        actual: tag.wire_type() as u8,
1689                    });
1690                }
1691                ::buffa::types::merge_string(&mut self.name, buf)?;
1692            }
1693            4u32 => {
1694                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1695                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1696                        field_number: 4u32,
1697                        expected: 2u8,
1698                        actual: tag.wire_type() as u8,
1699                    });
1700                }
1701                ::buffa::types::merge_string(&mut self.simple_name, buf)?;
1702            }
1703            5u32 => {
1704                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1705                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1706                        field_number: 5u32,
1707                        expected: 2u8,
1708                        actual: tag.wire_type() as u8,
1709                    });
1710                }
1711                ::buffa::types::merge_string(&mut self.namespace, buf)?;
1712            }
1713            6u32 => {
1714                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1715                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1716                        field_number: 6u32,
1717                        expected: 2u8,
1718                        actual: tag.wire_type() as u8,
1719                    });
1720                }
1721                ::buffa::types::merge_string(&mut self.created_at, buf)?;
1722            }
1723            7u32 => {
1724                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1725                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1726                        field_number: 7u32,
1727                        expected: 2u8,
1728                        actual: tag.wire_type() as u8,
1729                    });
1730                }
1731                ::buffa::types::merge_string(&mut self.updated_at, buf)?;
1732            }
1733            8u32 => {
1734                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1735                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1736                        field_number: 8u32,
1737                        expected: 2u8,
1738                        actual: tag.wire_type() as u8,
1739                    });
1740                }
1741                let mut elem = ::core::default::Default::default();
1742                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1743                self.inputs.push(elem);
1744            }
1745            9u32 => {
1746                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1747                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1748                        field_number: 9u32,
1749                        expected: 2u8,
1750                        actual: tag.wire_type() as u8,
1751                    });
1752                }
1753                let mut elem = ::core::default::Default::default();
1754                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1755                self.outputs.push(elem);
1756            }
1757            10u32 => {
1758                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1759                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1760                        field_number: 10u32,
1761                        expected: 2u8,
1762                        actual: tag.wire_type() as u8,
1763                    });
1764                }
1765                ::buffa::types::merge_string(&mut self.location, buf)?;
1766            }
1767            11u32 => {
1768                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1769                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1770                        field_number: 11u32,
1771                        expected: 2u8,
1772                        actual: tag.wire_type() as u8,
1773                    });
1774                }
1775                ::buffa::types::merge_string(&mut self.description, buf)?;
1776            }
1777            12u32 => {
1778                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1779                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1780                        field_number: 12u32,
1781                        expected: 2u8,
1782                        actual: tag.wire_type() as u8,
1783                    });
1784                }
1785                ::buffa::Message::merge_length_delimited(
1786                    self.latest_run.get_or_insert_default(),
1787                    buf,
1788                    depth,
1789                )?;
1790            }
1791            13u32 => {
1792                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1793                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1794                        field_number: 13u32,
1795                        expected: 2u8,
1796                        actual: tag.wire_type() as u8,
1797                    });
1798                }
1799                let mut elem = ::core::default::Default::default();
1800                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1801                self.latest_runs.push(elem);
1802            }
1803            14u32 => {
1804                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1805                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1806                        field_number: 14u32,
1807                        expected: 2u8,
1808                        actual: tag.wire_type() as u8,
1809                    });
1810                }
1811                self.tags.push(::buffa::types::decode_string(buf)?);
1812            }
1813            15u32 => {
1814                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1815                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1816                        field_number: 15u32,
1817                        expected: 2u8,
1818                        actual: tag.wire_type() as u8,
1819                    });
1820                }
1821                ::buffa::types::merge_string(&mut self.parent_job_name, buf)?;
1822            }
1823            16u32 => {
1824                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1825                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1826                        field_number: 16u32,
1827                        expected: 2u8,
1828                        actual: tag.wire_type() as u8,
1829                    });
1830                }
1831                ::buffa::types::merge_string(&mut self.parent_job_uuid, buf)?;
1832            }
1833            17u32 => {
1834                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1835                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1836                        field_number: 17u32,
1837                        expected: 2u8,
1838                        actual: tag.wire_type() as u8,
1839                    });
1840                }
1841                ::buffa::types::merge_string(&mut self.current_version, buf)?;
1842            }
1843            _ => {
1844                self.__buffa_unknown_fields
1845                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1846            }
1847        }
1848        ::core::result::Result::Ok(())
1849    }
1850    fn clear(&mut self) {
1851        self.id = ::buffa::MessageField::none();
1852        self.r#type = ::buffa::EnumValue::from(0);
1853        self.name.clear();
1854        self.simple_name.clear();
1855        self.namespace.clear();
1856        self.created_at.clear();
1857        self.updated_at.clear();
1858        self.inputs.clear();
1859        self.outputs.clear();
1860        self.location.clear();
1861        self.description.clear();
1862        self.latest_run = ::buffa::MessageField::none();
1863        self.latest_runs.clear();
1864        self.tags.clear();
1865        self.parent_job_name.clear();
1866        self.parent_job_uuid.clear();
1867        self.current_version.clear();
1868        self.__buffa_unknown_fields.clear();
1869    }
1870}
1871impl ::buffa::ExtensionSet for JobDetail {
1872    const PROTO_FQN: &'static str = "headwaters.read.v1.JobDetail";
1873    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1874        &self.__buffa_unknown_fields
1875    }
1876    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1877        &mut self.__buffa_unknown_fields
1878    }
1879}
1880impl ::buffa::json_helpers::ProtoElemJson for JobDetail {
1881    fn serialize_proto_json<S: ::serde::Serializer>(
1882        v: &Self,
1883        s: S,
1884    ) -> ::core::result::Result<S::Ok, S::Error> {
1885        ::serde::Serialize::serialize(v, s)
1886    }
1887    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1888        d: D,
1889    ) -> ::core::result::Result<Self, D::Error> {
1890        <Self as ::serde::Deserialize>::deserialize(d)
1891    }
1892}
1893#[doc(hidden)]
1894pub const __JOB_DETAIL_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1895    type_url: "type.googleapis.com/headwaters.read.v1.JobDetail",
1896    to_json: ::buffa::type_registry::any_to_json::<JobDetail>,
1897    from_json: ::buffa::type_registry::any_from_json::<JobDetail>,
1898    is_wkt: false,
1899};
1900/// A single execution of a job.
1901#[derive(Clone, PartialEq, Default)]
1902#[derive(::serde::Serialize, ::serde::Deserialize)]
1903#[serde(default)]
1904pub struct RunDetail {
1905    /// Run identifier (a UUID, from the OpenLineage `run.runId`).
1906    ///
1907    /// Field 1: `id`
1908    #[serde(
1909        rename = "id",
1910        with = "::buffa::json_helpers::proto_string",
1911        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1912    )]
1913    pub id: ::buffa::alloc::string::String,
1914    /// Field 2: `created_at`
1915    #[serde(
1916        rename = "createdAt",
1917        alias = "created_at",
1918        with = "::buffa::json_helpers::proto_string",
1919        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1920    )]
1921    pub created_at: ::buffa::alloc::string::String,
1922    /// Field 3: `updated_at`
1923    #[serde(
1924        rename = "updatedAt",
1925        alias = "updated_at",
1926        with = "::buffa::json_helpers::proto_string",
1927        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1928    )]
1929    pub updated_at: ::buffa::alloc::string::String,
1930    /// Field 4: `state`
1931    #[serde(
1932        rename = "state",
1933        with = "::buffa::json_helpers::proto_enum",
1934        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1935    )]
1936    pub state: ::buffa::EnumValue<RunState>,
1937    /// Scheduled (not actual) start / end of the run's nominal time window.
1938    ///
1939    /// Field 5: `nominal_start_time`
1940    #[serde(
1941        rename = "nominalStartTime",
1942        alias = "nominal_start_time",
1943        with = "::buffa::json_helpers::proto_string",
1944        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1945    )]
1946    pub nominal_start_time: ::buffa::alloc::string::String,
1947    /// Field 6: `nominal_end_time`
1948    #[serde(
1949        rename = "nominalEndTime",
1950        alias = "nominal_end_time",
1951        with = "::buffa::json_helpers::proto_string",
1952        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1953    )]
1954    pub nominal_end_time: ::buffa::alloc::string::String,
1955    /// Actual wall-clock start / end, when observed.
1956    ///
1957    /// Field 7: `started_at`
1958    #[serde(
1959        rename = "startedAt",
1960        alias = "started_at",
1961        with = "::buffa::json_helpers::proto_string",
1962        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1963    )]
1964    pub started_at: ::buffa::alloc::string::String,
1965    /// Field 8: `ended_at`
1966    #[serde(
1967        rename = "endedAt",
1968        alias = "ended_at",
1969        with = "::buffa::json_helpers::proto_string",
1970        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1971    )]
1972    pub ended_at: ::buffa::alloc::string::String,
1973    /// Observed run duration in milliseconds; 0 when start or end is unknown.
1974    ///
1975    /// Field 9: `duration_ms`
1976    #[serde(
1977        rename = "durationMs",
1978        alias = "duration_ms",
1979        with = "::buffa::json_helpers::uint64",
1980        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
1981    )]
1982    pub duration_ms: u64,
1983    #[serde(skip)]
1984    #[doc(hidden)]
1985    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1986}
1987impl ::core::fmt::Debug for RunDetail {
1988    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1989        f.debug_struct("RunDetail")
1990            .field("id", &self.id)
1991            .field("created_at", &self.created_at)
1992            .field("updated_at", &self.updated_at)
1993            .field("state", &self.state)
1994            .field("nominal_start_time", &self.nominal_start_time)
1995            .field("nominal_end_time", &self.nominal_end_time)
1996            .field("started_at", &self.started_at)
1997            .field("ended_at", &self.ended_at)
1998            .field("duration_ms", &self.duration_ms)
1999            .finish()
2000    }
2001}
2002impl RunDetail {
2003    /// Protobuf type URL for this message, for use with `Any::pack` and
2004    /// `Any::unpack_if`.
2005    ///
2006    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2007    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.RunDetail";
2008}
2009impl ::buffa::DefaultInstance for RunDetail {
2010    fn default_instance() -> &'static Self {
2011        static VALUE: ::buffa::__private::OnceBox<RunDetail> = ::buffa::__private::OnceBox::new();
2012        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2013    }
2014}
2015impl ::buffa::MessageName for RunDetail {
2016    const PACKAGE: &'static str = "headwaters.read.v1";
2017    const NAME: &'static str = "RunDetail";
2018    const FULL_NAME: &'static str = "headwaters.read.v1.RunDetail";
2019    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.RunDetail";
2020}
2021impl ::buffa::Message for RunDetail {
2022    /// Returns the total encoded size in bytes.
2023    ///
2024    /// The result is a `u32`; the protobuf specification requires all
2025    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2026    /// compliant message will never overflow this type.
2027    #[allow(clippy::let_and_return)]
2028    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2029        #[allow(unused_imports)]
2030        use ::buffa::Enumeration as _;
2031        let mut size = 0u32;
2032        if !self.id.is_empty() {
2033            size += 1u32 + ::buffa::types::string_encoded_len(&self.id) as u32;
2034        }
2035        if !self.created_at.is_empty() {
2036            size += 1u32 + ::buffa::types::string_encoded_len(&self.created_at) as u32;
2037        }
2038        if !self.updated_at.is_empty() {
2039            size += 1u32 + ::buffa::types::string_encoded_len(&self.updated_at) as u32;
2040        }
2041        {
2042            let val = self.state.to_i32();
2043            if val != 0 {
2044                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2045            }
2046        }
2047        if !self.nominal_start_time.is_empty() {
2048            size
2049                += 1u32
2050                    + ::buffa::types::string_encoded_len(&self.nominal_start_time)
2051                        as u32;
2052        }
2053        if !self.nominal_end_time.is_empty() {
2054            size
2055                += 1u32
2056                    + ::buffa::types::string_encoded_len(&self.nominal_end_time) as u32;
2057        }
2058        if !self.started_at.is_empty() {
2059            size += 1u32 + ::buffa::types::string_encoded_len(&self.started_at) as u32;
2060        }
2061        if !self.ended_at.is_empty() {
2062            size += 1u32 + ::buffa::types::string_encoded_len(&self.ended_at) as u32;
2063        }
2064        if self.duration_ms != 0u64 {
2065            size += 1u32 + ::buffa::types::uint64_encoded_len(self.duration_ms) as u32;
2066        }
2067        size += self.__buffa_unknown_fields.encoded_len() as u32;
2068        size
2069    }
2070    fn write_to(
2071        &self,
2072        _cache: &mut ::buffa::SizeCache,
2073        buf: &mut impl ::buffa::bytes::BufMut,
2074    ) {
2075        #[allow(unused_imports)]
2076        use ::buffa::Enumeration as _;
2077        if !self.id.is_empty() {
2078            ::buffa::encoding::Tag::new(
2079                    1u32,
2080                    ::buffa::encoding::WireType::LengthDelimited,
2081                )
2082                .encode(buf);
2083            ::buffa::types::encode_string(&self.id, buf);
2084        }
2085        if !self.created_at.is_empty() {
2086            ::buffa::encoding::Tag::new(
2087                    2u32,
2088                    ::buffa::encoding::WireType::LengthDelimited,
2089                )
2090                .encode(buf);
2091            ::buffa::types::encode_string(&self.created_at, buf);
2092        }
2093        if !self.updated_at.is_empty() {
2094            ::buffa::encoding::Tag::new(
2095                    3u32,
2096                    ::buffa::encoding::WireType::LengthDelimited,
2097                )
2098                .encode(buf);
2099            ::buffa::types::encode_string(&self.updated_at, buf);
2100        }
2101        {
2102            let val = self.state.to_i32();
2103            if val != 0 {
2104                ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
2105                    .encode(buf);
2106                ::buffa::types::encode_int32(val, buf);
2107            }
2108        }
2109        if !self.nominal_start_time.is_empty() {
2110            ::buffa::encoding::Tag::new(
2111                    5u32,
2112                    ::buffa::encoding::WireType::LengthDelimited,
2113                )
2114                .encode(buf);
2115            ::buffa::types::encode_string(&self.nominal_start_time, buf);
2116        }
2117        if !self.nominal_end_time.is_empty() {
2118            ::buffa::encoding::Tag::new(
2119                    6u32,
2120                    ::buffa::encoding::WireType::LengthDelimited,
2121                )
2122                .encode(buf);
2123            ::buffa::types::encode_string(&self.nominal_end_time, buf);
2124        }
2125        if !self.started_at.is_empty() {
2126            ::buffa::encoding::Tag::new(
2127                    7u32,
2128                    ::buffa::encoding::WireType::LengthDelimited,
2129                )
2130                .encode(buf);
2131            ::buffa::types::encode_string(&self.started_at, buf);
2132        }
2133        if !self.ended_at.is_empty() {
2134            ::buffa::encoding::Tag::new(
2135                    8u32,
2136                    ::buffa::encoding::WireType::LengthDelimited,
2137                )
2138                .encode(buf);
2139            ::buffa::types::encode_string(&self.ended_at, buf);
2140        }
2141        if self.duration_ms != 0u64 {
2142            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
2143                .encode(buf);
2144            ::buffa::types::encode_uint64(self.duration_ms, buf);
2145        }
2146        self.__buffa_unknown_fields.write_to(buf);
2147    }
2148    fn merge_field(
2149        &mut self,
2150        tag: ::buffa::encoding::Tag,
2151        buf: &mut impl ::buffa::bytes::Buf,
2152        depth: u32,
2153    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2154        #[allow(unused_imports)]
2155        use ::buffa::bytes::Buf as _;
2156        #[allow(unused_imports)]
2157        use ::buffa::Enumeration as _;
2158        match tag.field_number() {
2159            1u32 => {
2160                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2161                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2162                        field_number: 1u32,
2163                        expected: 2u8,
2164                        actual: tag.wire_type() as u8,
2165                    });
2166                }
2167                ::buffa::types::merge_string(&mut self.id, buf)?;
2168            }
2169            2u32 => {
2170                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2171                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2172                        field_number: 2u32,
2173                        expected: 2u8,
2174                        actual: tag.wire_type() as u8,
2175                    });
2176                }
2177                ::buffa::types::merge_string(&mut self.created_at, buf)?;
2178            }
2179            3u32 => {
2180                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2181                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2182                        field_number: 3u32,
2183                        expected: 2u8,
2184                        actual: tag.wire_type() as u8,
2185                    });
2186                }
2187                ::buffa::types::merge_string(&mut self.updated_at, buf)?;
2188            }
2189            4u32 => {
2190                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2191                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2192                        field_number: 4u32,
2193                        expected: 0u8,
2194                        actual: tag.wire_type() as u8,
2195                    });
2196                }
2197                self.state = ::buffa::EnumValue::from(
2198                    ::buffa::types::decode_int32(buf)?,
2199                );
2200            }
2201            5u32 => {
2202                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2203                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2204                        field_number: 5u32,
2205                        expected: 2u8,
2206                        actual: tag.wire_type() as u8,
2207                    });
2208                }
2209                ::buffa::types::merge_string(&mut self.nominal_start_time, buf)?;
2210            }
2211            6u32 => {
2212                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2213                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2214                        field_number: 6u32,
2215                        expected: 2u8,
2216                        actual: tag.wire_type() as u8,
2217                    });
2218                }
2219                ::buffa::types::merge_string(&mut self.nominal_end_time, buf)?;
2220            }
2221            7u32 => {
2222                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2223                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2224                        field_number: 7u32,
2225                        expected: 2u8,
2226                        actual: tag.wire_type() as u8,
2227                    });
2228                }
2229                ::buffa::types::merge_string(&mut self.started_at, buf)?;
2230            }
2231            8u32 => {
2232                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2233                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2234                        field_number: 8u32,
2235                        expected: 2u8,
2236                        actual: tag.wire_type() as u8,
2237                    });
2238                }
2239                ::buffa::types::merge_string(&mut self.ended_at, buf)?;
2240            }
2241            9u32 => {
2242                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2243                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2244                        field_number: 9u32,
2245                        expected: 0u8,
2246                        actual: tag.wire_type() as u8,
2247                    });
2248                }
2249                self.duration_ms = ::buffa::types::decode_uint64(buf)?;
2250            }
2251            _ => {
2252                self.__buffa_unknown_fields
2253                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2254            }
2255        }
2256        ::core::result::Result::Ok(())
2257    }
2258    fn clear(&mut self) {
2259        self.id.clear();
2260        self.created_at.clear();
2261        self.updated_at.clear();
2262        self.state = ::buffa::EnumValue::from(0);
2263        self.nominal_start_time.clear();
2264        self.nominal_end_time.clear();
2265        self.started_at.clear();
2266        self.ended_at.clear();
2267        self.duration_ms = 0u64;
2268        self.__buffa_unknown_fields.clear();
2269    }
2270}
2271impl ::buffa::ExtensionSet for RunDetail {
2272    const PROTO_FQN: &'static str = "headwaters.read.v1.RunDetail";
2273    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2274        &self.__buffa_unknown_fields
2275    }
2276    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2277        &mut self.__buffa_unknown_fields
2278    }
2279}
2280impl ::buffa::json_helpers::ProtoElemJson for RunDetail {
2281    fn serialize_proto_json<S: ::serde::Serializer>(
2282        v: &Self,
2283        s: S,
2284    ) -> ::core::result::Result<S::Ok, S::Error> {
2285        ::serde::Serialize::serialize(v, s)
2286    }
2287    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2288        d: D,
2289    ) -> ::core::result::Result<Self, D::Error> {
2290        <Self as ::serde::Deserialize>::deserialize(d)
2291    }
2292}
2293#[doc(hidden)]
2294pub const __RUN_DETAIL_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2295    type_url: "type.googleapis.com/headwaters.read.v1.RunDetail",
2296    to_json: ::buffa::type_registry::any_to_json::<RunDetail>,
2297    from_json: ::buffa::type_registry::any_from_json::<RunDetail>,
2298    is_wkt: false,
2299};
2300#[derive(Clone, PartialEq, Default)]
2301#[derive(::serde::Serialize, ::serde::Deserialize)]
2302#[serde(default)]
2303pub struct ListJobsResponse {
2304    /// Field 1: `jobs`
2305    #[serde(
2306        rename = "jobs",
2307        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2308        deserialize_with = "::buffa::json_helpers::null_as_default"
2309    )]
2310    pub jobs: ::buffa::alloc::vec::Vec<JobDetail>,
2311    /// Total jobs matching the request, ignoring `limit` / `offset`. Page through
2312    /// by advancing `offset` until it reaches `total_count`.
2313    ///
2314    /// Field 2: `total_count`
2315    #[serde(
2316        rename = "totalCount",
2317        alias = "total_count",
2318        with = "::buffa::json_helpers::int32",
2319        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
2320    )]
2321    pub total_count: i32,
2322    #[serde(skip)]
2323    #[doc(hidden)]
2324    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2325}
2326impl ::core::fmt::Debug for ListJobsResponse {
2327    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2328        f.debug_struct("ListJobsResponse")
2329            .field("jobs", &self.jobs)
2330            .field("total_count", &self.total_count)
2331            .finish()
2332    }
2333}
2334impl ListJobsResponse {
2335    /// Protobuf type URL for this message, for use with `Any::pack` and
2336    /// `Any::unpack_if`.
2337    ///
2338    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2339    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListJobsResponse";
2340}
2341impl ::buffa::DefaultInstance for ListJobsResponse {
2342    fn default_instance() -> &'static Self {
2343        static VALUE: ::buffa::__private::OnceBox<ListJobsResponse> = ::buffa::__private::OnceBox::new();
2344        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2345    }
2346}
2347impl ::buffa::MessageName for ListJobsResponse {
2348    const PACKAGE: &'static str = "headwaters.read.v1";
2349    const NAME: &'static str = "ListJobsResponse";
2350    const FULL_NAME: &'static str = "headwaters.read.v1.ListJobsResponse";
2351    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListJobsResponse";
2352}
2353impl ::buffa::Message for ListJobsResponse {
2354    /// Returns the total encoded size in bytes.
2355    ///
2356    /// The result is a `u32`; the protobuf specification requires all
2357    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2358    /// compliant message will never overflow this type.
2359    #[allow(clippy::let_and_return)]
2360    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2361        #[allow(unused_imports)]
2362        use ::buffa::Enumeration as _;
2363        let mut size = 0u32;
2364        for v in &self.jobs {
2365            let __slot = __cache.reserve();
2366            let inner_size = v.compute_size(__cache);
2367            __cache.set(__slot, inner_size);
2368            size
2369                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2370                    + inner_size;
2371        }
2372        if self.total_count != 0i32 {
2373            size += 1u32 + ::buffa::types::int32_encoded_len(self.total_count) as u32;
2374        }
2375        size += self.__buffa_unknown_fields.encoded_len() as u32;
2376        size
2377    }
2378    fn write_to(
2379        &self,
2380        __cache: &mut ::buffa::SizeCache,
2381        buf: &mut impl ::buffa::bytes::BufMut,
2382    ) {
2383        #[allow(unused_imports)]
2384        use ::buffa::Enumeration as _;
2385        for v in &self.jobs {
2386            ::buffa::encoding::Tag::new(
2387                    1u32,
2388                    ::buffa::encoding::WireType::LengthDelimited,
2389                )
2390                .encode(buf);
2391            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2392            v.write_to(__cache, buf);
2393        }
2394        if self.total_count != 0i32 {
2395            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
2396                .encode(buf);
2397            ::buffa::types::encode_int32(self.total_count, buf);
2398        }
2399        self.__buffa_unknown_fields.write_to(buf);
2400    }
2401    fn merge_field(
2402        &mut self,
2403        tag: ::buffa::encoding::Tag,
2404        buf: &mut impl ::buffa::bytes::Buf,
2405        depth: u32,
2406    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2407        #[allow(unused_imports)]
2408        use ::buffa::bytes::Buf as _;
2409        #[allow(unused_imports)]
2410        use ::buffa::Enumeration as _;
2411        match tag.field_number() {
2412            1u32 => {
2413                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2414                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2415                        field_number: 1u32,
2416                        expected: 2u8,
2417                        actual: tag.wire_type() as u8,
2418                    });
2419                }
2420                let mut elem = ::core::default::Default::default();
2421                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
2422                self.jobs.push(elem);
2423            }
2424            2u32 => {
2425                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2426                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2427                        field_number: 2u32,
2428                        expected: 0u8,
2429                        actual: tag.wire_type() as u8,
2430                    });
2431                }
2432                self.total_count = ::buffa::types::decode_int32(buf)?;
2433            }
2434            _ => {
2435                self.__buffa_unknown_fields
2436                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2437            }
2438        }
2439        ::core::result::Result::Ok(())
2440    }
2441    fn clear(&mut self) {
2442        self.jobs.clear();
2443        self.total_count = 0i32;
2444        self.__buffa_unknown_fields.clear();
2445    }
2446}
2447impl ::buffa::ExtensionSet for ListJobsResponse {
2448    const PROTO_FQN: &'static str = "headwaters.read.v1.ListJobsResponse";
2449    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2450        &self.__buffa_unknown_fields
2451    }
2452    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2453        &mut self.__buffa_unknown_fields
2454    }
2455}
2456impl ::buffa::json_helpers::ProtoElemJson for ListJobsResponse {
2457    fn serialize_proto_json<S: ::serde::Serializer>(
2458        v: &Self,
2459        s: S,
2460    ) -> ::core::result::Result<S::Ok, S::Error> {
2461        ::serde::Serialize::serialize(v, s)
2462    }
2463    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2464        d: D,
2465    ) -> ::core::result::Result<Self, D::Error> {
2466        <Self as ::serde::Deserialize>::deserialize(d)
2467    }
2468}
2469#[doc(hidden)]
2470pub const __LIST_JOBS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2471    type_url: "type.googleapis.com/headwaters.read.v1.ListJobsResponse",
2472    to_json: ::buffa::type_registry::any_to_json::<ListJobsResponse>,
2473    from_json: ::buffa::type_registry::any_from_json::<ListJobsResponse>,
2474    is_wkt: false,
2475};
2476#[derive(Clone, PartialEq, Default)]
2477#[derive(::serde::Serialize, ::serde::Deserialize)]
2478#[serde(default)]
2479pub struct ListRunsResponse {
2480    /// Field 1: `runs`
2481    #[serde(
2482        rename = "runs",
2483        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2484        deserialize_with = "::buffa::json_helpers::null_as_default"
2485    )]
2486    pub runs: ::buffa::alloc::vec::Vec<RunDetail>,
2487    /// Field 2: `total_count`
2488    #[serde(
2489        rename = "totalCount",
2490        alias = "total_count",
2491        with = "::buffa::json_helpers::int32",
2492        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
2493    )]
2494    pub total_count: i32,
2495    #[serde(skip)]
2496    #[doc(hidden)]
2497    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2498}
2499impl ::core::fmt::Debug for ListRunsResponse {
2500    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2501        f.debug_struct("ListRunsResponse")
2502            .field("runs", &self.runs)
2503            .field("total_count", &self.total_count)
2504            .finish()
2505    }
2506}
2507impl ListRunsResponse {
2508    /// Protobuf type URL for this message, for use with `Any::pack` and
2509    /// `Any::unpack_if`.
2510    ///
2511    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2512    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListRunsResponse";
2513}
2514impl ::buffa::DefaultInstance for ListRunsResponse {
2515    fn default_instance() -> &'static Self {
2516        static VALUE: ::buffa::__private::OnceBox<ListRunsResponse> = ::buffa::__private::OnceBox::new();
2517        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2518    }
2519}
2520impl ::buffa::MessageName for ListRunsResponse {
2521    const PACKAGE: &'static str = "headwaters.read.v1";
2522    const NAME: &'static str = "ListRunsResponse";
2523    const FULL_NAME: &'static str = "headwaters.read.v1.ListRunsResponse";
2524    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListRunsResponse";
2525}
2526impl ::buffa::Message for ListRunsResponse {
2527    /// Returns the total encoded size in bytes.
2528    ///
2529    /// The result is a `u32`; the protobuf specification requires all
2530    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2531    /// compliant message will never overflow this type.
2532    #[allow(clippy::let_and_return)]
2533    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2534        #[allow(unused_imports)]
2535        use ::buffa::Enumeration as _;
2536        let mut size = 0u32;
2537        for v in &self.runs {
2538            let __slot = __cache.reserve();
2539            let inner_size = v.compute_size(__cache);
2540            __cache.set(__slot, inner_size);
2541            size
2542                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2543                    + inner_size;
2544        }
2545        if self.total_count != 0i32 {
2546            size += 1u32 + ::buffa::types::int32_encoded_len(self.total_count) as u32;
2547        }
2548        size += self.__buffa_unknown_fields.encoded_len() as u32;
2549        size
2550    }
2551    fn write_to(
2552        &self,
2553        __cache: &mut ::buffa::SizeCache,
2554        buf: &mut impl ::buffa::bytes::BufMut,
2555    ) {
2556        #[allow(unused_imports)]
2557        use ::buffa::Enumeration as _;
2558        for v in &self.runs {
2559            ::buffa::encoding::Tag::new(
2560                    1u32,
2561                    ::buffa::encoding::WireType::LengthDelimited,
2562                )
2563                .encode(buf);
2564            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2565            v.write_to(__cache, buf);
2566        }
2567        if self.total_count != 0i32 {
2568            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
2569                .encode(buf);
2570            ::buffa::types::encode_int32(self.total_count, buf);
2571        }
2572        self.__buffa_unknown_fields.write_to(buf);
2573    }
2574    fn merge_field(
2575        &mut self,
2576        tag: ::buffa::encoding::Tag,
2577        buf: &mut impl ::buffa::bytes::Buf,
2578        depth: u32,
2579    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2580        #[allow(unused_imports)]
2581        use ::buffa::bytes::Buf as _;
2582        #[allow(unused_imports)]
2583        use ::buffa::Enumeration as _;
2584        match tag.field_number() {
2585            1u32 => {
2586                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2587                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2588                        field_number: 1u32,
2589                        expected: 2u8,
2590                        actual: tag.wire_type() as u8,
2591                    });
2592                }
2593                let mut elem = ::core::default::Default::default();
2594                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
2595                self.runs.push(elem);
2596            }
2597            2u32 => {
2598                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2599                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2600                        field_number: 2u32,
2601                        expected: 0u8,
2602                        actual: tag.wire_type() as u8,
2603                    });
2604                }
2605                self.total_count = ::buffa::types::decode_int32(buf)?;
2606            }
2607            _ => {
2608                self.__buffa_unknown_fields
2609                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2610            }
2611        }
2612        ::core::result::Result::Ok(())
2613    }
2614    fn clear(&mut self) {
2615        self.runs.clear();
2616        self.total_count = 0i32;
2617        self.__buffa_unknown_fields.clear();
2618    }
2619}
2620impl ::buffa::ExtensionSet for ListRunsResponse {
2621    const PROTO_FQN: &'static str = "headwaters.read.v1.ListRunsResponse";
2622    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2623        &self.__buffa_unknown_fields
2624    }
2625    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2626        &mut self.__buffa_unknown_fields
2627    }
2628}
2629impl ::buffa::json_helpers::ProtoElemJson for ListRunsResponse {
2630    fn serialize_proto_json<S: ::serde::Serializer>(
2631        v: &Self,
2632        s: S,
2633    ) -> ::core::result::Result<S::Ok, S::Error> {
2634        ::serde::Serialize::serialize(v, s)
2635    }
2636    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2637        d: D,
2638    ) -> ::core::result::Result<Self, D::Error> {
2639        <Self as ::serde::Deserialize>::deserialize(d)
2640    }
2641}
2642#[doc(hidden)]
2643pub const __LIST_RUNS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2644    type_url: "type.googleapis.com/headwaters.read.v1.ListRunsResponse",
2645    to_json: ::buffa::type_registry::any_to_json::<ListRunsResponse>,
2646    from_json: ::buffa::type_registry::any_from_json::<ListRunsResponse>,
2647    is_wkt: false,
2648};
2649/// --- datasets ---
2650///
2651/// A dataset: a table, file, or stream produced and/or consumed by jobs.
2652#[derive(Clone, PartialEq, Default)]
2653#[derive(::serde::Serialize, ::serde::Deserialize)]
2654#[serde(default)]
2655pub struct Dataset {
2656    /// Field 1: `id`
2657    #[serde(
2658        rename = "id",
2659        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2660    )]
2661    pub id: ::buffa::MessageField<EntityId>,
2662    /// Field 2: `type`
2663    #[serde(
2664        rename = "type",
2665        with = "::buffa::json_helpers::proto_enum",
2666        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2667    )]
2668    pub r#type: ::buffa::EnumValue<DatasetType>,
2669    /// Logical dataset name.
2670    ///
2671    /// Field 3: `name`
2672    #[serde(
2673        rename = "name",
2674        with = "::buffa::json_helpers::proto_string",
2675        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2676    )]
2677    pub name: ::buffa::alloc::string::String,
2678    /// Storage-level name (e.g. the physical table or path), if distinct from `name`.
2679    ///
2680    /// Field 4: `physical_name`
2681    #[serde(
2682        rename = "physicalName",
2683        alias = "physical_name",
2684        with = "::buffa::json_helpers::proto_string",
2685        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2686    )]
2687    pub physical_name: ::buffa::alloc::string::String,
2688    /// Field 5: `namespace`
2689    #[serde(
2690        rename = "namespace",
2691        with = "::buffa::json_helpers::proto_string",
2692        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2693    )]
2694    pub namespace: ::buffa::alloc::string::String,
2695    /// Name of the data source the dataset lives in (e.g. a warehouse or bucket).
2696    ///
2697    /// Field 6: `source_name`
2698    #[serde(
2699        rename = "sourceName",
2700        alias = "source_name",
2701        with = "::buffa::json_helpers::proto_string",
2702        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2703    )]
2704    pub source_name: ::buffa::alloc::string::String,
2705    /// Field 7: `created_at`
2706    #[serde(
2707        rename = "createdAt",
2708        alias = "created_at",
2709        with = "::buffa::json_helpers::proto_string",
2710        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2711    )]
2712    pub created_at: ::buffa::alloc::string::String,
2713    /// Field 8: `updated_at`
2714    #[serde(
2715        rename = "updatedAt",
2716        alias = "updated_at",
2717        with = "::buffa::json_helpers::proto_string",
2718        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2719    )]
2720    pub updated_at: ::buffa::alloc::string::String,
2721    /// Field 9: `description`
2722    #[serde(
2723        rename = "description",
2724        with = "::buffa::json_helpers::proto_string",
2725        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2726    )]
2727    pub description: ::buffa::alloc::string::String,
2728    /// Schema columns, each an object like `{name, type, description}`. Open-ended:
2729    /// the exact keys follow the OpenLineage schema facet.
2730    ///
2731    /// Field 10: `fields`
2732    #[serde(
2733        rename = "fields",
2734        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2735        deserialize_with = "::buffa::json_helpers::null_as_default"
2736    )]
2737    pub fields: ::buffa::alloc::vec::Vec<::buffa_types::google::protobuf::Struct>,
2738    /// OpenLineage dataset facets, keyed by facet name (e.g. `schema`,
2739    /// `dataSource`, `columnLineage`). Each carries `_producer` / `_schemaURL`.
2740    ///
2741    /// Field 11: `facets`
2742    #[serde(
2743        rename = "facets",
2744        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2745    )]
2746    pub facets: ::buffa::MessageField<::buffa_types::google::protobuf::Struct>,
2747    /// Field 12: `tags`
2748    #[serde(
2749        rename = "tags",
2750        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2751        deserialize_with = "::buffa::json_helpers::null_as_default"
2752    )]
2753    pub tags: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
2754    /// True once the dataset has been observed deleted.
2755    ///
2756    /// Field 13: `deleted`
2757    #[serde(
2758        rename = "deleted",
2759        with = "::buffa::json_helpers::proto_bool",
2760        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
2761    )]
2762    pub deleted: bool,
2763    /// Opaque UUID that changes whenever the dataset's schema changes. Use it to
2764    /// detect that the schema has moved; see also `ListDatasetVersions`.
2765    ///
2766    /// Field 14: `current_version`
2767    #[serde(
2768        rename = "currentVersion",
2769        alias = "current_version",
2770        with = "::buffa::json_helpers::proto_string",
2771        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2772    )]
2773    pub current_version: ::buffa::alloc::string::String,
2774    #[serde(skip)]
2775    #[doc(hidden)]
2776    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2777}
2778impl ::core::fmt::Debug for Dataset {
2779    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2780        f.debug_struct("Dataset")
2781            .field("id", &self.id)
2782            .field("r#type", &self.r#type)
2783            .field("name", &self.name)
2784            .field("physical_name", &self.physical_name)
2785            .field("namespace", &self.namespace)
2786            .field("source_name", &self.source_name)
2787            .field("created_at", &self.created_at)
2788            .field("updated_at", &self.updated_at)
2789            .field("description", &self.description)
2790            .field("fields", &self.fields)
2791            .field("facets", &self.facets)
2792            .field("tags", &self.tags)
2793            .field("deleted", &self.deleted)
2794            .field("current_version", &self.current_version)
2795            .finish()
2796    }
2797}
2798impl Dataset {
2799    /// Protobuf type URL for this message, for use with `Any::pack` and
2800    /// `Any::unpack_if`.
2801    ///
2802    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2803    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Dataset";
2804}
2805impl ::buffa::DefaultInstance for Dataset {
2806    fn default_instance() -> &'static Self {
2807        static VALUE: ::buffa::__private::OnceBox<Dataset> = ::buffa::__private::OnceBox::new();
2808        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2809    }
2810}
2811impl ::buffa::MessageName for Dataset {
2812    const PACKAGE: &'static str = "headwaters.read.v1";
2813    const NAME: &'static str = "Dataset";
2814    const FULL_NAME: &'static str = "headwaters.read.v1.Dataset";
2815    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Dataset";
2816}
2817impl ::buffa::Message for Dataset {
2818    /// Returns the total encoded size in bytes.
2819    ///
2820    /// The result is a `u32`; the protobuf specification requires all
2821    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2822    /// compliant message will never overflow this type.
2823    #[allow(clippy::let_and_return)]
2824    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2825        #[allow(unused_imports)]
2826        use ::buffa::Enumeration as _;
2827        let mut size = 0u32;
2828        if self.id.is_set() {
2829            let __slot = __cache.reserve();
2830            let inner_size = self.id.compute_size(__cache);
2831            __cache.set(__slot, inner_size);
2832            size
2833                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2834                    + inner_size;
2835        }
2836        {
2837            let val = self.r#type.to_i32();
2838            if val != 0 {
2839                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2840            }
2841        }
2842        if !self.name.is_empty() {
2843            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2844        }
2845        if !self.physical_name.is_empty() {
2846            size
2847                += 1u32 + ::buffa::types::string_encoded_len(&self.physical_name) as u32;
2848        }
2849        if !self.namespace.is_empty() {
2850            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
2851        }
2852        if !self.source_name.is_empty() {
2853            size += 1u32 + ::buffa::types::string_encoded_len(&self.source_name) as u32;
2854        }
2855        if !self.created_at.is_empty() {
2856            size += 1u32 + ::buffa::types::string_encoded_len(&self.created_at) as u32;
2857        }
2858        if !self.updated_at.is_empty() {
2859            size += 1u32 + ::buffa::types::string_encoded_len(&self.updated_at) as u32;
2860        }
2861        if !self.description.is_empty() {
2862            size += 1u32 + ::buffa::types::string_encoded_len(&self.description) as u32;
2863        }
2864        for v in &self.fields {
2865            let __slot = __cache.reserve();
2866            let inner_size = v.compute_size(__cache);
2867            __cache.set(__slot, inner_size);
2868            size
2869                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2870                    + inner_size;
2871        }
2872        if self.facets.is_set() {
2873            let __slot = __cache.reserve();
2874            let inner_size = self.facets.compute_size(__cache);
2875            __cache.set(__slot, inner_size);
2876            size
2877                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2878                    + inner_size;
2879        }
2880        for v in &self.tags {
2881            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2882        }
2883        if self.deleted {
2884            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2885        }
2886        if !self.current_version.is_empty() {
2887            size
2888                += 1u32
2889                    + ::buffa::types::string_encoded_len(&self.current_version) as u32;
2890        }
2891        size += self.__buffa_unknown_fields.encoded_len() as u32;
2892        size
2893    }
2894    fn write_to(
2895        &self,
2896        __cache: &mut ::buffa::SizeCache,
2897        buf: &mut impl ::buffa::bytes::BufMut,
2898    ) {
2899        #[allow(unused_imports)]
2900        use ::buffa::Enumeration as _;
2901        if self.id.is_set() {
2902            ::buffa::encoding::Tag::new(
2903                    1u32,
2904                    ::buffa::encoding::WireType::LengthDelimited,
2905                )
2906                .encode(buf);
2907            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2908            self.id.write_to(__cache, buf);
2909        }
2910        {
2911            let val = self.r#type.to_i32();
2912            if val != 0 {
2913                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
2914                    .encode(buf);
2915                ::buffa::types::encode_int32(val, buf);
2916            }
2917        }
2918        if !self.name.is_empty() {
2919            ::buffa::encoding::Tag::new(
2920                    3u32,
2921                    ::buffa::encoding::WireType::LengthDelimited,
2922                )
2923                .encode(buf);
2924            ::buffa::types::encode_string(&self.name, buf);
2925        }
2926        if !self.physical_name.is_empty() {
2927            ::buffa::encoding::Tag::new(
2928                    4u32,
2929                    ::buffa::encoding::WireType::LengthDelimited,
2930                )
2931                .encode(buf);
2932            ::buffa::types::encode_string(&self.physical_name, buf);
2933        }
2934        if !self.namespace.is_empty() {
2935            ::buffa::encoding::Tag::new(
2936                    5u32,
2937                    ::buffa::encoding::WireType::LengthDelimited,
2938                )
2939                .encode(buf);
2940            ::buffa::types::encode_string(&self.namespace, buf);
2941        }
2942        if !self.source_name.is_empty() {
2943            ::buffa::encoding::Tag::new(
2944                    6u32,
2945                    ::buffa::encoding::WireType::LengthDelimited,
2946                )
2947                .encode(buf);
2948            ::buffa::types::encode_string(&self.source_name, buf);
2949        }
2950        if !self.created_at.is_empty() {
2951            ::buffa::encoding::Tag::new(
2952                    7u32,
2953                    ::buffa::encoding::WireType::LengthDelimited,
2954                )
2955                .encode(buf);
2956            ::buffa::types::encode_string(&self.created_at, buf);
2957        }
2958        if !self.updated_at.is_empty() {
2959            ::buffa::encoding::Tag::new(
2960                    8u32,
2961                    ::buffa::encoding::WireType::LengthDelimited,
2962                )
2963                .encode(buf);
2964            ::buffa::types::encode_string(&self.updated_at, buf);
2965        }
2966        if !self.description.is_empty() {
2967            ::buffa::encoding::Tag::new(
2968                    9u32,
2969                    ::buffa::encoding::WireType::LengthDelimited,
2970                )
2971                .encode(buf);
2972            ::buffa::types::encode_string(&self.description, buf);
2973        }
2974        for v in &self.fields {
2975            ::buffa::encoding::Tag::new(
2976                    10u32,
2977                    ::buffa::encoding::WireType::LengthDelimited,
2978                )
2979                .encode(buf);
2980            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2981            v.write_to(__cache, buf);
2982        }
2983        if self.facets.is_set() {
2984            ::buffa::encoding::Tag::new(
2985                    11u32,
2986                    ::buffa::encoding::WireType::LengthDelimited,
2987                )
2988                .encode(buf);
2989            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2990            self.facets.write_to(__cache, buf);
2991        }
2992        for v in &self.tags {
2993            ::buffa::encoding::Tag::new(
2994                    12u32,
2995                    ::buffa::encoding::WireType::LengthDelimited,
2996                )
2997                .encode(buf);
2998            ::buffa::types::encode_string(v, buf);
2999        }
3000        if self.deleted {
3001            ::buffa::encoding::Tag::new(13u32, ::buffa::encoding::WireType::Varint)
3002                .encode(buf);
3003            ::buffa::types::encode_bool(self.deleted, buf);
3004        }
3005        if !self.current_version.is_empty() {
3006            ::buffa::encoding::Tag::new(
3007                    14u32,
3008                    ::buffa::encoding::WireType::LengthDelimited,
3009                )
3010                .encode(buf);
3011            ::buffa::types::encode_string(&self.current_version, buf);
3012        }
3013        self.__buffa_unknown_fields.write_to(buf);
3014    }
3015    fn merge_field(
3016        &mut self,
3017        tag: ::buffa::encoding::Tag,
3018        buf: &mut impl ::buffa::bytes::Buf,
3019        depth: u32,
3020    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3021        #[allow(unused_imports)]
3022        use ::buffa::bytes::Buf as _;
3023        #[allow(unused_imports)]
3024        use ::buffa::Enumeration as _;
3025        match tag.field_number() {
3026            1u32 => {
3027                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3028                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3029                        field_number: 1u32,
3030                        expected: 2u8,
3031                        actual: tag.wire_type() as u8,
3032                    });
3033                }
3034                ::buffa::Message::merge_length_delimited(
3035                    self.id.get_or_insert_default(),
3036                    buf,
3037                    depth,
3038                )?;
3039            }
3040            2u32 => {
3041                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3042                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3043                        field_number: 2u32,
3044                        expected: 0u8,
3045                        actual: tag.wire_type() as u8,
3046                    });
3047                }
3048                self.r#type = ::buffa::EnumValue::from(
3049                    ::buffa::types::decode_int32(buf)?,
3050                );
3051            }
3052            3u32 => {
3053                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3054                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3055                        field_number: 3u32,
3056                        expected: 2u8,
3057                        actual: tag.wire_type() as u8,
3058                    });
3059                }
3060                ::buffa::types::merge_string(&mut self.name, buf)?;
3061            }
3062            4u32 => {
3063                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3064                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3065                        field_number: 4u32,
3066                        expected: 2u8,
3067                        actual: tag.wire_type() as u8,
3068                    });
3069                }
3070                ::buffa::types::merge_string(&mut self.physical_name, buf)?;
3071            }
3072            5u32 => {
3073                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3074                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3075                        field_number: 5u32,
3076                        expected: 2u8,
3077                        actual: tag.wire_type() as u8,
3078                    });
3079                }
3080                ::buffa::types::merge_string(&mut self.namespace, buf)?;
3081            }
3082            6u32 => {
3083                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3084                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3085                        field_number: 6u32,
3086                        expected: 2u8,
3087                        actual: tag.wire_type() as u8,
3088                    });
3089                }
3090                ::buffa::types::merge_string(&mut self.source_name, buf)?;
3091            }
3092            7u32 => {
3093                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3094                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3095                        field_number: 7u32,
3096                        expected: 2u8,
3097                        actual: tag.wire_type() as u8,
3098                    });
3099                }
3100                ::buffa::types::merge_string(&mut self.created_at, buf)?;
3101            }
3102            8u32 => {
3103                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3104                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3105                        field_number: 8u32,
3106                        expected: 2u8,
3107                        actual: tag.wire_type() as u8,
3108                    });
3109                }
3110                ::buffa::types::merge_string(&mut self.updated_at, buf)?;
3111            }
3112            9u32 => {
3113                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3114                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3115                        field_number: 9u32,
3116                        expected: 2u8,
3117                        actual: tag.wire_type() as u8,
3118                    });
3119                }
3120                ::buffa::types::merge_string(&mut self.description, buf)?;
3121            }
3122            10u32 => {
3123                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3124                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3125                        field_number: 10u32,
3126                        expected: 2u8,
3127                        actual: tag.wire_type() as u8,
3128                    });
3129                }
3130                let mut elem = ::core::default::Default::default();
3131                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3132                self.fields.push(elem);
3133            }
3134            11u32 => {
3135                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3136                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3137                        field_number: 11u32,
3138                        expected: 2u8,
3139                        actual: tag.wire_type() as u8,
3140                    });
3141                }
3142                ::buffa::Message::merge_length_delimited(
3143                    self.facets.get_or_insert_default(),
3144                    buf,
3145                    depth,
3146                )?;
3147            }
3148            12u32 => {
3149                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3150                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3151                        field_number: 12u32,
3152                        expected: 2u8,
3153                        actual: tag.wire_type() as u8,
3154                    });
3155                }
3156                self.tags.push(::buffa::types::decode_string(buf)?);
3157            }
3158            13u32 => {
3159                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3160                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3161                        field_number: 13u32,
3162                        expected: 0u8,
3163                        actual: tag.wire_type() as u8,
3164                    });
3165                }
3166                self.deleted = ::buffa::types::decode_bool(buf)?;
3167            }
3168            14u32 => {
3169                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3170                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3171                        field_number: 14u32,
3172                        expected: 2u8,
3173                        actual: tag.wire_type() as u8,
3174                    });
3175                }
3176                ::buffa::types::merge_string(&mut self.current_version, buf)?;
3177            }
3178            _ => {
3179                self.__buffa_unknown_fields
3180                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3181            }
3182        }
3183        ::core::result::Result::Ok(())
3184    }
3185    fn clear(&mut self) {
3186        self.id = ::buffa::MessageField::none();
3187        self.r#type = ::buffa::EnumValue::from(0);
3188        self.name.clear();
3189        self.physical_name.clear();
3190        self.namespace.clear();
3191        self.source_name.clear();
3192        self.created_at.clear();
3193        self.updated_at.clear();
3194        self.description.clear();
3195        self.fields.clear();
3196        self.facets = ::buffa::MessageField::none();
3197        self.tags.clear();
3198        self.deleted = false;
3199        self.current_version.clear();
3200        self.__buffa_unknown_fields.clear();
3201    }
3202}
3203impl ::buffa::ExtensionSet for Dataset {
3204    const PROTO_FQN: &'static str = "headwaters.read.v1.Dataset";
3205    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3206        &self.__buffa_unknown_fields
3207    }
3208    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3209        &mut self.__buffa_unknown_fields
3210    }
3211}
3212impl ::buffa::json_helpers::ProtoElemJson for Dataset {
3213    fn serialize_proto_json<S: ::serde::Serializer>(
3214        v: &Self,
3215        s: S,
3216    ) -> ::core::result::Result<S::Ok, S::Error> {
3217        ::serde::Serialize::serialize(v, s)
3218    }
3219    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3220        d: D,
3221    ) -> ::core::result::Result<Self, D::Error> {
3222        <Self as ::serde::Deserialize>::deserialize(d)
3223    }
3224}
3225#[doc(hidden)]
3226pub const __DATASET_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3227    type_url: "type.googleapis.com/headwaters.read.v1.Dataset",
3228    to_json: ::buffa::type_registry::any_to_json::<Dataset>,
3229    from_json: ::buffa::type_registry::any_from_json::<Dataset>,
3230    is_wkt: false,
3231};
3232#[derive(Clone, PartialEq, Default)]
3233#[derive(::serde::Serialize, ::serde::Deserialize)]
3234#[serde(default)]
3235pub struct ListDatasetsResponse {
3236    /// Field 1: `datasets`
3237    #[serde(
3238        rename = "datasets",
3239        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3240        deserialize_with = "::buffa::json_helpers::null_as_default"
3241    )]
3242    pub datasets: ::buffa::alloc::vec::Vec<Dataset>,
3243    /// Field 2: `total_count`
3244    #[serde(
3245        rename = "totalCount",
3246        alias = "total_count",
3247        with = "::buffa::json_helpers::int32",
3248        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
3249    )]
3250    pub total_count: i32,
3251    #[serde(skip)]
3252    #[doc(hidden)]
3253    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3254}
3255impl ::core::fmt::Debug for ListDatasetsResponse {
3256    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3257        f.debug_struct("ListDatasetsResponse")
3258            .field("datasets", &self.datasets)
3259            .field("total_count", &self.total_count)
3260            .finish()
3261    }
3262}
3263impl ListDatasetsResponse {
3264    /// Protobuf type URL for this message, for use with `Any::pack` and
3265    /// `Any::unpack_if`.
3266    ///
3267    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3268    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetsResponse";
3269}
3270impl ::buffa::DefaultInstance for ListDatasetsResponse {
3271    fn default_instance() -> &'static Self {
3272        static VALUE: ::buffa::__private::OnceBox<ListDatasetsResponse> = ::buffa::__private::OnceBox::new();
3273        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3274    }
3275}
3276impl ::buffa::MessageName for ListDatasetsResponse {
3277    const PACKAGE: &'static str = "headwaters.read.v1";
3278    const NAME: &'static str = "ListDatasetsResponse";
3279    const FULL_NAME: &'static str = "headwaters.read.v1.ListDatasetsResponse";
3280    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetsResponse";
3281}
3282impl ::buffa::Message for ListDatasetsResponse {
3283    /// Returns the total encoded size in bytes.
3284    ///
3285    /// The result is a `u32`; the protobuf specification requires all
3286    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3287    /// compliant message will never overflow this type.
3288    #[allow(clippy::let_and_return)]
3289    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3290        #[allow(unused_imports)]
3291        use ::buffa::Enumeration as _;
3292        let mut size = 0u32;
3293        for v in &self.datasets {
3294            let __slot = __cache.reserve();
3295            let inner_size = v.compute_size(__cache);
3296            __cache.set(__slot, inner_size);
3297            size
3298                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3299                    + inner_size;
3300        }
3301        if self.total_count != 0i32 {
3302            size += 1u32 + ::buffa::types::int32_encoded_len(self.total_count) as u32;
3303        }
3304        size += self.__buffa_unknown_fields.encoded_len() as u32;
3305        size
3306    }
3307    fn write_to(
3308        &self,
3309        __cache: &mut ::buffa::SizeCache,
3310        buf: &mut impl ::buffa::bytes::BufMut,
3311    ) {
3312        #[allow(unused_imports)]
3313        use ::buffa::Enumeration as _;
3314        for v in &self.datasets {
3315            ::buffa::encoding::Tag::new(
3316                    1u32,
3317                    ::buffa::encoding::WireType::LengthDelimited,
3318                )
3319                .encode(buf);
3320            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3321            v.write_to(__cache, buf);
3322        }
3323        if self.total_count != 0i32 {
3324            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
3325                .encode(buf);
3326            ::buffa::types::encode_int32(self.total_count, buf);
3327        }
3328        self.__buffa_unknown_fields.write_to(buf);
3329    }
3330    fn merge_field(
3331        &mut self,
3332        tag: ::buffa::encoding::Tag,
3333        buf: &mut impl ::buffa::bytes::Buf,
3334        depth: u32,
3335    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3336        #[allow(unused_imports)]
3337        use ::buffa::bytes::Buf as _;
3338        #[allow(unused_imports)]
3339        use ::buffa::Enumeration as _;
3340        match tag.field_number() {
3341            1u32 => {
3342                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3343                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3344                        field_number: 1u32,
3345                        expected: 2u8,
3346                        actual: tag.wire_type() as u8,
3347                    });
3348                }
3349                let mut elem = ::core::default::Default::default();
3350                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3351                self.datasets.push(elem);
3352            }
3353            2u32 => {
3354                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3355                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3356                        field_number: 2u32,
3357                        expected: 0u8,
3358                        actual: tag.wire_type() as u8,
3359                    });
3360                }
3361                self.total_count = ::buffa::types::decode_int32(buf)?;
3362            }
3363            _ => {
3364                self.__buffa_unknown_fields
3365                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3366            }
3367        }
3368        ::core::result::Result::Ok(())
3369    }
3370    fn clear(&mut self) {
3371        self.datasets.clear();
3372        self.total_count = 0i32;
3373        self.__buffa_unknown_fields.clear();
3374    }
3375}
3376impl ::buffa::ExtensionSet for ListDatasetsResponse {
3377    const PROTO_FQN: &'static str = "headwaters.read.v1.ListDatasetsResponse";
3378    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3379        &self.__buffa_unknown_fields
3380    }
3381    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3382        &mut self.__buffa_unknown_fields
3383    }
3384}
3385impl ::buffa::json_helpers::ProtoElemJson for ListDatasetsResponse {
3386    fn serialize_proto_json<S: ::serde::Serializer>(
3387        v: &Self,
3388        s: S,
3389    ) -> ::core::result::Result<S::Ok, S::Error> {
3390        ::serde::Serialize::serialize(v, s)
3391    }
3392    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3393        d: D,
3394    ) -> ::core::result::Result<Self, D::Error> {
3395        <Self as ::serde::Deserialize>::deserialize(d)
3396    }
3397}
3398#[doc(hidden)]
3399pub const __LIST_DATASETS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3400    type_url: "type.googleapis.com/headwaters.read.v1.ListDatasetsResponse",
3401    to_json: ::buffa::type_registry::any_to_json::<ListDatasetsResponse>,
3402    from_json: ::buffa::type_registry::any_from_json::<ListDatasetsResponse>,
3403    is_wkt: false,
3404};
3405/// One historical version of a dataset's schema. A new version is recorded each
3406/// time the schema changes.
3407#[derive(Clone, PartialEq, Default)]
3408#[derive(::serde::Serialize, ::serde::Deserialize)]
3409#[serde(default)]
3410pub struct DatasetVersion {
3411    /// Field 1: `id`
3412    #[serde(
3413        rename = "id",
3414        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3415    )]
3416    pub id: ::buffa::MessageField<DatasetVersionId>,
3417    /// Field 2: `type`
3418    #[serde(
3419        rename = "type",
3420        with = "::buffa::json_helpers::proto_enum",
3421        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3422    )]
3423    pub r#type: ::buffa::EnumValue<DatasetType>,
3424    /// Field 3: `name`
3425    #[serde(
3426        rename = "name",
3427        with = "::buffa::json_helpers::proto_string",
3428        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3429    )]
3430    pub name: ::buffa::alloc::string::String,
3431    /// Field 4: `physical_name`
3432    #[serde(
3433        rename = "physicalName",
3434        alias = "physical_name",
3435        with = "::buffa::json_helpers::proto_string",
3436        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3437    )]
3438    pub physical_name: ::buffa::alloc::string::String,
3439    /// Field 5: `created_at`
3440    #[serde(
3441        rename = "createdAt",
3442        alias = "created_at",
3443        with = "::buffa::json_helpers::proto_string",
3444        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3445    )]
3446    pub created_at: ::buffa::alloc::string::String,
3447    /// This version's schema UUID. The dataset's latest version equals the
3448    /// dataset's `current_version`.
3449    ///
3450    /// Field 6: `version`
3451    #[serde(
3452        rename = "version",
3453        with = "::buffa::json_helpers::proto_string",
3454        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3455    )]
3456    pub version: ::buffa::alloc::string::String,
3457    /// Field 7: `namespace`
3458    #[serde(
3459        rename = "namespace",
3460        with = "::buffa::json_helpers::proto_string",
3461        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3462    )]
3463    pub namespace: ::buffa::alloc::string::String,
3464    /// Field 8: `source_name`
3465    #[serde(
3466        rename = "sourceName",
3467        alias = "source_name",
3468        with = "::buffa::json_helpers::proto_string",
3469        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3470    )]
3471    pub source_name: ::buffa::alloc::string::String,
3472    /// Field 9: `fields`
3473    #[serde(
3474        rename = "fields",
3475        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3476        deserialize_with = "::buffa::json_helpers::null_as_default"
3477    )]
3478    pub fields: ::buffa::alloc::vec::Vec<::buffa_types::google::protobuf::Struct>,
3479    /// Field 10: `tags`
3480    #[serde(
3481        rename = "tags",
3482        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3483        deserialize_with = "::buffa::json_helpers::null_as_default"
3484    )]
3485    pub tags: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
3486    /// Field 11: `last_modified_at`
3487    #[serde(
3488        rename = "lastModifiedAt",
3489        alias = "last_modified_at",
3490        with = "::buffa::json_helpers::proto_string",
3491        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3492    )]
3493    pub last_modified_at: ::buffa::alloc::string::String,
3494    /// Field 12: `description`
3495    #[serde(
3496        rename = "description",
3497        with = "::buffa::json_helpers::proto_string",
3498        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3499    )]
3500    pub description: ::buffa::alloc::string::String,
3501    /// Field 13: `facets`
3502    #[serde(
3503        rename = "facets",
3504        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3505    )]
3506    pub facets: ::buffa::MessageField<::buffa_types::google::protobuf::Struct>,
3507    #[serde(skip)]
3508    #[doc(hidden)]
3509    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3510}
3511impl ::core::fmt::Debug for DatasetVersion {
3512    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3513        f.debug_struct("DatasetVersion")
3514            .field("id", &self.id)
3515            .field("r#type", &self.r#type)
3516            .field("name", &self.name)
3517            .field("physical_name", &self.physical_name)
3518            .field("created_at", &self.created_at)
3519            .field("version", &self.version)
3520            .field("namespace", &self.namespace)
3521            .field("source_name", &self.source_name)
3522            .field("fields", &self.fields)
3523            .field("tags", &self.tags)
3524            .field("last_modified_at", &self.last_modified_at)
3525            .field("description", &self.description)
3526            .field("facets", &self.facets)
3527            .finish()
3528    }
3529}
3530impl DatasetVersion {
3531    /// Protobuf type URL for this message, for use with `Any::pack` and
3532    /// `Any::unpack_if`.
3533    ///
3534    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3535    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.DatasetVersion";
3536}
3537impl ::buffa::DefaultInstance for DatasetVersion {
3538    fn default_instance() -> &'static Self {
3539        static VALUE: ::buffa::__private::OnceBox<DatasetVersion> = ::buffa::__private::OnceBox::new();
3540        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3541    }
3542}
3543impl ::buffa::MessageName for DatasetVersion {
3544    const PACKAGE: &'static str = "headwaters.read.v1";
3545    const NAME: &'static str = "DatasetVersion";
3546    const FULL_NAME: &'static str = "headwaters.read.v1.DatasetVersion";
3547    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.DatasetVersion";
3548}
3549impl ::buffa::Message for DatasetVersion {
3550    /// Returns the total encoded size in bytes.
3551    ///
3552    /// The result is a `u32`; the protobuf specification requires all
3553    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3554    /// compliant message will never overflow this type.
3555    #[allow(clippy::let_and_return)]
3556    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3557        #[allow(unused_imports)]
3558        use ::buffa::Enumeration as _;
3559        let mut size = 0u32;
3560        if self.id.is_set() {
3561            let __slot = __cache.reserve();
3562            let inner_size = self.id.compute_size(__cache);
3563            __cache.set(__slot, inner_size);
3564            size
3565                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3566                    + inner_size;
3567        }
3568        {
3569            let val = self.r#type.to_i32();
3570            if val != 0 {
3571                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3572            }
3573        }
3574        if !self.name.is_empty() {
3575            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
3576        }
3577        if !self.physical_name.is_empty() {
3578            size
3579                += 1u32 + ::buffa::types::string_encoded_len(&self.physical_name) as u32;
3580        }
3581        if !self.created_at.is_empty() {
3582            size += 1u32 + ::buffa::types::string_encoded_len(&self.created_at) as u32;
3583        }
3584        if !self.version.is_empty() {
3585            size += 1u32 + ::buffa::types::string_encoded_len(&self.version) as u32;
3586        }
3587        if !self.namespace.is_empty() {
3588            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
3589        }
3590        if !self.source_name.is_empty() {
3591            size += 1u32 + ::buffa::types::string_encoded_len(&self.source_name) as u32;
3592        }
3593        for v in &self.fields {
3594            let __slot = __cache.reserve();
3595            let inner_size = v.compute_size(__cache);
3596            __cache.set(__slot, inner_size);
3597            size
3598                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3599                    + inner_size;
3600        }
3601        for v in &self.tags {
3602            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3603        }
3604        if !self.last_modified_at.is_empty() {
3605            size
3606                += 1u32
3607                    + ::buffa::types::string_encoded_len(&self.last_modified_at) as u32;
3608        }
3609        if !self.description.is_empty() {
3610            size += 1u32 + ::buffa::types::string_encoded_len(&self.description) as u32;
3611        }
3612        if self.facets.is_set() {
3613            let __slot = __cache.reserve();
3614            let inner_size = self.facets.compute_size(__cache);
3615            __cache.set(__slot, inner_size);
3616            size
3617                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3618                    + inner_size;
3619        }
3620        size += self.__buffa_unknown_fields.encoded_len() as u32;
3621        size
3622    }
3623    fn write_to(
3624        &self,
3625        __cache: &mut ::buffa::SizeCache,
3626        buf: &mut impl ::buffa::bytes::BufMut,
3627    ) {
3628        #[allow(unused_imports)]
3629        use ::buffa::Enumeration as _;
3630        if self.id.is_set() {
3631            ::buffa::encoding::Tag::new(
3632                    1u32,
3633                    ::buffa::encoding::WireType::LengthDelimited,
3634                )
3635                .encode(buf);
3636            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3637            self.id.write_to(__cache, buf);
3638        }
3639        {
3640            let val = self.r#type.to_i32();
3641            if val != 0 {
3642                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
3643                    .encode(buf);
3644                ::buffa::types::encode_int32(val, buf);
3645            }
3646        }
3647        if !self.name.is_empty() {
3648            ::buffa::encoding::Tag::new(
3649                    3u32,
3650                    ::buffa::encoding::WireType::LengthDelimited,
3651                )
3652                .encode(buf);
3653            ::buffa::types::encode_string(&self.name, buf);
3654        }
3655        if !self.physical_name.is_empty() {
3656            ::buffa::encoding::Tag::new(
3657                    4u32,
3658                    ::buffa::encoding::WireType::LengthDelimited,
3659                )
3660                .encode(buf);
3661            ::buffa::types::encode_string(&self.physical_name, buf);
3662        }
3663        if !self.created_at.is_empty() {
3664            ::buffa::encoding::Tag::new(
3665                    5u32,
3666                    ::buffa::encoding::WireType::LengthDelimited,
3667                )
3668                .encode(buf);
3669            ::buffa::types::encode_string(&self.created_at, buf);
3670        }
3671        if !self.version.is_empty() {
3672            ::buffa::encoding::Tag::new(
3673                    6u32,
3674                    ::buffa::encoding::WireType::LengthDelimited,
3675                )
3676                .encode(buf);
3677            ::buffa::types::encode_string(&self.version, buf);
3678        }
3679        if !self.namespace.is_empty() {
3680            ::buffa::encoding::Tag::new(
3681                    7u32,
3682                    ::buffa::encoding::WireType::LengthDelimited,
3683                )
3684                .encode(buf);
3685            ::buffa::types::encode_string(&self.namespace, buf);
3686        }
3687        if !self.source_name.is_empty() {
3688            ::buffa::encoding::Tag::new(
3689                    8u32,
3690                    ::buffa::encoding::WireType::LengthDelimited,
3691                )
3692                .encode(buf);
3693            ::buffa::types::encode_string(&self.source_name, buf);
3694        }
3695        for v in &self.fields {
3696            ::buffa::encoding::Tag::new(
3697                    9u32,
3698                    ::buffa::encoding::WireType::LengthDelimited,
3699                )
3700                .encode(buf);
3701            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3702            v.write_to(__cache, buf);
3703        }
3704        for v in &self.tags {
3705            ::buffa::encoding::Tag::new(
3706                    10u32,
3707                    ::buffa::encoding::WireType::LengthDelimited,
3708                )
3709                .encode(buf);
3710            ::buffa::types::encode_string(v, buf);
3711        }
3712        if !self.last_modified_at.is_empty() {
3713            ::buffa::encoding::Tag::new(
3714                    11u32,
3715                    ::buffa::encoding::WireType::LengthDelimited,
3716                )
3717                .encode(buf);
3718            ::buffa::types::encode_string(&self.last_modified_at, buf);
3719        }
3720        if !self.description.is_empty() {
3721            ::buffa::encoding::Tag::new(
3722                    12u32,
3723                    ::buffa::encoding::WireType::LengthDelimited,
3724                )
3725                .encode(buf);
3726            ::buffa::types::encode_string(&self.description, buf);
3727        }
3728        if self.facets.is_set() {
3729            ::buffa::encoding::Tag::new(
3730                    13u32,
3731                    ::buffa::encoding::WireType::LengthDelimited,
3732                )
3733                .encode(buf);
3734            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3735            self.facets.write_to(__cache, buf);
3736        }
3737        self.__buffa_unknown_fields.write_to(buf);
3738    }
3739    fn merge_field(
3740        &mut self,
3741        tag: ::buffa::encoding::Tag,
3742        buf: &mut impl ::buffa::bytes::Buf,
3743        depth: u32,
3744    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3745        #[allow(unused_imports)]
3746        use ::buffa::bytes::Buf as _;
3747        #[allow(unused_imports)]
3748        use ::buffa::Enumeration as _;
3749        match tag.field_number() {
3750            1u32 => {
3751                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3752                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3753                        field_number: 1u32,
3754                        expected: 2u8,
3755                        actual: tag.wire_type() as u8,
3756                    });
3757                }
3758                ::buffa::Message::merge_length_delimited(
3759                    self.id.get_or_insert_default(),
3760                    buf,
3761                    depth,
3762                )?;
3763            }
3764            2u32 => {
3765                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3766                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3767                        field_number: 2u32,
3768                        expected: 0u8,
3769                        actual: tag.wire_type() as u8,
3770                    });
3771                }
3772                self.r#type = ::buffa::EnumValue::from(
3773                    ::buffa::types::decode_int32(buf)?,
3774                );
3775            }
3776            3u32 => {
3777                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3778                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3779                        field_number: 3u32,
3780                        expected: 2u8,
3781                        actual: tag.wire_type() as u8,
3782                    });
3783                }
3784                ::buffa::types::merge_string(&mut self.name, buf)?;
3785            }
3786            4u32 => {
3787                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3788                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3789                        field_number: 4u32,
3790                        expected: 2u8,
3791                        actual: tag.wire_type() as u8,
3792                    });
3793                }
3794                ::buffa::types::merge_string(&mut self.physical_name, buf)?;
3795            }
3796            5u32 => {
3797                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3798                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3799                        field_number: 5u32,
3800                        expected: 2u8,
3801                        actual: tag.wire_type() as u8,
3802                    });
3803                }
3804                ::buffa::types::merge_string(&mut self.created_at, buf)?;
3805            }
3806            6u32 => {
3807                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3808                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3809                        field_number: 6u32,
3810                        expected: 2u8,
3811                        actual: tag.wire_type() as u8,
3812                    });
3813                }
3814                ::buffa::types::merge_string(&mut self.version, buf)?;
3815            }
3816            7u32 => {
3817                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3818                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3819                        field_number: 7u32,
3820                        expected: 2u8,
3821                        actual: tag.wire_type() as u8,
3822                    });
3823                }
3824                ::buffa::types::merge_string(&mut self.namespace, buf)?;
3825            }
3826            8u32 => {
3827                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3828                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3829                        field_number: 8u32,
3830                        expected: 2u8,
3831                        actual: tag.wire_type() as u8,
3832                    });
3833                }
3834                ::buffa::types::merge_string(&mut self.source_name, buf)?;
3835            }
3836            9u32 => {
3837                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3838                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3839                        field_number: 9u32,
3840                        expected: 2u8,
3841                        actual: tag.wire_type() as u8,
3842                    });
3843                }
3844                let mut elem = ::core::default::Default::default();
3845                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3846                self.fields.push(elem);
3847            }
3848            10u32 => {
3849                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3850                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3851                        field_number: 10u32,
3852                        expected: 2u8,
3853                        actual: tag.wire_type() as u8,
3854                    });
3855                }
3856                self.tags.push(::buffa::types::decode_string(buf)?);
3857            }
3858            11u32 => {
3859                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3860                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3861                        field_number: 11u32,
3862                        expected: 2u8,
3863                        actual: tag.wire_type() as u8,
3864                    });
3865                }
3866                ::buffa::types::merge_string(&mut self.last_modified_at, buf)?;
3867            }
3868            12u32 => {
3869                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3870                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3871                        field_number: 12u32,
3872                        expected: 2u8,
3873                        actual: tag.wire_type() as u8,
3874                    });
3875                }
3876                ::buffa::types::merge_string(&mut self.description, buf)?;
3877            }
3878            13u32 => {
3879                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3880                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3881                        field_number: 13u32,
3882                        expected: 2u8,
3883                        actual: tag.wire_type() as u8,
3884                    });
3885                }
3886                ::buffa::Message::merge_length_delimited(
3887                    self.facets.get_or_insert_default(),
3888                    buf,
3889                    depth,
3890                )?;
3891            }
3892            _ => {
3893                self.__buffa_unknown_fields
3894                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3895            }
3896        }
3897        ::core::result::Result::Ok(())
3898    }
3899    fn clear(&mut self) {
3900        self.id = ::buffa::MessageField::none();
3901        self.r#type = ::buffa::EnumValue::from(0);
3902        self.name.clear();
3903        self.physical_name.clear();
3904        self.created_at.clear();
3905        self.version.clear();
3906        self.namespace.clear();
3907        self.source_name.clear();
3908        self.fields.clear();
3909        self.tags.clear();
3910        self.last_modified_at.clear();
3911        self.description.clear();
3912        self.facets = ::buffa::MessageField::none();
3913        self.__buffa_unknown_fields.clear();
3914    }
3915}
3916impl ::buffa::ExtensionSet for DatasetVersion {
3917    const PROTO_FQN: &'static str = "headwaters.read.v1.DatasetVersion";
3918    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3919        &self.__buffa_unknown_fields
3920    }
3921    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3922        &mut self.__buffa_unknown_fields
3923    }
3924}
3925impl ::buffa::json_helpers::ProtoElemJson for DatasetVersion {
3926    fn serialize_proto_json<S: ::serde::Serializer>(
3927        v: &Self,
3928        s: S,
3929    ) -> ::core::result::Result<S::Ok, S::Error> {
3930        ::serde::Serialize::serialize(v, s)
3931    }
3932    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3933        d: D,
3934    ) -> ::core::result::Result<Self, D::Error> {
3935        <Self as ::serde::Deserialize>::deserialize(d)
3936    }
3937}
3938#[doc(hidden)]
3939pub const __DATASET_VERSION_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3940    type_url: "type.googleapis.com/headwaters.read.v1.DatasetVersion",
3941    to_json: ::buffa::type_registry::any_to_json::<DatasetVersion>,
3942    from_json: ::buffa::type_registry::any_from_json::<DatasetVersion>,
3943    is_wkt: false,
3944};
3945#[derive(Clone, PartialEq, Default)]
3946#[derive(::serde::Serialize, ::serde::Deserialize)]
3947#[serde(default)]
3948pub struct DatasetVersionId {
3949    /// Field 1: `namespace`
3950    #[serde(
3951        rename = "namespace",
3952        with = "::buffa::json_helpers::proto_string",
3953        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3954    )]
3955    pub namespace: ::buffa::alloc::string::String,
3956    /// Field 2: `name`
3957    #[serde(
3958        rename = "name",
3959        with = "::buffa::json_helpers::proto_string",
3960        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3961    )]
3962    pub name: ::buffa::alloc::string::String,
3963    /// Field 3: `version`
3964    #[serde(
3965        rename = "version",
3966        with = "::buffa::json_helpers::proto_string",
3967        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3968    )]
3969    pub version: ::buffa::alloc::string::String,
3970    #[serde(skip)]
3971    #[doc(hidden)]
3972    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3973}
3974impl ::core::fmt::Debug for DatasetVersionId {
3975    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3976        f.debug_struct("DatasetVersionId")
3977            .field("namespace", &self.namespace)
3978            .field("name", &self.name)
3979            .field("version", &self.version)
3980            .finish()
3981    }
3982}
3983impl DatasetVersionId {
3984    /// Protobuf type URL for this message, for use with `Any::pack` and
3985    /// `Any::unpack_if`.
3986    ///
3987    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3988    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.DatasetVersionId";
3989}
3990impl ::buffa::DefaultInstance for DatasetVersionId {
3991    fn default_instance() -> &'static Self {
3992        static VALUE: ::buffa::__private::OnceBox<DatasetVersionId> = ::buffa::__private::OnceBox::new();
3993        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3994    }
3995}
3996impl ::buffa::MessageName for DatasetVersionId {
3997    const PACKAGE: &'static str = "headwaters.read.v1";
3998    const NAME: &'static str = "DatasetVersionId";
3999    const FULL_NAME: &'static str = "headwaters.read.v1.DatasetVersionId";
4000    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.DatasetVersionId";
4001}
4002impl ::buffa::Message for DatasetVersionId {
4003    /// Returns the total encoded size in bytes.
4004    ///
4005    /// The result is a `u32`; the protobuf specification requires all
4006    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4007    /// compliant message will never overflow this type.
4008    #[allow(clippy::let_and_return)]
4009    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4010        #[allow(unused_imports)]
4011        use ::buffa::Enumeration as _;
4012        let mut size = 0u32;
4013        if !self.namespace.is_empty() {
4014            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
4015        }
4016        if !self.name.is_empty() {
4017            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4018        }
4019        if !self.version.is_empty() {
4020            size += 1u32 + ::buffa::types::string_encoded_len(&self.version) as u32;
4021        }
4022        size += self.__buffa_unknown_fields.encoded_len() as u32;
4023        size
4024    }
4025    fn write_to(
4026        &self,
4027        _cache: &mut ::buffa::SizeCache,
4028        buf: &mut impl ::buffa::bytes::BufMut,
4029    ) {
4030        #[allow(unused_imports)]
4031        use ::buffa::Enumeration as _;
4032        if !self.namespace.is_empty() {
4033            ::buffa::encoding::Tag::new(
4034                    1u32,
4035                    ::buffa::encoding::WireType::LengthDelimited,
4036                )
4037                .encode(buf);
4038            ::buffa::types::encode_string(&self.namespace, buf);
4039        }
4040        if !self.name.is_empty() {
4041            ::buffa::encoding::Tag::new(
4042                    2u32,
4043                    ::buffa::encoding::WireType::LengthDelimited,
4044                )
4045                .encode(buf);
4046            ::buffa::types::encode_string(&self.name, buf);
4047        }
4048        if !self.version.is_empty() {
4049            ::buffa::encoding::Tag::new(
4050                    3u32,
4051                    ::buffa::encoding::WireType::LengthDelimited,
4052                )
4053                .encode(buf);
4054            ::buffa::types::encode_string(&self.version, buf);
4055        }
4056        self.__buffa_unknown_fields.write_to(buf);
4057    }
4058    fn merge_field(
4059        &mut self,
4060        tag: ::buffa::encoding::Tag,
4061        buf: &mut impl ::buffa::bytes::Buf,
4062        depth: u32,
4063    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4064        #[allow(unused_imports)]
4065        use ::buffa::bytes::Buf as _;
4066        #[allow(unused_imports)]
4067        use ::buffa::Enumeration as _;
4068        match tag.field_number() {
4069            1u32 => {
4070                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4071                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4072                        field_number: 1u32,
4073                        expected: 2u8,
4074                        actual: tag.wire_type() as u8,
4075                    });
4076                }
4077                ::buffa::types::merge_string(&mut self.namespace, buf)?;
4078            }
4079            2u32 => {
4080                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4081                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4082                        field_number: 2u32,
4083                        expected: 2u8,
4084                        actual: tag.wire_type() as u8,
4085                    });
4086                }
4087                ::buffa::types::merge_string(&mut self.name, buf)?;
4088            }
4089            3u32 => {
4090                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4091                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4092                        field_number: 3u32,
4093                        expected: 2u8,
4094                        actual: tag.wire_type() as u8,
4095                    });
4096                }
4097                ::buffa::types::merge_string(&mut self.version, buf)?;
4098            }
4099            _ => {
4100                self.__buffa_unknown_fields
4101                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4102            }
4103        }
4104        ::core::result::Result::Ok(())
4105    }
4106    fn clear(&mut self) {
4107        self.namespace.clear();
4108        self.name.clear();
4109        self.version.clear();
4110        self.__buffa_unknown_fields.clear();
4111    }
4112}
4113impl ::buffa::ExtensionSet for DatasetVersionId {
4114    const PROTO_FQN: &'static str = "headwaters.read.v1.DatasetVersionId";
4115    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4116        &self.__buffa_unknown_fields
4117    }
4118    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4119        &mut self.__buffa_unknown_fields
4120    }
4121}
4122impl ::buffa::json_helpers::ProtoElemJson for DatasetVersionId {
4123    fn serialize_proto_json<S: ::serde::Serializer>(
4124        v: &Self,
4125        s: S,
4126    ) -> ::core::result::Result<S::Ok, S::Error> {
4127        ::serde::Serialize::serialize(v, s)
4128    }
4129    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4130        d: D,
4131    ) -> ::core::result::Result<Self, D::Error> {
4132        <Self as ::serde::Deserialize>::deserialize(d)
4133    }
4134}
4135#[doc(hidden)]
4136pub const __DATASET_VERSION_ID_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4137    type_url: "type.googleapis.com/headwaters.read.v1.DatasetVersionId",
4138    to_json: ::buffa::type_registry::any_to_json::<DatasetVersionId>,
4139    from_json: ::buffa::type_registry::any_from_json::<DatasetVersionId>,
4140    is_wkt: false,
4141};
4142#[derive(Clone, PartialEq, Default)]
4143#[derive(::serde::Serialize, ::serde::Deserialize)]
4144#[serde(default)]
4145pub struct ListDatasetVersionsResponse {
4146    /// Field 1: `versions`
4147    #[serde(
4148        rename = "versions",
4149        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
4150        deserialize_with = "::buffa::json_helpers::null_as_default"
4151    )]
4152    pub versions: ::buffa::alloc::vec::Vec<DatasetVersion>,
4153    /// Field 2: `total_count`
4154    #[serde(
4155        rename = "totalCount",
4156        alias = "total_count",
4157        with = "::buffa::json_helpers::int32",
4158        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
4159    )]
4160    pub total_count: i32,
4161    #[serde(skip)]
4162    #[doc(hidden)]
4163    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4164}
4165impl ::core::fmt::Debug for ListDatasetVersionsResponse {
4166    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4167        f.debug_struct("ListDatasetVersionsResponse")
4168            .field("versions", &self.versions)
4169            .field("total_count", &self.total_count)
4170            .finish()
4171    }
4172}
4173impl ListDatasetVersionsResponse {
4174    /// Protobuf type URL for this message, for use with `Any::pack` and
4175    /// `Any::unpack_if`.
4176    ///
4177    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4178    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetVersionsResponse";
4179}
4180impl ::buffa::DefaultInstance for ListDatasetVersionsResponse {
4181    fn default_instance() -> &'static Self {
4182        static VALUE: ::buffa::__private::OnceBox<ListDatasetVersionsResponse> = ::buffa::__private::OnceBox::new();
4183        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4184    }
4185}
4186impl ::buffa::MessageName for ListDatasetVersionsResponse {
4187    const PACKAGE: &'static str = "headwaters.read.v1";
4188    const NAME: &'static str = "ListDatasetVersionsResponse";
4189    const FULL_NAME: &'static str = "headwaters.read.v1.ListDatasetVersionsResponse";
4190    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetVersionsResponse";
4191}
4192impl ::buffa::Message for ListDatasetVersionsResponse {
4193    /// Returns the total encoded size in bytes.
4194    ///
4195    /// The result is a `u32`; the protobuf specification requires all
4196    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4197    /// compliant message will never overflow this type.
4198    #[allow(clippy::let_and_return)]
4199    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4200        #[allow(unused_imports)]
4201        use ::buffa::Enumeration as _;
4202        let mut size = 0u32;
4203        for v in &self.versions {
4204            let __slot = __cache.reserve();
4205            let inner_size = v.compute_size(__cache);
4206            __cache.set(__slot, inner_size);
4207            size
4208                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4209                    + inner_size;
4210        }
4211        if self.total_count != 0i32 {
4212            size += 1u32 + ::buffa::types::int32_encoded_len(self.total_count) as u32;
4213        }
4214        size += self.__buffa_unknown_fields.encoded_len() as u32;
4215        size
4216    }
4217    fn write_to(
4218        &self,
4219        __cache: &mut ::buffa::SizeCache,
4220        buf: &mut impl ::buffa::bytes::BufMut,
4221    ) {
4222        #[allow(unused_imports)]
4223        use ::buffa::Enumeration as _;
4224        for v in &self.versions {
4225            ::buffa::encoding::Tag::new(
4226                    1u32,
4227                    ::buffa::encoding::WireType::LengthDelimited,
4228                )
4229                .encode(buf);
4230            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4231            v.write_to(__cache, buf);
4232        }
4233        if self.total_count != 0i32 {
4234            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
4235                .encode(buf);
4236            ::buffa::types::encode_int32(self.total_count, buf);
4237        }
4238        self.__buffa_unknown_fields.write_to(buf);
4239    }
4240    fn merge_field(
4241        &mut self,
4242        tag: ::buffa::encoding::Tag,
4243        buf: &mut impl ::buffa::bytes::Buf,
4244        depth: u32,
4245    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4246        #[allow(unused_imports)]
4247        use ::buffa::bytes::Buf as _;
4248        #[allow(unused_imports)]
4249        use ::buffa::Enumeration as _;
4250        match tag.field_number() {
4251            1u32 => {
4252                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4253                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4254                        field_number: 1u32,
4255                        expected: 2u8,
4256                        actual: tag.wire_type() as u8,
4257                    });
4258                }
4259                let mut elem = ::core::default::Default::default();
4260                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4261                self.versions.push(elem);
4262            }
4263            2u32 => {
4264                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4265                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4266                        field_number: 2u32,
4267                        expected: 0u8,
4268                        actual: tag.wire_type() as u8,
4269                    });
4270                }
4271                self.total_count = ::buffa::types::decode_int32(buf)?;
4272            }
4273            _ => {
4274                self.__buffa_unknown_fields
4275                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4276            }
4277        }
4278        ::core::result::Result::Ok(())
4279    }
4280    fn clear(&mut self) {
4281        self.versions.clear();
4282        self.total_count = 0i32;
4283        self.__buffa_unknown_fields.clear();
4284    }
4285}
4286impl ::buffa::ExtensionSet for ListDatasetVersionsResponse {
4287    const PROTO_FQN: &'static str = "headwaters.read.v1.ListDatasetVersionsResponse";
4288    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4289        &self.__buffa_unknown_fields
4290    }
4291    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4292        &mut self.__buffa_unknown_fields
4293    }
4294}
4295impl ::buffa::json_helpers::ProtoElemJson for ListDatasetVersionsResponse {
4296    fn serialize_proto_json<S: ::serde::Serializer>(
4297        v: &Self,
4298        s: S,
4299    ) -> ::core::result::Result<S::Ok, S::Error> {
4300        ::serde::Serialize::serialize(v, s)
4301    }
4302    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4303        d: D,
4304    ) -> ::core::result::Result<Self, D::Error> {
4305        <Self as ::serde::Deserialize>::deserialize(d)
4306    }
4307}
4308#[doc(hidden)]
4309pub const __LIST_DATASET_VERSIONS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4310    type_url: "type.googleapis.com/headwaters.read.v1.ListDatasetVersionsResponse",
4311    to_json: ::buffa::type_registry::any_to_json::<ListDatasetVersionsResponse>,
4312    from_json: ::buffa::type_registry::any_from_json::<ListDatasetVersionsResponse>,
4313    is_wkt: false,
4314};
4315/// --- search ---
4316///
4317/// One job or dataset matching a search query.
4318#[derive(Clone, PartialEq, Default)]
4319#[derive(::serde::Serialize, ::serde::Deserialize)]
4320#[serde(default)]
4321pub struct SearchResult {
4322    /// Field 1: `name`
4323    #[serde(
4324        rename = "name",
4325        with = "::buffa::json_helpers::proto_string",
4326        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4327    )]
4328    pub name: ::buffa::alloc::string::String,
4329    /// Field 2: `namespace`
4330    #[serde(
4331        rename = "namespace",
4332        with = "::buffa::json_helpers::proto_string",
4333        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4334    )]
4335    pub namespace: ::buffa::alloc::string::String,
4336    /// The matched entity's nodeId, ready to pass to `GetLineage`.
4337    ///
4338    /// Field 3: `node_id`
4339    #[serde(
4340        rename = "nodeId",
4341        alias = "node_id",
4342        with = "::buffa::json_helpers::proto_string",
4343        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4344    )]
4345    pub node_id: ::buffa::alloc::string::String,
4346    /// `JOB` or `DATASET` (search does not return fields).
4347    ///
4348    /// Field 4: `type`
4349    #[serde(
4350        rename = "type",
4351        with = "::buffa::json_helpers::proto_enum",
4352        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4353    )]
4354    pub r#type: ::buffa::EnumValue<EntityKind>,
4355    /// Field 5: `updated_at`
4356    #[serde(
4357        rename = "updatedAt",
4358        alias = "updated_at",
4359        with = "::buffa::json_helpers::proto_string",
4360        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4361    )]
4362    pub updated_at: ::buffa::alloc::string::String,
4363    #[serde(skip)]
4364    #[doc(hidden)]
4365    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4366}
4367impl ::core::fmt::Debug for SearchResult {
4368    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4369        f.debug_struct("SearchResult")
4370            .field("name", &self.name)
4371            .field("namespace", &self.namespace)
4372            .field("node_id", &self.node_id)
4373            .field("r#type", &self.r#type)
4374            .field("updated_at", &self.updated_at)
4375            .finish()
4376    }
4377}
4378impl SearchResult {
4379    /// Protobuf type URL for this message, for use with `Any::pack` and
4380    /// `Any::unpack_if`.
4381    ///
4382    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4383    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchResult";
4384}
4385impl ::buffa::DefaultInstance for SearchResult {
4386    fn default_instance() -> &'static Self {
4387        static VALUE: ::buffa::__private::OnceBox<SearchResult> = ::buffa::__private::OnceBox::new();
4388        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4389    }
4390}
4391impl ::buffa::MessageName for SearchResult {
4392    const PACKAGE: &'static str = "headwaters.read.v1";
4393    const NAME: &'static str = "SearchResult";
4394    const FULL_NAME: &'static str = "headwaters.read.v1.SearchResult";
4395    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchResult";
4396}
4397impl ::buffa::Message for SearchResult {
4398    /// Returns the total encoded size in bytes.
4399    ///
4400    /// The result is a `u32`; the protobuf specification requires all
4401    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4402    /// compliant message will never overflow this type.
4403    #[allow(clippy::let_and_return)]
4404    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4405        #[allow(unused_imports)]
4406        use ::buffa::Enumeration as _;
4407        let mut size = 0u32;
4408        if !self.name.is_empty() {
4409            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4410        }
4411        if !self.namespace.is_empty() {
4412            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
4413        }
4414        if !self.node_id.is_empty() {
4415            size += 1u32 + ::buffa::types::string_encoded_len(&self.node_id) as u32;
4416        }
4417        {
4418            let val = self.r#type.to_i32();
4419            if val != 0 {
4420                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4421            }
4422        }
4423        if !self.updated_at.is_empty() {
4424            size += 1u32 + ::buffa::types::string_encoded_len(&self.updated_at) as u32;
4425        }
4426        size += self.__buffa_unknown_fields.encoded_len() as u32;
4427        size
4428    }
4429    fn write_to(
4430        &self,
4431        _cache: &mut ::buffa::SizeCache,
4432        buf: &mut impl ::buffa::bytes::BufMut,
4433    ) {
4434        #[allow(unused_imports)]
4435        use ::buffa::Enumeration as _;
4436        if !self.name.is_empty() {
4437            ::buffa::encoding::Tag::new(
4438                    1u32,
4439                    ::buffa::encoding::WireType::LengthDelimited,
4440                )
4441                .encode(buf);
4442            ::buffa::types::encode_string(&self.name, buf);
4443        }
4444        if !self.namespace.is_empty() {
4445            ::buffa::encoding::Tag::new(
4446                    2u32,
4447                    ::buffa::encoding::WireType::LengthDelimited,
4448                )
4449                .encode(buf);
4450            ::buffa::types::encode_string(&self.namespace, buf);
4451        }
4452        if !self.node_id.is_empty() {
4453            ::buffa::encoding::Tag::new(
4454                    3u32,
4455                    ::buffa::encoding::WireType::LengthDelimited,
4456                )
4457                .encode(buf);
4458            ::buffa::types::encode_string(&self.node_id, buf);
4459        }
4460        {
4461            let val = self.r#type.to_i32();
4462            if val != 0 {
4463                ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
4464                    .encode(buf);
4465                ::buffa::types::encode_int32(val, buf);
4466            }
4467        }
4468        if !self.updated_at.is_empty() {
4469            ::buffa::encoding::Tag::new(
4470                    5u32,
4471                    ::buffa::encoding::WireType::LengthDelimited,
4472                )
4473                .encode(buf);
4474            ::buffa::types::encode_string(&self.updated_at, buf);
4475        }
4476        self.__buffa_unknown_fields.write_to(buf);
4477    }
4478    fn merge_field(
4479        &mut self,
4480        tag: ::buffa::encoding::Tag,
4481        buf: &mut impl ::buffa::bytes::Buf,
4482        depth: u32,
4483    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4484        #[allow(unused_imports)]
4485        use ::buffa::bytes::Buf as _;
4486        #[allow(unused_imports)]
4487        use ::buffa::Enumeration as _;
4488        match tag.field_number() {
4489            1u32 => {
4490                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4491                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4492                        field_number: 1u32,
4493                        expected: 2u8,
4494                        actual: tag.wire_type() as u8,
4495                    });
4496                }
4497                ::buffa::types::merge_string(&mut self.name, buf)?;
4498            }
4499            2u32 => {
4500                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4501                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4502                        field_number: 2u32,
4503                        expected: 2u8,
4504                        actual: tag.wire_type() as u8,
4505                    });
4506                }
4507                ::buffa::types::merge_string(&mut self.namespace, buf)?;
4508            }
4509            3u32 => {
4510                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4511                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4512                        field_number: 3u32,
4513                        expected: 2u8,
4514                        actual: tag.wire_type() as u8,
4515                    });
4516                }
4517                ::buffa::types::merge_string(&mut self.node_id, buf)?;
4518            }
4519            4u32 => {
4520                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4521                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4522                        field_number: 4u32,
4523                        expected: 0u8,
4524                        actual: tag.wire_type() as u8,
4525                    });
4526                }
4527                self.r#type = ::buffa::EnumValue::from(
4528                    ::buffa::types::decode_int32(buf)?,
4529                );
4530            }
4531            5u32 => {
4532                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4533                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4534                        field_number: 5u32,
4535                        expected: 2u8,
4536                        actual: tag.wire_type() as u8,
4537                    });
4538                }
4539                ::buffa::types::merge_string(&mut self.updated_at, buf)?;
4540            }
4541            _ => {
4542                self.__buffa_unknown_fields
4543                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4544            }
4545        }
4546        ::core::result::Result::Ok(())
4547    }
4548    fn clear(&mut self) {
4549        self.name.clear();
4550        self.namespace.clear();
4551        self.node_id.clear();
4552        self.r#type = ::buffa::EnumValue::from(0);
4553        self.updated_at.clear();
4554        self.__buffa_unknown_fields.clear();
4555    }
4556}
4557impl ::buffa::ExtensionSet for SearchResult {
4558    const PROTO_FQN: &'static str = "headwaters.read.v1.SearchResult";
4559    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4560        &self.__buffa_unknown_fields
4561    }
4562    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4563        &mut self.__buffa_unknown_fields
4564    }
4565}
4566impl ::buffa::json_helpers::ProtoElemJson for SearchResult {
4567    fn serialize_proto_json<S: ::serde::Serializer>(
4568        v: &Self,
4569        s: S,
4570    ) -> ::core::result::Result<S::Ok, S::Error> {
4571        ::serde::Serialize::serialize(v, s)
4572    }
4573    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4574        d: D,
4575    ) -> ::core::result::Result<Self, D::Error> {
4576        <Self as ::serde::Deserialize>::deserialize(d)
4577    }
4578}
4579#[doc(hidden)]
4580pub const __SEARCH_RESULT_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4581    type_url: "type.googleapis.com/headwaters.read.v1.SearchResult",
4582    to_json: ::buffa::type_registry::any_to_json::<SearchResult>,
4583    from_json: ::buffa::type_registry::any_from_json::<SearchResult>,
4584    is_wkt: false,
4585};
4586#[derive(Clone, PartialEq, Default)]
4587#[derive(::serde::Serialize, ::serde::Deserialize)]
4588#[serde(default)]
4589pub struct SearchResponse {
4590    /// Field 1: `total_count`
4591    #[serde(
4592        rename = "totalCount",
4593        alias = "total_count",
4594        with = "::buffa::json_helpers::int32",
4595        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
4596    )]
4597    pub total_count: i32,
4598    /// Field 2: `results`
4599    #[serde(
4600        rename = "results",
4601        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
4602        deserialize_with = "::buffa::json_helpers::null_as_default"
4603    )]
4604    pub results: ::buffa::alloc::vec::Vec<SearchResult>,
4605    #[serde(skip)]
4606    #[doc(hidden)]
4607    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4608}
4609impl ::core::fmt::Debug for SearchResponse {
4610    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4611        f.debug_struct("SearchResponse")
4612            .field("total_count", &self.total_count)
4613            .field("results", &self.results)
4614            .finish()
4615    }
4616}
4617impl SearchResponse {
4618    /// Protobuf type URL for this message, for use with `Any::pack` and
4619    /// `Any::unpack_if`.
4620    ///
4621    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4622    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchResponse";
4623}
4624impl ::buffa::DefaultInstance for SearchResponse {
4625    fn default_instance() -> &'static Self {
4626        static VALUE: ::buffa::__private::OnceBox<SearchResponse> = ::buffa::__private::OnceBox::new();
4627        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4628    }
4629}
4630impl ::buffa::MessageName for SearchResponse {
4631    const PACKAGE: &'static str = "headwaters.read.v1";
4632    const NAME: &'static str = "SearchResponse";
4633    const FULL_NAME: &'static str = "headwaters.read.v1.SearchResponse";
4634    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchResponse";
4635}
4636impl ::buffa::Message for SearchResponse {
4637    /// Returns the total encoded size in bytes.
4638    ///
4639    /// The result is a `u32`; the protobuf specification requires all
4640    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4641    /// compliant message will never overflow this type.
4642    #[allow(clippy::let_and_return)]
4643    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4644        #[allow(unused_imports)]
4645        use ::buffa::Enumeration as _;
4646        let mut size = 0u32;
4647        if self.total_count != 0i32 {
4648            size += 1u32 + ::buffa::types::int32_encoded_len(self.total_count) as u32;
4649        }
4650        for v in &self.results {
4651            let __slot = __cache.reserve();
4652            let inner_size = v.compute_size(__cache);
4653            __cache.set(__slot, inner_size);
4654            size
4655                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4656                    + inner_size;
4657        }
4658        size += self.__buffa_unknown_fields.encoded_len() as u32;
4659        size
4660    }
4661    fn write_to(
4662        &self,
4663        __cache: &mut ::buffa::SizeCache,
4664        buf: &mut impl ::buffa::bytes::BufMut,
4665    ) {
4666        #[allow(unused_imports)]
4667        use ::buffa::Enumeration as _;
4668        if self.total_count != 0i32 {
4669            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
4670                .encode(buf);
4671            ::buffa::types::encode_int32(self.total_count, buf);
4672        }
4673        for v in &self.results {
4674            ::buffa::encoding::Tag::new(
4675                    2u32,
4676                    ::buffa::encoding::WireType::LengthDelimited,
4677                )
4678                .encode(buf);
4679            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4680            v.write_to(__cache, buf);
4681        }
4682        self.__buffa_unknown_fields.write_to(buf);
4683    }
4684    fn merge_field(
4685        &mut self,
4686        tag: ::buffa::encoding::Tag,
4687        buf: &mut impl ::buffa::bytes::Buf,
4688        depth: u32,
4689    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4690        #[allow(unused_imports)]
4691        use ::buffa::bytes::Buf as _;
4692        #[allow(unused_imports)]
4693        use ::buffa::Enumeration as _;
4694        match tag.field_number() {
4695            1u32 => {
4696                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4697                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4698                        field_number: 1u32,
4699                        expected: 0u8,
4700                        actual: tag.wire_type() as u8,
4701                    });
4702                }
4703                self.total_count = ::buffa::types::decode_int32(buf)?;
4704            }
4705            2u32 => {
4706                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4707                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4708                        field_number: 2u32,
4709                        expected: 2u8,
4710                        actual: tag.wire_type() as u8,
4711                    });
4712                }
4713                let mut elem = ::core::default::Default::default();
4714                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4715                self.results.push(elem);
4716            }
4717            _ => {
4718                self.__buffa_unknown_fields
4719                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4720            }
4721        }
4722        ::core::result::Result::Ok(())
4723    }
4724    fn clear(&mut self) {
4725        self.total_count = 0i32;
4726        self.results.clear();
4727        self.__buffa_unknown_fields.clear();
4728    }
4729}
4730impl ::buffa::ExtensionSet for SearchResponse {
4731    const PROTO_FQN: &'static str = "headwaters.read.v1.SearchResponse";
4732    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4733        &self.__buffa_unknown_fields
4734    }
4735    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4736        &mut self.__buffa_unknown_fields
4737    }
4738}
4739impl ::buffa::json_helpers::ProtoElemJson for SearchResponse {
4740    fn serialize_proto_json<S: ::serde::Serializer>(
4741        v: &Self,
4742        s: S,
4743    ) -> ::core::result::Result<S::Ok, S::Error> {
4744        ::serde::Serialize::serialize(v, s)
4745    }
4746    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4747        d: D,
4748    ) -> ::core::result::Result<Self, D::Error> {
4749        <Self as ::serde::Deserialize>::deserialize(d)
4750    }
4751}
4752#[doc(hidden)]
4753pub const __SEARCH_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4754    type_url: "type.googleapis.com/headwaters.read.v1.SearchResponse",
4755    to_json: ::buffa::type_registry::any_to_json::<SearchResponse>,
4756    from_json: ::buffa::type_registry::any_from_json::<SearchResponse>,
4757    is_wkt: false,
4758};
4759/// --- events feed ---
4760///
4761/// The raw OpenLineage events feed, newest first.
4762#[derive(Clone, PartialEq, Default)]
4763#[derive(::serde::Serialize, ::serde::Deserialize)]
4764#[serde(default)]
4765pub struct ListEventsResponse {
4766    /// Each entry is one OpenLineage event, as the original ingested JSON.
4767    ///
4768    /// Field 1: `events`
4769    #[serde(
4770        rename = "events",
4771        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
4772        deserialize_with = "::buffa::json_helpers::null_as_default"
4773    )]
4774    pub events: ::buffa::alloc::vec::Vec<::buffa_types::google::protobuf::Struct>,
4775    /// Field 2: `total_count`
4776    #[serde(
4777        rename = "totalCount",
4778        alias = "total_count",
4779        with = "::buffa::json_helpers::int32",
4780        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
4781    )]
4782    pub total_count: i32,
4783    #[serde(skip)]
4784    #[doc(hidden)]
4785    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4786}
4787impl ::core::fmt::Debug for ListEventsResponse {
4788    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4789        f.debug_struct("ListEventsResponse")
4790            .field("events", &self.events)
4791            .field("total_count", &self.total_count)
4792            .finish()
4793    }
4794}
4795impl ListEventsResponse {
4796    /// Protobuf type URL for this message, for use with `Any::pack` and
4797    /// `Any::unpack_if`.
4798    ///
4799    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4800    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListEventsResponse";
4801}
4802impl ::buffa::DefaultInstance for ListEventsResponse {
4803    fn default_instance() -> &'static Self {
4804        static VALUE: ::buffa::__private::OnceBox<ListEventsResponse> = ::buffa::__private::OnceBox::new();
4805        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4806    }
4807}
4808impl ::buffa::MessageName for ListEventsResponse {
4809    const PACKAGE: &'static str = "headwaters.read.v1";
4810    const NAME: &'static str = "ListEventsResponse";
4811    const FULL_NAME: &'static str = "headwaters.read.v1.ListEventsResponse";
4812    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListEventsResponse";
4813}
4814impl ::buffa::Message for ListEventsResponse {
4815    /// Returns the total encoded size in bytes.
4816    ///
4817    /// The result is a `u32`; the protobuf specification requires all
4818    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4819    /// compliant message will never overflow this type.
4820    #[allow(clippy::let_and_return)]
4821    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4822        #[allow(unused_imports)]
4823        use ::buffa::Enumeration as _;
4824        let mut size = 0u32;
4825        for v in &self.events {
4826            let __slot = __cache.reserve();
4827            let inner_size = v.compute_size(__cache);
4828            __cache.set(__slot, inner_size);
4829            size
4830                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4831                    + inner_size;
4832        }
4833        if self.total_count != 0i32 {
4834            size += 1u32 + ::buffa::types::int32_encoded_len(self.total_count) as u32;
4835        }
4836        size += self.__buffa_unknown_fields.encoded_len() as u32;
4837        size
4838    }
4839    fn write_to(
4840        &self,
4841        __cache: &mut ::buffa::SizeCache,
4842        buf: &mut impl ::buffa::bytes::BufMut,
4843    ) {
4844        #[allow(unused_imports)]
4845        use ::buffa::Enumeration as _;
4846        for v in &self.events {
4847            ::buffa::encoding::Tag::new(
4848                    1u32,
4849                    ::buffa::encoding::WireType::LengthDelimited,
4850                )
4851                .encode(buf);
4852            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4853            v.write_to(__cache, buf);
4854        }
4855        if self.total_count != 0i32 {
4856            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
4857                .encode(buf);
4858            ::buffa::types::encode_int32(self.total_count, buf);
4859        }
4860        self.__buffa_unknown_fields.write_to(buf);
4861    }
4862    fn merge_field(
4863        &mut self,
4864        tag: ::buffa::encoding::Tag,
4865        buf: &mut impl ::buffa::bytes::Buf,
4866        depth: u32,
4867    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4868        #[allow(unused_imports)]
4869        use ::buffa::bytes::Buf as _;
4870        #[allow(unused_imports)]
4871        use ::buffa::Enumeration as _;
4872        match tag.field_number() {
4873            1u32 => {
4874                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4875                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4876                        field_number: 1u32,
4877                        expected: 2u8,
4878                        actual: tag.wire_type() as u8,
4879                    });
4880                }
4881                let mut elem = ::core::default::Default::default();
4882                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4883                self.events.push(elem);
4884            }
4885            2u32 => {
4886                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4887                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4888                        field_number: 2u32,
4889                        expected: 0u8,
4890                        actual: tag.wire_type() as u8,
4891                    });
4892                }
4893                self.total_count = ::buffa::types::decode_int32(buf)?;
4894            }
4895            _ => {
4896                self.__buffa_unknown_fields
4897                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4898            }
4899        }
4900        ::core::result::Result::Ok(())
4901    }
4902    fn clear(&mut self) {
4903        self.events.clear();
4904        self.total_count = 0i32;
4905        self.__buffa_unknown_fields.clear();
4906    }
4907}
4908impl ::buffa::ExtensionSet for ListEventsResponse {
4909    const PROTO_FQN: &'static str = "headwaters.read.v1.ListEventsResponse";
4910    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4911        &self.__buffa_unknown_fields
4912    }
4913    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4914        &mut self.__buffa_unknown_fields
4915    }
4916}
4917impl ::buffa::json_helpers::ProtoElemJson for ListEventsResponse {
4918    fn serialize_proto_json<S: ::serde::Serializer>(
4919        v: &Self,
4920        s: S,
4921    ) -> ::core::result::Result<S::Ok, S::Error> {
4922        ::serde::Serialize::serialize(v, s)
4923    }
4924    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4925        d: D,
4926    ) -> ::core::result::Result<Self, D::Error> {
4927        <Self as ::serde::Deserialize>::deserialize(d)
4928    }
4929}
4930#[doc(hidden)]
4931pub const __LIST_EVENTS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4932    type_url: "type.googleapis.com/headwaters.read.v1.ListEventsResponse",
4933    to_json: ::buffa::type_registry::any_to_json::<ListEventsResponse>,
4934    from_json: ::buffa::type_registry::any_from_json::<ListEventsResponse>,
4935    is_wkt: false,
4936};
4937/// --- run facets ---
4938///
4939/// The merged facets observed across all of a run's events. Returned by
4940/// `GetRunFacets`.
4941#[derive(Clone, PartialEq, Default)]
4942#[derive(::serde::Serialize, ::serde::Deserialize)]
4943#[serde(default)]
4944pub struct RunFacetsResponse {
4945    /// Field 1: `run_id`
4946    #[serde(
4947        rename = "runId",
4948        alias = "run_id",
4949        with = "::buffa::json_helpers::proto_string",
4950        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4951    )]
4952    pub run_id: ::buffa::alloc::string::String,
4953    /// Run facets keyed by facet name (e.g. `nominalTime`, `parent`,
4954    /// `errorMessage`); each carries `_producer` / `_schemaURL`.
4955    ///
4956    /// Field 2: `facets`
4957    #[serde(
4958        rename = "facets",
4959        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4960    )]
4961    pub facets: ::buffa::MessageField<::buffa_types::google::protobuf::Struct>,
4962    #[serde(skip)]
4963    #[doc(hidden)]
4964    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4965}
4966impl ::core::fmt::Debug for RunFacetsResponse {
4967    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4968        f.debug_struct("RunFacetsResponse")
4969            .field("run_id", &self.run_id)
4970            .field("facets", &self.facets)
4971            .finish()
4972    }
4973}
4974impl RunFacetsResponse {
4975    /// Protobuf type URL for this message, for use with `Any::pack` and
4976    /// `Any::unpack_if`.
4977    ///
4978    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4979    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.RunFacetsResponse";
4980}
4981impl ::buffa::DefaultInstance for RunFacetsResponse {
4982    fn default_instance() -> &'static Self {
4983        static VALUE: ::buffa::__private::OnceBox<RunFacetsResponse> = ::buffa::__private::OnceBox::new();
4984        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4985    }
4986}
4987impl ::buffa::MessageName for RunFacetsResponse {
4988    const PACKAGE: &'static str = "headwaters.read.v1";
4989    const NAME: &'static str = "RunFacetsResponse";
4990    const FULL_NAME: &'static str = "headwaters.read.v1.RunFacetsResponse";
4991    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.RunFacetsResponse";
4992}
4993impl ::buffa::Message for RunFacetsResponse {
4994    /// Returns the total encoded size in bytes.
4995    ///
4996    /// The result is a `u32`; the protobuf specification requires all
4997    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4998    /// compliant message will never overflow this type.
4999    #[allow(clippy::let_and_return)]
5000    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5001        #[allow(unused_imports)]
5002        use ::buffa::Enumeration as _;
5003        let mut size = 0u32;
5004        if !self.run_id.is_empty() {
5005            size += 1u32 + ::buffa::types::string_encoded_len(&self.run_id) as u32;
5006        }
5007        if self.facets.is_set() {
5008            let __slot = __cache.reserve();
5009            let inner_size = self.facets.compute_size(__cache);
5010            __cache.set(__slot, inner_size);
5011            size
5012                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5013                    + inner_size;
5014        }
5015        size += self.__buffa_unknown_fields.encoded_len() as u32;
5016        size
5017    }
5018    fn write_to(
5019        &self,
5020        __cache: &mut ::buffa::SizeCache,
5021        buf: &mut impl ::buffa::bytes::BufMut,
5022    ) {
5023        #[allow(unused_imports)]
5024        use ::buffa::Enumeration as _;
5025        if !self.run_id.is_empty() {
5026            ::buffa::encoding::Tag::new(
5027                    1u32,
5028                    ::buffa::encoding::WireType::LengthDelimited,
5029                )
5030                .encode(buf);
5031            ::buffa::types::encode_string(&self.run_id, buf);
5032        }
5033        if self.facets.is_set() {
5034            ::buffa::encoding::Tag::new(
5035                    2u32,
5036                    ::buffa::encoding::WireType::LengthDelimited,
5037                )
5038                .encode(buf);
5039            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5040            self.facets.write_to(__cache, buf);
5041        }
5042        self.__buffa_unknown_fields.write_to(buf);
5043    }
5044    fn merge_field(
5045        &mut self,
5046        tag: ::buffa::encoding::Tag,
5047        buf: &mut impl ::buffa::bytes::Buf,
5048        depth: u32,
5049    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5050        #[allow(unused_imports)]
5051        use ::buffa::bytes::Buf as _;
5052        #[allow(unused_imports)]
5053        use ::buffa::Enumeration as _;
5054        match tag.field_number() {
5055            1u32 => {
5056                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5057                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5058                        field_number: 1u32,
5059                        expected: 2u8,
5060                        actual: tag.wire_type() as u8,
5061                    });
5062                }
5063                ::buffa::types::merge_string(&mut self.run_id, buf)?;
5064            }
5065            2u32 => {
5066                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5067                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5068                        field_number: 2u32,
5069                        expected: 2u8,
5070                        actual: tag.wire_type() as u8,
5071                    });
5072                }
5073                ::buffa::Message::merge_length_delimited(
5074                    self.facets.get_or_insert_default(),
5075                    buf,
5076                    depth,
5077                )?;
5078            }
5079            _ => {
5080                self.__buffa_unknown_fields
5081                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5082            }
5083        }
5084        ::core::result::Result::Ok(())
5085    }
5086    fn clear(&mut self) {
5087        self.run_id.clear();
5088        self.facets = ::buffa::MessageField::none();
5089        self.__buffa_unknown_fields.clear();
5090    }
5091}
5092impl ::buffa::ExtensionSet for RunFacetsResponse {
5093    const PROTO_FQN: &'static str = "headwaters.read.v1.RunFacetsResponse";
5094    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5095        &self.__buffa_unknown_fields
5096    }
5097    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5098        &mut self.__buffa_unknown_fields
5099    }
5100}
5101impl ::buffa::json_helpers::ProtoElemJson for RunFacetsResponse {
5102    fn serialize_proto_json<S: ::serde::Serializer>(
5103        v: &Self,
5104        s: S,
5105    ) -> ::core::result::Result<S::Ok, S::Error> {
5106        ::serde::Serialize::serialize(v, s)
5107    }
5108    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5109        d: D,
5110    ) -> ::core::result::Result<Self, D::Error> {
5111        <Self as ::serde::Deserialize>::deserialize(d)
5112    }
5113}
5114#[doc(hidden)]
5115pub const __RUN_FACETS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5116    type_url: "type.googleapis.com/headwaters.read.v1.RunFacetsResponse",
5117    to_json: ::buffa::type_registry::any_to_json::<RunFacetsResponse>,
5118    from_json: ::buffa::type_registry::any_from_json::<RunFacetsResponse>,
5119    is_wkt: false,
5120};
5121/// --- lineage / column-lineage graph ---
5122///
5123/// A directed edge `origin → destination`, where each endpoint is a nodeId. Data
5124/// flows from `origin` to `destination`.
5125#[derive(Clone, PartialEq, Default)]
5126#[derive(::serde::Serialize, ::serde::Deserialize)]
5127#[serde(default)]
5128pub struct LineageEdge {
5129    /// Field 1: `origin`
5130    #[serde(
5131        rename = "origin",
5132        with = "::buffa::json_helpers::proto_string",
5133        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5134    )]
5135    pub origin: ::buffa::alloc::string::String,
5136    /// Field 2: `destination`
5137    #[serde(
5138        rename = "destination",
5139        with = "::buffa::json_helpers::proto_string",
5140        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5141    )]
5142    pub destination: ::buffa::alloc::string::String,
5143    #[serde(skip)]
5144    #[doc(hidden)]
5145    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5146}
5147impl ::core::fmt::Debug for LineageEdge {
5148    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5149        f.debug_struct("LineageEdge")
5150            .field("origin", &self.origin)
5151            .field("destination", &self.destination)
5152            .finish()
5153    }
5154}
5155impl LineageEdge {
5156    /// Protobuf type URL for this message, for use with `Any::pack` and
5157    /// `Any::unpack_if`.
5158    ///
5159    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5160    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageEdge";
5161}
5162impl ::buffa::DefaultInstance for LineageEdge {
5163    fn default_instance() -> &'static Self {
5164        static VALUE: ::buffa::__private::OnceBox<LineageEdge> = ::buffa::__private::OnceBox::new();
5165        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5166    }
5167}
5168impl ::buffa::MessageName for LineageEdge {
5169    const PACKAGE: &'static str = "headwaters.read.v1";
5170    const NAME: &'static str = "LineageEdge";
5171    const FULL_NAME: &'static str = "headwaters.read.v1.LineageEdge";
5172    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageEdge";
5173}
5174impl ::buffa::Message for LineageEdge {
5175    /// Returns the total encoded size in bytes.
5176    ///
5177    /// The result is a `u32`; the protobuf specification requires all
5178    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5179    /// compliant message will never overflow this type.
5180    #[allow(clippy::let_and_return)]
5181    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5182        #[allow(unused_imports)]
5183        use ::buffa::Enumeration as _;
5184        let mut size = 0u32;
5185        if !self.origin.is_empty() {
5186            size += 1u32 + ::buffa::types::string_encoded_len(&self.origin) as u32;
5187        }
5188        if !self.destination.is_empty() {
5189            size += 1u32 + ::buffa::types::string_encoded_len(&self.destination) as u32;
5190        }
5191        size += self.__buffa_unknown_fields.encoded_len() as u32;
5192        size
5193    }
5194    fn write_to(
5195        &self,
5196        _cache: &mut ::buffa::SizeCache,
5197        buf: &mut impl ::buffa::bytes::BufMut,
5198    ) {
5199        #[allow(unused_imports)]
5200        use ::buffa::Enumeration as _;
5201        if !self.origin.is_empty() {
5202            ::buffa::encoding::Tag::new(
5203                    1u32,
5204                    ::buffa::encoding::WireType::LengthDelimited,
5205                )
5206                .encode(buf);
5207            ::buffa::types::encode_string(&self.origin, buf);
5208        }
5209        if !self.destination.is_empty() {
5210            ::buffa::encoding::Tag::new(
5211                    2u32,
5212                    ::buffa::encoding::WireType::LengthDelimited,
5213                )
5214                .encode(buf);
5215            ::buffa::types::encode_string(&self.destination, buf);
5216        }
5217        self.__buffa_unknown_fields.write_to(buf);
5218    }
5219    fn merge_field(
5220        &mut self,
5221        tag: ::buffa::encoding::Tag,
5222        buf: &mut impl ::buffa::bytes::Buf,
5223        depth: u32,
5224    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5225        #[allow(unused_imports)]
5226        use ::buffa::bytes::Buf as _;
5227        #[allow(unused_imports)]
5228        use ::buffa::Enumeration as _;
5229        match tag.field_number() {
5230            1u32 => {
5231                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5232                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5233                        field_number: 1u32,
5234                        expected: 2u8,
5235                        actual: tag.wire_type() as u8,
5236                    });
5237                }
5238                ::buffa::types::merge_string(&mut self.origin, buf)?;
5239            }
5240            2u32 => {
5241                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5242                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5243                        field_number: 2u32,
5244                        expected: 2u8,
5245                        actual: tag.wire_type() as u8,
5246                    });
5247                }
5248                ::buffa::types::merge_string(&mut self.destination, buf)?;
5249            }
5250            _ => {
5251                self.__buffa_unknown_fields
5252                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5253            }
5254        }
5255        ::core::result::Result::Ok(())
5256    }
5257    fn clear(&mut self) {
5258        self.origin.clear();
5259        self.destination.clear();
5260        self.__buffa_unknown_fields.clear();
5261    }
5262}
5263impl ::buffa::ExtensionSet for LineageEdge {
5264    const PROTO_FQN: &'static str = "headwaters.read.v1.LineageEdge";
5265    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5266        &self.__buffa_unknown_fields
5267    }
5268    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5269        &mut self.__buffa_unknown_fields
5270    }
5271}
5272impl ::buffa::json_helpers::ProtoElemJson for LineageEdge {
5273    fn serialize_proto_json<S: ::serde::Serializer>(
5274        v: &Self,
5275        s: S,
5276    ) -> ::core::result::Result<S::Ok, S::Error> {
5277        ::serde::Serialize::serialize(v, s)
5278    }
5279    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5280        d: D,
5281    ) -> ::core::result::Result<Self, D::Error> {
5282        <Self as ::serde::Deserialize>::deserialize(d)
5283    }
5284}
5285#[doc(hidden)]
5286pub const __LINEAGE_EDGE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5287    type_url: "type.googleapis.com/headwaters.read.v1.LineageEdge",
5288    to_json: ::buffa::type_registry::any_to_json::<LineageEdge>,
5289    from_json: ::buffa::type_registry::any_from_json::<LineageEdge>,
5290    is_wkt: false,
5291};
5292/// One node in a lineage graph, addressed by its nodeId (`id`). `in_edges` /
5293/// `out_edges` list the edges incident to this node (upstream and downstream
5294/// respectively); follow them across nodes to walk the graph.
5295#[derive(Clone, PartialEq, Default)]
5296#[derive(::serde::Serialize, ::serde::Deserialize)]
5297#[serde(default)]
5298pub struct LineageNode {
5299    /// The nodeId: `job:<ns>:<name>`, `dataset:<ns>:<name>`, or
5300    /// `datasetField:<ns>:<name>:<field>`.
5301    ///
5302    /// Field 1: `id`
5303    #[serde(
5304        rename = "id",
5305        with = "::buffa::json_helpers::proto_string",
5306        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5307    )]
5308    pub id: ::buffa::alloc::string::String,
5309    /// `JOB` / `DATASET` for `GetLineage`; `DATASET_FIELD` for `GetColumnLineage`.
5310    ///
5311    /// Field 2: `type`
5312    #[serde(
5313        rename = "type",
5314        with = "::buffa::json_helpers::proto_enum",
5315        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5316    )]
5317    pub r#type: ::buffa::EnumValue<EntityKind>,
5318    /// The full `JobDetail` or `Dataset` for this node, as JSON.
5319    ///
5320    /// Field 3: `data`
5321    #[serde(
5322        rename = "data",
5323        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5324    )]
5325    pub data: ::buffa::MessageField<::buffa_types::google::protobuf::Struct>,
5326    /// Field 4: `in_edges`
5327    #[serde(
5328        rename = "inEdges",
5329        alias = "in_edges",
5330        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5331        deserialize_with = "::buffa::json_helpers::null_as_default"
5332    )]
5333    pub in_edges: ::buffa::alloc::vec::Vec<LineageEdge>,
5334    /// Field 5: `out_edges`
5335    #[serde(
5336        rename = "outEdges",
5337        alias = "out_edges",
5338        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5339        deserialize_with = "::buffa::json_helpers::null_as_default"
5340    )]
5341    pub out_edges: ::buffa::alloc::vec::Vec<LineageEdge>,
5342    #[serde(skip)]
5343    #[doc(hidden)]
5344    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5345}
5346impl ::core::fmt::Debug for LineageNode {
5347    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5348        f.debug_struct("LineageNode")
5349            .field("id", &self.id)
5350            .field("r#type", &self.r#type)
5351            .field("data", &self.data)
5352            .field("in_edges", &self.in_edges)
5353            .field("out_edges", &self.out_edges)
5354            .finish()
5355    }
5356}
5357impl LineageNode {
5358    /// Protobuf type URL for this message, for use with `Any::pack` and
5359    /// `Any::unpack_if`.
5360    ///
5361    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5362    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageNode";
5363}
5364impl ::buffa::DefaultInstance for LineageNode {
5365    fn default_instance() -> &'static Self {
5366        static VALUE: ::buffa::__private::OnceBox<LineageNode> = ::buffa::__private::OnceBox::new();
5367        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5368    }
5369}
5370impl ::buffa::MessageName for LineageNode {
5371    const PACKAGE: &'static str = "headwaters.read.v1";
5372    const NAME: &'static str = "LineageNode";
5373    const FULL_NAME: &'static str = "headwaters.read.v1.LineageNode";
5374    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageNode";
5375}
5376impl ::buffa::Message for LineageNode {
5377    /// Returns the total encoded size in bytes.
5378    ///
5379    /// The result is a `u32`; the protobuf specification requires all
5380    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5381    /// compliant message will never overflow this type.
5382    #[allow(clippy::let_and_return)]
5383    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5384        #[allow(unused_imports)]
5385        use ::buffa::Enumeration as _;
5386        let mut size = 0u32;
5387        if !self.id.is_empty() {
5388            size += 1u32 + ::buffa::types::string_encoded_len(&self.id) as u32;
5389        }
5390        {
5391            let val = self.r#type.to_i32();
5392            if val != 0 {
5393                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5394            }
5395        }
5396        if self.data.is_set() {
5397            let __slot = __cache.reserve();
5398            let inner_size = self.data.compute_size(__cache);
5399            __cache.set(__slot, inner_size);
5400            size
5401                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5402                    + inner_size;
5403        }
5404        for v in &self.in_edges {
5405            let __slot = __cache.reserve();
5406            let inner_size = v.compute_size(__cache);
5407            __cache.set(__slot, inner_size);
5408            size
5409                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5410                    + inner_size;
5411        }
5412        for v in &self.out_edges {
5413            let __slot = __cache.reserve();
5414            let inner_size = v.compute_size(__cache);
5415            __cache.set(__slot, inner_size);
5416            size
5417                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5418                    + inner_size;
5419        }
5420        size += self.__buffa_unknown_fields.encoded_len() as u32;
5421        size
5422    }
5423    fn write_to(
5424        &self,
5425        __cache: &mut ::buffa::SizeCache,
5426        buf: &mut impl ::buffa::bytes::BufMut,
5427    ) {
5428        #[allow(unused_imports)]
5429        use ::buffa::Enumeration as _;
5430        if !self.id.is_empty() {
5431            ::buffa::encoding::Tag::new(
5432                    1u32,
5433                    ::buffa::encoding::WireType::LengthDelimited,
5434                )
5435                .encode(buf);
5436            ::buffa::types::encode_string(&self.id, buf);
5437        }
5438        {
5439            let val = self.r#type.to_i32();
5440            if val != 0 {
5441                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
5442                    .encode(buf);
5443                ::buffa::types::encode_int32(val, buf);
5444            }
5445        }
5446        if self.data.is_set() {
5447            ::buffa::encoding::Tag::new(
5448                    3u32,
5449                    ::buffa::encoding::WireType::LengthDelimited,
5450                )
5451                .encode(buf);
5452            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5453            self.data.write_to(__cache, buf);
5454        }
5455        for v in &self.in_edges {
5456            ::buffa::encoding::Tag::new(
5457                    4u32,
5458                    ::buffa::encoding::WireType::LengthDelimited,
5459                )
5460                .encode(buf);
5461            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5462            v.write_to(__cache, buf);
5463        }
5464        for v in &self.out_edges {
5465            ::buffa::encoding::Tag::new(
5466                    5u32,
5467                    ::buffa::encoding::WireType::LengthDelimited,
5468                )
5469                .encode(buf);
5470            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5471            v.write_to(__cache, buf);
5472        }
5473        self.__buffa_unknown_fields.write_to(buf);
5474    }
5475    fn merge_field(
5476        &mut self,
5477        tag: ::buffa::encoding::Tag,
5478        buf: &mut impl ::buffa::bytes::Buf,
5479        depth: u32,
5480    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5481        #[allow(unused_imports)]
5482        use ::buffa::bytes::Buf as _;
5483        #[allow(unused_imports)]
5484        use ::buffa::Enumeration as _;
5485        match tag.field_number() {
5486            1u32 => {
5487                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5488                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5489                        field_number: 1u32,
5490                        expected: 2u8,
5491                        actual: tag.wire_type() as u8,
5492                    });
5493                }
5494                ::buffa::types::merge_string(&mut self.id, buf)?;
5495            }
5496            2u32 => {
5497                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5498                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5499                        field_number: 2u32,
5500                        expected: 0u8,
5501                        actual: tag.wire_type() as u8,
5502                    });
5503                }
5504                self.r#type = ::buffa::EnumValue::from(
5505                    ::buffa::types::decode_int32(buf)?,
5506                );
5507            }
5508            3u32 => {
5509                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5510                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5511                        field_number: 3u32,
5512                        expected: 2u8,
5513                        actual: tag.wire_type() as u8,
5514                    });
5515                }
5516                ::buffa::Message::merge_length_delimited(
5517                    self.data.get_or_insert_default(),
5518                    buf,
5519                    depth,
5520                )?;
5521            }
5522            4u32 => {
5523                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5524                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5525                        field_number: 4u32,
5526                        expected: 2u8,
5527                        actual: tag.wire_type() as u8,
5528                    });
5529                }
5530                let mut elem = ::core::default::Default::default();
5531                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
5532                self.in_edges.push(elem);
5533            }
5534            5u32 => {
5535                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5536                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5537                        field_number: 5u32,
5538                        expected: 2u8,
5539                        actual: tag.wire_type() as u8,
5540                    });
5541                }
5542                let mut elem = ::core::default::Default::default();
5543                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
5544                self.out_edges.push(elem);
5545            }
5546            _ => {
5547                self.__buffa_unknown_fields
5548                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5549            }
5550        }
5551        ::core::result::Result::Ok(())
5552    }
5553    fn clear(&mut self) {
5554        self.id.clear();
5555        self.r#type = ::buffa::EnumValue::from(0);
5556        self.data = ::buffa::MessageField::none();
5557        self.in_edges.clear();
5558        self.out_edges.clear();
5559        self.__buffa_unknown_fields.clear();
5560    }
5561}
5562impl ::buffa::ExtensionSet for LineageNode {
5563    const PROTO_FQN: &'static str = "headwaters.read.v1.LineageNode";
5564    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5565        &self.__buffa_unknown_fields
5566    }
5567    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5568        &mut self.__buffa_unknown_fields
5569    }
5570}
5571impl ::buffa::json_helpers::ProtoElemJson for LineageNode {
5572    fn serialize_proto_json<S: ::serde::Serializer>(
5573        v: &Self,
5574        s: S,
5575    ) -> ::core::result::Result<S::Ok, S::Error> {
5576        ::serde::Serialize::serialize(v, s)
5577    }
5578    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5579        d: D,
5580    ) -> ::core::result::Result<Self, D::Error> {
5581        <Self as ::serde::Deserialize>::deserialize(d)
5582    }
5583}
5584#[doc(hidden)]
5585pub const __LINEAGE_NODE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5586    type_url: "type.googleapis.com/headwaters.read.v1.LineageNode",
5587    to_json: ::buffa::type_registry::any_to_json::<LineageNode>,
5588    from_json: ::buffa::type_registry::any_from_json::<LineageNode>,
5589    is_wkt: false,
5590};
5591/// A lineage graph: the set of nodes reached from the requested seed, each
5592/// carrying its own incident edges. Returned by `GetLineage` and
5593/// `GetColumnLineage`.
5594#[derive(Clone, PartialEq, Default)]
5595#[derive(::serde::Serialize, ::serde::Deserialize)]
5596#[serde(default)]
5597pub struct LineageGraph {
5598    /// Field 1: `graph`
5599    #[serde(
5600        rename = "graph",
5601        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5602        deserialize_with = "::buffa::json_helpers::null_as_default"
5603    )]
5604    pub graph: ::buffa::alloc::vec::Vec<LineageNode>,
5605    #[serde(skip)]
5606    #[doc(hidden)]
5607    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5608}
5609impl ::core::fmt::Debug for LineageGraph {
5610    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5611        f.debug_struct("LineageGraph").field("graph", &self.graph).finish()
5612    }
5613}
5614impl LineageGraph {
5615    /// Protobuf type URL for this message, for use with `Any::pack` and
5616    /// `Any::unpack_if`.
5617    ///
5618    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5619    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageGraph";
5620}
5621impl ::buffa::DefaultInstance for LineageGraph {
5622    fn default_instance() -> &'static Self {
5623        static VALUE: ::buffa::__private::OnceBox<LineageGraph> = ::buffa::__private::OnceBox::new();
5624        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5625    }
5626}
5627impl ::buffa::MessageName for LineageGraph {
5628    const PACKAGE: &'static str = "headwaters.read.v1";
5629    const NAME: &'static str = "LineageGraph";
5630    const FULL_NAME: &'static str = "headwaters.read.v1.LineageGraph";
5631    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageGraph";
5632}
5633impl ::buffa::Message for LineageGraph {
5634    /// Returns the total encoded size in bytes.
5635    ///
5636    /// The result is a `u32`; the protobuf specification requires all
5637    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5638    /// compliant message will never overflow this type.
5639    #[allow(clippy::let_and_return)]
5640    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5641        #[allow(unused_imports)]
5642        use ::buffa::Enumeration as _;
5643        let mut size = 0u32;
5644        for v in &self.graph {
5645            let __slot = __cache.reserve();
5646            let inner_size = v.compute_size(__cache);
5647            __cache.set(__slot, inner_size);
5648            size
5649                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5650                    + inner_size;
5651        }
5652        size += self.__buffa_unknown_fields.encoded_len() as u32;
5653        size
5654    }
5655    fn write_to(
5656        &self,
5657        __cache: &mut ::buffa::SizeCache,
5658        buf: &mut impl ::buffa::bytes::BufMut,
5659    ) {
5660        #[allow(unused_imports)]
5661        use ::buffa::Enumeration as _;
5662        for v in &self.graph {
5663            ::buffa::encoding::Tag::new(
5664                    1u32,
5665                    ::buffa::encoding::WireType::LengthDelimited,
5666                )
5667                .encode(buf);
5668            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5669            v.write_to(__cache, buf);
5670        }
5671        self.__buffa_unknown_fields.write_to(buf);
5672    }
5673    fn merge_field(
5674        &mut self,
5675        tag: ::buffa::encoding::Tag,
5676        buf: &mut impl ::buffa::bytes::Buf,
5677        depth: u32,
5678    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5679        #[allow(unused_imports)]
5680        use ::buffa::bytes::Buf as _;
5681        #[allow(unused_imports)]
5682        use ::buffa::Enumeration as _;
5683        match tag.field_number() {
5684            1u32 => {
5685                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5686                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5687                        field_number: 1u32,
5688                        expected: 2u8,
5689                        actual: tag.wire_type() as u8,
5690                    });
5691                }
5692                let mut elem = ::core::default::Default::default();
5693                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
5694                self.graph.push(elem);
5695            }
5696            _ => {
5697                self.__buffa_unknown_fields
5698                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5699            }
5700        }
5701        ::core::result::Result::Ok(())
5702    }
5703    fn clear(&mut self) {
5704        self.graph.clear();
5705        self.__buffa_unknown_fields.clear();
5706    }
5707}
5708impl ::buffa::ExtensionSet for LineageGraph {
5709    const PROTO_FQN: &'static str = "headwaters.read.v1.LineageGraph";
5710    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5711        &self.__buffa_unknown_fields
5712    }
5713    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5714        &mut self.__buffa_unknown_fields
5715    }
5716}
5717impl ::buffa::json_helpers::ProtoElemJson for LineageGraph {
5718    fn serialize_proto_json<S: ::serde::Serializer>(
5719        v: &Self,
5720        s: S,
5721    ) -> ::core::result::Result<S::Ok, S::Error> {
5722        ::serde::Serialize::serialize(v, s)
5723    }
5724    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5725        d: D,
5726    ) -> ::core::result::Result<Self, D::Error> {
5727        <Self as ::serde::Deserialize>::deserialize(d)
5728    }
5729}
5730#[doc(hidden)]
5731pub const __LINEAGE_GRAPH_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5732    type_url: "type.googleapis.com/headwaters.read.v1.LineageGraph",
5733    to_json: ::buffa::type_registry::any_to_json::<LineageGraph>,
5734    from_json: ::buffa::type_registry::any_from_json::<LineageGraph>,
5735    is_wkt: false,
5736};
5737/// --- tags ---
5738///
5739/// A tag that can be attached to datasets and fields (e.g. `pii`, `gold`).
5740#[derive(Clone, PartialEq, Default)]
5741#[derive(::serde::Serialize, ::serde::Deserialize)]
5742#[serde(default)]
5743pub struct Tag {
5744    /// Field 1: `name`
5745    #[serde(
5746        rename = "name",
5747        with = "::buffa::json_helpers::proto_string",
5748        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5749    )]
5750    pub name: ::buffa::alloc::string::String,
5751    /// Field 2: `description`
5752    #[serde(
5753        rename = "description",
5754        with = "::buffa::json_helpers::proto_string",
5755        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5756    )]
5757    pub description: ::buffa::alloc::string::String,
5758    #[serde(skip)]
5759    #[doc(hidden)]
5760    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5761}
5762impl ::core::fmt::Debug for Tag {
5763    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5764        f.debug_struct("Tag")
5765            .field("name", &self.name)
5766            .field("description", &self.description)
5767            .finish()
5768    }
5769}
5770impl Tag {
5771    /// Protobuf type URL for this message, for use with `Any::pack` and
5772    /// `Any::unpack_if`.
5773    ///
5774    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5775    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Tag";
5776}
5777impl ::buffa::DefaultInstance for Tag {
5778    fn default_instance() -> &'static Self {
5779        static VALUE: ::buffa::__private::OnceBox<Tag> = ::buffa::__private::OnceBox::new();
5780        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5781    }
5782}
5783impl ::buffa::MessageName for Tag {
5784    const PACKAGE: &'static str = "headwaters.read.v1";
5785    const NAME: &'static str = "Tag";
5786    const FULL_NAME: &'static str = "headwaters.read.v1.Tag";
5787    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Tag";
5788}
5789impl ::buffa::Message for Tag {
5790    /// Returns the total encoded size in bytes.
5791    ///
5792    /// The result is a `u32`; the protobuf specification requires all
5793    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5794    /// compliant message will never overflow this type.
5795    #[allow(clippy::let_and_return)]
5796    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5797        #[allow(unused_imports)]
5798        use ::buffa::Enumeration as _;
5799        let mut size = 0u32;
5800        if !self.name.is_empty() {
5801            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
5802        }
5803        if !self.description.is_empty() {
5804            size += 1u32 + ::buffa::types::string_encoded_len(&self.description) as u32;
5805        }
5806        size += self.__buffa_unknown_fields.encoded_len() as u32;
5807        size
5808    }
5809    fn write_to(
5810        &self,
5811        _cache: &mut ::buffa::SizeCache,
5812        buf: &mut impl ::buffa::bytes::BufMut,
5813    ) {
5814        #[allow(unused_imports)]
5815        use ::buffa::Enumeration as _;
5816        if !self.name.is_empty() {
5817            ::buffa::encoding::Tag::new(
5818                    1u32,
5819                    ::buffa::encoding::WireType::LengthDelimited,
5820                )
5821                .encode(buf);
5822            ::buffa::types::encode_string(&self.name, buf);
5823        }
5824        if !self.description.is_empty() {
5825            ::buffa::encoding::Tag::new(
5826                    2u32,
5827                    ::buffa::encoding::WireType::LengthDelimited,
5828                )
5829                .encode(buf);
5830            ::buffa::types::encode_string(&self.description, buf);
5831        }
5832        self.__buffa_unknown_fields.write_to(buf);
5833    }
5834    fn merge_field(
5835        &mut self,
5836        tag: ::buffa::encoding::Tag,
5837        buf: &mut impl ::buffa::bytes::Buf,
5838        depth: u32,
5839    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5840        #[allow(unused_imports)]
5841        use ::buffa::bytes::Buf as _;
5842        #[allow(unused_imports)]
5843        use ::buffa::Enumeration as _;
5844        match tag.field_number() {
5845            1u32 => {
5846                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5847                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5848                        field_number: 1u32,
5849                        expected: 2u8,
5850                        actual: tag.wire_type() as u8,
5851                    });
5852                }
5853                ::buffa::types::merge_string(&mut self.name, buf)?;
5854            }
5855            2u32 => {
5856                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5857                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5858                        field_number: 2u32,
5859                        expected: 2u8,
5860                        actual: tag.wire_type() as u8,
5861                    });
5862                }
5863                ::buffa::types::merge_string(&mut self.description, buf)?;
5864            }
5865            _ => {
5866                self.__buffa_unknown_fields
5867                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5868            }
5869        }
5870        ::core::result::Result::Ok(())
5871    }
5872    fn clear(&mut self) {
5873        self.name.clear();
5874        self.description.clear();
5875        self.__buffa_unknown_fields.clear();
5876    }
5877}
5878impl ::buffa::ExtensionSet for Tag {
5879    const PROTO_FQN: &'static str = "headwaters.read.v1.Tag";
5880    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5881        &self.__buffa_unknown_fields
5882    }
5883    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5884        &mut self.__buffa_unknown_fields
5885    }
5886}
5887impl ::buffa::json_helpers::ProtoElemJson for Tag {
5888    fn serialize_proto_json<S: ::serde::Serializer>(
5889        v: &Self,
5890        s: S,
5891    ) -> ::core::result::Result<S::Ok, S::Error> {
5892        ::serde::Serialize::serialize(v, s)
5893    }
5894    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5895        d: D,
5896    ) -> ::core::result::Result<Self, D::Error> {
5897        <Self as ::serde::Deserialize>::deserialize(d)
5898    }
5899}
5900#[doc(hidden)]
5901pub const __TAG_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5902    type_url: "type.googleapis.com/headwaters.read.v1.Tag",
5903    to_json: ::buffa::type_registry::any_to_json::<Tag>,
5904    from_json: ::buffa::type_registry::any_from_json::<Tag>,
5905    is_wkt: false,
5906};
5907#[derive(Clone, PartialEq, Default)]
5908#[derive(::serde::Serialize, ::serde::Deserialize)]
5909#[serde(default)]
5910pub struct ListTagsResponse {
5911    /// Field 1: `tags`
5912    #[serde(
5913        rename = "tags",
5914        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5915        deserialize_with = "::buffa::json_helpers::null_as_default"
5916    )]
5917    pub tags: ::buffa::alloc::vec::Vec<Tag>,
5918    #[serde(skip)]
5919    #[doc(hidden)]
5920    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5921}
5922impl ::core::fmt::Debug for ListTagsResponse {
5923    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5924        f.debug_struct("ListTagsResponse").field("tags", &self.tags).finish()
5925    }
5926}
5927impl ListTagsResponse {
5928    /// Protobuf type URL for this message, for use with `Any::pack` and
5929    /// `Any::unpack_if`.
5930    ///
5931    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5932    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListTagsResponse";
5933}
5934impl ::buffa::DefaultInstance for ListTagsResponse {
5935    fn default_instance() -> &'static Self {
5936        static VALUE: ::buffa::__private::OnceBox<ListTagsResponse> = ::buffa::__private::OnceBox::new();
5937        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5938    }
5939}
5940impl ::buffa::MessageName for ListTagsResponse {
5941    const PACKAGE: &'static str = "headwaters.read.v1";
5942    const NAME: &'static str = "ListTagsResponse";
5943    const FULL_NAME: &'static str = "headwaters.read.v1.ListTagsResponse";
5944    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListTagsResponse";
5945}
5946impl ::buffa::Message for ListTagsResponse {
5947    /// Returns the total encoded size in bytes.
5948    ///
5949    /// The result is a `u32`; the protobuf specification requires all
5950    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5951    /// compliant message will never overflow this type.
5952    #[allow(clippy::let_and_return)]
5953    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5954        #[allow(unused_imports)]
5955        use ::buffa::Enumeration as _;
5956        let mut size = 0u32;
5957        for v in &self.tags {
5958            let __slot = __cache.reserve();
5959            let inner_size = v.compute_size(__cache);
5960            __cache.set(__slot, inner_size);
5961            size
5962                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5963                    + inner_size;
5964        }
5965        size += self.__buffa_unknown_fields.encoded_len() as u32;
5966        size
5967    }
5968    fn write_to(
5969        &self,
5970        __cache: &mut ::buffa::SizeCache,
5971        buf: &mut impl ::buffa::bytes::BufMut,
5972    ) {
5973        #[allow(unused_imports)]
5974        use ::buffa::Enumeration as _;
5975        for v in &self.tags {
5976            ::buffa::encoding::Tag::new(
5977                    1u32,
5978                    ::buffa::encoding::WireType::LengthDelimited,
5979                )
5980                .encode(buf);
5981            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5982            v.write_to(__cache, buf);
5983        }
5984        self.__buffa_unknown_fields.write_to(buf);
5985    }
5986    fn merge_field(
5987        &mut self,
5988        tag: ::buffa::encoding::Tag,
5989        buf: &mut impl ::buffa::bytes::Buf,
5990        depth: u32,
5991    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5992        #[allow(unused_imports)]
5993        use ::buffa::bytes::Buf as _;
5994        #[allow(unused_imports)]
5995        use ::buffa::Enumeration as _;
5996        match tag.field_number() {
5997            1u32 => {
5998                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5999                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6000                        field_number: 1u32,
6001                        expected: 2u8,
6002                        actual: tag.wire_type() as u8,
6003                    });
6004                }
6005                let mut elem = ::core::default::Default::default();
6006                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6007                self.tags.push(elem);
6008            }
6009            _ => {
6010                self.__buffa_unknown_fields
6011                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6012            }
6013        }
6014        ::core::result::Result::Ok(())
6015    }
6016    fn clear(&mut self) {
6017        self.tags.clear();
6018        self.__buffa_unknown_fields.clear();
6019    }
6020}
6021impl ::buffa::ExtensionSet for ListTagsResponse {
6022    const PROTO_FQN: &'static str = "headwaters.read.v1.ListTagsResponse";
6023    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6024        &self.__buffa_unknown_fields
6025    }
6026    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6027        &mut self.__buffa_unknown_fields
6028    }
6029}
6030impl ::buffa::json_helpers::ProtoElemJson for ListTagsResponse {
6031    fn serialize_proto_json<S: ::serde::Serializer>(
6032        v: &Self,
6033        s: S,
6034    ) -> ::core::result::Result<S::Ok, S::Error> {
6035        ::serde::Serialize::serialize(v, s)
6036    }
6037    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6038        d: D,
6039    ) -> ::core::result::Result<Self, D::Error> {
6040        <Self as ::serde::Deserialize>::deserialize(d)
6041    }
6042}
6043#[doc(hidden)]
6044pub const __LIST_TAGS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6045    type_url: "type.googleapis.com/headwaters.read.v1.ListTagsResponse",
6046    to_json: ::buffa::type_registry::any_to_json::<ListTagsResponse>,
6047    from_json: ::buffa::type_registry::any_from_json::<ListTagsResponse>,
6048    is_wkt: false,
6049};
6050/// A dataset field carrying a tag, directly or by propagation through column
6051/// lineage.
6052#[derive(Clone, PartialEq, Default)]
6053#[derive(::serde::Serialize, ::serde::Deserialize)]
6054#[serde(default)]
6055pub struct TaggedField {
6056    /// Field 1: `namespace`
6057    #[serde(
6058        rename = "namespace",
6059        with = "::buffa::json_helpers::proto_string",
6060        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6061    )]
6062    pub namespace: ::buffa::alloc::string::String,
6063    /// Field 2: `dataset`
6064    #[serde(
6065        rename = "dataset",
6066        with = "::buffa::json_helpers::proto_string",
6067        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6068    )]
6069    pub dataset: ::buffa::alloc::string::String,
6070    /// Field 3: `field`
6071    #[serde(
6072        rename = "field",
6073        with = "::buffa::json_helpers::proto_string",
6074        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6075    )]
6076    pub field: ::buffa::alloc::string::String,
6077    /// This field's `datasetField:<ns>:<dataset>:<field>` nodeId.
6078    ///
6079    /// Field 4: `node_id`
6080    #[serde(
6081        rename = "nodeId",
6082        alias = "node_id",
6083        with = "::buffa::json_helpers::proto_string",
6084        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6085    )]
6086    pub node_id: ::buffa::alloc::string::String,
6087    #[serde(skip)]
6088    #[doc(hidden)]
6089    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6090}
6091impl ::core::fmt::Debug for TaggedField {
6092    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6093        f.debug_struct("TaggedField")
6094            .field("namespace", &self.namespace)
6095            .field("dataset", &self.dataset)
6096            .field("field", &self.field)
6097            .field("node_id", &self.node_id)
6098            .finish()
6099    }
6100}
6101impl TaggedField {
6102    /// Protobuf type URL for this message, for use with `Any::pack` and
6103    /// `Any::unpack_if`.
6104    ///
6105    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6106    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.TaggedField";
6107}
6108impl ::buffa::DefaultInstance for TaggedField {
6109    fn default_instance() -> &'static Self {
6110        static VALUE: ::buffa::__private::OnceBox<TaggedField> = ::buffa::__private::OnceBox::new();
6111        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6112    }
6113}
6114impl ::buffa::MessageName for TaggedField {
6115    const PACKAGE: &'static str = "headwaters.read.v1";
6116    const NAME: &'static str = "TaggedField";
6117    const FULL_NAME: &'static str = "headwaters.read.v1.TaggedField";
6118    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.TaggedField";
6119}
6120impl ::buffa::Message for TaggedField {
6121    /// Returns the total encoded size in bytes.
6122    ///
6123    /// The result is a `u32`; the protobuf specification requires all
6124    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6125    /// compliant message will never overflow this type.
6126    #[allow(clippy::let_and_return)]
6127    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6128        #[allow(unused_imports)]
6129        use ::buffa::Enumeration as _;
6130        let mut size = 0u32;
6131        if !self.namespace.is_empty() {
6132            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
6133        }
6134        if !self.dataset.is_empty() {
6135            size += 1u32 + ::buffa::types::string_encoded_len(&self.dataset) as u32;
6136        }
6137        if !self.field.is_empty() {
6138            size += 1u32 + ::buffa::types::string_encoded_len(&self.field) as u32;
6139        }
6140        if !self.node_id.is_empty() {
6141            size += 1u32 + ::buffa::types::string_encoded_len(&self.node_id) as u32;
6142        }
6143        size += self.__buffa_unknown_fields.encoded_len() as u32;
6144        size
6145    }
6146    fn write_to(
6147        &self,
6148        _cache: &mut ::buffa::SizeCache,
6149        buf: &mut impl ::buffa::bytes::BufMut,
6150    ) {
6151        #[allow(unused_imports)]
6152        use ::buffa::Enumeration as _;
6153        if !self.namespace.is_empty() {
6154            ::buffa::encoding::Tag::new(
6155                    1u32,
6156                    ::buffa::encoding::WireType::LengthDelimited,
6157                )
6158                .encode(buf);
6159            ::buffa::types::encode_string(&self.namespace, buf);
6160        }
6161        if !self.dataset.is_empty() {
6162            ::buffa::encoding::Tag::new(
6163                    2u32,
6164                    ::buffa::encoding::WireType::LengthDelimited,
6165                )
6166                .encode(buf);
6167            ::buffa::types::encode_string(&self.dataset, buf);
6168        }
6169        if !self.field.is_empty() {
6170            ::buffa::encoding::Tag::new(
6171                    3u32,
6172                    ::buffa::encoding::WireType::LengthDelimited,
6173                )
6174                .encode(buf);
6175            ::buffa::types::encode_string(&self.field, buf);
6176        }
6177        if !self.node_id.is_empty() {
6178            ::buffa::encoding::Tag::new(
6179                    4u32,
6180                    ::buffa::encoding::WireType::LengthDelimited,
6181                )
6182                .encode(buf);
6183            ::buffa::types::encode_string(&self.node_id, buf);
6184        }
6185        self.__buffa_unknown_fields.write_to(buf);
6186    }
6187    fn merge_field(
6188        &mut self,
6189        tag: ::buffa::encoding::Tag,
6190        buf: &mut impl ::buffa::bytes::Buf,
6191        depth: u32,
6192    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6193        #[allow(unused_imports)]
6194        use ::buffa::bytes::Buf as _;
6195        #[allow(unused_imports)]
6196        use ::buffa::Enumeration as _;
6197        match tag.field_number() {
6198            1u32 => {
6199                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6200                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6201                        field_number: 1u32,
6202                        expected: 2u8,
6203                        actual: tag.wire_type() as u8,
6204                    });
6205                }
6206                ::buffa::types::merge_string(&mut self.namespace, buf)?;
6207            }
6208            2u32 => {
6209                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6210                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6211                        field_number: 2u32,
6212                        expected: 2u8,
6213                        actual: tag.wire_type() as u8,
6214                    });
6215                }
6216                ::buffa::types::merge_string(&mut self.dataset, buf)?;
6217            }
6218            3u32 => {
6219                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6220                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6221                        field_number: 3u32,
6222                        expected: 2u8,
6223                        actual: tag.wire_type() as u8,
6224                    });
6225                }
6226                ::buffa::types::merge_string(&mut self.field, buf)?;
6227            }
6228            4u32 => {
6229                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6230                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6231                        field_number: 4u32,
6232                        expected: 2u8,
6233                        actual: tag.wire_type() as u8,
6234                    });
6235                }
6236                ::buffa::types::merge_string(&mut self.node_id, buf)?;
6237            }
6238            _ => {
6239                self.__buffa_unknown_fields
6240                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6241            }
6242        }
6243        ::core::result::Result::Ok(())
6244    }
6245    fn clear(&mut self) {
6246        self.namespace.clear();
6247        self.dataset.clear();
6248        self.field.clear();
6249        self.node_id.clear();
6250        self.__buffa_unknown_fields.clear();
6251    }
6252}
6253impl ::buffa::ExtensionSet for TaggedField {
6254    const PROTO_FQN: &'static str = "headwaters.read.v1.TaggedField";
6255    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6256        &self.__buffa_unknown_fields
6257    }
6258    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6259        &mut self.__buffa_unknown_fields
6260    }
6261}
6262impl ::buffa::json_helpers::ProtoElemJson for TaggedField {
6263    fn serialize_proto_json<S: ::serde::Serializer>(
6264        v: &Self,
6265        s: S,
6266    ) -> ::core::result::Result<S::Ok, S::Error> {
6267        ::serde::Serialize::serialize(v, s)
6268    }
6269    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6270        d: D,
6271    ) -> ::core::result::Result<Self, D::Error> {
6272        <Self as ::serde::Deserialize>::deserialize(d)
6273    }
6274}
6275#[doc(hidden)]
6276pub const __TAGGED_FIELD_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6277    type_url: "type.googleapis.com/headwaters.read.v1.TaggedField",
6278    to_json: ::buffa::type_registry::any_to_json::<TaggedField>,
6279    from_json: ::buffa::type_registry::any_from_json::<TaggedField>,
6280    is_wkt: false,
6281};
6282/// Every field a tag reaches downstream through column lineage, including the
6283/// originally tagged fields. Returned by `GetTagDownstream`.
6284#[derive(Clone, PartialEq, Default)]
6285#[derive(::serde::Serialize, ::serde::Deserialize)]
6286#[serde(default)]
6287pub struct TagPropagation {
6288    /// Field 1: `tag`
6289    #[serde(
6290        rename = "tag",
6291        with = "::buffa::json_helpers::proto_string",
6292        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6293    )]
6294    pub tag: ::buffa::alloc::string::String,
6295    /// Field 2: `fields`
6296    #[serde(
6297        rename = "fields",
6298        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
6299        deserialize_with = "::buffa::json_helpers::null_as_default"
6300    )]
6301    pub fields: ::buffa::alloc::vec::Vec<TaggedField>,
6302    #[serde(skip)]
6303    #[doc(hidden)]
6304    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6305}
6306impl ::core::fmt::Debug for TagPropagation {
6307    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6308        f.debug_struct("TagPropagation")
6309            .field("tag", &self.tag)
6310            .field("fields", &self.fields)
6311            .finish()
6312    }
6313}
6314impl TagPropagation {
6315    /// Protobuf type URL for this message, for use with `Any::pack` and
6316    /// `Any::unpack_if`.
6317    ///
6318    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6319    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.TagPropagation";
6320}
6321impl ::buffa::DefaultInstance for TagPropagation {
6322    fn default_instance() -> &'static Self {
6323        static VALUE: ::buffa::__private::OnceBox<TagPropagation> = ::buffa::__private::OnceBox::new();
6324        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6325    }
6326}
6327impl ::buffa::MessageName for TagPropagation {
6328    const PACKAGE: &'static str = "headwaters.read.v1";
6329    const NAME: &'static str = "TagPropagation";
6330    const FULL_NAME: &'static str = "headwaters.read.v1.TagPropagation";
6331    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.TagPropagation";
6332}
6333impl ::buffa::Message for TagPropagation {
6334    /// Returns the total encoded size in bytes.
6335    ///
6336    /// The result is a `u32`; the protobuf specification requires all
6337    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6338    /// compliant message will never overflow this type.
6339    #[allow(clippy::let_and_return)]
6340    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6341        #[allow(unused_imports)]
6342        use ::buffa::Enumeration as _;
6343        let mut size = 0u32;
6344        if !self.tag.is_empty() {
6345            size += 1u32 + ::buffa::types::string_encoded_len(&self.tag) as u32;
6346        }
6347        for v in &self.fields {
6348            let __slot = __cache.reserve();
6349            let inner_size = v.compute_size(__cache);
6350            __cache.set(__slot, inner_size);
6351            size
6352                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6353                    + inner_size;
6354        }
6355        size += self.__buffa_unknown_fields.encoded_len() as u32;
6356        size
6357    }
6358    fn write_to(
6359        &self,
6360        __cache: &mut ::buffa::SizeCache,
6361        buf: &mut impl ::buffa::bytes::BufMut,
6362    ) {
6363        #[allow(unused_imports)]
6364        use ::buffa::Enumeration as _;
6365        if !self.tag.is_empty() {
6366            ::buffa::encoding::Tag::new(
6367                    1u32,
6368                    ::buffa::encoding::WireType::LengthDelimited,
6369                )
6370                .encode(buf);
6371            ::buffa::types::encode_string(&self.tag, buf);
6372        }
6373        for v in &self.fields {
6374            ::buffa::encoding::Tag::new(
6375                    2u32,
6376                    ::buffa::encoding::WireType::LengthDelimited,
6377                )
6378                .encode(buf);
6379            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6380            v.write_to(__cache, buf);
6381        }
6382        self.__buffa_unknown_fields.write_to(buf);
6383    }
6384    fn merge_field(
6385        &mut self,
6386        tag: ::buffa::encoding::Tag,
6387        buf: &mut impl ::buffa::bytes::Buf,
6388        depth: u32,
6389    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6390        #[allow(unused_imports)]
6391        use ::buffa::bytes::Buf as _;
6392        #[allow(unused_imports)]
6393        use ::buffa::Enumeration as _;
6394        match tag.field_number() {
6395            1u32 => {
6396                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6397                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6398                        field_number: 1u32,
6399                        expected: 2u8,
6400                        actual: tag.wire_type() as u8,
6401                    });
6402                }
6403                ::buffa::types::merge_string(&mut self.tag, buf)?;
6404            }
6405            2u32 => {
6406                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6407                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6408                        field_number: 2u32,
6409                        expected: 2u8,
6410                        actual: tag.wire_type() as u8,
6411                    });
6412                }
6413                let mut elem = ::core::default::Default::default();
6414                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6415                self.fields.push(elem);
6416            }
6417            _ => {
6418                self.__buffa_unknown_fields
6419                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6420            }
6421        }
6422        ::core::result::Result::Ok(())
6423    }
6424    fn clear(&mut self) {
6425        self.tag.clear();
6426        self.fields.clear();
6427        self.__buffa_unknown_fields.clear();
6428    }
6429}
6430impl ::buffa::ExtensionSet for TagPropagation {
6431    const PROTO_FQN: &'static str = "headwaters.read.v1.TagPropagation";
6432    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6433        &self.__buffa_unknown_fields
6434    }
6435    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6436        &mut self.__buffa_unknown_fields
6437    }
6438}
6439impl ::buffa::json_helpers::ProtoElemJson for TagPropagation {
6440    fn serialize_proto_json<S: ::serde::Serializer>(
6441        v: &Self,
6442        s: S,
6443    ) -> ::core::result::Result<S::Ok, S::Error> {
6444        ::serde::Serialize::serialize(v, s)
6445    }
6446    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6447        d: D,
6448    ) -> ::core::result::Result<Self, D::Error> {
6449        <Self as ::serde::Deserialize>::deserialize(d)
6450    }
6451}
6452#[doc(hidden)]
6453pub const __TAG_PROPAGATION_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6454    type_url: "type.googleapis.com/headwaters.read.v1.TagPropagation",
6455    to_json: ::buffa::type_registry::any_to_json::<TagPropagation>,
6456    from_json: ::buffa::type_registry::any_from_json::<TagPropagation>,
6457    is_wkt: false,
6458};
6459/// --- stats ---
6460///
6461/// A count for one time bucket: `count` events/assets in the period starting at
6462/// `date`.
6463#[derive(Clone, PartialEq, Default)]
6464#[derive(::serde::Serialize, ::serde::Deserialize)]
6465#[serde(default)]
6466pub struct StatBucket {
6467    /// Bucket start as an RFC 3339 date/time.
6468    ///
6469    /// Field 1: `date`
6470    #[serde(
6471        rename = "date",
6472        with = "::buffa::json_helpers::proto_string",
6473        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6474    )]
6475    pub date: ::buffa::alloc::string::String,
6476    /// Field 2: `count`
6477    #[serde(
6478        rename = "count",
6479        with = "::buffa::json_helpers::int64",
6480        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i64"
6481    )]
6482    pub count: i64,
6483    #[serde(skip)]
6484    #[doc(hidden)]
6485    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6486}
6487impl ::core::fmt::Debug for StatBucket {
6488    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6489        f.debug_struct("StatBucket")
6490            .field("date", &self.date)
6491            .field("count", &self.count)
6492            .finish()
6493    }
6494}
6495impl StatBucket {
6496    /// Protobuf type URL for this message, for use with `Any::pack` and
6497    /// `Any::unpack_if`.
6498    ///
6499    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6500    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.StatBucket";
6501}
6502impl ::buffa::DefaultInstance for StatBucket {
6503    fn default_instance() -> &'static Self {
6504        static VALUE: ::buffa::__private::OnceBox<StatBucket> = ::buffa::__private::OnceBox::new();
6505        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6506    }
6507}
6508impl ::buffa::MessageName for StatBucket {
6509    const PACKAGE: &'static str = "headwaters.read.v1";
6510    const NAME: &'static str = "StatBucket";
6511    const FULL_NAME: &'static str = "headwaters.read.v1.StatBucket";
6512    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.StatBucket";
6513}
6514impl ::buffa::Message for StatBucket {
6515    /// Returns the total encoded size in bytes.
6516    ///
6517    /// The result is a `u32`; the protobuf specification requires all
6518    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6519    /// compliant message will never overflow this type.
6520    #[allow(clippy::let_and_return)]
6521    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6522        #[allow(unused_imports)]
6523        use ::buffa::Enumeration as _;
6524        let mut size = 0u32;
6525        if !self.date.is_empty() {
6526            size += 1u32 + ::buffa::types::string_encoded_len(&self.date) as u32;
6527        }
6528        if self.count != 0i64 {
6529            size += 1u32 + ::buffa::types::int64_encoded_len(self.count) as u32;
6530        }
6531        size += self.__buffa_unknown_fields.encoded_len() as u32;
6532        size
6533    }
6534    fn write_to(
6535        &self,
6536        _cache: &mut ::buffa::SizeCache,
6537        buf: &mut impl ::buffa::bytes::BufMut,
6538    ) {
6539        #[allow(unused_imports)]
6540        use ::buffa::Enumeration as _;
6541        if !self.date.is_empty() {
6542            ::buffa::encoding::Tag::new(
6543                    1u32,
6544                    ::buffa::encoding::WireType::LengthDelimited,
6545                )
6546                .encode(buf);
6547            ::buffa::types::encode_string(&self.date, buf);
6548        }
6549        if self.count != 0i64 {
6550            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
6551                .encode(buf);
6552            ::buffa::types::encode_int64(self.count, buf);
6553        }
6554        self.__buffa_unknown_fields.write_to(buf);
6555    }
6556    fn merge_field(
6557        &mut self,
6558        tag: ::buffa::encoding::Tag,
6559        buf: &mut impl ::buffa::bytes::Buf,
6560        depth: u32,
6561    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6562        #[allow(unused_imports)]
6563        use ::buffa::bytes::Buf as _;
6564        #[allow(unused_imports)]
6565        use ::buffa::Enumeration as _;
6566        match tag.field_number() {
6567            1u32 => {
6568                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6569                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6570                        field_number: 1u32,
6571                        expected: 2u8,
6572                        actual: tag.wire_type() as u8,
6573                    });
6574                }
6575                ::buffa::types::merge_string(&mut self.date, buf)?;
6576            }
6577            2u32 => {
6578                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6579                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6580                        field_number: 2u32,
6581                        expected: 0u8,
6582                        actual: tag.wire_type() as u8,
6583                    });
6584                }
6585                self.count = ::buffa::types::decode_int64(buf)?;
6586            }
6587            _ => {
6588                self.__buffa_unknown_fields
6589                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6590            }
6591        }
6592        ::core::result::Result::Ok(())
6593    }
6594    fn clear(&mut self) {
6595        self.date.clear();
6596        self.count = 0i64;
6597        self.__buffa_unknown_fields.clear();
6598    }
6599}
6600impl ::buffa::ExtensionSet for StatBucket {
6601    const PROTO_FQN: &'static str = "headwaters.read.v1.StatBucket";
6602    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6603        &self.__buffa_unknown_fields
6604    }
6605    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6606        &mut self.__buffa_unknown_fields
6607    }
6608}
6609impl ::buffa::json_helpers::ProtoElemJson for StatBucket {
6610    fn serialize_proto_json<S: ::serde::Serializer>(
6611        v: &Self,
6612        s: S,
6613    ) -> ::core::result::Result<S::Ok, S::Error> {
6614        ::serde::Serialize::serialize(v, s)
6615    }
6616    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6617        d: D,
6618    ) -> ::core::result::Result<Self, D::Error> {
6619        <Self as ::serde::Deserialize>::deserialize(d)
6620    }
6621}
6622#[doc(hidden)]
6623pub const __STAT_BUCKET_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6624    type_url: "type.googleapis.com/headwaters.read.v1.StatBucket",
6625    to_json: ::buffa::type_registry::any_to_json::<StatBucket>,
6626    from_json: ::buffa::type_registry::any_from_json::<StatBucket>,
6627    is_wkt: false,
6628};
6629/// A time series of `StatBucket`s. Returned by the stats endpoints; on the REST
6630/// surface it serializes as a bare JSON array.
6631#[derive(Clone, PartialEq, Default)]
6632#[derive(::serde::Serialize, ::serde::Deserialize)]
6633#[serde(default)]
6634pub struct StatsResponse {
6635    /// Field 1: `buckets`
6636    #[serde(
6637        rename = "buckets",
6638        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
6639        deserialize_with = "::buffa::json_helpers::null_as_default"
6640    )]
6641    pub buckets: ::buffa::alloc::vec::Vec<StatBucket>,
6642    #[serde(skip)]
6643    #[doc(hidden)]
6644    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6645}
6646impl ::core::fmt::Debug for StatsResponse {
6647    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6648        f.debug_struct("StatsResponse").field("buckets", &self.buckets).finish()
6649    }
6650}
6651impl StatsResponse {
6652    /// Protobuf type URL for this message, for use with `Any::pack` and
6653    /// `Any::unpack_if`.
6654    ///
6655    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6656    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.StatsResponse";
6657}
6658impl ::buffa::DefaultInstance for StatsResponse {
6659    fn default_instance() -> &'static Self {
6660        static VALUE: ::buffa::__private::OnceBox<StatsResponse> = ::buffa::__private::OnceBox::new();
6661        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6662    }
6663}
6664impl ::buffa::MessageName for StatsResponse {
6665    const PACKAGE: &'static str = "headwaters.read.v1";
6666    const NAME: &'static str = "StatsResponse";
6667    const FULL_NAME: &'static str = "headwaters.read.v1.StatsResponse";
6668    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.StatsResponse";
6669}
6670impl ::buffa::Message for StatsResponse {
6671    /// Returns the total encoded size in bytes.
6672    ///
6673    /// The result is a `u32`; the protobuf specification requires all
6674    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6675    /// compliant message will never overflow this type.
6676    #[allow(clippy::let_and_return)]
6677    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6678        #[allow(unused_imports)]
6679        use ::buffa::Enumeration as _;
6680        let mut size = 0u32;
6681        for v in &self.buckets {
6682            let __slot = __cache.reserve();
6683            let inner_size = v.compute_size(__cache);
6684            __cache.set(__slot, inner_size);
6685            size
6686                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6687                    + inner_size;
6688        }
6689        size += self.__buffa_unknown_fields.encoded_len() as u32;
6690        size
6691    }
6692    fn write_to(
6693        &self,
6694        __cache: &mut ::buffa::SizeCache,
6695        buf: &mut impl ::buffa::bytes::BufMut,
6696    ) {
6697        #[allow(unused_imports)]
6698        use ::buffa::Enumeration as _;
6699        for v in &self.buckets {
6700            ::buffa::encoding::Tag::new(
6701                    1u32,
6702                    ::buffa::encoding::WireType::LengthDelimited,
6703                )
6704                .encode(buf);
6705            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6706            v.write_to(__cache, buf);
6707        }
6708        self.__buffa_unknown_fields.write_to(buf);
6709    }
6710    fn merge_field(
6711        &mut self,
6712        tag: ::buffa::encoding::Tag,
6713        buf: &mut impl ::buffa::bytes::Buf,
6714        depth: u32,
6715    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6716        #[allow(unused_imports)]
6717        use ::buffa::bytes::Buf as _;
6718        #[allow(unused_imports)]
6719        use ::buffa::Enumeration as _;
6720        match tag.field_number() {
6721            1u32 => {
6722                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6723                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6724                        field_number: 1u32,
6725                        expected: 2u8,
6726                        actual: tag.wire_type() as u8,
6727                    });
6728                }
6729                let mut elem = ::core::default::Default::default();
6730                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6731                self.buckets.push(elem);
6732            }
6733            _ => {
6734                self.__buffa_unknown_fields
6735                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6736            }
6737        }
6738        ::core::result::Result::Ok(())
6739    }
6740    fn clear(&mut self) {
6741        self.buckets.clear();
6742        self.__buffa_unknown_fields.clear();
6743    }
6744}
6745impl ::buffa::ExtensionSet for StatsResponse {
6746    const PROTO_FQN: &'static str = "headwaters.read.v1.StatsResponse";
6747    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6748        &self.__buffa_unknown_fields
6749    }
6750    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6751        &mut self.__buffa_unknown_fields
6752    }
6753}
6754impl ::buffa::json_helpers::ProtoElemJson for StatsResponse {
6755    fn serialize_proto_json<S: ::serde::Serializer>(
6756        v: &Self,
6757        s: S,
6758    ) -> ::core::result::Result<S::Ok, S::Error> {
6759        ::serde::Serialize::serialize(v, s)
6760    }
6761    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6762        d: D,
6763    ) -> ::core::result::Result<Self, D::Error> {
6764        <Self as ::serde::Deserialize>::deserialize(d)
6765    }
6766}
6767#[doc(hidden)]
6768pub const __STATS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6769    type_url: "type.googleapis.com/headwaters.read.v1.StatsResponse",
6770    to_json: ::buffa::type_registry::any_to_json::<StatsResponse>,
6771    from_json: ::buffa::type_registry::any_from_json::<StatsResponse>,
6772    is_wkt: false,
6773};
6774/// --- request messages ---
6775///
6776/// On the list endpoints, an empty `namespace` means all namespaces, and `limit`
6777/// / `offset` page the results (`limit` defaults to a server-chosen page size, so
6778/// 0 is treated as unset). On the REST surface, non-path fields (`limit`,
6779/// `offset`, `q`, `nodeId`, `depth`, `period`, `type`) are query-string params
6780/// named by their camelCase JSON name.
6781#[derive(Clone, PartialEq, Default)]
6782#[derive(::serde::Serialize, ::serde::Deserialize)]
6783#[serde(default)]
6784pub struct ListNamespacesRequest {
6785    #[serde(skip)]
6786    #[doc(hidden)]
6787    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6788}
6789impl ::core::fmt::Debug for ListNamespacesRequest {
6790    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6791        f.debug_struct("ListNamespacesRequest").finish()
6792    }
6793}
6794impl ListNamespacesRequest {
6795    /// Protobuf type URL for this message, for use with `Any::pack` and
6796    /// `Any::unpack_if`.
6797    ///
6798    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6799    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListNamespacesRequest";
6800}
6801impl ::buffa::DefaultInstance for ListNamespacesRequest {
6802    fn default_instance() -> &'static Self {
6803        static VALUE: ::buffa::__private::OnceBox<ListNamespacesRequest> = ::buffa::__private::OnceBox::new();
6804        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6805    }
6806}
6807impl ::buffa::MessageName for ListNamespacesRequest {
6808    const PACKAGE: &'static str = "headwaters.read.v1";
6809    const NAME: &'static str = "ListNamespacesRequest";
6810    const FULL_NAME: &'static str = "headwaters.read.v1.ListNamespacesRequest";
6811    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListNamespacesRequest";
6812}
6813impl ::buffa::Message for ListNamespacesRequest {
6814    /// Returns the total encoded size in bytes.
6815    ///
6816    /// The result is a `u32`; the protobuf specification requires all
6817    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6818    /// compliant message will never overflow this type.
6819    #[allow(clippy::let_and_return)]
6820    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6821        #[allow(unused_imports)]
6822        use ::buffa::Enumeration as _;
6823        let mut size = 0u32;
6824        size += self.__buffa_unknown_fields.encoded_len() as u32;
6825        size
6826    }
6827    fn write_to(
6828        &self,
6829        _cache: &mut ::buffa::SizeCache,
6830        buf: &mut impl ::buffa::bytes::BufMut,
6831    ) {
6832        #[allow(unused_imports)]
6833        use ::buffa::Enumeration as _;
6834        self.__buffa_unknown_fields.write_to(buf);
6835    }
6836    fn merge_field(
6837        &mut self,
6838        tag: ::buffa::encoding::Tag,
6839        buf: &mut impl ::buffa::bytes::Buf,
6840        depth: u32,
6841    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6842        #[allow(unused_imports)]
6843        use ::buffa::bytes::Buf as _;
6844        #[allow(unused_imports)]
6845        use ::buffa::Enumeration as _;
6846        match tag.field_number() {
6847            _ => {
6848                self.__buffa_unknown_fields
6849                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6850            }
6851        }
6852        ::core::result::Result::Ok(())
6853    }
6854    fn clear(&mut self) {
6855        self.__buffa_unknown_fields.clear();
6856    }
6857}
6858impl ::buffa::ExtensionSet for ListNamespacesRequest {
6859    const PROTO_FQN: &'static str = "headwaters.read.v1.ListNamespacesRequest";
6860    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6861        &self.__buffa_unknown_fields
6862    }
6863    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6864        &mut self.__buffa_unknown_fields
6865    }
6866}
6867impl ::buffa::json_helpers::ProtoElemJson for ListNamespacesRequest {
6868    fn serialize_proto_json<S: ::serde::Serializer>(
6869        v: &Self,
6870        s: S,
6871    ) -> ::core::result::Result<S::Ok, S::Error> {
6872        ::serde::Serialize::serialize(v, s)
6873    }
6874    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6875        d: D,
6876    ) -> ::core::result::Result<Self, D::Error> {
6877        <Self as ::serde::Deserialize>::deserialize(d)
6878    }
6879}
6880#[doc(hidden)]
6881pub const __LIST_NAMESPACES_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6882    type_url: "type.googleapis.com/headwaters.read.v1.ListNamespacesRequest",
6883    to_json: ::buffa::type_registry::any_to_json::<ListNamespacesRequest>,
6884    from_json: ::buffa::type_registry::any_from_json::<ListNamespacesRequest>,
6885    is_wkt: false,
6886};
6887#[derive(Clone, PartialEq, Default)]
6888#[derive(::serde::Serialize, ::serde::Deserialize)]
6889#[serde(default)]
6890pub struct ListJobsRequest {
6891    /// Scope to this namespace; empty lists jobs across all namespaces.
6892    ///
6893    /// Field 1: `namespace`
6894    #[serde(
6895        rename = "namespace",
6896        with = "::buffa::json_helpers::proto_string",
6897        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6898    )]
6899    pub namespace: ::buffa::alloc::string::String,
6900    /// Field 2: `limit`
6901    #[serde(
6902        rename = "limit",
6903        with = "::buffa::json_helpers::int32",
6904        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
6905    )]
6906    pub limit: i32,
6907    /// Field 3: `offset`
6908    #[serde(
6909        rename = "offset",
6910        with = "::buffa::json_helpers::int32",
6911        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
6912    )]
6913    pub offset: i32,
6914    #[serde(skip)]
6915    #[doc(hidden)]
6916    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6917}
6918impl ::core::fmt::Debug for ListJobsRequest {
6919    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6920        f.debug_struct("ListJobsRequest")
6921            .field("namespace", &self.namespace)
6922            .field("limit", &self.limit)
6923            .field("offset", &self.offset)
6924            .finish()
6925    }
6926}
6927impl ListJobsRequest {
6928    /// Protobuf type URL for this message, for use with `Any::pack` and
6929    /// `Any::unpack_if`.
6930    ///
6931    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6932    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListJobsRequest";
6933}
6934impl ::buffa::DefaultInstance for ListJobsRequest {
6935    fn default_instance() -> &'static Self {
6936        static VALUE: ::buffa::__private::OnceBox<ListJobsRequest> = ::buffa::__private::OnceBox::new();
6937        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6938    }
6939}
6940impl ::buffa::MessageName for ListJobsRequest {
6941    const PACKAGE: &'static str = "headwaters.read.v1";
6942    const NAME: &'static str = "ListJobsRequest";
6943    const FULL_NAME: &'static str = "headwaters.read.v1.ListJobsRequest";
6944    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListJobsRequest";
6945}
6946impl ::buffa::Message for ListJobsRequest {
6947    /// Returns the total encoded size in bytes.
6948    ///
6949    /// The result is a `u32`; the protobuf specification requires all
6950    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6951    /// compliant message will never overflow this type.
6952    #[allow(clippy::let_and_return)]
6953    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6954        #[allow(unused_imports)]
6955        use ::buffa::Enumeration as _;
6956        let mut size = 0u32;
6957        if !self.namespace.is_empty() {
6958            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
6959        }
6960        if self.limit != 0i32 {
6961            size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
6962        }
6963        if self.offset != 0i32 {
6964            size += 1u32 + ::buffa::types::int32_encoded_len(self.offset) as u32;
6965        }
6966        size += self.__buffa_unknown_fields.encoded_len() as u32;
6967        size
6968    }
6969    fn write_to(
6970        &self,
6971        _cache: &mut ::buffa::SizeCache,
6972        buf: &mut impl ::buffa::bytes::BufMut,
6973    ) {
6974        #[allow(unused_imports)]
6975        use ::buffa::Enumeration as _;
6976        if !self.namespace.is_empty() {
6977            ::buffa::encoding::Tag::new(
6978                    1u32,
6979                    ::buffa::encoding::WireType::LengthDelimited,
6980                )
6981                .encode(buf);
6982            ::buffa::types::encode_string(&self.namespace, buf);
6983        }
6984        if self.limit != 0i32 {
6985            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
6986                .encode(buf);
6987            ::buffa::types::encode_int32(self.limit, buf);
6988        }
6989        if self.offset != 0i32 {
6990            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
6991                .encode(buf);
6992            ::buffa::types::encode_int32(self.offset, buf);
6993        }
6994        self.__buffa_unknown_fields.write_to(buf);
6995    }
6996    fn merge_field(
6997        &mut self,
6998        tag: ::buffa::encoding::Tag,
6999        buf: &mut impl ::buffa::bytes::Buf,
7000        depth: u32,
7001    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7002        #[allow(unused_imports)]
7003        use ::buffa::bytes::Buf as _;
7004        #[allow(unused_imports)]
7005        use ::buffa::Enumeration as _;
7006        match tag.field_number() {
7007            1u32 => {
7008                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7009                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7010                        field_number: 1u32,
7011                        expected: 2u8,
7012                        actual: tag.wire_type() as u8,
7013                    });
7014                }
7015                ::buffa::types::merge_string(&mut self.namespace, buf)?;
7016            }
7017            2u32 => {
7018                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7019                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7020                        field_number: 2u32,
7021                        expected: 0u8,
7022                        actual: tag.wire_type() as u8,
7023                    });
7024                }
7025                self.limit = ::buffa::types::decode_int32(buf)?;
7026            }
7027            3u32 => {
7028                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7029                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7030                        field_number: 3u32,
7031                        expected: 0u8,
7032                        actual: tag.wire_type() as u8,
7033                    });
7034                }
7035                self.offset = ::buffa::types::decode_int32(buf)?;
7036            }
7037            _ => {
7038                self.__buffa_unknown_fields
7039                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7040            }
7041        }
7042        ::core::result::Result::Ok(())
7043    }
7044    fn clear(&mut self) {
7045        self.namespace.clear();
7046        self.limit = 0i32;
7047        self.offset = 0i32;
7048        self.__buffa_unknown_fields.clear();
7049    }
7050}
7051impl ::buffa::ExtensionSet for ListJobsRequest {
7052    const PROTO_FQN: &'static str = "headwaters.read.v1.ListJobsRequest";
7053    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7054        &self.__buffa_unknown_fields
7055    }
7056    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7057        &mut self.__buffa_unknown_fields
7058    }
7059}
7060impl ::buffa::json_helpers::ProtoElemJson for ListJobsRequest {
7061    fn serialize_proto_json<S: ::serde::Serializer>(
7062        v: &Self,
7063        s: S,
7064    ) -> ::core::result::Result<S::Ok, S::Error> {
7065        ::serde::Serialize::serialize(v, s)
7066    }
7067    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7068        d: D,
7069    ) -> ::core::result::Result<Self, D::Error> {
7070        <Self as ::serde::Deserialize>::deserialize(d)
7071    }
7072}
7073#[doc(hidden)]
7074pub const __LIST_JOBS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7075    type_url: "type.googleapis.com/headwaters.read.v1.ListJobsRequest",
7076    to_json: ::buffa::type_registry::any_to_json::<ListJobsRequest>,
7077    from_json: ::buffa::type_registry::any_from_json::<ListJobsRequest>,
7078    is_wkt: false,
7079};
7080#[derive(Clone, PartialEq, Default)]
7081#[derive(::serde::Serialize, ::serde::Deserialize)]
7082#[serde(default)]
7083pub struct GetJobRequest {
7084    /// Field 1: `namespace`
7085    #[serde(
7086        rename = "namespace",
7087        with = "::buffa::json_helpers::proto_string",
7088        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7089    )]
7090    pub namespace: ::buffa::alloc::string::String,
7091    /// Field 2: `name`
7092    #[serde(
7093        rename = "name",
7094        with = "::buffa::json_helpers::proto_string",
7095        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7096    )]
7097    pub name: ::buffa::alloc::string::String,
7098    #[serde(skip)]
7099    #[doc(hidden)]
7100    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7101}
7102impl ::core::fmt::Debug for GetJobRequest {
7103    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7104        f.debug_struct("GetJobRequest")
7105            .field("namespace", &self.namespace)
7106            .field("name", &self.name)
7107            .finish()
7108    }
7109}
7110impl GetJobRequest {
7111    /// Protobuf type URL for this message, for use with `Any::pack` and
7112    /// `Any::unpack_if`.
7113    ///
7114    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7115    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetJobRequest";
7116}
7117impl ::buffa::DefaultInstance for GetJobRequest {
7118    fn default_instance() -> &'static Self {
7119        static VALUE: ::buffa::__private::OnceBox<GetJobRequest> = ::buffa::__private::OnceBox::new();
7120        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7121    }
7122}
7123impl ::buffa::MessageName for GetJobRequest {
7124    const PACKAGE: &'static str = "headwaters.read.v1";
7125    const NAME: &'static str = "GetJobRequest";
7126    const FULL_NAME: &'static str = "headwaters.read.v1.GetJobRequest";
7127    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetJobRequest";
7128}
7129impl ::buffa::Message for GetJobRequest {
7130    /// Returns the total encoded size in bytes.
7131    ///
7132    /// The result is a `u32`; the protobuf specification requires all
7133    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7134    /// compliant message will never overflow this type.
7135    #[allow(clippy::let_and_return)]
7136    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7137        #[allow(unused_imports)]
7138        use ::buffa::Enumeration as _;
7139        let mut size = 0u32;
7140        if !self.namespace.is_empty() {
7141            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
7142        }
7143        if !self.name.is_empty() {
7144            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
7145        }
7146        size += self.__buffa_unknown_fields.encoded_len() as u32;
7147        size
7148    }
7149    fn write_to(
7150        &self,
7151        _cache: &mut ::buffa::SizeCache,
7152        buf: &mut impl ::buffa::bytes::BufMut,
7153    ) {
7154        #[allow(unused_imports)]
7155        use ::buffa::Enumeration as _;
7156        if !self.namespace.is_empty() {
7157            ::buffa::encoding::Tag::new(
7158                    1u32,
7159                    ::buffa::encoding::WireType::LengthDelimited,
7160                )
7161                .encode(buf);
7162            ::buffa::types::encode_string(&self.namespace, buf);
7163        }
7164        if !self.name.is_empty() {
7165            ::buffa::encoding::Tag::new(
7166                    2u32,
7167                    ::buffa::encoding::WireType::LengthDelimited,
7168                )
7169                .encode(buf);
7170            ::buffa::types::encode_string(&self.name, buf);
7171        }
7172        self.__buffa_unknown_fields.write_to(buf);
7173    }
7174    fn merge_field(
7175        &mut self,
7176        tag: ::buffa::encoding::Tag,
7177        buf: &mut impl ::buffa::bytes::Buf,
7178        depth: u32,
7179    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7180        #[allow(unused_imports)]
7181        use ::buffa::bytes::Buf as _;
7182        #[allow(unused_imports)]
7183        use ::buffa::Enumeration as _;
7184        match tag.field_number() {
7185            1u32 => {
7186                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7187                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7188                        field_number: 1u32,
7189                        expected: 2u8,
7190                        actual: tag.wire_type() as u8,
7191                    });
7192                }
7193                ::buffa::types::merge_string(&mut self.namespace, buf)?;
7194            }
7195            2u32 => {
7196                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7197                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7198                        field_number: 2u32,
7199                        expected: 2u8,
7200                        actual: tag.wire_type() as u8,
7201                    });
7202                }
7203                ::buffa::types::merge_string(&mut self.name, buf)?;
7204            }
7205            _ => {
7206                self.__buffa_unknown_fields
7207                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7208            }
7209        }
7210        ::core::result::Result::Ok(())
7211    }
7212    fn clear(&mut self) {
7213        self.namespace.clear();
7214        self.name.clear();
7215        self.__buffa_unknown_fields.clear();
7216    }
7217}
7218impl ::buffa::ExtensionSet for GetJobRequest {
7219    const PROTO_FQN: &'static str = "headwaters.read.v1.GetJobRequest";
7220    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7221        &self.__buffa_unknown_fields
7222    }
7223    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7224        &mut self.__buffa_unknown_fields
7225    }
7226}
7227impl ::buffa::json_helpers::ProtoElemJson for GetJobRequest {
7228    fn serialize_proto_json<S: ::serde::Serializer>(
7229        v: &Self,
7230        s: S,
7231    ) -> ::core::result::Result<S::Ok, S::Error> {
7232        ::serde::Serialize::serialize(v, s)
7233    }
7234    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7235        d: D,
7236    ) -> ::core::result::Result<Self, D::Error> {
7237        <Self as ::serde::Deserialize>::deserialize(d)
7238    }
7239}
7240#[doc(hidden)]
7241pub const __GET_JOB_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7242    type_url: "type.googleapis.com/headwaters.read.v1.GetJobRequest",
7243    to_json: ::buffa::type_registry::any_to_json::<GetJobRequest>,
7244    from_json: ::buffa::type_registry::any_from_json::<GetJobRequest>,
7245    is_wkt: false,
7246};
7247#[derive(Clone, PartialEq, Default)]
7248#[derive(::serde::Serialize, ::serde::Deserialize)]
7249#[serde(default)]
7250pub struct GetJobRunsRequest {
7251    /// Field 1: `namespace`
7252    #[serde(
7253        rename = "namespace",
7254        with = "::buffa::json_helpers::proto_string",
7255        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7256    )]
7257    pub namespace: ::buffa::alloc::string::String,
7258    /// Field 2: `name`
7259    #[serde(
7260        rename = "name",
7261        with = "::buffa::json_helpers::proto_string",
7262        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7263    )]
7264    pub name: ::buffa::alloc::string::String,
7265    #[serde(skip)]
7266    #[doc(hidden)]
7267    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7268}
7269impl ::core::fmt::Debug for GetJobRunsRequest {
7270    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7271        f.debug_struct("GetJobRunsRequest")
7272            .field("namespace", &self.namespace)
7273            .field("name", &self.name)
7274            .finish()
7275    }
7276}
7277impl GetJobRunsRequest {
7278    /// Protobuf type URL for this message, for use with `Any::pack` and
7279    /// `Any::unpack_if`.
7280    ///
7281    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7282    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetJobRunsRequest";
7283}
7284impl ::buffa::DefaultInstance for GetJobRunsRequest {
7285    fn default_instance() -> &'static Self {
7286        static VALUE: ::buffa::__private::OnceBox<GetJobRunsRequest> = ::buffa::__private::OnceBox::new();
7287        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7288    }
7289}
7290impl ::buffa::MessageName for GetJobRunsRequest {
7291    const PACKAGE: &'static str = "headwaters.read.v1";
7292    const NAME: &'static str = "GetJobRunsRequest";
7293    const FULL_NAME: &'static str = "headwaters.read.v1.GetJobRunsRequest";
7294    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetJobRunsRequest";
7295}
7296impl ::buffa::Message for GetJobRunsRequest {
7297    /// Returns the total encoded size in bytes.
7298    ///
7299    /// The result is a `u32`; the protobuf specification requires all
7300    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7301    /// compliant message will never overflow this type.
7302    #[allow(clippy::let_and_return)]
7303    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7304        #[allow(unused_imports)]
7305        use ::buffa::Enumeration as _;
7306        let mut size = 0u32;
7307        if !self.namespace.is_empty() {
7308            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
7309        }
7310        if !self.name.is_empty() {
7311            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
7312        }
7313        size += self.__buffa_unknown_fields.encoded_len() as u32;
7314        size
7315    }
7316    fn write_to(
7317        &self,
7318        _cache: &mut ::buffa::SizeCache,
7319        buf: &mut impl ::buffa::bytes::BufMut,
7320    ) {
7321        #[allow(unused_imports)]
7322        use ::buffa::Enumeration as _;
7323        if !self.namespace.is_empty() {
7324            ::buffa::encoding::Tag::new(
7325                    1u32,
7326                    ::buffa::encoding::WireType::LengthDelimited,
7327                )
7328                .encode(buf);
7329            ::buffa::types::encode_string(&self.namespace, buf);
7330        }
7331        if !self.name.is_empty() {
7332            ::buffa::encoding::Tag::new(
7333                    2u32,
7334                    ::buffa::encoding::WireType::LengthDelimited,
7335                )
7336                .encode(buf);
7337            ::buffa::types::encode_string(&self.name, buf);
7338        }
7339        self.__buffa_unknown_fields.write_to(buf);
7340    }
7341    fn merge_field(
7342        &mut self,
7343        tag: ::buffa::encoding::Tag,
7344        buf: &mut impl ::buffa::bytes::Buf,
7345        depth: u32,
7346    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7347        #[allow(unused_imports)]
7348        use ::buffa::bytes::Buf as _;
7349        #[allow(unused_imports)]
7350        use ::buffa::Enumeration as _;
7351        match tag.field_number() {
7352            1u32 => {
7353                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7354                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7355                        field_number: 1u32,
7356                        expected: 2u8,
7357                        actual: tag.wire_type() as u8,
7358                    });
7359                }
7360                ::buffa::types::merge_string(&mut self.namespace, buf)?;
7361            }
7362            2u32 => {
7363                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7364                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7365                        field_number: 2u32,
7366                        expected: 2u8,
7367                        actual: tag.wire_type() as u8,
7368                    });
7369                }
7370                ::buffa::types::merge_string(&mut self.name, buf)?;
7371            }
7372            _ => {
7373                self.__buffa_unknown_fields
7374                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7375            }
7376        }
7377        ::core::result::Result::Ok(())
7378    }
7379    fn clear(&mut self) {
7380        self.namespace.clear();
7381        self.name.clear();
7382        self.__buffa_unknown_fields.clear();
7383    }
7384}
7385impl ::buffa::ExtensionSet for GetJobRunsRequest {
7386    const PROTO_FQN: &'static str = "headwaters.read.v1.GetJobRunsRequest";
7387    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7388        &self.__buffa_unknown_fields
7389    }
7390    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7391        &mut self.__buffa_unknown_fields
7392    }
7393}
7394impl ::buffa::json_helpers::ProtoElemJson for GetJobRunsRequest {
7395    fn serialize_proto_json<S: ::serde::Serializer>(
7396        v: &Self,
7397        s: S,
7398    ) -> ::core::result::Result<S::Ok, S::Error> {
7399        ::serde::Serialize::serialize(v, s)
7400    }
7401    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7402        d: D,
7403    ) -> ::core::result::Result<Self, D::Error> {
7404        <Self as ::serde::Deserialize>::deserialize(d)
7405    }
7406}
7407#[doc(hidden)]
7408pub const __GET_JOB_RUNS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7409    type_url: "type.googleapis.com/headwaters.read.v1.GetJobRunsRequest",
7410    to_json: ::buffa::type_registry::any_to_json::<GetJobRunsRequest>,
7411    from_json: ::buffa::type_registry::any_from_json::<GetJobRunsRequest>,
7412    is_wkt: false,
7413};
7414#[derive(Clone, PartialEq, Default)]
7415#[derive(::serde::Serialize, ::serde::Deserialize)]
7416#[serde(default)]
7417pub struct ListDatasetsRequest {
7418    /// Scope to this namespace; empty lists datasets across all namespaces.
7419    ///
7420    /// Field 1: `namespace`
7421    #[serde(
7422        rename = "namespace",
7423        with = "::buffa::json_helpers::proto_string",
7424        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7425    )]
7426    pub namespace: ::buffa::alloc::string::String,
7427    /// Field 2: `limit`
7428    #[serde(
7429        rename = "limit",
7430        with = "::buffa::json_helpers::int32",
7431        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
7432    )]
7433    pub limit: i32,
7434    /// Field 3: `offset`
7435    #[serde(
7436        rename = "offset",
7437        with = "::buffa::json_helpers::int32",
7438        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
7439    )]
7440    pub offset: i32,
7441    #[serde(skip)]
7442    #[doc(hidden)]
7443    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7444}
7445impl ::core::fmt::Debug for ListDatasetsRequest {
7446    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7447        f.debug_struct("ListDatasetsRequest")
7448            .field("namespace", &self.namespace)
7449            .field("limit", &self.limit)
7450            .field("offset", &self.offset)
7451            .finish()
7452    }
7453}
7454impl ListDatasetsRequest {
7455    /// Protobuf type URL for this message, for use with `Any::pack` and
7456    /// `Any::unpack_if`.
7457    ///
7458    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7459    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetsRequest";
7460}
7461impl ::buffa::DefaultInstance for ListDatasetsRequest {
7462    fn default_instance() -> &'static Self {
7463        static VALUE: ::buffa::__private::OnceBox<ListDatasetsRequest> = ::buffa::__private::OnceBox::new();
7464        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7465    }
7466}
7467impl ::buffa::MessageName for ListDatasetsRequest {
7468    const PACKAGE: &'static str = "headwaters.read.v1";
7469    const NAME: &'static str = "ListDatasetsRequest";
7470    const FULL_NAME: &'static str = "headwaters.read.v1.ListDatasetsRequest";
7471    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetsRequest";
7472}
7473impl ::buffa::Message for ListDatasetsRequest {
7474    /// Returns the total encoded size in bytes.
7475    ///
7476    /// The result is a `u32`; the protobuf specification requires all
7477    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7478    /// compliant message will never overflow this type.
7479    #[allow(clippy::let_and_return)]
7480    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7481        #[allow(unused_imports)]
7482        use ::buffa::Enumeration as _;
7483        let mut size = 0u32;
7484        if !self.namespace.is_empty() {
7485            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
7486        }
7487        if self.limit != 0i32 {
7488            size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
7489        }
7490        if self.offset != 0i32 {
7491            size += 1u32 + ::buffa::types::int32_encoded_len(self.offset) as u32;
7492        }
7493        size += self.__buffa_unknown_fields.encoded_len() as u32;
7494        size
7495    }
7496    fn write_to(
7497        &self,
7498        _cache: &mut ::buffa::SizeCache,
7499        buf: &mut impl ::buffa::bytes::BufMut,
7500    ) {
7501        #[allow(unused_imports)]
7502        use ::buffa::Enumeration as _;
7503        if !self.namespace.is_empty() {
7504            ::buffa::encoding::Tag::new(
7505                    1u32,
7506                    ::buffa::encoding::WireType::LengthDelimited,
7507                )
7508                .encode(buf);
7509            ::buffa::types::encode_string(&self.namespace, buf);
7510        }
7511        if self.limit != 0i32 {
7512            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
7513                .encode(buf);
7514            ::buffa::types::encode_int32(self.limit, buf);
7515        }
7516        if self.offset != 0i32 {
7517            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
7518                .encode(buf);
7519            ::buffa::types::encode_int32(self.offset, buf);
7520        }
7521        self.__buffa_unknown_fields.write_to(buf);
7522    }
7523    fn merge_field(
7524        &mut self,
7525        tag: ::buffa::encoding::Tag,
7526        buf: &mut impl ::buffa::bytes::Buf,
7527        depth: u32,
7528    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7529        #[allow(unused_imports)]
7530        use ::buffa::bytes::Buf as _;
7531        #[allow(unused_imports)]
7532        use ::buffa::Enumeration as _;
7533        match tag.field_number() {
7534            1u32 => {
7535                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7536                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7537                        field_number: 1u32,
7538                        expected: 2u8,
7539                        actual: tag.wire_type() as u8,
7540                    });
7541                }
7542                ::buffa::types::merge_string(&mut self.namespace, buf)?;
7543            }
7544            2u32 => {
7545                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7546                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7547                        field_number: 2u32,
7548                        expected: 0u8,
7549                        actual: tag.wire_type() as u8,
7550                    });
7551                }
7552                self.limit = ::buffa::types::decode_int32(buf)?;
7553            }
7554            3u32 => {
7555                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7556                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7557                        field_number: 3u32,
7558                        expected: 0u8,
7559                        actual: tag.wire_type() as u8,
7560                    });
7561                }
7562                self.offset = ::buffa::types::decode_int32(buf)?;
7563            }
7564            _ => {
7565                self.__buffa_unknown_fields
7566                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7567            }
7568        }
7569        ::core::result::Result::Ok(())
7570    }
7571    fn clear(&mut self) {
7572        self.namespace.clear();
7573        self.limit = 0i32;
7574        self.offset = 0i32;
7575        self.__buffa_unknown_fields.clear();
7576    }
7577}
7578impl ::buffa::ExtensionSet for ListDatasetsRequest {
7579    const PROTO_FQN: &'static str = "headwaters.read.v1.ListDatasetsRequest";
7580    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7581        &self.__buffa_unknown_fields
7582    }
7583    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7584        &mut self.__buffa_unknown_fields
7585    }
7586}
7587impl ::buffa::json_helpers::ProtoElemJson for ListDatasetsRequest {
7588    fn serialize_proto_json<S: ::serde::Serializer>(
7589        v: &Self,
7590        s: S,
7591    ) -> ::core::result::Result<S::Ok, S::Error> {
7592        ::serde::Serialize::serialize(v, s)
7593    }
7594    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7595        d: D,
7596    ) -> ::core::result::Result<Self, D::Error> {
7597        <Self as ::serde::Deserialize>::deserialize(d)
7598    }
7599}
7600#[doc(hidden)]
7601pub const __LIST_DATASETS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7602    type_url: "type.googleapis.com/headwaters.read.v1.ListDatasetsRequest",
7603    to_json: ::buffa::type_registry::any_to_json::<ListDatasetsRequest>,
7604    from_json: ::buffa::type_registry::any_from_json::<ListDatasetsRequest>,
7605    is_wkt: false,
7606};
7607#[derive(Clone, PartialEq, Default)]
7608#[derive(::serde::Serialize, ::serde::Deserialize)]
7609#[serde(default)]
7610pub struct GetDatasetRequest {
7611    /// Field 1: `namespace`
7612    #[serde(
7613        rename = "namespace",
7614        with = "::buffa::json_helpers::proto_string",
7615        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7616    )]
7617    pub namespace: ::buffa::alloc::string::String,
7618    /// Field 2: `name`
7619    #[serde(
7620        rename = "name",
7621        with = "::buffa::json_helpers::proto_string",
7622        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7623    )]
7624    pub name: ::buffa::alloc::string::String,
7625    #[serde(skip)]
7626    #[doc(hidden)]
7627    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7628}
7629impl ::core::fmt::Debug for GetDatasetRequest {
7630    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7631        f.debug_struct("GetDatasetRequest")
7632            .field("namespace", &self.namespace)
7633            .field("name", &self.name)
7634            .finish()
7635    }
7636}
7637impl GetDatasetRequest {
7638    /// Protobuf type URL for this message, for use with `Any::pack` and
7639    /// `Any::unpack_if`.
7640    ///
7641    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7642    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetDatasetRequest";
7643}
7644impl ::buffa::DefaultInstance for GetDatasetRequest {
7645    fn default_instance() -> &'static Self {
7646        static VALUE: ::buffa::__private::OnceBox<GetDatasetRequest> = ::buffa::__private::OnceBox::new();
7647        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7648    }
7649}
7650impl ::buffa::MessageName for GetDatasetRequest {
7651    const PACKAGE: &'static str = "headwaters.read.v1";
7652    const NAME: &'static str = "GetDatasetRequest";
7653    const FULL_NAME: &'static str = "headwaters.read.v1.GetDatasetRequest";
7654    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetDatasetRequest";
7655}
7656impl ::buffa::Message for GetDatasetRequest {
7657    /// Returns the total encoded size in bytes.
7658    ///
7659    /// The result is a `u32`; the protobuf specification requires all
7660    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7661    /// compliant message will never overflow this type.
7662    #[allow(clippy::let_and_return)]
7663    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7664        #[allow(unused_imports)]
7665        use ::buffa::Enumeration as _;
7666        let mut size = 0u32;
7667        if !self.namespace.is_empty() {
7668            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
7669        }
7670        if !self.name.is_empty() {
7671            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
7672        }
7673        size += self.__buffa_unknown_fields.encoded_len() as u32;
7674        size
7675    }
7676    fn write_to(
7677        &self,
7678        _cache: &mut ::buffa::SizeCache,
7679        buf: &mut impl ::buffa::bytes::BufMut,
7680    ) {
7681        #[allow(unused_imports)]
7682        use ::buffa::Enumeration as _;
7683        if !self.namespace.is_empty() {
7684            ::buffa::encoding::Tag::new(
7685                    1u32,
7686                    ::buffa::encoding::WireType::LengthDelimited,
7687                )
7688                .encode(buf);
7689            ::buffa::types::encode_string(&self.namespace, buf);
7690        }
7691        if !self.name.is_empty() {
7692            ::buffa::encoding::Tag::new(
7693                    2u32,
7694                    ::buffa::encoding::WireType::LengthDelimited,
7695                )
7696                .encode(buf);
7697            ::buffa::types::encode_string(&self.name, buf);
7698        }
7699        self.__buffa_unknown_fields.write_to(buf);
7700    }
7701    fn merge_field(
7702        &mut self,
7703        tag: ::buffa::encoding::Tag,
7704        buf: &mut impl ::buffa::bytes::Buf,
7705        depth: u32,
7706    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7707        #[allow(unused_imports)]
7708        use ::buffa::bytes::Buf as _;
7709        #[allow(unused_imports)]
7710        use ::buffa::Enumeration as _;
7711        match tag.field_number() {
7712            1u32 => {
7713                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7714                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7715                        field_number: 1u32,
7716                        expected: 2u8,
7717                        actual: tag.wire_type() as u8,
7718                    });
7719                }
7720                ::buffa::types::merge_string(&mut self.namespace, buf)?;
7721            }
7722            2u32 => {
7723                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7724                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7725                        field_number: 2u32,
7726                        expected: 2u8,
7727                        actual: tag.wire_type() as u8,
7728                    });
7729                }
7730                ::buffa::types::merge_string(&mut self.name, buf)?;
7731            }
7732            _ => {
7733                self.__buffa_unknown_fields
7734                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7735            }
7736        }
7737        ::core::result::Result::Ok(())
7738    }
7739    fn clear(&mut self) {
7740        self.namespace.clear();
7741        self.name.clear();
7742        self.__buffa_unknown_fields.clear();
7743    }
7744}
7745impl ::buffa::ExtensionSet for GetDatasetRequest {
7746    const PROTO_FQN: &'static str = "headwaters.read.v1.GetDatasetRequest";
7747    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7748        &self.__buffa_unknown_fields
7749    }
7750    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7751        &mut self.__buffa_unknown_fields
7752    }
7753}
7754impl ::buffa::json_helpers::ProtoElemJson for GetDatasetRequest {
7755    fn serialize_proto_json<S: ::serde::Serializer>(
7756        v: &Self,
7757        s: S,
7758    ) -> ::core::result::Result<S::Ok, S::Error> {
7759        ::serde::Serialize::serialize(v, s)
7760    }
7761    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7762        d: D,
7763    ) -> ::core::result::Result<Self, D::Error> {
7764        <Self as ::serde::Deserialize>::deserialize(d)
7765    }
7766}
7767#[doc(hidden)]
7768pub const __GET_DATASET_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7769    type_url: "type.googleapis.com/headwaters.read.v1.GetDatasetRequest",
7770    to_json: ::buffa::type_registry::any_to_json::<GetDatasetRequest>,
7771    from_json: ::buffa::type_registry::any_from_json::<GetDatasetRequest>,
7772    is_wkt: false,
7773};
7774#[derive(Clone, PartialEq, Default)]
7775#[derive(::serde::Serialize, ::serde::Deserialize)]
7776#[serde(default)]
7777pub struct ListDatasetVersionsRequest {
7778    /// Field 1: `namespace`
7779    #[serde(
7780        rename = "namespace",
7781        with = "::buffa::json_helpers::proto_string",
7782        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7783    )]
7784    pub namespace: ::buffa::alloc::string::String,
7785    /// Field 2: `name`
7786    #[serde(
7787        rename = "name",
7788        with = "::buffa::json_helpers::proto_string",
7789        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7790    )]
7791    pub name: ::buffa::alloc::string::String,
7792    /// Field 3: `limit`
7793    #[serde(
7794        rename = "limit",
7795        with = "::buffa::json_helpers::int32",
7796        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
7797    )]
7798    pub limit: i32,
7799    /// Field 4: `offset`
7800    #[serde(
7801        rename = "offset",
7802        with = "::buffa::json_helpers::int32",
7803        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
7804    )]
7805    pub offset: i32,
7806    #[serde(skip)]
7807    #[doc(hidden)]
7808    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7809}
7810impl ::core::fmt::Debug for ListDatasetVersionsRequest {
7811    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7812        f.debug_struct("ListDatasetVersionsRequest")
7813            .field("namespace", &self.namespace)
7814            .field("name", &self.name)
7815            .field("limit", &self.limit)
7816            .field("offset", &self.offset)
7817            .finish()
7818    }
7819}
7820impl ListDatasetVersionsRequest {
7821    /// Protobuf type URL for this message, for use with `Any::pack` and
7822    /// `Any::unpack_if`.
7823    ///
7824    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7825    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetVersionsRequest";
7826}
7827impl ::buffa::DefaultInstance for ListDatasetVersionsRequest {
7828    fn default_instance() -> &'static Self {
7829        static VALUE: ::buffa::__private::OnceBox<ListDatasetVersionsRequest> = ::buffa::__private::OnceBox::new();
7830        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7831    }
7832}
7833impl ::buffa::MessageName for ListDatasetVersionsRequest {
7834    const PACKAGE: &'static str = "headwaters.read.v1";
7835    const NAME: &'static str = "ListDatasetVersionsRequest";
7836    const FULL_NAME: &'static str = "headwaters.read.v1.ListDatasetVersionsRequest";
7837    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetVersionsRequest";
7838}
7839impl ::buffa::Message for ListDatasetVersionsRequest {
7840    /// Returns the total encoded size in bytes.
7841    ///
7842    /// The result is a `u32`; the protobuf specification requires all
7843    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7844    /// compliant message will never overflow this type.
7845    #[allow(clippy::let_and_return)]
7846    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7847        #[allow(unused_imports)]
7848        use ::buffa::Enumeration as _;
7849        let mut size = 0u32;
7850        if !self.namespace.is_empty() {
7851            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
7852        }
7853        if !self.name.is_empty() {
7854            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
7855        }
7856        if self.limit != 0i32 {
7857            size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
7858        }
7859        if self.offset != 0i32 {
7860            size += 1u32 + ::buffa::types::int32_encoded_len(self.offset) as u32;
7861        }
7862        size += self.__buffa_unknown_fields.encoded_len() as u32;
7863        size
7864    }
7865    fn write_to(
7866        &self,
7867        _cache: &mut ::buffa::SizeCache,
7868        buf: &mut impl ::buffa::bytes::BufMut,
7869    ) {
7870        #[allow(unused_imports)]
7871        use ::buffa::Enumeration as _;
7872        if !self.namespace.is_empty() {
7873            ::buffa::encoding::Tag::new(
7874                    1u32,
7875                    ::buffa::encoding::WireType::LengthDelimited,
7876                )
7877                .encode(buf);
7878            ::buffa::types::encode_string(&self.namespace, buf);
7879        }
7880        if !self.name.is_empty() {
7881            ::buffa::encoding::Tag::new(
7882                    2u32,
7883                    ::buffa::encoding::WireType::LengthDelimited,
7884                )
7885                .encode(buf);
7886            ::buffa::types::encode_string(&self.name, buf);
7887        }
7888        if self.limit != 0i32 {
7889            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
7890                .encode(buf);
7891            ::buffa::types::encode_int32(self.limit, buf);
7892        }
7893        if self.offset != 0i32 {
7894            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
7895                .encode(buf);
7896            ::buffa::types::encode_int32(self.offset, buf);
7897        }
7898        self.__buffa_unknown_fields.write_to(buf);
7899    }
7900    fn merge_field(
7901        &mut self,
7902        tag: ::buffa::encoding::Tag,
7903        buf: &mut impl ::buffa::bytes::Buf,
7904        depth: u32,
7905    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7906        #[allow(unused_imports)]
7907        use ::buffa::bytes::Buf as _;
7908        #[allow(unused_imports)]
7909        use ::buffa::Enumeration as _;
7910        match tag.field_number() {
7911            1u32 => {
7912                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7913                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7914                        field_number: 1u32,
7915                        expected: 2u8,
7916                        actual: tag.wire_type() as u8,
7917                    });
7918                }
7919                ::buffa::types::merge_string(&mut self.namespace, buf)?;
7920            }
7921            2u32 => {
7922                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7923                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7924                        field_number: 2u32,
7925                        expected: 2u8,
7926                        actual: tag.wire_type() as u8,
7927                    });
7928                }
7929                ::buffa::types::merge_string(&mut self.name, buf)?;
7930            }
7931            3u32 => {
7932                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7933                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7934                        field_number: 3u32,
7935                        expected: 0u8,
7936                        actual: tag.wire_type() as u8,
7937                    });
7938                }
7939                self.limit = ::buffa::types::decode_int32(buf)?;
7940            }
7941            4u32 => {
7942                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7943                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7944                        field_number: 4u32,
7945                        expected: 0u8,
7946                        actual: tag.wire_type() as u8,
7947                    });
7948                }
7949                self.offset = ::buffa::types::decode_int32(buf)?;
7950            }
7951            _ => {
7952                self.__buffa_unknown_fields
7953                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7954            }
7955        }
7956        ::core::result::Result::Ok(())
7957    }
7958    fn clear(&mut self) {
7959        self.namespace.clear();
7960        self.name.clear();
7961        self.limit = 0i32;
7962        self.offset = 0i32;
7963        self.__buffa_unknown_fields.clear();
7964    }
7965}
7966impl ::buffa::ExtensionSet for ListDatasetVersionsRequest {
7967    const PROTO_FQN: &'static str = "headwaters.read.v1.ListDatasetVersionsRequest";
7968    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7969        &self.__buffa_unknown_fields
7970    }
7971    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7972        &mut self.__buffa_unknown_fields
7973    }
7974}
7975impl ::buffa::json_helpers::ProtoElemJson for ListDatasetVersionsRequest {
7976    fn serialize_proto_json<S: ::serde::Serializer>(
7977        v: &Self,
7978        s: S,
7979    ) -> ::core::result::Result<S::Ok, S::Error> {
7980        ::serde::Serialize::serialize(v, s)
7981    }
7982    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7983        d: D,
7984    ) -> ::core::result::Result<Self, D::Error> {
7985        <Self as ::serde::Deserialize>::deserialize(d)
7986    }
7987}
7988#[doc(hidden)]
7989pub const __LIST_DATASET_VERSIONS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7990    type_url: "type.googleapis.com/headwaters.read.v1.ListDatasetVersionsRequest",
7991    to_json: ::buffa::type_registry::any_to_json::<ListDatasetVersionsRequest>,
7992    from_json: ::buffa::type_registry::any_from_json::<ListDatasetVersionsRequest>,
7993    is_wkt: false,
7994};
7995#[derive(Clone, PartialEq, Default)]
7996#[derive(::serde::Serialize, ::serde::Deserialize)]
7997#[serde(default)]
7998pub struct SearchRequest {
7999    /// Case-insensitive substring matched against job and dataset names.
8000    ///
8001    /// Field 1: `q`
8002    #[serde(
8003        rename = "q",
8004        with = "::buffa::json_helpers::proto_string",
8005        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
8006    )]
8007    pub q: ::buffa::alloc::string::String,
8008    /// Field 2: `limit`
8009    #[serde(
8010        rename = "limit",
8011        with = "::buffa::json_helpers::int32",
8012        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
8013    )]
8014    pub limit: i32,
8015    /// Restrict results to one kind. `ENTITY_KIND_UNSPECIFIED` (the default) returns
8016    /// both jobs and datasets; `DATASET_FIELD` matches nothing (search is entity-level).
8017    ///
8018    /// Field 3: `type`
8019    #[serde(
8020        rename = "type",
8021        with = "::buffa::json_helpers::proto_enum",
8022        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
8023    )]
8024    pub r#type: ::buffa::EnumValue<EntityKind>,
8025    /// Restrict results to one namespace; empty matches all.
8026    ///
8027    /// Field 4: `namespace`
8028    #[serde(
8029        rename = "namespace",
8030        with = "::buffa::json_helpers::proto_string",
8031        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
8032    )]
8033    pub namespace: ::buffa::alloc::string::String,
8034    #[serde(skip)]
8035    #[doc(hidden)]
8036    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8037}
8038impl ::core::fmt::Debug for SearchRequest {
8039    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8040        f.debug_struct("SearchRequest")
8041            .field("q", &self.q)
8042            .field("limit", &self.limit)
8043            .field("r#type", &self.r#type)
8044            .field("namespace", &self.namespace)
8045            .finish()
8046    }
8047}
8048impl SearchRequest {
8049    /// Protobuf type URL for this message, for use with `Any::pack` and
8050    /// `Any::unpack_if`.
8051    ///
8052    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8053    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchRequest";
8054}
8055impl ::buffa::DefaultInstance for SearchRequest {
8056    fn default_instance() -> &'static Self {
8057        static VALUE: ::buffa::__private::OnceBox<SearchRequest> = ::buffa::__private::OnceBox::new();
8058        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8059    }
8060}
8061impl ::buffa::MessageName for SearchRequest {
8062    const PACKAGE: &'static str = "headwaters.read.v1";
8063    const NAME: &'static str = "SearchRequest";
8064    const FULL_NAME: &'static str = "headwaters.read.v1.SearchRequest";
8065    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchRequest";
8066}
8067impl ::buffa::Message for SearchRequest {
8068    /// Returns the total encoded size in bytes.
8069    ///
8070    /// The result is a `u32`; the protobuf specification requires all
8071    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8072    /// compliant message will never overflow this type.
8073    #[allow(clippy::let_and_return)]
8074    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8075        #[allow(unused_imports)]
8076        use ::buffa::Enumeration as _;
8077        let mut size = 0u32;
8078        if !self.q.is_empty() {
8079            size += 1u32 + ::buffa::types::string_encoded_len(&self.q) as u32;
8080        }
8081        if self.limit != 0i32 {
8082            size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
8083        }
8084        {
8085            let val = self.r#type.to_i32();
8086            if val != 0 {
8087                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
8088            }
8089        }
8090        if !self.namespace.is_empty() {
8091            size += 1u32 + ::buffa::types::string_encoded_len(&self.namespace) as u32;
8092        }
8093        size += self.__buffa_unknown_fields.encoded_len() as u32;
8094        size
8095    }
8096    fn write_to(
8097        &self,
8098        _cache: &mut ::buffa::SizeCache,
8099        buf: &mut impl ::buffa::bytes::BufMut,
8100    ) {
8101        #[allow(unused_imports)]
8102        use ::buffa::Enumeration as _;
8103        if !self.q.is_empty() {
8104            ::buffa::encoding::Tag::new(
8105                    1u32,
8106                    ::buffa::encoding::WireType::LengthDelimited,
8107                )
8108                .encode(buf);
8109            ::buffa::types::encode_string(&self.q, buf);
8110        }
8111        if self.limit != 0i32 {
8112            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
8113                .encode(buf);
8114            ::buffa::types::encode_int32(self.limit, buf);
8115        }
8116        {
8117            let val = self.r#type.to_i32();
8118            if val != 0 {
8119                ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
8120                    .encode(buf);
8121                ::buffa::types::encode_int32(val, buf);
8122            }
8123        }
8124        if !self.namespace.is_empty() {
8125            ::buffa::encoding::Tag::new(
8126                    4u32,
8127                    ::buffa::encoding::WireType::LengthDelimited,
8128                )
8129                .encode(buf);
8130            ::buffa::types::encode_string(&self.namespace, buf);
8131        }
8132        self.__buffa_unknown_fields.write_to(buf);
8133    }
8134    fn merge_field(
8135        &mut self,
8136        tag: ::buffa::encoding::Tag,
8137        buf: &mut impl ::buffa::bytes::Buf,
8138        depth: u32,
8139    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8140        #[allow(unused_imports)]
8141        use ::buffa::bytes::Buf as _;
8142        #[allow(unused_imports)]
8143        use ::buffa::Enumeration as _;
8144        match tag.field_number() {
8145            1u32 => {
8146                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8147                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8148                        field_number: 1u32,
8149                        expected: 2u8,
8150                        actual: tag.wire_type() as u8,
8151                    });
8152                }
8153                ::buffa::types::merge_string(&mut self.q, buf)?;
8154            }
8155            2u32 => {
8156                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8157                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8158                        field_number: 2u32,
8159                        expected: 0u8,
8160                        actual: tag.wire_type() as u8,
8161                    });
8162                }
8163                self.limit = ::buffa::types::decode_int32(buf)?;
8164            }
8165            3u32 => {
8166                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8167                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8168                        field_number: 3u32,
8169                        expected: 0u8,
8170                        actual: tag.wire_type() as u8,
8171                    });
8172                }
8173                self.r#type = ::buffa::EnumValue::from(
8174                    ::buffa::types::decode_int32(buf)?,
8175                );
8176            }
8177            4u32 => {
8178                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8179                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8180                        field_number: 4u32,
8181                        expected: 2u8,
8182                        actual: tag.wire_type() as u8,
8183                    });
8184                }
8185                ::buffa::types::merge_string(&mut self.namespace, buf)?;
8186            }
8187            _ => {
8188                self.__buffa_unknown_fields
8189                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8190            }
8191        }
8192        ::core::result::Result::Ok(())
8193    }
8194    fn clear(&mut self) {
8195        self.q.clear();
8196        self.limit = 0i32;
8197        self.r#type = ::buffa::EnumValue::from(0);
8198        self.namespace.clear();
8199        self.__buffa_unknown_fields.clear();
8200    }
8201}
8202impl ::buffa::ExtensionSet for SearchRequest {
8203    const PROTO_FQN: &'static str = "headwaters.read.v1.SearchRequest";
8204    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8205        &self.__buffa_unknown_fields
8206    }
8207    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8208        &mut self.__buffa_unknown_fields
8209    }
8210}
8211impl ::buffa::json_helpers::ProtoElemJson for SearchRequest {
8212    fn serialize_proto_json<S: ::serde::Serializer>(
8213        v: &Self,
8214        s: S,
8215    ) -> ::core::result::Result<S::Ok, S::Error> {
8216        ::serde::Serialize::serialize(v, s)
8217    }
8218    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8219        d: D,
8220    ) -> ::core::result::Result<Self, D::Error> {
8221        <Self as ::serde::Deserialize>::deserialize(d)
8222    }
8223}
8224#[doc(hidden)]
8225pub const __SEARCH_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8226    type_url: "type.googleapis.com/headwaters.read.v1.SearchRequest",
8227    to_json: ::buffa::type_registry::any_to_json::<SearchRequest>,
8228    from_json: ::buffa::type_registry::any_from_json::<SearchRequest>,
8229    is_wkt: false,
8230};
8231#[derive(Clone, PartialEq, Default)]
8232#[derive(::serde::Serialize, ::serde::Deserialize)]
8233#[serde(default)]
8234pub struct GetLineageRequest {
8235    /// Seed node: `job:<ns>:<name>` or `dataset:<ns>:<name>`.
8236    ///
8237    /// Field 1: `node_id`
8238    #[serde(
8239        rename = "nodeId",
8240        alias = "node_id",
8241        with = "::buffa::json_helpers::proto_string",
8242        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
8243    )]
8244    pub node_id: ::buffa::alloc::string::String,
8245    /// Maximum hops to traverse from the seed. Defaults to, and is capped at, 20.
8246    ///
8247    /// Field 2: `depth`
8248    #[serde(
8249        rename = "depth",
8250        with = "::buffa::json_helpers::int32",
8251        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
8252    )]
8253    pub depth: i32,
8254    #[serde(skip)]
8255    #[doc(hidden)]
8256    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8257}
8258impl ::core::fmt::Debug for GetLineageRequest {
8259    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8260        f.debug_struct("GetLineageRequest")
8261            .field("node_id", &self.node_id)
8262            .field("depth", &self.depth)
8263            .finish()
8264    }
8265}
8266impl GetLineageRequest {
8267    /// Protobuf type URL for this message, for use with `Any::pack` and
8268    /// `Any::unpack_if`.
8269    ///
8270    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8271    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetLineageRequest";
8272}
8273impl ::buffa::DefaultInstance for GetLineageRequest {
8274    fn default_instance() -> &'static Self {
8275        static VALUE: ::buffa::__private::OnceBox<GetLineageRequest> = ::buffa::__private::OnceBox::new();
8276        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8277    }
8278}
8279impl ::buffa::MessageName for GetLineageRequest {
8280    const PACKAGE: &'static str = "headwaters.read.v1";
8281    const NAME: &'static str = "GetLineageRequest";
8282    const FULL_NAME: &'static str = "headwaters.read.v1.GetLineageRequest";
8283    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetLineageRequest";
8284}
8285impl ::buffa::Message for GetLineageRequest {
8286    /// Returns the total encoded size in bytes.
8287    ///
8288    /// The result is a `u32`; the protobuf specification requires all
8289    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8290    /// compliant message will never overflow this type.
8291    #[allow(clippy::let_and_return)]
8292    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8293        #[allow(unused_imports)]
8294        use ::buffa::Enumeration as _;
8295        let mut size = 0u32;
8296        if !self.node_id.is_empty() {
8297            size += 1u32 + ::buffa::types::string_encoded_len(&self.node_id) as u32;
8298        }
8299        if self.depth != 0i32 {
8300            size += 1u32 + ::buffa::types::int32_encoded_len(self.depth) as u32;
8301        }
8302        size += self.__buffa_unknown_fields.encoded_len() as u32;
8303        size
8304    }
8305    fn write_to(
8306        &self,
8307        _cache: &mut ::buffa::SizeCache,
8308        buf: &mut impl ::buffa::bytes::BufMut,
8309    ) {
8310        #[allow(unused_imports)]
8311        use ::buffa::Enumeration as _;
8312        if !self.node_id.is_empty() {
8313            ::buffa::encoding::Tag::new(
8314                    1u32,
8315                    ::buffa::encoding::WireType::LengthDelimited,
8316                )
8317                .encode(buf);
8318            ::buffa::types::encode_string(&self.node_id, buf);
8319        }
8320        if self.depth != 0i32 {
8321            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
8322                .encode(buf);
8323            ::buffa::types::encode_int32(self.depth, buf);
8324        }
8325        self.__buffa_unknown_fields.write_to(buf);
8326    }
8327    fn merge_field(
8328        &mut self,
8329        tag: ::buffa::encoding::Tag,
8330        buf: &mut impl ::buffa::bytes::Buf,
8331        depth: u32,
8332    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8333        #[allow(unused_imports)]
8334        use ::buffa::bytes::Buf as _;
8335        #[allow(unused_imports)]
8336        use ::buffa::Enumeration as _;
8337        match tag.field_number() {
8338            1u32 => {
8339                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8340                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8341                        field_number: 1u32,
8342                        expected: 2u8,
8343                        actual: tag.wire_type() as u8,
8344                    });
8345                }
8346                ::buffa::types::merge_string(&mut self.node_id, buf)?;
8347            }
8348            2u32 => {
8349                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8350                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8351                        field_number: 2u32,
8352                        expected: 0u8,
8353                        actual: tag.wire_type() as u8,
8354                    });
8355                }
8356                self.depth = ::buffa::types::decode_int32(buf)?;
8357            }
8358            _ => {
8359                self.__buffa_unknown_fields
8360                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8361            }
8362        }
8363        ::core::result::Result::Ok(())
8364    }
8365    fn clear(&mut self) {
8366        self.node_id.clear();
8367        self.depth = 0i32;
8368        self.__buffa_unknown_fields.clear();
8369    }
8370}
8371impl ::buffa::ExtensionSet for GetLineageRequest {
8372    const PROTO_FQN: &'static str = "headwaters.read.v1.GetLineageRequest";
8373    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8374        &self.__buffa_unknown_fields
8375    }
8376    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8377        &mut self.__buffa_unknown_fields
8378    }
8379}
8380impl ::buffa::json_helpers::ProtoElemJson for GetLineageRequest {
8381    fn serialize_proto_json<S: ::serde::Serializer>(
8382        v: &Self,
8383        s: S,
8384    ) -> ::core::result::Result<S::Ok, S::Error> {
8385        ::serde::Serialize::serialize(v, s)
8386    }
8387    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8388        d: D,
8389    ) -> ::core::result::Result<Self, D::Error> {
8390        <Self as ::serde::Deserialize>::deserialize(d)
8391    }
8392}
8393#[doc(hidden)]
8394pub const __GET_LINEAGE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8395    type_url: "type.googleapis.com/headwaters.read.v1.GetLineageRequest",
8396    to_json: ::buffa::type_registry::any_to_json::<GetLineageRequest>,
8397    from_json: ::buffa::type_registry::any_from_json::<GetLineageRequest>,
8398    is_wkt: false,
8399};
8400#[derive(Clone, PartialEq, Default)]
8401#[derive(::serde::Serialize, ::serde::Deserialize)]
8402#[serde(default)]
8403pub struct GetColumnLineageRequest {
8404    /// Seed node: a `dataset:<ns>:<name>` (all fields) or a
8405    /// `datasetField:<ns>:<name>:<field>`.
8406    ///
8407    /// Field 1: `node_id`
8408    #[serde(
8409        rename = "nodeId",
8410        alias = "node_id",
8411        with = "::buffa::json_helpers::proto_string",
8412        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
8413    )]
8414    pub node_id: ::buffa::alloc::string::String,
8415    #[serde(skip)]
8416    #[doc(hidden)]
8417    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8418}
8419impl ::core::fmt::Debug for GetColumnLineageRequest {
8420    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8421        f.debug_struct("GetColumnLineageRequest")
8422            .field("node_id", &self.node_id)
8423            .finish()
8424    }
8425}
8426impl GetColumnLineageRequest {
8427    /// Protobuf type URL for this message, for use with `Any::pack` and
8428    /// `Any::unpack_if`.
8429    ///
8430    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8431    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetColumnLineageRequest";
8432}
8433impl ::buffa::DefaultInstance for GetColumnLineageRequest {
8434    fn default_instance() -> &'static Self {
8435        static VALUE: ::buffa::__private::OnceBox<GetColumnLineageRequest> = ::buffa::__private::OnceBox::new();
8436        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8437    }
8438}
8439impl ::buffa::MessageName for GetColumnLineageRequest {
8440    const PACKAGE: &'static str = "headwaters.read.v1";
8441    const NAME: &'static str = "GetColumnLineageRequest";
8442    const FULL_NAME: &'static str = "headwaters.read.v1.GetColumnLineageRequest";
8443    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetColumnLineageRequest";
8444}
8445impl ::buffa::Message for GetColumnLineageRequest {
8446    /// Returns the total encoded size in bytes.
8447    ///
8448    /// The result is a `u32`; the protobuf specification requires all
8449    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8450    /// compliant message will never overflow this type.
8451    #[allow(clippy::let_and_return)]
8452    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8453        #[allow(unused_imports)]
8454        use ::buffa::Enumeration as _;
8455        let mut size = 0u32;
8456        if !self.node_id.is_empty() {
8457            size += 1u32 + ::buffa::types::string_encoded_len(&self.node_id) as u32;
8458        }
8459        size += self.__buffa_unknown_fields.encoded_len() as u32;
8460        size
8461    }
8462    fn write_to(
8463        &self,
8464        _cache: &mut ::buffa::SizeCache,
8465        buf: &mut impl ::buffa::bytes::BufMut,
8466    ) {
8467        #[allow(unused_imports)]
8468        use ::buffa::Enumeration as _;
8469        if !self.node_id.is_empty() {
8470            ::buffa::encoding::Tag::new(
8471                    1u32,
8472                    ::buffa::encoding::WireType::LengthDelimited,
8473                )
8474                .encode(buf);
8475            ::buffa::types::encode_string(&self.node_id, buf);
8476        }
8477        self.__buffa_unknown_fields.write_to(buf);
8478    }
8479    fn merge_field(
8480        &mut self,
8481        tag: ::buffa::encoding::Tag,
8482        buf: &mut impl ::buffa::bytes::Buf,
8483        depth: u32,
8484    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8485        #[allow(unused_imports)]
8486        use ::buffa::bytes::Buf as _;
8487        #[allow(unused_imports)]
8488        use ::buffa::Enumeration as _;
8489        match tag.field_number() {
8490            1u32 => {
8491                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8492                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8493                        field_number: 1u32,
8494                        expected: 2u8,
8495                        actual: tag.wire_type() as u8,
8496                    });
8497                }
8498                ::buffa::types::merge_string(&mut self.node_id, buf)?;
8499            }
8500            _ => {
8501                self.__buffa_unknown_fields
8502                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8503            }
8504        }
8505        ::core::result::Result::Ok(())
8506    }
8507    fn clear(&mut self) {
8508        self.node_id.clear();
8509        self.__buffa_unknown_fields.clear();
8510    }
8511}
8512impl ::buffa::ExtensionSet for GetColumnLineageRequest {
8513    const PROTO_FQN: &'static str = "headwaters.read.v1.GetColumnLineageRequest";
8514    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8515        &self.__buffa_unknown_fields
8516    }
8517    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8518        &mut self.__buffa_unknown_fields
8519    }
8520}
8521impl ::buffa::json_helpers::ProtoElemJson for GetColumnLineageRequest {
8522    fn serialize_proto_json<S: ::serde::Serializer>(
8523        v: &Self,
8524        s: S,
8525    ) -> ::core::result::Result<S::Ok, S::Error> {
8526        ::serde::Serialize::serialize(v, s)
8527    }
8528    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8529        d: D,
8530    ) -> ::core::result::Result<Self, D::Error> {
8531        <Self as ::serde::Deserialize>::deserialize(d)
8532    }
8533}
8534#[doc(hidden)]
8535pub const __GET_COLUMN_LINEAGE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8536    type_url: "type.googleapis.com/headwaters.read.v1.GetColumnLineageRequest",
8537    to_json: ::buffa::type_registry::any_to_json::<GetColumnLineageRequest>,
8538    from_json: ::buffa::type_registry::any_from_json::<GetColumnLineageRequest>,
8539    is_wkt: false,
8540};
8541#[derive(Clone, PartialEq, Default)]
8542#[derive(::serde::Serialize, ::serde::Deserialize)]
8543#[serde(default)]
8544pub struct ListEventsRequest {
8545    /// Field 1: `limit`
8546    #[serde(
8547        rename = "limit",
8548        with = "::buffa::json_helpers::int32",
8549        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
8550    )]
8551    pub limit: i32,
8552    /// Field 2: `offset`
8553    #[serde(
8554        rename = "offset",
8555        with = "::buffa::json_helpers::int32",
8556        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
8557    )]
8558    pub offset: i32,
8559    #[serde(skip)]
8560    #[doc(hidden)]
8561    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8562}
8563impl ::core::fmt::Debug for ListEventsRequest {
8564    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8565        f.debug_struct("ListEventsRequest")
8566            .field("limit", &self.limit)
8567            .field("offset", &self.offset)
8568            .finish()
8569    }
8570}
8571impl ListEventsRequest {
8572    /// Protobuf type URL for this message, for use with `Any::pack` and
8573    /// `Any::unpack_if`.
8574    ///
8575    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8576    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListEventsRequest";
8577}
8578impl ::buffa::DefaultInstance for ListEventsRequest {
8579    fn default_instance() -> &'static Self {
8580        static VALUE: ::buffa::__private::OnceBox<ListEventsRequest> = ::buffa::__private::OnceBox::new();
8581        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8582    }
8583}
8584impl ::buffa::MessageName for ListEventsRequest {
8585    const PACKAGE: &'static str = "headwaters.read.v1";
8586    const NAME: &'static str = "ListEventsRequest";
8587    const FULL_NAME: &'static str = "headwaters.read.v1.ListEventsRequest";
8588    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListEventsRequest";
8589}
8590impl ::buffa::Message for ListEventsRequest {
8591    /// Returns the total encoded size in bytes.
8592    ///
8593    /// The result is a `u32`; the protobuf specification requires all
8594    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8595    /// compliant message will never overflow this type.
8596    #[allow(clippy::let_and_return)]
8597    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8598        #[allow(unused_imports)]
8599        use ::buffa::Enumeration as _;
8600        let mut size = 0u32;
8601        if self.limit != 0i32 {
8602            size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
8603        }
8604        if self.offset != 0i32 {
8605            size += 1u32 + ::buffa::types::int32_encoded_len(self.offset) as u32;
8606        }
8607        size += self.__buffa_unknown_fields.encoded_len() as u32;
8608        size
8609    }
8610    fn write_to(
8611        &self,
8612        _cache: &mut ::buffa::SizeCache,
8613        buf: &mut impl ::buffa::bytes::BufMut,
8614    ) {
8615        #[allow(unused_imports)]
8616        use ::buffa::Enumeration as _;
8617        if self.limit != 0i32 {
8618            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
8619                .encode(buf);
8620            ::buffa::types::encode_int32(self.limit, buf);
8621        }
8622        if self.offset != 0i32 {
8623            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
8624                .encode(buf);
8625            ::buffa::types::encode_int32(self.offset, buf);
8626        }
8627        self.__buffa_unknown_fields.write_to(buf);
8628    }
8629    fn merge_field(
8630        &mut self,
8631        tag: ::buffa::encoding::Tag,
8632        buf: &mut impl ::buffa::bytes::Buf,
8633        depth: u32,
8634    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8635        #[allow(unused_imports)]
8636        use ::buffa::bytes::Buf as _;
8637        #[allow(unused_imports)]
8638        use ::buffa::Enumeration as _;
8639        match tag.field_number() {
8640            1u32 => {
8641                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8642                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8643                        field_number: 1u32,
8644                        expected: 0u8,
8645                        actual: tag.wire_type() as u8,
8646                    });
8647                }
8648                self.limit = ::buffa::types::decode_int32(buf)?;
8649            }
8650            2u32 => {
8651                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8652                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8653                        field_number: 2u32,
8654                        expected: 0u8,
8655                        actual: tag.wire_type() as u8,
8656                    });
8657                }
8658                self.offset = ::buffa::types::decode_int32(buf)?;
8659            }
8660            _ => {
8661                self.__buffa_unknown_fields
8662                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8663            }
8664        }
8665        ::core::result::Result::Ok(())
8666    }
8667    fn clear(&mut self) {
8668        self.limit = 0i32;
8669        self.offset = 0i32;
8670        self.__buffa_unknown_fields.clear();
8671    }
8672}
8673impl ::buffa::ExtensionSet for ListEventsRequest {
8674    const PROTO_FQN: &'static str = "headwaters.read.v1.ListEventsRequest";
8675    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8676        &self.__buffa_unknown_fields
8677    }
8678    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8679        &mut self.__buffa_unknown_fields
8680    }
8681}
8682impl ::buffa::json_helpers::ProtoElemJson for ListEventsRequest {
8683    fn serialize_proto_json<S: ::serde::Serializer>(
8684        v: &Self,
8685        s: S,
8686    ) -> ::core::result::Result<S::Ok, S::Error> {
8687        ::serde::Serialize::serialize(v, s)
8688    }
8689    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8690        d: D,
8691    ) -> ::core::result::Result<Self, D::Error> {
8692        <Self as ::serde::Deserialize>::deserialize(d)
8693    }
8694}
8695#[doc(hidden)]
8696pub const __LIST_EVENTS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8697    type_url: "type.googleapis.com/headwaters.read.v1.ListEventsRequest",
8698    to_json: ::buffa::type_registry::any_to_json::<ListEventsRequest>,
8699    from_json: ::buffa::type_registry::any_from_json::<ListEventsRequest>,
8700    is_wkt: false,
8701};
8702#[derive(Clone, PartialEq, Default)]
8703#[derive(::serde::Serialize, ::serde::Deserialize)]
8704#[serde(default)]
8705pub struct GetRunFacetsRequest {
8706    /// Field 1: `run_id`
8707    #[serde(
8708        rename = "runId",
8709        alias = "run_id",
8710        with = "::buffa::json_helpers::proto_string",
8711        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
8712    )]
8713    pub run_id: ::buffa::alloc::string::String,
8714    #[serde(skip)]
8715    #[doc(hidden)]
8716    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8717}
8718impl ::core::fmt::Debug for GetRunFacetsRequest {
8719    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8720        f.debug_struct("GetRunFacetsRequest").field("run_id", &self.run_id).finish()
8721    }
8722}
8723impl GetRunFacetsRequest {
8724    /// Protobuf type URL for this message, for use with `Any::pack` and
8725    /// `Any::unpack_if`.
8726    ///
8727    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8728    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetRunFacetsRequest";
8729}
8730impl ::buffa::DefaultInstance for GetRunFacetsRequest {
8731    fn default_instance() -> &'static Self {
8732        static VALUE: ::buffa::__private::OnceBox<GetRunFacetsRequest> = ::buffa::__private::OnceBox::new();
8733        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8734    }
8735}
8736impl ::buffa::MessageName for GetRunFacetsRequest {
8737    const PACKAGE: &'static str = "headwaters.read.v1";
8738    const NAME: &'static str = "GetRunFacetsRequest";
8739    const FULL_NAME: &'static str = "headwaters.read.v1.GetRunFacetsRequest";
8740    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetRunFacetsRequest";
8741}
8742impl ::buffa::Message for GetRunFacetsRequest {
8743    /// Returns the total encoded size in bytes.
8744    ///
8745    /// The result is a `u32`; the protobuf specification requires all
8746    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8747    /// compliant message will never overflow this type.
8748    #[allow(clippy::let_and_return)]
8749    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8750        #[allow(unused_imports)]
8751        use ::buffa::Enumeration as _;
8752        let mut size = 0u32;
8753        if !self.run_id.is_empty() {
8754            size += 1u32 + ::buffa::types::string_encoded_len(&self.run_id) as u32;
8755        }
8756        size += self.__buffa_unknown_fields.encoded_len() as u32;
8757        size
8758    }
8759    fn write_to(
8760        &self,
8761        _cache: &mut ::buffa::SizeCache,
8762        buf: &mut impl ::buffa::bytes::BufMut,
8763    ) {
8764        #[allow(unused_imports)]
8765        use ::buffa::Enumeration as _;
8766        if !self.run_id.is_empty() {
8767            ::buffa::encoding::Tag::new(
8768                    1u32,
8769                    ::buffa::encoding::WireType::LengthDelimited,
8770                )
8771                .encode(buf);
8772            ::buffa::types::encode_string(&self.run_id, buf);
8773        }
8774        self.__buffa_unknown_fields.write_to(buf);
8775    }
8776    fn merge_field(
8777        &mut self,
8778        tag: ::buffa::encoding::Tag,
8779        buf: &mut impl ::buffa::bytes::Buf,
8780        depth: u32,
8781    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8782        #[allow(unused_imports)]
8783        use ::buffa::bytes::Buf as _;
8784        #[allow(unused_imports)]
8785        use ::buffa::Enumeration as _;
8786        match tag.field_number() {
8787            1u32 => {
8788                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8789                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8790                        field_number: 1u32,
8791                        expected: 2u8,
8792                        actual: tag.wire_type() as u8,
8793                    });
8794                }
8795                ::buffa::types::merge_string(&mut self.run_id, buf)?;
8796            }
8797            _ => {
8798                self.__buffa_unknown_fields
8799                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8800            }
8801        }
8802        ::core::result::Result::Ok(())
8803    }
8804    fn clear(&mut self) {
8805        self.run_id.clear();
8806        self.__buffa_unknown_fields.clear();
8807    }
8808}
8809impl ::buffa::ExtensionSet for GetRunFacetsRequest {
8810    const PROTO_FQN: &'static str = "headwaters.read.v1.GetRunFacetsRequest";
8811    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8812        &self.__buffa_unknown_fields
8813    }
8814    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8815        &mut self.__buffa_unknown_fields
8816    }
8817}
8818impl ::buffa::json_helpers::ProtoElemJson for GetRunFacetsRequest {
8819    fn serialize_proto_json<S: ::serde::Serializer>(
8820        v: &Self,
8821        s: S,
8822    ) -> ::core::result::Result<S::Ok, S::Error> {
8823        ::serde::Serialize::serialize(v, s)
8824    }
8825    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8826        d: D,
8827    ) -> ::core::result::Result<Self, D::Error> {
8828        <Self as ::serde::Deserialize>::deserialize(d)
8829    }
8830}
8831#[doc(hidden)]
8832pub const __GET_RUN_FACETS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8833    type_url: "type.googleapis.com/headwaters.read.v1.GetRunFacetsRequest",
8834    to_json: ::buffa::type_registry::any_to_json::<GetRunFacetsRequest>,
8835    from_json: ::buffa::type_registry::any_from_json::<GetRunFacetsRequest>,
8836    is_wkt: false,
8837};
8838#[derive(Clone, PartialEq, Default)]
8839#[derive(::serde::Serialize, ::serde::Deserialize)]
8840#[serde(default)]
8841pub struct ListTagsRequest {
8842    #[serde(skip)]
8843    #[doc(hidden)]
8844    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8845}
8846impl ::core::fmt::Debug for ListTagsRequest {
8847    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8848        f.debug_struct("ListTagsRequest").finish()
8849    }
8850}
8851impl ListTagsRequest {
8852    /// Protobuf type URL for this message, for use with `Any::pack` and
8853    /// `Any::unpack_if`.
8854    ///
8855    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8856    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListTagsRequest";
8857}
8858impl ::buffa::DefaultInstance for ListTagsRequest {
8859    fn default_instance() -> &'static Self {
8860        static VALUE: ::buffa::__private::OnceBox<ListTagsRequest> = ::buffa::__private::OnceBox::new();
8861        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8862    }
8863}
8864impl ::buffa::MessageName for ListTagsRequest {
8865    const PACKAGE: &'static str = "headwaters.read.v1";
8866    const NAME: &'static str = "ListTagsRequest";
8867    const FULL_NAME: &'static str = "headwaters.read.v1.ListTagsRequest";
8868    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListTagsRequest";
8869}
8870impl ::buffa::Message for ListTagsRequest {
8871    /// Returns the total encoded size in bytes.
8872    ///
8873    /// The result is a `u32`; the protobuf specification requires all
8874    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8875    /// compliant message will never overflow this type.
8876    #[allow(clippy::let_and_return)]
8877    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8878        #[allow(unused_imports)]
8879        use ::buffa::Enumeration as _;
8880        let mut size = 0u32;
8881        size += self.__buffa_unknown_fields.encoded_len() as u32;
8882        size
8883    }
8884    fn write_to(
8885        &self,
8886        _cache: &mut ::buffa::SizeCache,
8887        buf: &mut impl ::buffa::bytes::BufMut,
8888    ) {
8889        #[allow(unused_imports)]
8890        use ::buffa::Enumeration as _;
8891        self.__buffa_unknown_fields.write_to(buf);
8892    }
8893    fn merge_field(
8894        &mut self,
8895        tag: ::buffa::encoding::Tag,
8896        buf: &mut impl ::buffa::bytes::Buf,
8897        depth: u32,
8898    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8899        #[allow(unused_imports)]
8900        use ::buffa::bytes::Buf as _;
8901        #[allow(unused_imports)]
8902        use ::buffa::Enumeration as _;
8903        match tag.field_number() {
8904            _ => {
8905                self.__buffa_unknown_fields
8906                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8907            }
8908        }
8909        ::core::result::Result::Ok(())
8910    }
8911    fn clear(&mut self) {
8912        self.__buffa_unknown_fields.clear();
8913    }
8914}
8915impl ::buffa::ExtensionSet for ListTagsRequest {
8916    const PROTO_FQN: &'static str = "headwaters.read.v1.ListTagsRequest";
8917    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8918        &self.__buffa_unknown_fields
8919    }
8920    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8921        &mut self.__buffa_unknown_fields
8922    }
8923}
8924impl ::buffa::json_helpers::ProtoElemJson for ListTagsRequest {
8925    fn serialize_proto_json<S: ::serde::Serializer>(
8926        v: &Self,
8927        s: S,
8928    ) -> ::core::result::Result<S::Ok, S::Error> {
8929        ::serde::Serialize::serialize(v, s)
8930    }
8931    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8932        d: D,
8933    ) -> ::core::result::Result<Self, D::Error> {
8934        <Self as ::serde::Deserialize>::deserialize(d)
8935    }
8936}
8937#[doc(hidden)]
8938pub const __LIST_TAGS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8939    type_url: "type.googleapis.com/headwaters.read.v1.ListTagsRequest",
8940    to_json: ::buffa::type_registry::any_to_json::<ListTagsRequest>,
8941    from_json: ::buffa::type_registry::any_from_json::<ListTagsRequest>,
8942    is_wkt: false,
8943};
8944#[derive(Clone, PartialEq, Default)]
8945#[derive(::serde::Serialize, ::serde::Deserialize)]
8946#[serde(default)]
8947pub struct GetTagDownstreamRequest {
8948    /// Field 1: `tag`
8949    #[serde(
8950        rename = "tag",
8951        with = "::buffa::json_helpers::proto_string",
8952        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
8953    )]
8954    pub tag: ::buffa::alloc::string::String,
8955    #[serde(skip)]
8956    #[doc(hidden)]
8957    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8958}
8959impl ::core::fmt::Debug for GetTagDownstreamRequest {
8960    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8961        f.debug_struct("GetTagDownstreamRequest").field("tag", &self.tag).finish()
8962    }
8963}
8964impl GetTagDownstreamRequest {
8965    /// Protobuf type URL for this message, for use with `Any::pack` and
8966    /// `Any::unpack_if`.
8967    ///
8968    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8969    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetTagDownstreamRequest";
8970}
8971impl ::buffa::DefaultInstance for GetTagDownstreamRequest {
8972    fn default_instance() -> &'static Self {
8973        static VALUE: ::buffa::__private::OnceBox<GetTagDownstreamRequest> = ::buffa::__private::OnceBox::new();
8974        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8975    }
8976}
8977impl ::buffa::MessageName for GetTagDownstreamRequest {
8978    const PACKAGE: &'static str = "headwaters.read.v1";
8979    const NAME: &'static str = "GetTagDownstreamRequest";
8980    const FULL_NAME: &'static str = "headwaters.read.v1.GetTagDownstreamRequest";
8981    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetTagDownstreamRequest";
8982}
8983impl ::buffa::Message for GetTagDownstreamRequest {
8984    /// Returns the total encoded size in bytes.
8985    ///
8986    /// The result is a `u32`; the protobuf specification requires all
8987    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8988    /// compliant message will never overflow this type.
8989    #[allow(clippy::let_and_return)]
8990    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8991        #[allow(unused_imports)]
8992        use ::buffa::Enumeration as _;
8993        let mut size = 0u32;
8994        if !self.tag.is_empty() {
8995            size += 1u32 + ::buffa::types::string_encoded_len(&self.tag) as u32;
8996        }
8997        size += self.__buffa_unknown_fields.encoded_len() as u32;
8998        size
8999    }
9000    fn write_to(
9001        &self,
9002        _cache: &mut ::buffa::SizeCache,
9003        buf: &mut impl ::buffa::bytes::BufMut,
9004    ) {
9005        #[allow(unused_imports)]
9006        use ::buffa::Enumeration as _;
9007        if !self.tag.is_empty() {
9008            ::buffa::encoding::Tag::new(
9009                    1u32,
9010                    ::buffa::encoding::WireType::LengthDelimited,
9011                )
9012                .encode(buf);
9013            ::buffa::types::encode_string(&self.tag, buf);
9014        }
9015        self.__buffa_unknown_fields.write_to(buf);
9016    }
9017    fn merge_field(
9018        &mut self,
9019        tag: ::buffa::encoding::Tag,
9020        buf: &mut impl ::buffa::bytes::Buf,
9021        depth: u32,
9022    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9023        #[allow(unused_imports)]
9024        use ::buffa::bytes::Buf as _;
9025        #[allow(unused_imports)]
9026        use ::buffa::Enumeration as _;
9027        match tag.field_number() {
9028            1u32 => {
9029                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9030                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9031                        field_number: 1u32,
9032                        expected: 2u8,
9033                        actual: tag.wire_type() as u8,
9034                    });
9035                }
9036                ::buffa::types::merge_string(&mut self.tag, buf)?;
9037            }
9038            _ => {
9039                self.__buffa_unknown_fields
9040                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9041            }
9042        }
9043        ::core::result::Result::Ok(())
9044    }
9045    fn clear(&mut self) {
9046        self.tag.clear();
9047        self.__buffa_unknown_fields.clear();
9048    }
9049}
9050impl ::buffa::ExtensionSet for GetTagDownstreamRequest {
9051    const PROTO_FQN: &'static str = "headwaters.read.v1.GetTagDownstreamRequest";
9052    fn unknown_fields(&self) -> &::buffa::UnknownFields {
9053        &self.__buffa_unknown_fields
9054    }
9055    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9056        &mut self.__buffa_unknown_fields
9057    }
9058}
9059impl ::buffa::json_helpers::ProtoElemJson for GetTagDownstreamRequest {
9060    fn serialize_proto_json<S: ::serde::Serializer>(
9061        v: &Self,
9062        s: S,
9063    ) -> ::core::result::Result<S::Ok, S::Error> {
9064        ::serde::Serialize::serialize(v, s)
9065    }
9066    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
9067        d: D,
9068    ) -> ::core::result::Result<Self, D::Error> {
9069        <Self as ::serde::Deserialize>::deserialize(d)
9070    }
9071}
9072#[doc(hidden)]
9073pub const __GET_TAG_DOWNSTREAM_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
9074    type_url: "type.googleapis.com/headwaters.read.v1.GetTagDownstreamRequest",
9075    to_json: ::buffa::type_registry::any_to_json::<GetTagDownstreamRequest>,
9076    from_json: ::buffa::type_registry::any_from_json::<GetTagDownstreamRequest>,
9077    is_wkt: false,
9078};
9079#[derive(Clone, PartialEq, Default)]
9080#[derive(::serde::Serialize, ::serde::Deserialize)]
9081#[serde(default)]
9082pub struct GetLineageEventStatsRequest {
9083    /// Bucket size: `HOUR`, `DAY` (default), `WEEK`, or `MONTH`.
9084    ///
9085    /// Field 1: `period`
9086    #[serde(
9087        rename = "period",
9088        with = "::buffa::json_helpers::proto_string",
9089        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
9090    )]
9091    pub period: ::buffa::alloc::string::String,
9092    /// Maximum number of buckets to return.
9093    ///
9094    /// Field 2: `limit`
9095    #[serde(
9096        rename = "limit",
9097        with = "::buffa::json_helpers::int32",
9098        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
9099    )]
9100    pub limit: i32,
9101    #[serde(skip)]
9102    #[doc(hidden)]
9103    pub __buffa_unknown_fields: ::buffa::UnknownFields,
9104}
9105impl ::core::fmt::Debug for GetLineageEventStatsRequest {
9106    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9107        f.debug_struct("GetLineageEventStatsRequest")
9108            .field("period", &self.period)
9109            .field("limit", &self.limit)
9110            .finish()
9111    }
9112}
9113impl GetLineageEventStatsRequest {
9114    /// Protobuf type URL for this message, for use with `Any::pack` and
9115    /// `Any::unpack_if`.
9116    ///
9117    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9118    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetLineageEventStatsRequest";
9119}
9120impl ::buffa::DefaultInstance for GetLineageEventStatsRequest {
9121    fn default_instance() -> &'static Self {
9122        static VALUE: ::buffa::__private::OnceBox<GetLineageEventStatsRequest> = ::buffa::__private::OnceBox::new();
9123        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9124    }
9125}
9126impl ::buffa::MessageName for GetLineageEventStatsRequest {
9127    const PACKAGE: &'static str = "headwaters.read.v1";
9128    const NAME: &'static str = "GetLineageEventStatsRequest";
9129    const FULL_NAME: &'static str = "headwaters.read.v1.GetLineageEventStatsRequest";
9130    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetLineageEventStatsRequest";
9131}
9132impl ::buffa::Message for GetLineageEventStatsRequest {
9133    /// Returns the total encoded size in bytes.
9134    ///
9135    /// The result is a `u32`; the protobuf specification requires all
9136    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9137    /// compliant message will never overflow this type.
9138    #[allow(clippy::let_and_return)]
9139    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9140        #[allow(unused_imports)]
9141        use ::buffa::Enumeration as _;
9142        let mut size = 0u32;
9143        if !self.period.is_empty() {
9144            size += 1u32 + ::buffa::types::string_encoded_len(&self.period) as u32;
9145        }
9146        if self.limit != 0i32 {
9147            size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
9148        }
9149        size += self.__buffa_unknown_fields.encoded_len() as u32;
9150        size
9151    }
9152    fn write_to(
9153        &self,
9154        _cache: &mut ::buffa::SizeCache,
9155        buf: &mut impl ::buffa::bytes::BufMut,
9156    ) {
9157        #[allow(unused_imports)]
9158        use ::buffa::Enumeration as _;
9159        if !self.period.is_empty() {
9160            ::buffa::encoding::Tag::new(
9161                    1u32,
9162                    ::buffa::encoding::WireType::LengthDelimited,
9163                )
9164                .encode(buf);
9165            ::buffa::types::encode_string(&self.period, buf);
9166        }
9167        if self.limit != 0i32 {
9168            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
9169                .encode(buf);
9170            ::buffa::types::encode_int32(self.limit, buf);
9171        }
9172        self.__buffa_unknown_fields.write_to(buf);
9173    }
9174    fn merge_field(
9175        &mut self,
9176        tag: ::buffa::encoding::Tag,
9177        buf: &mut impl ::buffa::bytes::Buf,
9178        depth: u32,
9179    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9180        #[allow(unused_imports)]
9181        use ::buffa::bytes::Buf as _;
9182        #[allow(unused_imports)]
9183        use ::buffa::Enumeration as _;
9184        match tag.field_number() {
9185            1u32 => {
9186                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9187                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9188                        field_number: 1u32,
9189                        expected: 2u8,
9190                        actual: tag.wire_type() as u8,
9191                    });
9192                }
9193                ::buffa::types::merge_string(&mut self.period, buf)?;
9194            }
9195            2u32 => {
9196                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9197                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9198                        field_number: 2u32,
9199                        expected: 0u8,
9200                        actual: tag.wire_type() as u8,
9201                    });
9202                }
9203                self.limit = ::buffa::types::decode_int32(buf)?;
9204            }
9205            _ => {
9206                self.__buffa_unknown_fields
9207                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9208            }
9209        }
9210        ::core::result::Result::Ok(())
9211    }
9212    fn clear(&mut self) {
9213        self.period.clear();
9214        self.limit = 0i32;
9215        self.__buffa_unknown_fields.clear();
9216    }
9217}
9218impl ::buffa::ExtensionSet for GetLineageEventStatsRequest {
9219    const PROTO_FQN: &'static str = "headwaters.read.v1.GetLineageEventStatsRequest";
9220    fn unknown_fields(&self) -> &::buffa::UnknownFields {
9221        &self.__buffa_unknown_fields
9222    }
9223    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9224        &mut self.__buffa_unknown_fields
9225    }
9226}
9227impl ::buffa::json_helpers::ProtoElemJson for GetLineageEventStatsRequest {
9228    fn serialize_proto_json<S: ::serde::Serializer>(
9229        v: &Self,
9230        s: S,
9231    ) -> ::core::result::Result<S::Ok, S::Error> {
9232        ::serde::Serialize::serialize(v, s)
9233    }
9234    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
9235        d: D,
9236    ) -> ::core::result::Result<Self, D::Error> {
9237        <Self as ::serde::Deserialize>::deserialize(d)
9238    }
9239}
9240#[doc(hidden)]
9241pub const __GET_LINEAGE_EVENT_STATS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
9242    type_url: "type.googleapis.com/headwaters.read.v1.GetLineageEventStatsRequest",
9243    to_json: ::buffa::type_registry::any_to_json::<GetLineageEventStatsRequest>,
9244    from_json: ::buffa::type_registry::any_from_json::<GetLineageEventStatsRequest>,
9245    is_wkt: false,
9246};
9247#[derive(Clone, PartialEq, Default)]
9248#[derive(::serde::Serialize, ::serde::Deserialize)]
9249#[serde(default)]
9250pub struct GetAssetStatsRequest {
9251    /// Which asset to count: `jobs` or `datasets`.
9252    ///
9253    /// Field 1: `asset`
9254    #[serde(
9255        rename = "asset",
9256        with = "::buffa::json_helpers::proto_string",
9257        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
9258    )]
9259    pub asset: ::buffa::alloc::string::String,
9260    /// Bucket size: `HOUR`, `DAY` (default), `WEEK`, or `MONTH`.
9261    ///
9262    /// Field 2: `period`
9263    #[serde(
9264        rename = "period",
9265        with = "::buffa::json_helpers::proto_string",
9266        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
9267    )]
9268    pub period: ::buffa::alloc::string::String,
9269    /// Field 3: `limit`
9270    #[serde(
9271        rename = "limit",
9272        with = "::buffa::json_helpers::int32",
9273        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i32"
9274    )]
9275    pub limit: i32,
9276    #[serde(skip)]
9277    #[doc(hidden)]
9278    pub __buffa_unknown_fields: ::buffa::UnknownFields,
9279}
9280impl ::core::fmt::Debug for GetAssetStatsRequest {
9281    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9282        f.debug_struct("GetAssetStatsRequest")
9283            .field("asset", &self.asset)
9284            .field("period", &self.period)
9285            .field("limit", &self.limit)
9286            .finish()
9287    }
9288}
9289impl GetAssetStatsRequest {
9290    /// Protobuf type URL for this message, for use with `Any::pack` and
9291    /// `Any::unpack_if`.
9292    ///
9293    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9294    pub const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetAssetStatsRequest";
9295}
9296impl ::buffa::DefaultInstance for GetAssetStatsRequest {
9297    fn default_instance() -> &'static Self {
9298        static VALUE: ::buffa::__private::OnceBox<GetAssetStatsRequest> = ::buffa::__private::OnceBox::new();
9299        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9300    }
9301}
9302impl ::buffa::MessageName for GetAssetStatsRequest {
9303    const PACKAGE: &'static str = "headwaters.read.v1";
9304    const NAME: &'static str = "GetAssetStatsRequest";
9305    const FULL_NAME: &'static str = "headwaters.read.v1.GetAssetStatsRequest";
9306    const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetAssetStatsRequest";
9307}
9308impl ::buffa::Message for GetAssetStatsRequest {
9309    /// Returns the total encoded size in bytes.
9310    ///
9311    /// The result is a `u32`; the protobuf specification requires all
9312    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9313    /// compliant message will never overflow this type.
9314    #[allow(clippy::let_and_return)]
9315    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9316        #[allow(unused_imports)]
9317        use ::buffa::Enumeration as _;
9318        let mut size = 0u32;
9319        if !self.asset.is_empty() {
9320            size += 1u32 + ::buffa::types::string_encoded_len(&self.asset) as u32;
9321        }
9322        if !self.period.is_empty() {
9323            size += 1u32 + ::buffa::types::string_encoded_len(&self.period) as u32;
9324        }
9325        if self.limit != 0i32 {
9326            size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
9327        }
9328        size += self.__buffa_unknown_fields.encoded_len() as u32;
9329        size
9330    }
9331    fn write_to(
9332        &self,
9333        _cache: &mut ::buffa::SizeCache,
9334        buf: &mut impl ::buffa::bytes::BufMut,
9335    ) {
9336        #[allow(unused_imports)]
9337        use ::buffa::Enumeration as _;
9338        if !self.asset.is_empty() {
9339            ::buffa::encoding::Tag::new(
9340                    1u32,
9341                    ::buffa::encoding::WireType::LengthDelimited,
9342                )
9343                .encode(buf);
9344            ::buffa::types::encode_string(&self.asset, buf);
9345        }
9346        if !self.period.is_empty() {
9347            ::buffa::encoding::Tag::new(
9348                    2u32,
9349                    ::buffa::encoding::WireType::LengthDelimited,
9350                )
9351                .encode(buf);
9352            ::buffa::types::encode_string(&self.period, buf);
9353        }
9354        if self.limit != 0i32 {
9355            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
9356                .encode(buf);
9357            ::buffa::types::encode_int32(self.limit, buf);
9358        }
9359        self.__buffa_unknown_fields.write_to(buf);
9360    }
9361    fn merge_field(
9362        &mut self,
9363        tag: ::buffa::encoding::Tag,
9364        buf: &mut impl ::buffa::bytes::Buf,
9365        depth: u32,
9366    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9367        #[allow(unused_imports)]
9368        use ::buffa::bytes::Buf as _;
9369        #[allow(unused_imports)]
9370        use ::buffa::Enumeration as _;
9371        match tag.field_number() {
9372            1u32 => {
9373                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9374                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9375                        field_number: 1u32,
9376                        expected: 2u8,
9377                        actual: tag.wire_type() as u8,
9378                    });
9379                }
9380                ::buffa::types::merge_string(&mut self.asset, buf)?;
9381            }
9382            2u32 => {
9383                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9384                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9385                        field_number: 2u32,
9386                        expected: 2u8,
9387                        actual: tag.wire_type() as u8,
9388                    });
9389                }
9390                ::buffa::types::merge_string(&mut self.period, buf)?;
9391            }
9392            3u32 => {
9393                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9394                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9395                        field_number: 3u32,
9396                        expected: 0u8,
9397                        actual: tag.wire_type() as u8,
9398                    });
9399                }
9400                self.limit = ::buffa::types::decode_int32(buf)?;
9401            }
9402            _ => {
9403                self.__buffa_unknown_fields
9404                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9405            }
9406        }
9407        ::core::result::Result::Ok(())
9408    }
9409    fn clear(&mut self) {
9410        self.asset.clear();
9411        self.period.clear();
9412        self.limit = 0i32;
9413        self.__buffa_unknown_fields.clear();
9414    }
9415}
9416impl ::buffa::ExtensionSet for GetAssetStatsRequest {
9417    const PROTO_FQN: &'static str = "headwaters.read.v1.GetAssetStatsRequest";
9418    fn unknown_fields(&self) -> &::buffa::UnknownFields {
9419        &self.__buffa_unknown_fields
9420    }
9421    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9422        &mut self.__buffa_unknown_fields
9423    }
9424}
9425impl ::buffa::json_helpers::ProtoElemJson for GetAssetStatsRequest {
9426    fn serialize_proto_json<S: ::serde::Serializer>(
9427        v: &Self,
9428        s: S,
9429    ) -> ::core::result::Result<S::Ok, S::Error> {
9430        ::serde::Serialize::serialize(v, s)
9431    }
9432    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
9433        d: D,
9434    ) -> ::core::result::Result<Self, D::Error> {
9435        <Self as ::serde::Deserialize>::deserialize(d)
9436    }
9437}
9438#[doc(hidden)]
9439pub const __GET_ASSET_STATS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
9440    type_url: "type.googleapis.com/headwaters.read.v1.GetAssetStatsRequest",
9441    to_json: ::buffa::type_registry::any_to_json::<GetAssetStatsRequest>,
9442    from_json: ::buffa::type_registry::any_from_json::<GetAssetStatsRequest>,
9443    is_wkt: false,
9444};
9445#[allow(
9446    non_camel_case_types,
9447    dead_code,
9448    unused_imports,
9449    unused_qualifications,
9450    clippy::derivable_impls,
9451    clippy::match_single_binding,
9452    clippy::uninlined_format_args,
9453    clippy::doc_lazy_continuation,
9454    clippy::module_inception
9455)]
9456pub mod __buffa {
9457    #[allow(unused_imports)]
9458    use super::*;
9459    pub mod view {
9460        #[allow(unused_imports)]
9461        use super::*;
9462        /// A `{namespace, name}` reference to a job or dataset.
9463        #[derive(Clone, Debug, Default)]
9464        pub struct EntityIdView<'a> {
9465            /// Field 1: `namespace`
9466            pub namespace: &'a str,
9467            /// Field 2: `name`
9468            pub name: &'a str,
9469            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9470        }
9471        impl<'a> EntityIdView<'a> {
9472            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9473            ///
9474            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9475            /// and by generated sub-message decode arms with `depth - 1`.
9476            ///
9477            /// **Not part of the public API.** Named with a leading underscore to
9478            /// signal that it is for generated-code use only.
9479            #[doc(hidden)]
9480            pub fn _decode_depth(
9481                buf: &'a [u8],
9482                depth: u32,
9483            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9484                let mut view = Self::default();
9485                view._merge_into_view(buf, depth)?;
9486                ::core::result::Result::Ok(view)
9487            }
9488            /// Merge fields from `buf` into this view (proto merge semantics).
9489            ///
9490            /// Repeated fields append; singular fields last-wins; singular
9491            /// MESSAGE fields merge recursively. Used by sub-message decode
9492            /// arms when the same field appears multiple times on the wire.
9493            ///
9494            /// **Not part of the public API.**
9495            #[doc(hidden)]
9496            pub fn _merge_into_view(
9497                &mut self,
9498                buf: &'a [u8],
9499                depth: u32,
9500            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9501                let _ = depth;
9502                #[allow(unused_variables)]
9503                let view = self;
9504                let mut cur: &'a [u8] = buf;
9505                while !cur.is_empty() {
9506                    let before_tag = cur;
9507                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9508                    match tag.field_number() {
9509                        1u32 => {
9510                            if tag.wire_type()
9511                                != ::buffa::encoding::WireType::LengthDelimited
9512                            {
9513                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9514                                    field_number: 1u32,
9515                                    expected: 2u8,
9516                                    actual: tag.wire_type() as u8,
9517                                });
9518                            }
9519                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
9520                        }
9521                        2u32 => {
9522                            if tag.wire_type()
9523                                != ::buffa::encoding::WireType::LengthDelimited
9524                            {
9525                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9526                                    field_number: 2u32,
9527                                    expected: 2u8,
9528                                    actual: tag.wire_type() as u8,
9529                                });
9530                            }
9531                            view.name = ::buffa::types::borrow_str(&mut cur)?;
9532                        }
9533                        _ => {
9534                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9535                            let span_len = before_tag.len() - cur.len();
9536                            view.__buffa_unknown_fields
9537                                .push_raw(&before_tag[..span_len]);
9538                        }
9539                    }
9540                }
9541                ::core::result::Result::Ok(())
9542            }
9543        }
9544        impl<'a> ::buffa::MessageView<'a> for EntityIdView<'a> {
9545            type Owned = super::super::EntityId;
9546            fn decode_view(
9547                buf: &'a [u8],
9548            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9549                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9550            }
9551            fn decode_view_with_limit(
9552                buf: &'a [u8],
9553                depth: u32,
9554            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9555                Self::_decode_depth(buf, depth)
9556            }
9557            fn to_owned_message(&self) -> super::super::EntityId {
9558                self.to_owned_from_source(None)
9559            }
9560            #[allow(clippy::useless_conversion, clippy::needless_update)]
9561            fn to_owned_from_source(
9562                &self,
9563                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9564            ) -> super::super::EntityId {
9565                #[allow(unused_imports)]
9566                use ::buffa::alloc::string::ToString as _;
9567                let _ = __buffa_src;
9568                super::super::EntityId {
9569                    namespace: self.namespace.to_string(),
9570                    name: self.name.to_string(),
9571                    __buffa_unknown_fields: self
9572                        .__buffa_unknown_fields
9573                        .to_owned()
9574                        .unwrap_or_default()
9575                        .into(),
9576                    ..::core::default::Default::default()
9577                }
9578            }
9579        }
9580        impl<'a> ::buffa::ViewEncode<'a> for EntityIdView<'a> {
9581            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9582            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9583                #[allow(unused_imports)]
9584                use ::buffa::Enumeration as _;
9585                let mut size = 0u32;
9586                if !self.namespace.is_empty() {
9587                    size
9588                        += 1u32
9589                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
9590                }
9591                if !self.name.is_empty() {
9592                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
9593                }
9594                size += self.__buffa_unknown_fields.encoded_len() as u32;
9595                size
9596            }
9597            #[allow(clippy::needless_borrow)]
9598            fn write_to(
9599                &self,
9600                _cache: &mut ::buffa::SizeCache,
9601                buf: &mut impl ::buffa::bytes::BufMut,
9602            ) {
9603                #[allow(unused_imports)]
9604                use ::buffa::Enumeration as _;
9605                if !self.namespace.is_empty() {
9606                    ::buffa::encoding::Tag::new(
9607                            1u32,
9608                            ::buffa::encoding::WireType::LengthDelimited,
9609                        )
9610                        .encode(buf);
9611                    ::buffa::types::encode_string(&self.namespace, buf);
9612                }
9613                if !self.name.is_empty() {
9614                    ::buffa::encoding::Tag::new(
9615                            2u32,
9616                            ::buffa::encoding::WireType::LengthDelimited,
9617                        )
9618                        .encode(buf);
9619                    ::buffa::types::encode_string(&self.name, buf);
9620                }
9621                self.__buffa_unknown_fields.write_to(buf);
9622            }
9623        }
9624        /// Serializes this view as protobuf JSON.
9625        ///
9626        /// Implicit-presence fields with default values are omitted, `required`
9627        /// fields are always emitted, explicit-presence (`optional`) fields are
9628        /// emitted only when set, bytes fields are base64-encoded, and enum
9629        /// values are their proto name strings.
9630        ///
9631        /// This impl uses `serialize_map(None)` because the number of emitted
9632        /// fields depends on default-omission rules; serializers that require
9633        /// known map lengths (e.g. `bincode`) will return a runtime error.
9634        /// Use the owned message type for those formats.
9635        impl<'__a> ::serde::Serialize for EntityIdView<'__a> {
9636            fn serialize<__S: ::serde::Serializer>(
9637                &self,
9638                __s: __S,
9639            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9640                use ::serde::ser::SerializeMap as _;
9641                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9642                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
9643                    __map.serialize_entry("namespace", self.namespace)?;
9644                }
9645                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
9646                    __map.serialize_entry("name", self.name)?;
9647                }
9648                __map.end()
9649            }
9650        }
9651        impl<'a> ::buffa::MessageName for EntityIdView<'a> {
9652            const PACKAGE: &'static str = "headwaters.read.v1";
9653            const NAME: &'static str = "EntityId";
9654            const FULL_NAME: &'static str = "headwaters.read.v1.EntityId";
9655            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.EntityId";
9656        }
9657        impl<'v> ::buffa::DefaultViewInstance for EntityIdView<'v> {
9658            fn default_view_instance<'a>() -> &'a Self
9659            where
9660                Self: 'a,
9661            {
9662                static VALUE: ::buffa::__private::OnceBox<EntityIdView<'static>> = ::buffa::__private::OnceBox::new();
9663                VALUE
9664                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9665                        <EntityIdView<'static>>::default(),
9666                    ))
9667            }
9668        }
9669        impl ::buffa::ViewReborrow for EntityIdView<'static> {
9670            type Reborrowed<'b> = EntityIdView<'b>;
9671            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9672                this
9673            }
9674        }
9675        /** Self-contained, `'static` owned view of a `EntityId` message.
9676
9677 Wraps [`::buffa::OwnedView`]`<`[`EntityIdView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
9678
9679 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`EntityIdView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9680        #[derive(Clone, Debug)]
9681        pub struct EntityIdOwnedView(::buffa::OwnedView<EntityIdView<'static>>);
9682        impl EntityIdOwnedView {
9683            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9684            ///
9685            /// The view borrows directly from the buffer's data; the buffer is
9686            /// retained inside the returned handle.
9687            ///
9688            /// # Errors
9689            ///
9690            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9691            /// protobuf data.
9692            pub fn decode(
9693                bytes: ::buffa::bytes::Bytes,
9694            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9695                ::core::result::Result::Ok(
9696                    EntityIdOwnedView(::buffa::OwnedView::decode(bytes)?),
9697                )
9698            }
9699            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9700            /// max message size).
9701            ///
9702            /// # Errors
9703            ///
9704            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9705            /// exceeds the configured limits.
9706            pub fn decode_with_options(
9707                bytes: ::buffa::bytes::Bytes,
9708                opts: &::buffa::DecodeOptions,
9709            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9710                ::core::result::Result::Ok(
9711                    EntityIdOwnedView(
9712                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9713                    ),
9714                )
9715            }
9716            /// Build from an owned message via an encode → decode round-trip.
9717            ///
9718            /// # Errors
9719            ///
9720            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9721            /// somehow invalid (should not happen for well-formed messages).
9722            pub fn from_owned(
9723                msg: &super::super::EntityId,
9724            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9725                ::core::result::Result::Ok(
9726                    EntityIdOwnedView(::buffa::OwnedView::from_owned(msg)?),
9727                )
9728            }
9729            /// Borrow the full [`EntityIdView`] with its lifetime tied to `&self`.
9730            #[must_use]
9731            pub fn view(&self) -> &EntityIdView<'_> {
9732                self.0.reborrow()
9733            }
9734            /// Convert to the owned message type.
9735            #[must_use]
9736            pub fn to_owned_message(&self) -> super::super::EntityId {
9737                self.0.to_owned_message()
9738            }
9739            /// The underlying bytes buffer.
9740            #[must_use]
9741            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9742                self.0.bytes()
9743            }
9744            /// Consume the handle, returning the underlying bytes buffer.
9745            #[must_use]
9746            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9747                self.0.into_bytes()
9748            }
9749            /// Field 1: `namespace`
9750            #[must_use]
9751            pub fn namespace(&self) -> &'_ str {
9752                self.0.reborrow().namespace
9753            }
9754            /// Field 2: `name`
9755            #[must_use]
9756            pub fn name(&self) -> &'_ str {
9757                self.0.reborrow().name
9758            }
9759        }
9760        impl ::core::convert::From<::buffa::OwnedView<EntityIdView<'static>>>
9761        for EntityIdOwnedView {
9762            fn from(inner: ::buffa::OwnedView<EntityIdView<'static>>) -> Self {
9763                EntityIdOwnedView(inner)
9764            }
9765        }
9766        impl ::core::convert::From<EntityIdOwnedView>
9767        for ::buffa::OwnedView<EntityIdView<'static>> {
9768            fn from(wrapper: EntityIdOwnedView) -> Self {
9769                wrapper.0
9770            }
9771        }
9772        impl ::core::convert::AsRef<::buffa::OwnedView<EntityIdView<'static>>>
9773        for EntityIdOwnedView {
9774            fn as_ref(&self) -> &::buffa::OwnedView<EntityIdView<'static>> {
9775                &self.0
9776            }
9777        }
9778        impl ::buffa::HasMessageView for super::super::EntityId {
9779            type View<'a> = EntityIdView<'a>;
9780            type ViewHandle = EntityIdOwnedView;
9781        }
9782        impl ::serde::Serialize for EntityIdOwnedView {
9783            fn serialize<__S: ::serde::Serializer>(
9784                &self,
9785                __s: __S,
9786            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9787                ::serde::Serialize::serialize(&self.0, __s)
9788            }
9789        }
9790        /// --- namespaces ---
9791        ///
9792        /// A namespace: the grouping that scopes job and dataset names.
9793        #[derive(Clone, Debug, Default)]
9794        pub struct NamespaceView<'a> {
9795            /// Field 1: `name`
9796            pub name: &'a str,
9797            /// Field 2: `created_at`
9798            pub created_at: &'a str,
9799            /// Field 3: `updated_at`
9800            pub updated_at: &'a str,
9801            /// Field 4: `owner_name`
9802            pub owner_name: &'a str,
9803            /// Field 5: `description`
9804            pub description: &'a str,
9805            /// True if the namespace is hidden from default listings.
9806            ///
9807            /// Field 6: `is_hidden`
9808            pub is_hidden: bool,
9809            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9810        }
9811        impl<'a> NamespaceView<'a> {
9812            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9813            ///
9814            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9815            /// and by generated sub-message decode arms with `depth - 1`.
9816            ///
9817            /// **Not part of the public API.** Named with a leading underscore to
9818            /// signal that it is for generated-code use only.
9819            #[doc(hidden)]
9820            pub fn _decode_depth(
9821                buf: &'a [u8],
9822                depth: u32,
9823            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9824                let mut view = Self::default();
9825                view._merge_into_view(buf, depth)?;
9826                ::core::result::Result::Ok(view)
9827            }
9828            /// Merge fields from `buf` into this view (proto merge semantics).
9829            ///
9830            /// Repeated fields append; singular fields last-wins; singular
9831            /// MESSAGE fields merge recursively. Used by sub-message decode
9832            /// arms when the same field appears multiple times on the wire.
9833            ///
9834            /// **Not part of the public API.**
9835            #[doc(hidden)]
9836            pub fn _merge_into_view(
9837                &mut self,
9838                buf: &'a [u8],
9839                depth: u32,
9840            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9841                let _ = depth;
9842                #[allow(unused_variables)]
9843                let view = self;
9844                let mut cur: &'a [u8] = buf;
9845                while !cur.is_empty() {
9846                    let before_tag = cur;
9847                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9848                    match tag.field_number() {
9849                        1u32 => {
9850                            if tag.wire_type()
9851                                != ::buffa::encoding::WireType::LengthDelimited
9852                            {
9853                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9854                                    field_number: 1u32,
9855                                    expected: 2u8,
9856                                    actual: tag.wire_type() as u8,
9857                                });
9858                            }
9859                            view.name = ::buffa::types::borrow_str(&mut cur)?;
9860                        }
9861                        2u32 => {
9862                            if tag.wire_type()
9863                                != ::buffa::encoding::WireType::LengthDelimited
9864                            {
9865                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9866                                    field_number: 2u32,
9867                                    expected: 2u8,
9868                                    actual: tag.wire_type() as u8,
9869                                });
9870                            }
9871                            view.created_at = ::buffa::types::borrow_str(&mut cur)?;
9872                        }
9873                        3u32 => {
9874                            if tag.wire_type()
9875                                != ::buffa::encoding::WireType::LengthDelimited
9876                            {
9877                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9878                                    field_number: 3u32,
9879                                    expected: 2u8,
9880                                    actual: tag.wire_type() as u8,
9881                                });
9882                            }
9883                            view.updated_at = ::buffa::types::borrow_str(&mut cur)?;
9884                        }
9885                        4u32 => {
9886                            if tag.wire_type()
9887                                != ::buffa::encoding::WireType::LengthDelimited
9888                            {
9889                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9890                                    field_number: 4u32,
9891                                    expected: 2u8,
9892                                    actual: tag.wire_type() as u8,
9893                                });
9894                            }
9895                            view.owner_name = ::buffa::types::borrow_str(&mut cur)?;
9896                        }
9897                        5u32 => {
9898                            if tag.wire_type()
9899                                != ::buffa::encoding::WireType::LengthDelimited
9900                            {
9901                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9902                                    field_number: 5u32,
9903                                    expected: 2u8,
9904                                    actual: tag.wire_type() as u8,
9905                                });
9906                            }
9907                            view.description = ::buffa::types::borrow_str(&mut cur)?;
9908                        }
9909                        6u32 => {
9910                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9911                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9912                                    field_number: 6u32,
9913                                    expected: 0u8,
9914                                    actual: tag.wire_type() as u8,
9915                                });
9916                            }
9917                            view.is_hidden = ::buffa::types::decode_bool(&mut cur)?;
9918                        }
9919                        _ => {
9920                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9921                            let span_len = before_tag.len() - cur.len();
9922                            view.__buffa_unknown_fields
9923                                .push_raw(&before_tag[..span_len]);
9924                        }
9925                    }
9926                }
9927                ::core::result::Result::Ok(())
9928            }
9929        }
9930        impl<'a> ::buffa::MessageView<'a> for NamespaceView<'a> {
9931            type Owned = super::super::Namespace;
9932            fn decode_view(
9933                buf: &'a [u8],
9934            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9935                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9936            }
9937            fn decode_view_with_limit(
9938                buf: &'a [u8],
9939                depth: u32,
9940            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9941                Self::_decode_depth(buf, depth)
9942            }
9943            fn to_owned_message(&self) -> super::super::Namespace {
9944                self.to_owned_from_source(None)
9945            }
9946            #[allow(clippy::useless_conversion, clippy::needless_update)]
9947            fn to_owned_from_source(
9948                &self,
9949                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9950            ) -> super::super::Namespace {
9951                #[allow(unused_imports)]
9952                use ::buffa::alloc::string::ToString as _;
9953                let _ = __buffa_src;
9954                super::super::Namespace {
9955                    name: self.name.to_string(),
9956                    created_at: self.created_at.to_string(),
9957                    updated_at: self.updated_at.to_string(),
9958                    owner_name: self.owner_name.to_string(),
9959                    description: self.description.to_string(),
9960                    is_hidden: self.is_hidden,
9961                    __buffa_unknown_fields: self
9962                        .__buffa_unknown_fields
9963                        .to_owned()
9964                        .unwrap_or_default()
9965                        .into(),
9966                    ..::core::default::Default::default()
9967                }
9968            }
9969        }
9970        impl<'a> ::buffa::ViewEncode<'a> for NamespaceView<'a> {
9971            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9972            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9973                #[allow(unused_imports)]
9974                use ::buffa::Enumeration as _;
9975                let mut size = 0u32;
9976                if !self.name.is_empty() {
9977                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
9978                }
9979                if !self.created_at.is_empty() {
9980                    size
9981                        += 1u32
9982                            + ::buffa::types::string_encoded_len(&self.created_at)
9983                                as u32;
9984                }
9985                if !self.updated_at.is_empty() {
9986                    size
9987                        += 1u32
9988                            + ::buffa::types::string_encoded_len(&self.updated_at)
9989                                as u32;
9990                }
9991                if !self.owner_name.is_empty() {
9992                    size
9993                        += 1u32
9994                            + ::buffa::types::string_encoded_len(&self.owner_name)
9995                                as u32;
9996                }
9997                if !self.description.is_empty() {
9998                    size
9999                        += 1u32
10000                            + ::buffa::types::string_encoded_len(&self.description)
10001                                as u32;
10002                }
10003                if self.is_hidden {
10004                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10005                }
10006                size += self.__buffa_unknown_fields.encoded_len() as u32;
10007                size
10008            }
10009            #[allow(clippy::needless_borrow)]
10010            fn write_to(
10011                &self,
10012                _cache: &mut ::buffa::SizeCache,
10013                buf: &mut impl ::buffa::bytes::BufMut,
10014            ) {
10015                #[allow(unused_imports)]
10016                use ::buffa::Enumeration as _;
10017                if !self.name.is_empty() {
10018                    ::buffa::encoding::Tag::new(
10019                            1u32,
10020                            ::buffa::encoding::WireType::LengthDelimited,
10021                        )
10022                        .encode(buf);
10023                    ::buffa::types::encode_string(&self.name, buf);
10024                }
10025                if !self.created_at.is_empty() {
10026                    ::buffa::encoding::Tag::new(
10027                            2u32,
10028                            ::buffa::encoding::WireType::LengthDelimited,
10029                        )
10030                        .encode(buf);
10031                    ::buffa::types::encode_string(&self.created_at, buf);
10032                }
10033                if !self.updated_at.is_empty() {
10034                    ::buffa::encoding::Tag::new(
10035                            3u32,
10036                            ::buffa::encoding::WireType::LengthDelimited,
10037                        )
10038                        .encode(buf);
10039                    ::buffa::types::encode_string(&self.updated_at, buf);
10040                }
10041                if !self.owner_name.is_empty() {
10042                    ::buffa::encoding::Tag::new(
10043                            4u32,
10044                            ::buffa::encoding::WireType::LengthDelimited,
10045                        )
10046                        .encode(buf);
10047                    ::buffa::types::encode_string(&self.owner_name, buf);
10048                }
10049                if !self.description.is_empty() {
10050                    ::buffa::encoding::Tag::new(
10051                            5u32,
10052                            ::buffa::encoding::WireType::LengthDelimited,
10053                        )
10054                        .encode(buf);
10055                    ::buffa::types::encode_string(&self.description, buf);
10056                }
10057                if self.is_hidden {
10058                    ::buffa::encoding::Tag::new(
10059                            6u32,
10060                            ::buffa::encoding::WireType::Varint,
10061                        )
10062                        .encode(buf);
10063                    ::buffa::types::encode_bool(self.is_hidden, buf);
10064                }
10065                self.__buffa_unknown_fields.write_to(buf);
10066            }
10067        }
10068        /// Serializes this view as protobuf JSON.
10069        ///
10070        /// Implicit-presence fields with default values are omitted, `required`
10071        /// fields are always emitted, explicit-presence (`optional`) fields are
10072        /// emitted only when set, bytes fields are base64-encoded, and enum
10073        /// values are their proto name strings.
10074        ///
10075        /// This impl uses `serialize_map(None)` because the number of emitted
10076        /// fields depends on default-omission rules; serializers that require
10077        /// known map lengths (e.g. `bincode`) will return a runtime error.
10078        /// Use the owned message type for those formats.
10079        impl<'__a> ::serde::Serialize for NamespaceView<'__a> {
10080            fn serialize<__S: ::serde::Serializer>(
10081                &self,
10082                __s: __S,
10083            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10084                use ::serde::ser::SerializeMap as _;
10085                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10086                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
10087                    __map.serialize_entry("name", self.name)?;
10088                }
10089                if !::buffa::json_helpers::skip_if::is_empty_str(self.created_at) {
10090                    __map.serialize_entry("createdAt", self.created_at)?;
10091                }
10092                if !::buffa::json_helpers::skip_if::is_empty_str(self.updated_at) {
10093                    __map.serialize_entry("updatedAt", self.updated_at)?;
10094                }
10095                if !::buffa::json_helpers::skip_if::is_empty_str(self.owner_name) {
10096                    __map.serialize_entry("ownerName", self.owner_name)?;
10097                }
10098                if !::buffa::json_helpers::skip_if::is_empty_str(self.description) {
10099                    __map.serialize_entry("description", self.description)?;
10100                }
10101                if self.is_hidden {
10102                    __map.serialize_entry("isHidden", &self.is_hidden)?;
10103                }
10104                __map.end()
10105            }
10106        }
10107        impl<'a> ::buffa::MessageName for NamespaceView<'a> {
10108            const PACKAGE: &'static str = "headwaters.read.v1";
10109            const NAME: &'static str = "Namespace";
10110            const FULL_NAME: &'static str = "headwaters.read.v1.Namespace";
10111            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Namespace";
10112        }
10113        impl<'v> ::buffa::DefaultViewInstance for NamespaceView<'v> {
10114            fn default_view_instance<'a>() -> &'a Self
10115            where
10116                Self: 'a,
10117            {
10118                static VALUE: ::buffa::__private::OnceBox<NamespaceView<'static>> = ::buffa::__private::OnceBox::new();
10119                VALUE
10120                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
10121                        <NamespaceView<'static>>::default(),
10122                    ))
10123            }
10124        }
10125        impl ::buffa::ViewReborrow for NamespaceView<'static> {
10126            type Reborrowed<'b> = NamespaceView<'b>;
10127            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
10128                this
10129            }
10130        }
10131        /** Self-contained, `'static` owned view of a `Namespace` message.
10132
10133 Wraps [`::buffa::OwnedView`]`<`[`NamespaceView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
10134
10135 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`NamespaceView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10136        #[derive(Clone, Debug)]
10137        pub struct NamespaceOwnedView(::buffa::OwnedView<NamespaceView<'static>>);
10138        impl NamespaceOwnedView {
10139            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10140            ///
10141            /// The view borrows directly from the buffer's data; the buffer is
10142            /// retained inside the returned handle.
10143            ///
10144            /// # Errors
10145            ///
10146            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10147            /// protobuf data.
10148            pub fn decode(
10149                bytes: ::buffa::bytes::Bytes,
10150            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10151                ::core::result::Result::Ok(
10152                    NamespaceOwnedView(::buffa::OwnedView::decode(bytes)?),
10153                )
10154            }
10155            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10156            /// max message size).
10157            ///
10158            /// # Errors
10159            ///
10160            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10161            /// exceeds the configured limits.
10162            pub fn decode_with_options(
10163                bytes: ::buffa::bytes::Bytes,
10164                opts: &::buffa::DecodeOptions,
10165            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10166                ::core::result::Result::Ok(
10167                    NamespaceOwnedView(
10168                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10169                    ),
10170                )
10171            }
10172            /// Build from an owned message via an encode → decode round-trip.
10173            ///
10174            /// # Errors
10175            ///
10176            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10177            /// somehow invalid (should not happen for well-formed messages).
10178            pub fn from_owned(
10179                msg: &super::super::Namespace,
10180            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10181                ::core::result::Result::Ok(
10182                    NamespaceOwnedView(::buffa::OwnedView::from_owned(msg)?),
10183                )
10184            }
10185            /// Borrow the full [`NamespaceView`] with its lifetime tied to `&self`.
10186            #[must_use]
10187            pub fn view(&self) -> &NamespaceView<'_> {
10188                self.0.reborrow()
10189            }
10190            /// Convert to the owned message type.
10191            #[must_use]
10192            pub fn to_owned_message(&self) -> super::super::Namespace {
10193                self.0.to_owned_message()
10194            }
10195            /// The underlying bytes buffer.
10196            #[must_use]
10197            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10198                self.0.bytes()
10199            }
10200            /// Consume the handle, returning the underlying bytes buffer.
10201            #[must_use]
10202            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10203                self.0.into_bytes()
10204            }
10205            /// Field 1: `name`
10206            #[must_use]
10207            pub fn name(&self) -> &'_ str {
10208                self.0.reborrow().name
10209            }
10210            /// Field 2: `created_at`
10211            #[must_use]
10212            pub fn created_at(&self) -> &'_ str {
10213                self.0.reborrow().created_at
10214            }
10215            /// Field 3: `updated_at`
10216            #[must_use]
10217            pub fn updated_at(&self) -> &'_ str {
10218                self.0.reborrow().updated_at
10219            }
10220            /// Field 4: `owner_name`
10221            #[must_use]
10222            pub fn owner_name(&self) -> &'_ str {
10223                self.0.reborrow().owner_name
10224            }
10225            /// Field 5: `description`
10226            #[must_use]
10227            pub fn description(&self) -> &'_ str {
10228                self.0.reborrow().description
10229            }
10230            /// True if the namespace is hidden from default listings.
10231            ///
10232            /// Field 6: `is_hidden`
10233            #[must_use]
10234            pub fn is_hidden(&self) -> bool {
10235                self.0.reborrow().is_hidden
10236            }
10237        }
10238        impl ::core::convert::From<::buffa::OwnedView<NamespaceView<'static>>>
10239        for NamespaceOwnedView {
10240            fn from(inner: ::buffa::OwnedView<NamespaceView<'static>>) -> Self {
10241                NamespaceOwnedView(inner)
10242            }
10243        }
10244        impl ::core::convert::From<NamespaceOwnedView>
10245        for ::buffa::OwnedView<NamespaceView<'static>> {
10246            fn from(wrapper: NamespaceOwnedView) -> Self {
10247                wrapper.0
10248            }
10249        }
10250        impl ::core::convert::AsRef<::buffa::OwnedView<NamespaceView<'static>>>
10251        for NamespaceOwnedView {
10252            fn as_ref(&self) -> &::buffa::OwnedView<NamespaceView<'static>> {
10253                &self.0
10254            }
10255        }
10256        impl ::buffa::HasMessageView for super::super::Namespace {
10257            type View<'a> = NamespaceView<'a>;
10258            type ViewHandle = NamespaceOwnedView;
10259        }
10260        impl ::serde::Serialize for NamespaceOwnedView {
10261            fn serialize<__S: ::serde::Serializer>(
10262                &self,
10263                __s: __S,
10264            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10265                ::serde::Serialize::serialize(&self.0, __s)
10266            }
10267        }
10268        #[derive(Clone, Debug, Default)]
10269        pub struct ListNamespacesResponseView<'a> {
10270            /// Field 1: `namespaces`
10271            pub namespaces: ::buffa::RepeatedView<
10272                'a,
10273                super::super::__buffa::view::NamespaceView<'a>,
10274            >,
10275            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10276        }
10277        impl<'a> ListNamespacesResponseView<'a> {
10278            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
10279            ///
10280            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
10281            /// and by generated sub-message decode arms with `depth - 1`.
10282            ///
10283            /// **Not part of the public API.** Named with a leading underscore to
10284            /// signal that it is for generated-code use only.
10285            #[doc(hidden)]
10286            pub fn _decode_depth(
10287                buf: &'a [u8],
10288                depth: u32,
10289            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10290                let mut view = Self::default();
10291                view._merge_into_view(buf, depth)?;
10292                ::core::result::Result::Ok(view)
10293            }
10294            /// Merge fields from `buf` into this view (proto merge semantics).
10295            ///
10296            /// Repeated fields append; singular fields last-wins; singular
10297            /// MESSAGE fields merge recursively. Used by sub-message decode
10298            /// arms when the same field appears multiple times on the wire.
10299            ///
10300            /// **Not part of the public API.**
10301            #[doc(hidden)]
10302            pub fn _merge_into_view(
10303                &mut self,
10304                buf: &'a [u8],
10305                depth: u32,
10306            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
10307                let _ = depth;
10308                #[allow(unused_variables)]
10309                let view = self;
10310                let mut cur: &'a [u8] = buf;
10311                while !cur.is_empty() {
10312                    let before_tag = cur;
10313                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
10314                    match tag.field_number() {
10315                        1u32 => {
10316                            if tag.wire_type()
10317                                != ::buffa::encoding::WireType::LengthDelimited
10318                            {
10319                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10320                                    field_number: 1u32,
10321                                    expected: 2u8,
10322                                    actual: tag.wire_type() as u8,
10323                                });
10324                            }
10325                            if depth == 0 {
10326                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10327                            }
10328                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10329                            view.namespaces
10330                                .push(
10331                                    super::super::__buffa::view::NamespaceView::_decode_depth(
10332                                        sub,
10333                                        depth - 1,
10334                                    )?,
10335                                );
10336                        }
10337                        _ => {
10338                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
10339                            let span_len = before_tag.len() - cur.len();
10340                            view.__buffa_unknown_fields
10341                                .push_raw(&before_tag[..span_len]);
10342                        }
10343                    }
10344                }
10345                ::core::result::Result::Ok(())
10346            }
10347        }
10348        impl<'a> ::buffa::MessageView<'a> for ListNamespacesResponseView<'a> {
10349            type Owned = super::super::ListNamespacesResponse;
10350            fn decode_view(
10351                buf: &'a [u8],
10352            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10353                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
10354            }
10355            fn decode_view_with_limit(
10356                buf: &'a [u8],
10357                depth: u32,
10358            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10359                Self::_decode_depth(buf, depth)
10360            }
10361            fn to_owned_message(&self) -> super::super::ListNamespacesResponse {
10362                self.to_owned_from_source(None)
10363            }
10364            #[allow(clippy::useless_conversion, clippy::needless_update)]
10365            fn to_owned_from_source(
10366                &self,
10367                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10368            ) -> super::super::ListNamespacesResponse {
10369                #[allow(unused_imports)]
10370                use ::buffa::alloc::string::ToString as _;
10371                let _ = __buffa_src;
10372                super::super::ListNamespacesResponse {
10373                    namespaces: self
10374                        .namespaces
10375                        .iter()
10376                        .map(|v| v.to_owned_from_source(__buffa_src))
10377                        .collect(),
10378                    __buffa_unknown_fields: self
10379                        .__buffa_unknown_fields
10380                        .to_owned()
10381                        .unwrap_or_default()
10382                        .into(),
10383                    ..::core::default::Default::default()
10384                }
10385            }
10386        }
10387        impl<'a> ::buffa::ViewEncode<'a> for ListNamespacesResponseView<'a> {
10388            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10389            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10390                #[allow(unused_imports)]
10391                use ::buffa::Enumeration as _;
10392                let mut size = 0u32;
10393                for v in &self.namespaces {
10394                    let __slot = __cache.reserve();
10395                    let inner_size = v.compute_size(__cache);
10396                    __cache.set(__slot, inner_size);
10397                    size
10398                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10399                            + inner_size;
10400                }
10401                size += self.__buffa_unknown_fields.encoded_len() as u32;
10402                size
10403            }
10404            #[allow(clippy::needless_borrow)]
10405            fn write_to(
10406                &self,
10407                __cache: &mut ::buffa::SizeCache,
10408                buf: &mut impl ::buffa::bytes::BufMut,
10409            ) {
10410                #[allow(unused_imports)]
10411                use ::buffa::Enumeration as _;
10412                for v in &self.namespaces {
10413                    ::buffa::encoding::Tag::new(
10414                            1u32,
10415                            ::buffa::encoding::WireType::LengthDelimited,
10416                        )
10417                        .encode(buf);
10418                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
10419                    v.write_to(__cache, buf);
10420                }
10421                self.__buffa_unknown_fields.write_to(buf);
10422            }
10423        }
10424        /// Serializes this view as protobuf JSON.
10425        ///
10426        /// Implicit-presence fields with default values are omitted, `required`
10427        /// fields are always emitted, explicit-presence (`optional`) fields are
10428        /// emitted only when set, bytes fields are base64-encoded, and enum
10429        /// values are their proto name strings.
10430        ///
10431        /// This impl uses `serialize_map(None)` because the number of emitted
10432        /// fields depends on default-omission rules; serializers that require
10433        /// known map lengths (e.g. `bincode`) will return a runtime error.
10434        /// Use the owned message type for those formats.
10435        impl<'__a> ::serde::Serialize for ListNamespacesResponseView<'__a> {
10436            fn serialize<__S: ::serde::Serializer>(
10437                &self,
10438                __s: __S,
10439            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10440                use ::serde::ser::SerializeMap as _;
10441                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10442                if !self.namespaces.is_empty() {
10443                    __map.serialize_entry("namespaces", &*self.namespaces)?;
10444                }
10445                __map.end()
10446            }
10447        }
10448        impl<'a> ::buffa::MessageName for ListNamespacesResponseView<'a> {
10449            const PACKAGE: &'static str = "headwaters.read.v1";
10450            const NAME: &'static str = "ListNamespacesResponse";
10451            const FULL_NAME: &'static str = "headwaters.read.v1.ListNamespacesResponse";
10452            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListNamespacesResponse";
10453        }
10454        impl<'v> ::buffa::DefaultViewInstance for ListNamespacesResponseView<'v> {
10455            fn default_view_instance<'a>() -> &'a Self
10456            where
10457                Self: 'a,
10458            {
10459                static VALUE: ::buffa::__private::OnceBox<
10460                    ListNamespacesResponseView<'static>,
10461                > = ::buffa::__private::OnceBox::new();
10462                VALUE
10463                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
10464                        <ListNamespacesResponseView<'static>>::default(),
10465                    ))
10466            }
10467        }
10468        impl ::buffa::ViewReborrow for ListNamespacesResponseView<'static> {
10469            type Reborrowed<'b> = ListNamespacesResponseView<'b>;
10470            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
10471                this
10472            }
10473        }
10474        /** Self-contained, `'static` owned view of a `ListNamespacesResponse` message.
10475
10476 Wraps [`::buffa::OwnedView`]`<`[`ListNamespacesResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
10477
10478 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListNamespacesResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10479        #[derive(Clone, Debug)]
10480        pub struct ListNamespacesResponseOwnedView(
10481            ::buffa::OwnedView<ListNamespacesResponseView<'static>>,
10482        );
10483        impl ListNamespacesResponseOwnedView {
10484            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10485            ///
10486            /// The view borrows directly from the buffer's data; the buffer is
10487            /// retained inside the returned handle.
10488            ///
10489            /// # Errors
10490            ///
10491            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10492            /// protobuf data.
10493            pub fn decode(
10494                bytes: ::buffa::bytes::Bytes,
10495            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10496                ::core::result::Result::Ok(
10497                    ListNamespacesResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
10498                )
10499            }
10500            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10501            /// max message size).
10502            ///
10503            /// # Errors
10504            ///
10505            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10506            /// exceeds the configured limits.
10507            pub fn decode_with_options(
10508                bytes: ::buffa::bytes::Bytes,
10509                opts: &::buffa::DecodeOptions,
10510            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10511                ::core::result::Result::Ok(
10512                    ListNamespacesResponseOwnedView(
10513                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10514                    ),
10515                )
10516            }
10517            /// Build from an owned message via an encode → decode round-trip.
10518            ///
10519            /// # Errors
10520            ///
10521            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10522            /// somehow invalid (should not happen for well-formed messages).
10523            pub fn from_owned(
10524                msg: &super::super::ListNamespacesResponse,
10525            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10526                ::core::result::Result::Ok(
10527                    ListNamespacesResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
10528                )
10529            }
10530            /// Borrow the full [`ListNamespacesResponseView`] with its lifetime tied to `&self`.
10531            #[must_use]
10532            pub fn view(&self) -> &ListNamespacesResponseView<'_> {
10533                self.0.reborrow()
10534            }
10535            /// Convert to the owned message type.
10536            #[must_use]
10537            pub fn to_owned_message(&self) -> super::super::ListNamespacesResponse {
10538                self.0.to_owned_message()
10539            }
10540            /// The underlying bytes buffer.
10541            #[must_use]
10542            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10543                self.0.bytes()
10544            }
10545            /// Consume the handle, returning the underlying bytes buffer.
10546            #[must_use]
10547            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10548                self.0.into_bytes()
10549            }
10550            /// Field 1: `namespaces`
10551            #[must_use]
10552            pub fn namespaces(
10553                &self,
10554            ) -> &::buffa::RepeatedView<
10555                '_,
10556                super::super::__buffa::view::NamespaceView<'_>,
10557            > {
10558                &self.0.reborrow().namespaces
10559            }
10560        }
10561        impl ::core::convert::From<
10562            ::buffa::OwnedView<ListNamespacesResponseView<'static>>,
10563        > for ListNamespacesResponseOwnedView {
10564            fn from(
10565                inner: ::buffa::OwnedView<ListNamespacesResponseView<'static>>,
10566            ) -> Self {
10567                ListNamespacesResponseOwnedView(inner)
10568            }
10569        }
10570        impl ::core::convert::From<ListNamespacesResponseOwnedView>
10571        for ::buffa::OwnedView<ListNamespacesResponseView<'static>> {
10572            fn from(wrapper: ListNamespacesResponseOwnedView) -> Self {
10573                wrapper.0
10574            }
10575        }
10576        impl ::core::convert::AsRef<
10577            ::buffa::OwnedView<ListNamespacesResponseView<'static>>,
10578        > for ListNamespacesResponseOwnedView {
10579            fn as_ref(
10580                &self,
10581            ) -> &::buffa::OwnedView<ListNamespacesResponseView<'static>> {
10582                &self.0
10583            }
10584        }
10585        impl ::buffa::HasMessageView for super::super::ListNamespacesResponse {
10586            type View<'a> = ListNamespacesResponseView<'a>;
10587            type ViewHandle = ListNamespacesResponseOwnedView;
10588        }
10589        impl ::serde::Serialize for ListNamespacesResponseOwnedView {
10590            fn serialize<__S: ::serde::Serializer>(
10591                &self,
10592                __s: __S,
10593            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10594                ::serde::Serialize::serialize(&self.0, __s)
10595            }
10596        }
10597        /// --- jobs ---
10598        ///
10599        /// A job: a recurring process that reads input datasets and writes output
10600        /// datasets.
10601        #[derive(Clone, Debug, Default)]
10602        pub struct JobDetailView<'a> {
10603            /// Field 1: `id`
10604            pub id: ::buffa::MessageFieldView<
10605                super::super::__buffa::view::EntityIdView<'a>,
10606            >,
10607            /// Field 2: `type`
10608            pub r#type: ::buffa::EnumValue<super::super::JobType>,
10609            /// Fully-qualified job name.
10610            ///
10611            /// Field 3: `name`
10612            pub name: &'a str,
10613            /// Last path segment of `name` (e.g. `name` `etl.daily` → `daily`).
10614            ///
10615            /// Field 4: `simple_name`
10616            pub simple_name: &'a str,
10617            /// Field 5: `namespace`
10618            pub namespace: &'a str,
10619            /// Field 6: `created_at`
10620            pub created_at: &'a str,
10621            /// Field 7: `updated_at`
10622            pub updated_at: &'a str,
10623            /// Datasets this job reads / writes, as `{namespace, name}` references.
10624            ///
10625            /// Field 8: `inputs`
10626            pub inputs: ::buffa::RepeatedView<
10627                'a,
10628                super::super::__buffa::view::EntityIdView<'a>,
10629            >,
10630            /// Field 9: `outputs`
10631            pub outputs: ::buffa::RepeatedView<
10632                'a,
10633                super::super::__buffa::view::EntityIdView<'a>,
10634            >,
10635            /// Source location of the job's code (e.g. a repository URL), if reported.
10636            ///
10637            /// Field 10: `location`
10638            pub location: &'a str,
10639            /// Field 11: `description`
10640            pub description: &'a str,
10641            /// The most recent run; the same object as `latest_runs[0]` when present.
10642            ///
10643            /// Field 12: `latest_run`
10644            pub latest_run: ::buffa::MessageFieldView<
10645                super::super::__buffa::view::RunDetailView<'a>,
10646            >,
10647            /// Field 13: `latest_runs`
10648            pub latest_runs: ::buffa::RepeatedView<
10649                'a,
10650                super::super::__buffa::view::RunDetailView<'a>,
10651            >,
10652            /// Field 14: `tags`
10653            pub tags: ::buffa::RepeatedView<'a, &'a str>,
10654            /// Field 15: `parent_job_name`
10655            pub parent_job_name: &'a str,
10656            /// Field 16: `parent_job_uuid`
10657            pub parent_job_uuid: &'a str,
10658            /// Opaque UUID that changes whenever the job's inputs, outputs, or metadata
10659            /// change. Use it to detect that a job's shape has moved.
10660            ///
10661            /// Field 17: `current_version`
10662            pub current_version: &'a str,
10663            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10664        }
10665        impl<'a> JobDetailView<'a> {
10666            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
10667            ///
10668            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
10669            /// and by generated sub-message decode arms with `depth - 1`.
10670            ///
10671            /// **Not part of the public API.** Named with a leading underscore to
10672            /// signal that it is for generated-code use only.
10673            #[doc(hidden)]
10674            pub fn _decode_depth(
10675                buf: &'a [u8],
10676                depth: u32,
10677            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10678                let mut view = Self::default();
10679                view._merge_into_view(buf, depth)?;
10680                ::core::result::Result::Ok(view)
10681            }
10682            /// Merge fields from `buf` into this view (proto merge semantics).
10683            ///
10684            /// Repeated fields append; singular fields last-wins; singular
10685            /// MESSAGE fields merge recursively. Used by sub-message decode
10686            /// arms when the same field appears multiple times on the wire.
10687            ///
10688            /// **Not part of the public API.**
10689            #[doc(hidden)]
10690            pub fn _merge_into_view(
10691                &mut self,
10692                buf: &'a [u8],
10693                depth: u32,
10694            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
10695                let _ = depth;
10696                #[allow(unused_variables)]
10697                let view = self;
10698                let mut cur: &'a [u8] = buf;
10699                while !cur.is_empty() {
10700                    let before_tag = cur;
10701                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
10702                    match tag.field_number() {
10703                        1u32 => {
10704                            if tag.wire_type()
10705                                != ::buffa::encoding::WireType::LengthDelimited
10706                            {
10707                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10708                                    field_number: 1u32,
10709                                    expected: 2u8,
10710                                    actual: tag.wire_type() as u8,
10711                                });
10712                            }
10713                            if depth == 0 {
10714                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10715                            }
10716                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10717                            match view.id.as_mut() {
10718                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
10719                                None => {
10720                                    view.id = ::buffa::MessageFieldView::set(
10721                                        super::super::__buffa::view::EntityIdView::_decode_depth(
10722                                            sub,
10723                                            depth - 1,
10724                                        )?,
10725                                    );
10726                                }
10727                            }
10728                        }
10729                        2u32 => {
10730                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10731                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10732                                    field_number: 2u32,
10733                                    expected: 0u8,
10734                                    actual: tag.wire_type() as u8,
10735                                });
10736                            }
10737                            view.r#type = ::buffa::EnumValue::from(
10738                                ::buffa::types::decode_int32(&mut cur)?,
10739                            );
10740                        }
10741                        3u32 => {
10742                            if tag.wire_type()
10743                                != ::buffa::encoding::WireType::LengthDelimited
10744                            {
10745                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10746                                    field_number: 3u32,
10747                                    expected: 2u8,
10748                                    actual: tag.wire_type() as u8,
10749                                });
10750                            }
10751                            view.name = ::buffa::types::borrow_str(&mut cur)?;
10752                        }
10753                        4u32 => {
10754                            if tag.wire_type()
10755                                != ::buffa::encoding::WireType::LengthDelimited
10756                            {
10757                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10758                                    field_number: 4u32,
10759                                    expected: 2u8,
10760                                    actual: tag.wire_type() as u8,
10761                                });
10762                            }
10763                            view.simple_name = ::buffa::types::borrow_str(&mut cur)?;
10764                        }
10765                        5u32 => {
10766                            if tag.wire_type()
10767                                != ::buffa::encoding::WireType::LengthDelimited
10768                            {
10769                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10770                                    field_number: 5u32,
10771                                    expected: 2u8,
10772                                    actual: tag.wire_type() as u8,
10773                                });
10774                            }
10775                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
10776                        }
10777                        6u32 => {
10778                            if tag.wire_type()
10779                                != ::buffa::encoding::WireType::LengthDelimited
10780                            {
10781                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10782                                    field_number: 6u32,
10783                                    expected: 2u8,
10784                                    actual: tag.wire_type() as u8,
10785                                });
10786                            }
10787                            view.created_at = ::buffa::types::borrow_str(&mut cur)?;
10788                        }
10789                        7u32 => {
10790                            if tag.wire_type()
10791                                != ::buffa::encoding::WireType::LengthDelimited
10792                            {
10793                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10794                                    field_number: 7u32,
10795                                    expected: 2u8,
10796                                    actual: tag.wire_type() as u8,
10797                                });
10798                            }
10799                            view.updated_at = ::buffa::types::borrow_str(&mut cur)?;
10800                        }
10801                        10u32 => {
10802                            if tag.wire_type()
10803                                != ::buffa::encoding::WireType::LengthDelimited
10804                            {
10805                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10806                                    field_number: 10u32,
10807                                    expected: 2u8,
10808                                    actual: tag.wire_type() as u8,
10809                                });
10810                            }
10811                            view.location = ::buffa::types::borrow_str(&mut cur)?;
10812                        }
10813                        11u32 => {
10814                            if tag.wire_type()
10815                                != ::buffa::encoding::WireType::LengthDelimited
10816                            {
10817                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10818                                    field_number: 11u32,
10819                                    expected: 2u8,
10820                                    actual: tag.wire_type() as u8,
10821                                });
10822                            }
10823                            view.description = ::buffa::types::borrow_str(&mut cur)?;
10824                        }
10825                        12u32 => {
10826                            if tag.wire_type()
10827                                != ::buffa::encoding::WireType::LengthDelimited
10828                            {
10829                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10830                                    field_number: 12u32,
10831                                    expected: 2u8,
10832                                    actual: tag.wire_type() as u8,
10833                                });
10834                            }
10835                            if depth == 0 {
10836                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10837                            }
10838                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10839                            match view.latest_run.as_mut() {
10840                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
10841                                None => {
10842                                    view.latest_run = ::buffa::MessageFieldView::set(
10843                                        super::super::__buffa::view::RunDetailView::_decode_depth(
10844                                            sub,
10845                                            depth - 1,
10846                                        )?,
10847                                    );
10848                                }
10849                            }
10850                        }
10851                        15u32 => {
10852                            if tag.wire_type()
10853                                != ::buffa::encoding::WireType::LengthDelimited
10854                            {
10855                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10856                                    field_number: 15u32,
10857                                    expected: 2u8,
10858                                    actual: tag.wire_type() as u8,
10859                                });
10860                            }
10861                            view.parent_job_name = ::buffa::types::borrow_str(&mut cur)?;
10862                        }
10863                        16u32 => {
10864                            if tag.wire_type()
10865                                != ::buffa::encoding::WireType::LengthDelimited
10866                            {
10867                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10868                                    field_number: 16u32,
10869                                    expected: 2u8,
10870                                    actual: tag.wire_type() as u8,
10871                                });
10872                            }
10873                            view.parent_job_uuid = ::buffa::types::borrow_str(&mut cur)?;
10874                        }
10875                        17u32 => {
10876                            if tag.wire_type()
10877                                != ::buffa::encoding::WireType::LengthDelimited
10878                            {
10879                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10880                                    field_number: 17u32,
10881                                    expected: 2u8,
10882                                    actual: tag.wire_type() as u8,
10883                                });
10884                            }
10885                            view.current_version = ::buffa::types::borrow_str(&mut cur)?;
10886                        }
10887                        8u32 => {
10888                            if tag.wire_type()
10889                                != ::buffa::encoding::WireType::LengthDelimited
10890                            {
10891                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10892                                    field_number: 8u32,
10893                                    expected: 2u8,
10894                                    actual: tag.wire_type() as u8,
10895                                });
10896                            }
10897                            if depth == 0 {
10898                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10899                            }
10900                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10901                            view.inputs
10902                                .push(
10903                                    super::super::__buffa::view::EntityIdView::_decode_depth(
10904                                        sub,
10905                                        depth - 1,
10906                                    )?,
10907                                );
10908                        }
10909                        9u32 => {
10910                            if tag.wire_type()
10911                                != ::buffa::encoding::WireType::LengthDelimited
10912                            {
10913                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10914                                    field_number: 9u32,
10915                                    expected: 2u8,
10916                                    actual: tag.wire_type() as u8,
10917                                });
10918                            }
10919                            if depth == 0 {
10920                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10921                            }
10922                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10923                            view.outputs
10924                                .push(
10925                                    super::super::__buffa::view::EntityIdView::_decode_depth(
10926                                        sub,
10927                                        depth - 1,
10928                                    )?,
10929                                );
10930                        }
10931                        13u32 => {
10932                            if tag.wire_type()
10933                                != ::buffa::encoding::WireType::LengthDelimited
10934                            {
10935                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10936                                    field_number: 13u32,
10937                                    expected: 2u8,
10938                                    actual: tag.wire_type() as u8,
10939                                });
10940                            }
10941                            if depth == 0 {
10942                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10943                            }
10944                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10945                            view.latest_runs
10946                                .push(
10947                                    super::super::__buffa::view::RunDetailView::_decode_depth(
10948                                        sub,
10949                                        depth - 1,
10950                                    )?,
10951                                );
10952                        }
10953                        14u32 => {
10954                            if tag.wire_type()
10955                                != ::buffa::encoding::WireType::LengthDelimited
10956                            {
10957                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10958                                    field_number: 14u32,
10959                                    expected: 2u8,
10960                                    actual: tag.wire_type() as u8,
10961                                });
10962                            }
10963                            view.tags.push(::buffa::types::borrow_str(&mut cur)?);
10964                        }
10965                        _ => {
10966                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
10967                            let span_len = before_tag.len() - cur.len();
10968                            view.__buffa_unknown_fields
10969                                .push_raw(&before_tag[..span_len]);
10970                        }
10971                    }
10972                }
10973                ::core::result::Result::Ok(())
10974            }
10975        }
10976        impl<'a> ::buffa::MessageView<'a> for JobDetailView<'a> {
10977            type Owned = super::super::JobDetail;
10978            fn decode_view(
10979                buf: &'a [u8],
10980            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10981                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
10982            }
10983            fn decode_view_with_limit(
10984                buf: &'a [u8],
10985                depth: u32,
10986            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10987                Self::_decode_depth(buf, depth)
10988            }
10989            fn to_owned_message(&self) -> super::super::JobDetail {
10990                self.to_owned_from_source(None)
10991            }
10992            #[allow(clippy::useless_conversion, clippy::needless_update)]
10993            fn to_owned_from_source(
10994                &self,
10995                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10996            ) -> super::super::JobDetail {
10997                #[allow(unused_imports)]
10998                use ::buffa::alloc::string::ToString as _;
10999                let _ = __buffa_src;
11000                super::super::JobDetail {
11001                    id: match self.id.as_option() {
11002                        Some(v) => {
11003                            ::buffa::MessageField::<
11004                                super::super::EntityId,
11005                            >::some(v.to_owned_from_source(__buffa_src))
11006                        }
11007                        None => ::buffa::MessageField::none(),
11008                    },
11009                    r#type: self.r#type,
11010                    name: self.name.to_string(),
11011                    simple_name: self.simple_name.to_string(),
11012                    namespace: self.namespace.to_string(),
11013                    created_at: self.created_at.to_string(),
11014                    updated_at: self.updated_at.to_string(),
11015                    inputs: self
11016                        .inputs
11017                        .iter()
11018                        .map(|v| v.to_owned_from_source(__buffa_src))
11019                        .collect(),
11020                    outputs: self
11021                        .outputs
11022                        .iter()
11023                        .map(|v| v.to_owned_from_source(__buffa_src))
11024                        .collect(),
11025                    location: self.location.to_string(),
11026                    description: self.description.to_string(),
11027                    latest_run: match self.latest_run.as_option() {
11028                        Some(v) => {
11029                            ::buffa::MessageField::<
11030                                super::super::RunDetail,
11031                            >::some(v.to_owned_from_source(__buffa_src))
11032                        }
11033                        None => ::buffa::MessageField::none(),
11034                    },
11035                    latest_runs: self
11036                        .latest_runs
11037                        .iter()
11038                        .map(|v| v.to_owned_from_source(__buffa_src))
11039                        .collect(),
11040                    tags: self.tags.iter().map(|s| s.to_string()).collect(),
11041                    parent_job_name: self.parent_job_name.to_string(),
11042                    parent_job_uuid: self.parent_job_uuid.to_string(),
11043                    current_version: self.current_version.to_string(),
11044                    __buffa_unknown_fields: self
11045                        .__buffa_unknown_fields
11046                        .to_owned()
11047                        .unwrap_or_default()
11048                        .into(),
11049                    ..::core::default::Default::default()
11050                }
11051            }
11052        }
11053        impl<'a> ::buffa::ViewEncode<'a> for JobDetailView<'a> {
11054            #[allow(clippy::needless_borrow, clippy::let_and_return)]
11055            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
11056                #[allow(unused_imports)]
11057                use ::buffa::Enumeration as _;
11058                let mut size = 0u32;
11059                if self.id.is_set() {
11060                    let __slot = __cache.reserve();
11061                    let inner_size = self.id.compute_size(__cache);
11062                    __cache.set(__slot, inner_size);
11063                    size
11064                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11065                            + inner_size;
11066                }
11067                {
11068                    let val = self.r#type.to_i32();
11069                    if val != 0 {
11070                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11071                    }
11072                }
11073                if !self.name.is_empty() {
11074                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
11075                }
11076                if !self.simple_name.is_empty() {
11077                    size
11078                        += 1u32
11079                            + ::buffa::types::string_encoded_len(&self.simple_name)
11080                                as u32;
11081                }
11082                if !self.namespace.is_empty() {
11083                    size
11084                        += 1u32
11085                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
11086                }
11087                if !self.created_at.is_empty() {
11088                    size
11089                        += 1u32
11090                            + ::buffa::types::string_encoded_len(&self.created_at)
11091                                as u32;
11092                }
11093                if !self.updated_at.is_empty() {
11094                    size
11095                        += 1u32
11096                            + ::buffa::types::string_encoded_len(&self.updated_at)
11097                                as u32;
11098                }
11099                for v in &self.inputs {
11100                    let __slot = __cache.reserve();
11101                    let inner_size = v.compute_size(__cache);
11102                    __cache.set(__slot, inner_size);
11103                    size
11104                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11105                            + inner_size;
11106                }
11107                for v in &self.outputs {
11108                    let __slot = __cache.reserve();
11109                    let inner_size = v.compute_size(__cache);
11110                    __cache.set(__slot, inner_size);
11111                    size
11112                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11113                            + inner_size;
11114                }
11115                if !self.location.is_empty() {
11116                    size
11117                        += 1u32
11118                            + ::buffa::types::string_encoded_len(&self.location) as u32;
11119                }
11120                if !self.description.is_empty() {
11121                    size
11122                        += 1u32
11123                            + ::buffa::types::string_encoded_len(&self.description)
11124                                as u32;
11125                }
11126                if self.latest_run.is_set() {
11127                    let __slot = __cache.reserve();
11128                    let inner_size = self.latest_run.compute_size(__cache);
11129                    __cache.set(__slot, inner_size);
11130                    size
11131                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11132                            + inner_size;
11133                }
11134                for v in &self.latest_runs {
11135                    let __slot = __cache.reserve();
11136                    let inner_size = v.compute_size(__cache);
11137                    __cache.set(__slot, inner_size);
11138                    size
11139                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11140                            + inner_size;
11141                }
11142                for v in &self.tags {
11143                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
11144                }
11145                if !self.parent_job_name.is_empty() {
11146                    size
11147                        += 1u32
11148                            + ::buffa::types::string_encoded_len(&self.parent_job_name)
11149                                as u32;
11150                }
11151                if !self.parent_job_uuid.is_empty() {
11152                    size
11153                        += 2u32
11154                            + ::buffa::types::string_encoded_len(&self.parent_job_uuid)
11155                                as u32;
11156                }
11157                if !self.current_version.is_empty() {
11158                    size
11159                        += 2u32
11160                            + ::buffa::types::string_encoded_len(&self.current_version)
11161                                as u32;
11162                }
11163                size += self.__buffa_unknown_fields.encoded_len() as u32;
11164                size
11165            }
11166            #[allow(clippy::needless_borrow)]
11167            fn write_to(
11168                &self,
11169                __cache: &mut ::buffa::SizeCache,
11170                buf: &mut impl ::buffa::bytes::BufMut,
11171            ) {
11172                #[allow(unused_imports)]
11173                use ::buffa::Enumeration as _;
11174                if self.id.is_set() {
11175                    ::buffa::encoding::Tag::new(
11176                            1u32,
11177                            ::buffa::encoding::WireType::LengthDelimited,
11178                        )
11179                        .encode(buf);
11180                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
11181                    self.id.write_to(__cache, buf);
11182                }
11183                {
11184                    let val = self.r#type.to_i32();
11185                    if val != 0 {
11186                        ::buffa::encoding::Tag::new(
11187                                2u32,
11188                                ::buffa::encoding::WireType::Varint,
11189                            )
11190                            .encode(buf);
11191                        ::buffa::types::encode_int32(val, buf);
11192                    }
11193                }
11194                if !self.name.is_empty() {
11195                    ::buffa::encoding::Tag::new(
11196                            3u32,
11197                            ::buffa::encoding::WireType::LengthDelimited,
11198                        )
11199                        .encode(buf);
11200                    ::buffa::types::encode_string(&self.name, buf);
11201                }
11202                if !self.simple_name.is_empty() {
11203                    ::buffa::encoding::Tag::new(
11204                            4u32,
11205                            ::buffa::encoding::WireType::LengthDelimited,
11206                        )
11207                        .encode(buf);
11208                    ::buffa::types::encode_string(&self.simple_name, buf);
11209                }
11210                if !self.namespace.is_empty() {
11211                    ::buffa::encoding::Tag::new(
11212                            5u32,
11213                            ::buffa::encoding::WireType::LengthDelimited,
11214                        )
11215                        .encode(buf);
11216                    ::buffa::types::encode_string(&self.namespace, buf);
11217                }
11218                if !self.created_at.is_empty() {
11219                    ::buffa::encoding::Tag::new(
11220                            6u32,
11221                            ::buffa::encoding::WireType::LengthDelimited,
11222                        )
11223                        .encode(buf);
11224                    ::buffa::types::encode_string(&self.created_at, buf);
11225                }
11226                if !self.updated_at.is_empty() {
11227                    ::buffa::encoding::Tag::new(
11228                            7u32,
11229                            ::buffa::encoding::WireType::LengthDelimited,
11230                        )
11231                        .encode(buf);
11232                    ::buffa::types::encode_string(&self.updated_at, buf);
11233                }
11234                for v in &self.inputs {
11235                    ::buffa::encoding::Tag::new(
11236                            8u32,
11237                            ::buffa::encoding::WireType::LengthDelimited,
11238                        )
11239                        .encode(buf);
11240                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
11241                    v.write_to(__cache, buf);
11242                }
11243                for v in &self.outputs {
11244                    ::buffa::encoding::Tag::new(
11245                            9u32,
11246                            ::buffa::encoding::WireType::LengthDelimited,
11247                        )
11248                        .encode(buf);
11249                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
11250                    v.write_to(__cache, buf);
11251                }
11252                if !self.location.is_empty() {
11253                    ::buffa::encoding::Tag::new(
11254                            10u32,
11255                            ::buffa::encoding::WireType::LengthDelimited,
11256                        )
11257                        .encode(buf);
11258                    ::buffa::types::encode_string(&self.location, buf);
11259                }
11260                if !self.description.is_empty() {
11261                    ::buffa::encoding::Tag::new(
11262                            11u32,
11263                            ::buffa::encoding::WireType::LengthDelimited,
11264                        )
11265                        .encode(buf);
11266                    ::buffa::types::encode_string(&self.description, buf);
11267                }
11268                if self.latest_run.is_set() {
11269                    ::buffa::encoding::Tag::new(
11270                            12u32,
11271                            ::buffa::encoding::WireType::LengthDelimited,
11272                        )
11273                        .encode(buf);
11274                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
11275                    self.latest_run.write_to(__cache, buf);
11276                }
11277                for v in &self.latest_runs {
11278                    ::buffa::encoding::Tag::new(
11279                            13u32,
11280                            ::buffa::encoding::WireType::LengthDelimited,
11281                        )
11282                        .encode(buf);
11283                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
11284                    v.write_to(__cache, buf);
11285                }
11286                for v in &self.tags {
11287                    ::buffa::encoding::Tag::new(
11288                            14u32,
11289                            ::buffa::encoding::WireType::LengthDelimited,
11290                        )
11291                        .encode(buf);
11292                    ::buffa::types::encode_string(v, buf);
11293                }
11294                if !self.parent_job_name.is_empty() {
11295                    ::buffa::encoding::Tag::new(
11296                            15u32,
11297                            ::buffa::encoding::WireType::LengthDelimited,
11298                        )
11299                        .encode(buf);
11300                    ::buffa::types::encode_string(&self.parent_job_name, buf);
11301                }
11302                if !self.parent_job_uuid.is_empty() {
11303                    ::buffa::encoding::Tag::new(
11304                            16u32,
11305                            ::buffa::encoding::WireType::LengthDelimited,
11306                        )
11307                        .encode(buf);
11308                    ::buffa::types::encode_string(&self.parent_job_uuid, buf);
11309                }
11310                if !self.current_version.is_empty() {
11311                    ::buffa::encoding::Tag::new(
11312                            17u32,
11313                            ::buffa::encoding::WireType::LengthDelimited,
11314                        )
11315                        .encode(buf);
11316                    ::buffa::types::encode_string(&self.current_version, buf);
11317                }
11318                self.__buffa_unknown_fields.write_to(buf);
11319            }
11320        }
11321        /// Serializes this view as protobuf JSON.
11322        ///
11323        /// Implicit-presence fields with default values are omitted, `required`
11324        /// fields are always emitted, explicit-presence (`optional`) fields are
11325        /// emitted only when set, bytes fields are base64-encoded, and enum
11326        /// values are their proto name strings.
11327        ///
11328        /// This impl uses `serialize_map(None)` because the number of emitted
11329        /// fields depends on default-omission rules; serializers that require
11330        /// known map lengths (e.g. `bincode`) will return a runtime error.
11331        /// Use the owned message type for those formats.
11332        impl<'__a> ::serde::Serialize for JobDetailView<'__a> {
11333            fn serialize<__S: ::serde::Serializer>(
11334                &self,
11335                __s: __S,
11336            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11337                use ::serde::ser::SerializeMap as _;
11338                let mut __map = __s.serialize_map(::core::option::Option::None)?;
11339                {
11340                    if let ::core::option::Option::Some(__v) = self.id.as_option() {
11341                        __map.serialize_entry("id", __v)?;
11342                    }
11343                }
11344                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.r#type) {
11345                    __map.serialize_entry("type", &self.r#type)?;
11346                }
11347                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
11348                    __map.serialize_entry("name", self.name)?;
11349                }
11350                if !::buffa::json_helpers::skip_if::is_empty_str(self.simple_name) {
11351                    __map.serialize_entry("simpleName", self.simple_name)?;
11352                }
11353                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
11354                    __map.serialize_entry("namespace", self.namespace)?;
11355                }
11356                if !::buffa::json_helpers::skip_if::is_empty_str(self.created_at) {
11357                    __map.serialize_entry("createdAt", self.created_at)?;
11358                }
11359                if !::buffa::json_helpers::skip_if::is_empty_str(self.updated_at) {
11360                    __map.serialize_entry("updatedAt", self.updated_at)?;
11361                }
11362                if !self.inputs.is_empty() {
11363                    __map.serialize_entry("inputs", &*self.inputs)?;
11364                }
11365                if !self.outputs.is_empty() {
11366                    __map.serialize_entry("outputs", &*self.outputs)?;
11367                }
11368                if !::buffa::json_helpers::skip_if::is_empty_str(self.location) {
11369                    __map.serialize_entry("location", self.location)?;
11370                }
11371                if !::buffa::json_helpers::skip_if::is_empty_str(self.description) {
11372                    __map.serialize_entry("description", self.description)?;
11373                }
11374                {
11375                    if let ::core::option::Option::Some(__v) = self
11376                        .latest_run
11377                        .as_option()
11378                    {
11379                        __map.serialize_entry("latestRun", __v)?;
11380                    }
11381                }
11382                if !self.latest_runs.is_empty() {
11383                    __map.serialize_entry("latestRuns", &*self.latest_runs)?;
11384                }
11385                if !self.tags.is_empty() {
11386                    __map.serialize_entry("tags", &*self.tags)?;
11387                }
11388                if !::buffa::json_helpers::skip_if::is_empty_str(self.parent_job_name) {
11389                    __map.serialize_entry("parentJobName", self.parent_job_name)?;
11390                }
11391                if !::buffa::json_helpers::skip_if::is_empty_str(self.parent_job_uuid) {
11392                    __map.serialize_entry("parentJobUuid", self.parent_job_uuid)?;
11393                }
11394                if !::buffa::json_helpers::skip_if::is_empty_str(self.current_version) {
11395                    __map.serialize_entry("currentVersion", self.current_version)?;
11396                }
11397                __map.end()
11398            }
11399        }
11400        impl<'a> ::buffa::MessageName for JobDetailView<'a> {
11401            const PACKAGE: &'static str = "headwaters.read.v1";
11402            const NAME: &'static str = "JobDetail";
11403            const FULL_NAME: &'static str = "headwaters.read.v1.JobDetail";
11404            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.JobDetail";
11405        }
11406        impl<'v> ::buffa::DefaultViewInstance for JobDetailView<'v> {
11407            fn default_view_instance<'a>() -> &'a Self
11408            where
11409                Self: 'a,
11410            {
11411                static VALUE: ::buffa::__private::OnceBox<JobDetailView<'static>> = ::buffa::__private::OnceBox::new();
11412                VALUE
11413                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
11414                        <JobDetailView<'static>>::default(),
11415                    ))
11416            }
11417        }
11418        impl ::buffa::ViewReborrow for JobDetailView<'static> {
11419            type Reborrowed<'b> = JobDetailView<'b>;
11420            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
11421                this
11422            }
11423        }
11424        /** Self-contained, `'static` owned view of a `JobDetail` message.
11425
11426 Wraps [`::buffa::OwnedView`]`<`[`JobDetailView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
11427
11428 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`JobDetailView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
11429        #[derive(Clone, Debug)]
11430        pub struct JobDetailOwnedView(::buffa::OwnedView<JobDetailView<'static>>);
11431        impl JobDetailOwnedView {
11432            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
11433            ///
11434            /// The view borrows directly from the buffer's data; the buffer is
11435            /// retained inside the returned handle.
11436            ///
11437            /// # Errors
11438            ///
11439            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
11440            /// protobuf data.
11441            pub fn decode(
11442                bytes: ::buffa::bytes::Bytes,
11443            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11444                ::core::result::Result::Ok(
11445                    JobDetailOwnedView(::buffa::OwnedView::decode(bytes)?),
11446                )
11447            }
11448            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
11449            /// max message size).
11450            ///
11451            /// # Errors
11452            ///
11453            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
11454            /// exceeds the configured limits.
11455            pub fn decode_with_options(
11456                bytes: ::buffa::bytes::Bytes,
11457                opts: &::buffa::DecodeOptions,
11458            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11459                ::core::result::Result::Ok(
11460                    JobDetailOwnedView(
11461                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11462                    ),
11463                )
11464            }
11465            /// Build from an owned message via an encode → decode round-trip.
11466            ///
11467            /// # Errors
11468            ///
11469            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
11470            /// somehow invalid (should not happen for well-formed messages).
11471            pub fn from_owned(
11472                msg: &super::super::JobDetail,
11473            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11474                ::core::result::Result::Ok(
11475                    JobDetailOwnedView(::buffa::OwnedView::from_owned(msg)?),
11476                )
11477            }
11478            /// Borrow the full [`JobDetailView`] with its lifetime tied to `&self`.
11479            #[must_use]
11480            pub fn view(&self) -> &JobDetailView<'_> {
11481                self.0.reborrow()
11482            }
11483            /// Convert to the owned message type.
11484            #[must_use]
11485            pub fn to_owned_message(&self) -> super::super::JobDetail {
11486                self.0.to_owned_message()
11487            }
11488            /// The underlying bytes buffer.
11489            #[must_use]
11490            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11491                self.0.bytes()
11492            }
11493            /// Consume the handle, returning the underlying bytes buffer.
11494            #[must_use]
11495            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11496                self.0.into_bytes()
11497            }
11498            /// Field 1: `id`
11499            #[must_use]
11500            pub fn id(
11501                &self,
11502            ) -> &::buffa::MessageFieldView<
11503                super::super::__buffa::view::EntityIdView<'_>,
11504            > {
11505                &self.0.reborrow().id
11506            }
11507            /// Field 2: `type`
11508            #[must_use]
11509            pub fn r#type(&self) -> ::buffa::EnumValue<super::super::JobType> {
11510                self.0.reborrow().r#type
11511            }
11512            /// Fully-qualified job name.
11513            ///
11514            /// Field 3: `name`
11515            #[must_use]
11516            pub fn name(&self) -> &'_ str {
11517                self.0.reborrow().name
11518            }
11519            /// Last path segment of `name` (e.g. `name` `etl.daily` → `daily`).
11520            ///
11521            /// Field 4: `simple_name`
11522            #[must_use]
11523            pub fn simple_name(&self) -> &'_ str {
11524                self.0.reborrow().simple_name
11525            }
11526            /// Field 5: `namespace`
11527            #[must_use]
11528            pub fn namespace(&self) -> &'_ str {
11529                self.0.reborrow().namespace
11530            }
11531            /// Field 6: `created_at`
11532            #[must_use]
11533            pub fn created_at(&self) -> &'_ str {
11534                self.0.reborrow().created_at
11535            }
11536            /// Field 7: `updated_at`
11537            #[must_use]
11538            pub fn updated_at(&self) -> &'_ str {
11539                self.0.reborrow().updated_at
11540            }
11541            /// Datasets this job reads / writes, as `{namespace, name}` references.
11542            ///
11543            /// Field 8: `inputs`
11544            #[must_use]
11545            pub fn inputs(
11546                &self,
11547            ) -> &::buffa::RepeatedView<
11548                '_,
11549                super::super::__buffa::view::EntityIdView<'_>,
11550            > {
11551                &self.0.reborrow().inputs
11552            }
11553            /// Field 9: `outputs`
11554            #[must_use]
11555            pub fn outputs(
11556                &self,
11557            ) -> &::buffa::RepeatedView<
11558                '_,
11559                super::super::__buffa::view::EntityIdView<'_>,
11560            > {
11561                &self.0.reborrow().outputs
11562            }
11563            /// Source location of the job's code (e.g. a repository URL), if reported.
11564            ///
11565            /// Field 10: `location`
11566            #[must_use]
11567            pub fn location(&self) -> &'_ str {
11568                self.0.reborrow().location
11569            }
11570            /// Field 11: `description`
11571            #[must_use]
11572            pub fn description(&self) -> &'_ str {
11573                self.0.reborrow().description
11574            }
11575            /// The most recent run; the same object as `latest_runs[0]` when present.
11576            ///
11577            /// Field 12: `latest_run`
11578            #[must_use]
11579            pub fn latest_run(
11580                &self,
11581            ) -> &::buffa::MessageFieldView<
11582                super::super::__buffa::view::RunDetailView<'_>,
11583            > {
11584                &self.0.reborrow().latest_run
11585            }
11586            /// Field 13: `latest_runs`
11587            #[must_use]
11588            pub fn latest_runs(
11589                &self,
11590            ) -> &::buffa::RepeatedView<
11591                '_,
11592                super::super::__buffa::view::RunDetailView<'_>,
11593            > {
11594                &self.0.reborrow().latest_runs
11595            }
11596            /// Field 14: `tags`
11597            #[must_use]
11598            pub fn tags(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
11599                &self.0.reborrow().tags
11600            }
11601            /// Field 15: `parent_job_name`
11602            #[must_use]
11603            pub fn parent_job_name(&self) -> &'_ str {
11604                self.0.reborrow().parent_job_name
11605            }
11606            /// Field 16: `parent_job_uuid`
11607            #[must_use]
11608            pub fn parent_job_uuid(&self) -> &'_ str {
11609                self.0.reborrow().parent_job_uuid
11610            }
11611            /// Opaque UUID that changes whenever the job's inputs, outputs, or metadata
11612            /// change. Use it to detect that a job's shape has moved.
11613            ///
11614            /// Field 17: `current_version`
11615            #[must_use]
11616            pub fn current_version(&self) -> &'_ str {
11617                self.0.reborrow().current_version
11618            }
11619        }
11620        impl ::core::convert::From<::buffa::OwnedView<JobDetailView<'static>>>
11621        for JobDetailOwnedView {
11622            fn from(inner: ::buffa::OwnedView<JobDetailView<'static>>) -> Self {
11623                JobDetailOwnedView(inner)
11624            }
11625        }
11626        impl ::core::convert::From<JobDetailOwnedView>
11627        for ::buffa::OwnedView<JobDetailView<'static>> {
11628            fn from(wrapper: JobDetailOwnedView) -> Self {
11629                wrapper.0
11630            }
11631        }
11632        impl ::core::convert::AsRef<::buffa::OwnedView<JobDetailView<'static>>>
11633        for JobDetailOwnedView {
11634            fn as_ref(&self) -> &::buffa::OwnedView<JobDetailView<'static>> {
11635                &self.0
11636            }
11637        }
11638        impl ::buffa::HasMessageView for super::super::JobDetail {
11639            type View<'a> = JobDetailView<'a>;
11640            type ViewHandle = JobDetailOwnedView;
11641        }
11642        impl ::serde::Serialize for JobDetailOwnedView {
11643            fn serialize<__S: ::serde::Serializer>(
11644                &self,
11645                __s: __S,
11646            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11647                ::serde::Serialize::serialize(&self.0, __s)
11648            }
11649        }
11650        /// A single execution of a job.
11651        #[derive(Clone, Debug, Default)]
11652        pub struct RunDetailView<'a> {
11653            /// Run identifier (a UUID, from the OpenLineage `run.runId`).
11654            ///
11655            /// Field 1: `id`
11656            pub id: &'a str,
11657            /// Field 2: `created_at`
11658            pub created_at: &'a str,
11659            /// Field 3: `updated_at`
11660            pub updated_at: &'a str,
11661            /// Field 4: `state`
11662            pub state: ::buffa::EnumValue<super::super::RunState>,
11663            /// Scheduled (not actual) start / end of the run's nominal time window.
11664            ///
11665            /// Field 5: `nominal_start_time`
11666            pub nominal_start_time: &'a str,
11667            /// Field 6: `nominal_end_time`
11668            pub nominal_end_time: &'a str,
11669            /// Actual wall-clock start / end, when observed.
11670            ///
11671            /// Field 7: `started_at`
11672            pub started_at: &'a str,
11673            /// Field 8: `ended_at`
11674            pub ended_at: &'a str,
11675            /// Observed run duration in milliseconds; 0 when start or end is unknown.
11676            ///
11677            /// Field 9: `duration_ms`
11678            pub duration_ms: u64,
11679            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11680        }
11681        impl<'a> RunDetailView<'a> {
11682            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
11683            ///
11684            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
11685            /// and by generated sub-message decode arms with `depth - 1`.
11686            ///
11687            /// **Not part of the public API.** Named with a leading underscore to
11688            /// signal that it is for generated-code use only.
11689            #[doc(hidden)]
11690            pub fn _decode_depth(
11691                buf: &'a [u8],
11692                depth: u32,
11693            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11694                let mut view = Self::default();
11695                view._merge_into_view(buf, depth)?;
11696                ::core::result::Result::Ok(view)
11697            }
11698            /// Merge fields from `buf` into this view (proto merge semantics).
11699            ///
11700            /// Repeated fields append; singular fields last-wins; singular
11701            /// MESSAGE fields merge recursively. Used by sub-message decode
11702            /// arms when the same field appears multiple times on the wire.
11703            ///
11704            /// **Not part of the public API.**
11705            #[doc(hidden)]
11706            pub fn _merge_into_view(
11707                &mut self,
11708                buf: &'a [u8],
11709                depth: u32,
11710            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
11711                let _ = depth;
11712                #[allow(unused_variables)]
11713                let view = self;
11714                let mut cur: &'a [u8] = buf;
11715                while !cur.is_empty() {
11716                    let before_tag = cur;
11717                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
11718                    match tag.field_number() {
11719                        1u32 => {
11720                            if tag.wire_type()
11721                                != ::buffa::encoding::WireType::LengthDelimited
11722                            {
11723                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11724                                    field_number: 1u32,
11725                                    expected: 2u8,
11726                                    actual: tag.wire_type() as u8,
11727                                });
11728                            }
11729                            view.id = ::buffa::types::borrow_str(&mut cur)?;
11730                        }
11731                        2u32 => {
11732                            if tag.wire_type()
11733                                != ::buffa::encoding::WireType::LengthDelimited
11734                            {
11735                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11736                                    field_number: 2u32,
11737                                    expected: 2u8,
11738                                    actual: tag.wire_type() as u8,
11739                                });
11740                            }
11741                            view.created_at = ::buffa::types::borrow_str(&mut cur)?;
11742                        }
11743                        3u32 => {
11744                            if tag.wire_type()
11745                                != ::buffa::encoding::WireType::LengthDelimited
11746                            {
11747                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11748                                    field_number: 3u32,
11749                                    expected: 2u8,
11750                                    actual: tag.wire_type() as u8,
11751                                });
11752                            }
11753                            view.updated_at = ::buffa::types::borrow_str(&mut cur)?;
11754                        }
11755                        4u32 => {
11756                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
11757                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11758                                    field_number: 4u32,
11759                                    expected: 0u8,
11760                                    actual: tag.wire_type() as u8,
11761                                });
11762                            }
11763                            view.state = ::buffa::EnumValue::from(
11764                                ::buffa::types::decode_int32(&mut cur)?,
11765                            );
11766                        }
11767                        5u32 => {
11768                            if tag.wire_type()
11769                                != ::buffa::encoding::WireType::LengthDelimited
11770                            {
11771                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11772                                    field_number: 5u32,
11773                                    expected: 2u8,
11774                                    actual: tag.wire_type() as u8,
11775                                });
11776                            }
11777                            view.nominal_start_time = ::buffa::types::borrow_str(
11778                                &mut cur,
11779                            )?;
11780                        }
11781                        6u32 => {
11782                            if tag.wire_type()
11783                                != ::buffa::encoding::WireType::LengthDelimited
11784                            {
11785                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11786                                    field_number: 6u32,
11787                                    expected: 2u8,
11788                                    actual: tag.wire_type() as u8,
11789                                });
11790                            }
11791                            view.nominal_end_time = ::buffa::types::borrow_str(
11792                                &mut cur,
11793                            )?;
11794                        }
11795                        7u32 => {
11796                            if tag.wire_type()
11797                                != ::buffa::encoding::WireType::LengthDelimited
11798                            {
11799                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11800                                    field_number: 7u32,
11801                                    expected: 2u8,
11802                                    actual: tag.wire_type() as u8,
11803                                });
11804                            }
11805                            view.started_at = ::buffa::types::borrow_str(&mut cur)?;
11806                        }
11807                        8u32 => {
11808                            if tag.wire_type()
11809                                != ::buffa::encoding::WireType::LengthDelimited
11810                            {
11811                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11812                                    field_number: 8u32,
11813                                    expected: 2u8,
11814                                    actual: tag.wire_type() as u8,
11815                                });
11816                            }
11817                            view.ended_at = ::buffa::types::borrow_str(&mut cur)?;
11818                        }
11819                        9u32 => {
11820                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
11821                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
11822                                    field_number: 9u32,
11823                                    expected: 0u8,
11824                                    actual: tag.wire_type() as u8,
11825                                });
11826                            }
11827                            view.duration_ms = ::buffa::types::decode_uint64(&mut cur)?;
11828                        }
11829                        _ => {
11830                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
11831                            let span_len = before_tag.len() - cur.len();
11832                            view.__buffa_unknown_fields
11833                                .push_raw(&before_tag[..span_len]);
11834                        }
11835                    }
11836                }
11837                ::core::result::Result::Ok(())
11838            }
11839        }
11840        impl<'a> ::buffa::MessageView<'a> for RunDetailView<'a> {
11841            type Owned = super::super::RunDetail;
11842            fn decode_view(
11843                buf: &'a [u8],
11844            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11845                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
11846            }
11847            fn decode_view_with_limit(
11848                buf: &'a [u8],
11849                depth: u32,
11850            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11851                Self::_decode_depth(buf, depth)
11852            }
11853            fn to_owned_message(&self) -> super::super::RunDetail {
11854                self.to_owned_from_source(None)
11855            }
11856            #[allow(clippy::useless_conversion, clippy::needless_update)]
11857            fn to_owned_from_source(
11858                &self,
11859                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
11860            ) -> super::super::RunDetail {
11861                #[allow(unused_imports)]
11862                use ::buffa::alloc::string::ToString as _;
11863                let _ = __buffa_src;
11864                super::super::RunDetail {
11865                    id: self.id.to_string(),
11866                    created_at: self.created_at.to_string(),
11867                    updated_at: self.updated_at.to_string(),
11868                    state: self.state,
11869                    nominal_start_time: self.nominal_start_time.to_string(),
11870                    nominal_end_time: self.nominal_end_time.to_string(),
11871                    started_at: self.started_at.to_string(),
11872                    ended_at: self.ended_at.to_string(),
11873                    duration_ms: self.duration_ms,
11874                    __buffa_unknown_fields: self
11875                        .__buffa_unknown_fields
11876                        .to_owned()
11877                        .unwrap_or_default()
11878                        .into(),
11879                    ..::core::default::Default::default()
11880                }
11881            }
11882        }
11883        impl<'a> ::buffa::ViewEncode<'a> for RunDetailView<'a> {
11884            #[allow(clippy::needless_borrow, clippy::let_and_return)]
11885            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
11886                #[allow(unused_imports)]
11887                use ::buffa::Enumeration as _;
11888                let mut size = 0u32;
11889                if !self.id.is_empty() {
11890                    size += 1u32 + ::buffa::types::string_encoded_len(&self.id) as u32;
11891                }
11892                if !self.created_at.is_empty() {
11893                    size
11894                        += 1u32
11895                            + ::buffa::types::string_encoded_len(&self.created_at)
11896                                as u32;
11897                }
11898                if !self.updated_at.is_empty() {
11899                    size
11900                        += 1u32
11901                            + ::buffa::types::string_encoded_len(&self.updated_at)
11902                                as u32;
11903                }
11904                {
11905                    let val = self.state.to_i32();
11906                    if val != 0 {
11907                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11908                    }
11909                }
11910                if !self.nominal_start_time.is_empty() {
11911                    size
11912                        += 1u32
11913                            + ::buffa::types::string_encoded_len(
11914                                &self.nominal_start_time,
11915                            ) as u32;
11916                }
11917                if !self.nominal_end_time.is_empty() {
11918                    size
11919                        += 1u32
11920                            + ::buffa::types::string_encoded_len(&self.nominal_end_time)
11921                                as u32;
11922                }
11923                if !self.started_at.is_empty() {
11924                    size
11925                        += 1u32
11926                            + ::buffa::types::string_encoded_len(&self.started_at)
11927                                as u32;
11928                }
11929                if !self.ended_at.is_empty() {
11930                    size
11931                        += 1u32
11932                            + ::buffa::types::string_encoded_len(&self.ended_at) as u32;
11933                }
11934                if self.duration_ms != 0u64 {
11935                    size
11936                        += 1u32
11937                            + ::buffa::types::uint64_encoded_len(self.duration_ms)
11938                                as u32;
11939                }
11940                size += self.__buffa_unknown_fields.encoded_len() as u32;
11941                size
11942            }
11943            #[allow(clippy::needless_borrow)]
11944            fn write_to(
11945                &self,
11946                _cache: &mut ::buffa::SizeCache,
11947                buf: &mut impl ::buffa::bytes::BufMut,
11948            ) {
11949                #[allow(unused_imports)]
11950                use ::buffa::Enumeration as _;
11951                if !self.id.is_empty() {
11952                    ::buffa::encoding::Tag::new(
11953                            1u32,
11954                            ::buffa::encoding::WireType::LengthDelimited,
11955                        )
11956                        .encode(buf);
11957                    ::buffa::types::encode_string(&self.id, buf);
11958                }
11959                if !self.created_at.is_empty() {
11960                    ::buffa::encoding::Tag::new(
11961                            2u32,
11962                            ::buffa::encoding::WireType::LengthDelimited,
11963                        )
11964                        .encode(buf);
11965                    ::buffa::types::encode_string(&self.created_at, buf);
11966                }
11967                if !self.updated_at.is_empty() {
11968                    ::buffa::encoding::Tag::new(
11969                            3u32,
11970                            ::buffa::encoding::WireType::LengthDelimited,
11971                        )
11972                        .encode(buf);
11973                    ::buffa::types::encode_string(&self.updated_at, buf);
11974                }
11975                {
11976                    let val = self.state.to_i32();
11977                    if val != 0 {
11978                        ::buffa::encoding::Tag::new(
11979                                4u32,
11980                                ::buffa::encoding::WireType::Varint,
11981                            )
11982                            .encode(buf);
11983                        ::buffa::types::encode_int32(val, buf);
11984                    }
11985                }
11986                if !self.nominal_start_time.is_empty() {
11987                    ::buffa::encoding::Tag::new(
11988                            5u32,
11989                            ::buffa::encoding::WireType::LengthDelimited,
11990                        )
11991                        .encode(buf);
11992                    ::buffa::types::encode_string(&self.nominal_start_time, buf);
11993                }
11994                if !self.nominal_end_time.is_empty() {
11995                    ::buffa::encoding::Tag::new(
11996                            6u32,
11997                            ::buffa::encoding::WireType::LengthDelimited,
11998                        )
11999                        .encode(buf);
12000                    ::buffa::types::encode_string(&self.nominal_end_time, buf);
12001                }
12002                if !self.started_at.is_empty() {
12003                    ::buffa::encoding::Tag::new(
12004                            7u32,
12005                            ::buffa::encoding::WireType::LengthDelimited,
12006                        )
12007                        .encode(buf);
12008                    ::buffa::types::encode_string(&self.started_at, buf);
12009                }
12010                if !self.ended_at.is_empty() {
12011                    ::buffa::encoding::Tag::new(
12012                            8u32,
12013                            ::buffa::encoding::WireType::LengthDelimited,
12014                        )
12015                        .encode(buf);
12016                    ::buffa::types::encode_string(&self.ended_at, buf);
12017                }
12018                if self.duration_ms != 0u64 {
12019                    ::buffa::encoding::Tag::new(
12020                            9u32,
12021                            ::buffa::encoding::WireType::Varint,
12022                        )
12023                        .encode(buf);
12024                    ::buffa::types::encode_uint64(self.duration_ms, buf);
12025                }
12026                self.__buffa_unknown_fields.write_to(buf);
12027            }
12028        }
12029        /// Serializes this view as protobuf JSON.
12030        ///
12031        /// Implicit-presence fields with default values are omitted, `required`
12032        /// fields are always emitted, explicit-presence (`optional`) fields are
12033        /// emitted only when set, bytes fields are base64-encoded, and enum
12034        /// values are their proto name strings.
12035        ///
12036        /// This impl uses `serialize_map(None)` because the number of emitted
12037        /// fields depends on default-omission rules; serializers that require
12038        /// known map lengths (e.g. `bincode`) will return a runtime error.
12039        /// Use the owned message type for those formats.
12040        impl<'__a> ::serde::Serialize for RunDetailView<'__a> {
12041            fn serialize<__S: ::serde::Serializer>(
12042                &self,
12043                __s: __S,
12044            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12045                use ::serde::ser::SerializeMap as _;
12046                let mut __map = __s.serialize_map(::core::option::Option::None)?;
12047                if !::buffa::json_helpers::skip_if::is_empty_str(self.id) {
12048                    __map.serialize_entry("id", self.id)?;
12049                }
12050                if !::buffa::json_helpers::skip_if::is_empty_str(self.created_at) {
12051                    __map.serialize_entry("createdAt", self.created_at)?;
12052                }
12053                if !::buffa::json_helpers::skip_if::is_empty_str(self.updated_at) {
12054                    __map.serialize_entry("updatedAt", self.updated_at)?;
12055                }
12056                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.state) {
12057                    __map.serialize_entry("state", &self.state)?;
12058                }
12059                if !::buffa::json_helpers::skip_if::is_empty_str(
12060                    self.nominal_start_time,
12061                ) {
12062                    __map.serialize_entry("nominalStartTime", self.nominal_start_time)?;
12063                }
12064                if !::buffa::json_helpers::skip_if::is_empty_str(self.nominal_end_time) {
12065                    __map.serialize_entry("nominalEndTime", self.nominal_end_time)?;
12066                }
12067                if !::buffa::json_helpers::skip_if::is_empty_str(self.started_at) {
12068                    __map.serialize_entry("startedAt", self.started_at)?;
12069                }
12070                if !::buffa::json_helpers::skip_if::is_empty_str(self.ended_at) {
12071                    __map.serialize_entry("endedAt", self.ended_at)?;
12072                }
12073                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.duration_ms) {
12074                    struct _W(u64);
12075                    impl ::serde::Serialize for _W {
12076                        fn serialize<__S: ::serde::Serializer>(
12077                            &self,
12078                            __s: __S,
12079                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
12080                            ::buffa::json_helpers::uint64::serialize(&self.0, __s)
12081                        }
12082                    }
12083                    __map.serialize_entry("durationMs", &_W(self.duration_ms))?;
12084                }
12085                __map.end()
12086            }
12087        }
12088        impl<'a> ::buffa::MessageName for RunDetailView<'a> {
12089            const PACKAGE: &'static str = "headwaters.read.v1";
12090            const NAME: &'static str = "RunDetail";
12091            const FULL_NAME: &'static str = "headwaters.read.v1.RunDetail";
12092            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.RunDetail";
12093        }
12094        impl<'v> ::buffa::DefaultViewInstance for RunDetailView<'v> {
12095            fn default_view_instance<'a>() -> &'a Self
12096            where
12097                Self: 'a,
12098            {
12099                static VALUE: ::buffa::__private::OnceBox<RunDetailView<'static>> = ::buffa::__private::OnceBox::new();
12100                VALUE
12101                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
12102                        <RunDetailView<'static>>::default(),
12103                    ))
12104            }
12105        }
12106        impl ::buffa::ViewReborrow for RunDetailView<'static> {
12107            type Reborrowed<'b> = RunDetailView<'b>;
12108            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
12109                this
12110            }
12111        }
12112        /** Self-contained, `'static` owned view of a `RunDetail` message.
12113
12114 Wraps [`::buffa::OwnedView`]`<`[`RunDetailView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
12115
12116 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`RunDetailView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
12117        #[derive(Clone, Debug)]
12118        pub struct RunDetailOwnedView(::buffa::OwnedView<RunDetailView<'static>>);
12119        impl RunDetailOwnedView {
12120            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
12121            ///
12122            /// The view borrows directly from the buffer's data; the buffer is
12123            /// retained inside the returned handle.
12124            ///
12125            /// # Errors
12126            ///
12127            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
12128            /// protobuf data.
12129            pub fn decode(
12130                bytes: ::buffa::bytes::Bytes,
12131            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12132                ::core::result::Result::Ok(
12133                    RunDetailOwnedView(::buffa::OwnedView::decode(bytes)?),
12134                )
12135            }
12136            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
12137            /// max message size).
12138            ///
12139            /// # Errors
12140            ///
12141            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
12142            /// exceeds the configured limits.
12143            pub fn decode_with_options(
12144                bytes: ::buffa::bytes::Bytes,
12145                opts: &::buffa::DecodeOptions,
12146            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12147                ::core::result::Result::Ok(
12148                    RunDetailOwnedView(
12149                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12150                    ),
12151                )
12152            }
12153            /// Build from an owned message via an encode → decode round-trip.
12154            ///
12155            /// # Errors
12156            ///
12157            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
12158            /// somehow invalid (should not happen for well-formed messages).
12159            pub fn from_owned(
12160                msg: &super::super::RunDetail,
12161            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12162                ::core::result::Result::Ok(
12163                    RunDetailOwnedView(::buffa::OwnedView::from_owned(msg)?),
12164                )
12165            }
12166            /// Borrow the full [`RunDetailView`] with its lifetime tied to `&self`.
12167            #[must_use]
12168            pub fn view(&self) -> &RunDetailView<'_> {
12169                self.0.reborrow()
12170            }
12171            /// Convert to the owned message type.
12172            #[must_use]
12173            pub fn to_owned_message(&self) -> super::super::RunDetail {
12174                self.0.to_owned_message()
12175            }
12176            /// The underlying bytes buffer.
12177            #[must_use]
12178            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12179                self.0.bytes()
12180            }
12181            /// Consume the handle, returning the underlying bytes buffer.
12182            #[must_use]
12183            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12184                self.0.into_bytes()
12185            }
12186            /// Run identifier (a UUID, from the OpenLineage `run.runId`).
12187            ///
12188            /// Field 1: `id`
12189            #[must_use]
12190            pub fn id(&self) -> &'_ str {
12191                self.0.reborrow().id
12192            }
12193            /// Field 2: `created_at`
12194            #[must_use]
12195            pub fn created_at(&self) -> &'_ str {
12196                self.0.reborrow().created_at
12197            }
12198            /// Field 3: `updated_at`
12199            #[must_use]
12200            pub fn updated_at(&self) -> &'_ str {
12201                self.0.reborrow().updated_at
12202            }
12203            /// Field 4: `state`
12204            #[must_use]
12205            pub fn state(&self) -> ::buffa::EnumValue<super::super::RunState> {
12206                self.0.reborrow().state
12207            }
12208            /// Scheduled (not actual) start / end of the run's nominal time window.
12209            ///
12210            /// Field 5: `nominal_start_time`
12211            #[must_use]
12212            pub fn nominal_start_time(&self) -> &'_ str {
12213                self.0.reborrow().nominal_start_time
12214            }
12215            /// Field 6: `nominal_end_time`
12216            #[must_use]
12217            pub fn nominal_end_time(&self) -> &'_ str {
12218                self.0.reborrow().nominal_end_time
12219            }
12220            /// Actual wall-clock start / end, when observed.
12221            ///
12222            /// Field 7: `started_at`
12223            #[must_use]
12224            pub fn started_at(&self) -> &'_ str {
12225                self.0.reborrow().started_at
12226            }
12227            /// Field 8: `ended_at`
12228            #[must_use]
12229            pub fn ended_at(&self) -> &'_ str {
12230                self.0.reborrow().ended_at
12231            }
12232            /// Observed run duration in milliseconds; 0 when start or end is unknown.
12233            ///
12234            /// Field 9: `duration_ms`
12235            #[must_use]
12236            pub fn duration_ms(&self) -> u64 {
12237                self.0.reborrow().duration_ms
12238            }
12239        }
12240        impl ::core::convert::From<::buffa::OwnedView<RunDetailView<'static>>>
12241        for RunDetailOwnedView {
12242            fn from(inner: ::buffa::OwnedView<RunDetailView<'static>>) -> Self {
12243                RunDetailOwnedView(inner)
12244            }
12245        }
12246        impl ::core::convert::From<RunDetailOwnedView>
12247        for ::buffa::OwnedView<RunDetailView<'static>> {
12248            fn from(wrapper: RunDetailOwnedView) -> Self {
12249                wrapper.0
12250            }
12251        }
12252        impl ::core::convert::AsRef<::buffa::OwnedView<RunDetailView<'static>>>
12253        for RunDetailOwnedView {
12254            fn as_ref(&self) -> &::buffa::OwnedView<RunDetailView<'static>> {
12255                &self.0
12256            }
12257        }
12258        impl ::buffa::HasMessageView for super::super::RunDetail {
12259            type View<'a> = RunDetailView<'a>;
12260            type ViewHandle = RunDetailOwnedView;
12261        }
12262        impl ::serde::Serialize for RunDetailOwnedView {
12263            fn serialize<__S: ::serde::Serializer>(
12264                &self,
12265                __s: __S,
12266            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12267                ::serde::Serialize::serialize(&self.0, __s)
12268            }
12269        }
12270        #[derive(Clone, Debug, Default)]
12271        pub struct ListJobsResponseView<'a> {
12272            /// Field 1: `jobs`
12273            pub jobs: ::buffa::RepeatedView<
12274                'a,
12275                super::super::__buffa::view::JobDetailView<'a>,
12276            >,
12277            /// Total jobs matching the request, ignoring `limit` / `offset`. Page through
12278            /// by advancing `offset` until it reaches `total_count`.
12279            ///
12280            /// Field 2: `total_count`
12281            pub total_count: i32,
12282            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12283        }
12284        impl<'a> ListJobsResponseView<'a> {
12285            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
12286            ///
12287            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
12288            /// and by generated sub-message decode arms with `depth - 1`.
12289            ///
12290            /// **Not part of the public API.** Named with a leading underscore to
12291            /// signal that it is for generated-code use only.
12292            #[doc(hidden)]
12293            pub fn _decode_depth(
12294                buf: &'a [u8],
12295                depth: u32,
12296            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12297                let mut view = Self::default();
12298                view._merge_into_view(buf, depth)?;
12299                ::core::result::Result::Ok(view)
12300            }
12301            /// Merge fields from `buf` into this view (proto merge semantics).
12302            ///
12303            /// Repeated fields append; singular fields last-wins; singular
12304            /// MESSAGE fields merge recursively. Used by sub-message decode
12305            /// arms when the same field appears multiple times on the wire.
12306            ///
12307            /// **Not part of the public API.**
12308            #[doc(hidden)]
12309            pub fn _merge_into_view(
12310                &mut self,
12311                buf: &'a [u8],
12312                depth: u32,
12313            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
12314                let _ = depth;
12315                #[allow(unused_variables)]
12316                let view = self;
12317                let mut cur: &'a [u8] = buf;
12318                while !cur.is_empty() {
12319                    let before_tag = cur;
12320                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
12321                    match tag.field_number() {
12322                        2u32 => {
12323                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
12324                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12325                                    field_number: 2u32,
12326                                    expected: 0u8,
12327                                    actual: tag.wire_type() as u8,
12328                                });
12329                            }
12330                            view.total_count = ::buffa::types::decode_int32(&mut cur)?;
12331                        }
12332                        1u32 => {
12333                            if tag.wire_type()
12334                                != ::buffa::encoding::WireType::LengthDelimited
12335                            {
12336                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12337                                    field_number: 1u32,
12338                                    expected: 2u8,
12339                                    actual: tag.wire_type() as u8,
12340                                });
12341                            }
12342                            if depth == 0 {
12343                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
12344                            }
12345                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12346                            view.jobs
12347                                .push(
12348                                    super::super::__buffa::view::JobDetailView::_decode_depth(
12349                                        sub,
12350                                        depth - 1,
12351                                    )?,
12352                                );
12353                        }
12354                        _ => {
12355                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
12356                            let span_len = before_tag.len() - cur.len();
12357                            view.__buffa_unknown_fields
12358                                .push_raw(&before_tag[..span_len]);
12359                        }
12360                    }
12361                }
12362                ::core::result::Result::Ok(())
12363            }
12364        }
12365        impl<'a> ::buffa::MessageView<'a> for ListJobsResponseView<'a> {
12366            type Owned = super::super::ListJobsResponse;
12367            fn decode_view(
12368                buf: &'a [u8],
12369            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12370                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
12371            }
12372            fn decode_view_with_limit(
12373                buf: &'a [u8],
12374                depth: u32,
12375            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12376                Self::_decode_depth(buf, depth)
12377            }
12378            fn to_owned_message(&self) -> super::super::ListJobsResponse {
12379                self.to_owned_from_source(None)
12380            }
12381            #[allow(clippy::useless_conversion, clippy::needless_update)]
12382            fn to_owned_from_source(
12383                &self,
12384                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12385            ) -> super::super::ListJobsResponse {
12386                #[allow(unused_imports)]
12387                use ::buffa::alloc::string::ToString as _;
12388                let _ = __buffa_src;
12389                super::super::ListJobsResponse {
12390                    jobs: self
12391                        .jobs
12392                        .iter()
12393                        .map(|v| v.to_owned_from_source(__buffa_src))
12394                        .collect(),
12395                    total_count: self.total_count,
12396                    __buffa_unknown_fields: self
12397                        .__buffa_unknown_fields
12398                        .to_owned()
12399                        .unwrap_or_default()
12400                        .into(),
12401                    ..::core::default::Default::default()
12402                }
12403            }
12404        }
12405        impl<'a> ::buffa::ViewEncode<'a> for ListJobsResponseView<'a> {
12406            #[allow(clippy::needless_borrow, clippy::let_and_return)]
12407            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
12408                #[allow(unused_imports)]
12409                use ::buffa::Enumeration as _;
12410                let mut size = 0u32;
12411                for v in &self.jobs {
12412                    let __slot = __cache.reserve();
12413                    let inner_size = v.compute_size(__cache);
12414                    __cache.set(__slot, inner_size);
12415                    size
12416                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12417                            + inner_size;
12418                }
12419                if self.total_count != 0i32 {
12420                    size
12421                        += 1u32
12422                            + ::buffa::types::int32_encoded_len(self.total_count) as u32;
12423                }
12424                size += self.__buffa_unknown_fields.encoded_len() as u32;
12425                size
12426            }
12427            #[allow(clippy::needless_borrow)]
12428            fn write_to(
12429                &self,
12430                __cache: &mut ::buffa::SizeCache,
12431                buf: &mut impl ::buffa::bytes::BufMut,
12432            ) {
12433                #[allow(unused_imports)]
12434                use ::buffa::Enumeration as _;
12435                for v in &self.jobs {
12436                    ::buffa::encoding::Tag::new(
12437                            1u32,
12438                            ::buffa::encoding::WireType::LengthDelimited,
12439                        )
12440                        .encode(buf);
12441                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
12442                    v.write_to(__cache, buf);
12443                }
12444                if self.total_count != 0i32 {
12445                    ::buffa::encoding::Tag::new(
12446                            2u32,
12447                            ::buffa::encoding::WireType::Varint,
12448                        )
12449                        .encode(buf);
12450                    ::buffa::types::encode_int32(self.total_count, buf);
12451                }
12452                self.__buffa_unknown_fields.write_to(buf);
12453            }
12454        }
12455        /// Serializes this view as protobuf JSON.
12456        ///
12457        /// Implicit-presence fields with default values are omitted, `required`
12458        /// fields are always emitted, explicit-presence (`optional`) fields are
12459        /// emitted only when set, bytes fields are base64-encoded, and enum
12460        /// values are their proto name strings.
12461        ///
12462        /// This impl uses `serialize_map(None)` because the number of emitted
12463        /// fields depends on default-omission rules; serializers that require
12464        /// known map lengths (e.g. `bincode`) will return a runtime error.
12465        /// Use the owned message type for those formats.
12466        impl<'__a> ::serde::Serialize for ListJobsResponseView<'__a> {
12467            fn serialize<__S: ::serde::Serializer>(
12468                &self,
12469                __s: __S,
12470            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12471                use ::serde::ser::SerializeMap as _;
12472                let mut __map = __s.serialize_map(::core::option::Option::None)?;
12473                if !self.jobs.is_empty() {
12474                    __map.serialize_entry("jobs", &*self.jobs)?;
12475                }
12476                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.total_count) {
12477                    struct _W(i32);
12478                    impl ::serde::Serialize for _W {
12479                        fn serialize<__S: ::serde::Serializer>(
12480                            &self,
12481                            __s: __S,
12482                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
12483                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
12484                        }
12485                    }
12486                    __map.serialize_entry("totalCount", &_W(self.total_count))?;
12487                }
12488                __map.end()
12489            }
12490        }
12491        impl<'a> ::buffa::MessageName for ListJobsResponseView<'a> {
12492            const PACKAGE: &'static str = "headwaters.read.v1";
12493            const NAME: &'static str = "ListJobsResponse";
12494            const FULL_NAME: &'static str = "headwaters.read.v1.ListJobsResponse";
12495            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListJobsResponse";
12496        }
12497        impl<'v> ::buffa::DefaultViewInstance for ListJobsResponseView<'v> {
12498            fn default_view_instance<'a>() -> &'a Self
12499            where
12500                Self: 'a,
12501            {
12502                static VALUE: ::buffa::__private::OnceBox<
12503                    ListJobsResponseView<'static>,
12504                > = ::buffa::__private::OnceBox::new();
12505                VALUE
12506                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
12507                        <ListJobsResponseView<'static>>::default(),
12508                    ))
12509            }
12510        }
12511        impl ::buffa::ViewReborrow for ListJobsResponseView<'static> {
12512            type Reborrowed<'b> = ListJobsResponseView<'b>;
12513            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
12514                this
12515            }
12516        }
12517        /** Self-contained, `'static` owned view of a `ListJobsResponse` message.
12518
12519 Wraps [`::buffa::OwnedView`]`<`[`ListJobsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
12520
12521 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListJobsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
12522        #[derive(Clone, Debug)]
12523        pub struct ListJobsResponseOwnedView(
12524            ::buffa::OwnedView<ListJobsResponseView<'static>>,
12525        );
12526        impl ListJobsResponseOwnedView {
12527            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
12528            ///
12529            /// The view borrows directly from the buffer's data; the buffer is
12530            /// retained inside the returned handle.
12531            ///
12532            /// # Errors
12533            ///
12534            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
12535            /// protobuf data.
12536            pub fn decode(
12537                bytes: ::buffa::bytes::Bytes,
12538            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12539                ::core::result::Result::Ok(
12540                    ListJobsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
12541                )
12542            }
12543            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
12544            /// max message size).
12545            ///
12546            /// # Errors
12547            ///
12548            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
12549            /// exceeds the configured limits.
12550            pub fn decode_with_options(
12551                bytes: ::buffa::bytes::Bytes,
12552                opts: &::buffa::DecodeOptions,
12553            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12554                ::core::result::Result::Ok(
12555                    ListJobsResponseOwnedView(
12556                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12557                    ),
12558                )
12559            }
12560            /// Build from an owned message via an encode → decode round-trip.
12561            ///
12562            /// # Errors
12563            ///
12564            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
12565            /// somehow invalid (should not happen for well-formed messages).
12566            pub fn from_owned(
12567                msg: &super::super::ListJobsResponse,
12568            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12569                ::core::result::Result::Ok(
12570                    ListJobsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
12571                )
12572            }
12573            /// Borrow the full [`ListJobsResponseView`] with its lifetime tied to `&self`.
12574            #[must_use]
12575            pub fn view(&self) -> &ListJobsResponseView<'_> {
12576                self.0.reborrow()
12577            }
12578            /// Convert to the owned message type.
12579            #[must_use]
12580            pub fn to_owned_message(&self) -> super::super::ListJobsResponse {
12581                self.0.to_owned_message()
12582            }
12583            /// The underlying bytes buffer.
12584            #[must_use]
12585            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12586                self.0.bytes()
12587            }
12588            /// Consume the handle, returning the underlying bytes buffer.
12589            #[must_use]
12590            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12591                self.0.into_bytes()
12592            }
12593            /// Field 1: `jobs`
12594            #[must_use]
12595            pub fn jobs(
12596                &self,
12597            ) -> &::buffa::RepeatedView<
12598                '_,
12599                super::super::__buffa::view::JobDetailView<'_>,
12600            > {
12601                &self.0.reborrow().jobs
12602            }
12603            /// Total jobs matching the request, ignoring `limit` / `offset`. Page through
12604            /// by advancing `offset` until it reaches `total_count`.
12605            ///
12606            /// Field 2: `total_count`
12607            #[must_use]
12608            pub fn total_count(&self) -> i32 {
12609                self.0.reborrow().total_count
12610            }
12611        }
12612        impl ::core::convert::From<::buffa::OwnedView<ListJobsResponseView<'static>>>
12613        for ListJobsResponseOwnedView {
12614            fn from(inner: ::buffa::OwnedView<ListJobsResponseView<'static>>) -> Self {
12615                ListJobsResponseOwnedView(inner)
12616            }
12617        }
12618        impl ::core::convert::From<ListJobsResponseOwnedView>
12619        for ::buffa::OwnedView<ListJobsResponseView<'static>> {
12620            fn from(wrapper: ListJobsResponseOwnedView) -> Self {
12621                wrapper.0
12622            }
12623        }
12624        impl ::core::convert::AsRef<::buffa::OwnedView<ListJobsResponseView<'static>>>
12625        for ListJobsResponseOwnedView {
12626            fn as_ref(&self) -> &::buffa::OwnedView<ListJobsResponseView<'static>> {
12627                &self.0
12628            }
12629        }
12630        impl ::buffa::HasMessageView for super::super::ListJobsResponse {
12631            type View<'a> = ListJobsResponseView<'a>;
12632            type ViewHandle = ListJobsResponseOwnedView;
12633        }
12634        impl ::serde::Serialize for ListJobsResponseOwnedView {
12635            fn serialize<__S: ::serde::Serializer>(
12636                &self,
12637                __s: __S,
12638            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12639                ::serde::Serialize::serialize(&self.0, __s)
12640            }
12641        }
12642        #[derive(Clone, Debug, Default)]
12643        pub struct ListRunsResponseView<'a> {
12644            /// Field 1: `runs`
12645            pub runs: ::buffa::RepeatedView<
12646                'a,
12647                super::super::__buffa::view::RunDetailView<'a>,
12648            >,
12649            /// Field 2: `total_count`
12650            pub total_count: i32,
12651            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12652        }
12653        impl<'a> ListRunsResponseView<'a> {
12654            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
12655            ///
12656            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
12657            /// and by generated sub-message decode arms with `depth - 1`.
12658            ///
12659            /// **Not part of the public API.** Named with a leading underscore to
12660            /// signal that it is for generated-code use only.
12661            #[doc(hidden)]
12662            pub fn _decode_depth(
12663                buf: &'a [u8],
12664                depth: u32,
12665            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12666                let mut view = Self::default();
12667                view._merge_into_view(buf, depth)?;
12668                ::core::result::Result::Ok(view)
12669            }
12670            /// Merge fields from `buf` into this view (proto merge semantics).
12671            ///
12672            /// Repeated fields append; singular fields last-wins; singular
12673            /// MESSAGE fields merge recursively. Used by sub-message decode
12674            /// arms when the same field appears multiple times on the wire.
12675            ///
12676            /// **Not part of the public API.**
12677            #[doc(hidden)]
12678            pub fn _merge_into_view(
12679                &mut self,
12680                buf: &'a [u8],
12681                depth: u32,
12682            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
12683                let _ = depth;
12684                #[allow(unused_variables)]
12685                let view = self;
12686                let mut cur: &'a [u8] = buf;
12687                while !cur.is_empty() {
12688                    let before_tag = cur;
12689                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
12690                    match tag.field_number() {
12691                        2u32 => {
12692                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
12693                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12694                                    field_number: 2u32,
12695                                    expected: 0u8,
12696                                    actual: tag.wire_type() as u8,
12697                                });
12698                            }
12699                            view.total_count = ::buffa::types::decode_int32(&mut cur)?;
12700                        }
12701                        1u32 => {
12702                            if tag.wire_type()
12703                                != ::buffa::encoding::WireType::LengthDelimited
12704                            {
12705                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
12706                                    field_number: 1u32,
12707                                    expected: 2u8,
12708                                    actual: tag.wire_type() as u8,
12709                                });
12710                            }
12711                            if depth == 0 {
12712                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
12713                            }
12714                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12715                            view.runs
12716                                .push(
12717                                    super::super::__buffa::view::RunDetailView::_decode_depth(
12718                                        sub,
12719                                        depth - 1,
12720                                    )?,
12721                                );
12722                        }
12723                        _ => {
12724                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
12725                            let span_len = before_tag.len() - cur.len();
12726                            view.__buffa_unknown_fields
12727                                .push_raw(&before_tag[..span_len]);
12728                        }
12729                    }
12730                }
12731                ::core::result::Result::Ok(())
12732            }
12733        }
12734        impl<'a> ::buffa::MessageView<'a> for ListRunsResponseView<'a> {
12735            type Owned = super::super::ListRunsResponse;
12736            fn decode_view(
12737                buf: &'a [u8],
12738            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12739                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
12740            }
12741            fn decode_view_with_limit(
12742                buf: &'a [u8],
12743                depth: u32,
12744            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12745                Self::_decode_depth(buf, depth)
12746            }
12747            fn to_owned_message(&self) -> super::super::ListRunsResponse {
12748                self.to_owned_from_source(None)
12749            }
12750            #[allow(clippy::useless_conversion, clippy::needless_update)]
12751            fn to_owned_from_source(
12752                &self,
12753                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12754            ) -> super::super::ListRunsResponse {
12755                #[allow(unused_imports)]
12756                use ::buffa::alloc::string::ToString as _;
12757                let _ = __buffa_src;
12758                super::super::ListRunsResponse {
12759                    runs: self
12760                        .runs
12761                        .iter()
12762                        .map(|v| v.to_owned_from_source(__buffa_src))
12763                        .collect(),
12764                    total_count: self.total_count,
12765                    __buffa_unknown_fields: self
12766                        .__buffa_unknown_fields
12767                        .to_owned()
12768                        .unwrap_or_default()
12769                        .into(),
12770                    ..::core::default::Default::default()
12771                }
12772            }
12773        }
12774        impl<'a> ::buffa::ViewEncode<'a> for ListRunsResponseView<'a> {
12775            #[allow(clippy::needless_borrow, clippy::let_and_return)]
12776            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
12777                #[allow(unused_imports)]
12778                use ::buffa::Enumeration as _;
12779                let mut size = 0u32;
12780                for v in &self.runs {
12781                    let __slot = __cache.reserve();
12782                    let inner_size = v.compute_size(__cache);
12783                    __cache.set(__slot, inner_size);
12784                    size
12785                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12786                            + inner_size;
12787                }
12788                if self.total_count != 0i32 {
12789                    size
12790                        += 1u32
12791                            + ::buffa::types::int32_encoded_len(self.total_count) as u32;
12792                }
12793                size += self.__buffa_unknown_fields.encoded_len() as u32;
12794                size
12795            }
12796            #[allow(clippy::needless_borrow)]
12797            fn write_to(
12798                &self,
12799                __cache: &mut ::buffa::SizeCache,
12800                buf: &mut impl ::buffa::bytes::BufMut,
12801            ) {
12802                #[allow(unused_imports)]
12803                use ::buffa::Enumeration as _;
12804                for v in &self.runs {
12805                    ::buffa::encoding::Tag::new(
12806                            1u32,
12807                            ::buffa::encoding::WireType::LengthDelimited,
12808                        )
12809                        .encode(buf);
12810                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
12811                    v.write_to(__cache, buf);
12812                }
12813                if self.total_count != 0i32 {
12814                    ::buffa::encoding::Tag::new(
12815                            2u32,
12816                            ::buffa::encoding::WireType::Varint,
12817                        )
12818                        .encode(buf);
12819                    ::buffa::types::encode_int32(self.total_count, buf);
12820                }
12821                self.__buffa_unknown_fields.write_to(buf);
12822            }
12823        }
12824        /// Serializes this view as protobuf JSON.
12825        ///
12826        /// Implicit-presence fields with default values are omitted, `required`
12827        /// fields are always emitted, explicit-presence (`optional`) fields are
12828        /// emitted only when set, bytes fields are base64-encoded, and enum
12829        /// values are their proto name strings.
12830        ///
12831        /// This impl uses `serialize_map(None)` because the number of emitted
12832        /// fields depends on default-omission rules; serializers that require
12833        /// known map lengths (e.g. `bincode`) will return a runtime error.
12834        /// Use the owned message type for those formats.
12835        impl<'__a> ::serde::Serialize for ListRunsResponseView<'__a> {
12836            fn serialize<__S: ::serde::Serializer>(
12837                &self,
12838                __s: __S,
12839            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12840                use ::serde::ser::SerializeMap as _;
12841                let mut __map = __s.serialize_map(::core::option::Option::None)?;
12842                if !self.runs.is_empty() {
12843                    __map.serialize_entry("runs", &*self.runs)?;
12844                }
12845                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.total_count) {
12846                    struct _W(i32);
12847                    impl ::serde::Serialize for _W {
12848                        fn serialize<__S: ::serde::Serializer>(
12849                            &self,
12850                            __s: __S,
12851                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
12852                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
12853                        }
12854                    }
12855                    __map.serialize_entry("totalCount", &_W(self.total_count))?;
12856                }
12857                __map.end()
12858            }
12859        }
12860        impl<'a> ::buffa::MessageName for ListRunsResponseView<'a> {
12861            const PACKAGE: &'static str = "headwaters.read.v1";
12862            const NAME: &'static str = "ListRunsResponse";
12863            const FULL_NAME: &'static str = "headwaters.read.v1.ListRunsResponse";
12864            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListRunsResponse";
12865        }
12866        impl<'v> ::buffa::DefaultViewInstance for ListRunsResponseView<'v> {
12867            fn default_view_instance<'a>() -> &'a Self
12868            where
12869                Self: 'a,
12870            {
12871                static VALUE: ::buffa::__private::OnceBox<
12872                    ListRunsResponseView<'static>,
12873                > = ::buffa::__private::OnceBox::new();
12874                VALUE
12875                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
12876                        <ListRunsResponseView<'static>>::default(),
12877                    ))
12878            }
12879        }
12880        impl ::buffa::ViewReborrow for ListRunsResponseView<'static> {
12881            type Reborrowed<'b> = ListRunsResponseView<'b>;
12882            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
12883                this
12884            }
12885        }
12886        /** Self-contained, `'static` owned view of a `ListRunsResponse` message.
12887
12888 Wraps [`::buffa::OwnedView`]`<`[`ListRunsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
12889
12890 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListRunsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
12891        #[derive(Clone, Debug)]
12892        pub struct ListRunsResponseOwnedView(
12893            ::buffa::OwnedView<ListRunsResponseView<'static>>,
12894        );
12895        impl ListRunsResponseOwnedView {
12896            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
12897            ///
12898            /// The view borrows directly from the buffer's data; the buffer is
12899            /// retained inside the returned handle.
12900            ///
12901            /// # Errors
12902            ///
12903            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
12904            /// protobuf data.
12905            pub fn decode(
12906                bytes: ::buffa::bytes::Bytes,
12907            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12908                ::core::result::Result::Ok(
12909                    ListRunsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
12910                )
12911            }
12912            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
12913            /// max message size).
12914            ///
12915            /// # Errors
12916            ///
12917            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
12918            /// exceeds the configured limits.
12919            pub fn decode_with_options(
12920                bytes: ::buffa::bytes::Bytes,
12921                opts: &::buffa::DecodeOptions,
12922            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12923                ::core::result::Result::Ok(
12924                    ListRunsResponseOwnedView(
12925                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12926                    ),
12927                )
12928            }
12929            /// Build from an owned message via an encode → decode round-trip.
12930            ///
12931            /// # Errors
12932            ///
12933            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
12934            /// somehow invalid (should not happen for well-formed messages).
12935            pub fn from_owned(
12936                msg: &super::super::ListRunsResponse,
12937            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12938                ::core::result::Result::Ok(
12939                    ListRunsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
12940                )
12941            }
12942            /// Borrow the full [`ListRunsResponseView`] with its lifetime tied to `&self`.
12943            #[must_use]
12944            pub fn view(&self) -> &ListRunsResponseView<'_> {
12945                self.0.reborrow()
12946            }
12947            /// Convert to the owned message type.
12948            #[must_use]
12949            pub fn to_owned_message(&self) -> super::super::ListRunsResponse {
12950                self.0.to_owned_message()
12951            }
12952            /// The underlying bytes buffer.
12953            #[must_use]
12954            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12955                self.0.bytes()
12956            }
12957            /// Consume the handle, returning the underlying bytes buffer.
12958            #[must_use]
12959            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12960                self.0.into_bytes()
12961            }
12962            /// Field 1: `runs`
12963            #[must_use]
12964            pub fn runs(
12965                &self,
12966            ) -> &::buffa::RepeatedView<
12967                '_,
12968                super::super::__buffa::view::RunDetailView<'_>,
12969            > {
12970                &self.0.reborrow().runs
12971            }
12972            /// Field 2: `total_count`
12973            #[must_use]
12974            pub fn total_count(&self) -> i32 {
12975                self.0.reborrow().total_count
12976            }
12977        }
12978        impl ::core::convert::From<::buffa::OwnedView<ListRunsResponseView<'static>>>
12979        for ListRunsResponseOwnedView {
12980            fn from(inner: ::buffa::OwnedView<ListRunsResponseView<'static>>) -> Self {
12981                ListRunsResponseOwnedView(inner)
12982            }
12983        }
12984        impl ::core::convert::From<ListRunsResponseOwnedView>
12985        for ::buffa::OwnedView<ListRunsResponseView<'static>> {
12986            fn from(wrapper: ListRunsResponseOwnedView) -> Self {
12987                wrapper.0
12988            }
12989        }
12990        impl ::core::convert::AsRef<::buffa::OwnedView<ListRunsResponseView<'static>>>
12991        for ListRunsResponseOwnedView {
12992            fn as_ref(&self) -> &::buffa::OwnedView<ListRunsResponseView<'static>> {
12993                &self.0
12994            }
12995        }
12996        impl ::buffa::HasMessageView for super::super::ListRunsResponse {
12997            type View<'a> = ListRunsResponseView<'a>;
12998            type ViewHandle = ListRunsResponseOwnedView;
12999        }
13000        impl ::serde::Serialize for ListRunsResponseOwnedView {
13001            fn serialize<__S: ::serde::Serializer>(
13002                &self,
13003                __s: __S,
13004            ) -> ::core::result::Result<__S::Ok, __S::Error> {
13005                ::serde::Serialize::serialize(&self.0, __s)
13006            }
13007        }
13008        /// --- datasets ---
13009        ///
13010        /// A dataset: a table, file, or stream produced and/or consumed by jobs.
13011        #[derive(Clone, Debug, Default)]
13012        pub struct DatasetView<'a> {
13013            /// Field 1: `id`
13014            pub id: ::buffa::MessageFieldView<
13015                super::super::__buffa::view::EntityIdView<'a>,
13016            >,
13017            /// Field 2: `type`
13018            pub r#type: ::buffa::EnumValue<super::super::DatasetType>,
13019            /// Logical dataset name.
13020            ///
13021            /// Field 3: `name`
13022            pub name: &'a str,
13023            /// Storage-level name (e.g. the physical table or path), if distinct from `name`.
13024            ///
13025            /// Field 4: `physical_name`
13026            pub physical_name: &'a str,
13027            /// Field 5: `namespace`
13028            pub namespace: &'a str,
13029            /// Name of the data source the dataset lives in (e.g. a warehouse or bucket).
13030            ///
13031            /// Field 6: `source_name`
13032            pub source_name: &'a str,
13033            /// Field 7: `created_at`
13034            pub created_at: &'a str,
13035            /// Field 8: `updated_at`
13036            pub updated_at: &'a str,
13037            /// Field 9: `description`
13038            pub description: &'a str,
13039            /// Schema columns, each an object like `{name, type, description}`. Open-ended:
13040            /// the exact keys follow the OpenLineage schema facet.
13041            ///
13042            /// Field 10: `fields`
13043            pub fields: ::buffa::RepeatedView<
13044                'a,
13045                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
13046            >,
13047            /// OpenLineage dataset facets, keyed by facet name (e.g. `schema`,
13048            /// `dataSource`, `columnLineage`). Each carries `_producer` / `_schemaURL`.
13049            ///
13050            /// Field 11: `facets`
13051            pub facets: ::buffa::MessageFieldView<
13052                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
13053            >,
13054            /// Field 12: `tags`
13055            pub tags: ::buffa::RepeatedView<'a, &'a str>,
13056            /// True once the dataset has been observed deleted.
13057            ///
13058            /// Field 13: `deleted`
13059            pub deleted: bool,
13060            /// Opaque UUID that changes whenever the dataset's schema changes. Use it to
13061            /// detect that the schema has moved; see also `ListDatasetVersions`.
13062            ///
13063            /// Field 14: `current_version`
13064            pub current_version: &'a str,
13065            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
13066        }
13067        impl<'a> DatasetView<'a> {
13068            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
13069            ///
13070            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
13071            /// and by generated sub-message decode arms with `depth - 1`.
13072            ///
13073            /// **Not part of the public API.** Named with a leading underscore to
13074            /// signal that it is for generated-code use only.
13075            #[doc(hidden)]
13076            pub fn _decode_depth(
13077                buf: &'a [u8],
13078                depth: u32,
13079            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13080                let mut view = Self::default();
13081                view._merge_into_view(buf, depth)?;
13082                ::core::result::Result::Ok(view)
13083            }
13084            /// Merge fields from `buf` into this view (proto merge semantics).
13085            ///
13086            /// Repeated fields append; singular fields last-wins; singular
13087            /// MESSAGE fields merge recursively. Used by sub-message decode
13088            /// arms when the same field appears multiple times on the wire.
13089            ///
13090            /// **Not part of the public API.**
13091            #[doc(hidden)]
13092            pub fn _merge_into_view(
13093                &mut self,
13094                buf: &'a [u8],
13095                depth: u32,
13096            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
13097                let _ = depth;
13098                #[allow(unused_variables)]
13099                let view = self;
13100                let mut cur: &'a [u8] = buf;
13101                while !cur.is_empty() {
13102                    let before_tag = cur;
13103                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
13104                    match tag.field_number() {
13105                        1u32 => {
13106                            if tag.wire_type()
13107                                != ::buffa::encoding::WireType::LengthDelimited
13108                            {
13109                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13110                                    field_number: 1u32,
13111                                    expected: 2u8,
13112                                    actual: tag.wire_type() as u8,
13113                                });
13114                            }
13115                            if depth == 0 {
13116                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
13117                            }
13118                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
13119                            match view.id.as_mut() {
13120                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
13121                                None => {
13122                                    view.id = ::buffa::MessageFieldView::set(
13123                                        super::super::__buffa::view::EntityIdView::_decode_depth(
13124                                            sub,
13125                                            depth - 1,
13126                                        )?,
13127                                    );
13128                                }
13129                            }
13130                        }
13131                        2u32 => {
13132                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
13133                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13134                                    field_number: 2u32,
13135                                    expected: 0u8,
13136                                    actual: tag.wire_type() as u8,
13137                                });
13138                            }
13139                            view.r#type = ::buffa::EnumValue::from(
13140                                ::buffa::types::decode_int32(&mut cur)?,
13141                            );
13142                        }
13143                        3u32 => {
13144                            if tag.wire_type()
13145                                != ::buffa::encoding::WireType::LengthDelimited
13146                            {
13147                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13148                                    field_number: 3u32,
13149                                    expected: 2u8,
13150                                    actual: tag.wire_type() as u8,
13151                                });
13152                            }
13153                            view.name = ::buffa::types::borrow_str(&mut cur)?;
13154                        }
13155                        4u32 => {
13156                            if tag.wire_type()
13157                                != ::buffa::encoding::WireType::LengthDelimited
13158                            {
13159                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13160                                    field_number: 4u32,
13161                                    expected: 2u8,
13162                                    actual: tag.wire_type() as u8,
13163                                });
13164                            }
13165                            view.physical_name = ::buffa::types::borrow_str(&mut cur)?;
13166                        }
13167                        5u32 => {
13168                            if tag.wire_type()
13169                                != ::buffa::encoding::WireType::LengthDelimited
13170                            {
13171                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13172                                    field_number: 5u32,
13173                                    expected: 2u8,
13174                                    actual: tag.wire_type() as u8,
13175                                });
13176                            }
13177                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
13178                        }
13179                        6u32 => {
13180                            if tag.wire_type()
13181                                != ::buffa::encoding::WireType::LengthDelimited
13182                            {
13183                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13184                                    field_number: 6u32,
13185                                    expected: 2u8,
13186                                    actual: tag.wire_type() as u8,
13187                                });
13188                            }
13189                            view.source_name = ::buffa::types::borrow_str(&mut cur)?;
13190                        }
13191                        7u32 => {
13192                            if tag.wire_type()
13193                                != ::buffa::encoding::WireType::LengthDelimited
13194                            {
13195                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13196                                    field_number: 7u32,
13197                                    expected: 2u8,
13198                                    actual: tag.wire_type() as u8,
13199                                });
13200                            }
13201                            view.created_at = ::buffa::types::borrow_str(&mut cur)?;
13202                        }
13203                        8u32 => {
13204                            if tag.wire_type()
13205                                != ::buffa::encoding::WireType::LengthDelimited
13206                            {
13207                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13208                                    field_number: 8u32,
13209                                    expected: 2u8,
13210                                    actual: tag.wire_type() as u8,
13211                                });
13212                            }
13213                            view.updated_at = ::buffa::types::borrow_str(&mut cur)?;
13214                        }
13215                        9u32 => {
13216                            if tag.wire_type()
13217                                != ::buffa::encoding::WireType::LengthDelimited
13218                            {
13219                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13220                                    field_number: 9u32,
13221                                    expected: 2u8,
13222                                    actual: tag.wire_type() as u8,
13223                                });
13224                            }
13225                            view.description = ::buffa::types::borrow_str(&mut cur)?;
13226                        }
13227                        11u32 => {
13228                            if tag.wire_type()
13229                                != ::buffa::encoding::WireType::LengthDelimited
13230                            {
13231                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13232                                    field_number: 11u32,
13233                                    expected: 2u8,
13234                                    actual: tag.wire_type() as u8,
13235                                });
13236                            }
13237                            if depth == 0 {
13238                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
13239                            }
13240                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
13241                            match view.facets.as_mut() {
13242                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
13243                                None => {
13244                                    view.facets = ::buffa::MessageFieldView::set(
13245                                        ::buffa_types::google::protobuf::__buffa::view::StructView::_decode_depth(
13246                                            sub,
13247                                            depth - 1,
13248                                        )?,
13249                                    );
13250                                }
13251                            }
13252                        }
13253                        13u32 => {
13254                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
13255                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13256                                    field_number: 13u32,
13257                                    expected: 0u8,
13258                                    actual: tag.wire_type() as u8,
13259                                });
13260                            }
13261                            view.deleted = ::buffa::types::decode_bool(&mut cur)?;
13262                        }
13263                        14u32 => {
13264                            if tag.wire_type()
13265                                != ::buffa::encoding::WireType::LengthDelimited
13266                            {
13267                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13268                                    field_number: 14u32,
13269                                    expected: 2u8,
13270                                    actual: tag.wire_type() as u8,
13271                                });
13272                            }
13273                            view.current_version = ::buffa::types::borrow_str(&mut cur)?;
13274                        }
13275                        10u32 => {
13276                            if tag.wire_type()
13277                                != ::buffa::encoding::WireType::LengthDelimited
13278                            {
13279                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13280                                    field_number: 10u32,
13281                                    expected: 2u8,
13282                                    actual: tag.wire_type() as u8,
13283                                });
13284                            }
13285                            if depth == 0 {
13286                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
13287                            }
13288                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
13289                            view.fields
13290                                .push(
13291                                    ::buffa_types::google::protobuf::__buffa::view::StructView::_decode_depth(
13292                                        sub,
13293                                        depth - 1,
13294                                    )?,
13295                                );
13296                        }
13297                        12u32 => {
13298                            if tag.wire_type()
13299                                != ::buffa::encoding::WireType::LengthDelimited
13300                            {
13301                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13302                                    field_number: 12u32,
13303                                    expected: 2u8,
13304                                    actual: tag.wire_type() as u8,
13305                                });
13306                            }
13307                            view.tags.push(::buffa::types::borrow_str(&mut cur)?);
13308                        }
13309                        _ => {
13310                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
13311                            let span_len = before_tag.len() - cur.len();
13312                            view.__buffa_unknown_fields
13313                                .push_raw(&before_tag[..span_len]);
13314                        }
13315                    }
13316                }
13317                ::core::result::Result::Ok(())
13318            }
13319        }
13320        impl<'a> ::buffa::MessageView<'a> for DatasetView<'a> {
13321            type Owned = super::super::Dataset;
13322            fn decode_view(
13323                buf: &'a [u8],
13324            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13325                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
13326            }
13327            fn decode_view_with_limit(
13328                buf: &'a [u8],
13329                depth: u32,
13330            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13331                Self::_decode_depth(buf, depth)
13332            }
13333            fn to_owned_message(&self) -> super::super::Dataset {
13334                self.to_owned_from_source(None)
13335            }
13336            #[allow(clippy::useless_conversion, clippy::needless_update)]
13337            fn to_owned_from_source(
13338                &self,
13339                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
13340            ) -> super::super::Dataset {
13341                #[allow(unused_imports)]
13342                use ::buffa::alloc::string::ToString as _;
13343                let _ = __buffa_src;
13344                super::super::Dataset {
13345                    id: match self.id.as_option() {
13346                        Some(v) => {
13347                            ::buffa::MessageField::<
13348                                super::super::EntityId,
13349                            >::some(v.to_owned_from_source(__buffa_src))
13350                        }
13351                        None => ::buffa::MessageField::none(),
13352                    },
13353                    r#type: self.r#type,
13354                    name: self.name.to_string(),
13355                    physical_name: self.physical_name.to_string(),
13356                    namespace: self.namespace.to_string(),
13357                    source_name: self.source_name.to_string(),
13358                    created_at: self.created_at.to_string(),
13359                    updated_at: self.updated_at.to_string(),
13360                    description: self.description.to_string(),
13361                    fields: self
13362                        .fields
13363                        .iter()
13364                        .map(|v| v.to_owned_from_source(__buffa_src))
13365                        .collect(),
13366                    facets: match self.facets.as_option() {
13367                        Some(v) => {
13368                            ::buffa::MessageField::<
13369                                ::buffa_types::google::protobuf::Struct,
13370                            >::some(v.to_owned_from_source(__buffa_src))
13371                        }
13372                        None => ::buffa::MessageField::none(),
13373                    },
13374                    tags: self.tags.iter().map(|s| s.to_string()).collect(),
13375                    deleted: self.deleted,
13376                    current_version: self.current_version.to_string(),
13377                    __buffa_unknown_fields: self
13378                        .__buffa_unknown_fields
13379                        .to_owned()
13380                        .unwrap_or_default()
13381                        .into(),
13382                    ..::core::default::Default::default()
13383                }
13384            }
13385        }
13386        impl<'a> ::buffa::ViewEncode<'a> for DatasetView<'a> {
13387            #[allow(clippy::needless_borrow, clippy::let_and_return)]
13388            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
13389                #[allow(unused_imports)]
13390                use ::buffa::Enumeration as _;
13391                let mut size = 0u32;
13392                if self.id.is_set() {
13393                    let __slot = __cache.reserve();
13394                    let inner_size = self.id.compute_size(__cache);
13395                    __cache.set(__slot, inner_size);
13396                    size
13397                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13398                            + inner_size;
13399                }
13400                {
13401                    let val = self.r#type.to_i32();
13402                    if val != 0 {
13403                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
13404                    }
13405                }
13406                if !self.name.is_empty() {
13407                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
13408                }
13409                if !self.physical_name.is_empty() {
13410                    size
13411                        += 1u32
13412                            + ::buffa::types::string_encoded_len(&self.physical_name)
13413                                as u32;
13414                }
13415                if !self.namespace.is_empty() {
13416                    size
13417                        += 1u32
13418                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
13419                }
13420                if !self.source_name.is_empty() {
13421                    size
13422                        += 1u32
13423                            + ::buffa::types::string_encoded_len(&self.source_name)
13424                                as u32;
13425                }
13426                if !self.created_at.is_empty() {
13427                    size
13428                        += 1u32
13429                            + ::buffa::types::string_encoded_len(&self.created_at)
13430                                as u32;
13431                }
13432                if !self.updated_at.is_empty() {
13433                    size
13434                        += 1u32
13435                            + ::buffa::types::string_encoded_len(&self.updated_at)
13436                                as u32;
13437                }
13438                if !self.description.is_empty() {
13439                    size
13440                        += 1u32
13441                            + ::buffa::types::string_encoded_len(&self.description)
13442                                as u32;
13443                }
13444                for v in &self.fields {
13445                    let __slot = __cache.reserve();
13446                    let inner_size = v.compute_size(__cache);
13447                    __cache.set(__slot, inner_size);
13448                    size
13449                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13450                            + inner_size;
13451                }
13452                if self.facets.is_set() {
13453                    let __slot = __cache.reserve();
13454                    let inner_size = self.facets.compute_size(__cache);
13455                    __cache.set(__slot, inner_size);
13456                    size
13457                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13458                            + inner_size;
13459                }
13460                for v in &self.tags {
13461                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
13462                }
13463                if self.deleted {
13464                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
13465                }
13466                if !self.current_version.is_empty() {
13467                    size
13468                        += 1u32
13469                            + ::buffa::types::string_encoded_len(&self.current_version)
13470                                as u32;
13471                }
13472                size += self.__buffa_unknown_fields.encoded_len() as u32;
13473                size
13474            }
13475            #[allow(clippy::needless_borrow)]
13476            fn write_to(
13477                &self,
13478                __cache: &mut ::buffa::SizeCache,
13479                buf: &mut impl ::buffa::bytes::BufMut,
13480            ) {
13481                #[allow(unused_imports)]
13482                use ::buffa::Enumeration as _;
13483                if self.id.is_set() {
13484                    ::buffa::encoding::Tag::new(
13485                            1u32,
13486                            ::buffa::encoding::WireType::LengthDelimited,
13487                        )
13488                        .encode(buf);
13489                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
13490                    self.id.write_to(__cache, buf);
13491                }
13492                {
13493                    let val = self.r#type.to_i32();
13494                    if val != 0 {
13495                        ::buffa::encoding::Tag::new(
13496                                2u32,
13497                                ::buffa::encoding::WireType::Varint,
13498                            )
13499                            .encode(buf);
13500                        ::buffa::types::encode_int32(val, buf);
13501                    }
13502                }
13503                if !self.name.is_empty() {
13504                    ::buffa::encoding::Tag::new(
13505                            3u32,
13506                            ::buffa::encoding::WireType::LengthDelimited,
13507                        )
13508                        .encode(buf);
13509                    ::buffa::types::encode_string(&self.name, buf);
13510                }
13511                if !self.physical_name.is_empty() {
13512                    ::buffa::encoding::Tag::new(
13513                            4u32,
13514                            ::buffa::encoding::WireType::LengthDelimited,
13515                        )
13516                        .encode(buf);
13517                    ::buffa::types::encode_string(&self.physical_name, buf);
13518                }
13519                if !self.namespace.is_empty() {
13520                    ::buffa::encoding::Tag::new(
13521                            5u32,
13522                            ::buffa::encoding::WireType::LengthDelimited,
13523                        )
13524                        .encode(buf);
13525                    ::buffa::types::encode_string(&self.namespace, buf);
13526                }
13527                if !self.source_name.is_empty() {
13528                    ::buffa::encoding::Tag::new(
13529                            6u32,
13530                            ::buffa::encoding::WireType::LengthDelimited,
13531                        )
13532                        .encode(buf);
13533                    ::buffa::types::encode_string(&self.source_name, buf);
13534                }
13535                if !self.created_at.is_empty() {
13536                    ::buffa::encoding::Tag::new(
13537                            7u32,
13538                            ::buffa::encoding::WireType::LengthDelimited,
13539                        )
13540                        .encode(buf);
13541                    ::buffa::types::encode_string(&self.created_at, buf);
13542                }
13543                if !self.updated_at.is_empty() {
13544                    ::buffa::encoding::Tag::new(
13545                            8u32,
13546                            ::buffa::encoding::WireType::LengthDelimited,
13547                        )
13548                        .encode(buf);
13549                    ::buffa::types::encode_string(&self.updated_at, buf);
13550                }
13551                if !self.description.is_empty() {
13552                    ::buffa::encoding::Tag::new(
13553                            9u32,
13554                            ::buffa::encoding::WireType::LengthDelimited,
13555                        )
13556                        .encode(buf);
13557                    ::buffa::types::encode_string(&self.description, buf);
13558                }
13559                for v in &self.fields {
13560                    ::buffa::encoding::Tag::new(
13561                            10u32,
13562                            ::buffa::encoding::WireType::LengthDelimited,
13563                        )
13564                        .encode(buf);
13565                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
13566                    v.write_to(__cache, buf);
13567                }
13568                if self.facets.is_set() {
13569                    ::buffa::encoding::Tag::new(
13570                            11u32,
13571                            ::buffa::encoding::WireType::LengthDelimited,
13572                        )
13573                        .encode(buf);
13574                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
13575                    self.facets.write_to(__cache, buf);
13576                }
13577                for v in &self.tags {
13578                    ::buffa::encoding::Tag::new(
13579                            12u32,
13580                            ::buffa::encoding::WireType::LengthDelimited,
13581                        )
13582                        .encode(buf);
13583                    ::buffa::types::encode_string(v, buf);
13584                }
13585                if self.deleted {
13586                    ::buffa::encoding::Tag::new(
13587                            13u32,
13588                            ::buffa::encoding::WireType::Varint,
13589                        )
13590                        .encode(buf);
13591                    ::buffa::types::encode_bool(self.deleted, buf);
13592                }
13593                if !self.current_version.is_empty() {
13594                    ::buffa::encoding::Tag::new(
13595                            14u32,
13596                            ::buffa::encoding::WireType::LengthDelimited,
13597                        )
13598                        .encode(buf);
13599                    ::buffa::types::encode_string(&self.current_version, buf);
13600                }
13601                self.__buffa_unknown_fields.write_to(buf);
13602            }
13603        }
13604        /// Serializes this view as protobuf JSON.
13605        ///
13606        /// Implicit-presence fields with default values are omitted, `required`
13607        /// fields are always emitted, explicit-presence (`optional`) fields are
13608        /// emitted only when set, bytes fields are base64-encoded, and enum
13609        /// values are their proto name strings.
13610        ///
13611        /// This impl uses `serialize_map(None)` because the number of emitted
13612        /// fields depends on default-omission rules; serializers that require
13613        /// known map lengths (e.g. `bincode`) will return a runtime error.
13614        /// Use the owned message type for those formats.
13615        impl<'__a> ::serde::Serialize for DatasetView<'__a> {
13616            fn serialize<__S: ::serde::Serializer>(
13617                &self,
13618                __s: __S,
13619            ) -> ::core::result::Result<__S::Ok, __S::Error> {
13620                use ::serde::ser::SerializeMap as _;
13621                let mut __map = __s.serialize_map(::core::option::Option::None)?;
13622                {
13623                    if let ::core::option::Option::Some(__v) = self.id.as_option() {
13624                        __map.serialize_entry("id", __v)?;
13625                    }
13626                }
13627                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.r#type) {
13628                    __map.serialize_entry("type", &self.r#type)?;
13629                }
13630                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
13631                    __map.serialize_entry("name", self.name)?;
13632                }
13633                if !::buffa::json_helpers::skip_if::is_empty_str(self.physical_name) {
13634                    __map.serialize_entry("physicalName", self.physical_name)?;
13635                }
13636                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
13637                    __map.serialize_entry("namespace", self.namespace)?;
13638                }
13639                if !::buffa::json_helpers::skip_if::is_empty_str(self.source_name) {
13640                    __map.serialize_entry("sourceName", self.source_name)?;
13641                }
13642                if !::buffa::json_helpers::skip_if::is_empty_str(self.created_at) {
13643                    __map.serialize_entry("createdAt", self.created_at)?;
13644                }
13645                if !::buffa::json_helpers::skip_if::is_empty_str(self.updated_at) {
13646                    __map.serialize_entry("updatedAt", self.updated_at)?;
13647                }
13648                if !::buffa::json_helpers::skip_if::is_empty_str(self.description) {
13649                    __map.serialize_entry("description", self.description)?;
13650                }
13651                if !self.fields.is_empty() {
13652                    __map.serialize_entry("fields", &*self.fields)?;
13653                }
13654                {
13655                    if let ::core::option::Option::Some(__v) = self.facets.as_option() {
13656                        __map.serialize_entry("facets", __v)?;
13657                    }
13658                }
13659                if !self.tags.is_empty() {
13660                    __map.serialize_entry("tags", &*self.tags)?;
13661                }
13662                if self.deleted {
13663                    __map.serialize_entry("deleted", &self.deleted)?;
13664                }
13665                if !::buffa::json_helpers::skip_if::is_empty_str(self.current_version) {
13666                    __map.serialize_entry("currentVersion", self.current_version)?;
13667                }
13668                __map.end()
13669            }
13670        }
13671        impl<'a> ::buffa::MessageName for DatasetView<'a> {
13672            const PACKAGE: &'static str = "headwaters.read.v1";
13673            const NAME: &'static str = "Dataset";
13674            const FULL_NAME: &'static str = "headwaters.read.v1.Dataset";
13675            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Dataset";
13676        }
13677        impl<'v> ::buffa::DefaultViewInstance for DatasetView<'v> {
13678            fn default_view_instance<'a>() -> &'a Self
13679            where
13680                Self: 'a,
13681            {
13682                static VALUE: ::buffa::__private::OnceBox<DatasetView<'static>> = ::buffa::__private::OnceBox::new();
13683                VALUE
13684                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
13685                        <DatasetView<'static>>::default(),
13686                    ))
13687            }
13688        }
13689        impl ::buffa::ViewReborrow for DatasetView<'static> {
13690            type Reborrowed<'b> = DatasetView<'b>;
13691            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
13692                this
13693            }
13694        }
13695        /** Self-contained, `'static` owned view of a `Dataset` message.
13696
13697 Wraps [`::buffa::OwnedView`]`<`[`DatasetView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
13698
13699 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DatasetView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
13700        #[derive(Clone, Debug)]
13701        pub struct DatasetOwnedView(::buffa::OwnedView<DatasetView<'static>>);
13702        impl DatasetOwnedView {
13703            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
13704            ///
13705            /// The view borrows directly from the buffer's data; the buffer is
13706            /// retained inside the returned handle.
13707            ///
13708            /// # Errors
13709            ///
13710            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
13711            /// protobuf data.
13712            pub fn decode(
13713                bytes: ::buffa::bytes::Bytes,
13714            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13715                ::core::result::Result::Ok(
13716                    DatasetOwnedView(::buffa::OwnedView::decode(bytes)?),
13717                )
13718            }
13719            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
13720            /// max message size).
13721            ///
13722            /// # Errors
13723            ///
13724            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
13725            /// exceeds the configured limits.
13726            pub fn decode_with_options(
13727                bytes: ::buffa::bytes::Bytes,
13728                opts: &::buffa::DecodeOptions,
13729            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13730                ::core::result::Result::Ok(
13731                    DatasetOwnedView(
13732                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
13733                    ),
13734                )
13735            }
13736            /// Build from an owned message via an encode → decode round-trip.
13737            ///
13738            /// # Errors
13739            ///
13740            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
13741            /// somehow invalid (should not happen for well-formed messages).
13742            pub fn from_owned(
13743                msg: &super::super::Dataset,
13744            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13745                ::core::result::Result::Ok(
13746                    DatasetOwnedView(::buffa::OwnedView::from_owned(msg)?),
13747                )
13748            }
13749            /// Borrow the full [`DatasetView`] with its lifetime tied to `&self`.
13750            #[must_use]
13751            pub fn view(&self) -> &DatasetView<'_> {
13752                self.0.reborrow()
13753            }
13754            /// Convert to the owned message type.
13755            #[must_use]
13756            pub fn to_owned_message(&self) -> super::super::Dataset {
13757                self.0.to_owned_message()
13758            }
13759            /// The underlying bytes buffer.
13760            #[must_use]
13761            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
13762                self.0.bytes()
13763            }
13764            /// Consume the handle, returning the underlying bytes buffer.
13765            #[must_use]
13766            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
13767                self.0.into_bytes()
13768            }
13769            /// Field 1: `id`
13770            #[must_use]
13771            pub fn id(
13772                &self,
13773            ) -> &::buffa::MessageFieldView<
13774                super::super::__buffa::view::EntityIdView<'_>,
13775            > {
13776                &self.0.reborrow().id
13777            }
13778            /// Field 2: `type`
13779            #[must_use]
13780            pub fn r#type(&self) -> ::buffa::EnumValue<super::super::DatasetType> {
13781                self.0.reborrow().r#type
13782            }
13783            /// Logical dataset name.
13784            ///
13785            /// Field 3: `name`
13786            #[must_use]
13787            pub fn name(&self) -> &'_ str {
13788                self.0.reborrow().name
13789            }
13790            /// Storage-level name (e.g. the physical table or path), if distinct from `name`.
13791            ///
13792            /// Field 4: `physical_name`
13793            #[must_use]
13794            pub fn physical_name(&self) -> &'_ str {
13795                self.0.reborrow().physical_name
13796            }
13797            /// Field 5: `namespace`
13798            #[must_use]
13799            pub fn namespace(&self) -> &'_ str {
13800                self.0.reborrow().namespace
13801            }
13802            /// Name of the data source the dataset lives in (e.g. a warehouse or bucket).
13803            ///
13804            /// Field 6: `source_name`
13805            #[must_use]
13806            pub fn source_name(&self) -> &'_ str {
13807                self.0.reborrow().source_name
13808            }
13809            /// Field 7: `created_at`
13810            #[must_use]
13811            pub fn created_at(&self) -> &'_ str {
13812                self.0.reborrow().created_at
13813            }
13814            /// Field 8: `updated_at`
13815            #[must_use]
13816            pub fn updated_at(&self) -> &'_ str {
13817                self.0.reborrow().updated_at
13818            }
13819            /// Field 9: `description`
13820            #[must_use]
13821            pub fn description(&self) -> &'_ str {
13822                self.0.reborrow().description
13823            }
13824            /// Schema columns, each an object like `{name, type, description}`. Open-ended:
13825            /// the exact keys follow the OpenLineage schema facet.
13826            ///
13827            /// Field 10: `fields`
13828            #[must_use]
13829            pub fn fields(
13830                &self,
13831            ) -> &::buffa::RepeatedView<
13832                '_,
13833                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
13834            > {
13835                &self.0.reborrow().fields
13836            }
13837            /// OpenLineage dataset facets, keyed by facet name (e.g. `schema`,
13838            /// `dataSource`, `columnLineage`). Each carries `_producer` / `_schemaURL`.
13839            ///
13840            /// Field 11: `facets`
13841            #[must_use]
13842            pub fn facets(
13843                &self,
13844            ) -> &::buffa::MessageFieldView<
13845                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
13846            > {
13847                &self.0.reborrow().facets
13848            }
13849            /// Field 12: `tags`
13850            #[must_use]
13851            pub fn tags(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
13852                &self.0.reborrow().tags
13853            }
13854            /// True once the dataset has been observed deleted.
13855            ///
13856            /// Field 13: `deleted`
13857            #[must_use]
13858            pub fn deleted(&self) -> bool {
13859                self.0.reborrow().deleted
13860            }
13861            /// Opaque UUID that changes whenever the dataset's schema changes. Use it to
13862            /// detect that the schema has moved; see also `ListDatasetVersions`.
13863            ///
13864            /// Field 14: `current_version`
13865            #[must_use]
13866            pub fn current_version(&self) -> &'_ str {
13867                self.0.reborrow().current_version
13868            }
13869        }
13870        impl ::core::convert::From<::buffa::OwnedView<DatasetView<'static>>>
13871        for DatasetOwnedView {
13872            fn from(inner: ::buffa::OwnedView<DatasetView<'static>>) -> Self {
13873                DatasetOwnedView(inner)
13874            }
13875        }
13876        impl ::core::convert::From<DatasetOwnedView>
13877        for ::buffa::OwnedView<DatasetView<'static>> {
13878            fn from(wrapper: DatasetOwnedView) -> Self {
13879                wrapper.0
13880            }
13881        }
13882        impl ::core::convert::AsRef<::buffa::OwnedView<DatasetView<'static>>>
13883        for DatasetOwnedView {
13884            fn as_ref(&self) -> &::buffa::OwnedView<DatasetView<'static>> {
13885                &self.0
13886            }
13887        }
13888        impl ::buffa::HasMessageView for super::super::Dataset {
13889            type View<'a> = DatasetView<'a>;
13890            type ViewHandle = DatasetOwnedView;
13891        }
13892        impl ::serde::Serialize for DatasetOwnedView {
13893            fn serialize<__S: ::serde::Serializer>(
13894                &self,
13895                __s: __S,
13896            ) -> ::core::result::Result<__S::Ok, __S::Error> {
13897                ::serde::Serialize::serialize(&self.0, __s)
13898            }
13899        }
13900        #[derive(Clone, Debug, Default)]
13901        pub struct ListDatasetsResponseView<'a> {
13902            /// Field 1: `datasets`
13903            pub datasets: ::buffa::RepeatedView<
13904                'a,
13905                super::super::__buffa::view::DatasetView<'a>,
13906            >,
13907            /// Field 2: `total_count`
13908            pub total_count: i32,
13909            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
13910        }
13911        impl<'a> ListDatasetsResponseView<'a> {
13912            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
13913            ///
13914            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
13915            /// and by generated sub-message decode arms with `depth - 1`.
13916            ///
13917            /// **Not part of the public API.** Named with a leading underscore to
13918            /// signal that it is for generated-code use only.
13919            #[doc(hidden)]
13920            pub fn _decode_depth(
13921                buf: &'a [u8],
13922                depth: u32,
13923            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13924                let mut view = Self::default();
13925                view._merge_into_view(buf, depth)?;
13926                ::core::result::Result::Ok(view)
13927            }
13928            /// Merge fields from `buf` into this view (proto merge semantics).
13929            ///
13930            /// Repeated fields append; singular fields last-wins; singular
13931            /// MESSAGE fields merge recursively. Used by sub-message decode
13932            /// arms when the same field appears multiple times on the wire.
13933            ///
13934            /// **Not part of the public API.**
13935            #[doc(hidden)]
13936            pub fn _merge_into_view(
13937                &mut self,
13938                buf: &'a [u8],
13939                depth: u32,
13940            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
13941                let _ = depth;
13942                #[allow(unused_variables)]
13943                let view = self;
13944                let mut cur: &'a [u8] = buf;
13945                while !cur.is_empty() {
13946                    let before_tag = cur;
13947                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
13948                    match tag.field_number() {
13949                        2u32 => {
13950                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
13951                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13952                                    field_number: 2u32,
13953                                    expected: 0u8,
13954                                    actual: tag.wire_type() as u8,
13955                                });
13956                            }
13957                            view.total_count = ::buffa::types::decode_int32(&mut cur)?;
13958                        }
13959                        1u32 => {
13960                            if tag.wire_type()
13961                                != ::buffa::encoding::WireType::LengthDelimited
13962                            {
13963                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
13964                                    field_number: 1u32,
13965                                    expected: 2u8,
13966                                    actual: tag.wire_type() as u8,
13967                                });
13968                            }
13969                            if depth == 0 {
13970                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
13971                            }
13972                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
13973                            view.datasets
13974                                .push(
13975                                    super::super::__buffa::view::DatasetView::_decode_depth(
13976                                        sub,
13977                                        depth - 1,
13978                                    )?,
13979                                );
13980                        }
13981                        _ => {
13982                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
13983                            let span_len = before_tag.len() - cur.len();
13984                            view.__buffa_unknown_fields
13985                                .push_raw(&before_tag[..span_len]);
13986                        }
13987                    }
13988                }
13989                ::core::result::Result::Ok(())
13990            }
13991        }
13992        impl<'a> ::buffa::MessageView<'a> for ListDatasetsResponseView<'a> {
13993            type Owned = super::super::ListDatasetsResponse;
13994            fn decode_view(
13995                buf: &'a [u8],
13996            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13997                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
13998            }
13999            fn decode_view_with_limit(
14000                buf: &'a [u8],
14001                depth: u32,
14002            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14003                Self::_decode_depth(buf, depth)
14004            }
14005            fn to_owned_message(&self) -> super::super::ListDatasetsResponse {
14006                self.to_owned_from_source(None)
14007            }
14008            #[allow(clippy::useless_conversion, clippy::needless_update)]
14009            fn to_owned_from_source(
14010                &self,
14011                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
14012            ) -> super::super::ListDatasetsResponse {
14013                #[allow(unused_imports)]
14014                use ::buffa::alloc::string::ToString as _;
14015                let _ = __buffa_src;
14016                super::super::ListDatasetsResponse {
14017                    datasets: self
14018                        .datasets
14019                        .iter()
14020                        .map(|v| v.to_owned_from_source(__buffa_src))
14021                        .collect(),
14022                    total_count: self.total_count,
14023                    __buffa_unknown_fields: self
14024                        .__buffa_unknown_fields
14025                        .to_owned()
14026                        .unwrap_or_default()
14027                        .into(),
14028                    ..::core::default::Default::default()
14029                }
14030            }
14031        }
14032        impl<'a> ::buffa::ViewEncode<'a> for ListDatasetsResponseView<'a> {
14033            #[allow(clippy::needless_borrow, clippy::let_and_return)]
14034            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
14035                #[allow(unused_imports)]
14036                use ::buffa::Enumeration as _;
14037                let mut size = 0u32;
14038                for v in &self.datasets {
14039                    let __slot = __cache.reserve();
14040                    let inner_size = v.compute_size(__cache);
14041                    __cache.set(__slot, inner_size);
14042                    size
14043                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
14044                            + inner_size;
14045                }
14046                if self.total_count != 0i32 {
14047                    size
14048                        += 1u32
14049                            + ::buffa::types::int32_encoded_len(self.total_count) as u32;
14050                }
14051                size += self.__buffa_unknown_fields.encoded_len() as u32;
14052                size
14053            }
14054            #[allow(clippy::needless_borrow)]
14055            fn write_to(
14056                &self,
14057                __cache: &mut ::buffa::SizeCache,
14058                buf: &mut impl ::buffa::bytes::BufMut,
14059            ) {
14060                #[allow(unused_imports)]
14061                use ::buffa::Enumeration as _;
14062                for v in &self.datasets {
14063                    ::buffa::encoding::Tag::new(
14064                            1u32,
14065                            ::buffa::encoding::WireType::LengthDelimited,
14066                        )
14067                        .encode(buf);
14068                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
14069                    v.write_to(__cache, buf);
14070                }
14071                if self.total_count != 0i32 {
14072                    ::buffa::encoding::Tag::new(
14073                            2u32,
14074                            ::buffa::encoding::WireType::Varint,
14075                        )
14076                        .encode(buf);
14077                    ::buffa::types::encode_int32(self.total_count, buf);
14078                }
14079                self.__buffa_unknown_fields.write_to(buf);
14080            }
14081        }
14082        /// Serializes this view as protobuf JSON.
14083        ///
14084        /// Implicit-presence fields with default values are omitted, `required`
14085        /// fields are always emitted, explicit-presence (`optional`) fields are
14086        /// emitted only when set, bytes fields are base64-encoded, and enum
14087        /// values are their proto name strings.
14088        ///
14089        /// This impl uses `serialize_map(None)` because the number of emitted
14090        /// fields depends on default-omission rules; serializers that require
14091        /// known map lengths (e.g. `bincode`) will return a runtime error.
14092        /// Use the owned message type for those formats.
14093        impl<'__a> ::serde::Serialize for ListDatasetsResponseView<'__a> {
14094            fn serialize<__S: ::serde::Serializer>(
14095                &self,
14096                __s: __S,
14097            ) -> ::core::result::Result<__S::Ok, __S::Error> {
14098                use ::serde::ser::SerializeMap as _;
14099                let mut __map = __s.serialize_map(::core::option::Option::None)?;
14100                if !self.datasets.is_empty() {
14101                    __map.serialize_entry("datasets", &*self.datasets)?;
14102                }
14103                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.total_count) {
14104                    struct _W(i32);
14105                    impl ::serde::Serialize for _W {
14106                        fn serialize<__S: ::serde::Serializer>(
14107                            &self,
14108                            __s: __S,
14109                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
14110                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
14111                        }
14112                    }
14113                    __map.serialize_entry("totalCount", &_W(self.total_count))?;
14114                }
14115                __map.end()
14116            }
14117        }
14118        impl<'a> ::buffa::MessageName for ListDatasetsResponseView<'a> {
14119            const PACKAGE: &'static str = "headwaters.read.v1";
14120            const NAME: &'static str = "ListDatasetsResponse";
14121            const FULL_NAME: &'static str = "headwaters.read.v1.ListDatasetsResponse";
14122            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetsResponse";
14123        }
14124        impl<'v> ::buffa::DefaultViewInstance for ListDatasetsResponseView<'v> {
14125            fn default_view_instance<'a>() -> &'a Self
14126            where
14127                Self: 'a,
14128            {
14129                static VALUE: ::buffa::__private::OnceBox<
14130                    ListDatasetsResponseView<'static>,
14131                > = ::buffa::__private::OnceBox::new();
14132                VALUE
14133                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
14134                        <ListDatasetsResponseView<'static>>::default(),
14135                    ))
14136            }
14137        }
14138        impl ::buffa::ViewReborrow for ListDatasetsResponseView<'static> {
14139            type Reborrowed<'b> = ListDatasetsResponseView<'b>;
14140            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
14141                this
14142            }
14143        }
14144        /** Self-contained, `'static` owned view of a `ListDatasetsResponse` message.
14145
14146 Wraps [`::buffa::OwnedView`]`<`[`ListDatasetsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
14147
14148 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListDatasetsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
14149        #[derive(Clone, Debug)]
14150        pub struct ListDatasetsResponseOwnedView(
14151            ::buffa::OwnedView<ListDatasetsResponseView<'static>>,
14152        );
14153        impl ListDatasetsResponseOwnedView {
14154            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
14155            ///
14156            /// The view borrows directly from the buffer's data; the buffer is
14157            /// retained inside the returned handle.
14158            ///
14159            /// # Errors
14160            ///
14161            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
14162            /// protobuf data.
14163            pub fn decode(
14164                bytes: ::buffa::bytes::Bytes,
14165            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14166                ::core::result::Result::Ok(
14167                    ListDatasetsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
14168                )
14169            }
14170            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
14171            /// max message size).
14172            ///
14173            /// # Errors
14174            ///
14175            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
14176            /// exceeds the configured limits.
14177            pub fn decode_with_options(
14178                bytes: ::buffa::bytes::Bytes,
14179                opts: &::buffa::DecodeOptions,
14180            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14181                ::core::result::Result::Ok(
14182                    ListDatasetsResponseOwnedView(
14183                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
14184                    ),
14185                )
14186            }
14187            /// Build from an owned message via an encode → decode round-trip.
14188            ///
14189            /// # Errors
14190            ///
14191            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
14192            /// somehow invalid (should not happen for well-formed messages).
14193            pub fn from_owned(
14194                msg: &super::super::ListDatasetsResponse,
14195            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14196                ::core::result::Result::Ok(
14197                    ListDatasetsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
14198                )
14199            }
14200            /// Borrow the full [`ListDatasetsResponseView`] with its lifetime tied to `&self`.
14201            #[must_use]
14202            pub fn view(&self) -> &ListDatasetsResponseView<'_> {
14203                self.0.reborrow()
14204            }
14205            /// Convert to the owned message type.
14206            #[must_use]
14207            pub fn to_owned_message(&self) -> super::super::ListDatasetsResponse {
14208                self.0.to_owned_message()
14209            }
14210            /// The underlying bytes buffer.
14211            #[must_use]
14212            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
14213                self.0.bytes()
14214            }
14215            /// Consume the handle, returning the underlying bytes buffer.
14216            #[must_use]
14217            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
14218                self.0.into_bytes()
14219            }
14220            /// Field 1: `datasets`
14221            #[must_use]
14222            pub fn datasets(
14223                &self,
14224            ) -> &::buffa::RepeatedView<
14225                '_,
14226                super::super::__buffa::view::DatasetView<'_>,
14227            > {
14228                &self.0.reborrow().datasets
14229            }
14230            /// Field 2: `total_count`
14231            #[must_use]
14232            pub fn total_count(&self) -> i32 {
14233                self.0.reborrow().total_count
14234            }
14235        }
14236        impl ::core::convert::From<::buffa::OwnedView<ListDatasetsResponseView<'static>>>
14237        for ListDatasetsResponseOwnedView {
14238            fn from(
14239                inner: ::buffa::OwnedView<ListDatasetsResponseView<'static>>,
14240            ) -> Self {
14241                ListDatasetsResponseOwnedView(inner)
14242            }
14243        }
14244        impl ::core::convert::From<ListDatasetsResponseOwnedView>
14245        for ::buffa::OwnedView<ListDatasetsResponseView<'static>> {
14246            fn from(wrapper: ListDatasetsResponseOwnedView) -> Self {
14247                wrapper.0
14248            }
14249        }
14250        impl ::core::convert::AsRef<
14251            ::buffa::OwnedView<ListDatasetsResponseView<'static>>,
14252        > for ListDatasetsResponseOwnedView {
14253            fn as_ref(&self) -> &::buffa::OwnedView<ListDatasetsResponseView<'static>> {
14254                &self.0
14255            }
14256        }
14257        impl ::buffa::HasMessageView for super::super::ListDatasetsResponse {
14258            type View<'a> = ListDatasetsResponseView<'a>;
14259            type ViewHandle = ListDatasetsResponseOwnedView;
14260        }
14261        impl ::serde::Serialize for ListDatasetsResponseOwnedView {
14262            fn serialize<__S: ::serde::Serializer>(
14263                &self,
14264                __s: __S,
14265            ) -> ::core::result::Result<__S::Ok, __S::Error> {
14266                ::serde::Serialize::serialize(&self.0, __s)
14267            }
14268        }
14269        /// One historical version of a dataset's schema. A new version is recorded each
14270        /// time the schema changes.
14271        #[derive(Clone, Debug, Default)]
14272        pub struct DatasetVersionView<'a> {
14273            /// Field 1: `id`
14274            pub id: ::buffa::MessageFieldView<
14275                super::super::__buffa::view::DatasetVersionIdView<'a>,
14276            >,
14277            /// Field 2: `type`
14278            pub r#type: ::buffa::EnumValue<super::super::DatasetType>,
14279            /// Field 3: `name`
14280            pub name: &'a str,
14281            /// Field 4: `physical_name`
14282            pub physical_name: &'a str,
14283            /// Field 5: `created_at`
14284            pub created_at: &'a str,
14285            /// This version's schema UUID. The dataset's latest version equals the
14286            /// dataset's `current_version`.
14287            ///
14288            /// Field 6: `version`
14289            pub version: &'a str,
14290            /// Field 7: `namespace`
14291            pub namespace: &'a str,
14292            /// Field 8: `source_name`
14293            pub source_name: &'a str,
14294            /// Field 9: `fields`
14295            pub fields: ::buffa::RepeatedView<
14296                'a,
14297                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
14298            >,
14299            /// Field 10: `tags`
14300            pub tags: ::buffa::RepeatedView<'a, &'a str>,
14301            /// Field 11: `last_modified_at`
14302            pub last_modified_at: &'a str,
14303            /// Field 12: `description`
14304            pub description: &'a str,
14305            /// Field 13: `facets`
14306            pub facets: ::buffa::MessageFieldView<
14307                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
14308            >,
14309            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
14310        }
14311        impl<'a> DatasetVersionView<'a> {
14312            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
14313            ///
14314            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
14315            /// and by generated sub-message decode arms with `depth - 1`.
14316            ///
14317            /// **Not part of the public API.** Named with a leading underscore to
14318            /// signal that it is for generated-code use only.
14319            #[doc(hidden)]
14320            pub fn _decode_depth(
14321                buf: &'a [u8],
14322                depth: u32,
14323            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14324                let mut view = Self::default();
14325                view._merge_into_view(buf, depth)?;
14326                ::core::result::Result::Ok(view)
14327            }
14328            /// Merge fields from `buf` into this view (proto merge semantics).
14329            ///
14330            /// Repeated fields append; singular fields last-wins; singular
14331            /// MESSAGE fields merge recursively. Used by sub-message decode
14332            /// arms when the same field appears multiple times on the wire.
14333            ///
14334            /// **Not part of the public API.**
14335            #[doc(hidden)]
14336            pub fn _merge_into_view(
14337                &mut self,
14338                buf: &'a [u8],
14339                depth: u32,
14340            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
14341                let _ = depth;
14342                #[allow(unused_variables)]
14343                let view = self;
14344                let mut cur: &'a [u8] = buf;
14345                while !cur.is_empty() {
14346                    let before_tag = cur;
14347                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
14348                    match tag.field_number() {
14349                        1u32 => {
14350                            if tag.wire_type()
14351                                != ::buffa::encoding::WireType::LengthDelimited
14352                            {
14353                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14354                                    field_number: 1u32,
14355                                    expected: 2u8,
14356                                    actual: tag.wire_type() as u8,
14357                                });
14358                            }
14359                            if depth == 0 {
14360                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
14361                            }
14362                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14363                            match view.id.as_mut() {
14364                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
14365                                None => {
14366                                    view.id = ::buffa::MessageFieldView::set(
14367                                        super::super::__buffa::view::DatasetVersionIdView::_decode_depth(
14368                                            sub,
14369                                            depth - 1,
14370                                        )?,
14371                                    );
14372                                }
14373                            }
14374                        }
14375                        2u32 => {
14376                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
14377                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14378                                    field_number: 2u32,
14379                                    expected: 0u8,
14380                                    actual: tag.wire_type() as u8,
14381                                });
14382                            }
14383                            view.r#type = ::buffa::EnumValue::from(
14384                                ::buffa::types::decode_int32(&mut cur)?,
14385                            );
14386                        }
14387                        3u32 => {
14388                            if tag.wire_type()
14389                                != ::buffa::encoding::WireType::LengthDelimited
14390                            {
14391                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14392                                    field_number: 3u32,
14393                                    expected: 2u8,
14394                                    actual: tag.wire_type() as u8,
14395                                });
14396                            }
14397                            view.name = ::buffa::types::borrow_str(&mut cur)?;
14398                        }
14399                        4u32 => {
14400                            if tag.wire_type()
14401                                != ::buffa::encoding::WireType::LengthDelimited
14402                            {
14403                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14404                                    field_number: 4u32,
14405                                    expected: 2u8,
14406                                    actual: tag.wire_type() as u8,
14407                                });
14408                            }
14409                            view.physical_name = ::buffa::types::borrow_str(&mut cur)?;
14410                        }
14411                        5u32 => {
14412                            if tag.wire_type()
14413                                != ::buffa::encoding::WireType::LengthDelimited
14414                            {
14415                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14416                                    field_number: 5u32,
14417                                    expected: 2u8,
14418                                    actual: tag.wire_type() as u8,
14419                                });
14420                            }
14421                            view.created_at = ::buffa::types::borrow_str(&mut cur)?;
14422                        }
14423                        6u32 => {
14424                            if tag.wire_type()
14425                                != ::buffa::encoding::WireType::LengthDelimited
14426                            {
14427                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14428                                    field_number: 6u32,
14429                                    expected: 2u8,
14430                                    actual: tag.wire_type() as u8,
14431                                });
14432                            }
14433                            view.version = ::buffa::types::borrow_str(&mut cur)?;
14434                        }
14435                        7u32 => {
14436                            if tag.wire_type()
14437                                != ::buffa::encoding::WireType::LengthDelimited
14438                            {
14439                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14440                                    field_number: 7u32,
14441                                    expected: 2u8,
14442                                    actual: tag.wire_type() as u8,
14443                                });
14444                            }
14445                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
14446                        }
14447                        8u32 => {
14448                            if tag.wire_type()
14449                                != ::buffa::encoding::WireType::LengthDelimited
14450                            {
14451                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14452                                    field_number: 8u32,
14453                                    expected: 2u8,
14454                                    actual: tag.wire_type() as u8,
14455                                });
14456                            }
14457                            view.source_name = ::buffa::types::borrow_str(&mut cur)?;
14458                        }
14459                        11u32 => {
14460                            if tag.wire_type()
14461                                != ::buffa::encoding::WireType::LengthDelimited
14462                            {
14463                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14464                                    field_number: 11u32,
14465                                    expected: 2u8,
14466                                    actual: tag.wire_type() as u8,
14467                                });
14468                            }
14469                            view.last_modified_at = ::buffa::types::borrow_str(
14470                                &mut cur,
14471                            )?;
14472                        }
14473                        12u32 => {
14474                            if tag.wire_type()
14475                                != ::buffa::encoding::WireType::LengthDelimited
14476                            {
14477                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14478                                    field_number: 12u32,
14479                                    expected: 2u8,
14480                                    actual: tag.wire_type() as u8,
14481                                });
14482                            }
14483                            view.description = ::buffa::types::borrow_str(&mut cur)?;
14484                        }
14485                        13u32 => {
14486                            if tag.wire_type()
14487                                != ::buffa::encoding::WireType::LengthDelimited
14488                            {
14489                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14490                                    field_number: 13u32,
14491                                    expected: 2u8,
14492                                    actual: tag.wire_type() as u8,
14493                                });
14494                            }
14495                            if depth == 0 {
14496                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
14497                            }
14498                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14499                            match view.facets.as_mut() {
14500                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
14501                                None => {
14502                                    view.facets = ::buffa::MessageFieldView::set(
14503                                        ::buffa_types::google::protobuf::__buffa::view::StructView::_decode_depth(
14504                                            sub,
14505                                            depth - 1,
14506                                        )?,
14507                                    );
14508                                }
14509                            }
14510                        }
14511                        9u32 => {
14512                            if tag.wire_type()
14513                                != ::buffa::encoding::WireType::LengthDelimited
14514                            {
14515                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14516                                    field_number: 9u32,
14517                                    expected: 2u8,
14518                                    actual: tag.wire_type() as u8,
14519                                });
14520                            }
14521                            if depth == 0 {
14522                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
14523                            }
14524                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14525                            view.fields
14526                                .push(
14527                                    ::buffa_types::google::protobuf::__buffa::view::StructView::_decode_depth(
14528                                        sub,
14529                                        depth - 1,
14530                                    )?,
14531                                );
14532                        }
14533                        10u32 => {
14534                            if tag.wire_type()
14535                                != ::buffa::encoding::WireType::LengthDelimited
14536                            {
14537                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
14538                                    field_number: 10u32,
14539                                    expected: 2u8,
14540                                    actual: tag.wire_type() as u8,
14541                                });
14542                            }
14543                            view.tags.push(::buffa::types::borrow_str(&mut cur)?);
14544                        }
14545                        _ => {
14546                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
14547                            let span_len = before_tag.len() - cur.len();
14548                            view.__buffa_unknown_fields
14549                                .push_raw(&before_tag[..span_len]);
14550                        }
14551                    }
14552                }
14553                ::core::result::Result::Ok(())
14554            }
14555        }
14556        impl<'a> ::buffa::MessageView<'a> for DatasetVersionView<'a> {
14557            type Owned = super::super::DatasetVersion;
14558            fn decode_view(
14559                buf: &'a [u8],
14560            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14561                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
14562            }
14563            fn decode_view_with_limit(
14564                buf: &'a [u8],
14565                depth: u32,
14566            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14567                Self::_decode_depth(buf, depth)
14568            }
14569            fn to_owned_message(&self) -> super::super::DatasetVersion {
14570                self.to_owned_from_source(None)
14571            }
14572            #[allow(clippy::useless_conversion, clippy::needless_update)]
14573            fn to_owned_from_source(
14574                &self,
14575                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
14576            ) -> super::super::DatasetVersion {
14577                #[allow(unused_imports)]
14578                use ::buffa::alloc::string::ToString as _;
14579                let _ = __buffa_src;
14580                super::super::DatasetVersion {
14581                    id: match self.id.as_option() {
14582                        Some(v) => {
14583                            ::buffa::MessageField::<
14584                                super::super::DatasetVersionId,
14585                            >::some(v.to_owned_from_source(__buffa_src))
14586                        }
14587                        None => ::buffa::MessageField::none(),
14588                    },
14589                    r#type: self.r#type,
14590                    name: self.name.to_string(),
14591                    physical_name: self.physical_name.to_string(),
14592                    created_at: self.created_at.to_string(),
14593                    version: self.version.to_string(),
14594                    namespace: self.namespace.to_string(),
14595                    source_name: self.source_name.to_string(),
14596                    fields: self
14597                        .fields
14598                        .iter()
14599                        .map(|v| v.to_owned_from_source(__buffa_src))
14600                        .collect(),
14601                    tags: self.tags.iter().map(|s| s.to_string()).collect(),
14602                    last_modified_at: self.last_modified_at.to_string(),
14603                    description: self.description.to_string(),
14604                    facets: match self.facets.as_option() {
14605                        Some(v) => {
14606                            ::buffa::MessageField::<
14607                                ::buffa_types::google::protobuf::Struct,
14608                            >::some(v.to_owned_from_source(__buffa_src))
14609                        }
14610                        None => ::buffa::MessageField::none(),
14611                    },
14612                    __buffa_unknown_fields: self
14613                        .__buffa_unknown_fields
14614                        .to_owned()
14615                        .unwrap_or_default()
14616                        .into(),
14617                    ..::core::default::Default::default()
14618                }
14619            }
14620        }
14621        impl<'a> ::buffa::ViewEncode<'a> for DatasetVersionView<'a> {
14622            #[allow(clippy::needless_borrow, clippy::let_and_return)]
14623            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
14624                #[allow(unused_imports)]
14625                use ::buffa::Enumeration as _;
14626                let mut size = 0u32;
14627                if self.id.is_set() {
14628                    let __slot = __cache.reserve();
14629                    let inner_size = self.id.compute_size(__cache);
14630                    __cache.set(__slot, inner_size);
14631                    size
14632                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
14633                            + inner_size;
14634                }
14635                {
14636                    let val = self.r#type.to_i32();
14637                    if val != 0 {
14638                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
14639                    }
14640                }
14641                if !self.name.is_empty() {
14642                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
14643                }
14644                if !self.physical_name.is_empty() {
14645                    size
14646                        += 1u32
14647                            + ::buffa::types::string_encoded_len(&self.physical_name)
14648                                as u32;
14649                }
14650                if !self.created_at.is_empty() {
14651                    size
14652                        += 1u32
14653                            + ::buffa::types::string_encoded_len(&self.created_at)
14654                                as u32;
14655                }
14656                if !self.version.is_empty() {
14657                    size
14658                        += 1u32
14659                            + ::buffa::types::string_encoded_len(&self.version) as u32;
14660                }
14661                if !self.namespace.is_empty() {
14662                    size
14663                        += 1u32
14664                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
14665                }
14666                if !self.source_name.is_empty() {
14667                    size
14668                        += 1u32
14669                            + ::buffa::types::string_encoded_len(&self.source_name)
14670                                as u32;
14671                }
14672                for v in &self.fields {
14673                    let __slot = __cache.reserve();
14674                    let inner_size = v.compute_size(__cache);
14675                    __cache.set(__slot, inner_size);
14676                    size
14677                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
14678                            + inner_size;
14679                }
14680                for v in &self.tags {
14681                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
14682                }
14683                if !self.last_modified_at.is_empty() {
14684                    size
14685                        += 1u32
14686                            + ::buffa::types::string_encoded_len(&self.last_modified_at)
14687                                as u32;
14688                }
14689                if !self.description.is_empty() {
14690                    size
14691                        += 1u32
14692                            + ::buffa::types::string_encoded_len(&self.description)
14693                                as u32;
14694                }
14695                if self.facets.is_set() {
14696                    let __slot = __cache.reserve();
14697                    let inner_size = self.facets.compute_size(__cache);
14698                    __cache.set(__slot, inner_size);
14699                    size
14700                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
14701                            + inner_size;
14702                }
14703                size += self.__buffa_unknown_fields.encoded_len() as u32;
14704                size
14705            }
14706            #[allow(clippy::needless_borrow)]
14707            fn write_to(
14708                &self,
14709                __cache: &mut ::buffa::SizeCache,
14710                buf: &mut impl ::buffa::bytes::BufMut,
14711            ) {
14712                #[allow(unused_imports)]
14713                use ::buffa::Enumeration as _;
14714                if self.id.is_set() {
14715                    ::buffa::encoding::Tag::new(
14716                            1u32,
14717                            ::buffa::encoding::WireType::LengthDelimited,
14718                        )
14719                        .encode(buf);
14720                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
14721                    self.id.write_to(__cache, buf);
14722                }
14723                {
14724                    let val = self.r#type.to_i32();
14725                    if val != 0 {
14726                        ::buffa::encoding::Tag::new(
14727                                2u32,
14728                                ::buffa::encoding::WireType::Varint,
14729                            )
14730                            .encode(buf);
14731                        ::buffa::types::encode_int32(val, buf);
14732                    }
14733                }
14734                if !self.name.is_empty() {
14735                    ::buffa::encoding::Tag::new(
14736                            3u32,
14737                            ::buffa::encoding::WireType::LengthDelimited,
14738                        )
14739                        .encode(buf);
14740                    ::buffa::types::encode_string(&self.name, buf);
14741                }
14742                if !self.physical_name.is_empty() {
14743                    ::buffa::encoding::Tag::new(
14744                            4u32,
14745                            ::buffa::encoding::WireType::LengthDelimited,
14746                        )
14747                        .encode(buf);
14748                    ::buffa::types::encode_string(&self.physical_name, buf);
14749                }
14750                if !self.created_at.is_empty() {
14751                    ::buffa::encoding::Tag::new(
14752                            5u32,
14753                            ::buffa::encoding::WireType::LengthDelimited,
14754                        )
14755                        .encode(buf);
14756                    ::buffa::types::encode_string(&self.created_at, buf);
14757                }
14758                if !self.version.is_empty() {
14759                    ::buffa::encoding::Tag::new(
14760                            6u32,
14761                            ::buffa::encoding::WireType::LengthDelimited,
14762                        )
14763                        .encode(buf);
14764                    ::buffa::types::encode_string(&self.version, buf);
14765                }
14766                if !self.namespace.is_empty() {
14767                    ::buffa::encoding::Tag::new(
14768                            7u32,
14769                            ::buffa::encoding::WireType::LengthDelimited,
14770                        )
14771                        .encode(buf);
14772                    ::buffa::types::encode_string(&self.namespace, buf);
14773                }
14774                if !self.source_name.is_empty() {
14775                    ::buffa::encoding::Tag::new(
14776                            8u32,
14777                            ::buffa::encoding::WireType::LengthDelimited,
14778                        )
14779                        .encode(buf);
14780                    ::buffa::types::encode_string(&self.source_name, buf);
14781                }
14782                for v in &self.fields {
14783                    ::buffa::encoding::Tag::new(
14784                            9u32,
14785                            ::buffa::encoding::WireType::LengthDelimited,
14786                        )
14787                        .encode(buf);
14788                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
14789                    v.write_to(__cache, buf);
14790                }
14791                for v in &self.tags {
14792                    ::buffa::encoding::Tag::new(
14793                            10u32,
14794                            ::buffa::encoding::WireType::LengthDelimited,
14795                        )
14796                        .encode(buf);
14797                    ::buffa::types::encode_string(v, buf);
14798                }
14799                if !self.last_modified_at.is_empty() {
14800                    ::buffa::encoding::Tag::new(
14801                            11u32,
14802                            ::buffa::encoding::WireType::LengthDelimited,
14803                        )
14804                        .encode(buf);
14805                    ::buffa::types::encode_string(&self.last_modified_at, buf);
14806                }
14807                if !self.description.is_empty() {
14808                    ::buffa::encoding::Tag::new(
14809                            12u32,
14810                            ::buffa::encoding::WireType::LengthDelimited,
14811                        )
14812                        .encode(buf);
14813                    ::buffa::types::encode_string(&self.description, buf);
14814                }
14815                if self.facets.is_set() {
14816                    ::buffa::encoding::Tag::new(
14817                            13u32,
14818                            ::buffa::encoding::WireType::LengthDelimited,
14819                        )
14820                        .encode(buf);
14821                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
14822                    self.facets.write_to(__cache, buf);
14823                }
14824                self.__buffa_unknown_fields.write_to(buf);
14825            }
14826        }
14827        /// Serializes this view as protobuf JSON.
14828        ///
14829        /// Implicit-presence fields with default values are omitted, `required`
14830        /// fields are always emitted, explicit-presence (`optional`) fields are
14831        /// emitted only when set, bytes fields are base64-encoded, and enum
14832        /// values are their proto name strings.
14833        ///
14834        /// This impl uses `serialize_map(None)` because the number of emitted
14835        /// fields depends on default-omission rules; serializers that require
14836        /// known map lengths (e.g. `bincode`) will return a runtime error.
14837        /// Use the owned message type for those formats.
14838        impl<'__a> ::serde::Serialize for DatasetVersionView<'__a> {
14839            fn serialize<__S: ::serde::Serializer>(
14840                &self,
14841                __s: __S,
14842            ) -> ::core::result::Result<__S::Ok, __S::Error> {
14843                use ::serde::ser::SerializeMap as _;
14844                let mut __map = __s.serialize_map(::core::option::Option::None)?;
14845                {
14846                    if let ::core::option::Option::Some(__v) = self.id.as_option() {
14847                        __map.serialize_entry("id", __v)?;
14848                    }
14849                }
14850                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.r#type) {
14851                    __map.serialize_entry("type", &self.r#type)?;
14852                }
14853                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
14854                    __map.serialize_entry("name", self.name)?;
14855                }
14856                if !::buffa::json_helpers::skip_if::is_empty_str(self.physical_name) {
14857                    __map.serialize_entry("physicalName", self.physical_name)?;
14858                }
14859                if !::buffa::json_helpers::skip_if::is_empty_str(self.created_at) {
14860                    __map.serialize_entry("createdAt", self.created_at)?;
14861                }
14862                if !::buffa::json_helpers::skip_if::is_empty_str(self.version) {
14863                    __map.serialize_entry("version", self.version)?;
14864                }
14865                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
14866                    __map.serialize_entry("namespace", self.namespace)?;
14867                }
14868                if !::buffa::json_helpers::skip_if::is_empty_str(self.source_name) {
14869                    __map.serialize_entry("sourceName", self.source_name)?;
14870                }
14871                if !self.fields.is_empty() {
14872                    __map.serialize_entry("fields", &*self.fields)?;
14873                }
14874                if !self.tags.is_empty() {
14875                    __map.serialize_entry("tags", &*self.tags)?;
14876                }
14877                if !::buffa::json_helpers::skip_if::is_empty_str(self.last_modified_at) {
14878                    __map.serialize_entry("lastModifiedAt", self.last_modified_at)?;
14879                }
14880                if !::buffa::json_helpers::skip_if::is_empty_str(self.description) {
14881                    __map.serialize_entry("description", self.description)?;
14882                }
14883                {
14884                    if let ::core::option::Option::Some(__v) = self.facets.as_option() {
14885                        __map.serialize_entry("facets", __v)?;
14886                    }
14887                }
14888                __map.end()
14889            }
14890        }
14891        impl<'a> ::buffa::MessageName for DatasetVersionView<'a> {
14892            const PACKAGE: &'static str = "headwaters.read.v1";
14893            const NAME: &'static str = "DatasetVersion";
14894            const FULL_NAME: &'static str = "headwaters.read.v1.DatasetVersion";
14895            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.DatasetVersion";
14896        }
14897        impl<'v> ::buffa::DefaultViewInstance for DatasetVersionView<'v> {
14898            fn default_view_instance<'a>() -> &'a Self
14899            where
14900                Self: 'a,
14901            {
14902                static VALUE: ::buffa::__private::OnceBox<DatasetVersionView<'static>> = ::buffa::__private::OnceBox::new();
14903                VALUE
14904                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
14905                        <DatasetVersionView<'static>>::default(),
14906                    ))
14907            }
14908        }
14909        impl ::buffa::ViewReborrow for DatasetVersionView<'static> {
14910            type Reborrowed<'b> = DatasetVersionView<'b>;
14911            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
14912                this
14913            }
14914        }
14915        /** Self-contained, `'static` owned view of a `DatasetVersion` message.
14916
14917 Wraps [`::buffa::OwnedView`]`<`[`DatasetVersionView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
14918
14919 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DatasetVersionView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
14920        #[derive(Clone, Debug)]
14921        pub struct DatasetVersionOwnedView(
14922            ::buffa::OwnedView<DatasetVersionView<'static>>,
14923        );
14924        impl DatasetVersionOwnedView {
14925            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
14926            ///
14927            /// The view borrows directly from the buffer's data; the buffer is
14928            /// retained inside the returned handle.
14929            ///
14930            /// # Errors
14931            ///
14932            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
14933            /// protobuf data.
14934            pub fn decode(
14935                bytes: ::buffa::bytes::Bytes,
14936            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14937                ::core::result::Result::Ok(
14938                    DatasetVersionOwnedView(::buffa::OwnedView::decode(bytes)?),
14939                )
14940            }
14941            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
14942            /// max message size).
14943            ///
14944            /// # Errors
14945            ///
14946            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
14947            /// exceeds the configured limits.
14948            pub fn decode_with_options(
14949                bytes: ::buffa::bytes::Bytes,
14950                opts: &::buffa::DecodeOptions,
14951            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14952                ::core::result::Result::Ok(
14953                    DatasetVersionOwnedView(
14954                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
14955                    ),
14956                )
14957            }
14958            /// Build from an owned message via an encode → decode round-trip.
14959            ///
14960            /// # Errors
14961            ///
14962            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
14963            /// somehow invalid (should not happen for well-formed messages).
14964            pub fn from_owned(
14965                msg: &super::super::DatasetVersion,
14966            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14967                ::core::result::Result::Ok(
14968                    DatasetVersionOwnedView(::buffa::OwnedView::from_owned(msg)?),
14969                )
14970            }
14971            /// Borrow the full [`DatasetVersionView`] with its lifetime tied to `&self`.
14972            #[must_use]
14973            pub fn view(&self) -> &DatasetVersionView<'_> {
14974                self.0.reborrow()
14975            }
14976            /// Convert to the owned message type.
14977            #[must_use]
14978            pub fn to_owned_message(&self) -> super::super::DatasetVersion {
14979                self.0.to_owned_message()
14980            }
14981            /// The underlying bytes buffer.
14982            #[must_use]
14983            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
14984                self.0.bytes()
14985            }
14986            /// Consume the handle, returning the underlying bytes buffer.
14987            #[must_use]
14988            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
14989                self.0.into_bytes()
14990            }
14991            /// Field 1: `id`
14992            #[must_use]
14993            pub fn id(
14994                &self,
14995            ) -> &::buffa::MessageFieldView<
14996                super::super::__buffa::view::DatasetVersionIdView<'_>,
14997            > {
14998                &self.0.reborrow().id
14999            }
15000            /// Field 2: `type`
15001            #[must_use]
15002            pub fn r#type(&self) -> ::buffa::EnumValue<super::super::DatasetType> {
15003                self.0.reborrow().r#type
15004            }
15005            /// Field 3: `name`
15006            #[must_use]
15007            pub fn name(&self) -> &'_ str {
15008                self.0.reborrow().name
15009            }
15010            /// Field 4: `physical_name`
15011            #[must_use]
15012            pub fn physical_name(&self) -> &'_ str {
15013                self.0.reborrow().physical_name
15014            }
15015            /// Field 5: `created_at`
15016            #[must_use]
15017            pub fn created_at(&self) -> &'_ str {
15018                self.0.reborrow().created_at
15019            }
15020            /// This version's schema UUID. The dataset's latest version equals the
15021            /// dataset's `current_version`.
15022            ///
15023            /// Field 6: `version`
15024            #[must_use]
15025            pub fn version(&self) -> &'_ str {
15026                self.0.reborrow().version
15027            }
15028            /// Field 7: `namespace`
15029            #[must_use]
15030            pub fn namespace(&self) -> &'_ str {
15031                self.0.reborrow().namespace
15032            }
15033            /// Field 8: `source_name`
15034            #[must_use]
15035            pub fn source_name(&self) -> &'_ str {
15036                self.0.reborrow().source_name
15037            }
15038            /// Field 9: `fields`
15039            #[must_use]
15040            pub fn fields(
15041                &self,
15042            ) -> &::buffa::RepeatedView<
15043                '_,
15044                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
15045            > {
15046                &self.0.reborrow().fields
15047            }
15048            /// Field 10: `tags`
15049            #[must_use]
15050            pub fn tags(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
15051                &self.0.reborrow().tags
15052            }
15053            /// Field 11: `last_modified_at`
15054            #[must_use]
15055            pub fn last_modified_at(&self) -> &'_ str {
15056                self.0.reborrow().last_modified_at
15057            }
15058            /// Field 12: `description`
15059            #[must_use]
15060            pub fn description(&self) -> &'_ str {
15061                self.0.reborrow().description
15062            }
15063            /// Field 13: `facets`
15064            #[must_use]
15065            pub fn facets(
15066                &self,
15067            ) -> &::buffa::MessageFieldView<
15068                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
15069            > {
15070                &self.0.reborrow().facets
15071            }
15072        }
15073        impl ::core::convert::From<::buffa::OwnedView<DatasetVersionView<'static>>>
15074        for DatasetVersionOwnedView {
15075            fn from(inner: ::buffa::OwnedView<DatasetVersionView<'static>>) -> Self {
15076                DatasetVersionOwnedView(inner)
15077            }
15078        }
15079        impl ::core::convert::From<DatasetVersionOwnedView>
15080        for ::buffa::OwnedView<DatasetVersionView<'static>> {
15081            fn from(wrapper: DatasetVersionOwnedView) -> Self {
15082                wrapper.0
15083            }
15084        }
15085        impl ::core::convert::AsRef<::buffa::OwnedView<DatasetVersionView<'static>>>
15086        for DatasetVersionOwnedView {
15087            fn as_ref(&self) -> &::buffa::OwnedView<DatasetVersionView<'static>> {
15088                &self.0
15089            }
15090        }
15091        impl ::buffa::HasMessageView for super::super::DatasetVersion {
15092            type View<'a> = DatasetVersionView<'a>;
15093            type ViewHandle = DatasetVersionOwnedView;
15094        }
15095        impl ::serde::Serialize for DatasetVersionOwnedView {
15096            fn serialize<__S: ::serde::Serializer>(
15097                &self,
15098                __s: __S,
15099            ) -> ::core::result::Result<__S::Ok, __S::Error> {
15100                ::serde::Serialize::serialize(&self.0, __s)
15101            }
15102        }
15103        #[derive(Clone, Debug, Default)]
15104        pub struct DatasetVersionIdView<'a> {
15105            /// Field 1: `namespace`
15106            pub namespace: &'a str,
15107            /// Field 2: `name`
15108            pub name: &'a str,
15109            /// Field 3: `version`
15110            pub version: &'a str,
15111            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
15112        }
15113        impl<'a> DatasetVersionIdView<'a> {
15114            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
15115            ///
15116            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
15117            /// and by generated sub-message decode arms with `depth - 1`.
15118            ///
15119            /// **Not part of the public API.** Named with a leading underscore to
15120            /// signal that it is for generated-code use only.
15121            #[doc(hidden)]
15122            pub fn _decode_depth(
15123                buf: &'a [u8],
15124                depth: u32,
15125            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15126                let mut view = Self::default();
15127                view._merge_into_view(buf, depth)?;
15128                ::core::result::Result::Ok(view)
15129            }
15130            /// Merge fields from `buf` into this view (proto merge semantics).
15131            ///
15132            /// Repeated fields append; singular fields last-wins; singular
15133            /// MESSAGE fields merge recursively. Used by sub-message decode
15134            /// arms when the same field appears multiple times on the wire.
15135            ///
15136            /// **Not part of the public API.**
15137            #[doc(hidden)]
15138            pub fn _merge_into_view(
15139                &mut self,
15140                buf: &'a [u8],
15141                depth: u32,
15142            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
15143                let _ = depth;
15144                #[allow(unused_variables)]
15145                let view = self;
15146                let mut cur: &'a [u8] = buf;
15147                while !cur.is_empty() {
15148                    let before_tag = cur;
15149                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
15150                    match tag.field_number() {
15151                        1u32 => {
15152                            if tag.wire_type()
15153                                != ::buffa::encoding::WireType::LengthDelimited
15154                            {
15155                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15156                                    field_number: 1u32,
15157                                    expected: 2u8,
15158                                    actual: tag.wire_type() as u8,
15159                                });
15160                            }
15161                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
15162                        }
15163                        2u32 => {
15164                            if tag.wire_type()
15165                                != ::buffa::encoding::WireType::LengthDelimited
15166                            {
15167                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15168                                    field_number: 2u32,
15169                                    expected: 2u8,
15170                                    actual: tag.wire_type() as u8,
15171                                });
15172                            }
15173                            view.name = ::buffa::types::borrow_str(&mut cur)?;
15174                        }
15175                        3u32 => {
15176                            if tag.wire_type()
15177                                != ::buffa::encoding::WireType::LengthDelimited
15178                            {
15179                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15180                                    field_number: 3u32,
15181                                    expected: 2u8,
15182                                    actual: tag.wire_type() as u8,
15183                                });
15184                            }
15185                            view.version = ::buffa::types::borrow_str(&mut cur)?;
15186                        }
15187                        _ => {
15188                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
15189                            let span_len = before_tag.len() - cur.len();
15190                            view.__buffa_unknown_fields
15191                                .push_raw(&before_tag[..span_len]);
15192                        }
15193                    }
15194                }
15195                ::core::result::Result::Ok(())
15196            }
15197        }
15198        impl<'a> ::buffa::MessageView<'a> for DatasetVersionIdView<'a> {
15199            type Owned = super::super::DatasetVersionId;
15200            fn decode_view(
15201                buf: &'a [u8],
15202            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15203                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
15204            }
15205            fn decode_view_with_limit(
15206                buf: &'a [u8],
15207                depth: u32,
15208            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15209                Self::_decode_depth(buf, depth)
15210            }
15211            fn to_owned_message(&self) -> super::super::DatasetVersionId {
15212                self.to_owned_from_source(None)
15213            }
15214            #[allow(clippy::useless_conversion, clippy::needless_update)]
15215            fn to_owned_from_source(
15216                &self,
15217                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
15218            ) -> super::super::DatasetVersionId {
15219                #[allow(unused_imports)]
15220                use ::buffa::alloc::string::ToString as _;
15221                let _ = __buffa_src;
15222                super::super::DatasetVersionId {
15223                    namespace: self.namespace.to_string(),
15224                    name: self.name.to_string(),
15225                    version: self.version.to_string(),
15226                    __buffa_unknown_fields: self
15227                        .__buffa_unknown_fields
15228                        .to_owned()
15229                        .unwrap_or_default()
15230                        .into(),
15231                    ..::core::default::Default::default()
15232                }
15233            }
15234        }
15235        impl<'a> ::buffa::ViewEncode<'a> for DatasetVersionIdView<'a> {
15236            #[allow(clippy::needless_borrow, clippy::let_and_return)]
15237            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
15238                #[allow(unused_imports)]
15239                use ::buffa::Enumeration as _;
15240                let mut size = 0u32;
15241                if !self.namespace.is_empty() {
15242                    size
15243                        += 1u32
15244                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
15245                }
15246                if !self.name.is_empty() {
15247                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
15248                }
15249                if !self.version.is_empty() {
15250                    size
15251                        += 1u32
15252                            + ::buffa::types::string_encoded_len(&self.version) as u32;
15253                }
15254                size += self.__buffa_unknown_fields.encoded_len() as u32;
15255                size
15256            }
15257            #[allow(clippy::needless_borrow)]
15258            fn write_to(
15259                &self,
15260                _cache: &mut ::buffa::SizeCache,
15261                buf: &mut impl ::buffa::bytes::BufMut,
15262            ) {
15263                #[allow(unused_imports)]
15264                use ::buffa::Enumeration as _;
15265                if !self.namespace.is_empty() {
15266                    ::buffa::encoding::Tag::new(
15267                            1u32,
15268                            ::buffa::encoding::WireType::LengthDelimited,
15269                        )
15270                        .encode(buf);
15271                    ::buffa::types::encode_string(&self.namespace, buf);
15272                }
15273                if !self.name.is_empty() {
15274                    ::buffa::encoding::Tag::new(
15275                            2u32,
15276                            ::buffa::encoding::WireType::LengthDelimited,
15277                        )
15278                        .encode(buf);
15279                    ::buffa::types::encode_string(&self.name, buf);
15280                }
15281                if !self.version.is_empty() {
15282                    ::buffa::encoding::Tag::new(
15283                            3u32,
15284                            ::buffa::encoding::WireType::LengthDelimited,
15285                        )
15286                        .encode(buf);
15287                    ::buffa::types::encode_string(&self.version, buf);
15288                }
15289                self.__buffa_unknown_fields.write_to(buf);
15290            }
15291        }
15292        /// Serializes this view as protobuf JSON.
15293        ///
15294        /// Implicit-presence fields with default values are omitted, `required`
15295        /// fields are always emitted, explicit-presence (`optional`) fields are
15296        /// emitted only when set, bytes fields are base64-encoded, and enum
15297        /// values are their proto name strings.
15298        ///
15299        /// This impl uses `serialize_map(None)` because the number of emitted
15300        /// fields depends on default-omission rules; serializers that require
15301        /// known map lengths (e.g. `bincode`) will return a runtime error.
15302        /// Use the owned message type for those formats.
15303        impl<'__a> ::serde::Serialize for DatasetVersionIdView<'__a> {
15304            fn serialize<__S: ::serde::Serializer>(
15305                &self,
15306                __s: __S,
15307            ) -> ::core::result::Result<__S::Ok, __S::Error> {
15308                use ::serde::ser::SerializeMap as _;
15309                let mut __map = __s.serialize_map(::core::option::Option::None)?;
15310                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
15311                    __map.serialize_entry("namespace", self.namespace)?;
15312                }
15313                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
15314                    __map.serialize_entry("name", self.name)?;
15315                }
15316                if !::buffa::json_helpers::skip_if::is_empty_str(self.version) {
15317                    __map.serialize_entry("version", self.version)?;
15318                }
15319                __map.end()
15320            }
15321        }
15322        impl<'a> ::buffa::MessageName for DatasetVersionIdView<'a> {
15323            const PACKAGE: &'static str = "headwaters.read.v1";
15324            const NAME: &'static str = "DatasetVersionId";
15325            const FULL_NAME: &'static str = "headwaters.read.v1.DatasetVersionId";
15326            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.DatasetVersionId";
15327        }
15328        impl<'v> ::buffa::DefaultViewInstance for DatasetVersionIdView<'v> {
15329            fn default_view_instance<'a>() -> &'a Self
15330            where
15331                Self: 'a,
15332            {
15333                static VALUE: ::buffa::__private::OnceBox<
15334                    DatasetVersionIdView<'static>,
15335                > = ::buffa::__private::OnceBox::new();
15336                VALUE
15337                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
15338                        <DatasetVersionIdView<'static>>::default(),
15339                    ))
15340            }
15341        }
15342        impl ::buffa::ViewReborrow for DatasetVersionIdView<'static> {
15343            type Reborrowed<'b> = DatasetVersionIdView<'b>;
15344            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
15345                this
15346            }
15347        }
15348        /** Self-contained, `'static` owned view of a `DatasetVersionId` message.
15349
15350 Wraps [`::buffa::OwnedView`]`<`[`DatasetVersionIdView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
15351
15352 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DatasetVersionIdView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
15353        #[derive(Clone, Debug)]
15354        pub struct DatasetVersionIdOwnedView(
15355            ::buffa::OwnedView<DatasetVersionIdView<'static>>,
15356        );
15357        impl DatasetVersionIdOwnedView {
15358            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
15359            ///
15360            /// The view borrows directly from the buffer's data; the buffer is
15361            /// retained inside the returned handle.
15362            ///
15363            /// # Errors
15364            ///
15365            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
15366            /// protobuf data.
15367            pub fn decode(
15368                bytes: ::buffa::bytes::Bytes,
15369            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15370                ::core::result::Result::Ok(
15371                    DatasetVersionIdOwnedView(::buffa::OwnedView::decode(bytes)?),
15372                )
15373            }
15374            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
15375            /// max message size).
15376            ///
15377            /// # Errors
15378            ///
15379            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
15380            /// exceeds the configured limits.
15381            pub fn decode_with_options(
15382                bytes: ::buffa::bytes::Bytes,
15383                opts: &::buffa::DecodeOptions,
15384            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15385                ::core::result::Result::Ok(
15386                    DatasetVersionIdOwnedView(
15387                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
15388                    ),
15389                )
15390            }
15391            /// Build from an owned message via an encode → decode round-trip.
15392            ///
15393            /// # Errors
15394            ///
15395            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
15396            /// somehow invalid (should not happen for well-formed messages).
15397            pub fn from_owned(
15398                msg: &super::super::DatasetVersionId,
15399            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15400                ::core::result::Result::Ok(
15401                    DatasetVersionIdOwnedView(::buffa::OwnedView::from_owned(msg)?),
15402                )
15403            }
15404            /// Borrow the full [`DatasetVersionIdView`] with its lifetime tied to `&self`.
15405            #[must_use]
15406            pub fn view(&self) -> &DatasetVersionIdView<'_> {
15407                self.0.reborrow()
15408            }
15409            /// Convert to the owned message type.
15410            #[must_use]
15411            pub fn to_owned_message(&self) -> super::super::DatasetVersionId {
15412                self.0.to_owned_message()
15413            }
15414            /// The underlying bytes buffer.
15415            #[must_use]
15416            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
15417                self.0.bytes()
15418            }
15419            /// Consume the handle, returning the underlying bytes buffer.
15420            #[must_use]
15421            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
15422                self.0.into_bytes()
15423            }
15424            /// Field 1: `namespace`
15425            #[must_use]
15426            pub fn namespace(&self) -> &'_ str {
15427                self.0.reborrow().namespace
15428            }
15429            /// Field 2: `name`
15430            #[must_use]
15431            pub fn name(&self) -> &'_ str {
15432                self.0.reborrow().name
15433            }
15434            /// Field 3: `version`
15435            #[must_use]
15436            pub fn version(&self) -> &'_ str {
15437                self.0.reborrow().version
15438            }
15439        }
15440        impl ::core::convert::From<::buffa::OwnedView<DatasetVersionIdView<'static>>>
15441        for DatasetVersionIdOwnedView {
15442            fn from(inner: ::buffa::OwnedView<DatasetVersionIdView<'static>>) -> Self {
15443                DatasetVersionIdOwnedView(inner)
15444            }
15445        }
15446        impl ::core::convert::From<DatasetVersionIdOwnedView>
15447        for ::buffa::OwnedView<DatasetVersionIdView<'static>> {
15448            fn from(wrapper: DatasetVersionIdOwnedView) -> Self {
15449                wrapper.0
15450            }
15451        }
15452        impl ::core::convert::AsRef<::buffa::OwnedView<DatasetVersionIdView<'static>>>
15453        for DatasetVersionIdOwnedView {
15454            fn as_ref(&self) -> &::buffa::OwnedView<DatasetVersionIdView<'static>> {
15455                &self.0
15456            }
15457        }
15458        impl ::buffa::HasMessageView for super::super::DatasetVersionId {
15459            type View<'a> = DatasetVersionIdView<'a>;
15460            type ViewHandle = DatasetVersionIdOwnedView;
15461        }
15462        impl ::serde::Serialize for DatasetVersionIdOwnedView {
15463            fn serialize<__S: ::serde::Serializer>(
15464                &self,
15465                __s: __S,
15466            ) -> ::core::result::Result<__S::Ok, __S::Error> {
15467                ::serde::Serialize::serialize(&self.0, __s)
15468            }
15469        }
15470        #[derive(Clone, Debug, Default)]
15471        pub struct ListDatasetVersionsResponseView<'a> {
15472            /// Field 1: `versions`
15473            pub versions: ::buffa::RepeatedView<
15474                'a,
15475                super::super::__buffa::view::DatasetVersionView<'a>,
15476            >,
15477            /// Field 2: `total_count`
15478            pub total_count: i32,
15479            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
15480        }
15481        impl<'a> ListDatasetVersionsResponseView<'a> {
15482            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
15483            ///
15484            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
15485            /// and by generated sub-message decode arms with `depth - 1`.
15486            ///
15487            /// **Not part of the public API.** Named with a leading underscore to
15488            /// signal that it is for generated-code use only.
15489            #[doc(hidden)]
15490            pub fn _decode_depth(
15491                buf: &'a [u8],
15492                depth: u32,
15493            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15494                let mut view = Self::default();
15495                view._merge_into_view(buf, depth)?;
15496                ::core::result::Result::Ok(view)
15497            }
15498            /// Merge fields from `buf` into this view (proto merge semantics).
15499            ///
15500            /// Repeated fields append; singular fields last-wins; singular
15501            /// MESSAGE fields merge recursively. Used by sub-message decode
15502            /// arms when the same field appears multiple times on the wire.
15503            ///
15504            /// **Not part of the public API.**
15505            #[doc(hidden)]
15506            pub fn _merge_into_view(
15507                &mut self,
15508                buf: &'a [u8],
15509                depth: u32,
15510            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
15511                let _ = depth;
15512                #[allow(unused_variables)]
15513                let view = self;
15514                let mut cur: &'a [u8] = buf;
15515                while !cur.is_empty() {
15516                    let before_tag = cur;
15517                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
15518                    match tag.field_number() {
15519                        2u32 => {
15520                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
15521                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15522                                    field_number: 2u32,
15523                                    expected: 0u8,
15524                                    actual: tag.wire_type() as u8,
15525                                });
15526                            }
15527                            view.total_count = ::buffa::types::decode_int32(&mut cur)?;
15528                        }
15529                        1u32 => {
15530                            if tag.wire_type()
15531                                != ::buffa::encoding::WireType::LengthDelimited
15532                            {
15533                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15534                                    field_number: 1u32,
15535                                    expected: 2u8,
15536                                    actual: tag.wire_type() as u8,
15537                                });
15538                            }
15539                            if depth == 0 {
15540                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
15541                            }
15542                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
15543                            view.versions
15544                                .push(
15545                                    super::super::__buffa::view::DatasetVersionView::_decode_depth(
15546                                        sub,
15547                                        depth - 1,
15548                                    )?,
15549                                );
15550                        }
15551                        _ => {
15552                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
15553                            let span_len = before_tag.len() - cur.len();
15554                            view.__buffa_unknown_fields
15555                                .push_raw(&before_tag[..span_len]);
15556                        }
15557                    }
15558                }
15559                ::core::result::Result::Ok(())
15560            }
15561        }
15562        impl<'a> ::buffa::MessageView<'a> for ListDatasetVersionsResponseView<'a> {
15563            type Owned = super::super::ListDatasetVersionsResponse;
15564            fn decode_view(
15565                buf: &'a [u8],
15566            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15567                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
15568            }
15569            fn decode_view_with_limit(
15570                buf: &'a [u8],
15571                depth: u32,
15572            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15573                Self::_decode_depth(buf, depth)
15574            }
15575            fn to_owned_message(&self) -> super::super::ListDatasetVersionsResponse {
15576                self.to_owned_from_source(None)
15577            }
15578            #[allow(clippy::useless_conversion, clippy::needless_update)]
15579            fn to_owned_from_source(
15580                &self,
15581                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
15582            ) -> super::super::ListDatasetVersionsResponse {
15583                #[allow(unused_imports)]
15584                use ::buffa::alloc::string::ToString as _;
15585                let _ = __buffa_src;
15586                super::super::ListDatasetVersionsResponse {
15587                    versions: self
15588                        .versions
15589                        .iter()
15590                        .map(|v| v.to_owned_from_source(__buffa_src))
15591                        .collect(),
15592                    total_count: self.total_count,
15593                    __buffa_unknown_fields: self
15594                        .__buffa_unknown_fields
15595                        .to_owned()
15596                        .unwrap_or_default()
15597                        .into(),
15598                    ..::core::default::Default::default()
15599                }
15600            }
15601        }
15602        impl<'a> ::buffa::ViewEncode<'a> for ListDatasetVersionsResponseView<'a> {
15603            #[allow(clippy::needless_borrow, clippy::let_and_return)]
15604            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
15605                #[allow(unused_imports)]
15606                use ::buffa::Enumeration as _;
15607                let mut size = 0u32;
15608                for v in &self.versions {
15609                    let __slot = __cache.reserve();
15610                    let inner_size = v.compute_size(__cache);
15611                    __cache.set(__slot, inner_size);
15612                    size
15613                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15614                            + inner_size;
15615                }
15616                if self.total_count != 0i32 {
15617                    size
15618                        += 1u32
15619                            + ::buffa::types::int32_encoded_len(self.total_count) as u32;
15620                }
15621                size += self.__buffa_unknown_fields.encoded_len() as u32;
15622                size
15623            }
15624            #[allow(clippy::needless_borrow)]
15625            fn write_to(
15626                &self,
15627                __cache: &mut ::buffa::SizeCache,
15628                buf: &mut impl ::buffa::bytes::BufMut,
15629            ) {
15630                #[allow(unused_imports)]
15631                use ::buffa::Enumeration as _;
15632                for v in &self.versions {
15633                    ::buffa::encoding::Tag::new(
15634                            1u32,
15635                            ::buffa::encoding::WireType::LengthDelimited,
15636                        )
15637                        .encode(buf);
15638                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
15639                    v.write_to(__cache, buf);
15640                }
15641                if self.total_count != 0i32 {
15642                    ::buffa::encoding::Tag::new(
15643                            2u32,
15644                            ::buffa::encoding::WireType::Varint,
15645                        )
15646                        .encode(buf);
15647                    ::buffa::types::encode_int32(self.total_count, buf);
15648                }
15649                self.__buffa_unknown_fields.write_to(buf);
15650            }
15651        }
15652        /// Serializes this view as protobuf JSON.
15653        ///
15654        /// Implicit-presence fields with default values are omitted, `required`
15655        /// fields are always emitted, explicit-presence (`optional`) fields are
15656        /// emitted only when set, bytes fields are base64-encoded, and enum
15657        /// values are their proto name strings.
15658        ///
15659        /// This impl uses `serialize_map(None)` because the number of emitted
15660        /// fields depends on default-omission rules; serializers that require
15661        /// known map lengths (e.g. `bincode`) will return a runtime error.
15662        /// Use the owned message type for those formats.
15663        impl<'__a> ::serde::Serialize for ListDatasetVersionsResponseView<'__a> {
15664            fn serialize<__S: ::serde::Serializer>(
15665                &self,
15666                __s: __S,
15667            ) -> ::core::result::Result<__S::Ok, __S::Error> {
15668                use ::serde::ser::SerializeMap as _;
15669                let mut __map = __s.serialize_map(::core::option::Option::None)?;
15670                if !self.versions.is_empty() {
15671                    __map.serialize_entry("versions", &*self.versions)?;
15672                }
15673                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.total_count) {
15674                    struct _W(i32);
15675                    impl ::serde::Serialize for _W {
15676                        fn serialize<__S: ::serde::Serializer>(
15677                            &self,
15678                            __s: __S,
15679                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
15680                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
15681                        }
15682                    }
15683                    __map.serialize_entry("totalCount", &_W(self.total_count))?;
15684                }
15685                __map.end()
15686            }
15687        }
15688        impl<'a> ::buffa::MessageName for ListDatasetVersionsResponseView<'a> {
15689            const PACKAGE: &'static str = "headwaters.read.v1";
15690            const NAME: &'static str = "ListDatasetVersionsResponse";
15691            const FULL_NAME: &'static str = "headwaters.read.v1.ListDatasetVersionsResponse";
15692            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetVersionsResponse";
15693        }
15694        impl<'v> ::buffa::DefaultViewInstance for ListDatasetVersionsResponseView<'v> {
15695            fn default_view_instance<'a>() -> &'a Self
15696            where
15697                Self: 'a,
15698            {
15699                static VALUE: ::buffa::__private::OnceBox<
15700                    ListDatasetVersionsResponseView<'static>,
15701                > = ::buffa::__private::OnceBox::new();
15702                VALUE
15703                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
15704                        <ListDatasetVersionsResponseView<'static>>::default(),
15705                    ))
15706            }
15707        }
15708        impl ::buffa::ViewReborrow for ListDatasetVersionsResponseView<'static> {
15709            type Reborrowed<'b> = ListDatasetVersionsResponseView<'b>;
15710            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
15711                this
15712            }
15713        }
15714        /** Self-contained, `'static` owned view of a `ListDatasetVersionsResponse` message.
15715
15716 Wraps [`::buffa::OwnedView`]`<`[`ListDatasetVersionsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
15717
15718 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListDatasetVersionsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
15719        #[derive(Clone, Debug)]
15720        pub struct ListDatasetVersionsResponseOwnedView(
15721            ::buffa::OwnedView<ListDatasetVersionsResponseView<'static>>,
15722        );
15723        impl ListDatasetVersionsResponseOwnedView {
15724            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
15725            ///
15726            /// The view borrows directly from the buffer's data; the buffer is
15727            /// retained inside the returned handle.
15728            ///
15729            /// # Errors
15730            ///
15731            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
15732            /// protobuf data.
15733            pub fn decode(
15734                bytes: ::buffa::bytes::Bytes,
15735            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15736                ::core::result::Result::Ok(
15737                    ListDatasetVersionsResponseOwnedView(
15738                        ::buffa::OwnedView::decode(bytes)?,
15739                    ),
15740                )
15741            }
15742            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
15743            /// max message size).
15744            ///
15745            /// # Errors
15746            ///
15747            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
15748            /// exceeds the configured limits.
15749            pub fn decode_with_options(
15750                bytes: ::buffa::bytes::Bytes,
15751                opts: &::buffa::DecodeOptions,
15752            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15753                ::core::result::Result::Ok(
15754                    ListDatasetVersionsResponseOwnedView(
15755                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
15756                    ),
15757                )
15758            }
15759            /// Build from an owned message via an encode → decode round-trip.
15760            ///
15761            /// # Errors
15762            ///
15763            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
15764            /// somehow invalid (should not happen for well-formed messages).
15765            pub fn from_owned(
15766                msg: &super::super::ListDatasetVersionsResponse,
15767            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15768                ::core::result::Result::Ok(
15769                    ListDatasetVersionsResponseOwnedView(
15770                        ::buffa::OwnedView::from_owned(msg)?,
15771                    ),
15772                )
15773            }
15774            /// Borrow the full [`ListDatasetVersionsResponseView`] with its lifetime tied to `&self`.
15775            #[must_use]
15776            pub fn view(&self) -> &ListDatasetVersionsResponseView<'_> {
15777                self.0.reborrow()
15778            }
15779            /// Convert to the owned message type.
15780            #[must_use]
15781            pub fn to_owned_message(&self) -> super::super::ListDatasetVersionsResponse {
15782                self.0.to_owned_message()
15783            }
15784            /// The underlying bytes buffer.
15785            #[must_use]
15786            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
15787                self.0.bytes()
15788            }
15789            /// Consume the handle, returning the underlying bytes buffer.
15790            #[must_use]
15791            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
15792                self.0.into_bytes()
15793            }
15794            /// Field 1: `versions`
15795            #[must_use]
15796            pub fn versions(
15797                &self,
15798            ) -> &::buffa::RepeatedView<
15799                '_,
15800                super::super::__buffa::view::DatasetVersionView<'_>,
15801            > {
15802                &self.0.reborrow().versions
15803            }
15804            /// Field 2: `total_count`
15805            #[must_use]
15806            pub fn total_count(&self) -> i32 {
15807                self.0.reborrow().total_count
15808            }
15809        }
15810        impl ::core::convert::From<
15811            ::buffa::OwnedView<ListDatasetVersionsResponseView<'static>>,
15812        > for ListDatasetVersionsResponseOwnedView {
15813            fn from(
15814                inner: ::buffa::OwnedView<ListDatasetVersionsResponseView<'static>>,
15815            ) -> Self {
15816                ListDatasetVersionsResponseOwnedView(inner)
15817            }
15818        }
15819        impl ::core::convert::From<ListDatasetVersionsResponseOwnedView>
15820        for ::buffa::OwnedView<ListDatasetVersionsResponseView<'static>> {
15821            fn from(wrapper: ListDatasetVersionsResponseOwnedView) -> Self {
15822                wrapper.0
15823            }
15824        }
15825        impl ::core::convert::AsRef<
15826            ::buffa::OwnedView<ListDatasetVersionsResponseView<'static>>,
15827        > for ListDatasetVersionsResponseOwnedView {
15828            fn as_ref(
15829                &self,
15830            ) -> &::buffa::OwnedView<ListDatasetVersionsResponseView<'static>> {
15831                &self.0
15832            }
15833        }
15834        impl ::buffa::HasMessageView for super::super::ListDatasetVersionsResponse {
15835            type View<'a> = ListDatasetVersionsResponseView<'a>;
15836            type ViewHandle = ListDatasetVersionsResponseOwnedView;
15837        }
15838        impl ::serde::Serialize for ListDatasetVersionsResponseOwnedView {
15839            fn serialize<__S: ::serde::Serializer>(
15840                &self,
15841                __s: __S,
15842            ) -> ::core::result::Result<__S::Ok, __S::Error> {
15843                ::serde::Serialize::serialize(&self.0, __s)
15844            }
15845        }
15846        /// --- search ---
15847        ///
15848        /// One job or dataset matching a search query.
15849        #[derive(Clone, Debug, Default)]
15850        pub struct SearchResultView<'a> {
15851            /// Field 1: `name`
15852            pub name: &'a str,
15853            /// Field 2: `namespace`
15854            pub namespace: &'a str,
15855            /// The matched entity's nodeId, ready to pass to `GetLineage`.
15856            ///
15857            /// Field 3: `node_id`
15858            pub node_id: &'a str,
15859            /// `JOB` or `DATASET` (search does not return fields).
15860            ///
15861            /// Field 4: `type`
15862            pub r#type: ::buffa::EnumValue<super::super::EntityKind>,
15863            /// Field 5: `updated_at`
15864            pub updated_at: &'a str,
15865            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
15866        }
15867        impl<'a> SearchResultView<'a> {
15868            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
15869            ///
15870            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
15871            /// and by generated sub-message decode arms with `depth - 1`.
15872            ///
15873            /// **Not part of the public API.** Named with a leading underscore to
15874            /// signal that it is for generated-code use only.
15875            #[doc(hidden)]
15876            pub fn _decode_depth(
15877                buf: &'a [u8],
15878                depth: u32,
15879            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15880                let mut view = Self::default();
15881                view._merge_into_view(buf, depth)?;
15882                ::core::result::Result::Ok(view)
15883            }
15884            /// Merge fields from `buf` into this view (proto merge semantics).
15885            ///
15886            /// Repeated fields append; singular fields last-wins; singular
15887            /// MESSAGE fields merge recursively. Used by sub-message decode
15888            /// arms when the same field appears multiple times on the wire.
15889            ///
15890            /// **Not part of the public API.**
15891            #[doc(hidden)]
15892            pub fn _merge_into_view(
15893                &mut self,
15894                buf: &'a [u8],
15895                depth: u32,
15896            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
15897                let _ = depth;
15898                #[allow(unused_variables)]
15899                let view = self;
15900                let mut cur: &'a [u8] = buf;
15901                while !cur.is_empty() {
15902                    let before_tag = cur;
15903                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
15904                    match tag.field_number() {
15905                        1u32 => {
15906                            if tag.wire_type()
15907                                != ::buffa::encoding::WireType::LengthDelimited
15908                            {
15909                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15910                                    field_number: 1u32,
15911                                    expected: 2u8,
15912                                    actual: tag.wire_type() as u8,
15913                                });
15914                            }
15915                            view.name = ::buffa::types::borrow_str(&mut cur)?;
15916                        }
15917                        2u32 => {
15918                            if tag.wire_type()
15919                                != ::buffa::encoding::WireType::LengthDelimited
15920                            {
15921                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15922                                    field_number: 2u32,
15923                                    expected: 2u8,
15924                                    actual: tag.wire_type() as u8,
15925                                });
15926                            }
15927                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
15928                        }
15929                        3u32 => {
15930                            if tag.wire_type()
15931                                != ::buffa::encoding::WireType::LengthDelimited
15932                            {
15933                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15934                                    field_number: 3u32,
15935                                    expected: 2u8,
15936                                    actual: tag.wire_type() as u8,
15937                                });
15938                            }
15939                            view.node_id = ::buffa::types::borrow_str(&mut cur)?;
15940                        }
15941                        4u32 => {
15942                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
15943                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15944                                    field_number: 4u32,
15945                                    expected: 0u8,
15946                                    actual: tag.wire_type() as u8,
15947                                });
15948                            }
15949                            view.r#type = ::buffa::EnumValue::from(
15950                                ::buffa::types::decode_int32(&mut cur)?,
15951                            );
15952                        }
15953                        5u32 => {
15954                            if tag.wire_type()
15955                                != ::buffa::encoding::WireType::LengthDelimited
15956                            {
15957                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
15958                                    field_number: 5u32,
15959                                    expected: 2u8,
15960                                    actual: tag.wire_type() as u8,
15961                                });
15962                            }
15963                            view.updated_at = ::buffa::types::borrow_str(&mut cur)?;
15964                        }
15965                        _ => {
15966                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
15967                            let span_len = before_tag.len() - cur.len();
15968                            view.__buffa_unknown_fields
15969                                .push_raw(&before_tag[..span_len]);
15970                        }
15971                    }
15972                }
15973                ::core::result::Result::Ok(())
15974            }
15975        }
15976        impl<'a> ::buffa::MessageView<'a> for SearchResultView<'a> {
15977            type Owned = super::super::SearchResult;
15978            fn decode_view(
15979                buf: &'a [u8],
15980            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15981                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
15982            }
15983            fn decode_view_with_limit(
15984                buf: &'a [u8],
15985                depth: u32,
15986            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15987                Self::_decode_depth(buf, depth)
15988            }
15989            fn to_owned_message(&self) -> super::super::SearchResult {
15990                self.to_owned_from_source(None)
15991            }
15992            #[allow(clippy::useless_conversion, clippy::needless_update)]
15993            fn to_owned_from_source(
15994                &self,
15995                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
15996            ) -> super::super::SearchResult {
15997                #[allow(unused_imports)]
15998                use ::buffa::alloc::string::ToString as _;
15999                let _ = __buffa_src;
16000                super::super::SearchResult {
16001                    name: self.name.to_string(),
16002                    namespace: self.namespace.to_string(),
16003                    node_id: self.node_id.to_string(),
16004                    r#type: self.r#type,
16005                    updated_at: self.updated_at.to_string(),
16006                    __buffa_unknown_fields: self
16007                        .__buffa_unknown_fields
16008                        .to_owned()
16009                        .unwrap_or_default()
16010                        .into(),
16011                    ..::core::default::Default::default()
16012                }
16013            }
16014        }
16015        impl<'a> ::buffa::ViewEncode<'a> for SearchResultView<'a> {
16016            #[allow(clippy::needless_borrow, clippy::let_and_return)]
16017            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
16018                #[allow(unused_imports)]
16019                use ::buffa::Enumeration as _;
16020                let mut size = 0u32;
16021                if !self.name.is_empty() {
16022                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
16023                }
16024                if !self.namespace.is_empty() {
16025                    size
16026                        += 1u32
16027                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
16028                }
16029                if !self.node_id.is_empty() {
16030                    size
16031                        += 1u32
16032                            + ::buffa::types::string_encoded_len(&self.node_id) as u32;
16033                }
16034                {
16035                    let val = self.r#type.to_i32();
16036                    if val != 0 {
16037                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16038                    }
16039                }
16040                if !self.updated_at.is_empty() {
16041                    size
16042                        += 1u32
16043                            + ::buffa::types::string_encoded_len(&self.updated_at)
16044                                as u32;
16045                }
16046                size += self.__buffa_unknown_fields.encoded_len() as u32;
16047                size
16048            }
16049            #[allow(clippy::needless_borrow)]
16050            fn write_to(
16051                &self,
16052                _cache: &mut ::buffa::SizeCache,
16053                buf: &mut impl ::buffa::bytes::BufMut,
16054            ) {
16055                #[allow(unused_imports)]
16056                use ::buffa::Enumeration as _;
16057                if !self.name.is_empty() {
16058                    ::buffa::encoding::Tag::new(
16059                            1u32,
16060                            ::buffa::encoding::WireType::LengthDelimited,
16061                        )
16062                        .encode(buf);
16063                    ::buffa::types::encode_string(&self.name, buf);
16064                }
16065                if !self.namespace.is_empty() {
16066                    ::buffa::encoding::Tag::new(
16067                            2u32,
16068                            ::buffa::encoding::WireType::LengthDelimited,
16069                        )
16070                        .encode(buf);
16071                    ::buffa::types::encode_string(&self.namespace, buf);
16072                }
16073                if !self.node_id.is_empty() {
16074                    ::buffa::encoding::Tag::new(
16075                            3u32,
16076                            ::buffa::encoding::WireType::LengthDelimited,
16077                        )
16078                        .encode(buf);
16079                    ::buffa::types::encode_string(&self.node_id, buf);
16080                }
16081                {
16082                    let val = self.r#type.to_i32();
16083                    if val != 0 {
16084                        ::buffa::encoding::Tag::new(
16085                                4u32,
16086                                ::buffa::encoding::WireType::Varint,
16087                            )
16088                            .encode(buf);
16089                        ::buffa::types::encode_int32(val, buf);
16090                    }
16091                }
16092                if !self.updated_at.is_empty() {
16093                    ::buffa::encoding::Tag::new(
16094                            5u32,
16095                            ::buffa::encoding::WireType::LengthDelimited,
16096                        )
16097                        .encode(buf);
16098                    ::buffa::types::encode_string(&self.updated_at, buf);
16099                }
16100                self.__buffa_unknown_fields.write_to(buf);
16101            }
16102        }
16103        /// Serializes this view as protobuf JSON.
16104        ///
16105        /// Implicit-presence fields with default values are omitted, `required`
16106        /// fields are always emitted, explicit-presence (`optional`) fields are
16107        /// emitted only when set, bytes fields are base64-encoded, and enum
16108        /// values are their proto name strings.
16109        ///
16110        /// This impl uses `serialize_map(None)` because the number of emitted
16111        /// fields depends on default-omission rules; serializers that require
16112        /// known map lengths (e.g. `bincode`) will return a runtime error.
16113        /// Use the owned message type for those formats.
16114        impl<'__a> ::serde::Serialize for SearchResultView<'__a> {
16115            fn serialize<__S: ::serde::Serializer>(
16116                &self,
16117                __s: __S,
16118            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16119                use ::serde::ser::SerializeMap as _;
16120                let mut __map = __s.serialize_map(::core::option::Option::None)?;
16121                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
16122                    __map.serialize_entry("name", self.name)?;
16123                }
16124                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
16125                    __map.serialize_entry("namespace", self.namespace)?;
16126                }
16127                if !::buffa::json_helpers::skip_if::is_empty_str(self.node_id) {
16128                    __map.serialize_entry("nodeId", self.node_id)?;
16129                }
16130                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.r#type) {
16131                    __map.serialize_entry("type", &self.r#type)?;
16132                }
16133                if !::buffa::json_helpers::skip_if::is_empty_str(self.updated_at) {
16134                    __map.serialize_entry("updatedAt", self.updated_at)?;
16135                }
16136                __map.end()
16137            }
16138        }
16139        impl<'a> ::buffa::MessageName for SearchResultView<'a> {
16140            const PACKAGE: &'static str = "headwaters.read.v1";
16141            const NAME: &'static str = "SearchResult";
16142            const FULL_NAME: &'static str = "headwaters.read.v1.SearchResult";
16143            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchResult";
16144        }
16145        impl<'v> ::buffa::DefaultViewInstance for SearchResultView<'v> {
16146            fn default_view_instance<'a>() -> &'a Self
16147            where
16148                Self: 'a,
16149            {
16150                static VALUE: ::buffa::__private::OnceBox<SearchResultView<'static>> = ::buffa::__private::OnceBox::new();
16151                VALUE
16152                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
16153                        <SearchResultView<'static>>::default(),
16154                    ))
16155            }
16156        }
16157        impl ::buffa::ViewReborrow for SearchResultView<'static> {
16158            type Reborrowed<'b> = SearchResultView<'b>;
16159            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
16160                this
16161            }
16162        }
16163        /** Self-contained, `'static` owned view of a `SearchResult` message.
16164
16165 Wraps [`::buffa::OwnedView`]`<`[`SearchResultView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
16166
16167 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`SearchResultView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
16168        #[derive(Clone, Debug)]
16169        pub struct SearchResultOwnedView(::buffa::OwnedView<SearchResultView<'static>>);
16170        impl SearchResultOwnedView {
16171            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
16172            ///
16173            /// The view borrows directly from the buffer's data; the buffer is
16174            /// retained inside the returned handle.
16175            ///
16176            /// # Errors
16177            ///
16178            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
16179            /// protobuf data.
16180            pub fn decode(
16181                bytes: ::buffa::bytes::Bytes,
16182            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16183                ::core::result::Result::Ok(
16184                    SearchResultOwnedView(::buffa::OwnedView::decode(bytes)?),
16185                )
16186            }
16187            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
16188            /// max message size).
16189            ///
16190            /// # Errors
16191            ///
16192            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
16193            /// exceeds the configured limits.
16194            pub fn decode_with_options(
16195                bytes: ::buffa::bytes::Bytes,
16196                opts: &::buffa::DecodeOptions,
16197            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16198                ::core::result::Result::Ok(
16199                    SearchResultOwnedView(
16200                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
16201                    ),
16202                )
16203            }
16204            /// Build from an owned message via an encode → decode round-trip.
16205            ///
16206            /// # Errors
16207            ///
16208            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
16209            /// somehow invalid (should not happen for well-formed messages).
16210            pub fn from_owned(
16211                msg: &super::super::SearchResult,
16212            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16213                ::core::result::Result::Ok(
16214                    SearchResultOwnedView(::buffa::OwnedView::from_owned(msg)?),
16215                )
16216            }
16217            /// Borrow the full [`SearchResultView`] with its lifetime tied to `&self`.
16218            #[must_use]
16219            pub fn view(&self) -> &SearchResultView<'_> {
16220                self.0.reborrow()
16221            }
16222            /// Convert to the owned message type.
16223            #[must_use]
16224            pub fn to_owned_message(&self) -> super::super::SearchResult {
16225                self.0.to_owned_message()
16226            }
16227            /// The underlying bytes buffer.
16228            #[must_use]
16229            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
16230                self.0.bytes()
16231            }
16232            /// Consume the handle, returning the underlying bytes buffer.
16233            #[must_use]
16234            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
16235                self.0.into_bytes()
16236            }
16237            /// Field 1: `name`
16238            #[must_use]
16239            pub fn name(&self) -> &'_ str {
16240                self.0.reborrow().name
16241            }
16242            /// Field 2: `namespace`
16243            #[must_use]
16244            pub fn namespace(&self) -> &'_ str {
16245                self.0.reborrow().namespace
16246            }
16247            /// The matched entity's nodeId, ready to pass to `GetLineage`.
16248            ///
16249            /// Field 3: `node_id`
16250            #[must_use]
16251            pub fn node_id(&self) -> &'_ str {
16252                self.0.reborrow().node_id
16253            }
16254            /// `JOB` or `DATASET` (search does not return fields).
16255            ///
16256            /// Field 4: `type`
16257            #[must_use]
16258            pub fn r#type(&self) -> ::buffa::EnumValue<super::super::EntityKind> {
16259                self.0.reborrow().r#type
16260            }
16261            /// Field 5: `updated_at`
16262            #[must_use]
16263            pub fn updated_at(&self) -> &'_ str {
16264                self.0.reborrow().updated_at
16265            }
16266        }
16267        impl ::core::convert::From<::buffa::OwnedView<SearchResultView<'static>>>
16268        for SearchResultOwnedView {
16269            fn from(inner: ::buffa::OwnedView<SearchResultView<'static>>) -> Self {
16270                SearchResultOwnedView(inner)
16271            }
16272        }
16273        impl ::core::convert::From<SearchResultOwnedView>
16274        for ::buffa::OwnedView<SearchResultView<'static>> {
16275            fn from(wrapper: SearchResultOwnedView) -> Self {
16276                wrapper.0
16277            }
16278        }
16279        impl ::core::convert::AsRef<::buffa::OwnedView<SearchResultView<'static>>>
16280        for SearchResultOwnedView {
16281            fn as_ref(&self) -> &::buffa::OwnedView<SearchResultView<'static>> {
16282                &self.0
16283            }
16284        }
16285        impl ::buffa::HasMessageView for super::super::SearchResult {
16286            type View<'a> = SearchResultView<'a>;
16287            type ViewHandle = SearchResultOwnedView;
16288        }
16289        impl ::serde::Serialize for SearchResultOwnedView {
16290            fn serialize<__S: ::serde::Serializer>(
16291                &self,
16292                __s: __S,
16293            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16294                ::serde::Serialize::serialize(&self.0, __s)
16295            }
16296        }
16297        #[derive(Clone, Debug, Default)]
16298        pub struct SearchResponseView<'a> {
16299            /// Field 1: `total_count`
16300            pub total_count: i32,
16301            /// Field 2: `results`
16302            pub results: ::buffa::RepeatedView<
16303                'a,
16304                super::super::__buffa::view::SearchResultView<'a>,
16305            >,
16306            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
16307        }
16308        impl<'a> SearchResponseView<'a> {
16309            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
16310            ///
16311            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
16312            /// and by generated sub-message decode arms with `depth - 1`.
16313            ///
16314            /// **Not part of the public API.** Named with a leading underscore to
16315            /// signal that it is for generated-code use only.
16316            #[doc(hidden)]
16317            pub fn _decode_depth(
16318                buf: &'a [u8],
16319                depth: u32,
16320            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16321                let mut view = Self::default();
16322                view._merge_into_view(buf, depth)?;
16323                ::core::result::Result::Ok(view)
16324            }
16325            /// Merge fields from `buf` into this view (proto merge semantics).
16326            ///
16327            /// Repeated fields append; singular fields last-wins; singular
16328            /// MESSAGE fields merge recursively. Used by sub-message decode
16329            /// arms when the same field appears multiple times on the wire.
16330            ///
16331            /// **Not part of the public API.**
16332            #[doc(hidden)]
16333            pub fn _merge_into_view(
16334                &mut self,
16335                buf: &'a [u8],
16336                depth: u32,
16337            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
16338                let _ = depth;
16339                #[allow(unused_variables)]
16340                let view = self;
16341                let mut cur: &'a [u8] = buf;
16342                while !cur.is_empty() {
16343                    let before_tag = cur;
16344                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
16345                    match tag.field_number() {
16346                        1u32 => {
16347                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
16348                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
16349                                    field_number: 1u32,
16350                                    expected: 0u8,
16351                                    actual: tag.wire_type() as u8,
16352                                });
16353                            }
16354                            view.total_count = ::buffa::types::decode_int32(&mut cur)?;
16355                        }
16356                        2u32 => {
16357                            if tag.wire_type()
16358                                != ::buffa::encoding::WireType::LengthDelimited
16359                            {
16360                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
16361                                    field_number: 2u32,
16362                                    expected: 2u8,
16363                                    actual: tag.wire_type() as u8,
16364                                });
16365                            }
16366                            if depth == 0 {
16367                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
16368                            }
16369                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
16370                            view.results
16371                                .push(
16372                                    super::super::__buffa::view::SearchResultView::_decode_depth(
16373                                        sub,
16374                                        depth - 1,
16375                                    )?,
16376                                );
16377                        }
16378                        _ => {
16379                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
16380                            let span_len = before_tag.len() - cur.len();
16381                            view.__buffa_unknown_fields
16382                                .push_raw(&before_tag[..span_len]);
16383                        }
16384                    }
16385                }
16386                ::core::result::Result::Ok(())
16387            }
16388        }
16389        impl<'a> ::buffa::MessageView<'a> for SearchResponseView<'a> {
16390            type Owned = super::super::SearchResponse;
16391            fn decode_view(
16392                buf: &'a [u8],
16393            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16394                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
16395            }
16396            fn decode_view_with_limit(
16397                buf: &'a [u8],
16398                depth: u32,
16399            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16400                Self::_decode_depth(buf, depth)
16401            }
16402            fn to_owned_message(&self) -> super::super::SearchResponse {
16403                self.to_owned_from_source(None)
16404            }
16405            #[allow(clippy::useless_conversion, clippy::needless_update)]
16406            fn to_owned_from_source(
16407                &self,
16408                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
16409            ) -> super::super::SearchResponse {
16410                #[allow(unused_imports)]
16411                use ::buffa::alloc::string::ToString as _;
16412                let _ = __buffa_src;
16413                super::super::SearchResponse {
16414                    total_count: self.total_count,
16415                    results: self
16416                        .results
16417                        .iter()
16418                        .map(|v| v.to_owned_from_source(__buffa_src))
16419                        .collect(),
16420                    __buffa_unknown_fields: self
16421                        .__buffa_unknown_fields
16422                        .to_owned()
16423                        .unwrap_or_default()
16424                        .into(),
16425                    ..::core::default::Default::default()
16426                }
16427            }
16428        }
16429        impl<'a> ::buffa::ViewEncode<'a> for SearchResponseView<'a> {
16430            #[allow(clippy::needless_borrow, clippy::let_and_return)]
16431            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
16432                #[allow(unused_imports)]
16433                use ::buffa::Enumeration as _;
16434                let mut size = 0u32;
16435                if self.total_count != 0i32 {
16436                    size
16437                        += 1u32
16438                            + ::buffa::types::int32_encoded_len(self.total_count) as u32;
16439                }
16440                for v in &self.results {
16441                    let __slot = __cache.reserve();
16442                    let inner_size = v.compute_size(__cache);
16443                    __cache.set(__slot, inner_size);
16444                    size
16445                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
16446                            + inner_size;
16447                }
16448                size += self.__buffa_unknown_fields.encoded_len() as u32;
16449                size
16450            }
16451            #[allow(clippy::needless_borrow)]
16452            fn write_to(
16453                &self,
16454                __cache: &mut ::buffa::SizeCache,
16455                buf: &mut impl ::buffa::bytes::BufMut,
16456            ) {
16457                #[allow(unused_imports)]
16458                use ::buffa::Enumeration as _;
16459                if self.total_count != 0i32 {
16460                    ::buffa::encoding::Tag::new(
16461                            1u32,
16462                            ::buffa::encoding::WireType::Varint,
16463                        )
16464                        .encode(buf);
16465                    ::buffa::types::encode_int32(self.total_count, buf);
16466                }
16467                for v in &self.results {
16468                    ::buffa::encoding::Tag::new(
16469                            2u32,
16470                            ::buffa::encoding::WireType::LengthDelimited,
16471                        )
16472                        .encode(buf);
16473                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
16474                    v.write_to(__cache, buf);
16475                }
16476                self.__buffa_unknown_fields.write_to(buf);
16477            }
16478        }
16479        /// Serializes this view as protobuf JSON.
16480        ///
16481        /// Implicit-presence fields with default values are omitted, `required`
16482        /// fields are always emitted, explicit-presence (`optional`) fields are
16483        /// emitted only when set, bytes fields are base64-encoded, and enum
16484        /// values are their proto name strings.
16485        ///
16486        /// This impl uses `serialize_map(None)` because the number of emitted
16487        /// fields depends on default-omission rules; serializers that require
16488        /// known map lengths (e.g. `bincode`) will return a runtime error.
16489        /// Use the owned message type for those formats.
16490        impl<'__a> ::serde::Serialize for SearchResponseView<'__a> {
16491            fn serialize<__S: ::serde::Serializer>(
16492                &self,
16493                __s: __S,
16494            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16495                use ::serde::ser::SerializeMap as _;
16496                let mut __map = __s.serialize_map(::core::option::Option::None)?;
16497                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.total_count) {
16498                    struct _W(i32);
16499                    impl ::serde::Serialize for _W {
16500                        fn serialize<__S: ::serde::Serializer>(
16501                            &self,
16502                            __s: __S,
16503                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
16504                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
16505                        }
16506                    }
16507                    __map.serialize_entry("totalCount", &_W(self.total_count))?;
16508                }
16509                if !self.results.is_empty() {
16510                    __map.serialize_entry("results", &*self.results)?;
16511                }
16512                __map.end()
16513            }
16514        }
16515        impl<'a> ::buffa::MessageName for SearchResponseView<'a> {
16516            const PACKAGE: &'static str = "headwaters.read.v1";
16517            const NAME: &'static str = "SearchResponse";
16518            const FULL_NAME: &'static str = "headwaters.read.v1.SearchResponse";
16519            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchResponse";
16520        }
16521        impl<'v> ::buffa::DefaultViewInstance for SearchResponseView<'v> {
16522            fn default_view_instance<'a>() -> &'a Self
16523            where
16524                Self: 'a,
16525            {
16526                static VALUE: ::buffa::__private::OnceBox<SearchResponseView<'static>> = ::buffa::__private::OnceBox::new();
16527                VALUE
16528                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
16529                        <SearchResponseView<'static>>::default(),
16530                    ))
16531            }
16532        }
16533        impl ::buffa::ViewReborrow for SearchResponseView<'static> {
16534            type Reborrowed<'b> = SearchResponseView<'b>;
16535            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
16536                this
16537            }
16538        }
16539        /** Self-contained, `'static` owned view of a `SearchResponse` message.
16540
16541 Wraps [`::buffa::OwnedView`]`<`[`SearchResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
16542
16543 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`SearchResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
16544        #[derive(Clone, Debug)]
16545        pub struct SearchResponseOwnedView(
16546            ::buffa::OwnedView<SearchResponseView<'static>>,
16547        );
16548        impl SearchResponseOwnedView {
16549            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
16550            ///
16551            /// The view borrows directly from the buffer's data; the buffer is
16552            /// retained inside the returned handle.
16553            ///
16554            /// # Errors
16555            ///
16556            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
16557            /// protobuf data.
16558            pub fn decode(
16559                bytes: ::buffa::bytes::Bytes,
16560            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16561                ::core::result::Result::Ok(
16562                    SearchResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
16563                )
16564            }
16565            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
16566            /// max message size).
16567            ///
16568            /// # Errors
16569            ///
16570            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
16571            /// exceeds the configured limits.
16572            pub fn decode_with_options(
16573                bytes: ::buffa::bytes::Bytes,
16574                opts: &::buffa::DecodeOptions,
16575            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16576                ::core::result::Result::Ok(
16577                    SearchResponseOwnedView(
16578                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
16579                    ),
16580                )
16581            }
16582            /// Build from an owned message via an encode → decode round-trip.
16583            ///
16584            /// # Errors
16585            ///
16586            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
16587            /// somehow invalid (should not happen for well-formed messages).
16588            pub fn from_owned(
16589                msg: &super::super::SearchResponse,
16590            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16591                ::core::result::Result::Ok(
16592                    SearchResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
16593                )
16594            }
16595            /// Borrow the full [`SearchResponseView`] with its lifetime tied to `&self`.
16596            #[must_use]
16597            pub fn view(&self) -> &SearchResponseView<'_> {
16598                self.0.reborrow()
16599            }
16600            /// Convert to the owned message type.
16601            #[must_use]
16602            pub fn to_owned_message(&self) -> super::super::SearchResponse {
16603                self.0.to_owned_message()
16604            }
16605            /// The underlying bytes buffer.
16606            #[must_use]
16607            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
16608                self.0.bytes()
16609            }
16610            /// Consume the handle, returning the underlying bytes buffer.
16611            #[must_use]
16612            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
16613                self.0.into_bytes()
16614            }
16615            /// Field 1: `total_count`
16616            #[must_use]
16617            pub fn total_count(&self) -> i32 {
16618                self.0.reborrow().total_count
16619            }
16620            /// Field 2: `results`
16621            #[must_use]
16622            pub fn results(
16623                &self,
16624            ) -> &::buffa::RepeatedView<
16625                '_,
16626                super::super::__buffa::view::SearchResultView<'_>,
16627            > {
16628                &self.0.reborrow().results
16629            }
16630        }
16631        impl ::core::convert::From<::buffa::OwnedView<SearchResponseView<'static>>>
16632        for SearchResponseOwnedView {
16633            fn from(inner: ::buffa::OwnedView<SearchResponseView<'static>>) -> Self {
16634                SearchResponseOwnedView(inner)
16635            }
16636        }
16637        impl ::core::convert::From<SearchResponseOwnedView>
16638        for ::buffa::OwnedView<SearchResponseView<'static>> {
16639            fn from(wrapper: SearchResponseOwnedView) -> Self {
16640                wrapper.0
16641            }
16642        }
16643        impl ::core::convert::AsRef<::buffa::OwnedView<SearchResponseView<'static>>>
16644        for SearchResponseOwnedView {
16645            fn as_ref(&self) -> &::buffa::OwnedView<SearchResponseView<'static>> {
16646                &self.0
16647            }
16648        }
16649        impl ::buffa::HasMessageView for super::super::SearchResponse {
16650            type View<'a> = SearchResponseView<'a>;
16651            type ViewHandle = SearchResponseOwnedView;
16652        }
16653        impl ::serde::Serialize for SearchResponseOwnedView {
16654            fn serialize<__S: ::serde::Serializer>(
16655                &self,
16656                __s: __S,
16657            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16658                ::serde::Serialize::serialize(&self.0, __s)
16659            }
16660        }
16661        /// --- events feed ---
16662        ///
16663        /// The raw OpenLineage events feed, newest first.
16664        #[derive(Clone, Debug, Default)]
16665        pub struct ListEventsResponseView<'a> {
16666            /// Each entry is one OpenLineage event, as the original ingested JSON.
16667            ///
16668            /// Field 1: `events`
16669            pub events: ::buffa::RepeatedView<
16670                'a,
16671                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
16672            >,
16673            /// Field 2: `total_count`
16674            pub total_count: i32,
16675            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
16676        }
16677        impl<'a> ListEventsResponseView<'a> {
16678            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
16679            ///
16680            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
16681            /// and by generated sub-message decode arms with `depth - 1`.
16682            ///
16683            /// **Not part of the public API.** Named with a leading underscore to
16684            /// signal that it is for generated-code use only.
16685            #[doc(hidden)]
16686            pub fn _decode_depth(
16687                buf: &'a [u8],
16688                depth: u32,
16689            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16690                let mut view = Self::default();
16691                view._merge_into_view(buf, depth)?;
16692                ::core::result::Result::Ok(view)
16693            }
16694            /// Merge fields from `buf` into this view (proto merge semantics).
16695            ///
16696            /// Repeated fields append; singular fields last-wins; singular
16697            /// MESSAGE fields merge recursively. Used by sub-message decode
16698            /// arms when the same field appears multiple times on the wire.
16699            ///
16700            /// **Not part of the public API.**
16701            #[doc(hidden)]
16702            pub fn _merge_into_view(
16703                &mut self,
16704                buf: &'a [u8],
16705                depth: u32,
16706            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
16707                let _ = depth;
16708                #[allow(unused_variables)]
16709                let view = self;
16710                let mut cur: &'a [u8] = buf;
16711                while !cur.is_empty() {
16712                    let before_tag = cur;
16713                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
16714                    match tag.field_number() {
16715                        2u32 => {
16716                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
16717                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
16718                                    field_number: 2u32,
16719                                    expected: 0u8,
16720                                    actual: tag.wire_type() as u8,
16721                                });
16722                            }
16723                            view.total_count = ::buffa::types::decode_int32(&mut cur)?;
16724                        }
16725                        1u32 => {
16726                            if tag.wire_type()
16727                                != ::buffa::encoding::WireType::LengthDelimited
16728                            {
16729                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
16730                                    field_number: 1u32,
16731                                    expected: 2u8,
16732                                    actual: tag.wire_type() as u8,
16733                                });
16734                            }
16735                            if depth == 0 {
16736                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
16737                            }
16738                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
16739                            view.events
16740                                .push(
16741                                    ::buffa_types::google::protobuf::__buffa::view::StructView::_decode_depth(
16742                                        sub,
16743                                        depth - 1,
16744                                    )?,
16745                                );
16746                        }
16747                        _ => {
16748                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
16749                            let span_len = before_tag.len() - cur.len();
16750                            view.__buffa_unknown_fields
16751                                .push_raw(&before_tag[..span_len]);
16752                        }
16753                    }
16754                }
16755                ::core::result::Result::Ok(())
16756            }
16757        }
16758        impl<'a> ::buffa::MessageView<'a> for ListEventsResponseView<'a> {
16759            type Owned = super::super::ListEventsResponse;
16760            fn decode_view(
16761                buf: &'a [u8],
16762            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16763                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
16764            }
16765            fn decode_view_with_limit(
16766                buf: &'a [u8],
16767                depth: u32,
16768            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16769                Self::_decode_depth(buf, depth)
16770            }
16771            fn to_owned_message(&self) -> super::super::ListEventsResponse {
16772                self.to_owned_from_source(None)
16773            }
16774            #[allow(clippy::useless_conversion, clippy::needless_update)]
16775            fn to_owned_from_source(
16776                &self,
16777                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
16778            ) -> super::super::ListEventsResponse {
16779                #[allow(unused_imports)]
16780                use ::buffa::alloc::string::ToString as _;
16781                let _ = __buffa_src;
16782                super::super::ListEventsResponse {
16783                    events: self
16784                        .events
16785                        .iter()
16786                        .map(|v| v.to_owned_from_source(__buffa_src))
16787                        .collect(),
16788                    total_count: self.total_count,
16789                    __buffa_unknown_fields: self
16790                        .__buffa_unknown_fields
16791                        .to_owned()
16792                        .unwrap_or_default()
16793                        .into(),
16794                    ..::core::default::Default::default()
16795                }
16796            }
16797        }
16798        impl<'a> ::buffa::ViewEncode<'a> for ListEventsResponseView<'a> {
16799            #[allow(clippy::needless_borrow, clippy::let_and_return)]
16800            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
16801                #[allow(unused_imports)]
16802                use ::buffa::Enumeration as _;
16803                let mut size = 0u32;
16804                for v in &self.events {
16805                    let __slot = __cache.reserve();
16806                    let inner_size = v.compute_size(__cache);
16807                    __cache.set(__slot, inner_size);
16808                    size
16809                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
16810                            + inner_size;
16811                }
16812                if self.total_count != 0i32 {
16813                    size
16814                        += 1u32
16815                            + ::buffa::types::int32_encoded_len(self.total_count) as u32;
16816                }
16817                size += self.__buffa_unknown_fields.encoded_len() as u32;
16818                size
16819            }
16820            #[allow(clippy::needless_borrow)]
16821            fn write_to(
16822                &self,
16823                __cache: &mut ::buffa::SizeCache,
16824                buf: &mut impl ::buffa::bytes::BufMut,
16825            ) {
16826                #[allow(unused_imports)]
16827                use ::buffa::Enumeration as _;
16828                for v in &self.events {
16829                    ::buffa::encoding::Tag::new(
16830                            1u32,
16831                            ::buffa::encoding::WireType::LengthDelimited,
16832                        )
16833                        .encode(buf);
16834                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
16835                    v.write_to(__cache, buf);
16836                }
16837                if self.total_count != 0i32 {
16838                    ::buffa::encoding::Tag::new(
16839                            2u32,
16840                            ::buffa::encoding::WireType::Varint,
16841                        )
16842                        .encode(buf);
16843                    ::buffa::types::encode_int32(self.total_count, buf);
16844                }
16845                self.__buffa_unknown_fields.write_to(buf);
16846            }
16847        }
16848        /// Serializes this view as protobuf JSON.
16849        ///
16850        /// Implicit-presence fields with default values are omitted, `required`
16851        /// fields are always emitted, explicit-presence (`optional`) fields are
16852        /// emitted only when set, bytes fields are base64-encoded, and enum
16853        /// values are their proto name strings.
16854        ///
16855        /// This impl uses `serialize_map(None)` because the number of emitted
16856        /// fields depends on default-omission rules; serializers that require
16857        /// known map lengths (e.g. `bincode`) will return a runtime error.
16858        /// Use the owned message type for those formats.
16859        impl<'__a> ::serde::Serialize for ListEventsResponseView<'__a> {
16860            fn serialize<__S: ::serde::Serializer>(
16861                &self,
16862                __s: __S,
16863            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16864                use ::serde::ser::SerializeMap as _;
16865                let mut __map = __s.serialize_map(::core::option::Option::None)?;
16866                if !self.events.is_empty() {
16867                    __map.serialize_entry("events", &*self.events)?;
16868                }
16869                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.total_count) {
16870                    struct _W(i32);
16871                    impl ::serde::Serialize for _W {
16872                        fn serialize<__S: ::serde::Serializer>(
16873                            &self,
16874                            __s: __S,
16875                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
16876                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
16877                        }
16878                    }
16879                    __map.serialize_entry("totalCount", &_W(self.total_count))?;
16880                }
16881                __map.end()
16882            }
16883        }
16884        impl<'a> ::buffa::MessageName for ListEventsResponseView<'a> {
16885            const PACKAGE: &'static str = "headwaters.read.v1";
16886            const NAME: &'static str = "ListEventsResponse";
16887            const FULL_NAME: &'static str = "headwaters.read.v1.ListEventsResponse";
16888            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListEventsResponse";
16889        }
16890        impl<'v> ::buffa::DefaultViewInstance for ListEventsResponseView<'v> {
16891            fn default_view_instance<'a>() -> &'a Self
16892            where
16893                Self: 'a,
16894            {
16895                static VALUE: ::buffa::__private::OnceBox<
16896                    ListEventsResponseView<'static>,
16897                > = ::buffa::__private::OnceBox::new();
16898                VALUE
16899                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
16900                        <ListEventsResponseView<'static>>::default(),
16901                    ))
16902            }
16903        }
16904        impl ::buffa::ViewReborrow for ListEventsResponseView<'static> {
16905            type Reborrowed<'b> = ListEventsResponseView<'b>;
16906            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
16907                this
16908            }
16909        }
16910        /** Self-contained, `'static` owned view of a `ListEventsResponse` message.
16911
16912 Wraps [`::buffa::OwnedView`]`<`[`ListEventsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
16913
16914 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListEventsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
16915        #[derive(Clone, Debug)]
16916        pub struct ListEventsResponseOwnedView(
16917            ::buffa::OwnedView<ListEventsResponseView<'static>>,
16918        );
16919        impl ListEventsResponseOwnedView {
16920            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
16921            ///
16922            /// The view borrows directly from the buffer's data; the buffer is
16923            /// retained inside the returned handle.
16924            ///
16925            /// # Errors
16926            ///
16927            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
16928            /// protobuf data.
16929            pub fn decode(
16930                bytes: ::buffa::bytes::Bytes,
16931            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16932                ::core::result::Result::Ok(
16933                    ListEventsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
16934                )
16935            }
16936            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
16937            /// max message size).
16938            ///
16939            /// # Errors
16940            ///
16941            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
16942            /// exceeds the configured limits.
16943            pub fn decode_with_options(
16944                bytes: ::buffa::bytes::Bytes,
16945                opts: &::buffa::DecodeOptions,
16946            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16947                ::core::result::Result::Ok(
16948                    ListEventsResponseOwnedView(
16949                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
16950                    ),
16951                )
16952            }
16953            /// Build from an owned message via an encode → decode round-trip.
16954            ///
16955            /// # Errors
16956            ///
16957            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
16958            /// somehow invalid (should not happen for well-formed messages).
16959            pub fn from_owned(
16960                msg: &super::super::ListEventsResponse,
16961            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16962                ::core::result::Result::Ok(
16963                    ListEventsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
16964                )
16965            }
16966            /// Borrow the full [`ListEventsResponseView`] with its lifetime tied to `&self`.
16967            #[must_use]
16968            pub fn view(&self) -> &ListEventsResponseView<'_> {
16969                self.0.reborrow()
16970            }
16971            /// Convert to the owned message type.
16972            #[must_use]
16973            pub fn to_owned_message(&self) -> super::super::ListEventsResponse {
16974                self.0.to_owned_message()
16975            }
16976            /// The underlying bytes buffer.
16977            #[must_use]
16978            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
16979                self.0.bytes()
16980            }
16981            /// Consume the handle, returning the underlying bytes buffer.
16982            #[must_use]
16983            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
16984                self.0.into_bytes()
16985            }
16986            /// Each entry is one OpenLineage event, as the original ingested JSON.
16987            ///
16988            /// Field 1: `events`
16989            #[must_use]
16990            pub fn events(
16991                &self,
16992            ) -> &::buffa::RepeatedView<
16993                '_,
16994                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
16995            > {
16996                &self.0.reborrow().events
16997            }
16998            /// Field 2: `total_count`
16999            #[must_use]
17000            pub fn total_count(&self) -> i32 {
17001                self.0.reborrow().total_count
17002            }
17003        }
17004        impl ::core::convert::From<::buffa::OwnedView<ListEventsResponseView<'static>>>
17005        for ListEventsResponseOwnedView {
17006            fn from(inner: ::buffa::OwnedView<ListEventsResponseView<'static>>) -> Self {
17007                ListEventsResponseOwnedView(inner)
17008            }
17009        }
17010        impl ::core::convert::From<ListEventsResponseOwnedView>
17011        for ::buffa::OwnedView<ListEventsResponseView<'static>> {
17012            fn from(wrapper: ListEventsResponseOwnedView) -> Self {
17013                wrapper.0
17014            }
17015        }
17016        impl ::core::convert::AsRef<::buffa::OwnedView<ListEventsResponseView<'static>>>
17017        for ListEventsResponseOwnedView {
17018            fn as_ref(&self) -> &::buffa::OwnedView<ListEventsResponseView<'static>> {
17019                &self.0
17020            }
17021        }
17022        impl ::buffa::HasMessageView for super::super::ListEventsResponse {
17023            type View<'a> = ListEventsResponseView<'a>;
17024            type ViewHandle = ListEventsResponseOwnedView;
17025        }
17026        impl ::serde::Serialize for ListEventsResponseOwnedView {
17027            fn serialize<__S: ::serde::Serializer>(
17028                &self,
17029                __s: __S,
17030            ) -> ::core::result::Result<__S::Ok, __S::Error> {
17031                ::serde::Serialize::serialize(&self.0, __s)
17032            }
17033        }
17034        /// --- run facets ---
17035        ///
17036        /// The merged facets observed across all of a run's events. Returned by
17037        /// `GetRunFacets`.
17038        #[derive(Clone, Debug, Default)]
17039        pub struct RunFacetsResponseView<'a> {
17040            /// Field 1: `run_id`
17041            pub run_id: &'a str,
17042            /// Run facets keyed by facet name (e.g. `nominalTime`, `parent`,
17043            /// `errorMessage`); each carries `_producer` / `_schemaURL`.
17044            ///
17045            /// Field 2: `facets`
17046            pub facets: ::buffa::MessageFieldView<
17047                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
17048            >,
17049            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
17050        }
17051        impl<'a> RunFacetsResponseView<'a> {
17052            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
17053            ///
17054            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
17055            /// and by generated sub-message decode arms with `depth - 1`.
17056            ///
17057            /// **Not part of the public API.** Named with a leading underscore to
17058            /// signal that it is for generated-code use only.
17059            #[doc(hidden)]
17060            pub fn _decode_depth(
17061                buf: &'a [u8],
17062                depth: u32,
17063            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17064                let mut view = Self::default();
17065                view._merge_into_view(buf, depth)?;
17066                ::core::result::Result::Ok(view)
17067            }
17068            /// Merge fields from `buf` into this view (proto merge semantics).
17069            ///
17070            /// Repeated fields append; singular fields last-wins; singular
17071            /// MESSAGE fields merge recursively. Used by sub-message decode
17072            /// arms when the same field appears multiple times on the wire.
17073            ///
17074            /// **Not part of the public API.**
17075            #[doc(hidden)]
17076            pub fn _merge_into_view(
17077                &mut self,
17078                buf: &'a [u8],
17079                depth: u32,
17080            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
17081                let _ = depth;
17082                #[allow(unused_variables)]
17083                let view = self;
17084                let mut cur: &'a [u8] = buf;
17085                while !cur.is_empty() {
17086                    let before_tag = cur;
17087                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
17088                    match tag.field_number() {
17089                        1u32 => {
17090                            if tag.wire_type()
17091                                != ::buffa::encoding::WireType::LengthDelimited
17092                            {
17093                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17094                                    field_number: 1u32,
17095                                    expected: 2u8,
17096                                    actual: tag.wire_type() as u8,
17097                                });
17098                            }
17099                            view.run_id = ::buffa::types::borrow_str(&mut cur)?;
17100                        }
17101                        2u32 => {
17102                            if tag.wire_type()
17103                                != ::buffa::encoding::WireType::LengthDelimited
17104                            {
17105                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17106                                    field_number: 2u32,
17107                                    expected: 2u8,
17108                                    actual: tag.wire_type() as u8,
17109                                });
17110                            }
17111                            if depth == 0 {
17112                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
17113                            }
17114                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
17115                            match view.facets.as_mut() {
17116                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
17117                                None => {
17118                                    view.facets = ::buffa::MessageFieldView::set(
17119                                        ::buffa_types::google::protobuf::__buffa::view::StructView::_decode_depth(
17120                                            sub,
17121                                            depth - 1,
17122                                        )?,
17123                                    );
17124                                }
17125                            }
17126                        }
17127                        _ => {
17128                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
17129                            let span_len = before_tag.len() - cur.len();
17130                            view.__buffa_unknown_fields
17131                                .push_raw(&before_tag[..span_len]);
17132                        }
17133                    }
17134                }
17135                ::core::result::Result::Ok(())
17136            }
17137        }
17138        impl<'a> ::buffa::MessageView<'a> for RunFacetsResponseView<'a> {
17139            type Owned = super::super::RunFacetsResponse;
17140            fn decode_view(
17141                buf: &'a [u8],
17142            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17143                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
17144            }
17145            fn decode_view_with_limit(
17146                buf: &'a [u8],
17147                depth: u32,
17148            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17149                Self::_decode_depth(buf, depth)
17150            }
17151            fn to_owned_message(&self) -> super::super::RunFacetsResponse {
17152                self.to_owned_from_source(None)
17153            }
17154            #[allow(clippy::useless_conversion, clippy::needless_update)]
17155            fn to_owned_from_source(
17156                &self,
17157                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
17158            ) -> super::super::RunFacetsResponse {
17159                #[allow(unused_imports)]
17160                use ::buffa::alloc::string::ToString as _;
17161                let _ = __buffa_src;
17162                super::super::RunFacetsResponse {
17163                    run_id: self.run_id.to_string(),
17164                    facets: match self.facets.as_option() {
17165                        Some(v) => {
17166                            ::buffa::MessageField::<
17167                                ::buffa_types::google::protobuf::Struct,
17168                            >::some(v.to_owned_from_source(__buffa_src))
17169                        }
17170                        None => ::buffa::MessageField::none(),
17171                    },
17172                    __buffa_unknown_fields: self
17173                        .__buffa_unknown_fields
17174                        .to_owned()
17175                        .unwrap_or_default()
17176                        .into(),
17177                    ..::core::default::Default::default()
17178                }
17179            }
17180        }
17181        impl<'a> ::buffa::ViewEncode<'a> for RunFacetsResponseView<'a> {
17182            #[allow(clippy::needless_borrow, clippy::let_and_return)]
17183            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
17184                #[allow(unused_imports)]
17185                use ::buffa::Enumeration as _;
17186                let mut size = 0u32;
17187                if !self.run_id.is_empty() {
17188                    size
17189                        += 1u32
17190                            + ::buffa::types::string_encoded_len(&self.run_id) as u32;
17191                }
17192                if self.facets.is_set() {
17193                    let __slot = __cache.reserve();
17194                    let inner_size = self.facets.compute_size(__cache);
17195                    __cache.set(__slot, inner_size);
17196                    size
17197                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
17198                            + inner_size;
17199                }
17200                size += self.__buffa_unknown_fields.encoded_len() as u32;
17201                size
17202            }
17203            #[allow(clippy::needless_borrow)]
17204            fn write_to(
17205                &self,
17206                __cache: &mut ::buffa::SizeCache,
17207                buf: &mut impl ::buffa::bytes::BufMut,
17208            ) {
17209                #[allow(unused_imports)]
17210                use ::buffa::Enumeration as _;
17211                if !self.run_id.is_empty() {
17212                    ::buffa::encoding::Tag::new(
17213                            1u32,
17214                            ::buffa::encoding::WireType::LengthDelimited,
17215                        )
17216                        .encode(buf);
17217                    ::buffa::types::encode_string(&self.run_id, buf);
17218                }
17219                if self.facets.is_set() {
17220                    ::buffa::encoding::Tag::new(
17221                            2u32,
17222                            ::buffa::encoding::WireType::LengthDelimited,
17223                        )
17224                        .encode(buf);
17225                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
17226                    self.facets.write_to(__cache, buf);
17227                }
17228                self.__buffa_unknown_fields.write_to(buf);
17229            }
17230        }
17231        /// Serializes this view as protobuf JSON.
17232        ///
17233        /// Implicit-presence fields with default values are omitted, `required`
17234        /// fields are always emitted, explicit-presence (`optional`) fields are
17235        /// emitted only when set, bytes fields are base64-encoded, and enum
17236        /// values are their proto name strings.
17237        ///
17238        /// This impl uses `serialize_map(None)` because the number of emitted
17239        /// fields depends on default-omission rules; serializers that require
17240        /// known map lengths (e.g. `bincode`) will return a runtime error.
17241        /// Use the owned message type for those formats.
17242        impl<'__a> ::serde::Serialize for RunFacetsResponseView<'__a> {
17243            fn serialize<__S: ::serde::Serializer>(
17244                &self,
17245                __s: __S,
17246            ) -> ::core::result::Result<__S::Ok, __S::Error> {
17247                use ::serde::ser::SerializeMap as _;
17248                let mut __map = __s.serialize_map(::core::option::Option::None)?;
17249                if !::buffa::json_helpers::skip_if::is_empty_str(self.run_id) {
17250                    __map.serialize_entry("runId", self.run_id)?;
17251                }
17252                {
17253                    if let ::core::option::Option::Some(__v) = self.facets.as_option() {
17254                        __map.serialize_entry("facets", __v)?;
17255                    }
17256                }
17257                __map.end()
17258            }
17259        }
17260        impl<'a> ::buffa::MessageName for RunFacetsResponseView<'a> {
17261            const PACKAGE: &'static str = "headwaters.read.v1";
17262            const NAME: &'static str = "RunFacetsResponse";
17263            const FULL_NAME: &'static str = "headwaters.read.v1.RunFacetsResponse";
17264            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.RunFacetsResponse";
17265        }
17266        impl<'v> ::buffa::DefaultViewInstance for RunFacetsResponseView<'v> {
17267            fn default_view_instance<'a>() -> &'a Self
17268            where
17269                Self: 'a,
17270            {
17271                static VALUE: ::buffa::__private::OnceBox<
17272                    RunFacetsResponseView<'static>,
17273                > = ::buffa::__private::OnceBox::new();
17274                VALUE
17275                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
17276                        <RunFacetsResponseView<'static>>::default(),
17277                    ))
17278            }
17279        }
17280        impl ::buffa::ViewReborrow for RunFacetsResponseView<'static> {
17281            type Reborrowed<'b> = RunFacetsResponseView<'b>;
17282            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
17283                this
17284            }
17285        }
17286        /** Self-contained, `'static` owned view of a `RunFacetsResponse` message.
17287
17288 Wraps [`::buffa::OwnedView`]`<`[`RunFacetsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
17289
17290 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`RunFacetsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
17291        #[derive(Clone, Debug)]
17292        pub struct RunFacetsResponseOwnedView(
17293            ::buffa::OwnedView<RunFacetsResponseView<'static>>,
17294        );
17295        impl RunFacetsResponseOwnedView {
17296            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
17297            ///
17298            /// The view borrows directly from the buffer's data; the buffer is
17299            /// retained inside the returned handle.
17300            ///
17301            /// # Errors
17302            ///
17303            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
17304            /// protobuf data.
17305            pub fn decode(
17306                bytes: ::buffa::bytes::Bytes,
17307            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17308                ::core::result::Result::Ok(
17309                    RunFacetsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
17310                )
17311            }
17312            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
17313            /// max message size).
17314            ///
17315            /// # Errors
17316            ///
17317            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
17318            /// exceeds the configured limits.
17319            pub fn decode_with_options(
17320                bytes: ::buffa::bytes::Bytes,
17321                opts: &::buffa::DecodeOptions,
17322            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17323                ::core::result::Result::Ok(
17324                    RunFacetsResponseOwnedView(
17325                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
17326                    ),
17327                )
17328            }
17329            /// Build from an owned message via an encode → decode round-trip.
17330            ///
17331            /// # Errors
17332            ///
17333            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
17334            /// somehow invalid (should not happen for well-formed messages).
17335            pub fn from_owned(
17336                msg: &super::super::RunFacetsResponse,
17337            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17338                ::core::result::Result::Ok(
17339                    RunFacetsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
17340                )
17341            }
17342            /// Borrow the full [`RunFacetsResponseView`] with its lifetime tied to `&self`.
17343            #[must_use]
17344            pub fn view(&self) -> &RunFacetsResponseView<'_> {
17345                self.0.reborrow()
17346            }
17347            /// Convert to the owned message type.
17348            #[must_use]
17349            pub fn to_owned_message(&self) -> super::super::RunFacetsResponse {
17350                self.0.to_owned_message()
17351            }
17352            /// The underlying bytes buffer.
17353            #[must_use]
17354            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
17355                self.0.bytes()
17356            }
17357            /// Consume the handle, returning the underlying bytes buffer.
17358            #[must_use]
17359            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
17360                self.0.into_bytes()
17361            }
17362            /// Field 1: `run_id`
17363            #[must_use]
17364            pub fn run_id(&self) -> &'_ str {
17365                self.0.reborrow().run_id
17366            }
17367            /// Run facets keyed by facet name (e.g. `nominalTime`, `parent`,
17368            /// `errorMessage`); each carries `_producer` / `_schemaURL`.
17369            ///
17370            /// Field 2: `facets`
17371            #[must_use]
17372            pub fn facets(
17373                &self,
17374            ) -> &::buffa::MessageFieldView<
17375                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
17376            > {
17377                &self.0.reborrow().facets
17378            }
17379        }
17380        impl ::core::convert::From<::buffa::OwnedView<RunFacetsResponseView<'static>>>
17381        for RunFacetsResponseOwnedView {
17382            fn from(inner: ::buffa::OwnedView<RunFacetsResponseView<'static>>) -> Self {
17383                RunFacetsResponseOwnedView(inner)
17384            }
17385        }
17386        impl ::core::convert::From<RunFacetsResponseOwnedView>
17387        for ::buffa::OwnedView<RunFacetsResponseView<'static>> {
17388            fn from(wrapper: RunFacetsResponseOwnedView) -> Self {
17389                wrapper.0
17390            }
17391        }
17392        impl ::core::convert::AsRef<::buffa::OwnedView<RunFacetsResponseView<'static>>>
17393        for RunFacetsResponseOwnedView {
17394            fn as_ref(&self) -> &::buffa::OwnedView<RunFacetsResponseView<'static>> {
17395                &self.0
17396            }
17397        }
17398        impl ::buffa::HasMessageView for super::super::RunFacetsResponse {
17399            type View<'a> = RunFacetsResponseView<'a>;
17400            type ViewHandle = RunFacetsResponseOwnedView;
17401        }
17402        impl ::serde::Serialize for RunFacetsResponseOwnedView {
17403            fn serialize<__S: ::serde::Serializer>(
17404                &self,
17405                __s: __S,
17406            ) -> ::core::result::Result<__S::Ok, __S::Error> {
17407                ::serde::Serialize::serialize(&self.0, __s)
17408            }
17409        }
17410        /// --- lineage / column-lineage graph ---
17411        ///
17412        /// A directed edge `origin → destination`, where each endpoint is a nodeId. Data
17413        /// flows from `origin` to `destination`.
17414        #[derive(Clone, Debug, Default)]
17415        pub struct LineageEdgeView<'a> {
17416            /// Field 1: `origin`
17417            pub origin: &'a str,
17418            /// Field 2: `destination`
17419            pub destination: &'a str,
17420            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
17421        }
17422        impl<'a> LineageEdgeView<'a> {
17423            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
17424            ///
17425            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
17426            /// and by generated sub-message decode arms with `depth - 1`.
17427            ///
17428            /// **Not part of the public API.** Named with a leading underscore to
17429            /// signal that it is for generated-code use only.
17430            #[doc(hidden)]
17431            pub fn _decode_depth(
17432                buf: &'a [u8],
17433                depth: u32,
17434            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17435                let mut view = Self::default();
17436                view._merge_into_view(buf, depth)?;
17437                ::core::result::Result::Ok(view)
17438            }
17439            /// Merge fields from `buf` into this view (proto merge semantics).
17440            ///
17441            /// Repeated fields append; singular fields last-wins; singular
17442            /// MESSAGE fields merge recursively. Used by sub-message decode
17443            /// arms when the same field appears multiple times on the wire.
17444            ///
17445            /// **Not part of the public API.**
17446            #[doc(hidden)]
17447            pub fn _merge_into_view(
17448                &mut self,
17449                buf: &'a [u8],
17450                depth: u32,
17451            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
17452                let _ = depth;
17453                #[allow(unused_variables)]
17454                let view = self;
17455                let mut cur: &'a [u8] = buf;
17456                while !cur.is_empty() {
17457                    let before_tag = cur;
17458                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
17459                    match tag.field_number() {
17460                        1u32 => {
17461                            if tag.wire_type()
17462                                != ::buffa::encoding::WireType::LengthDelimited
17463                            {
17464                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17465                                    field_number: 1u32,
17466                                    expected: 2u8,
17467                                    actual: tag.wire_type() as u8,
17468                                });
17469                            }
17470                            view.origin = ::buffa::types::borrow_str(&mut cur)?;
17471                        }
17472                        2u32 => {
17473                            if tag.wire_type()
17474                                != ::buffa::encoding::WireType::LengthDelimited
17475                            {
17476                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17477                                    field_number: 2u32,
17478                                    expected: 2u8,
17479                                    actual: tag.wire_type() as u8,
17480                                });
17481                            }
17482                            view.destination = ::buffa::types::borrow_str(&mut cur)?;
17483                        }
17484                        _ => {
17485                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
17486                            let span_len = before_tag.len() - cur.len();
17487                            view.__buffa_unknown_fields
17488                                .push_raw(&before_tag[..span_len]);
17489                        }
17490                    }
17491                }
17492                ::core::result::Result::Ok(())
17493            }
17494        }
17495        impl<'a> ::buffa::MessageView<'a> for LineageEdgeView<'a> {
17496            type Owned = super::super::LineageEdge;
17497            fn decode_view(
17498                buf: &'a [u8],
17499            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17500                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
17501            }
17502            fn decode_view_with_limit(
17503                buf: &'a [u8],
17504                depth: u32,
17505            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17506                Self::_decode_depth(buf, depth)
17507            }
17508            fn to_owned_message(&self) -> super::super::LineageEdge {
17509                self.to_owned_from_source(None)
17510            }
17511            #[allow(clippy::useless_conversion, clippy::needless_update)]
17512            fn to_owned_from_source(
17513                &self,
17514                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
17515            ) -> super::super::LineageEdge {
17516                #[allow(unused_imports)]
17517                use ::buffa::alloc::string::ToString as _;
17518                let _ = __buffa_src;
17519                super::super::LineageEdge {
17520                    origin: self.origin.to_string(),
17521                    destination: self.destination.to_string(),
17522                    __buffa_unknown_fields: self
17523                        .__buffa_unknown_fields
17524                        .to_owned()
17525                        .unwrap_or_default()
17526                        .into(),
17527                    ..::core::default::Default::default()
17528                }
17529            }
17530        }
17531        impl<'a> ::buffa::ViewEncode<'a> for LineageEdgeView<'a> {
17532            #[allow(clippy::needless_borrow, clippy::let_and_return)]
17533            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
17534                #[allow(unused_imports)]
17535                use ::buffa::Enumeration as _;
17536                let mut size = 0u32;
17537                if !self.origin.is_empty() {
17538                    size
17539                        += 1u32
17540                            + ::buffa::types::string_encoded_len(&self.origin) as u32;
17541                }
17542                if !self.destination.is_empty() {
17543                    size
17544                        += 1u32
17545                            + ::buffa::types::string_encoded_len(&self.destination)
17546                                as u32;
17547                }
17548                size += self.__buffa_unknown_fields.encoded_len() as u32;
17549                size
17550            }
17551            #[allow(clippy::needless_borrow)]
17552            fn write_to(
17553                &self,
17554                _cache: &mut ::buffa::SizeCache,
17555                buf: &mut impl ::buffa::bytes::BufMut,
17556            ) {
17557                #[allow(unused_imports)]
17558                use ::buffa::Enumeration as _;
17559                if !self.origin.is_empty() {
17560                    ::buffa::encoding::Tag::new(
17561                            1u32,
17562                            ::buffa::encoding::WireType::LengthDelimited,
17563                        )
17564                        .encode(buf);
17565                    ::buffa::types::encode_string(&self.origin, buf);
17566                }
17567                if !self.destination.is_empty() {
17568                    ::buffa::encoding::Tag::new(
17569                            2u32,
17570                            ::buffa::encoding::WireType::LengthDelimited,
17571                        )
17572                        .encode(buf);
17573                    ::buffa::types::encode_string(&self.destination, buf);
17574                }
17575                self.__buffa_unknown_fields.write_to(buf);
17576            }
17577        }
17578        /// Serializes this view as protobuf JSON.
17579        ///
17580        /// Implicit-presence fields with default values are omitted, `required`
17581        /// fields are always emitted, explicit-presence (`optional`) fields are
17582        /// emitted only when set, bytes fields are base64-encoded, and enum
17583        /// values are their proto name strings.
17584        ///
17585        /// This impl uses `serialize_map(None)` because the number of emitted
17586        /// fields depends on default-omission rules; serializers that require
17587        /// known map lengths (e.g. `bincode`) will return a runtime error.
17588        /// Use the owned message type for those formats.
17589        impl<'__a> ::serde::Serialize for LineageEdgeView<'__a> {
17590            fn serialize<__S: ::serde::Serializer>(
17591                &self,
17592                __s: __S,
17593            ) -> ::core::result::Result<__S::Ok, __S::Error> {
17594                use ::serde::ser::SerializeMap as _;
17595                let mut __map = __s.serialize_map(::core::option::Option::None)?;
17596                if !::buffa::json_helpers::skip_if::is_empty_str(self.origin) {
17597                    __map.serialize_entry("origin", self.origin)?;
17598                }
17599                if !::buffa::json_helpers::skip_if::is_empty_str(self.destination) {
17600                    __map.serialize_entry("destination", self.destination)?;
17601                }
17602                __map.end()
17603            }
17604        }
17605        impl<'a> ::buffa::MessageName for LineageEdgeView<'a> {
17606            const PACKAGE: &'static str = "headwaters.read.v1";
17607            const NAME: &'static str = "LineageEdge";
17608            const FULL_NAME: &'static str = "headwaters.read.v1.LineageEdge";
17609            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageEdge";
17610        }
17611        impl<'v> ::buffa::DefaultViewInstance for LineageEdgeView<'v> {
17612            fn default_view_instance<'a>() -> &'a Self
17613            where
17614                Self: 'a,
17615            {
17616                static VALUE: ::buffa::__private::OnceBox<LineageEdgeView<'static>> = ::buffa::__private::OnceBox::new();
17617                VALUE
17618                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
17619                        <LineageEdgeView<'static>>::default(),
17620                    ))
17621            }
17622        }
17623        impl ::buffa::ViewReborrow for LineageEdgeView<'static> {
17624            type Reborrowed<'b> = LineageEdgeView<'b>;
17625            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
17626                this
17627            }
17628        }
17629        /** Self-contained, `'static` owned view of a `LineageEdge` message.
17630
17631 Wraps [`::buffa::OwnedView`]`<`[`LineageEdgeView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
17632
17633 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`LineageEdgeView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
17634        #[derive(Clone, Debug)]
17635        pub struct LineageEdgeOwnedView(::buffa::OwnedView<LineageEdgeView<'static>>);
17636        impl LineageEdgeOwnedView {
17637            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
17638            ///
17639            /// The view borrows directly from the buffer's data; the buffer is
17640            /// retained inside the returned handle.
17641            ///
17642            /// # Errors
17643            ///
17644            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
17645            /// protobuf data.
17646            pub fn decode(
17647                bytes: ::buffa::bytes::Bytes,
17648            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17649                ::core::result::Result::Ok(
17650                    LineageEdgeOwnedView(::buffa::OwnedView::decode(bytes)?),
17651                )
17652            }
17653            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
17654            /// max message size).
17655            ///
17656            /// # Errors
17657            ///
17658            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
17659            /// exceeds the configured limits.
17660            pub fn decode_with_options(
17661                bytes: ::buffa::bytes::Bytes,
17662                opts: &::buffa::DecodeOptions,
17663            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17664                ::core::result::Result::Ok(
17665                    LineageEdgeOwnedView(
17666                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
17667                    ),
17668                )
17669            }
17670            /// Build from an owned message via an encode → decode round-trip.
17671            ///
17672            /// # Errors
17673            ///
17674            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
17675            /// somehow invalid (should not happen for well-formed messages).
17676            pub fn from_owned(
17677                msg: &super::super::LineageEdge,
17678            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17679                ::core::result::Result::Ok(
17680                    LineageEdgeOwnedView(::buffa::OwnedView::from_owned(msg)?),
17681                )
17682            }
17683            /// Borrow the full [`LineageEdgeView`] with its lifetime tied to `&self`.
17684            #[must_use]
17685            pub fn view(&self) -> &LineageEdgeView<'_> {
17686                self.0.reborrow()
17687            }
17688            /// Convert to the owned message type.
17689            #[must_use]
17690            pub fn to_owned_message(&self) -> super::super::LineageEdge {
17691                self.0.to_owned_message()
17692            }
17693            /// The underlying bytes buffer.
17694            #[must_use]
17695            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
17696                self.0.bytes()
17697            }
17698            /// Consume the handle, returning the underlying bytes buffer.
17699            #[must_use]
17700            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
17701                self.0.into_bytes()
17702            }
17703            /// Field 1: `origin`
17704            #[must_use]
17705            pub fn origin(&self) -> &'_ str {
17706                self.0.reborrow().origin
17707            }
17708            /// Field 2: `destination`
17709            #[must_use]
17710            pub fn destination(&self) -> &'_ str {
17711                self.0.reborrow().destination
17712            }
17713        }
17714        impl ::core::convert::From<::buffa::OwnedView<LineageEdgeView<'static>>>
17715        for LineageEdgeOwnedView {
17716            fn from(inner: ::buffa::OwnedView<LineageEdgeView<'static>>) -> Self {
17717                LineageEdgeOwnedView(inner)
17718            }
17719        }
17720        impl ::core::convert::From<LineageEdgeOwnedView>
17721        for ::buffa::OwnedView<LineageEdgeView<'static>> {
17722            fn from(wrapper: LineageEdgeOwnedView) -> Self {
17723                wrapper.0
17724            }
17725        }
17726        impl ::core::convert::AsRef<::buffa::OwnedView<LineageEdgeView<'static>>>
17727        for LineageEdgeOwnedView {
17728            fn as_ref(&self) -> &::buffa::OwnedView<LineageEdgeView<'static>> {
17729                &self.0
17730            }
17731        }
17732        impl ::buffa::HasMessageView for super::super::LineageEdge {
17733            type View<'a> = LineageEdgeView<'a>;
17734            type ViewHandle = LineageEdgeOwnedView;
17735        }
17736        impl ::serde::Serialize for LineageEdgeOwnedView {
17737            fn serialize<__S: ::serde::Serializer>(
17738                &self,
17739                __s: __S,
17740            ) -> ::core::result::Result<__S::Ok, __S::Error> {
17741                ::serde::Serialize::serialize(&self.0, __s)
17742            }
17743        }
17744        /// One node in a lineage graph, addressed by its nodeId (`id`). `in_edges` /
17745        /// `out_edges` list the edges incident to this node (upstream and downstream
17746        /// respectively); follow them across nodes to walk the graph.
17747        #[derive(Clone, Debug, Default)]
17748        pub struct LineageNodeView<'a> {
17749            /// The nodeId: `job:<ns>:<name>`, `dataset:<ns>:<name>`, or
17750            /// `datasetField:<ns>:<name>:<field>`.
17751            ///
17752            /// Field 1: `id`
17753            pub id: &'a str,
17754            /// `JOB` / `DATASET` for `GetLineage`; `DATASET_FIELD` for `GetColumnLineage`.
17755            ///
17756            /// Field 2: `type`
17757            pub r#type: ::buffa::EnumValue<super::super::EntityKind>,
17758            /// The full `JobDetail` or `Dataset` for this node, as JSON.
17759            ///
17760            /// Field 3: `data`
17761            pub data: ::buffa::MessageFieldView<
17762                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
17763            >,
17764            /// Field 4: `in_edges`
17765            pub in_edges: ::buffa::RepeatedView<
17766                'a,
17767                super::super::__buffa::view::LineageEdgeView<'a>,
17768            >,
17769            /// Field 5: `out_edges`
17770            pub out_edges: ::buffa::RepeatedView<
17771                'a,
17772                super::super::__buffa::view::LineageEdgeView<'a>,
17773            >,
17774            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
17775        }
17776        impl<'a> LineageNodeView<'a> {
17777            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
17778            ///
17779            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
17780            /// and by generated sub-message decode arms with `depth - 1`.
17781            ///
17782            /// **Not part of the public API.** Named with a leading underscore to
17783            /// signal that it is for generated-code use only.
17784            #[doc(hidden)]
17785            pub fn _decode_depth(
17786                buf: &'a [u8],
17787                depth: u32,
17788            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17789                let mut view = Self::default();
17790                view._merge_into_view(buf, depth)?;
17791                ::core::result::Result::Ok(view)
17792            }
17793            /// Merge fields from `buf` into this view (proto merge semantics).
17794            ///
17795            /// Repeated fields append; singular fields last-wins; singular
17796            /// MESSAGE fields merge recursively. Used by sub-message decode
17797            /// arms when the same field appears multiple times on the wire.
17798            ///
17799            /// **Not part of the public API.**
17800            #[doc(hidden)]
17801            pub fn _merge_into_view(
17802                &mut self,
17803                buf: &'a [u8],
17804                depth: u32,
17805            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
17806                let _ = depth;
17807                #[allow(unused_variables)]
17808                let view = self;
17809                let mut cur: &'a [u8] = buf;
17810                while !cur.is_empty() {
17811                    let before_tag = cur;
17812                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
17813                    match tag.field_number() {
17814                        1u32 => {
17815                            if tag.wire_type()
17816                                != ::buffa::encoding::WireType::LengthDelimited
17817                            {
17818                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17819                                    field_number: 1u32,
17820                                    expected: 2u8,
17821                                    actual: tag.wire_type() as u8,
17822                                });
17823                            }
17824                            view.id = ::buffa::types::borrow_str(&mut cur)?;
17825                        }
17826                        2u32 => {
17827                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
17828                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17829                                    field_number: 2u32,
17830                                    expected: 0u8,
17831                                    actual: tag.wire_type() as u8,
17832                                });
17833                            }
17834                            view.r#type = ::buffa::EnumValue::from(
17835                                ::buffa::types::decode_int32(&mut cur)?,
17836                            );
17837                        }
17838                        3u32 => {
17839                            if tag.wire_type()
17840                                != ::buffa::encoding::WireType::LengthDelimited
17841                            {
17842                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17843                                    field_number: 3u32,
17844                                    expected: 2u8,
17845                                    actual: tag.wire_type() as u8,
17846                                });
17847                            }
17848                            if depth == 0 {
17849                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
17850                            }
17851                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
17852                            match view.data.as_mut() {
17853                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
17854                                None => {
17855                                    view.data = ::buffa::MessageFieldView::set(
17856                                        ::buffa_types::google::protobuf::__buffa::view::StructView::_decode_depth(
17857                                            sub,
17858                                            depth - 1,
17859                                        )?,
17860                                    );
17861                                }
17862                            }
17863                        }
17864                        4u32 => {
17865                            if tag.wire_type()
17866                                != ::buffa::encoding::WireType::LengthDelimited
17867                            {
17868                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17869                                    field_number: 4u32,
17870                                    expected: 2u8,
17871                                    actual: tag.wire_type() as u8,
17872                                });
17873                            }
17874                            if depth == 0 {
17875                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
17876                            }
17877                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
17878                            view.in_edges
17879                                .push(
17880                                    super::super::__buffa::view::LineageEdgeView::_decode_depth(
17881                                        sub,
17882                                        depth - 1,
17883                                    )?,
17884                                );
17885                        }
17886                        5u32 => {
17887                            if tag.wire_type()
17888                                != ::buffa::encoding::WireType::LengthDelimited
17889                            {
17890                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
17891                                    field_number: 5u32,
17892                                    expected: 2u8,
17893                                    actual: tag.wire_type() as u8,
17894                                });
17895                            }
17896                            if depth == 0 {
17897                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
17898                            }
17899                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
17900                            view.out_edges
17901                                .push(
17902                                    super::super::__buffa::view::LineageEdgeView::_decode_depth(
17903                                        sub,
17904                                        depth - 1,
17905                                    )?,
17906                                );
17907                        }
17908                        _ => {
17909                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
17910                            let span_len = before_tag.len() - cur.len();
17911                            view.__buffa_unknown_fields
17912                                .push_raw(&before_tag[..span_len]);
17913                        }
17914                    }
17915                }
17916                ::core::result::Result::Ok(())
17917            }
17918        }
17919        impl<'a> ::buffa::MessageView<'a> for LineageNodeView<'a> {
17920            type Owned = super::super::LineageNode;
17921            fn decode_view(
17922                buf: &'a [u8],
17923            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17924                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
17925            }
17926            fn decode_view_with_limit(
17927                buf: &'a [u8],
17928                depth: u32,
17929            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17930                Self::_decode_depth(buf, depth)
17931            }
17932            fn to_owned_message(&self) -> super::super::LineageNode {
17933                self.to_owned_from_source(None)
17934            }
17935            #[allow(clippy::useless_conversion, clippy::needless_update)]
17936            fn to_owned_from_source(
17937                &self,
17938                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
17939            ) -> super::super::LineageNode {
17940                #[allow(unused_imports)]
17941                use ::buffa::alloc::string::ToString as _;
17942                let _ = __buffa_src;
17943                super::super::LineageNode {
17944                    id: self.id.to_string(),
17945                    r#type: self.r#type,
17946                    data: match self.data.as_option() {
17947                        Some(v) => {
17948                            ::buffa::MessageField::<
17949                                ::buffa_types::google::protobuf::Struct,
17950                            >::some(v.to_owned_from_source(__buffa_src))
17951                        }
17952                        None => ::buffa::MessageField::none(),
17953                    },
17954                    in_edges: self
17955                        .in_edges
17956                        .iter()
17957                        .map(|v| v.to_owned_from_source(__buffa_src))
17958                        .collect(),
17959                    out_edges: self
17960                        .out_edges
17961                        .iter()
17962                        .map(|v| v.to_owned_from_source(__buffa_src))
17963                        .collect(),
17964                    __buffa_unknown_fields: self
17965                        .__buffa_unknown_fields
17966                        .to_owned()
17967                        .unwrap_or_default()
17968                        .into(),
17969                    ..::core::default::Default::default()
17970                }
17971            }
17972        }
17973        impl<'a> ::buffa::ViewEncode<'a> for LineageNodeView<'a> {
17974            #[allow(clippy::needless_borrow, clippy::let_and_return)]
17975            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
17976                #[allow(unused_imports)]
17977                use ::buffa::Enumeration as _;
17978                let mut size = 0u32;
17979                if !self.id.is_empty() {
17980                    size += 1u32 + ::buffa::types::string_encoded_len(&self.id) as u32;
17981                }
17982                {
17983                    let val = self.r#type.to_i32();
17984                    if val != 0 {
17985                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
17986                    }
17987                }
17988                if self.data.is_set() {
17989                    let __slot = __cache.reserve();
17990                    let inner_size = self.data.compute_size(__cache);
17991                    __cache.set(__slot, inner_size);
17992                    size
17993                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
17994                            + inner_size;
17995                }
17996                for v in &self.in_edges {
17997                    let __slot = __cache.reserve();
17998                    let inner_size = v.compute_size(__cache);
17999                    __cache.set(__slot, inner_size);
18000                    size
18001                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
18002                            + inner_size;
18003                }
18004                for v in &self.out_edges {
18005                    let __slot = __cache.reserve();
18006                    let inner_size = v.compute_size(__cache);
18007                    __cache.set(__slot, inner_size);
18008                    size
18009                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
18010                            + inner_size;
18011                }
18012                size += self.__buffa_unknown_fields.encoded_len() as u32;
18013                size
18014            }
18015            #[allow(clippy::needless_borrow)]
18016            fn write_to(
18017                &self,
18018                __cache: &mut ::buffa::SizeCache,
18019                buf: &mut impl ::buffa::bytes::BufMut,
18020            ) {
18021                #[allow(unused_imports)]
18022                use ::buffa::Enumeration as _;
18023                if !self.id.is_empty() {
18024                    ::buffa::encoding::Tag::new(
18025                            1u32,
18026                            ::buffa::encoding::WireType::LengthDelimited,
18027                        )
18028                        .encode(buf);
18029                    ::buffa::types::encode_string(&self.id, buf);
18030                }
18031                {
18032                    let val = self.r#type.to_i32();
18033                    if val != 0 {
18034                        ::buffa::encoding::Tag::new(
18035                                2u32,
18036                                ::buffa::encoding::WireType::Varint,
18037                            )
18038                            .encode(buf);
18039                        ::buffa::types::encode_int32(val, buf);
18040                    }
18041                }
18042                if self.data.is_set() {
18043                    ::buffa::encoding::Tag::new(
18044                            3u32,
18045                            ::buffa::encoding::WireType::LengthDelimited,
18046                        )
18047                        .encode(buf);
18048                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
18049                    self.data.write_to(__cache, buf);
18050                }
18051                for v in &self.in_edges {
18052                    ::buffa::encoding::Tag::new(
18053                            4u32,
18054                            ::buffa::encoding::WireType::LengthDelimited,
18055                        )
18056                        .encode(buf);
18057                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
18058                    v.write_to(__cache, buf);
18059                }
18060                for v in &self.out_edges {
18061                    ::buffa::encoding::Tag::new(
18062                            5u32,
18063                            ::buffa::encoding::WireType::LengthDelimited,
18064                        )
18065                        .encode(buf);
18066                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
18067                    v.write_to(__cache, buf);
18068                }
18069                self.__buffa_unknown_fields.write_to(buf);
18070            }
18071        }
18072        /// Serializes this view as protobuf JSON.
18073        ///
18074        /// Implicit-presence fields with default values are omitted, `required`
18075        /// fields are always emitted, explicit-presence (`optional`) fields are
18076        /// emitted only when set, bytes fields are base64-encoded, and enum
18077        /// values are their proto name strings.
18078        ///
18079        /// This impl uses `serialize_map(None)` because the number of emitted
18080        /// fields depends on default-omission rules; serializers that require
18081        /// known map lengths (e.g. `bincode`) will return a runtime error.
18082        /// Use the owned message type for those formats.
18083        impl<'__a> ::serde::Serialize for LineageNodeView<'__a> {
18084            fn serialize<__S: ::serde::Serializer>(
18085                &self,
18086                __s: __S,
18087            ) -> ::core::result::Result<__S::Ok, __S::Error> {
18088                use ::serde::ser::SerializeMap as _;
18089                let mut __map = __s.serialize_map(::core::option::Option::None)?;
18090                if !::buffa::json_helpers::skip_if::is_empty_str(self.id) {
18091                    __map.serialize_entry("id", self.id)?;
18092                }
18093                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.r#type) {
18094                    __map.serialize_entry("type", &self.r#type)?;
18095                }
18096                {
18097                    if let ::core::option::Option::Some(__v) = self.data.as_option() {
18098                        __map.serialize_entry("data", __v)?;
18099                    }
18100                }
18101                if !self.in_edges.is_empty() {
18102                    __map.serialize_entry("inEdges", &*self.in_edges)?;
18103                }
18104                if !self.out_edges.is_empty() {
18105                    __map.serialize_entry("outEdges", &*self.out_edges)?;
18106                }
18107                __map.end()
18108            }
18109        }
18110        impl<'a> ::buffa::MessageName for LineageNodeView<'a> {
18111            const PACKAGE: &'static str = "headwaters.read.v1";
18112            const NAME: &'static str = "LineageNode";
18113            const FULL_NAME: &'static str = "headwaters.read.v1.LineageNode";
18114            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageNode";
18115        }
18116        impl<'v> ::buffa::DefaultViewInstance for LineageNodeView<'v> {
18117            fn default_view_instance<'a>() -> &'a Self
18118            where
18119                Self: 'a,
18120            {
18121                static VALUE: ::buffa::__private::OnceBox<LineageNodeView<'static>> = ::buffa::__private::OnceBox::new();
18122                VALUE
18123                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
18124                        <LineageNodeView<'static>>::default(),
18125                    ))
18126            }
18127        }
18128        impl ::buffa::ViewReborrow for LineageNodeView<'static> {
18129            type Reborrowed<'b> = LineageNodeView<'b>;
18130            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
18131                this
18132            }
18133        }
18134        /** Self-contained, `'static` owned view of a `LineageNode` message.
18135
18136 Wraps [`::buffa::OwnedView`]`<`[`LineageNodeView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
18137
18138 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`LineageNodeView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
18139        #[derive(Clone, Debug)]
18140        pub struct LineageNodeOwnedView(::buffa::OwnedView<LineageNodeView<'static>>);
18141        impl LineageNodeOwnedView {
18142            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
18143            ///
18144            /// The view borrows directly from the buffer's data; the buffer is
18145            /// retained inside the returned handle.
18146            ///
18147            /// # Errors
18148            ///
18149            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
18150            /// protobuf data.
18151            pub fn decode(
18152                bytes: ::buffa::bytes::Bytes,
18153            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18154                ::core::result::Result::Ok(
18155                    LineageNodeOwnedView(::buffa::OwnedView::decode(bytes)?),
18156                )
18157            }
18158            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
18159            /// max message size).
18160            ///
18161            /// # Errors
18162            ///
18163            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
18164            /// exceeds the configured limits.
18165            pub fn decode_with_options(
18166                bytes: ::buffa::bytes::Bytes,
18167                opts: &::buffa::DecodeOptions,
18168            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18169                ::core::result::Result::Ok(
18170                    LineageNodeOwnedView(
18171                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
18172                    ),
18173                )
18174            }
18175            /// Build from an owned message via an encode → decode round-trip.
18176            ///
18177            /// # Errors
18178            ///
18179            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
18180            /// somehow invalid (should not happen for well-formed messages).
18181            pub fn from_owned(
18182                msg: &super::super::LineageNode,
18183            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18184                ::core::result::Result::Ok(
18185                    LineageNodeOwnedView(::buffa::OwnedView::from_owned(msg)?),
18186                )
18187            }
18188            /// Borrow the full [`LineageNodeView`] with its lifetime tied to `&self`.
18189            #[must_use]
18190            pub fn view(&self) -> &LineageNodeView<'_> {
18191                self.0.reborrow()
18192            }
18193            /// Convert to the owned message type.
18194            #[must_use]
18195            pub fn to_owned_message(&self) -> super::super::LineageNode {
18196                self.0.to_owned_message()
18197            }
18198            /// The underlying bytes buffer.
18199            #[must_use]
18200            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
18201                self.0.bytes()
18202            }
18203            /// Consume the handle, returning the underlying bytes buffer.
18204            #[must_use]
18205            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
18206                self.0.into_bytes()
18207            }
18208            /// The nodeId: `job:<ns>:<name>`, `dataset:<ns>:<name>`, or
18209            /// `datasetField:<ns>:<name>:<field>`.
18210            ///
18211            /// Field 1: `id`
18212            #[must_use]
18213            pub fn id(&self) -> &'_ str {
18214                self.0.reborrow().id
18215            }
18216            /// `JOB` / `DATASET` for `GetLineage`; `DATASET_FIELD` for `GetColumnLineage`.
18217            ///
18218            /// Field 2: `type`
18219            #[must_use]
18220            pub fn r#type(&self) -> ::buffa::EnumValue<super::super::EntityKind> {
18221                self.0.reborrow().r#type
18222            }
18223            /// The full `JobDetail` or `Dataset` for this node, as JSON.
18224            ///
18225            /// Field 3: `data`
18226            #[must_use]
18227            pub fn data(
18228                &self,
18229            ) -> &::buffa::MessageFieldView<
18230                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
18231            > {
18232                &self.0.reborrow().data
18233            }
18234            /// Field 4: `in_edges`
18235            #[must_use]
18236            pub fn in_edges(
18237                &self,
18238            ) -> &::buffa::RepeatedView<
18239                '_,
18240                super::super::__buffa::view::LineageEdgeView<'_>,
18241            > {
18242                &self.0.reborrow().in_edges
18243            }
18244            /// Field 5: `out_edges`
18245            #[must_use]
18246            pub fn out_edges(
18247                &self,
18248            ) -> &::buffa::RepeatedView<
18249                '_,
18250                super::super::__buffa::view::LineageEdgeView<'_>,
18251            > {
18252                &self.0.reborrow().out_edges
18253            }
18254        }
18255        impl ::core::convert::From<::buffa::OwnedView<LineageNodeView<'static>>>
18256        for LineageNodeOwnedView {
18257            fn from(inner: ::buffa::OwnedView<LineageNodeView<'static>>) -> Self {
18258                LineageNodeOwnedView(inner)
18259            }
18260        }
18261        impl ::core::convert::From<LineageNodeOwnedView>
18262        for ::buffa::OwnedView<LineageNodeView<'static>> {
18263            fn from(wrapper: LineageNodeOwnedView) -> Self {
18264                wrapper.0
18265            }
18266        }
18267        impl ::core::convert::AsRef<::buffa::OwnedView<LineageNodeView<'static>>>
18268        for LineageNodeOwnedView {
18269            fn as_ref(&self) -> &::buffa::OwnedView<LineageNodeView<'static>> {
18270                &self.0
18271            }
18272        }
18273        impl ::buffa::HasMessageView for super::super::LineageNode {
18274            type View<'a> = LineageNodeView<'a>;
18275            type ViewHandle = LineageNodeOwnedView;
18276        }
18277        impl ::serde::Serialize for LineageNodeOwnedView {
18278            fn serialize<__S: ::serde::Serializer>(
18279                &self,
18280                __s: __S,
18281            ) -> ::core::result::Result<__S::Ok, __S::Error> {
18282                ::serde::Serialize::serialize(&self.0, __s)
18283            }
18284        }
18285        /// A lineage graph: the set of nodes reached from the requested seed, each
18286        /// carrying its own incident edges. Returned by `GetLineage` and
18287        /// `GetColumnLineage`.
18288        #[derive(Clone, Debug, Default)]
18289        pub struct LineageGraphView<'a> {
18290            /// Field 1: `graph`
18291            pub graph: ::buffa::RepeatedView<
18292                'a,
18293                super::super::__buffa::view::LineageNodeView<'a>,
18294            >,
18295            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
18296        }
18297        impl<'a> LineageGraphView<'a> {
18298            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
18299            ///
18300            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
18301            /// and by generated sub-message decode arms with `depth - 1`.
18302            ///
18303            /// **Not part of the public API.** Named with a leading underscore to
18304            /// signal that it is for generated-code use only.
18305            #[doc(hidden)]
18306            pub fn _decode_depth(
18307                buf: &'a [u8],
18308                depth: u32,
18309            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18310                let mut view = Self::default();
18311                view._merge_into_view(buf, depth)?;
18312                ::core::result::Result::Ok(view)
18313            }
18314            /// Merge fields from `buf` into this view (proto merge semantics).
18315            ///
18316            /// Repeated fields append; singular fields last-wins; singular
18317            /// MESSAGE fields merge recursively. Used by sub-message decode
18318            /// arms when the same field appears multiple times on the wire.
18319            ///
18320            /// **Not part of the public API.**
18321            #[doc(hidden)]
18322            pub fn _merge_into_view(
18323                &mut self,
18324                buf: &'a [u8],
18325                depth: u32,
18326            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
18327                let _ = depth;
18328                #[allow(unused_variables)]
18329                let view = self;
18330                let mut cur: &'a [u8] = buf;
18331                while !cur.is_empty() {
18332                    let before_tag = cur;
18333                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
18334                    match tag.field_number() {
18335                        1u32 => {
18336                            if tag.wire_type()
18337                                != ::buffa::encoding::WireType::LengthDelimited
18338                            {
18339                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
18340                                    field_number: 1u32,
18341                                    expected: 2u8,
18342                                    actual: tag.wire_type() as u8,
18343                                });
18344                            }
18345                            if depth == 0 {
18346                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
18347                            }
18348                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
18349                            view.graph
18350                                .push(
18351                                    super::super::__buffa::view::LineageNodeView::_decode_depth(
18352                                        sub,
18353                                        depth - 1,
18354                                    )?,
18355                                );
18356                        }
18357                        _ => {
18358                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
18359                            let span_len = before_tag.len() - cur.len();
18360                            view.__buffa_unknown_fields
18361                                .push_raw(&before_tag[..span_len]);
18362                        }
18363                    }
18364                }
18365                ::core::result::Result::Ok(())
18366            }
18367        }
18368        impl<'a> ::buffa::MessageView<'a> for LineageGraphView<'a> {
18369            type Owned = super::super::LineageGraph;
18370            fn decode_view(
18371                buf: &'a [u8],
18372            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18373                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
18374            }
18375            fn decode_view_with_limit(
18376                buf: &'a [u8],
18377                depth: u32,
18378            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18379                Self::_decode_depth(buf, depth)
18380            }
18381            fn to_owned_message(&self) -> super::super::LineageGraph {
18382                self.to_owned_from_source(None)
18383            }
18384            #[allow(clippy::useless_conversion, clippy::needless_update)]
18385            fn to_owned_from_source(
18386                &self,
18387                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
18388            ) -> super::super::LineageGraph {
18389                #[allow(unused_imports)]
18390                use ::buffa::alloc::string::ToString as _;
18391                let _ = __buffa_src;
18392                super::super::LineageGraph {
18393                    graph: self
18394                        .graph
18395                        .iter()
18396                        .map(|v| v.to_owned_from_source(__buffa_src))
18397                        .collect(),
18398                    __buffa_unknown_fields: self
18399                        .__buffa_unknown_fields
18400                        .to_owned()
18401                        .unwrap_or_default()
18402                        .into(),
18403                    ..::core::default::Default::default()
18404                }
18405            }
18406        }
18407        impl<'a> ::buffa::ViewEncode<'a> for LineageGraphView<'a> {
18408            #[allow(clippy::needless_borrow, clippy::let_and_return)]
18409            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
18410                #[allow(unused_imports)]
18411                use ::buffa::Enumeration as _;
18412                let mut size = 0u32;
18413                for v in &self.graph {
18414                    let __slot = __cache.reserve();
18415                    let inner_size = v.compute_size(__cache);
18416                    __cache.set(__slot, inner_size);
18417                    size
18418                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
18419                            + inner_size;
18420                }
18421                size += self.__buffa_unknown_fields.encoded_len() as u32;
18422                size
18423            }
18424            #[allow(clippy::needless_borrow)]
18425            fn write_to(
18426                &self,
18427                __cache: &mut ::buffa::SizeCache,
18428                buf: &mut impl ::buffa::bytes::BufMut,
18429            ) {
18430                #[allow(unused_imports)]
18431                use ::buffa::Enumeration as _;
18432                for v in &self.graph {
18433                    ::buffa::encoding::Tag::new(
18434                            1u32,
18435                            ::buffa::encoding::WireType::LengthDelimited,
18436                        )
18437                        .encode(buf);
18438                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
18439                    v.write_to(__cache, buf);
18440                }
18441                self.__buffa_unknown_fields.write_to(buf);
18442            }
18443        }
18444        /// Serializes this view as protobuf JSON.
18445        ///
18446        /// Implicit-presence fields with default values are omitted, `required`
18447        /// fields are always emitted, explicit-presence (`optional`) fields are
18448        /// emitted only when set, bytes fields are base64-encoded, and enum
18449        /// values are their proto name strings.
18450        ///
18451        /// This impl uses `serialize_map(None)` because the number of emitted
18452        /// fields depends on default-omission rules; serializers that require
18453        /// known map lengths (e.g. `bincode`) will return a runtime error.
18454        /// Use the owned message type for those formats.
18455        impl<'__a> ::serde::Serialize for LineageGraphView<'__a> {
18456            fn serialize<__S: ::serde::Serializer>(
18457                &self,
18458                __s: __S,
18459            ) -> ::core::result::Result<__S::Ok, __S::Error> {
18460                use ::serde::ser::SerializeMap as _;
18461                let mut __map = __s.serialize_map(::core::option::Option::None)?;
18462                if !self.graph.is_empty() {
18463                    __map.serialize_entry("graph", &*self.graph)?;
18464                }
18465                __map.end()
18466            }
18467        }
18468        impl<'a> ::buffa::MessageName for LineageGraphView<'a> {
18469            const PACKAGE: &'static str = "headwaters.read.v1";
18470            const NAME: &'static str = "LineageGraph";
18471            const FULL_NAME: &'static str = "headwaters.read.v1.LineageGraph";
18472            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.LineageGraph";
18473        }
18474        impl<'v> ::buffa::DefaultViewInstance for LineageGraphView<'v> {
18475            fn default_view_instance<'a>() -> &'a Self
18476            where
18477                Self: 'a,
18478            {
18479                static VALUE: ::buffa::__private::OnceBox<LineageGraphView<'static>> = ::buffa::__private::OnceBox::new();
18480                VALUE
18481                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
18482                        <LineageGraphView<'static>>::default(),
18483                    ))
18484            }
18485        }
18486        impl ::buffa::ViewReborrow for LineageGraphView<'static> {
18487            type Reborrowed<'b> = LineageGraphView<'b>;
18488            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
18489                this
18490            }
18491        }
18492        /** Self-contained, `'static` owned view of a `LineageGraph` message.
18493
18494 Wraps [`::buffa::OwnedView`]`<`[`LineageGraphView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
18495
18496 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`LineageGraphView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
18497        #[derive(Clone, Debug)]
18498        pub struct LineageGraphOwnedView(::buffa::OwnedView<LineageGraphView<'static>>);
18499        impl LineageGraphOwnedView {
18500            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
18501            ///
18502            /// The view borrows directly from the buffer's data; the buffer is
18503            /// retained inside the returned handle.
18504            ///
18505            /// # Errors
18506            ///
18507            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
18508            /// protobuf data.
18509            pub fn decode(
18510                bytes: ::buffa::bytes::Bytes,
18511            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18512                ::core::result::Result::Ok(
18513                    LineageGraphOwnedView(::buffa::OwnedView::decode(bytes)?),
18514                )
18515            }
18516            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
18517            /// max message size).
18518            ///
18519            /// # Errors
18520            ///
18521            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
18522            /// exceeds the configured limits.
18523            pub fn decode_with_options(
18524                bytes: ::buffa::bytes::Bytes,
18525                opts: &::buffa::DecodeOptions,
18526            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18527                ::core::result::Result::Ok(
18528                    LineageGraphOwnedView(
18529                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
18530                    ),
18531                )
18532            }
18533            /// Build from an owned message via an encode → decode round-trip.
18534            ///
18535            /// # Errors
18536            ///
18537            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
18538            /// somehow invalid (should not happen for well-formed messages).
18539            pub fn from_owned(
18540                msg: &super::super::LineageGraph,
18541            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18542                ::core::result::Result::Ok(
18543                    LineageGraphOwnedView(::buffa::OwnedView::from_owned(msg)?),
18544                )
18545            }
18546            /// Borrow the full [`LineageGraphView`] with its lifetime tied to `&self`.
18547            #[must_use]
18548            pub fn view(&self) -> &LineageGraphView<'_> {
18549                self.0.reborrow()
18550            }
18551            /// Convert to the owned message type.
18552            #[must_use]
18553            pub fn to_owned_message(&self) -> super::super::LineageGraph {
18554                self.0.to_owned_message()
18555            }
18556            /// The underlying bytes buffer.
18557            #[must_use]
18558            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
18559                self.0.bytes()
18560            }
18561            /// Consume the handle, returning the underlying bytes buffer.
18562            #[must_use]
18563            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
18564                self.0.into_bytes()
18565            }
18566            /// Field 1: `graph`
18567            #[must_use]
18568            pub fn graph(
18569                &self,
18570            ) -> &::buffa::RepeatedView<
18571                '_,
18572                super::super::__buffa::view::LineageNodeView<'_>,
18573            > {
18574                &self.0.reborrow().graph
18575            }
18576        }
18577        impl ::core::convert::From<::buffa::OwnedView<LineageGraphView<'static>>>
18578        for LineageGraphOwnedView {
18579            fn from(inner: ::buffa::OwnedView<LineageGraphView<'static>>) -> Self {
18580                LineageGraphOwnedView(inner)
18581            }
18582        }
18583        impl ::core::convert::From<LineageGraphOwnedView>
18584        for ::buffa::OwnedView<LineageGraphView<'static>> {
18585            fn from(wrapper: LineageGraphOwnedView) -> Self {
18586                wrapper.0
18587            }
18588        }
18589        impl ::core::convert::AsRef<::buffa::OwnedView<LineageGraphView<'static>>>
18590        for LineageGraphOwnedView {
18591            fn as_ref(&self) -> &::buffa::OwnedView<LineageGraphView<'static>> {
18592                &self.0
18593            }
18594        }
18595        impl ::buffa::HasMessageView for super::super::LineageGraph {
18596            type View<'a> = LineageGraphView<'a>;
18597            type ViewHandle = LineageGraphOwnedView;
18598        }
18599        impl ::serde::Serialize for LineageGraphOwnedView {
18600            fn serialize<__S: ::serde::Serializer>(
18601                &self,
18602                __s: __S,
18603            ) -> ::core::result::Result<__S::Ok, __S::Error> {
18604                ::serde::Serialize::serialize(&self.0, __s)
18605            }
18606        }
18607        /// --- tags ---
18608        ///
18609        /// A tag that can be attached to datasets and fields (e.g. `pii`, `gold`).
18610        #[derive(Clone, Debug, Default)]
18611        pub struct TagView<'a> {
18612            /// Field 1: `name`
18613            pub name: &'a str,
18614            /// Field 2: `description`
18615            pub description: &'a str,
18616            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
18617        }
18618        impl<'a> TagView<'a> {
18619            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
18620            ///
18621            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
18622            /// and by generated sub-message decode arms with `depth - 1`.
18623            ///
18624            /// **Not part of the public API.** Named with a leading underscore to
18625            /// signal that it is for generated-code use only.
18626            #[doc(hidden)]
18627            pub fn _decode_depth(
18628                buf: &'a [u8],
18629                depth: u32,
18630            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18631                let mut view = Self::default();
18632                view._merge_into_view(buf, depth)?;
18633                ::core::result::Result::Ok(view)
18634            }
18635            /// Merge fields from `buf` into this view (proto merge semantics).
18636            ///
18637            /// Repeated fields append; singular fields last-wins; singular
18638            /// MESSAGE fields merge recursively. Used by sub-message decode
18639            /// arms when the same field appears multiple times on the wire.
18640            ///
18641            /// **Not part of the public API.**
18642            #[doc(hidden)]
18643            pub fn _merge_into_view(
18644                &mut self,
18645                buf: &'a [u8],
18646                depth: u32,
18647            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
18648                let _ = depth;
18649                #[allow(unused_variables)]
18650                let view = self;
18651                let mut cur: &'a [u8] = buf;
18652                while !cur.is_empty() {
18653                    let before_tag = cur;
18654                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
18655                    match tag.field_number() {
18656                        1u32 => {
18657                            if tag.wire_type()
18658                                != ::buffa::encoding::WireType::LengthDelimited
18659                            {
18660                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
18661                                    field_number: 1u32,
18662                                    expected: 2u8,
18663                                    actual: tag.wire_type() as u8,
18664                                });
18665                            }
18666                            view.name = ::buffa::types::borrow_str(&mut cur)?;
18667                        }
18668                        2u32 => {
18669                            if tag.wire_type()
18670                                != ::buffa::encoding::WireType::LengthDelimited
18671                            {
18672                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
18673                                    field_number: 2u32,
18674                                    expected: 2u8,
18675                                    actual: tag.wire_type() as u8,
18676                                });
18677                            }
18678                            view.description = ::buffa::types::borrow_str(&mut cur)?;
18679                        }
18680                        _ => {
18681                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
18682                            let span_len = before_tag.len() - cur.len();
18683                            view.__buffa_unknown_fields
18684                                .push_raw(&before_tag[..span_len]);
18685                        }
18686                    }
18687                }
18688                ::core::result::Result::Ok(())
18689            }
18690        }
18691        impl<'a> ::buffa::MessageView<'a> for TagView<'a> {
18692            type Owned = super::super::Tag;
18693            fn decode_view(
18694                buf: &'a [u8],
18695            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18696                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
18697            }
18698            fn decode_view_with_limit(
18699                buf: &'a [u8],
18700                depth: u32,
18701            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18702                Self::_decode_depth(buf, depth)
18703            }
18704            fn to_owned_message(&self) -> super::super::Tag {
18705                self.to_owned_from_source(None)
18706            }
18707            #[allow(clippy::useless_conversion, clippy::needless_update)]
18708            fn to_owned_from_source(
18709                &self,
18710                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
18711            ) -> super::super::Tag {
18712                #[allow(unused_imports)]
18713                use ::buffa::alloc::string::ToString as _;
18714                let _ = __buffa_src;
18715                super::super::Tag {
18716                    name: self.name.to_string(),
18717                    description: self.description.to_string(),
18718                    __buffa_unknown_fields: self
18719                        .__buffa_unknown_fields
18720                        .to_owned()
18721                        .unwrap_or_default()
18722                        .into(),
18723                    ..::core::default::Default::default()
18724                }
18725            }
18726        }
18727        impl<'a> ::buffa::ViewEncode<'a> for TagView<'a> {
18728            #[allow(clippy::needless_borrow, clippy::let_and_return)]
18729            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
18730                #[allow(unused_imports)]
18731                use ::buffa::Enumeration as _;
18732                let mut size = 0u32;
18733                if !self.name.is_empty() {
18734                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
18735                }
18736                if !self.description.is_empty() {
18737                    size
18738                        += 1u32
18739                            + ::buffa::types::string_encoded_len(&self.description)
18740                                as u32;
18741                }
18742                size += self.__buffa_unknown_fields.encoded_len() as u32;
18743                size
18744            }
18745            #[allow(clippy::needless_borrow)]
18746            fn write_to(
18747                &self,
18748                _cache: &mut ::buffa::SizeCache,
18749                buf: &mut impl ::buffa::bytes::BufMut,
18750            ) {
18751                #[allow(unused_imports)]
18752                use ::buffa::Enumeration as _;
18753                if !self.name.is_empty() {
18754                    ::buffa::encoding::Tag::new(
18755                            1u32,
18756                            ::buffa::encoding::WireType::LengthDelimited,
18757                        )
18758                        .encode(buf);
18759                    ::buffa::types::encode_string(&self.name, buf);
18760                }
18761                if !self.description.is_empty() {
18762                    ::buffa::encoding::Tag::new(
18763                            2u32,
18764                            ::buffa::encoding::WireType::LengthDelimited,
18765                        )
18766                        .encode(buf);
18767                    ::buffa::types::encode_string(&self.description, buf);
18768                }
18769                self.__buffa_unknown_fields.write_to(buf);
18770            }
18771        }
18772        /// Serializes this view as protobuf JSON.
18773        ///
18774        /// Implicit-presence fields with default values are omitted, `required`
18775        /// fields are always emitted, explicit-presence (`optional`) fields are
18776        /// emitted only when set, bytes fields are base64-encoded, and enum
18777        /// values are their proto name strings.
18778        ///
18779        /// This impl uses `serialize_map(None)` because the number of emitted
18780        /// fields depends on default-omission rules; serializers that require
18781        /// known map lengths (e.g. `bincode`) will return a runtime error.
18782        /// Use the owned message type for those formats.
18783        impl<'__a> ::serde::Serialize for TagView<'__a> {
18784            fn serialize<__S: ::serde::Serializer>(
18785                &self,
18786                __s: __S,
18787            ) -> ::core::result::Result<__S::Ok, __S::Error> {
18788                use ::serde::ser::SerializeMap as _;
18789                let mut __map = __s.serialize_map(::core::option::Option::None)?;
18790                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
18791                    __map.serialize_entry("name", self.name)?;
18792                }
18793                if !::buffa::json_helpers::skip_if::is_empty_str(self.description) {
18794                    __map.serialize_entry("description", self.description)?;
18795                }
18796                __map.end()
18797            }
18798        }
18799        impl<'a> ::buffa::MessageName for TagView<'a> {
18800            const PACKAGE: &'static str = "headwaters.read.v1";
18801            const NAME: &'static str = "Tag";
18802            const FULL_NAME: &'static str = "headwaters.read.v1.Tag";
18803            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.Tag";
18804        }
18805        impl<'v> ::buffa::DefaultViewInstance for TagView<'v> {
18806            fn default_view_instance<'a>() -> &'a Self
18807            where
18808                Self: 'a,
18809            {
18810                static VALUE: ::buffa::__private::OnceBox<TagView<'static>> = ::buffa::__private::OnceBox::new();
18811                VALUE
18812                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
18813                        <TagView<'static>>::default(),
18814                    ))
18815            }
18816        }
18817        impl ::buffa::ViewReborrow for TagView<'static> {
18818            type Reborrowed<'b> = TagView<'b>;
18819            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
18820                this
18821            }
18822        }
18823        /** Self-contained, `'static` owned view of a `Tag` message.
18824
18825 Wraps [`::buffa::OwnedView`]`<`[`TagView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
18826
18827 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`TagView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
18828        #[derive(Clone, Debug)]
18829        pub struct TagOwnedView(::buffa::OwnedView<TagView<'static>>);
18830        impl TagOwnedView {
18831            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
18832            ///
18833            /// The view borrows directly from the buffer's data; the buffer is
18834            /// retained inside the returned handle.
18835            ///
18836            /// # Errors
18837            ///
18838            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
18839            /// protobuf data.
18840            pub fn decode(
18841                bytes: ::buffa::bytes::Bytes,
18842            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18843                ::core::result::Result::Ok(
18844                    TagOwnedView(::buffa::OwnedView::decode(bytes)?),
18845                )
18846            }
18847            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
18848            /// max message size).
18849            ///
18850            /// # Errors
18851            ///
18852            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
18853            /// exceeds the configured limits.
18854            pub fn decode_with_options(
18855                bytes: ::buffa::bytes::Bytes,
18856                opts: &::buffa::DecodeOptions,
18857            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18858                ::core::result::Result::Ok(
18859                    TagOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
18860                )
18861            }
18862            /// Build from an owned message via an encode → decode round-trip.
18863            ///
18864            /// # Errors
18865            ///
18866            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
18867            /// somehow invalid (should not happen for well-formed messages).
18868            pub fn from_owned(
18869                msg: &super::super::Tag,
18870            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18871                ::core::result::Result::Ok(
18872                    TagOwnedView(::buffa::OwnedView::from_owned(msg)?),
18873                )
18874            }
18875            /// Borrow the full [`TagView`] with its lifetime tied to `&self`.
18876            #[must_use]
18877            pub fn view(&self) -> &TagView<'_> {
18878                self.0.reborrow()
18879            }
18880            /// Convert to the owned message type.
18881            #[must_use]
18882            pub fn to_owned_message(&self) -> super::super::Tag {
18883                self.0.to_owned_message()
18884            }
18885            /// The underlying bytes buffer.
18886            #[must_use]
18887            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
18888                self.0.bytes()
18889            }
18890            /// Consume the handle, returning the underlying bytes buffer.
18891            #[must_use]
18892            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
18893                self.0.into_bytes()
18894            }
18895            /// Field 1: `name`
18896            #[must_use]
18897            pub fn name(&self) -> &'_ str {
18898                self.0.reborrow().name
18899            }
18900            /// Field 2: `description`
18901            #[must_use]
18902            pub fn description(&self) -> &'_ str {
18903                self.0.reborrow().description
18904            }
18905        }
18906        impl ::core::convert::From<::buffa::OwnedView<TagView<'static>>>
18907        for TagOwnedView {
18908            fn from(inner: ::buffa::OwnedView<TagView<'static>>) -> Self {
18909                TagOwnedView(inner)
18910            }
18911        }
18912        impl ::core::convert::From<TagOwnedView>
18913        for ::buffa::OwnedView<TagView<'static>> {
18914            fn from(wrapper: TagOwnedView) -> Self {
18915                wrapper.0
18916            }
18917        }
18918        impl ::core::convert::AsRef<::buffa::OwnedView<TagView<'static>>>
18919        for TagOwnedView {
18920            fn as_ref(&self) -> &::buffa::OwnedView<TagView<'static>> {
18921                &self.0
18922            }
18923        }
18924        impl ::buffa::HasMessageView for super::super::Tag {
18925            type View<'a> = TagView<'a>;
18926            type ViewHandle = TagOwnedView;
18927        }
18928        impl ::serde::Serialize for TagOwnedView {
18929            fn serialize<__S: ::serde::Serializer>(
18930                &self,
18931                __s: __S,
18932            ) -> ::core::result::Result<__S::Ok, __S::Error> {
18933                ::serde::Serialize::serialize(&self.0, __s)
18934            }
18935        }
18936        #[derive(Clone, Debug, Default)]
18937        pub struct ListTagsResponseView<'a> {
18938            /// Field 1: `tags`
18939            pub tags: ::buffa::RepeatedView<
18940                'a,
18941                super::super::__buffa::view::TagView<'a>,
18942            >,
18943            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
18944        }
18945        impl<'a> ListTagsResponseView<'a> {
18946            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
18947            ///
18948            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
18949            /// and by generated sub-message decode arms with `depth - 1`.
18950            ///
18951            /// **Not part of the public API.** Named with a leading underscore to
18952            /// signal that it is for generated-code use only.
18953            #[doc(hidden)]
18954            pub fn _decode_depth(
18955                buf: &'a [u8],
18956                depth: u32,
18957            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18958                let mut view = Self::default();
18959                view._merge_into_view(buf, depth)?;
18960                ::core::result::Result::Ok(view)
18961            }
18962            /// Merge fields from `buf` into this view (proto merge semantics).
18963            ///
18964            /// Repeated fields append; singular fields last-wins; singular
18965            /// MESSAGE fields merge recursively. Used by sub-message decode
18966            /// arms when the same field appears multiple times on the wire.
18967            ///
18968            /// **Not part of the public API.**
18969            #[doc(hidden)]
18970            pub fn _merge_into_view(
18971                &mut self,
18972                buf: &'a [u8],
18973                depth: u32,
18974            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
18975                let _ = depth;
18976                #[allow(unused_variables)]
18977                let view = self;
18978                let mut cur: &'a [u8] = buf;
18979                while !cur.is_empty() {
18980                    let before_tag = cur;
18981                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
18982                    match tag.field_number() {
18983                        1u32 => {
18984                            if tag.wire_type()
18985                                != ::buffa::encoding::WireType::LengthDelimited
18986                            {
18987                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
18988                                    field_number: 1u32,
18989                                    expected: 2u8,
18990                                    actual: tag.wire_type() as u8,
18991                                });
18992                            }
18993                            if depth == 0 {
18994                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
18995                            }
18996                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
18997                            view.tags
18998                                .push(
18999                                    super::super::__buffa::view::TagView::_decode_depth(
19000                                        sub,
19001                                        depth - 1,
19002                                    )?,
19003                                );
19004                        }
19005                        _ => {
19006                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
19007                            let span_len = before_tag.len() - cur.len();
19008                            view.__buffa_unknown_fields
19009                                .push_raw(&before_tag[..span_len]);
19010                        }
19011                    }
19012                }
19013                ::core::result::Result::Ok(())
19014            }
19015        }
19016        impl<'a> ::buffa::MessageView<'a> for ListTagsResponseView<'a> {
19017            type Owned = super::super::ListTagsResponse;
19018            fn decode_view(
19019                buf: &'a [u8],
19020            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19021                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
19022            }
19023            fn decode_view_with_limit(
19024                buf: &'a [u8],
19025                depth: u32,
19026            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19027                Self::_decode_depth(buf, depth)
19028            }
19029            fn to_owned_message(&self) -> super::super::ListTagsResponse {
19030                self.to_owned_from_source(None)
19031            }
19032            #[allow(clippy::useless_conversion, clippy::needless_update)]
19033            fn to_owned_from_source(
19034                &self,
19035                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
19036            ) -> super::super::ListTagsResponse {
19037                #[allow(unused_imports)]
19038                use ::buffa::alloc::string::ToString as _;
19039                let _ = __buffa_src;
19040                super::super::ListTagsResponse {
19041                    tags: self
19042                        .tags
19043                        .iter()
19044                        .map(|v| v.to_owned_from_source(__buffa_src))
19045                        .collect(),
19046                    __buffa_unknown_fields: self
19047                        .__buffa_unknown_fields
19048                        .to_owned()
19049                        .unwrap_or_default()
19050                        .into(),
19051                    ..::core::default::Default::default()
19052                }
19053            }
19054        }
19055        impl<'a> ::buffa::ViewEncode<'a> for ListTagsResponseView<'a> {
19056            #[allow(clippy::needless_borrow, clippy::let_and_return)]
19057            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
19058                #[allow(unused_imports)]
19059                use ::buffa::Enumeration as _;
19060                let mut size = 0u32;
19061                for v in &self.tags {
19062                    let __slot = __cache.reserve();
19063                    let inner_size = v.compute_size(__cache);
19064                    __cache.set(__slot, inner_size);
19065                    size
19066                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
19067                            + inner_size;
19068                }
19069                size += self.__buffa_unknown_fields.encoded_len() as u32;
19070                size
19071            }
19072            #[allow(clippy::needless_borrow)]
19073            fn write_to(
19074                &self,
19075                __cache: &mut ::buffa::SizeCache,
19076                buf: &mut impl ::buffa::bytes::BufMut,
19077            ) {
19078                #[allow(unused_imports)]
19079                use ::buffa::Enumeration as _;
19080                for v in &self.tags {
19081                    ::buffa::encoding::Tag::new(
19082                            1u32,
19083                            ::buffa::encoding::WireType::LengthDelimited,
19084                        )
19085                        .encode(buf);
19086                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
19087                    v.write_to(__cache, buf);
19088                }
19089                self.__buffa_unknown_fields.write_to(buf);
19090            }
19091        }
19092        /// Serializes this view as protobuf JSON.
19093        ///
19094        /// Implicit-presence fields with default values are omitted, `required`
19095        /// fields are always emitted, explicit-presence (`optional`) fields are
19096        /// emitted only when set, bytes fields are base64-encoded, and enum
19097        /// values are their proto name strings.
19098        ///
19099        /// This impl uses `serialize_map(None)` because the number of emitted
19100        /// fields depends on default-omission rules; serializers that require
19101        /// known map lengths (e.g. `bincode`) will return a runtime error.
19102        /// Use the owned message type for those formats.
19103        impl<'__a> ::serde::Serialize for ListTagsResponseView<'__a> {
19104            fn serialize<__S: ::serde::Serializer>(
19105                &self,
19106                __s: __S,
19107            ) -> ::core::result::Result<__S::Ok, __S::Error> {
19108                use ::serde::ser::SerializeMap as _;
19109                let mut __map = __s.serialize_map(::core::option::Option::None)?;
19110                if !self.tags.is_empty() {
19111                    __map.serialize_entry("tags", &*self.tags)?;
19112                }
19113                __map.end()
19114            }
19115        }
19116        impl<'a> ::buffa::MessageName for ListTagsResponseView<'a> {
19117            const PACKAGE: &'static str = "headwaters.read.v1";
19118            const NAME: &'static str = "ListTagsResponse";
19119            const FULL_NAME: &'static str = "headwaters.read.v1.ListTagsResponse";
19120            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListTagsResponse";
19121        }
19122        impl<'v> ::buffa::DefaultViewInstance for ListTagsResponseView<'v> {
19123            fn default_view_instance<'a>() -> &'a Self
19124            where
19125                Self: 'a,
19126            {
19127                static VALUE: ::buffa::__private::OnceBox<
19128                    ListTagsResponseView<'static>,
19129                > = ::buffa::__private::OnceBox::new();
19130                VALUE
19131                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
19132                        <ListTagsResponseView<'static>>::default(),
19133                    ))
19134            }
19135        }
19136        impl ::buffa::ViewReborrow for ListTagsResponseView<'static> {
19137            type Reborrowed<'b> = ListTagsResponseView<'b>;
19138            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
19139                this
19140            }
19141        }
19142        /** Self-contained, `'static` owned view of a `ListTagsResponse` message.
19143
19144 Wraps [`::buffa::OwnedView`]`<`[`ListTagsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
19145
19146 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListTagsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
19147        #[derive(Clone, Debug)]
19148        pub struct ListTagsResponseOwnedView(
19149            ::buffa::OwnedView<ListTagsResponseView<'static>>,
19150        );
19151        impl ListTagsResponseOwnedView {
19152            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
19153            ///
19154            /// The view borrows directly from the buffer's data; the buffer is
19155            /// retained inside the returned handle.
19156            ///
19157            /// # Errors
19158            ///
19159            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
19160            /// protobuf data.
19161            pub fn decode(
19162                bytes: ::buffa::bytes::Bytes,
19163            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19164                ::core::result::Result::Ok(
19165                    ListTagsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
19166                )
19167            }
19168            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
19169            /// max message size).
19170            ///
19171            /// # Errors
19172            ///
19173            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
19174            /// exceeds the configured limits.
19175            pub fn decode_with_options(
19176                bytes: ::buffa::bytes::Bytes,
19177                opts: &::buffa::DecodeOptions,
19178            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19179                ::core::result::Result::Ok(
19180                    ListTagsResponseOwnedView(
19181                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
19182                    ),
19183                )
19184            }
19185            /// Build from an owned message via an encode → decode round-trip.
19186            ///
19187            /// # Errors
19188            ///
19189            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
19190            /// somehow invalid (should not happen for well-formed messages).
19191            pub fn from_owned(
19192                msg: &super::super::ListTagsResponse,
19193            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19194                ::core::result::Result::Ok(
19195                    ListTagsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
19196                )
19197            }
19198            /// Borrow the full [`ListTagsResponseView`] with its lifetime tied to `&self`.
19199            #[must_use]
19200            pub fn view(&self) -> &ListTagsResponseView<'_> {
19201                self.0.reborrow()
19202            }
19203            /// Convert to the owned message type.
19204            #[must_use]
19205            pub fn to_owned_message(&self) -> super::super::ListTagsResponse {
19206                self.0.to_owned_message()
19207            }
19208            /// The underlying bytes buffer.
19209            #[must_use]
19210            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
19211                self.0.bytes()
19212            }
19213            /// Consume the handle, returning the underlying bytes buffer.
19214            #[must_use]
19215            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
19216                self.0.into_bytes()
19217            }
19218            /// Field 1: `tags`
19219            #[must_use]
19220            pub fn tags(
19221                &self,
19222            ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::TagView<'_>> {
19223                &self.0.reborrow().tags
19224            }
19225        }
19226        impl ::core::convert::From<::buffa::OwnedView<ListTagsResponseView<'static>>>
19227        for ListTagsResponseOwnedView {
19228            fn from(inner: ::buffa::OwnedView<ListTagsResponseView<'static>>) -> Self {
19229                ListTagsResponseOwnedView(inner)
19230            }
19231        }
19232        impl ::core::convert::From<ListTagsResponseOwnedView>
19233        for ::buffa::OwnedView<ListTagsResponseView<'static>> {
19234            fn from(wrapper: ListTagsResponseOwnedView) -> Self {
19235                wrapper.0
19236            }
19237        }
19238        impl ::core::convert::AsRef<::buffa::OwnedView<ListTagsResponseView<'static>>>
19239        for ListTagsResponseOwnedView {
19240            fn as_ref(&self) -> &::buffa::OwnedView<ListTagsResponseView<'static>> {
19241                &self.0
19242            }
19243        }
19244        impl ::buffa::HasMessageView for super::super::ListTagsResponse {
19245            type View<'a> = ListTagsResponseView<'a>;
19246            type ViewHandle = ListTagsResponseOwnedView;
19247        }
19248        impl ::serde::Serialize for ListTagsResponseOwnedView {
19249            fn serialize<__S: ::serde::Serializer>(
19250                &self,
19251                __s: __S,
19252            ) -> ::core::result::Result<__S::Ok, __S::Error> {
19253                ::serde::Serialize::serialize(&self.0, __s)
19254            }
19255        }
19256        /// A dataset field carrying a tag, directly or by propagation through column
19257        /// lineage.
19258        #[derive(Clone, Debug, Default)]
19259        pub struct TaggedFieldView<'a> {
19260            /// Field 1: `namespace`
19261            pub namespace: &'a str,
19262            /// Field 2: `dataset`
19263            pub dataset: &'a str,
19264            /// Field 3: `field`
19265            pub field: &'a str,
19266            /// This field's `datasetField:<ns>:<dataset>:<field>` nodeId.
19267            ///
19268            /// Field 4: `node_id`
19269            pub node_id: &'a str,
19270            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
19271        }
19272        impl<'a> TaggedFieldView<'a> {
19273            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
19274            ///
19275            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
19276            /// and by generated sub-message decode arms with `depth - 1`.
19277            ///
19278            /// **Not part of the public API.** Named with a leading underscore to
19279            /// signal that it is for generated-code use only.
19280            #[doc(hidden)]
19281            pub fn _decode_depth(
19282                buf: &'a [u8],
19283                depth: u32,
19284            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19285                let mut view = Self::default();
19286                view._merge_into_view(buf, depth)?;
19287                ::core::result::Result::Ok(view)
19288            }
19289            /// Merge fields from `buf` into this view (proto merge semantics).
19290            ///
19291            /// Repeated fields append; singular fields last-wins; singular
19292            /// MESSAGE fields merge recursively. Used by sub-message decode
19293            /// arms when the same field appears multiple times on the wire.
19294            ///
19295            /// **Not part of the public API.**
19296            #[doc(hidden)]
19297            pub fn _merge_into_view(
19298                &mut self,
19299                buf: &'a [u8],
19300                depth: u32,
19301            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
19302                let _ = depth;
19303                #[allow(unused_variables)]
19304                let view = self;
19305                let mut cur: &'a [u8] = buf;
19306                while !cur.is_empty() {
19307                    let before_tag = cur;
19308                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
19309                    match tag.field_number() {
19310                        1u32 => {
19311                            if tag.wire_type()
19312                                != ::buffa::encoding::WireType::LengthDelimited
19313                            {
19314                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
19315                                    field_number: 1u32,
19316                                    expected: 2u8,
19317                                    actual: tag.wire_type() as u8,
19318                                });
19319                            }
19320                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
19321                        }
19322                        2u32 => {
19323                            if tag.wire_type()
19324                                != ::buffa::encoding::WireType::LengthDelimited
19325                            {
19326                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
19327                                    field_number: 2u32,
19328                                    expected: 2u8,
19329                                    actual: tag.wire_type() as u8,
19330                                });
19331                            }
19332                            view.dataset = ::buffa::types::borrow_str(&mut cur)?;
19333                        }
19334                        3u32 => {
19335                            if tag.wire_type()
19336                                != ::buffa::encoding::WireType::LengthDelimited
19337                            {
19338                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
19339                                    field_number: 3u32,
19340                                    expected: 2u8,
19341                                    actual: tag.wire_type() as u8,
19342                                });
19343                            }
19344                            view.field = ::buffa::types::borrow_str(&mut cur)?;
19345                        }
19346                        4u32 => {
19347                            if tag.wire_type()
19348                                != ::buffa::encoding::WireType::LengthDelimited
19349                            {
19350                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
19351                                    field_number: 4u32,
19352                                    expected: 2u8,
19353                                    actual: tag.wire_type() as u8,
19354                                });
19355                            }
19356                            view.node_id = ::buffa::types::borrow_str(&mut cur)?;
19357                        }
19358                        _ => {
19359                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
19360                            let span_len = before_tag.len() - cur.len();
19361                            view.__buffa_unknown_fields
19362                                .push_raw(&before_tag[..span_len]);
19363                        }
19364                    }
19365                }
19366                ::core::result::Result::Ok(())
19367            }
19368        }
19369        impl<'a> ::buffa::MessageView<'a> for TaggedFieldView<'a> {
19370            type Owned = super::super::TaggedField;
19371            fn decode_view(
19372                buf: &'a [u8],
19373            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19374                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
19375            }
19376            fn decode_view_with_limit(
19377                buf: &'a [u8],
19378                depth: u32,
19379            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19380                Self::_decode_depth(buf, depth)
19381            }
19382            fn to_owned_message(&self) -> super::super::TaggedField {
19383                self.to_owned_from_source(None)
19384            }
19385            #[allow(clippy::useless_conversion, clippy::needless_update)]
19386            fn to_owned_from_source(
19387                &self,
19388                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
19389            ) -> super::super::TaggedField {
19390                #[allow(unused_imports)]
19391                use ::buffa::alloc::string::ToString as _;
19392                let _ = __buffa_src;
19393                super::super::TaggedField {
19394                    namespace: self.namespace.to_string(),
19395                    dataset: self.dataset.to_string(),
19396                    field: self.field.to_string(),
19397                    node_id: self.node_id.to_string(),
19398                    __buffa_unknown_fields: self
19399                        .__buffa_unknown_fields
19400                        .to_owned()
19401                        .unwrap_or_default()
19402                        .into(),
19403                    ..::core::default::Default::default()
19404                }
19405            }
19406        }
19407        impl<'a> ::buffa::ViewEncode<'a> for TaggedFieldView<'a> {
19408            #[allow(clippy::needless_borrow, clippy::let_and_return)]
19409            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
19410                #[allow(unused_imports)]
19411                use ::buffa::Enumeration as _;
19412                let mut size = 0u32;
19413                if !self.namespace.is_empty() {
19414                    size
19415                        += 1u32
19416                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
19417                }
19418                if !self.dataset.is_empty() {
19419                    size
19420                        += 1u32
19421                            + ::buffa::types::string_encoded_len(&self.dataset) as u32;
19422                }
19423                if !self.field.is_empty() {
19424                    size
19425                        += 1u32 + ::buffa::types::string_encoded_len(&self.field) as u32;
19426                }
19427                if !self.node_id.is_empty() {
19428                    size
19429                        += 1u32
19430                            + ::buffa::types::string_encoded_len(&self.node_id) as u32;
19431                }
19432                size += self.__buffa_unknown_fields.encoded_len() as u32;
19433                size
19434            }
19435            #[allow(clippy::needless_borrow)]
19436            fn write_to(
19437                &self,
19438                _cache: &mut ::buffa::SizeCache,
19439                buf: &mut impl ::buffa::bytes::BufMut,
19440            ) {
19441                #[allow(unused_imports)]
19442                use ::buffa::Enumeration as _;
19443                if !self.namespace.is_empty() {
19444                    ::buffa::encoding::Tag::new(
19445                            1u32,
19446                            ::buffa::encoding::WireType::LengthDelimited,
19447                        )
19448                        .encode(buf);
19449                    ::buffa::types::encode_string(&self.namespace, buf);
19450                }
19451                if !self.dataset.is_empty() {
19452                    ::buffa::encoding::Tag::new(
19453                            2u32,
19454                            ::buffa::encoding::WireType::LengthDelimited,
19455                        )
19456                        .encode(buf);
19457                    ::buffa::types::encode_string(&self.dataset, buf);
19458                }
19459                if !self.field.is_empty() {
19460                    ::buffa::encoding::Tag::new(
19461                            3u32,
19462                            ::buffa::encoding::WireType::LengthDelimited,
19463                        )
19464                        .encode(buf);
19465                    ::buffa::types::encode_string(&self.field, buf);
19466                }
19467                if !self.node_id.is_empty() {
19468                    ::buffa::encoding::Tag::new(
19469                            4u32,
19470                            ::buffa::encoding::WireType::LengthDelimited,
19471                        )
19472                        .encode(buf);
19473                    ::buffa::types::encode_string(&self.node_id, buf);
19474                }
19475                self.__buffa_unknown_fields.write_to(buf);
19476            }
19477        }
19478        /// Serializes this view as protobuf JSON.
19479        ///
19480        /// Implicit-presence fields with default values are omitted, `required`
19481        /// fields are always emitted, explicit-presence (`optional`) fields are
19482        /// emitted only when set, bytes fields are base64-encoded, and enum
19483        /// values are their proto name strings.
19484        ///
19485        /// This impl uses `serialize_map(None)` because the number of emitted
19486        /// fields depends on default-omission rules; serializers that require
19487        /// known map lengths (e.g. `bincode`) will return a runtime error.
19488        /// Use the owned message type for those formats.
19489        impl<'__a> ::serde::Serialize for TaggedFieldView<'__a> {
19490            fn serialize<__S: ::serde::Serializer>(
19491                &self,
19492                __s: __S,
19493            ) -> ::core::result::Result<__S::Ok, __S::Error> {
19494                use ::serde::ser::SerializeMap as _;
19495                let mut __map = __s.serialize_map(::core::option::Option::None)?;
19496                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
19497                    __map.serialize_entry("namespace", self.namespace)?;
19498                }
19499                if !::buffa::json_helpers::skip_if::is_empty_str(self.dataset) {
19500                    __map.serialize_entry("dataset", self.dataset)?;
19501                }
19502                if !::buffa::json_helpers::skip_if::is_empty_str(self.field) {
19503                    __map.serialize_entry("field", self.field)?;
19504                }
19505                if !::buffa::json_helpers::skip_if::is_empty_str(self.node_id) {
19506                    __map.serialize_entry("nodeId", self.node_id)?;
19507                }
19508                __map.end()
19509            }
19510        }
19511        impl<'a> ::buffa::MessageName for TaggedFieldView<'a> {
19512            const PACKAGE: &'static str = "headwaters.read.v1";
19513            const NAME: &'static str = "TaggedField";
19514            const FULL_NAME: &'static str = "headwaters.read.v1.TaggedField";
19515            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.TaggedField";
19516        }
19517        impl<'v> ::buffa::DefaultViewInstance for TaggedFieldView<'v> {
19518            fn default_view_instance<'a>() -> &'a Self
19519            where
19520                Self: 'a,
19521            {
19522                static VALUE: ::buffa::__private::OnceBox<TaggedFieldView<'static>> = ::buffa::__private::OnceBox::new();
19523                VALUE
19524                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
19525                        <TaggedFieldView<'static>>::default(),
19526                    ))
19527            }
19528        }
19529        impl ::buffa::ViewReborrow for TaggedFieldView<'static> {
19530            type Reborrowed<'b> = TaggedFieldView<'b>;
19531            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
19532                this
19533            }
19534        }
19535        /** Self-contained, `'static` owned view of a `TaggedField` message.
19536
19537 Wraps [`::buffa::OwnedView`]`<`[`TaggedFieldView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
19538
19539 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`TaggedFieldView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
19540        #[derive(Clone, Debug)]
19541        pub struct TaggedFieldOwnedView(::buffa::OwnedView<TaggedFieldView<'static>>);
19542        impl TaggedFieldOwnedView {
19543            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
19544            ///
19545            /// The view borrows directly from the buffer's data; the buffer is
19546            /// retained inside the returned handle.
19547            ///
19548            /// # Errors
19549            ///
19550            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
19551            /// protobuf data.
19552            pub fn decode(
19553                bytes: ::buffa::bytes::Bytes,
19554            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19555                ::core::result::Result::Ok(
19556                    TaggedFieldOwnedView(::buffa::OwnedView::decode(bytes)?),
19557                )
19558            }
19559            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
19560            /// max message size).
19561            ///
19562            /// # Errors
19563            ///
19564            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
19565            /// exceeds the configured limits.
19566            pub fn decode_with_options(
19567                bytes: ::buffa::bytes::Bytes,
19568                opts: &::buffa::DecodeOptions,
19569            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19570                ::core::result::Result::Ok(
19571                    TaggedFieldOwnedView(
19572                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
19573                    ),
19574                )
19575            }
19576            /// Build from an owned message via an encode → decode round-trip.
19577            ///
19578            /// # Errors
19579            ///
19580            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
19581            /// somehow invalid (should not happen for well-formed messages).
19582            pub fn from_owned(
19583                msg: &super::super::TaggedField,
19584            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19585                ::core::result::Result::Ok(
19586                    TaggedFieldOwnedView(::buffa::OwnedView::from_owned(msg)?),
19587                )
19588            }
19589            /// Borrow the full [`TaggedFieldView`] with its lifetime tied to `&self`.
19590            #[must_use]
19591            pub fn view(&self) -> &TaggedFieldView<'_> {
19592                self.0.reborrow()
19593            }
19594            /// Convert to the owned message type.
19595            #[must_use]
19596            pub fn to_owned_message(&self) -> super::super::TaggedField {
19597                self.0.to_owned_message()
19598            }
19599            /// The underlying bytes buffer.
19600            #[must_use]
19601            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
19602                self.0.bytes()
19603            }
19604            /// Consume the handle, returning the underlying bytes buffer.
19605            #[must_use]
19606            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
19607                self.0.into_bytes()
19608            }
19609            /// Field 1: `namespace`
19610            #[must_use]
19611            pub fn namespace(&self) -> &'_ str {
19612                self.0.reborrow().namespace
19613            }
19614            /// Field 2: `dataset`
19615            #[must_use]
19616            pub fn dataset(&self) -> &'_ str {
19617                self.0.reborrow().dataset
19618            }
19619            /// Field 3: `field`
19620            #[must_use]
19621            pub fn field(&self) -> &'_ str {
19622                self.0.reborrow().field
19623            }
19624            /// This field's `datasetField:<ns>:<dataset>:<field>` nodeId.
19625            ///
19626            /// Field 4: `node_id`
19627            #[must_use]
19628            pub fn node_id(&self) -> &'_ str {
19629                self.0.reborrow().node_id
19630            }
19631        }
19632        impl ::core::convert::From<::buffa::OwnedView<TaggedFieldView<'static>>>
19633        for TaggedFieldOwnedView {
19634            fn from(inner: ::buffa::OwnedView<TaggedFieldView<'static>>) -> Self {
19635                TaggedFieldOwnedView(inner)
19636            }
19637        }
19638        impl ::core::convert::From<TaggedFieldOwnedView>
19639        for ::buffa::OwnedView<TaggedFieldView<'static>> {
19640            fn from(wrapper: TaggedFieldOwnedView) -> Self {
19641                wrapper.0
19642            }
19643        }
19644        impl ::core::convert::AsRef<::buffa::OwnedView<TaggedFieldView<'static>>>
19645        for TaggedFieldOwnedView {
19646            fn as_ref(&self) -> &::buffa::OwnedView<TaggedFieldView<'static>> {
19647                &self.0
19648            }
19649        }
19650        impl ::buffa::HasMessageView for super::super::TaggedField {
19651            type View<'a> = TaggedFieldView<'a>;
19652            type ViewHandle = TaggedFieldOwnedView;
19653        }
19654        impl ::serde::Serialize for TaggedFieldOwnedView {
19655            fn serialize<__S: ::serde::Serializer>(
19656                &self,
19657                __s: __S,
19658            ) -> ::core::result::Result<__S::Ok, __S::Error> {
19659                ::serde::Serialize::serialize(&self.0, __s)
19660            }
19661        }
19662        /// Every field a tag reaches downstream through column lineage, including the
19663        /// originally tagged fields. Returned by `GetTagDownstream`.
19664        #[derive(Clone, Debug, Default)]
19665        pub struct TagPropagationView<'a> {
19666            /// Field 1: `tag`
19667            pub tag: &'a str,
19668            /// Field 2: `fields`
19669            pub fields: ::buffa::RepeatedView<
19670                'a,
19671                super::super::__buffa::view::TaggedFieldView<'a>,
19672            >,
19673            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
19674        }
19675        impl<'a> TagPropagationView<'a> {
19676            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
19677            ///
19678            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
19679            /// and by generated sub-message decode arms with `depth - 1`.
19680            ///
19681            /// **Not part of the public API.** Named with a leading underscore to
19682            /// signal that it is for generated-code use only.
19683            #[doc(hidden)]
19684            pub fn _decode_depth(
19685                buf: &'a [u8],
19686                depth: u32,
19687            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19688                let mut view = Self::default();
19689                view._merge_into_view(buf, depth)?;
19690                ::core::result::Result::Ok(view)
19691            }
19692            /// Merge fields from `buf` into this view (proto merge semantics).
19693            ///
19694            /// Repeated fields append; singular fields last-wins; singular
19695            /// MESSAGE fields merge recursively. Used by sub-message decode
19696            /// arms when the same field appears multiple times on the wire.
19697            ///
19698            /// **Not part of the public API.**
19699            #[doc(hidden)]
19700            pub fn _merge_into_view(
19701                &mut self,
19702                buf: &'a [u8],
19703                depth: u32,
19704            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
19705                let _ = depth;
19706                #[allow(unused_variables)]
19707                let view = self;
19708                let mut cur: &'a [u8] = buf;
19709                while !cur.is_empty() {
19710                    let before_tag = cur;
19711                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
19712                    match tag.field_number() {
19713                        1u32 => {
19714                            if tag.wire_type()
19715                                != ::buffa::encoding::WireType::LengthDelimited
19716                            {
19717                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
19718                                    field_number: 1u32,
19719                                    expected: 2u8,
19720                                    actual: tag.wire_type() as u8,
19721                                });
19722                            }
19723                            view.tag = ::buffa::types::borrow_str(&mut cur)?;
19724                        }
19725                        2u32 => {
19726                            if tag.wire_type()
19727                                != ::buffa::encoding::WireType::LengthDelimited
19728                            {
19729                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
19730                                    field_number: 2u32,
19731                                    expected: 2u8,
19732                                    actual: tag.wire_type() as u8,
19733                                });
19734                            }
19735                            if depth == 0 {
19736                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
19737                            }
19738                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
19739                            view.fields
19740                                .push(
19741                                    super::super::__buffa::view::TaggedFieldView::_decode_depth(
19742                                        sub,
19743                                        depth - 1,
19744                                    )?,
19745                                );
19746                        }
19747                        _ => {
19748                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
19749                            let span_len = before_tag.len() - cur.len();
19750                            view.__buffa_unknown_fields
19751                                .push_raw(&before_tag[..span_len]);
19752                        }
19753                    }
19754                }
19755                ::core::result::Result::Ok(())
19756            }
19757        }
19758        impl<'a> ::buffa::MessageView<'a> for TagPropagationView<'a> {
19759            type Owned = super::super::TagPropagation;
19760            fn decode_view(
19761                buf: &'a [u8],
19762            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19763                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
19764            }
19765            fn decode_view_with_limit(
19766                buf: &'a [u8],
19767                depth: u32,
19768            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19769                Self::_decode_depth(buf, depth)
19770            }
19771            fn to_owned_message(&self) -> super::super::TagPropagation {
19772                self.to_owned_from_source(None)
19773            }
19774            #[allow(clippy::useless_conversion, clippy::needless_update)]
19775            fn to_owned_from_source(
19776                &self,
19777                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
19778            ) -> super::super::TagPropagation {
19779                #[allow(unused_imports)]
19780                use ::buffa::alloc::string::ToString as _;
19781                let _ = __buffa_src;
19782                super::super::TagPropagation {
19783                    tag: self.tag.to_string(),
19784                    fields: self
19785                        .fields
19786                        .iter()
19787                        .map(|v| v.to_owned_from_source(__buffa_src))
19788                        .collect(),
19789                    __buffa_unknown_fields: self
19790                        .__buffa_unknown_fields
19791                        .to_owned()
19792                        .unwrap_or_default()
19793                        .into(),
19794                    ..::core::default::Default::default()
19795                }
19796            }
19797        }
19798        impl<'a> ::buffa::ViewEncode<'a> for TagPropagationView<'a> {
19799            #[allow(clippy::needless_borrow, clippy::let_and_return)]
19800            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
19801                #[allow(unused_imports)]
19802                use ::buffa::Enumeration as _;
19803                let mut size = 0u32;
19804                if !self.tag.is_empty() {
19805                    size += 1u32 + ::buffa::types::string_encoded_len(&self.tag) as u32;
19806                }
19807                for v in &self.fields {
19808                    let __slot = __cache.reserve();
19809                    let inner_size = v.compute_size(__cache);
19810                    __cache.set(__slot, inner_size);
19811                    size
19812                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
19813                            + inner_size;
19814                }
19815                size += self.__buffa_unknown_fields.encoded_len() as u32;
19816                size
19817            }
19818            #[allow(clippy::needless_borrow)]
19819            fn write_to(
19820                &self,
19821                __cache: &mut ::buffa::SizeCache,
19822                buf: &mut impl ::buffa::bytes::BufMut,
19823            ) {
19824                #[allow(unused_imports)]
19825                use ::buffa::Enumeration as _;
19826                if !self.tag.is_empty() {
19827                    ::buffa::encoding::Tag::new(
19828                            1u32,
19829                            ::buffa::encoding::WireType::LengthDelimited,
19830                        )
19831                        .encode(buf);
19832                    ::buffa::types::encode_string(&self.tag, buf);
19833                }
19834                for v in &self.fields {
19835                    ::buffa::encoding::Tag::new(
19836                            2u32,
19837                            ::buffa::encoding::WireType::LengthDelimited,
19838                        )
19839                        .encode(buf);
19840                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
19841                    v.write_to(__cache, buf);
19842                }
19843                self.__buffa_unknown_fields.write_to(buf);
19844            }
19845        }
19846        /// Serializes this view as protobuf JSON.
19847        ///
19848        /// Implicit-presence fields with default values are omitted, `required`
19849        /// fields are always emitted, explicit-presence (`optional`) fields are
19850        /// emitted only when set, bytes fields are base64-encoded, and enum
19851        /// values are their proto name strings.
19852        ///
19853        /// This impl uses `serialize_map(None)` because the number of emitted
19854        /// fields depends on default-omission rules; serializers that require
19855        /// known map lengths (e.g. `bincode`) will return a runtime error.
19856        /// Use the owned message type for those formats.
19857        impl<'__a> ::serde::Serialize for TagPropagationView<'__a> {
19858            fn serialize<__S: ::serde::Serializer>(
19859                &self,
19860                __s: __S,
19861            ) -> ::core::result::Result<__S::Ok, __S::Error> {
19862                use ::serde::ser::SerializeMap as _;
19863                let mut __map = __s.serialize_map(::core::option::Option::None)?;
19864                if !::buffa::json_helpers::skip_if::is_empty_str(self.tag) {
19865                    __map.serialize_entry("tag", self.tag)?;
19866                }
19867                if !self.fields.is_empty() {
19868                    __map.serialize_entry("fields", &*self.fields)?;
19869                }
19870                __map.end()
19871            }
19872        }
19873        impl<'a> ::buffa::MessageName for TagPropagationView<'a> {
19874            const PACKAGE: &'static str = "headwaters.read.v1";
19875            const NAME: &'static str = "TagPropagation";
19876            const FULL_NAME: &'static str = "headwaters.read.v1.TagPropagation";
19877            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.TagPropagation";
19878        }
19879        impl<'v> ::buffa::DefaultViewInstance for TagPropagationView<'v> {
19880            fn default_view_instance<'a>() -> &'a Self
19881            where
19882                Self: 'a,
19883            {
19884                static VALUE: ::buffa::__private::OnceBox<TagPropagationView<'static>> = ::buffa::__private::OnceBox::new();
19885                VALUE
19886                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
19887                        <TagPropagationView<'static>>::default(),
19888                    ))
19889            }
19890        }
19891        impl ::buffa::ViewReborrow for TagPropagationView<'static> {
19892            type Reborrowed<'b> = TagPropagationView<'b>;
19893            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
19894                this
19895            }
19896        }
19897        /** Self-contained, `'static` owned view of a `TagPropagation` message.
19898
19899 Wraps [`::buffa::OwnedView`]`<`[`TagPropagationView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
19900
19901 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`TagPropagationView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
19902        #[derive(Clone, Debug)]
19903        pub struct TagPropagationOwnedView(
19904            ::buffa::OwnedView<TagPropagationView<'static>>,
19905        );
19906        impl TagPropagationOwnedView {
19907            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
19908            ///
19909            /// The view borrows directly from the buffer's data; the buffer is
19910            /// retained inside the returned handle.
19911            ///
19912            /// # Errors
19913            ///
19914            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
19915            /// protobuf data.
19916            pub fn decode(
19917                bytes: ::buffa::bytes::Bytes,
19918            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19919                ::core::result::Result::Ok(
19920                    TagPropagationOwnedView(::buffa::OwnedView::decode(bytes)?),
19921                )
19922            }
19923            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
19924            /// max message size).
19925            ///
19926            /// # Errors
19927            ///
19928            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
19929            /// exceeds the configured limits.
19930            pub fn decode_with_options(
19931                bytes: ::buffa::bytes::Bytes,
19932                opts: &::buffa::DecodeOptions,
19933            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19934                ::core::result::Result::Ok(
19935                    TagPropagationOwnedView(
19936                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
19937                    ),
19938                )
19939            }
19940            /// Build from an owned message via an encode → decode round-trip.
19941            ///
19942            /// # Errors
19943            ///
19944            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
19945            /// somehow invalid (should not happen for well-formed messages).
19946            pub fn from_owned(
19947                msg: &super::super::TagPropagation,
19948            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
19949                ::core::result::Result::Ok(
19950                    TagPropagationOwnedView(::buffa::OwnedView::from_owned(msg)?),
19951                )
19952            }
19953            /// Borrow the full [`TagPropagationView`] with its lifetime tied to `&self`.
19954            #[must_use]
19955            pub fn view(&self) -> &TagPropagationView<'_> {
19956                self.0.reborrow()
19957            }
19958            /// Convert to the owned message type.
19959            #[must_use]
19960            pub fn to_owned_message(&self) -> super::super::TagPropagation {
19961                self.0.to_owned_message()
19962            }
19963            /// The underlying bytes buffer.
19964            #[must_use]
19965            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
19966                self.0.bytes()
19967            }
19968            /// Consume the handle, returning the underlying bytes buffer.
19969            #[must_use]
19970            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
19971                self.0.into_bytes()
19972            }
19973            /// Field 1: `tag`
19974            #[must_use]
19975            pub fn tag(&self) -> &'_ str {
19976                self.0.reborrow().tag
19977            }
19978            /// Field 2: `fields`
19979            #[must_use]
19980            pub fn fields(
19981                &self,
19982            ) -> &::buffa::RepeatedView<
19983                '_,
19984                super::super::__buffa::view::TaggedFieldView<'_>,
19985            > {
19986                &self.0.reborrow().fields
19987            }
19988        }
19989        impl ::core::convert::From<::buffa::OwnedView<TagPropagationView<'static>>>
19990        for TagPropagationOwnedView {
19991            fn from(inner: ::buffa::OwnedView<TagPropagationView<'static>>) -> Self {
19992                TagPropagationOwnedView(inner)
19993            }
19994        }
19995        impl ::core::convert::From<TagPropagationOwnedView>
19996        for ::buffa::OwnedView<TagPropagationView<'static>> {
19997            fn from(wrapper: TagPropagationOwnedView) -> Self {
19998                wrapper.0
19999            }
20000        }
20001        impl ::core::convert::AsRef<::buffa::OwnedView<TagPropagationView<'static>>>
20002        for TagPropagationOwnedView {
20003            fn as_ref(&self) -> &::buffa::OwnedView<TagPropagationView<'static>> {
20004                &self.0
20005            }
20006        }
20007        impl ::buffa::HasMessageView for super::super::TagPropagation {
20008            type View<'a> = TagPropagationView<'a>;
20009            type ViewHandle = TagPropagationOwnedView;
20010        }
20011        impl ::serde::Serialize for TagPropagationOwnedView {
20012            fn serialize<__S: ::serde::Serializer>(
20013                &self,
20014                __s: __S,
20015            ) -> ::core::result::Result<__S::Ok, __S::Error> {
20016                ::serde::Serialize::serialize(&self.0, __s)
20017            }
20018        }
20019        /// --- stats ---
20020        ///
20021        /// A count for one time bucket: `count` events/assets in the period starting at
20022        /// `date`.
20023        #[derive(Clone, Debug, Default)]
20024        pub struct StatBucketView<'a> {
20025            /// Bucket start as an RFC 3339 date/time.
20026            ///
20027            /// Field 1: `date`
20028            pub date: &'a str,
20029            /// Field 2: `count`
20030            pub count: i64,
20031            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
20032        }
20033        impl<'a> StatBucketView<'a> {
20034            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
20035            ///
20036            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
20037            /// and by generated sub-message decode arms with `depth - 1`.
20038            ///
20039            /// **Not part of the public API.** Named with a leading underscore to
20040            /// signal that it is for generated-code use only.
20041            #[doc(hidden)]
20042            pub fn _decode_depth(
20043                buf: &'a [u8],
20044                depth: u32,
20045            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20046                let mut view = Self::default();
20047                view._merge_into_view(buf, depth)?;
20048                ::core::result::Result::Ok(view)
20049            }
20050            /// Merge fields from `buf` into this view (proto merge semantics).
20051            ///
20052            /// Repeated fields append; singular fields last-wins; singular
20053            /// MESSAGE fields merge recursively. Used by sub-message decode
20054            /// arms when the same field appears multiple times on the wire.
20055            ///
20056            /// **Not part of the public API.**
20057            #[doc(hidden)]
20058            pub fn _merge_into_view(
20059                &mut self,
20060                buf: &'a [u8],
20061                depth: u32,
20062            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
20063                let _ = depth;
20064                #[allow(unused_variables)]
20065                let view = self;
20066                let mut cur: &'a [u8] = buf;
20067                while !cur.is_empty() {
20068                    let before_tag = cur;
20069                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
20070                    match tag.field_number() {
20071                        1u32 => {
20072                            if tag.wire_type()
20073                                != ::buffa::encoding::WireType::LengthDelimited
20074                            {
20075                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
20076                                    field_number: 1u32,
20077                                    expected: 2u8,
20078                                    actual: tag.wire_type() as u8,
20079                                });
20080                            }
20081                            view.date = ::buffa::types::borrow_str(&mut cur)?;
20082                        }
20083                        2u32 => {
20084                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
20085                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
20086                                    field_number: 2u32,
20087                                    expected: 0u8,
20088                                    actual: tag.wire_type() as u8,
20089                                });
20090                            }
20091                            view.count = ::buffa::types::decode_int64(&mut cur)?;
20092                        }
20093                        _ => {
20094                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
20095                            let span_len = before_tag.len() - cur.len();
20096                            view.__buffa_unknown_fields
20097                                .push_raw(&before_tag[..span_len]);
20098                        }
20099                    }
20100                }
20101                ::core::result::Result::Ok(())
20102            }
20103        }
20104        impl<'a> ::buffa::MessageView<'a> for StatBucketView<'a> {
20105            type Owned = super::super::StatBucket;
20106            fn decode_view(
20107                buf: &'a [u8],
20108            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20109                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
20110            }
20111            fn decode_view_with_limit(
20112                buf: &'a [u8],
20113                depth: u32,
20114            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20115                Self::_decode_depth(buf, depth)
20116            }
20117            fn to_owned_message(&self) -> super::super::StatBucket {
20118                self.to_owned_from_source(None)
20119            }
20120            #[allow(clippy::useless_conversion, clippy::needless_update)]
20121            fn to_owned_from_source(
20122                &self,
20123                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
20124            ) -> super::super::StatBucket {
20125                #[allow(unused_imports)]
20126                use ::buffa::alloc::string::ToString as _;
20127                let _ = __buffa_src;
20128                super::super::StatBucket {
20129                    date: self.date.to_string(),
20130                    count: self.count,
20131                    __buffa_unknown_fields: self
20132                        .__buffa_unknown_fields
20133                        .to_owned()
20134                        .unwrap_or_default()
20135                        .into(),
20136                    ..::core::default::Default::default()
20137                }
20138            }
20139        }
20140        impl<'a> ::buffa::ViewEncode<'a> for StatBucketView<'a> {
20141            #[allow(clippy::needless_borrow, clippy::let_and_return)]
20142            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
20143                #[allow(unused_imports)]
20144                use ::buffa::Enumeration as _;
20145                let mut size = 0u32;
20146                if !self.date.is_empty() {
20147                    size += 1u32 + ::buffa::types::string_encoded_len(&self.date) as u32;
20148                }
20149                if self.count != 0i64 {
20150                    size += 1u32 + ::buffa::types::int64_encoded_len(self.count) as u32;
20151                }
20152                size += self.__buffa_unknown_fields.encoded_len() as u32;
20153                size
20154            }
20155            #[allow(clippy::needless_borrow)]
20156            fn write_to(
20157                &self,
20158                _cache: &mut ::buffa::SizeCache,
20159                buf: &mut impl ::buffa::bytes::BufMut,
20160            ) {
20161                #[allow(unused_imports)]
20162                use ::buffa::Enumeration as _;
20163                if !self.date.is_empty() {
20164                    ::buffa::encoding::Tag::new(
20165                            1u32,
20166                            ::buffa::encoding::WireType::LengthDelimited,
20167                        )
20168                        .encode(buf);
20169                    ::buffa::types::encode_string(&self.date, buf);
20170                }
20171                if self.count != 0i64 {
20172                    ::buffa::encoding::Tag::new(
20173                            2u32,
20174                            ::buffa::encoding::WireType::Varint,
20175                        )
20176                        .encode(buf);
20177                    ::buffa::types::encode_int64(self.count, buf);
20178                }
20179                self.__buffa_unknown_fields.write_to(buf);
20180            }
20181        }
20182        /// Serializes this view as protobuf JSON.
20183        ///
20184        /// Implicit-presence fields with default values are omitted, `required`
20185        /// fields are always emitted, explicit-presence (`optional`) fields are
20186        /// emitted only when set, bytes fields are base64-encoded, and enum
20187        /// values are their proto name strings.
20188        ///
20189        /// This impl uses `serialize_map(None)` because the number of emitted
20190        /// fields depends on default-omission rules; serializers that require
20191        /// known map lengths (e.g. `bincode`) will return a runtime error.
20192        /// Use the owned message type for those formats.
20193        impl<'__a> ::serde::Serialize for StatBucketView<'__a> {
20194            fn serialize<__S: ::serde::Serializer>(
20195                &self,
20196                __s: __S,
20197            ) -> ::core::result::Result<__S::Ok, __S::Error> {
20198                use ::serde::ser::SerializeMap as _;
20199                let mut __map = __s.serialize_map(::core::option::Option::None)?;
20200                if !::buffa::json_helpers::skip_if::is_empty_str(self.date) {
20201                    __map.serialize_entry("date", self.date)?;
20202                }
20203                if !::buffa::json_helpers::skip_if::is_zero_i64(&self.count) {
20204                    struct _W(i64);
20205                    impl ::serde::Serialize for _W {
20206                        fn serialize<__S: ::serde::Serializer>(
20207                            &self,
20208                            __s: __S,
20209                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
20210                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
20211                        }
20212                    }
20213                    __map.serialize_entry("count", &_W(self.count))?;
20214                }
20215                __map.end()
20216            }
20217        }
20218        impl<'a> ::buffa::MessageName for StatBucketView<'a> {
20219            const PACKAGE: &'static str = "headwaters.read.v1";
20220            const NAME: &'static str = "StatBucket";
20221            const FULL_NAME: &'static str = "headwaters.read.v1.StatBucket";
20222            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.StatBucket";
20223        }
20224        impl<'v> ::buffa::DefaultViewInstance for StatBucketView<'v> {
20225            fn default_view_instance<'a>() -> &'a Self
20226            where
20227                Self: 'a,
20228            {
20229                static VALUE: ::buffa::__private::OnceBox<StatBucketView<'static>> = ::buffa::__private::OnceBox::new();
20230                VALUE
20231                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
20232                        <StatBucketView<'static>>::default(),
20233                    ))
20234            }
20235        }
20236        impl ::buffa::ViewReborrow for StatBucketView<'static> {
20237            type Reborrowed<'b> = StatBucketView<'b>;
20238            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
20239                this
20240            }
20241        }
20242        /** Self-contained, `'static` owned view of a `StatBucket` message.
20243
20244 Wraps [`::buffa::OwnedView`]`<`[`StatBucketView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
20245
20246 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`StatBucketView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
20247        #[derive(Clone, Debug)]
20248        pub struct StatBucketOwnedView(::buffa::OwnedView<StatBucketView<'static>>);
20249        impl StatBucketOwnedView {
20250            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
20251            ///
20252            /// The view borrows directly from the buffer's data; the buffer is
20253            /// retained inside the returned handle.
20254            ///
20255            /// # Errors
20256            ///
20257            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
20258            /// protobuf data.
20259            pub fn decode(
20260                bytes: ::buffa::bytes::Bytes,
20261            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20262                ::core::result::Result::Ok(
20263                    StatBucketOwnedView(::buffa::OwnedView::decode(bytes)?),
20264                )
20265            }
20266            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
20267            /// max message size).
20268            ///
20269            /// # Errors
20270            ///
20271            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
20272            /// exceeds the configured limits.
20273            pub fn decode_with_options(
20274                bytes: ::buffa::bytes::Bytes,
20275                opts: &::buffa::DecodeOptions,
20276            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20277                ::core::result::Result::Ok(
20278                    StatBucketOwnedView(
20279                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
20280                    ),
20281                )
20282            }
20283            /// Build from an owned message via an encode → decode round-trip.
20284            ///
20285            /// # Errors
20286            ///
20287            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
20288            /// somehow invalid (should not happen for well-formed messages).
20289            pub fn from_owned(
20290                msg: &super::super::StatBucket,
20291            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20292                ::core::result::Result::Ok(
20293                    StatBucketOwnedView(::buffa::OwnedView::from_owned(msg)?),
20294                )
20295            }
20296            /// Borrow the full [`StatBucketView`] with its lifetime tied to `&self`.
20297            #[must_use]
20298            pub fn view(&self) -> &StatBucketView<'_> {
20299                self.0.reborrow()
20300            }
20301            /// Convert to the owned message type.
20302            #[must_use]
20303            pub fn to_owned_message(&self) -> super::super::StatBucket {
20304                self.0.to_owned_message()
20305            }
20306            /// The underlying bytes buffer.
20307            #[must_use]
20308            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
20309                self.0.bytes()
20310            }
20311            /// Consume the handle, returning the underlying bytes buffer.
20312            #[must_use]
20313            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
20314                self.0.into_bytes()
20315            }
20316            /// Bucket start as an RFC 3339 date/time.
20317            ///
20318            /// Field 1: `date`
20319            #[must_use]
20320            pub fn date(&self) -> &'_ str {
20321                self.0.reborrow().date
20322            }
20323            /// Field 2: `count`
20324            #[must_use]
20325            pub fn count(&self) -> i64 {
20326                self.0.reborrow().count
20327            }
20328        }
20329        impl ::core::convert::From<::buffa::OwnedView<StatBucketView<'static>>>
20330        for StatBucketOwnedView {
20331            fn from(inner: ::buffa::OwnedView<StatBucketView<'static>>) -> Self {
20332                StatBucketOwnedView(inner)
20333            }
20334        }
20335        impl ::core::convert::From<StatBucketOwnedView>
20336        for ::buffa::OwnedView<StatBucketView<'static>> {
20337            fn from(wrapper: StatBucketOwnedView) -> Self {
20338                wrapper.0
20339            }
20340        }
20341        impl ::core::convert::AsRef<::buffa::OwnedView<StatBucketView<'static>>>
20342        for StatBucketOwnedView {
20343            fn as_ref(&self) -> &::buffa::OwnedView<StatBucketView<'static>> {
20344                &self.0
20345            }
20346        }
20347        impl ::buffa::HasMessageView for super::super::StatBucket {
20348            type View<'a> = StatBucketView<'a>;
20349            type ViewHandle = StatBucketOwnedView;
20350        }
20351        impl ::serde::Serialize for StatBucketOwnedView {
20352            fn serialize<__S: ::serde::Serializer>(
20353                &self,
20354                __s: __S,
20355            ) -> ::core::result::Result<__S::Ok, __S::Error> {
20356                ::serde::Serialize::serialize(&self.0, __s)
20357            }
20358        }
20359        /// A time series of `StatBucket`s. Returned by the stats endpoints; on the REST
20360        /// surface it serializes as a bare JSON array.
20361        #[derive(Clone, Debug, Default)]
20362        pub struct StatsResponseView<'a> {
20363            /// Field 1: `buckets`
20364            pub buckets: ::buffa::RepeatedView<
20365                'a,
20366                super::super::__buffa::view::StatBucketView<'a>,
20367            >,
20368            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
20369        }
20370        impl<'a> StatsResponseView<'a> {
20371            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
20372            ///
20373            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
20374            /// and by generated sub-message decode arms with `depth - 1`.
20375            ///
20376            /// **Not part of the public API.** Named with a leading underscore to
20377            /// signal that it is for generated-code use only.
20378            #[doc(hidden)]
20379            pub fn _decode_depth(
20380                buf: &'a [u8],
20381                depth: u32,
20382            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20383                let mut view = Self::default();
20384                view._merge_into_view(buf, depth)?;
20385                ::core::result::Result::Ok(view)
20386            }
20387            /// Merge fields from `buf` into this view (proto merge semantics).
20388            ///
20389            /// Repeated fields append; singular fields last-wins; singular
20390            /// MESSAGE fields merge recursively. Used by sub-message decode
20391            /// arms when the same field appears multiple times on the wire.
20392            ///
20393            /// **Not part of the public API.**
20394            #[doc(hidden)]
20395            pub fn _merge_into_view(
20396                &mut self,
20397                buf: &'a [u8],
20398                depth: u32,
20399            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
20400                let _ = depth;
20401                #[allow(unused_variables)]
20402                let view = self;
20403                let mut cur: &'a [u8] = buf;
20404                while !cur.is_empty() {
20405                    let before_tag = cur;
20406                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
20407                    match tag.field_number() {
20408                        1u32 => {
20409                            if tag.wire_type()
20410                                != ::buffa::encoding::WireType::LengthDelimited
20411                            {
20412                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
20413                                    field_number: 1u32,
20414                                    expected: 2u8,
20415                                    actual: tag.wire_type() as u8,
20416                                });
20417                            }
20418                            if depth == 0 {
20419                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
20420                            }
20421                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
20422                            view.buckets
20423                                .push(
20424                                    super::super::__buffa::view::StatBucketView::_decode_depth(
20425                                        sub,
20426                                        depth - 1,
20427                                    )?,
20428                                );
20429                        }
20430                        _ => {
20431                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
20432                            let span_len = before_tag.len() - cur.len();
20433                            view.__buffa_unknown_fields
20434                                .push_raw(&before_tag[..span_len]);
20435                        }
20436                    }
20437                }
20438                ::core::result::Result::Ok(())
20439            }
20440        }
20441        impl<'a> ::buffa::MessageView<'a> for StatsResponseView<'a> {
20442            type Owned = super::super::StatsResponse;
20443            fn decode_view(
20444                buf: &'a [u8],
20445            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20446                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
20447            }
20448            fn decode_view_with_limit(
20449                buf: &'a [u8],
20450                depth: u32,
20451            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20452                Self::_decode_depth(buf, depth)
20453            }
20454            fn to_owned_message(&self) -> super::super::StatsResponse {
20455                self.to_owned_from_source(None)
20456            }
20457            #[allow(clippy::useless_conversion, clippy::needless_update)]
20458            fn to_owned_from_source(
20459                &self,
20460                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
20461            ) -> super::super::StatsResponse {
20462                #[allow(unused_imports)]
20463                use ::buffa::alloc::string::ToString as _;
20464                let _ = __buffa_src;
20465                super::super::StatsResponse {
20466                    buckets: self
20467                        .buckets
20468                        .iter()
20469                        .map(|v| v.to_owned_from_source(__buffa_src))
20470                        .collect(),
20471                    __buffa_unknown_fields: self
20472                        .__buffa_unknown_fields
20473                        .to_owned()
20474                        .unwrap_or_default()
20475                        .into(),
20476                    ..::core::default::Default::default()
20477                }
20478            }
20479        }
20480        impl<'a> ::buffa::ViewEncode<'a> for StatsResponseView<'a> {
20481            #[allow(clippy::needless_borrow, clippy::let_and_return)]
20482            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
20483                #[allow(unused_imports)]
20484                use ::buffa::Enumeration as _;
20485                let mut size = 0u32;
20486                for v in &self.buckets {
20487                    let __slot = __cache.reserve();
20488                    let inner_size = v.compute_size(__cache);
20489                    __cache.set(__slot, inner_size);
20490                    size
20491                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
20492                            + inner_size;
20493                }
20494                size += self.__buffa_unknown_fields.encoded_len() as u32;
20495                size
20496            }
20497            #[allow(clippy::needless_borrow)]
20498            fn write_to(
20499                &self,
20500                __cache: &mut ::buffa::SizeCache,
20501                buf: &mut impl ::buffa::bytes::BufMut,
20502            ) {
20503                #[allow(unused_imports)]
20504                use ::buffa::Enumeration as _;
20505                for v in &self.buckets {
20506                    ::buffa::encoding::Tag::new(
20507                            1u32,
20508                            ::buffa::encoding::WireType::LengthDelimited,
20509                        )
20510                        .encode(buf);
20511                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
20512                    v.write_to(__cache, buf);
20513                }
20514                self.__buffa_unknown_fields.write_to(buf);
20515            }
20516        }
20517        /// Serializes this view as protobuf JSON.
20518        ///
20519        /// Implicit-presence fields with default values are omitted, `required`
20520        /// fields are always emitted, explicit-presence (`optional`) fields are
20521        /// emitted only when set, bytes fields are base64-encoded, and enum
20522        /// values are their proto name strings.
20523        ///
20524        /// This impl uses `serialize_map(None)` because the number of emitted
20525        /// fields depends on default-omission rules; serializers that require
20526        /// known map lengths (e.g. `bincode`) will return a runtime error.
20527        /// Use the owned message type for those formats.
20528        impl<'__a> ::serde::Serialize for StatsResponseView<'__a> {
20529            fn serialize<__S: ::serde::Serializer>(
20530                &self,
20531                __s: __S,
20532            ) -> ::core::result::Result<__S::Ok, __S::Error> {
20533                use ::serde::ser::SerializeMap as _;
20534                let mut __map = __s.serialize_map(::core::option::Option::None)?;
20535                if !self.buckets.is_empty() {
20536                    __map.serialize_entry("buckets", &*self.buckets)?;
20537                }
20538                __map.end()
20539            }
20540        }
20541        impl<'a> ::buffa::MessageName for StatsResponseView<'a> {
20542            const PACKAGE: &'static str = "headwaters.read.v1";
20543            const NAME: &'static str = "StatsResponse";
20544            const FULL_NAME: &'static str = "headwaters.read.v1.StatsResponse";
20545            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.StatsResponse";
20546        }
20547        impl<'v> ::buffa::DefaultViewInstance for StatsResponseView<'v> {
20548            fn default_view_instance<'a>() -> &'a Self
20549            where
20550                Self: 'a,
20551            {
20552                static VALUE: ::buffa::__private::OnceBox<StatsResponseView<'static>> = ::buffa::__private::OnceBox::new();
20553                VALUE
20554                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
20555                        <StatsResponseView<'static>>::default(),
20556                    ))
20557            }
20558        }
20559        impl ::buffa::ViewReborrow for StatsResponseView<'static> {
20560            type Reborrowed<'b> = StatsResponseView<'b>;
20561            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
20562                this
20563            }
20564        }
20565        /** Self-contained, `'static` owned view of a `StatsResponse` message.
20566
20567 Wraps [`::buffa::OwnedView`]`<`[`StatsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
20568
20569 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`StatsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
20570        #[derive(Clone, Debug)]
20571        pub struct StatsResponseOwnedView(
20572            ::buffa::OwnedView<StatsResponseView<'static>>,
20573        );
20574        impl StatsResponseOwnedView {
20575            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
20576            ///
20577            /// The view borrows directly from the buffer's data; the buffer is
20578            /// retained inside the returned handle.
20579            ///
20580            /// # Errors
20581            ///
20582            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
20583            /// protobuf data.
20584            pub fn decode(
20585                bytes: ::buffa::bytes::Bytes,
20586            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20587                ::core::result::Result::Ok(
20588                    StatsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
20589                )
20590            }
20591            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
20592            /// max message size).
20593            ///
20594            /// # Errors
20595            ///
20596            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
20597            /// exceeds the configured limits.
20598            pub fn decode_with_options(
20599                bytes: ::buffa::bytes::Bytes,
20600                opts: &::buffa::DecodeOptions,
20601            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20602                ::core::result::Result::Ok(
20603                    StatsResponseOwnedView(
20604                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
20605                    ),
20606                )
20607            }
20608            /// Build from an owned message via an encode → decode round-trip.
20609            ///
20610            /// # Errors
20611            ///
20612            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
20613            /// somehow invalid (should not happen for well-formed messages).
20614            pub fn from_owned(
20615                msg: &super::super::StatsResponse,
20616            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20617                ::core::result::Result::Ok(
20618                    StatsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
20619                )
20620            }
20621            /// Borrow the full [`StatsResponseView`] with its lifetime tied to `&self`.
20622            #[must_use]
20623            pub fn view(&self) -> &StatsResponseView<'_> {
20624                self.0.reborrow()
20625            }
20626            /// Convert to the owned message type.
20627            #[must_use]
20628            pub fn to_owned_message(&self) -> super::super::StatsResponse {
20629                self.0.to_owned_message()
20630            }
20631            /// The underlying bytes buffer.
20632            #[must_use]
20633            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
20634                self.0.bytes()
20635            }
20636            /// Consume the handle, returning the underlying bytes buffer.
20637            #[must_use]
20638            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
20639                self.0.into_bytes()
20640            }
20641            /// Field 1: `buckets`
20642            #[must_use]
20643            pub fn buckets(
20644                &self,
20645            ) -> &::buffa::RepeatedView<
20646                '_,
20647                super::super::__buffa::view::StatBucketView<'_>,
20648            > {
20649                &self.0.reborrow().buckets
20650            }
20651        }
20652        impl ::core::convert::From<::buffa::OwnedView<StatsResponseView<'static>>>
20653        for StatsResponseOwnedView {
20654            fn from(inner: ::buffa::OwnedView<StatsResponseView<'static>>) -> Self {
20655                StatsResponseOwnedView(inner)
20656            }
20657        }
20658        impl ::core::convert::From<StatsResponseOwnedView>
20659        for ::buffa::OwnedView<StatsResponseView<'static>> {
20660            fn from(wrapper: StatsResponseOwnedView) -> Self {
20661                wrapper.0
20662            }
20663        }
20664        impl ::core::convert::AsRef<::buffa::OwnedView<StatsResponseView<'static>>>
20665        for StatsResponseOwnedView {
20666            fn as_ref(&self) -> &::buffa::OwnedView<StatsResponseView<'static>> {
20667                &self.0
20668            }
20669        }
20670        impl ::buffa::HasMessageView for super::super::StatsResponse {
20671            type View<'a> = StatsResponseView<'a>;
20672            type ViewHandle = StatsResponseOwnedView;
20673        }
20674        impl ::serde::Serialize for StatsResponseOwnedView {
20675            fn serialize<__S: ::serde::Serializer>(
20676                &self,
20677                __s: __S,
20678            ) -> ::core::result::Result<__S::Ok, __S::Error> {
20679                ::serde::Serialize::serialize(&self.0, __s)
20680            }
20681        }
20682        /// --- request messages ---
20683        ///
20684        /// On the list endpoints, an empty `namespace` means all namespaces, and `limit`
20685        /// / `offset` page the results (`limit` defaults to a server-chosen page size, so
20686        /// 0 is treated as unset). On the REST surface, non-path fields (`limit`,
20687        /// `offset`, `q`, `nodeId`, `depth`, `period`, `type`) are query-string params
20688        /// named by their camelCase JSON name.
20689        #[derive(Clone, Debug, Default)]
20690        pub struct ListNamespacesRequestView<'a> {
20691            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
20692        }
20693        impl<'a> ListNamespacesRequestView<'a> {
20694            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
20695            ///
20696            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
20697            /// and by generated sub-message decode arms with `depth - 1`.
20698            ///
20699            /// **Not part of the public API.** Named with a leading underscore to
20700            /// signal that it is for generated-code use only.
20701            #[doc(hidden)]
20702            pub fn _decode_depth(
20703                buf: &'a [u8],
20704                depth: u32,
20705            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20706                let mut view = Self::default();
20707                view._merge_into_view(buf, depth)?;
20708                ::core::result::Result::Ok(view)
20709            }
20710            /// Merge fields from `buf` into this view (proto merge semantics).
20711            ///
20712            /// Repeated fields append; singular fields last-wins; singular
20713            /// MESSAGE fields merge recursively. Used by sub-message decode
20714            /// arms when the same field appears multiple times on the wire.
20715            ///
20716            /// **Not part of the public API.**
20717            #[doc(hidden)]
20718            pub fn _merge_into_view(
20719                &mut self,
20720                buf: &'a [u8],
20721                depth: u32,
20722            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
20723                let _ = depth;
20724                #[allow(unused_variables)]
20725                let view = self;
20726                let mut cur: &'a [u8] = buf;
20727                while !cur.is_empty() {
20728                    let before_tag = cur;
20729                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
20730                    match tag.field_number() {
20731                        _ => {
20732                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
20733                            let span_len = before_tag.len() - cur.len();
20734                            view.__buffa_unknown_fields
20735                                .push_raw(&before_tag[..span_len]);
20736                        }
20737                    }
20738                }
20739                ::core::result::Result::Ok(())
20740            }
20741        }
20742        impl<'a> ::buffa::MessageView<'a> for ListNamespacesRequestView<'a> {
20743            type Owned = super::super::ListNamespacesRequest;
20744            fn decode_view(
20745                buf: &'a [u8],
20746            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20747                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
20748            }
20749            fn decode_view_with_limit(
20750                buf: &'a [u8],
20751                depth: u32,
20752            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20753                Self::_decode_depth(buf, depth)
20754            }
20755            fn to_owned_message(&self) -> super::super::ListNamespacesRequest {
20756                self.to_owned_from_source(None)
20757            }
20758            #[allow(clippy::useless_conversion, clippy::needless_update)]
20759            fn to_owned_from_source(
20760                &self,
20761                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
20762            ) -> super::super::ListNamespacesRequest {
20763                #[allow(unused_imports)]
20764                use ::buffa::alloc::string::ToString as _;
20765                let _ = __buffa_src;
20766                super::super::ListNamespacesRequest {
20767                    __buffa_unknown_fields: self
20768                        .__buffa_unknown_fields
20769                        .to_owned()
20770                        .unwrap_or_default()
20771                        .into(),
20772                    ..::core::default::Default::default()
20773                }
20774            }
20775        }
20776        impl<'a> ::buffa::ViewEncode<'a> for ListNamespacesRequestView<'a> {
20777            #[allow(clippy::needless_borrow, clippy::let_and_return)]
20778            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
20779                #[allow(unused_imports)]
20780                use ::buffa::Enumeration as _;
20781                let mut size = 0u32;
20782                size += self.__buffa_unknown_fields.encoded_len() as u32;
20783                size
20784            }
20785            #[allow(clippy::needless_borrow)]
20786            fn write_to(
20787                &self,
20788                _cache: &mut ::buffa::SizeCache,
20789                buf: &mut impl ::buffa::bytes::BufMut,
20790            ) {
20791                #[allow(unused_imports)]
20792                use ::buffa::Enumeration as _;
20793                self.__buffa_unknown_fields.write_to(buf);
20794            }
20795        }
20796        /// Serializes this view as protobuf JSON.
20797        ///
20798        /// Implicit-presence fields with default values are omitted, `required`
20799        /// fields are always emitted, explicit-presence (`optional`) fields are
20800        /// emitted only when set, bytes fields are base64-encoded, and enum
20801        /// values are their proto name strings.
20802        ///
20803        /// This impl uses `serialize_map(None)` because the number of emitted
20804        /// fields depends on default-omission rules; serializers that require
20805        /// known map lengths (e.g. `bincode`) will return a runtime error.
20806        /// Use the owned message type for those formats.
20807        impl<'__a> ::serde::Serialize for ListNamespacesRequestView<'__a> {
20808            fn serialize<__S: ::serde::Serializer>(
20809                &self,
20810                __s: __S,
20811            ) -> ::core::result::Result<__S::Ok, __S::Error> {
20812                use ::serde::ser::SerializeMap as _;
20813                let mut __map = __s.serialize_map(::core::option::Option::None)?;
20814                __map.end()
20815            }
20816        }
20817        impl<'a> ::buffa::MessageName for ListNamespacesRequestView<'a> {
20818            const PACKAGE: &'static str = "headwaters.read.v1";
20819            const NAME: &'static str = "ListNamespacesRequest";
20820            const FULL_NAME: &'static str = "headwaters.read.v1.ListNamespacesRequest";
20821            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListNamespacesRequest";
20822        }
20823        impl<'v> ::buffa::DefaultViewInstance for ListNamespacesRequestView<'v> {
20824            fn default_view_instance<'a>() -> &'a Self
20825            where
20826                Self: 'a,
20827            {
20828                static VALUE: ::buffa::__private::OnceBox<
20829                    ListNamespacesRequestView<'static>,
20830                > = ::buffa::__private::OnceBox::new();
20831                VALUE
20832                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
20833                        <ListNamespacesRequestView<'static>>::default(),
20834                    ))
20835            }
20836        }
20837        impl ::buffa::ViewReborrow for ListNamespacesRequestView<'static> {
20838            type Reborrowed<'b> = ListNamespacesRequestView<'b>;
20839            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
20840                this
20841            }
20842        }
20843        /** Self-contained, `'static` owned view of a `ListNamespacesRequest` message.
20844
20845 Wraps [`::buffa::OwnedView`]`<`[`ListNamespacesRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
20846
20847 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListNamespacesRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
20848        #[derive(Clone, Debug)]
20849        pub struct ListNamespacesRequestOwnedView(
20850            ::buffa::OwnedView<ListNamespacesRequestView<'static>>,
20851        );
20852        impl ListNamespacesRequestOwnedView {
20853            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
20854            ///
20855            /// The view borrows directly from the buffer's data; the buffer is
20856            /// retained inside the returned handle.
20857            ///
20858            /// # Errors
20859            ///
20860            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
20861            /// protobuf data.
20862            pub fn decode(
20863                bytes: ::buffa::bytes::Bytes,
20864            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20865                ::core::result::Result::Ok(
20866                    ListNamespacesRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
20867                )
20868            }
20869            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
20870            /// max message size).
20871            ///
20872            /// # Errors
20873            ///
20874            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
20875            /// exceeds the configured limits.
20876            pub fn decode_with_options(
20877                bytes: ::buffa::bytes::Bytes,
20878                opts: &::buffa::DecodeOptions,
20879            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20880                ::core::result::Result::Ok(
20881                    ListNamespacesRequestOwnedView(
20882                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
20883                    ),
20884                )
20885            }
20886            /// Build from an owned message via an encode → decode round-trip.
20887            ///
20888            /// # Errors
20889            ///
20890            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
20891            /// somehow invalid (should not happen for well-formed messages).
20892            pub fn from_owned(
20893                msg: &super::super::ListNamespacesRequest,
20894            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20895                ::core::result::Result::Ok(
20896                    ListNamespacesRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
20897                )
20898            }
20899            /// Borrow the full [`ListNamespacesRequestView`] with its lifetime tied to `&self`.
20900            #[must_use]
20901            pub fn view(&self) -> &ListNamespacesRequestView<'_> {
20902                self.0.reborrow()
20903            }
20904            /// Convert to the owned message type.
20905            #[must_use]
20906            pub fn to_owned_message(&self) -> super::super::ListNamespacesRequest {
20907                self.0.to_owned_message()
20908            }
20909            /// The underlying bytes buffer.
20910            #[must_use]
20911            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
20912                self.0.bytes()
20913            }
20914            /// Consume the handle, returning the underlying bytes buffer.
20915            #[must_use]
20916            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
20917                self.0.into_bytes()
20918            }
20919        }
20920        impl ::core::convert::From<
20921            ::buffa::OwnedView<ListNamespacesRequestView<'static>>,
20922        > for ListNamespacesRequestOwnedView {
20923            fn from(
20924                inner: ::buffa::OwnedView<ListNamespacesRequestView<'static>>,
20925            ) -> Self {
20926                ListNamespacesRequestOwnedView(inner)
20927            }
20928        }
20929        impl ::core::convert::From<ListNamespacesRequestOwnedView>
20930        for ::buffa::OwnedView<ListNamespacesRequestView<'static>> {
20931            fn from(wrapper: ListNamespacesRequestOwnedView) -> Self {
20932                wrapper.0
20933            }
20934        }
20935        impl ::core::convert::AsRef<
20936            ::buffa::OwnedView<ListNamespacesRequestView<'static>>,
20937        > for ListNamespacesRequestOwnedView {
20938            fn as_ref(&self) -> &::buffa::OwnedView<ListNamespacesRequestView<'static>> {
20939                &self.0
20940            }
20941        }
20942        impl ::buffa::HasMessageView for super::super::ListNamespacesRequest {
20943            type View<'a> = ListNamespacesRequestView<'a>;
20944            type ViewHandle = ListNamespacesRequestOwnedView;
20945        }
20946        impl ::serde::Serialize for ListNamespacesRequestOwnedView {
20947            fn serialize<__S: ::serde::Serializer>(
20948                &self,
20949                __s: __S,
20950            ) -> ::core::result::Result<__S::Ok, __S::Error> {
20951                ::serde::Serialize::serialize(&self.0, __s)
20952            }
20953        }
20954        #[derive(Clone, Debug, Default)]
20955        pub struct ListJobsRequestView<'a> {
20956            /// Scope to this namespace; empty lists jobs across all namespaces.
20957            ///
20958            /// Field 1: `namespace`
20959            pub namespace: &'a str,
20960            /// Field 2: `limit`
20961            pub limit: i32,
20962            /// Field 3: `offset`
20963            pub offset: i32,
20964            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
20965        }
20966        impl<'a> ListJobsRequestView<'a> {
20967            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
20968            ///
20969            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
20970            /// and by generated sub-message decode arms with `depth - 1`.
20971            ///
20972            /// **Not part of the public API.** Named with a leading underscore to
20973            /// signal that it is for generated-code use only.
20974            #[doc(hidden)]
20975            pub fn _decode_depth(
20976                buf: &'a [u8],
20977                depth: u32,
20978            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
20979                let mut view = Self::default();
20980                view._merge_into_view(buf, depth)?;
20981                ::core::result::Result::Ok(view)
20982            }
20983            /// Merge fields from `buf` into this view (proto merge semantics).
20984            ///
20985            /// Repeated fields append; singular fields last-wins; singular
20986            /// MESSAGE fields merge recursively. Used by sub-message decode
20987            /// arms when the same field appears multiple times on the wire.
20988            ///
20989            /// **Not part of the public API.**
20990            #[doc(hidden)]
20991            pub fn _merge_into_view(
20992                &mut self,
20993                buf: &'a [u8],
20994                depth: u32,
20995            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
20996                let _ = depth;
20997                #[allow(unused_variables)]
20998                let view = self;
20999                let mut cur: &'a [u8] = buf;
21000                while !cur.is_empty() {
21001                    let before_tag = cur;
21002                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
21003                    match tag.field_number() {
21004                        1u32 => {
21005                            if tag.wire_type()
21006                                != ::buffa::encoding::WireType::LengthDelimited
21007                            {
21008                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
21009                                    field_number: 1u32,
21010                                    expected: 2u8,
21011                                    actual: tag.wire_type() as u8,
21012                                });
21013                            }
21014                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
21015                        }
21016                        2u32 => {
21017                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
21018                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
21019                                    field_number: 2u32,
21020                                    expected: 0u8,
21021                                    actual: tag.wire_type() as u8,
21022                                });
21023                            }
21024                            view.limit = ::buffa::types::decode_int32(&mut cur)?;
21025                        }
21026                        3u32 => {
21027                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
21028                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
21029                                    field_number: 3u32,
21030                                    expected: 0u8,
21031                                    actual: tag.wire_type() as u8,
21032                                });
21033                            }
21034                            view.offset = ::buffa::types::decode_int32(&mut cur)?;
21035                        }
21036                        _ => {
21037                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
21038                            let span_len = before_tag.len() - cur.len();
21039                            view.__buffa_unknown_fields
21040                                .push_raw(&before_tag[..span_len]);
21041                        }
21042                    }
21043                }
21044                ::core::result::Result::Ok(())
21045            }
21046        }
21047        impl<'a> ::buffa::MessageView<'a> for ListJobsRequestView<'a> {
21048            type Owned = super::super::ListJobsRequest;
21049            fn decode_view(
21050                buf: &'a [u8],
21051            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21052                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
21053            }
21054            fn decode_view_with_limit(
21055                buf: &'a [u8],
21056                depth: u32,
21057            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21058                Self::_decode_depth(buf, depth)
21059            }
21060            fn to_owned_message(&self) -> super::super::ListJobsRequest {
21061                self.to_owned_from_source(None)
21062            }
21063            #[allow(clippy::useless_conversion, clippy::needless_update)]
21064            fn to_owned_from_source(
21065                &self,
21066                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
21067            ) -> super::super::ListJobsRequest {
21068                #[allow(unused_imports)]
21069                use ::buffa::alloc::string::ToString as _;
21070                let _ = __buffa_src;
21071                super::super::ListJobsRequest {
21072                    namespace: self.namespace.to_string(),
21073                    limit: self.limit,
21074                    offset: self.offset,
21075                    __buffa_unknown_fields: self
21076                        .__buffa_unknown_fields
21077                        .to_owned()
21078                        .unwrap_or_default()
21079                        .into(),
21080                    ..::core::default::Default::default()
21081                }
21082            }
21083        }
21084        impl<'a> ::buffa::ViewEncode<'a> for ListJobsRequestView<'a> {
21085            #[allow(clippy::needless_borrow, clippy::let_and_return)]
21086            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
21087                #[allow(unused_imports)]
21088                use ::buffa::Enumeration as _;
21089                let mut size = 0u32;
21090                if !self.namespace.is_empty() {
21091                    size
21092                        += 1u32
21093                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
21094                }
21095                if self.limit != 0i32 {
21096                    size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
21097                }
21098                if self.offset != 0i32 {
21099                    size += 1u32 + ::buffa::types::int32_encoded_len(self.offset) as u32;
21100                }
21101                size += self.__buffa_unknown_fields.encoded_len() as u32;
21102                size
21103            }
21104            #[allow(clippy::needless_borrow)]
21105            fn write_to(
21106                &self,
21107                _cache: &mut ::buffa::SizeCache,
21108                buf: &mut impl ::buffa::bytes::BufMut,
21109            ) {
21110                #[allow(unused_imports)]
21111                use ::buffa::Enumeration as _;
21112                if !self.namespace.is_empty() {
21113                    ::buffa::encoding::Tag::new(
21114                            1u32,
21115                            ::buffa::encoding::WireType::LengthDelimited,
21116                        )
21117                        .encode(buf);
21118                    ::buffa::types::encode_string(&self.namespace, buf);
21119                }
21120                if self.limit != 0i32 {
21121                    ::buffa::encoding::Tag::new(
21122                            2u32,
21123                            ::buffa::encoding::WireType::Varint,
21124                        )
21125                        .encode(buf);
21126                    ::buffa::types::encode_int32(self.limit, buf);
21127                }
21128                if self.offset != 0i32 {
21129                    ::buffa::encoding::Tag::new(
21130                            3u32,
21131                            ::buffa::encoding::WireType::Varint,
21132                        )
21133                        .encode(buf);
21134                    ::buffa::types::encode_int32(self.offset, buf);
21135                }
21136                self.__buffa_unknown_fields.write_to(buf);
21137            }
21138        }
21139        /// Serializes this view as protobuf JSON.
21140        ///
21141        /// Implicit-presence fields with default values are omitted, `required`
21142        /// fields are always emitted, explicit-presence (`optional`) fields are
21143        /// emitted only when set, bytes fields are base64-encoded, and enum
21144        /// values are their proto name strings.
21145        ///
21146        /// This impl uses `serialize_map(None)` because the number of emitted
21147        /// fields depends on default-omission rules; serializers that require
21148        /// known map lengths (e.g. `bincode`) will return a runtime error.
21149        /// Use the owned message type for those formats.
21150        impl<'__a> ::serde::Serialize for ListJobsRequestView<'__a> {
21151            fn serialize<__S: ::serde::Serializer>(
21152                &self,
21153                __s: __S,
21154            ) -> ::core::result::Result<__S::Ok, __S::Error> {
21155                use ::serde::ser::SerializeMap as _;
21156                let mut __map = __s.serialize_map(::core::option::Option::None)?;
21157                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
21158                    __map.serialize_entry("namespace", self.namespace)?;
21159                }
21160                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.limit) {
21161                    struct _W(i32);
21162                    impl ::serde::Serialize for _W {
21163                        fn serialize<__S: ::serde::Serializer>(
21164                            &self,
21165                            __s: __S,
21166                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
21167                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
21168                        }
21169                    }
21170                    __map.serialize_entry("limit", &_W(self.limit))?;
21171                }
21172                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.offset) {
21173                    struct _W(i32);
21174                    impl ::serde::Serialize for _W {
21175                        fn serialize<__S: ::serde::Serializer>(
21176                            &self,
21177                            __s: __S,
21178                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
21179                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
21180                        }
21181                    }
21182                    __map.serialize_entry("offset", &_W(self.offset))?;
21183                }
21184                __map.end()
21185            }
21186        }
21187        impl<'a> ::buffa::MessageName for ListJobsRequestView<'a> {
21188            const PACKAGE: &'static str = "headwaters.read.v1";
21189            const NAME: &'static str = "ListJobsRequest";
21190            const FULL_NAME: &'static str = "headwaters.read.v1.ListJobsRequest";
21191            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListJobsRequest";
21192        }
21193        impl<'v> ::buffa::DefaultViewInstance for ListJobsRequestView<'v> {
21194            fn default_view_instance<'a>() -> &'a Self
21195            where
21196                Self: 'a,
21197            {
21198                static VALUE: ::buffa::__private::OnceBox<
21199                    ListJobsRequestView<'static>,
21200                > = ::buffa::__private::OnceBox::new();
21201                VALUE
21202                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
21203                        <ListJobsRequestView<'static>>::default(),
21204                    ))
21205            }
21206        }
21207        impl ::buffa::ViewReborrow for ListJobsRequestView<'static> {
21208            type Reborrowed<'b> = ListJobsRequestView<'b>;
21209            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
21210                this
21211            }
21212        }
21213        /** Self-contained, `'static` owned view of a `ListJobsRequest` message.
21214
21215 Wraps [`::buffa::OwnedView`]`<`[`ListJobsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
21216
21217 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListJobsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
21218        #[derive(Clone, Debug)]
21219        pub struct ListJobsRequestOwnedView(
21220            ::buffa::OwnedView<ListJobsRequestView<'static>>,
21221        );
21222        impl ListJobsRequestOwnedView {
21223            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
21224            ///
21225            /// The view borrows directly from the buffer's data; the buffer is
21226            /// retained inside the returned handle.
21227            ///
21228            /// # Errors
21229            ///
21230            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
21231            /// protobuf data.
21232            pub fn decode(
21233                bytes: ::buffa::bytes::Bytes,
21234            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21235                ::core::result::Result::Ok(
21236                    ListJobsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
21237                )
21238            }
21239            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
21240            /// max message size).
21241            ///
21242            /// # Errors
21243            ///
21244            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
21245            /// exceeds the configured limits.
21246            pub fn decode_with_options(
21247                bytes: ::buffa::bytes::Bytes,
21248                opts: &::buffa::DecodeOptions,
21249            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21250                ::core::result::Result::Ok(
21251                    ListJobsRequestOwnedView(
21252                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
21253                    ),
21254                )
21255            }
21256            /// Build from an owned message via an encode → decode round-trip.
21257            ///
21258            /// # Errors
21259            ///
21260            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
21261            /// somehow invalid (should not happen for well-formed messages).
21262            pub fn from_owned(
21263                msg: &super::super::ListJobsRequest,
21264            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21265                ::core::result::Result::Ok(
21266                    ListJobsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
21267                )
21268            }
21269            /// Borrow the full [`ListJobsRequestView`] with its lifetime tied to `&self`.
21270            #[must_use]
21271            pub fn view(&self) -> &ListJobsRequestView<'_> {
21272                self.0.reborrow()
21273            }
21274            /// Convert to the owned message type.
21275            #[must_use]
21276            pub fn to_owned_message(&self) -> super::super::ListJobsRequest {
21277                self.0.to_owned_message()
21278            }
21279            /// The underlying bytes buffer.
21280            #[must_use]
21281            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
21282                self.0.bytes()
21283            }
21284            /// Consume the handle, returning the underlying bytes buffer.
21285            #[must_use]
21286            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
21287                self.0.into_bytes()
21288            }
21289            /// Scope to this namespace; empty lists jobs across all namespaces.
21290            ///
21291            /// Field 1: `namespace`
21292            #[must_use]
21293            pub fn namespace(&self) -> &'_ str {
21294                self.0.reborrow().namespace
21295            }
21296            /// Field 2: `limit`
21297            #[must_use]
21298            pub fn limit(&self) -> i32 {
21299                self.0.reborrow().limit
21300            }
21301            /// Field 3: `offset`
21302            #[must_use]
21303            pub fn offset(&self) -> i32 {
21304                self.0.reborrow().offset
21305            }
21306        }
21307        impl ::core::convert::From<::buffa::OwnedView<ListJobsRequestView<'static>>>
21308        for ListJobsRequestOwnedView {
21309            fn from(inner: ::buffa::OwnedView<ListJobsRequestView<'static>>) -> Self {
21310                ListJobsRequestOwnedView(inner)
21311            }
21312        }
21313        impl ::core::convert::From<ListJobsRequestOwnedView>
21314        for ::buffa::OwnedView<ListJobsRequestView<'static>> {
21315            fn from(wrapper: ListJobsRequestOwnedView) -> Self {
21316                wrapper.0
21317            }
21318        }
21319        impl ::core::convert::AsRef<::buffa::OwnedView<ListJobsRequestView<'static>>>
21320        for ListJobsRequestOwnedView {
21321            fn as_ref(&self) -> &::buffa::OwnedView<ListJobsRequestView<'static>> {
21322                &self.0
21323            }
21324        }
21325        impl ::buffa::HasMessageView for super::super::ListJobsRequest {
21326            type View<'a> = ListJobsRequestView<'a>;
21327            type ViewHandle = ListJobsRequestOwnedView;
21328        }
21329        impl ::serde::Serialize for ListJobsRequestOwnedView {
21330            fn serialize<__S: ::serde::Serializer>(
21331                &self,
21332                __s: __S,
21333            ) -> ::core::result::Result<__S::Ok, __S::Error> {
21334                ::serde::Serialize::serialize(&self.0, __s)
21335            }
21336        }
21337        #[derive(Clone, Debug, Default)]
21338        pub struct GetJobRequestView<'a> {
21339            /// Field 1: `namespace`
21340            pub namespace: &'a str,
21341            /// Field 2: `name`
21342            pub name: &'a str,
21343            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
21344        }
21345        impl<'a> GetJobRequestView<'a> {
21346            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
21347            ///
21348            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
21349            /// and by generated sub-message decode arms with `depth - 1`.
21350            ///
21351            /// **Not part of the public API.** Named with a leading underscore to
21352            /// signal that it is for generated-code use only.
21353            #[doc(hidden)]
21354            pub fn _decode_depth(
21355                buf: &'a [u8],
21356                depth: u32,
21357            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21358                let mut view = Self::default();
21359                view._merge_into_view(buf, depth)?;
21360                ::core::result::Result::Ok(view)
21361            }
21362            /// Merge fields from `buf` into this view (proto merge semantics).
21363            ///
21364            /// Repeated fields append; singular fields last-wins; singular
21365            /// MESSAGE fields merge recursively. Used by sub-message decode
21366            /// arms when the same field appears multiple times on the wire.
21367            ///
21368            /// **Not part of the public API.**
21369            #[doc(hidden)]
21370            pub fn _merge_into_view(
21371                &mut self,
21372                buf: &'a [u8],
21373                depth: u32,
21374            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
21375                let _ = depth;
21376                #[allow(unused_variables)]
21377                let view = self;
21378                let mut cur: &'a [u8] = buf;
21379                while !cur.is_empty() {
21380                    let before_tag = cur;
21381                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
21382                    match tag.field_number() {
21383                        1u32 => {
21384                            if tag.wire_type()
21385                                != ::buffa::encoding::WireType::LengthDelimited
21386                            {
21387                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
21388                                    field_number: 1u32,
21389                                    expected: 2u8,
21390                                    actual: tag.wire_type() as u8,
21391                                });
21392                            }
21393                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
21394                        }
21395                        2u32 => {
21396                            if tag.wire_type()
21397                                != ::buffa::encoding::WireType::LengthDelimited
21398                            {
21399                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
21400                                    field_number: 2u32,
21401                                    expected: 2u8,
21402                                    actual: tag.wire_type() as u8,
21403                                });
21404                            }
21405                            view.name = ::buffa::types::borrow_str(&mut cur)?;
21406                        }
21407                        _ => {
21408                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
21409                            let span_len = before_tag.len() - cur.len();
21410                            view.__buffa_unknown_fields
21411                                .push_raw(&before_tag[..span_len]);
21412                        }
21413                    }
21414                }
21415                ::core::result::Result::Ok(())
21416            }
21417        }
21418        impl<'a> ::buffa::MessageView<'a> for GetJobRequestView<'a> {
21419            type Owned = super::super::GetJobRequest;
21420            fn decode_view(
21421                buf: &'a [u8],
21422            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21423                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
21424            }
21425            fn decode_view_with_limit(
21426                buf: &'a [u8],
21427                depth: u32,
21428            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21429                Self::_decode_depth(buf, depth)
21430            }
21431            fn to_owned_message(&self) -> super::super::GetJobRequest {
21432                self.to_owned_from_source(None)
21433            }
21434            #[allow(clippy::useless_conversion, clippy::needless_update)]
21435            fn to_owned_from_source(
21436                &self,
21437                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
21438            ) -> super::super::GetJobRequest {
21439                #[allow(unused_imports)]
21440                use ::buffa::alloc::string::ToString as _;
21441                let _ = __buffa_src;
21442                super::super::GetJobRequest {
21443                    namespace: self.namespace.to_string(),
21444                    name: self.name.to_string(),
21445                    __buffa_unknown_fields: self
21446                        .__buffa_unknown_fields
21447                        .to_owned()
21448                        .unwrap_or_default()
21449                        .into(),
21450                    ..::core::default::Default::default()
21451                }
21452            }
21453        }
21454        impl<'a> ::buffa::ViewEncode<'a> for GetJobRequestView<'a> {
21455            #[allow(clippy::needless_borrow, clippy::let_and_return)]
21456            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
21457                #[allow(unused_imports)]
21458                use ::buffa::Enumeration as _;
21459                let mut size = 0u32;
21460                if !self.namespace.is_empty() {
21461                    size
21462                        += 1u32
21463                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
21464                }
21465                if !self.name.is_empty() {
21466                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
21467                }
21468                size += self.__buffa_unknown_fields.encoded_len() as u32;
21469                size
21470            }
21471            #[allow(clippy::needless_borrow)]
21472            fn write_to(
21473                &self,
21474                _cache: &mut ::buffa::SizeCache,
21475                buf: &mut impl ::buffa::bytes::BufMut,
21476            ) {
21477                #[allow(unused_imports)]
21478                use ::buffa::Enumeration as _;
21479                if !self.namespace.is_empty() {
21480                    ::buffa::encoding::Tag::new(
21481                            1u32,
21482                            ::buffa::encoding::WireType::LengthDelimited,
21483                        )
21484                        .encode(buf);
21485                    ::buffa::types::encode_string(&self.namespace, buf);
21486                }
21487                if !self.name.is_empty() {
21488                    ::buffa::encoding::Tag::new(
21489                            2u32,
21490                            ::buffa::encoding::WireType::LengthDelimited,
21491                        )
21492                        .encode(buf);
21493                    ::buffa::types::encode_string(&self.name, buf);
21494                }
21495                self.__buffa_unknown_fields.write_to(buf);
21496            }
21497        }
21498        /// Serializes this view as protobuf JSON.
21499        ///
21500        /// Implicit-presence fields with default values are omitted, `required`
21501        /// fields are always emitted, explicit-presence (`optional`) fields are
21502        /// emitted only when set, bytes fields are base64-encoded, and enum
21503        /// values are their proto name strings.
21504        ///
21505        /// This impl uses `serialize_map(None)` because the number of emitted
21506        /// fields depends on default-omission rules; serializers that require
21507        /// known map lengths (e.g. `bincode`) will return a runtime error.
21508        /// Use the owned message type for those formats.
21509        impl<'__a> ::serde::Serialize for GetJobRequestView<'__a> {
21510            fn serialize<__S: ::serde::Serializer>(
21511                &self,
21512                __s: __S,
21513            ) -> ::core::result::Result<__S::Ok, __S::Error> {
21514                use ::serde::ser::SerializeMap as _;
21515                let mut __map = __s.serialize_map(::core::option::Option::None)?;
21516                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
21517                    __map.serialize_entry("namespace", self.namespace)?;
21518                }
21519                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
21520                    __map.serialize_entry("name", self.name)?;
21521                }
21522                __map.end()
21523            }
21524        }
21525        impl<'a> ::buffa::MessageName for GetJobRequestView<'a> {
21526            const PACKAGE: &'static str = "headwaters.read.v1";
21527            const NAME: &'static str = "GetJobRequest";
21528            const FULL_NAME: &'static str = "headwaters.read.v1.GetJobRequest";
21529            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetJobRequest";
21530        }
21531        impl<'v> ::buffa::DefaultViewInstance for GetJobRequestView<'v> {
21532            fn default_view_instance<'a>() -> &'a Self
21533            where
21534                Self: 'a,
21535            {
21536                static VALUE: ::buffa::__private::OnceBox<GetJobRequestView<'static>> = ::buffa::__private::OnceBox::new();
21537                VALUE
21538                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
21539                        <GetJobRequestView<'static>>::default(),
21540                    ))
21541            }
21542        }
21543        impl ::buffa::ViewReborrow for GetJobRequestView<'static> {
21544            type Reborrowed<'b> = GetJobRequestView<'b>;
21545            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
21546                this
21547            }
21548        }
21549        /** Self-contained, `'static` owned view of a `GetJobRequest` message.
21550
21551 Wraps [`::buffa::OwnedView`]`<`[`GetJobRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
21552
21553 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetJobRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
21554        #[derive(Clone, Debug)]
21555        pub struct GetJobRequestOwnedView(
21556            ::buffa::OwnedView<GetJobRequestView<'static>>,
21557        );
21558        impl GetJobRequestOwnedView {
21559            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
21560            ///
21561            /// The view borrows directly from the buffer's data; the buffer is
21562            /// retained inside the returned handle.
21563            ///
21564            /// # Errors
21565            ///
21566            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
21567            /// protobuf data.
21568            pub fn decode(
21569                bytes: ::buffa::bytes::Bytes,
21570            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21571                ::core::result::Result::Ok(
21572                    GetJobRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
21573                )
21574            }
21575            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
21576            /// max message size).
21577            ///
21578            /// # Errors
21579            ///
21580            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
21581            /// exceeds the configured limits.
21582            pub fn decode_with_options(
21583                bytes: ::buffa::bytes::Bytes,
21584                opts: &::buffa::DecodeOptions,
21585            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21586                ::core::result::Result::Ok(
21587                    GetJobRequestOwnedView(
21588                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
21589                    ),
21590                )
21591            }
21592            /// Build from an owned message via an encode → decode round-trip.
21593            ///
21594            /// # Errors
21595            ///
21596            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
21597            /// somehow invalid (should not happen for well-formed messages).
21598            pub fn from_owned(
21599                msg: &super::super::GetJobRequest,
21600            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21601                ::core::result::Result::Ok(
21602                    GetJobRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
21603                )
21604            }
21605            /// Borrow the full [`GetJobRequestView`] with its lifetime tied to `&self`.
21606            #[must_use]
21607            pub fn view(&self) -> &GetJobRequestView<'_> {
21608                self.0.reborrow()
21609            }
21610            /// Convert to the owned message type.
21611            #[must_use]
21612            pub fn to_owned_message(&self) -> super::super::GetJobRequest {
21613                self.0.to_owned_message()
21614            }
21615            /// The underlying bytes buffer.
21616            #[must_use]
21617            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
21618                self.0.bytes()
21619            }
21620            /// Consume the handle, returning the underlying bytes buffer.
21621            #[must_use]
21622            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
21623                self.0.into_bytes()
21624            }
21625            /// Field 1: `namespace`
21626            #[must_use]
21627            pub fn namespace(&self) -> &'_ str {
21628                self.0.reborrow().namespace
21629            }
21630            /// Field 2: `name`
21631            #[must_use]
21632            pub fn name(&self) -> &'_ str {
21633                self.0.reborrow().name
21634            }
21635        }
21636        impl ::core::convert::From<::buffa::OwnedView<GetJobRequestView<'static>>>
21637        for GetJobRequestOwnedView {
21638            fn from(inner: ::buffa::OwnedView<GetJobRequestView<'static>>) -> Self {
21639                GetJobRequestOwnedView(inner)
21640            }
21641        }
21642        impl ::core::convert::From<GetJobRequestOwnedView>
21643        for ::buffa::OwnedView<GetJobRequestView<'static>> {
21644            fn from(wrapper: GetJobRequestOwnedView) -> Self {
21645                wrapper.0
21646            }
21647        }
21648        impl ::core::convert::AsRef<::buffa::OwnedView<GetJobRequestView<'static>>>
21649        for GetJobRequestOwnedView {
21650            fn as_ref(&self) -> &::buffa::OwnedView<GetJobRequestView<'static>> {
21651                &self.0
21652            }
21653        }
21654        impl ::buffa::HasMessageView for super::super::GetJobRequest {
21655            type View<'a> = GetJobRequestView<'a>;
21656            type ViewHandle = GetJobRequestOwnedView;
21657        }
21658        impl ::serde::Serialize for GetJobRequestOwnedView {
21659            fn serialize<__S: ::serde::Serializer>(
21660                &self,
21661                __s: __S,
21662            ) -> ::core::result::Result<__S::Ok, __S::Error> {
21663                ::serde::Serialize::serialize(&self.0, __s)
21664            }
21665        }
21666        #[derive(Clone, Debug, Default)]
21667        pub struct GetJobRunsRequestView<'a> {
21668            /// Field 1: `namespace`
21669            pub namespace: &'a str,
21670            /// Field 2: `name`
21671            pub name: &'a str,
21672            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
21673        }
21674        impl<'a> GetJobRunsRequestView<'a> {
21675            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
21676            ///
21677            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
21678            /// and by generated sub-message decode arms with `depth - 1`.
21679            ///
21680            /// **Not part of the public API.** Named with a leading underscore to
21681            /// signal that it is for generated-code use only.
21682            #[doc(hidden)]
21683            pub fn _decode_depth(
21684                buf: &'a [u8],
21685                depth: u32,
21686            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21687                let mut view = Self::default();
21688                view._merge_into_view(buf, depth)?;
21689                ::core::result::Result::Ok(view)
21690            }
21691            /// Merge fields from `buf` into this view (proto merge semantics).
21692            ///
21693            /// Repeated fields append; singular fields last-wins; singular
21694            /// MESSAGE fields merge recursively. Used by sub-message decode
21695            /// arms when the same field appears multiple times on the wire.
21696            ///
21697            /// **Not part of the public API.**
21698            #[doc(hidden)]
21699            pub fn _merge_into_view(
21700                &mut self,
21701                buf: &'a [u8],
21702                depth: u32,
21703            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
21704                let _ = depth;
21705                #[allow(unused_variables)]
21706                let view = self;
21707                let mut cur: &'a [u8] = buf;
21708                while !cur.is_empty() {
21709                    let before_tag = cur;
21710                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
21711                    match tag.field_number() {
21712                        1u32 => {
21713                            if tag.wire_type()
21714                                != ::buffa::encoding::WireType::LengthDelimited
21715                            {
21716                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
21717                                    field_number: 1u32,
21718                                    expected: 2u8,
21719                                    actual: tag.wire_type() as u8,
21720                                });
21721                            }
21722                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
21723                        }
21724                        2u32 => {
21725                            if tag.wire_type()
21726                                != ::buffa::encoding::WireType::LengthDelimited
21727                            {
21728                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
21729                                    field_number: 2u32,
21730                                    expected: 2u8,
21731                                    actual: tag.wire_type() as u8,
21732                                });
21733                            }
21734                            view.name = ::buffa::types::borrow_str(&mut cur)?;
21735                        }
21736                        _ => {
21737                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
21738                            let span_len = before_tag.len() - cur.len();
21739                            view.__buffa_unknown_fields
21740                                .push_raw(&before_tag[..span_len]);
21741                        }
21742                    }
21743                }
21744                ::core::result::Result::Ok(())
21745            }
21746        }
21747        impl<'a> ::buffa::MessageView<'a> for GetJobRunsRequestView<'a> {
21748            type Owned = super::super::GetJobRunsRequest;
21749            fn decode_view(
21750                buf: &'a [u8],
21751            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21752                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
21753            }
21754            fn decode_view_with_limit(
21755                buf: &'a [u8],
21756                depth: u32,
21757            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21758                Self::_decode_depth(buf, depth)
21759            }
21760            fn to_owned_message(&self) -> super::super::GetJobRunsRequest {
21761                self.to_owned_from_source(None)
21762            }
21763            #[allow(clippy::useless_conversion, clippy::needless_update)]
21764            fn to_owned_from_source(
21765                &self,
21766                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
21767            ) -> super::super::GetJobRunsRequest {
21768                #[allow(unused_imports)]
21769                use ::buffa::alloc::string::ToString as _;
21770                let _ = __buffa_src;
21771                super::super::GetJobRunsRequest {
21772                    namespace: self.namespace.to_string(),
21773                    name: self.name.to_string(),
21774                    __buffa_unknown_fields: self
21775                        .__buffa_unknown_fields
21776                        .to_owned()
21777                        .unwrap_or_default()
21778                        .into(),
21779                    ..::core::default::Default::default()
21780                }
21781            }
21782        }
21783        impl<'a> ::buffa::ViewEncode<'a> for GetJobRunsRequestView<'a> {
21784            #[allow(clippy::needless_borrow, clippy::let_and_return)]
21785            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
21786                #[allow(unused_imports)]
21787                use ::buffa::Enumeration as _;
21788                let mut size = 0u32;
21789                if !self.namespace.is_empty() {
21790                    size
21791                        += 1u32
21792                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
21793                }
21794                if !self.name.is_empty() {
21795                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
21796                }
21797                size += self.__buffa_unknown_fields.encoded_len() as u32;
21798                size
21799            }
21800            #[allow(clippy::needless_borrow)]
21801            fn write_to(
21802                &self,
21803                _cache: &mut ::buffa::SizeCache,
21804                buf: &mut impl ::buffa::bytes::BufMut,
21805            ) {
21806                #[allow(unused_imports)]
21807                use ::buffa::Enumeration as _;
21808                if !self.namespace.is_empty() {
21809                    ::buffa::encoding::Tag::new(
21810                            1u32,
21811                            ::buffa::encoding::WireType::LengthDelimited,
21812                        )
21813                        .encode(buf);
21814                    ::buffa::types::encode_string(&self.namespace, buf);
21815                }
21816                if !self.name.is_empty() {
21817                    ::buffa::encoding::Tag::new(
21818                            2u32,
21819                            ::buffa::encoding::WireType::LengthDelimited,
21820                        )
21821                        .encode(buf);
21822                    ::buffa::types::encode_string(&self.name, buf);
21823                }
21824                self.__buffa_unknown_fields.write_to(buf);
21825            }
21826        }
21827        /// Serializes this view as protobuf JSON.
21828        ///
21829        /// Implicit-presence fields with default values are omitted, `required`
21830        /// fields are always emitted, explicit-presence (`optional`) fields are
21831        /// emitted only when set, bytes fields are base64-encoded, and enum
21832        /// values are their proto name strings.
21833        ///
21834        /// This impl uses `serialize_map(None)` because the number of emitted
21835        /// fields depends on default-omission rules; serializers that require
21836        /// known map lengths (e.g. `bincode`) will return a runtime error.
21837        /// Use the owned message type for those formats.
21838        impl<'__a> ::serde::Serialize for GetJobRunsRequestView<'__a> {
21839            fn serialize<__S: ::serde::Serializer>(
21840                &self,
21841                __s: __S,
21842            ) -> ::core::result::Result<__S::Ok, __S::Error> {
21843                use ::serde::ser::SerializeMap as _;
21844                let mut __map = __s.serialize_map(::core::option::Option::None)?;
21845                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
21846                    __map.serialize_entry("namespace", self.namespace)?;
21847                }
21848                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
21849                    __map.serialize_entry("name", self.name)?;
21850                }
21851                __map.end()
21852            }
21853        }
21854        impl<'a> ::buffa::MessageName for GetJobRunsRequestView<'a> {
21855            const PACKAGE: &'static str = "headwaters.read.v1";
21856            const NAME: &'static str = "GetJobRunsRequest";
21857            const FULL_NAME: &'static str = "headwaters.read.v1.GetJobRunsRequest";
21858            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetJobRunsRequest";
21859        }
21860        impl<'v> ::buffa::DefaultViewInstance for GetJobRunsRequestView<'v> {
21861            fn default_view_instance<'a>() -> &'a Self
21862            where
21863                Self: 'a,
21864            {
21865                static VALUE: ::buffa::__private::OnceBox<
21866                    GetJobRunsRequestView<'static>,
21867                > = ::buffa::__private::OnceBox::new();
21868                VALUE
21869                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
21870                        <GetJobRunsRequestView<'static>>::default(),
21871                    ))
21872            }
21873        }
21874        impl ::buffa::ViewReborrow for GetJobRunsRequestView<'static> {
21875            type Reborrowed<'b> = GetJobRunsRequestView<'b>;
21876            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
21877                this
21878            }
21879        }
21880        /** Self-contained, `'static` owned view of a `GetJobRunsRequest` message.
21881
21882 Wraps [`::buffa::OwnedView`]`<`[`GetJobRunsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
21883
21884 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetJobRunsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
21885        #[derive(Clone, Debug)]
21886        pub struct GetJobRunsRequestOwnedView(
21887            ::buffa::OwnedView<GetJobRunsRequestView<'static>>,
21888        );
21889        impl GetJobRunsRequestOwnedView {
21890            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
21891            ///
21892            /// The view borrows directly from the buffer's data; the buffer is
21893            /// retained inside the returned handle.
21894            ///
21895            /// # Errors
21896            ///
21897            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
21898            /// protobuf data.
21899            pub fn decode(
21900                bytes: ::buffa::bytes::Bytes,
21901            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21902                ::core::result::Result::Ok(
21903                    GetJobRunsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
21904                )
21905            }
21906            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
21907            /// max message size).
21908            ///
21909            /// # Errors
21910            ///
21911            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
21912            /// exceeds the configured limits.
21913            pub fn decode_with_options(
21914                bytes: ::buffa::bytes::Bytes,
21915                opts: &::buffa::DecodeOptions,
21916            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21917                ::core::result::Result::Ok(
21918                    GetJobRunsRequestOwnedView(
21919                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
21920                    ),
21921                )
21922            }
21923            /// Build from an owned message via an encode → decode round-trip.
21924            ///
21925            /// # Errors
21926            ///
21927            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
21928            /// somehow invalid (should not happen for well-formed messages).
21929            pub fn from_owned(
21930                msg: &super::super::GetJobRunsRequest,
21931            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
21932                ::core::result::Result::Ok(
21933                    GetJobRunsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
21934                )
21935            }
21936            /// Borrow the full [`GetJobRunsRequestView`] with its lifetime tied to `&self`.
21937            #[must_use]
21938            pub fn view(&self) -> &GetJobRunsRequestView<'_> {
21939                self.0.reborrow()
21940            }
21941            /// Convert to the owned message type.
21942            #[must_use]
21943            pub fn to_owned_message(&self) -> super::super::GetJobRunsRequest {
21944                self.0.to_owned_message()
21945            }
21946            /// The underlying bytes buffer.
21947            #[must_use]
21948            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
21949                self.0.bytes()
21950            }
21951            /// Consume the handle, returning the underlying bytes buffer.
21952            #[must_use]
21953            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
21954                self.0.into_bytes()
21955            }
21956            /// Field 1: `namespace`
21957            #[must_use]
21958            pub fn namespace(&self) -> &'_ str {
21959                self.0.reborrow().namespace
21960            }
21961            /// Field 2: `name`
21962            #[must_use]
21963            pub fn name(&self) -> &'_ str {
21964                self.0.reborrow().name
21965            }
21966        }
21967        impl ::core::convert::From<::buffa::OwnedView<GetJobRunsRequestView<'static>>>
21968        for GetJobRunsRequestOwnedView {
21969            fn from(inner: ::buffa::OwnedView<GetJobRunsRequestView<'static>>) -> Self {
21970                GetJobRunsRequestOwnedView(inner)
21971            }
21972        }
21973        impl ::core::convert::From<GetJobRunsRequestOwnedView>
21974        for ::buffa::OwnedView<GetJobRunsRequestView<'static>> {
21975            fn from(wrapper: GetJobRunsRequestOwnedView) -> Self {
21976                wrapper.0
21977            }
21978        }
21979        impl ::core::convert::AsRef<::buffa::OwnedView<GetJobRunsRequestView<'static>>>
21980        for GetJobRunsRequestOwnedView {
21981            fn as_ref(&self) -> &::buffa::OwnedView<GetJobRunsRequestView<'static>> {
21982                &self.0
21983            }
21984        }
21985        impl ::buffa::HasMessageView for super::super::GetJobRunsRequest {
21986            type View<'a> = GetJobRunsRequestView<'a>;
21987            type ViewHandle = GetJobRunsRequestOwnedView;
21988        }
21989        impl ::serde::Serialize for GetJobRunsRequestOwnedView {
21990            fn serialize<__S: ::serde::Serializer>(
21991                &self,
21992                __s: __S,
21993            ) -> ::core::result::Result<__S::Ok, __S::Error> {
21994                ::serde::Serialize::serialize(&self.0, __s)
21995            }
21996        }
21997        #[derive(Clone, Debug, Default)]
21998        pub struct ListDatasetsRequestView<'a> {
21999            /// Scope to this namespace; empty lists datasets across all namespaces.
22000            ///
22001            /// Field 1: `namespace`
22002            pub namespace: &'a str,
22003            /// Field 2: `limit`
22004            pub limit: i32,
22005            /// Field 3: `offset`
22006            pub offset: i32,
22007            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
22008        }
22009        impl<'a> ListDatasetsRequestView<'a> {
22010            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
22011            ///
22012            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
22013            /// and by generated sub-message decode arms with `depth - 1`.
22014            ///
22015            /// **Not part of the public API.** Named with a leading underscore to
22016            /// signal that it is for generated-code use only.
22017            #[doc(hidden)]
22018            pub fn _decode_depth(
22019                buf: &'a [u8],
22020                depth: u32,
22021            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22022                let mut view = Self::default();
22023                view._merge_into_view(buf, depth)?;
22024                ::core::result::Result::Ok(view)
22025            }
22026            /// Merge fields from `buf` into this view (proto merge semantics).
22027            ///
22028            /// Repeated fields append; singular fields last-wins; singular
22029            /// MESSAGE fields merge recursively. Used by sub-message decode
22030            /// arms when the same field appears multiple times on the wire.
22031            ///
22032            /// **Not part of the public API.**
22033            #[doc(hidden)]
22034            pub fn _merge_into_view(
22035                &mut self,
22036                buf: &'a [u8],
22037                depth: u32,
22038            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
22039                let _ = depth;
22040                #[allow(unused_variables)]
22041                let view = self;
22042                let mut cur: &'a [u8] = buf;
22043                while !cur.is_empty() {
22044                    let before_tag = cur;
22045                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
22046                    match tag.field_number() {
22047                        1u32 => {
22048                            if tag.wire_type()
22049                                != ::buffa::encoding::WireType::LengthDelimited
22050                            {
22051                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22052                                    field_number: 1u32,
22053                                    expected: 2u8,
22054                                    actual: tag.wire_type() as u8,
22055                                });
22056                            }
22057                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
22058                        }
22059                        2u32 => {
22060                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
22061                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22062                                    field_number: 2u32,
22063                                    expected: 0u8,
22064                                    actual: tag.wire_type() as u8,
22065                                });
22066                            }
22067                            view.limit = ::buffa::types::decode_int32(&mut cur)?;
22068                        }
22069                        3u32 => {
22070                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
22071                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22072                                    field_number: 3u32,
22073                                    expected: 0u8,
22074                                    actual: tag.wire_type() as u8,
22075                                });
22076                            }
22077                            view.offset = ::buffa::types::decode_int32(&mut cur)?;
22078                        }
22079                        _ => {
22080                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
22081                            let span_len = before_tag.len() - cur.len();
22082                            view.__buffa_unknown_fields
22083                                .push_raw(&before_tag[..span_len]);
22084                        }
22085                    }
22086                }
22087                ::core::result::Result::Ok(())
22088            }
22089        }
22090        impl<'a> ::buffa::MessageView<'a> for ListDatasetsRequestView<'a> {
22091            type Owned = super::super::ListDatasetsRequest;
22092            fn decode_view(
22093                buf: &'a [u8],
22094            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22095                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
22096            }
22097            fn decode_view_with_limit(
22098                buf: &'a [u8],
22099                depth: u32,
22100            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22101                Self::_decode_depth(buf, depth)
22102            }
22103            fn to_owned_message(&self) -> super::super::ListDatasetsRequest {
22104                self.to_owned_from_source(None)
22105            }
22106            #[allow(clippy::useless_conversion, clippy::needless_update)]
22107            fn to_owned_from_source(
22108                &self,
22109                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
22110            ) -> super::super::ListDatasetsRequest {
22111                #[allow(unused_imports)]
22112                use ::buffa::alloc::string::ToString as _;
22113                let _ = __buffa_src;
22114                super::super::ListDatasetsRequest {
22115                    namespace: self.namespace.to_string(),
22116                    limit: self.limit,
22117                    offset: self.offset,
22118                    __buffa_unknown_fields: self
22119                        .__buffa_unknown_fields
22120                        .to_owned()
22121                        .unwrap_or_default()
22122                        .into(),
22123                    ..::core::default::Default::default()
22124                }
22125            }
22126        }
22127        impl<'a> ::buffa::ViewEncode<'a> for ListDatasetsRequestView<'a> {
22128            #[allow(clippy::needless_borrow, clippy::let_and_return)]
22129            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
22130                #[allow(unused_imports)]
22131                use ::buffa::Enumeration as _;
22132                let mut size = 0u32;
22133                if !self.namespace.is_empty() {
22134                    size
22135                        += 1u32
22136                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
22137                }
22138                if self.limit != 0i32 {
22139                    size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
22140                }
22141                if self.offset != 0i32 {
22142                    size += 1u32 + ::buffa::types::int32_encoded_len(self.offset) as u32;
22143                }
22144                size += self.__buffa_unknown_fields.encoded_len() as u32;
22145                size
22146            }
22147            #[allow(clippy::needless_borrow)]
22148            fn write_to(
22149                &self,
22150                _cache: &mut ::buffa::SizeCache,
22151                buf: &mut impl ::buffa::bytes::BufMut,
22152            ) {
22153                #[allow(unused_imports)]
22154                use ::buffa::Enumeration as _;
22155                if !self.namespace.is_empty() {
22156                    ::buffa::encoding::Tag::new(
22157                            1u32,
22158                            ::buffa::encoding::WireType::LengthDelimited,
22159                        )
22160                        .encode(buf);
22161                    ::buffa::types::encode_string(&self.namespace, buf);
22162                }
22163                if self.limit != 0i32 {
22164                    ::buffa::encoding::Tag::new(
22165                            2u32,
22166                            ::buffa::encoding::WireType::Varint,
22167                        )
22168                        .encode(buf);
22169                    ::buffa::types::encode_int32(self.limit, buf);
22170                }
22171                if self.offset != 0i32 {
22172                    ::buffa::encoding::Tag::new(
22173                            3u32,
22174                            ::buffa::encoding::WireType::Varint,
22175                        )
22176                        .encode(buf);
22177                    ::buffa::types::encode_int32(self.offset, buf);
22178                }
22179                self.__buffa_unknown_fields.write_to(buf);
22180            }
22181        }
22182        /// Serializes this view as protobuf JSON.
22183        ///
22184        /// Implicit-presence fields with default values are omitted, `required`
22185        /// fields are always emitted, explicit-presence (`optional`) fields are
22186        /// emitted only when set, bytes fields are base64-encoded, and enum
22187        /// values are their proto name strings.
22188        ///
22189        /// This impl uses `serialize_map(None)` because the number of emitted
22190        /// fields depends on default-omission rules; serializers that require
22191        /// known map lengths (e.g. `bincode`) will return a runtime error.
22192        /// Use the owned message type for those formats.
22193        impl<'__a> ::serde::Serialize for ListDatasetsRequestView<'__a> {
22194            fn serialize<__S: ::serde::Serializer>(
22195                &self,
22196                __s: __S,
22197            ) -> ::core::result::Result<__S::Ok, __S::Error> {
22198                use ::serde::ser::SerializeMap as _;
22199                let mut __map = __s.serialize_map(::core::option::Option::None)?;
22200                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
22201                    __map.serialize_entry("namespace", self.namespace)?;
22202                }
22203                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.limit) {
22204                    struct _W(i32);
22205                    impl ::serde::Serialize for _W {
22206                        fn serialize<__S: ::serde::Serializer>(
22207                            &self,
22208                            __s: __S,
22209                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
22210                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
22211                        }
22212                    }
22213                    __map.serialize_entry("limit", &_W(self.limit))?;
22214                }
22215                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.offset) {
22216                    struct _W(i32);
22217                    impl ::serde::Serialize for _W {
22218                        fn serialize<__S: ::serde::Serializer>(
22219                            &self,
22220                            __s: __S,
22221                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
22222                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
22223                        }
22224                    }
22225                    __map.serialize_entry("offset", &_W(self.offset))?;
22226                }
22227                __map.end()
22228            }
22229        }
22230        impl<'a> ::buffa::MessageName for ListDatasetsRequestView<'a> {
22231            const PACKAGE: &'static str = "headwaters.read.v1";
22232            const NAME: &'static str = "ListDatasetsRequest";
22233            const FULL_NAME: &'static str = "headwaters.read.v1.ListDatasetsRequest";
22234            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetsRequest";
22235        }
22236        impl<'v> ::buffa::DefaultViewInstance for ListDatasetsRequestView<'v> {
22237            fn default_view_instance<'a>() -> &'a Self
22238            where
22239                Self: 'a,
22240            {
22241                static VALUE: ::buffa::__private::OnceBox<
22242                    ListDatasetsRequestView<'static>,
22243                > = ::buffa::__private::OnceBox::new();
22244                VALUE
22245                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
22246                        <ListDatasetsRequestView<'static>>::default(),
22247                    ))
22248            }
22249        }
22250        impl ::buffa::ViewReborrow for ListDatasetsRequestView<'static> {
22251            type Reborrowed<'b> = ListDatasetsRequestView<'b>;
22252            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
22253                this
22254            }
22255        }
22256        /** Self-contained, `'static` owned view of a `ListDatasetsRequest` message.
22257
22258 Wraps [`::buffa::OwnedView`]`<`[`ListDatasetsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
22259
22260 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListDatasetsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
22261        #[derive(Clone, Debug)]
22262        pub struct ListDatasetsRequestOwnedView(
22263            ::buffa::OwnedView<ListDatasetsRequestView<'static>>,
22264        );
22265        impl ListDatasetsRequestOwnedView {
22266            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
22267            ///
22268            /// The view borrows directly from the buffer's data; the buffer is
22269            /// retained inside the returned handle.
22270            ///
22271            /// # Errors
22272            ///
22273            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
22274            /// protobuf data.
22275            pub fn decode(
22276                bytes: ::buffa::bytes::Bytes,
22277            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22278                ::core::result::Result::Ok(
22279                    ListDatasetsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
22280                )
22281            }
22282            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
22283            /// max message size).
22284            ///
22285            /// # Errors
22286            ///
22287            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
22288            /// exceeds the configured limits.
22289            pub fn decode_with_options(
22290                bytes: ::buffa::bytes::Bytes,
22291                opts: &::buffa::DecodeOptions,
22292            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22293                ::core::result::Result::Ok(
22294                    ListDatasetsRequestOwnedView(
22295                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
22296                    ),
22297                )
22298            }
22299            /// Build from an owned message via an encode → decode round-trip.
22300            ///
22301            /// # Errors
22302            ///
22303            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
22304            /// somehow invalid (should not happen for well-formed messages).
22305            pub fn from_owned(
22306                msg: &super::super::ListDatasetsRequest,
22307            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22308                ::core::result::Result::Ok(
22309                    ListDatasetsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
22310                )
22311            }
22312            /// Borrow the full [`ListDatasetsRequestView`] with its lifetime tied to `&self`.
22313            #[must_use]
22314            pub fn view(&self) -> &ListDatasetsRequestView<'_> {
22315                self.0.reborrow()
22316            }
22317            /// Convert to the owned message type.
22318            #[must_use]
22319            pub fn to_owned_message(&self) -> super::super::ListDatasetsRequest {
22320                self.0.to_owned_message()
22321            }
22322            /// The underlying bytes buffer.
22323            #[must_use]
22324            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
22325                self.0.bytes()
22326            }
22327            /// Consume the handle, returning the underlying bytes buffer.
22328            #[must_use]
22329            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
22330                self.0.into_bytes()
22331            }
22332            /// Scope to this namespace; empty lists datasets across all namespaces.
22333            ///
22334            /// Field 1: `namespace`
22335            #[must_use]
22336            pub fn namespace(&self) -> &'_ str {
22337                self.0.reborrow().namespace
22338            }
22339            /// Field 2: `limit`
22340            #[must_use]
22341            pub fn limit(&self) -> i32 {
22342                self.0.reborrow().limit
22343            }
22344            /// Field 3: `offset`
22345            #[must_use]
22346            pub fn offset(&self) -> i32 {
22347                self.0.reborrow().offset
22348            }
22349        }
22350        impl ::core::convert::From<::buffa::OwnedView<ListDatasetsRequestView<'static>>>
22351        for ListDatasetsRequestOwnedView {
22352            fn from(
22353                inner: ::buffa::OwnedView<ListDatasetsRequestView<'static>>,
22354            ) -> Self {
22355                ListDatasetsRequestOwnedView(inner)
22356            }
22357        }
22358        impl ::core::convert::From<ListDatasetsRequestOwnedView>
22359        for ::buffa::OwnedView<ListDatasetsRequestView<'static>> {
22360            fn from(wrapper: ListDatasetsRequestOwnedView) -> Self {
22361                wrapper.0
22362            }
22363        }
22364        impl ::core::convert::AsRef<::buffa::OwnedView<ListDatasetsRequestView<'static>>>
22365        for ListDatasetsRequestOwnedView {
22366            fn as_ref(&self) -> &::buffa::OwnedView<ListDatasetsRequestView<'static>> {
22367                &self.0
22368            }
22369        }
22370        impl ::buffa::HasMessageView for super::super::ListDatasetsRequest {
22371            type View<'a> = ListDatasetsRequestView<'a>;
22372            type ViewHandle = ListDatasetsRequestOwnedView;
22373        }
22374        impl ::serde::Serialize for ListDatasetsRequestOwnedView {
22375            fn serialize<__S: ::serde::Serializer>(
22376                &self,
22377                __s: __S,
22378            ) -> ::core::result::Result<__S::Ok, __S::Error> {
22379                ::serde::Serialize::serialize(&self.0, __s)
22380            }
22381        }
22382        #[derive(Clone, Debug, Default)]
22383        pub struct GetDatasetRequestView<'a> {
22384            /// Field 1: `namespace`
22385            pub namespace: &'a str,
22386            /// Field 2: `name`
22387            pub name: &'a str,
22388            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
22389        }
22390        impl<'a> GetDatasetRequestView<'a> {
22391            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
22392            ///
22393            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
22394            /// and by generated sub-message decode arms with `depth - 1`.
22395            ///
22396            /// **Not part of the public API.** Named with a leading underscore to
22397            /// signal that it is for generated-code use only.
22398            #[doc(hidden)]
22399            pub fn _decode_depth(
22400                buf: &'a [u8],
22401                depth: u32,
22402            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22403                let mut view = Self::default();
22404                view._merge_into_view(buf, depth)?;
22405                ::core::result::Result::Ok(view)
22406            }
22407            /// Merge fields from `buf` into this view (proto merge semantics).
22408            ///
22409            /// Repeated fields append; singular fields last-wins; singular
22410            /// MESSAGE fields merge recursively. Used by sub-message decode
22411            /// arms when the same field appears multiple times on the wire.
22412            ///
22413            /// **Not part of the public API.**
22414            #[doc(hidden)]
22415            pub fn _merge_into_view(
22416                &mut self,
22417                buf: &'a [u8],
22418                depth: u32,
22419            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
22420                let _ = depth;
22421                #[allow(unused_variables)]
22422                let view = self;
22423                let mut cur: &'a [u8] = buf;
22424                while !cur.is_empty() {
22425                    let before_tag = cur;
22426                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
22427                    match tag.field_number() {
22428                        1u32 => {
22429                            if tag.wire_type()
22430                                != ::buffa::encoding::WireType::LengthDelimited
22431                            {
22432                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22433                                    field_number: 1u32,
22434                                    expected: 2u8,
22435                                    actual: tag.wire_type() as u8,
22436                                });
22437                            }
22438                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
22439                        }
22440                        2u32 => {
22441                            if tag.wire_type()
22442                                != ::buffa::encoding::WireType::LengthDelimited
22443                            {
22444                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22445                                    field_number: 2u32,
22446                                    expected: 2u8,
22447                                    actual: tag.wire_type() as u8,
22448                                });
22449                            }
22450                            view.name = ::buffa::types::borrow_str(&mut cur)?;
22451                        }
22452                        _ => {
22453                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
22454                            let span_len = before_tag.len() - cur.len();
22455                            view.__buffa_unknown_fields
22456                                .push_raw(&before_tag[..span_len]);
22457                        }
22458                    }
22459                }
22460                ::core::result::Result::Ok(())
22461            }
22462        }
22463        impl<'a> ::buffa::MessageView<'a> for GetDatasetRequestView<'a> {
22464            type Owned = super::super::GetDatasetRequest;
22465            fn decode_view(
22466                buf: &'a [u8],
22467            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22468                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
22469            }
22470            fn decode_view_with_limit(
22471                buf: &'a [u8],
22472                depth: u32,
22473            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22474                Self::_decode_depth(buf, depth)
22475            }
22476            fn to_owned_message(&self) -> super::super::GetDatasetRequest {
22477                self.to_owned_from_source(None)
22478            }
22479            #[allow(clippy::useless_conversion, clippy::needless_update)]
22480            fn to_owned_from_source(
22481                &self,
22482                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
22483            ) -> super::super::GetDatasetRequest {
22484                #[allow(unused_imports)]
22485                use ::buffa::alloc::string::ToString as _;
22486                let _ = __buffa_src;
22487                super::super::GetDatasetRequest {
22488                    namespace: self.namespace.to_string(),
22489                    name: self.name.to_string(),
22490                    __buffa_unknown_fields: self
22491                        .__buffa_unknown_fields
22492                        .to_owned()
22493                        .unwrap_or_default()
22494                        .into(),
22495                    ..::core::default::Default::default()
22496                }
22497            }
22498        }
22499        impl<'a> ::buffa::ViewEncode<'a> for GetDatasetRequestView<'a> {
22500            #[allow(clippy::needless_borrow, clippy::let_and_return)]
22501            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
22502                #[allow(unused_imports)]
22503                use ::buffa::Enumeration as _;
22504                let mut size = 0u32;
22505                if !self.namespace.is_empty() {
22506                    size
22507                        += 1u32
22508                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
22509                }
22510                if !self.name.is_empty() {
22511                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
22512                }
22513                size += self.__buffa_unknown_fields.encoded_len() as u32;
22514                size
22515            }
22516            #[allow(clippy::needless_borrow)]
22517            fn write_to(
22518                &self,
22519                _cache: &mut ::buffa::SizeCache,
22520                buf: &mut impl ::buffa::bytes::BufMut,
22521            ) {
22522                #[allow(unused_imports)]
22523                use ::buffa::Enumeration as _;
22524                if !self.namespace.is_empty() {
22525                    ::buffa::encoding::Tag::new(
22526                            1u32,
22527                            ::buffa::encoding::WireType::LengthDelimited,
22528                        )
22529                        .encode(buf);
22530                    ::buffa::types::encode_string(&self.namespace, buf);
22531                }
22532                if !self.name.is_empty() {
22533                    ::buffa::encoding::Tag::new(
22534                            2u32,
22535                            ::buffa::encoding::WireType::LengthDelimited,
22536                        )
22537                        .encode(buf);
22538                    ::buffa::types::encode_string(&self.name, buf);
22539                }
22540                self.__buffa_unknown_fields.write_to(buf);
22541            }
22542        }
22543        /// Serializes this view as protobuf JSON.
22544        ///
22545        /// Implicit-presence fields with default values are omitted, `required`
22546        /// fields are always emitted, explicit-presence (`optional`) fields are
22547        /// emitted only when set, bytes fields are base64-encoded, and enum
22548        /// values are their proto name strings.
22549        ///
22550        /// This impl uses `serialize_map(None)` because the number of emitted
22551        /// fields depends on default-omission rules; serializers that require
22552        /// known map lengths (e.g. `bincode`) will return a runtime error.
22553        /// Use the owned message type for those formats.
22554        impl<'__a> ::serde::Serialize for GetDatasetRequestView<'__a> {
22555            fn serialize<__S: ::serde::Serializer>(
22556                &self,
22557                __s: __S,
22558            ) -> ::core::result::Result<__S::Ok, __S::Error> {
22559                use ::serde::ser::SerializeMap as _;
22560                let mut __map = __s.serialize_map(::core::option::Option::None)?;
22561                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
22562                    __map.serialize_entry("namespace", self.namespace)?;
22563                }
22564                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
22565                    __map.serialize_entry("name", self.name)?;
22566                }
22567                __map.end()
22568            }
22569        }
22570        impl<'a> ::buffa::MessageName for GetDatasetRequestView<'a> {
22571            const PACKAGE: &'static str = "headwaters.read.v1";
22572            const NAME: &'static str = "GetDatasetRequest";
22573            const FULL_NAME: &'static str = "headwaters.read.v1.GetDatasetRequest";
22574            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetDatasetRequest";
22575        }
22576        impl<'v> ::buffa::DefaultViewInstance for GetDatasetRequestView<'v> {
22577            fn default_view_instance<'a>() -> &'a Self
22578            where
22579                Self: 'a,
22580            {
22581                static VALUE: ::buffa::__private::OnceBox<
22582                    GetDatasetRequestView<'static>,
22583                > = ::buffa::__private::OnceBox::new();
22584                VALUE
22585                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
22586                        <GetDatasetRequestView<'static>>::default(),
22587                    ))
22588            }
22589        }
22590        impl ::buffa::ViewReborrow for GetDatasetRequestView<'static> {
22591            type Reborrowed<'b> = GetDatasetRequestView<'b>;
22592            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
22593                this
22594            }
22595        }
22596        /** Self-contained, `'static` owned view of a `GetDatasetRequest` message.
22597
22598 Wraps [`::buffa::OwnedView`]`<`[`GetDatasetRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
22599
22600 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetDatasetRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
22601        #[derive(Clone, Debug)]
22602        pub struct GetDatasetRequestOwnedView(
22603            ::buffa::OwnedView<GetDatasetRequestView<'static>>,
22604        );
22605        impl GetDatasetRequestOwnedView {
22606            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
22607            ///
22608            /// The view borrows directly from the buffer's data; the buffer is
22609            /// retained inside the returned handle.
22610            ///
22611            /// # Errors
22612            ///
22613            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
22614            /// protobuf data.
22615            pub fn decode(
22616                bytes: ::buffa::bytes::Bytes,
22617            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22618                ::core::result::Result::Ok(
22619                    GetDatasetRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
22620                )
22621            }
22622            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
22623            /// max message size).
22624            ///
22625            /// # Errors
22626            ///
22627            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
22628            /// exceeds the configured limits.
22629            pub fn decode_with_options(
22630                bytes: ::buffa::bytes::Bytes,
22631                opts: &::buffa::DecodeOptions,
22632            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22633                ::core::result::Result::Ok(
22634                    GetDatasetRequestOwnedView(
22635                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
22636                    ),
22637                )
22638            }
22639            /// Build from an owned message via an encode → decode round-trip.
22640            ///
22641            /// # Errors
22642            ///
22643            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
22644            /// somehow invalid (should not happen for well-formed messages).
22645            pub fn from_owned(
22646                msg: &super::super::GetDatasetRequest,
22647            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22648                ::core::result::Result::Ok(
22649                    GetDatasetRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
22650                )
22651            }
22652            /// Borrow the full [`GetDatasetRequestView`] with its lifetime tied to `&self`.
22653            #[must_use]
22654            pub fn view(&self) -> &GetDatasetRequestView<'_> {
22655                self.0.reborrow()
22656            }
22657            /// Convert to the owned message type.
22658            #[must_use]
22659            pub fn to_owned_message(&self) -> super::super::GetDatasetRequest {
22660                self.0.to_owned_message()
22661            }
22662            /// The underlying bytes buffer.
22663            #[must_use]
22664            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
22665                self.0.bytes()
22666            }
22667            /// Consume the handle, returning the underlying bytes buffer.
22668            #[must_use]
22669            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
22670                self.0.into_bytes()
22671            }
22672            /// Field 1: `namespace`
22673            #[must_use]
22674            pub fn namespace(&self) -> &'_ str {
22675                self.0.reborrow().namespace
22676            }
22677            /// Field 2: `name`
22678            #[must_use]
22679            pub fn name(&self) -> &'_ str {
22680                self.0.reborrow().name
22681            }
22682        }
22683        impl ::core::convert::From<::buffa::OwnedView<GetDatasetRequestView<'static>>>
22684        for GetDatasetRequestOwnedView {
22685            fn from(inner: ::buffa::OwnedView<GetDatasetRequestView<'static>>) -> Self {
22686                GetDatasetRequestOwnedView(inner)
22687            }
22688        }
22689        impl ::core::convert::From<GetDatasetRequestOwnedView>
22690        for ::buffa::OwnedView<GetDatasetRequestView<'static>> {
22691            fn from(wrapper: GetDatasetRequestOwnedView) -> Self {
22692                wrapper.0
22693            }
22694        }
22695        impl ::core::convert::AsRef<::buffa::OwnedView<GetDatasetRequestView<'static>>>
22696        for GetDatasetRequestOwnedView {
22697            fn as_ref(&self) -> &::buffa::OwnedView<GetDatasetRequestView<'static>> {
22698                &self.0
22699            }
22700        }
22701        impl ::buffa::HasMessageView for super::super::GetDatasetRequest {
22702            type View<'a> = GetDatasetRequestView<'a>;
22703            type ViewHandle = GetDatasetRequestOwnedView;
22704        }
22705        impl ::serde::Serialize for GetDatasetRequestOwnedView {
22706            fn serialize<__S: ::serde::Serializer>(
22707                &self,
22708                __s: __S,
22709            ) -> ::core::result::Result<__S::Ok, __S::Error> {
22710                ::serde::Serialize::serialize(&self.0, __s)
22711            }
22712        }
22713        #[derive(Clone, Debug, Default)]
22714        pub struct ListDatasetVersionsRequestView<'a> {
22715            /// Field 1: `namespace`
22716            pub namespace: &'a str,
22717            /// Field 2: `name`
22718            pub name: &'a str,
22719            /// Field 3: `limit`
22720            pub limit: i32,
22721            /// Field 4: `offset`
22722            pub offset: i32,
22723            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
22724        }
22725        impl<'a> ListDatasetVersionsRequestView<'a> {
22726            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
22727            ///
22728            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
22729            /// and by generated sub-message decode arms with `depth - 1`.
22730            ///
22731            /// **Not part of the public API.** Named with a leading underscore to
22732            /// signal that it is for generated-code use only.
22733            #[doc(hidden)]
22734            pub fn _decode_depth(
22735                buf: &'a [u8],
22736                depth: u32,
22737            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22738                let mut view = Self::default();
22739                view._merge_into_view(buf, depth)?;
22740                ::core::result::Result::Ok(view)
22741            }
22742            /// Merge fields from `buf` into this view (proto merge semantics).
22743            ///
22744            /// Repeated fields append; singular fields last-wins; singular
22745            /// MESSAGE fields merge recursively. Used by sub-message decode
22746            /// arms when the same field appears multiple times on the wire.
22747            ///
22748            /// **Not part of the public API.**
22749            #[doc(hidden)]
22750            pub fn _merge_into_view(
22751                &mut self,
22752                buf: &'a [u8],
22753                depth: u32,
22754            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
22755                let _ = depth;
22756                #[allow(unused_variables)]
22757                let view = self;
22758                let mut cur: &'a [u8] = buf;
22759                while !cur.is_empty() {
22760                    let before_tag = cur;
22761                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
22762                    match tag.field_number() {
22763                        1u32 => {
22764                            if tag.wire_type()
22765                                != ::buffa::encoding::WireType::LengthDelimited
22766                            {
22767                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22768                                    field_number: 1u32,
22769                                    expected: 2u8,
22770                                    actual: tag.wire_type() as u8,
22771                                });
22772                            }
22773                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
22774                        }
22775                        2u32 => {
22776                            if tag.wire_type()
22777                                != ::buffa::encoding::WireType::LengthDelimited
22778                            {
22779                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22780                                    field_number: 2u32,
22781                                    expected: 2u8,
22782                                    actual: tag.wire_type() as u8,
22783                                });
22784                            }
22785                            view.name = ::buffa::types::borrow_str(&mut cur)?;
22786                        }
22787                        3u32 => {
22788                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
22789                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22790                                    field_number: 3u32,
22791                                    expected: 0u8,
22792                                    actual: tag.wire_type() as u8,
22793                                });
22794                            }
22795                            view.limit = ::buffa::types::decode_int32(&mut cur)?;
22796                        }
22797                        4u32 => {
22798                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
22799                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
22800                                    field_number: 4u32,
22801                                    expected: 0u8,
22802                                    actual: tag.wire_type() as u8,
22803                                });
22804                            }
22805                            view.offset = ::buffa::types::decode_int32(&mut cur)?;
22806                        }
22807                        _ => {
22808                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
22809                            let span_len = before_tag.len() - cur.len();
22810                            view.__buffa_unknown_fields
22811                                .push_raw(&before_tag[..span_len]);
22812                        }
22813                    }
22814                }
22815                ::core::result::Result::Ok(())
22816            }
22817        }
22818        impl<'a> ::buffa::MessageView<'a> for ListDatasetVersionsRequestView<'a> {
22819            type Owned = super::super::ListDatasetVersionsRequest;
22820            fn decode_view(
22821                buf: &'a [u8],
22822            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22823                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
22824            }
22825            fn decode_view_with_limit(
22826                buf: &'a [u8],
22827                depth: u32,
22828            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
22829                Self::_decode_depth(buf, depth)
22830            }
22831            fn to_owned_message(&self) -> super::super::ListDatasetVersionsRequest {
22832                self.to_owned_from_source(None)
22833            }
22834            #[allow(clippy::useless_conversion, clippy::needless_update)]
22835            fn to_owned_from_source(
22836                &self,
22837                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
22838            ) -> super::super::ListDatasetVersionsRequest {
22839                #[allow(unused_imports)]
22840                use ::buffa::alloc::string::ToString as _;
22841                let _ = __buffa_src;
22842                super::super::ListDatasetVersionsRequest {
22843                    namespace: self.namespace.to_string(),
22844                    name: self.name.to_string(),
22845                    limit: self.limit,
22846                    offset: self.offset,
22847                    __buffa_unknown_fields: self
22848                        .__buffa_unknown_fields
22849                        .to_owned()
22850                        .unwrap_or_default()
22851                        .into(),
22852                    ..::core::default::Default::default()
22853                }
22854            }
22855        }
22856        impl<'a> ::buffa::ViewEncode<'a> for ListDatasetVersionsRequestView<'a> {
22857            #[allow(clippy::needless_borrow, clippy::let_and_return)]
22858            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
22859                #[allow(unused_imports)]
22860                use ::buffa::Enumeration as _;
22861                let mut size = 0u32;
22862                if !self.namespace.is_empty() {
22863                    size
22864                        += 1u32
22865                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
22866                }
22867                if !self.name.is_empty() {
22868                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
22869                }
22870                if self.limit != 0i32 {
22871                    size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
22872                }
22873                if self.offset != 0i32 {
22874                    size += 1u32 + ::buffa::types::int32_encoded_len(self.offset) as u32;
22875                }
22876                size += self.__buffa_unknown_fields.encoded_len() as u32;
22877                size
22878            }
22879            #[allow(clippy::needless_borrow)]
22880            fn write_to(
22881                &self,
22882                _cache: &mut ::buffa::SizeCache,
22883                buf: &mut impl ::buffa::bytes::BufMut,
22884            ) {
22885                #[allow(unused_imports)]
22886                use ::buffa::Enumeration as _;
22887                if !self.namespace.is_empty() {
22888                    ::buffa::encoding::Tag::new(
22889                            1u32,
22890                            ::buffa::encoding::WireType::LengthDelimited,
22891                        )
22892                        .encode(buf);
22893                    ::buffa::types::encode_string(&self.namespace, buf);
22894                }
22895                if !self.name.is_empty() {
22896                    ::buffa::encoding::Tag::new(
22897                            2u32,
22898                            ::buffa::encoding::WireType::LengthDelimited,
22899                        )
22900                        .encode(buf);
22901                    ::buffa::types::encode_string(&self.name, buf);
22902                }
22903                if self.limit != 0i32 {
22904                    ::buffa::encoding::Tag::new(
22905                            3u32,
22906                            ::buffa::encoding::WireType::Varint,
22907                        )
22908                        .encode(buf);
22909                    ::buffa::types::encode_int32(self.limit, buf);
22910                }
22911                if self.offset != 0i32 {
22912                    ::buffa::encoding::Tag::new(
22913                            4u32,
22914                            ::buffa::encoding::WireType::Varint,
22915                        )
22916                        .encode(buf);
22917                    ::buffa::types::encode_int32(self.offset, buf);
22918                }
22919                self.__buffa_unknown_fields.write_to(buf);
22920            }
22921        }
22922        /// Serializes this view as protobuf JSON.
22923        ///
22924        /// Implicit-presence fields with default values are omitted, `required`
22925        /// fields are always emitted, explicit-presence (`optional`) fields are
22926        /// emitted only when set, bytes fields are base64-encoded, and enum
22927        /// values are their proto name strings.
22928        ///
22929        /// This impl uses `serialize_map(None)` because the number of emitted
22930        /// fields depends on default-omission rules; serializers that require
22931        /// known map lengths (e.g. `bincode`) will return a runtime error.
22932        /// Use the owned message type for those formats.
22933        impl<'__a> ::serde::Serialize for ListDatasetVersionsRequestView<'__a> {
22934            fn serialize<__S: ::serde::Serializer>(
22935                &self,
22936                __s: __S,
22937            ) -> ::core::result::Result<__S::Ok, __S::Error> {
22938                use ::serde::ser::SerializeMap as _;
22939                let mut __map = __s.serialize_map(::core::option::Option::None)?;
22940                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
22941                    __map.serialize_entry("namespace", self.namespace)?;
22942                }
22943                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
22944                    __map.serialize_entry("name", self.name)?;
22945                }
22946                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.limit) {
22947                    struct _W(i32);
22948                    impl ::serde::Serialize for _W {
22949                        fn serialize<__S: ::serde::Serializer>(
22950                            &self,
22951                            __s: __S,
22952                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
22953                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
22954                        }
22955                    }
22956                    __map.serialize_entry("limit", &_W(self.limit))?;
22957                }
22958                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.offset) {
22959                    struct _W(i32);
22960                    impl ::serde::Serialize for _W {
22961                        fn serialize<__S: ::serde::Serializer>(
22962                            &self,
22963                            __s: __S,
22964                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
22965                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
22966                        }
22967                    }
22968                    __map.serialize_entry("offset", &_W(self.offset))?;
22969                }
22970                __map.end()
22971            }
22972        }
22973        impl<'a> ::buffa::MessageName for ListDatasetVersionsRequestView<'a> {
22974            const PACKAGE: &'static str = "headwaters.read.v1";
22975            const NAME: &'static str = "ListDatasetVersionsRequest";
22976            const FULL_NAME: &'static str = "headwaters.read.v1.ListDatasetVersionsRequest";
22977            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListDatasetVersionsRequest";
22978        }
22979        impl<'v> ::buffa::DefaultViewInstance for ListDatasetVersionsRequestView<'v> {
22980            fn default_view_instance<'a>() -> &'a Self
22981            where
22982                Self: 'a,
22983            {
22984                static VALUE: ::buffa::__private::OnceBox<
22985                    ListDatasetVersionsRequestView<'static>,
22986                > = ::buffa::__private::OnceBox::new();
22987                VALUE
22988                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
22989                        <ListDatasetVersionsRequestView<'static>>::default(),
22990                    ))
22991            }
22992        }
22993        impl ::buffa::ViewReborrow for ListDatasetVersionsRequestView<'static> {
22994            type Reborrowed<'b> = ListDatasetVersionsRequestView<'b>;
22995            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
22996                this
22997            }
22998        }
22999        /** Self-contained, `'static` owned view of a `ListDatasetVersionsRequest` message.
23000
23001 Wraps [`::buffa::OwnedView`]`<`[`ListDatasetVersionsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
23002
23003 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListDatasetVersionsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
23004        #[derive(Clone, Debug)]
23005        pub struct ListDatasetVersionsRequestOwnedView(
23006            ::buffa::OwnedView<ListDatasetVersionsRequestView<'static>>,
23007        );
23008        impl ListDatasetVersionsRequestOwnedView {
23009            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
23010            ///
23011            /// The view borrows directly from the buffer's data; the buffer is
23012            /// retained inside the returned handle.
23013            ///
23014            /// # Errors
23015            ///
23016            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
23017            /// protobuf data.
23018            pub fn decode(
23019                bytes: ::buffa::bytes::Bytes,
23020            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23021                ::core::result::Result::Ok(
23022                    ListDatasetVersionsRequestOwnedView(
23023                        ::buffa::OwnedView::decode(bytes)?,
23024                    ),
23025                )
23026            }
23027            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
23028            /// max message size).
23029            ///
23030            /// # Errors
23031            ///
23032            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
23033            /// exceeds the configured limits.
23034            pub fn decode_with_options(
23035                bytes: ::buffa::bytes::Bytes,
23036                opts: &::buffa::DecodeOptions,
23037            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23038                ::core::result::Result::Ok(
23039                    ListDatasetVersionsRequestOwnedView(
23040                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
23041                    ),
23042                )
23043            }
23044            /// Build from an owned message via an encode → decode round-trip.
23045            ///
23046            /// # Errors
23047            ///
23048            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
23049            /// somehow invalid (should not happen for well-formed messages).
23050            pub fn from_owned(
23051                msg: &super::super::ListDatasetVersionsRequest,
23052            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23053                ::core::result::Result::Ok(
23054                    ListDatasetVersionsRequestOwnedView(
23055                        ::buffa::OwnedView::from_owned(msg)?,
23056                    ),
23057                )
23058            }
23059            /// Borrow the full [`ListDatasetVersionsRequestView`] with its lifetime tied to `&self`.
23060            #[must_use]
23061            pub fn view(&self) -> &ListDatasetVersionsRequestView<'_> {
23062                self.0.reborrow()
23063            }
23064            /// Convert to the owned message type.
23065            #[must_use]
23066            pub fn to_owned_message(&self) -> super::super::ListDatasetVersionsRequest {
23067                self.0.to_owned_message()
23068            }
23069            /// The underlying bytes buffer.
23070            #[must_use]
23071            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
23072                self.0.bytes()
23073            }
23074            /// Consume the handle, returning the underlying bytes buffer.
23075            #[must_use]
23076            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
23077                self.0.into_bytes()
23078            }
23079            /// Field 1: `namespace`
23080            #[must_use]
23081            pub fn namespace(&self) -> &'_ str {
23082                self.0.reborrow().namespace
23083            }
23084            /// Field 2: `name`
23085            #[must_use]
23086            pub fn name(&self) -> &'_ str {
23087                self.0.reborrow().name
23088            }
23089            /// Field 3: `limit`
23090            #[must_use]
23091            pub fn limit(&self) -> i32 {
23092                self.0.reborrow().limit
23093            }
23094            /// Field 4: `offset`
23095            #[must_use]
23096            pub fn offset(&self) -> i32 {
23097                self.0.reborrow().offset
23098            }
23099        }
23100        impl ::core::convert::From<
23101            ::buffa::OwnedView<ListDatasetVersionsRequestView<'static>>,
23102        > for ListDatasetVersionsRequestOwnedView {
23103            fn from(
23104                inner: ::buffa::OwnedView<ListDatasetVersionsRequestView<'static>>,
23105            ) -> Self {
23106                ListDatasetVersionsRequestOwnedView(inner)
23107            }
23108        }
23109        impl ::core::convert::From<ListDatasetVersionsRequestOwnedView>
23110        for ::buffa::OwnedView<ListDatasetVersionsRequestView<'static>> {
23111            fn from(wrapper: ListDatasetVersionsRequestOwnedView) -> Self {
23112                wrapper.0
23113            }
23114        }
23115        impl ::core::convert::AsRef<
23116            ::buffa::OwnedView<ListDatasetVersionsRequestView<'static>>,
23117        > for ListDatasetVersionsRequestOwnedView {
23118            fn as_ref(
23119                &self,
23120            ) -> &::buffa::OwnedView<ListDatasetVersionsRequestView<'static>> {
23121                &self.0
23122            }
23123        }
23124        impl ::buffa::HasMessageView for super::super::ListDatasetVersionsRequest {
23125            type View<'a> = ListDatasetVersionsRequestView<'a>;
23126            type ViewHandle = ListDatasetVersionsRequestOwnedView;
23127        }
23128        impl ::serde::Serialize for ListDatasetVersionsRequestOwnedView {
23129            fn serialize<__S: ::serde::Serializer>(
23130                &self,
23131                __s: __S,
23132            ) -> ::core::result::Result<__S::Ok, __S::Error> {
23133                ::serde::Serialize::serialize(&self.0, __s)
23134            }
23135        }
23136        #[derive(Clone, Debug, Default)]
23137        pub struct SearchRequestView<'a> {
23138            /// Case-insensitive substring matched against job and dataset names.
23139            ///
23140            /// Field 1: `q`
23141            pub q: &'a str,
23142            /// Field 2: `limit`
23143            pub limit: i32,
23144            /// Restrict results to one kind. `ENTITY_KIND_UNSPECIFIED` (the default) returns
23145            /// both jobs and datasets; `DATASET_FIELD` matches nothing (search is entity-level).
23146            ///
23147            /// Field 3: `type`
23148            pub r#type: ::buffa::EnumValue<super::super::EntityKind>,
23149            /// Restrict results to one namespace; empty matches all.
23150            ///
23151            /// Field 4: `namespace`
23152            pub namespace: &'a str,
23153            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
23154        }
23155        impl<'a> SearchRequestView<'a> {
23156            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
23157            ///
23158            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
23159            /// and by generated sub-message decode arms with `depth - 1`.
23160            ///
23161            /// **Not part of the public API.** Named with a leading underscore to
23162            /// signal that it is for generated-code use only.
23163            #[doc(hidden)]
23164            pub fn _decode_depth(
23165                buf: &'a [u8],
23166                depth: u32,
23167            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23168                let mut view = Self::default();
23169                view._merge_into_view(buf, depth)?;
23170                ::core::result::Result::Ok(view)
23171            }
23172            /// Merge fields from `buf` into this view (proto merge semantics).
23173            ///
23174            /// Repeated fields append; singular fields last-wins; singular
23175            /// MESSAGE fields merge recursively. Used by sub-message decode
23176            /// arms when the same field appears multiple times on the wire.
23177            ///
23178            /// **Not part of the public API.**
23179            #[doc(hidden)]
23180            pub fn _merge_into_view(
23181                &mut self,
23182                buf: &'a [u8],
23183                depth: u32,
23184            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
23185                let _ = depth;
23186                #[allow(unused_variables)]
23187                let view = self;
23188                let mut cur: &'a [u8] = buf;
23189                while !cur.is_empty() {
23190                    let before_tag = cur;
23191                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
23192                    match tag.field_number() {
23193                        1u32 => {
23194                            if tag.wire_type()
23195                                != ::buffa::encoding::WireType::LengthDelimited
23196                            {
23197                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
23198                                    field_number: 1u32,
23199                                    expected: 2u8,
23200                                    actual: tag.wire_type() as u8,
23201                                });
23202                            }
23203                            view.q = ::buffa::types::borrow_str(&mut cur)?;
23204                        }
23205                        2u32 => {
23206                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
23207                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
23208                                    field_number: 2u32,
23209                                    expected: 0u8,
23210                                    actual: tag.wire_type() as u8,
23211                                });
23212                            }
23213                            view.limit = ::buffa::types::decode_int32(&mut cur)?;
23214                        }
23215                        3u32 => {
23216                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
23217                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
23218                                    field_number: 3u32,
23219                                    expected: 0u8,
23220                                    actual: tag.wire_type() as u8,
23221                                });
23222                            }
23223                            view.r#type = ::buffa::EnumValue::from(
23224                                ::buffa::types::decode_int32(&mut cur)?,
23225                            );
23226                        }
23227                        4u32 => {
23228                            if tag.wire_type()
23229                                != ::buffa::encoding::WireType::LengthDelimited
23230                            {
23231                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
23232                                    field_number: 4u32,
23233                                    expected: 2u8,
23234                                    actual: tag.wire_type() as u8,
23235                                });
23236                            }
23237                            view.namespace = ::buffa::types::borrow_str(&mut cur)?;
23238                        }
23239                        _ => {
23240                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
23241                            let span_len = before_tag.len() - cur.len();
23242                            view.__buffa_unknown_fields
23243                                .push_raw(&before_tag[..span_len]);
23244                        }
23245                    }
23246                }
23247                ::core::result::Result::Ok(())
23248            }
23249        }
23250        impl<'a> ::buffa::MessageView<'a> for SearchRequestView<'a> {
23251            type Owned = super::super::SearchRequest;
23252            fn decode_view(
23253                buf: &'a [u8],
23254            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23255                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
23256            }
23257            fn decode_view_with_limit(
23258                buf: &'a [u8],
23259                depth: u32,
23260            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23261                Self::_decode_depth(buf, depth)
23262            }
23263            fn to_owned_message(&self) -> super::super::SearchRequest {
23264                self.to_owned_from_source(None)
23265            }
23266            #[allow(clippy::useless_conversion, clippy::needless_update)]
23267            fn to_owned_from_source(
23268                &self,
23269                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
23270            ) -> super::super::SearchRequest {
23271                #[allow(unused_imports)]
23272                use ::buffa::alloc::string::ToString as _;
23273                let _ = __buffa_src;
23274                super::super::SearchRequest {
23275                    q: self.q.to_string(),
23276                    limit: self.limit,
23277                    r#type: self.r#type,
23278                    namespace: self.namespace.to_string(),
23279                    __buffa_unknown_fields: self
23280                        .__buffa_unknown_fields
23281                        .to_owned()
23282                        .unwrap_or_default()
23283                        .into(),
23284                    ..::core::default::Default::default()
23285                }
23286            }
23287        }
23288        impl<'a> ::buffa::ViewEncode<'a> for SearchRequestView<'a> {
23289            #[allow(clippy::needless_borrow, clippy::let_and_return)]
23290            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
23291                #[allow(unused_imports)]
23292                use ::buffa::Enumeration as _;
23293                let mut size = 0u32;
23294                if !self.q.is_empty() {
23295                    size += 1u32 + ::buffa::types::string_encoded_len(&self.q) as u32;
23296                }
23297                if self.limit != 0i32 {
23298                    size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
23299                }
23300                {
23301                    let val = self.r#type.to_i32();
23302                    if val != 0 {
23303                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
23304                    }
23305                }
23306                if !self.namespace.is_empty() {
23307                    size
23308                        += 1u32
23309                            + ::buffa::types::string_encoded_len(&self.namespace) as u32;
23310                }
23311                size += self.__buffa_unknown_fields.encoded_len() as u32;
23312                size
23313            }
23314            #[allow(clippy::needless_borrow)]
23315            fn write_to(
23316                &self,
23317                _cache: &mut ::buffa::SizeCache,
23318                buf: &mut impl ::buffa::bytes::BufMut,
23319            ) {
23320                #[allow(unused_imports)]
23321                use ::buffa::Enumeration as _;
23322                if !self.q.is_empty() {
23323                    ::buffa::encoding::Tag::new(
23324                            1u32,
23325                            ::buffa::encoding::WireType::LengthDelimited,
23326                        )
23327                        .encode(buf);
23328                    ::buffa::types::encode_string(&self.q, buf);
23329                }
23330                if self.limit != 0i32 {
23331                    ::buffa::encoding::Tag::new(
23332                            2u32,
23333                            ::buffa::encoding::WireType::Varint,
23334                        )
23335                        .encode(buf);
23336                    ::buffa::types::encode_int32(self.limit, buf);
23337                }
23338                {
23339                    let val = self.r#type.to_i32();
23340                    if val != 0 {
23341                        ::buffa::encoding::Tag::new(
23342                                3u32,
23343                                ::buffa::encoding::WireType::Varint,
23344                            )
23345                            .encode(buf);
23346                        ::buffa::types::encode_int32(val, buf);
23347                    }
23348                }
23349                if !self.namespace.is_empty() {
23350                    ::buffa::encoding::Tag::new(
23351                            4u32,
23352                            ::buffa::encoding::WireType::LengthDelimited,
23353                        )
23354                        .encode(buf);
23355                    ::buffa::types::encode_string(&self.namespace, buf);
23356                }
23357                self.__buffa_unknown_fields.write_to(buf);
23358            }
23359        }
23360        /// Serializes this view as protobuf JSON.
23361        ///
23362        /// Implicit-presence fields with default values are omitted, `required`
23363        /// fields are always emitted, explicit-presence (`optional`) fields are
23364        /// emitted only when set, bytes fields are base64-encoded, and enum
23365        /// values are their proto name strings.
23366        ///
23367        /// This impl uses `serialize_map(None)` because the number of emitted
23368        /// fields depends on default-omission rules; serializers that require
23369        /// known map lengths (e.g. `bincode`) will return a runtime error.
23370        /// Use the owned message type for those formats.
23371        impl<'__a> ::serde::Serialize for SearchRequestView<'__a> {
23372            fn serialize<__S: ::serde::Serializer>(
23373                &self,
23374                __s: __S,
23375            ) -> ::core::result::Result<__S::Ok, __S::Error> {
23376                use ::serde::ser::SerializeMap as _;
23377                let mut __map = __s.serialize_map(::core::option::Option::None)?;
23378                if !::buffa::json_helpers::skip_if::is_empty_str(self.q) {
23379                    __map.serialize_entry("q", self.q)?;
23380                }
23381                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.limit) {
23382                    struct _W(i32);
23383                    impl ::serde::Serialize for _W {
23384                        fn serialize<__S: ::serde::Serializer>(
23385                            &self,
23386                            __s: __S,
23387                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
23388                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
23389                        }
23390                    }
23391                    __map.serialize_entry("limit", &_W(self.limit))?;
23392                }
23393                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.r#type) {
23394                    __map.serialize_entry("type", &self.r#type)?;
23395                }
23396                if !::buffa::json_helpers::skip_if::is_empty_str(self.namespace) {
23397                    __map.serialize_entry("namespace", self.namespace)?;
23398                }
23399                __map.end()
23400            }
23401        }
23402        impl<'a> ::buffa::MessageName for SearchRequestView<'a> {
23403            const PACKAGE: &'static str = "headwaters.read.v1";
23404            const NAME: &'static str = "SearchRequest";
23405            const FULL_NAME: &'static str = "headwaters.read.v1.SearchRequest";
23406            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.SearchRequest";
23407        }
23408        impl<'v> ::buffa::DefaultViewInstance for SearchRequestView<'v> {
23409            fn default_view_instance<'a>() -> &'a Self
23410            where
23411                Self: 'a,
23412            {
23413                static VALUE: ::buffa::__private::OnceBox<SearchRequestView<'static>> = ::buffa::__private::OnceBox::new();
23414                VALUE
23415                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
23416                        <SearchRequestView<'static>>::default(),
23417                    ))
23418            }
23419        }
23420        impl ::buffa::ViewReborrow for SearchRequestView<'static> {
23421            type Reborrowed<'b> = SearchRequestView<'b>;
23422            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
23423                this
23424            }
23425        }
23426        /** Self-contained, `'static` owned view of a `SearchRequest` message.
23427
23428 Wraps [`::buffa::OwnedView`]`<`[`SearchRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
23429
23430 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`SearchRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
23431        #[derive(Clone, Debug)]
23432        pub struct SearchRequestOwnedView(
23433            ::buffa::OwnedView<SearchRequestView<'static>>,
23434        );
23435        impl SearchRequestOwnedView {
23436            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
23437            ///
23438            /// The view borrows directly from the buffer's data; the buffer is
23439            /// retained inside the returned handle.
23440            ///
23441            /// # Errors
23442            ///
23443            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
23444            /// protobuf data.
23445            pub fn decode(
23446                bytes: ::buffa::bytes::Bytes,
23447            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23448                ::core::result::Result::Ok(
23449                    SearchRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
23450                )
23451            }
23452            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
23453            /// max message size).
23454            ///
23455            /// # Errors
23456            ///
23457            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
23458            /// exceeds the configured limits.
23459            pub fn decode_with_options(
23460                bytes: ::buffa::bytes::Bytes,
23461                opts: &::buffa::DecodeOptions,
23462            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23463                ::core::result::Result::Ok(
23464                    SearchRequestOwnedView(
23465                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
23466                    ),
23467                )
23468            }
23469            /// Build from an owned message via an encode → decode round-trip.
23470            ///
23471            /// # Errors
23472            ///
23473            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
23474            /// somehow invalid (should not happen for well-formed messages).
23475            pub fn from_owned(
23476                msg: &super::super::SearchRequest,
23477            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23478                ::core::result::Result::Ok(
23479                    SearchRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
23480                )
23481            }
23482            /// Borrow the full [`SearchRequestView`] with its lifetime tied to `&self`.
23483            #[must_use]
23484            pub fn view(&self) -> &SearchRequestView<'_> {
23485                self.0.reborrow()
23486            }
23487            /// Convert to the owned message type.
23488            #[must_use]
23489            pub fn to_owned_message(&self) -> super::super::SearchRequest {
23490                self.0.to_owned_message()
23491            }
23492            /// The underlying bytes buffer.
23493            #[must_use]
23494            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
23495                self.0.bytes()
23496            }
23497            /// Consume the handle, returning the underlying bytes buffer.
23498            #[must_use]
23499            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
23500                self.0.into_bytes()
23501            }
23502            /// Case-insensitive substring matched against job and dataset names.
23503            ///
23504            /// Field 1: `q`
23505            #[must_use]
23506            pub fn q(&self) -> &'_ str {
23507                self.0.reborrow().q
23508            }
23509            /// Field 2: `limit`
23510            #[must_use]
23511            pub fn limit(&self) -> i32 {
23512                self.0.reborrow().limit
23513            }
23514            /// Restrict results to one kind. `ENTITY_KIND_UNSPECIFIED` (the default) returns
23515            /// both jobs and datasets; `DATASET_FIELD` matches nothing (search is entity-level).
23516            ///
23517            /// Field 3: `type`
23518            #[must_use]
23519            pub fn r#type(&self) -> ::buffa::EnumValue<super::super::EntityKind> {
23520                self.0.reborrow().r#type
23521            }
23522            /// Restrict results to one namespace; empty matches all.
23523            ///
23524            /// Field 4: `namespace`
23525            #[must_use]
23526            pub fn namespace(&self) -> &'_ str {
23527                self.0.reborrow().namespace
23528            }
23529        }
23530        impl ::core::convert::From<::buffa::OwnedView<SearchRequestView<'static>>>
23531        for SearchRequestOwnedView {
23532            fn from(inner: ::buffa::OwnedView<SearchRequestView<'static>>) -> Self {
23533                SearchRequestOwnedView(inner)
23534            }
23535        }
23536        impl ::core::convert::From<SearchRequestOwnedView>
23537        for ::buffa::OwnedView<SearchRequestView<'static>> {
23538            fn from(wrapper: SearchRequestOwnedView) -> Self {
23539                wrapper.0
23540            }
23541        }
23542        impl ::core::convert::AsRef<::buffa::OwnedView<SearchRequestView<'static>>>
23543        for SearchRequestOwnedView {
23544            fn as_ref(&self) -> &::buffa::OwnedView<SearchRequestView<'static>> {
23545                &self.0
23546            }
23547        }
23548        impl ::buffa::HasMessageView for super::super::SearchRequest {
23549            type View<'a> = SearchRequestView<'a>;
23550            type ViewHandle = SearchRequestOwnedView;
23551        }
23552        impl ::serde::Serialize for SearchRequestOwnedView {
23553            fn serialize<__S: ::serde::Serializer>(
23554                &self,
23555                __s: __S,
23556            ) -> ::core::result::Result<__S::Ok, __S::Error> {
23557                ::serde::Serialize::serialize(&self.0, __s)
23558            }
23559        }
23560        #[derive(Clone, Debug, Default)]
23561        pub struct GetLineageRequestView<'a> {
23562            /// Seed node: `job:<ns>:<name>` or `dataset:<ns>:<name>`.
23563            ///
23564            /// Field 1: `node_id`
23565            pub node_id: &'a str,
23566            /// Maximum hops to traverse from the seed. Defaults to, and is capped at, 20.
23567            ///
23568            /// Field 2: `depth`
23569            pub depth: i32,
23570            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
23571        }
23572        impl<'a> GetLineageRequestView<'a> {
23573            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
23574            ///
23575            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
23576            /// and by generated sub-message decode arms with `depth - 1`.
23577            ///
23578            /// **Not part of the public API.** Named with a leading underscore to
23579            /// signal that it is for generated-code use only.
23580            #[doc(hidden)]
23581            pub fn _decode_depth(
23582                buf: &'a [u8],
23583                depth: u32,
23584            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23585                let mut view = Self::default();
23586                view._merge_into_view(buf, depth)?;
23587                ::core::result::Result::Ok(view)
23588            }
23589            /// Merge fields from `buf` into this view (proto merge semantics).
23590            ///
23591            /// Repeated fields append; singular fields last-wins; singular
23592            /// MESSAGE fields merge recursively. Used by sub-message decode
23593            /// arms when the same field appears multiple times on the wire.
23594            ///
23595            /// **Not part of the public API.**
23596            #[doc(hidden)]
23597            pub fn _merge_into_view(
23598                &mut self,
23599                buf: &'a [u8],
23600                depth: u32,
23601            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
23602                let _ = depth;
23603                #[allow(unused_variables)]
23604                let view = self;
23605                let mut cur: &'a [u8] = buf;
23606                while !cur.is_empty() {
23607                    let before_tag = cur;
23608                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
23609                    match tag.field_number() {
23610                        1u32 => {
23611                            if tag.wire_type()
23612                                != ::buffa::encoding::WireType::LengthDelimited
23613                            {
23614                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
23615                                    field_number: 1u32,
23616                                    expected: 2u8,
23617                                    actual: tag.wire_type() as u8,
23618                                });
23619                            }
23620                            view.node_id = ::buffa::types::borrow_str(&mut cur)?;
23621                        }
23622                        2u32 => {
23623                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
23624                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
23625                                    field_number: 2u32,
23626                                    expected: 0u8,
23627                                    actual: tag.wire_type() as u8,
23628                                });
23629                            }
23630                            view.depth = ::buffa::types::decode_int32(&mut cur)?;
23631                        }
23632                        _ => {
23633                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
23634                            let span_len = before_tag.len() - cur.len();
23635                            view.__buffa_unknown_fields
23636                                .push_raw(&before_tag[..span_len]);
23637                        }
23638                    }
23639                }
23640                ::core::result::Result::Ok(())
23641            }
23642        }
23643        impl<'a> ::buffa::MessageView<'a> for GetLineageRequestView<'a> {
23644            type Owned = super::super::GetLineageRequest;
23645            fn decode_view(
23646                buf: &'a [u8],
23647            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23648                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
23649            }
23650            fn decode_view_with_limit(
23651                buf: &'a [u8],
23652                depth: u32,
23653            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23654                Self::_decode_depth(buf, depth)
23655            }
23656            fn to_owned_message(&self) -> super::super::GetLineageRequest {
23657                self.to_owned_from_source(None)
23658            }
23659            #[allow(clippy::useless_conversion, clippy::needless_update)]
23660            fn to_owned_from_source(
23661                &self,
23662                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
23663            ) -> super::super::GetLineageRequest {
23664                #[allow(unused_imports)]
23665                use ::buffa::alloc::string::ToString as _;
23666                let _ = __buffa_src;
23667                super::super::GetLineageRequest {
23668                    node_id: self.node_id.to_string(),
23669                    depth: self.depth,
23670                    __buffa_unknown_fields: self
23671                        .__buffa_unknown_fields
23672                        .to_owned()
23673                        .unwrap_or_default()
23674                        .into(),
23675                    ..::core::default::Default::default()
23676                }
23677            }
23678        }
23679        impl<'a> ::buffa::ViewEncode<'a> for GetLineageRequestView<'a> {
23680            #[allow(clippy::needless_borrow, clippy::let_and_return)]
23681            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
23682                #[allow(unused_imports)]
23683                use ::buffa::Enumeration as _;
23684                let mut size = 0u32;
23685                if !self.node_id.is_empty() {
23686                    size
23687                        += 1u32
23688                            + ::buffa::types::string_encoded_len(&self.node_id) as u32;
23689                }
23690                if self.depth != 0i32 {
23691                    size += 1u32 + ::buffa::types::int32_encoded_len(self.depth) as u32;
23692                }
23693                size += self.__buffa_unknown_fields.encoded_len() as u32;
23694                size
23695            }
23696            #[allow(clippy::needless_borrow)]
23697            fn write_to(
23698                &self,
23699                _cache: &mut ::buffa::SizeCache,
23700                buf: &mut impl ::buffa::bytes::BufMut,
23701            ) {
23702                #[allow(unused_imports)]
23703                use ::buffa::Enumeration as _;
23704                if !self.node_id.is_empty() {
23705                    ::buffa::encoding::Tag::new(
23706                            1u32,
23707                            ::buffa::encoding::WireType::LengthDelimited,
23708                        )
23709                        .encode(buf);
23710                    ::buffa::types::encode_string(&self.node_id, buf);
23711                }
23712                if self.depth != 0i32 {
23713                    ::buffa::encoding::Tag::new(
23714                            2u32,
23715                            ::buffa::encoding::WireType::Varint,
23716                        )
23717                        .encode(buf);
23718                    ::buffa::types::encode_int32(self.depth, buf);
23719                }
23720                self.__buffa_unknown_fields.write_to(buf);
23721            }
23722        }
23723        /// Serializes this view as protobuf JSON.
23724        ///
23725        /// Implicit-presence fields with default values are omitted, `required`
23726        /// fields are always emitted, explicit-presence (`optional`) fields are
23727        /// emitted only when set, bytes fields are base64-encoded, and enum
23728        /// values are their proto name strings.
23729        ///
23730        /// This impl uses `serialize_map(None)` because the number of emitted
23731        /// fields depends on default-omission rules; serializers that require
23732        /// known map lengths (e.g. `bincode`) will return a runtime error.
23733        /// Use the owned message type for those formats.
23734        impl<'__a> ::serde::Serialize for GetLineageRequestView<'__a> {
23735            fn serialize<__S: ::serde::Serializer>(
23736                &self,
23737                __s: __S,
23738            ) -> ::core::result::Result<__S::Ok, __S::Error> {
23739                use ::serde::ser::SerializeMap as _;
23740                let mut __map = __s.serialize_map(::core::option::Option::None)?;
23741                if !::buffa::json_helpers::skip_if::is_empty_str(self.node_id) {
23742                    __map.serialize_entry("nodeId", self.node_id)?;
23743                }
23744                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.depth) {
23745                    struct _W(i32);
23746                    impl ::serde::Serialize for _W {
23747                        fn serialize<__S: ::serde::Serializer>(
23748                            &self,
23749                            __s: __S,
23750                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
23751                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
23752                        }
23753                    }
23754                    __map.serialize_entry("depth", &_W(self.depth))?;
23755                }
23756                __map.end()
23757            }
23758        }
23759        impl<'a> ::buffa::MessageName for GetLineageRequestView<'a> {
23760            const PACKAGE: &'static str = "headwaters.read.v1";
23761            const NAME: &'static str = "GetLineageRequest";
23762            const FULL_NAME: &'static str = "headwaters.read.v1.GetLineageRequest";
23763            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetLineageRequest";
23764        }
23765        impl<'v> ::buffa::DefaultViewInstance for GetLineageRequestView<'v> {
23766            fn default_view_instance<'a>() -> &'a Self
23767            where
23768                Self: 'a,
23769            {
23770                static VALUE: ::buffa::__private::OnceBox<
23771                    GetLineageRequestView<'static>,
23772                > = ::buffa::__private::OnceBox::new();
23773                VALUE
23774                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
23775                        <GetLineageRequestView<'static>>::default(),
23776                    ))
23777            }
23778        }
23779        impl ::buffa::ViewReborrow for GetLineageRequestView<'static> {
23780            type Reborrowed<'b> = GetLineageRequestView<'b>;
23781            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
23782                this
23783            }
23784        }
23785        /** Self-contained, `'static` owned view of a `GetLineageRequest` message.
23786
23787 Wraps [`::buffa::OwnedView`]`<`[`GetLineageRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
23788
23789 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetLineageRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
23790        #[derive(Clone, Debug)]
23791        pub struct GetLineageRequestOwnedView(
23792            ::buffa::OwnedView<GetLineageRequestView<'static>>,
23793        );
23794        impl GetLineageRequestOwnedView {
23795            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
23796            ///
23797            /// The view borrows directly from the buffer's data; the buffer is
23798            /// retained inside the returned handle.
23799            ///
23800            /// # Errors
23801            ///
23802            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
23803            /// protobuf data.
23804            pub fn decode(
23805                bytes: ::buffa::bytes::Bytes,
23806            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23807                ::core::result::Result::Ok(
23808                    GetLineageRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
23809                )
23810            }
23811            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
23812            /// max message size).
23813            ///
23814            /// # Errors
23815            ///
23816            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
23817            /// exceeds the configured limits.
23818            pub fn decode_with_options(
23819                bytes: ::buffa::bytes::Bytes,
23820                opts: &::buffa::DecodeOptions,
23821            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23822                ::core::result::Result::Ok(
23823                    GetLineageRequestOwnedView(
23824                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
23825                    ),
23826                )
23827            }
23828            /// Build from an owned message via an encode → decode round-trip.
23829            ///
23830            /// # Errors
23831            ///
23832            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
23833            /// somehow invalid (should not happen for well-formed messages).
23834            pub fn from_owned(
23835                msg: &super::super::GetLineageRequest,
23836            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23837                ::core::result::Result::Ok(
23838                    GetLineageRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
23839                )
23840            }
23841            /// Borrow the full [`GetLineageRequestView`] with its lifetime tied to `&self`.
23842            #[must_use]
23843            pub fn view(&self) -> &GetLineageRequestView<'_> {
23844                self.0.reborrow()
23845            }
23846            /// Convert to the owned message type.
23847            #[must_use]
23848            pub fn to_owned_message(&self) -> super::super::GetLineageRequest {
23849                self.0.to_owned_message()
23850            }
23851            /// The underlying bytes buffer.
23852            #[must_use]
23853            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
23854                self.0.bytes()
23855            }
23856            /// Consume the handle, returning the underlying bytes buffer.
23857            #[must_use]
23858            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
23859                self.0.into_bytes()
23860            }
23861            /// Seed node: `job:<ns>:<name>` or `dataset:<ns>:<name>`.
23862            ///
23863            /// Field 1: `node_id`
23864            #[must_use]
23865            pub fn node_id(&self) -> &'_ str {
23866                self.0.reborrow().node_id
23867            }
23868            /// Maximum hops to traverse from the seed. Defaults to, and is capped at, 20.
23869            ///
23870            /// Field 2: `depth`
23871            #[must_use]
23872            pub fn depth(&self) -> i32 {
23873                self.0.reborrow().depth
23874            }
23875        }
23876        impl ::core::convert::From<::buffa::OwnedView<GetLineageRequestView<'static>>>
23877        for GetLineageRequestOwnedView {
23878            fn from(inner: ::buffa::OwnedView<GetLineageRequestView<'static>>) -> Self {
23879                GetLineageRequestOwnedView(inner)
23880            }
23881        }
23882        impl ::core::convert::From<GetLineageRequestOwnedView>
23883        for ::buffa::OwnedView<GetLineageRequestView<'static>> {
23884            fn from(wrapper: GetLineageRequestOwnedView) -> Self {
23885                wrapper.0
23886            }
23887        }
23888        impl ::core::convert::AsRef<::buffa::OwnedView<GetLineageRequestView<'static>>>
23889        for GetLineageRequestOwnedView {
23890            fn as_ref(&self) -> &::buffa::OwnedView<GetLineageRequestView<'static>> {
23891                &self.0
23892            }
23893        }
23894        impl ::buffa::HasMessageView for super::super::GetLineageRequest {
23895            type View<'a> = GetLineageRequestView<'a>;
23896            type ViewHandle = GetLineageRequestOwnedView;
23897        }
23898        impl ::serde::Serialize for GetLineageRequestOwnedView {
23899            fn serialize<__S: ::serde::Serializer>(
23900                &self,
23901                __s: __S,
23902            ) -> ::core::result::Result<__S::Ok, __S::Error> {
23903                ::serde::Serialize::serialize(&self.0, __s)
23904            }
23905        }
23906        #[derive(Clone, Debug, Default)]
23907        pub struct GetColumnLineageRequestView<'a> {
23908            /// Seed node: a `dataset:<ns>:<name>` (all fields) or a
23909            /// `datasetField:<ns>:<name>:<field>`.
23910            ///
23911            /// Field 1: `node_id`
23912            pub node_id: &'a str,
23913            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
23914        }
23915        impl<'a> GetColumnLineageRequestView<'a> {
23916            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
23917            ///
23918            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
23919            /// and by generated sub-message decode arms with `depth - 1`.
23920            ///
23921            /// **Not part of the public API.** Named with a leading underscore to
23922            /// signal that it is for generated-code use only.
23923            #[doc(hidden)]
23924            pub fn _decode_depth(
23925                buf: &'a [u8],
23926                depth: u32,
23927            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23928                let mut view = Self::default();
23929                view._merge_into_view(buf, depth)?;
23930                ::core::result::Result::Ok(view)
23931            }
23932            /// Merge fields from `buf` into this view (proto merge semantics).
23933            ///
23934            /// Repeated fields append; singular fields last-wins; singular
23935            /// MESSAGE fields merge recursively. Used by sub-message decode
23936            /// arms when the same field appears multiple times on the wire.
23937            ///
23938            /// **Not part of the public API.**
23939            #[doc(hidden)]
23940            pub fn _merge_into_view(
23941                &mut self,
23942                buf: &'a [u8],
23943                depth: u32,
23944            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
23945                let _ = depth;
23946                #[allow(unused_variables)]
23947                let view = self;
23948                let mut cur: &'a [u8] = buf;
23949                while !cur.is_empty() {
23950                    let before_tag = cur;
23951                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
23952                    match tag.field_number() {
23953                        1u32 => {
23954                            if tag.wire_type()
23955                                != ::buffa::encoding::WireType::LengthDelimited
23956                            {
23957                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
23958                                    field_number: 1u32,
23959                                    expected: 2u8,
23960                                    actual: tag.wire_type() as u8,
23961                                });
23962                            }
23963                            view.node_id = ::buffa::types::borrow_str(&mut cur)?;
23964                        }
23965                        _ => {
23966                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
23967                            let span_len = before_tag.len() - cur.len();
23968                            view.__buffa_unknown_fields
23969                                .push_raw(&before_tag[..span_len]);
23970                        }
23971                    }
23972                }
23973                ::core::result::Result::Ok(())
23974            }
23975        }
23976        impl<'a> ::buffa::MessageView<'a> for GetColumnLineageRequestView<'a> {
23977            type Owned = super::super::GetColumnLineageRequest;
23978            fn decode_view(
23979                buf: &'a [u8],
23980            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23981                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
23982            }
23983            fn decode_view_with_limit(
23984                buf: &'a [u8],
23985                depth: u32,
23986            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
23987                Self::_decode_depth(buf, depth)
23988            }
23989            fn to_owned_message(&self) -> super::super::GetColumnLineageRequest {
23990                self.to_owned_from_source(None)
23991            }
23992            #[allow(clippy::useless_conversion, clippy::needless_update)]
23993            fn to_owned_from_source(
23994                &self,
23995                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
23996            ) -> super::super::GetColumnLineageRequest {
23997                #[allow(unused_imports)]
23998                use ::buffa::alloc::string::ToString as _;
23999                let _ = __buffa_src;
24000                super::super::GetColumnLineageRequest {
24001                    node_id: self.node_id.to_string(),
24002                    __buffa_unknown_fields: self
24003                        .__buffa_unknown_fields
24004                        .to_owned()
24005                        .unwrap_or_default()
24006                        .into(),
24007                    ..::core::default::Default::default()
24008                }
24009            }
24010        }
24011        impl<'a> ::buffa::ViewEncode<'a> for GetColumnLineageRequestView<'a> {
24012            #[allow(clippy::needless_borrow, clippy::let_and_return)]
24013            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
24014                #[allow(unused_imports)]
24015                use ::buffa::Enumeration as _;
24016                let mut size = 0u32;
24017                if !self.node_id.is_empty() {
24018                    size
24019                        += 1u32
24020                            + ::buffa::types::string_encoded_len(&self.node_id) as u32;
24021                }
24022                size += self.__buffa_unknown_fields.encoded_len() as u32;
24023                size
24024            }
24025            #[allow(clippy::needless_borrow)]
24026            fn write_to(
24027                &self,
24028                _cache: &mut ::buffa::SizeCache,
24029                buf: &mut impl ::buffa::bytes::BufMut,
24030            ) {
24031                #[allow(unused_imports)]
24032                use ::buffa::Enumeration as _;
24033                if !self.node_id.is_empty() {
24034                    ::buffa::encoding::Tag::new(
24035                            1u32,
24036                            ::buffa::encoding::WireType::LengthDelimited,
24037                        )
24038                        .encode(buf);
24039                    ::buffa::types::encode_string(&self.node_id, buf);
24040                }
24041                self.__buffa_unknown_fields.write_to(buf);
24042            }
24043        }
24044        /// Serializes this view as protobuf JSON.
24045        ///
24046        /// Implicit-presence fields with default values are omitted, `required`
24047        /// fields are always emitted, explicit-presence (`optional`) fields are
24048        /// emitted only when set, bytes fields are base64-encoded, and enum
24049        /// values are their proto name strings.
24050        ///
24051        /// This impl uses `serialize_map(None)` because the number of emitted
24052        /// fields depends on default-omission rules; serializers that require
24053        /// known map lengths (e.g. `bincode`) will return a runtime error.
24054        /// Use the owned message type for those formats.
24055        impl<'__a> ::serde::Serialize for GetColumnLineageRequestView<'__a> {
24056            fn serialize<__S: ::serde::Serializer>(
24057                &self,
24058                __s: __S,
24059            ) -> ::core::result::Result<__S::Ok, __S::Error> {
24060                use ::serde::ser::SerializeMap as _;
24061                let mut __map = __s.serialize_map(::core::option::Option::None)?;
24062                if !::buffa::json_helpers::skip_if::is_empty_str(self.node_id) {
24063                    __map.serialize_entry("nodeId", self.node_id)?;
24064                }
24065                __map.end()
24066            }
24067        }
24068        impl<'a> ::buffa::MessageName for GetColumnLineageRequestView<'a> {
24069            const PACKAGE: &'static str = "headwaters.read.v1";
24070            const NAME: &'static str = "GetColumnLineageRequest";
24071            const FULL_NAME: &'static str = "headwaters.read.v1.GetColumnLineageRequest";
24072            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetColumnLineageRequest";
24073        }
24074        impl<'v> ::buffa::DefaultViewInstance for GetColumnLineageRequestView<'v> {
24075            fn default_view_instance<'a>() -> &'a Self
24076            where
24077                Self: 'a,
24078            {
24079                static VALUE: ::buffa::__private::OnceBox<
24080                    GetColumnLineageRequestView<'static>,
24081                > = ::buffa::__private::OnceBox::new();
24082                VALUE
24083                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
24084                        <GetColumnLineageRequestView<'static>>::default(),
24085                    ))
24086            }
24087        }
24088        impl ::buffa::ViewReborrow for GetColumnLineageRequestView<'static> {
24089            type Reborrowed<'b> = GetColumnLineageRequestView<'b>;
24090            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
24091                this
24092            }
24093        }
24094        /** Self-contained, `'static` owned view of a `GetColumnLineageRequest` message.
24095
24096 Wraps [`::buffa::OwnedView`]`<`[`GetColumnLineageRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
24097
24098 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetColumnLineageRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
24099        #[derive(Clone, Debug)]
24100        pub struct GetColumnLineageRequestOwnedView(
24101            ::buffa::OwnedView<GetColumnLineageRequestView<'static>>,
24102        );
24103        impl GetColumnLineageRequestOwnedView {
24104            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
24105            ///
24106            /// The view borrows directly from the buffer's data; the buffer is
24107            /// retained inside the returned handle.
24108            ///
24109            /// # Errors
24110            ///
24111            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
24112            /// protobuf data.
24113            pub fn decode(
24114                bytes: ::buffa::bytes::Bytes,
24115            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24116                ::core::result::Result::Ok(
24117                    GetColumnLineageRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
24118                )
24119            }
24120            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
24121            /// max message size).
24122            ///
24123            /// # Errors
24124            ///
24125            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
24126            /// exceeds the configured limits.
24127            pub fn decode_with_options(
24128                bytes: ::buffa::bytes::Bytes,
24129                opts: &::buffa::DecodeOptions,
24130            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24131                ::core::result::Result::Ok(
24132                    GetColumnLineageRequestOwnedView(
24133                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
24134                    ),
24135                )
24136            }
24137            /// Build from an owned message via an encode → decode round-trip.
24138            ///
24139            /// # Errors
24140            ///
24141            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
24142            /// somehow invalid (should not happen for well-formed messages).
24143            pub fn from_owned(
24144                msg: &super::super::GetColumnLineageRequest,
24145            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24146                ::core::result::Result::Ok(
24147                    GetColumnLineageRequestOwnedView(
24148                        ::buffa::OwnedView::from_owned(msg)?,
24149                    ),
24150                )
24151            }
24152            /// Borrow the full [`GetColumnLineageRequestView`] with its lifetime tied to `&self`.
24153            #[must_use]
24154            pub fn view(&self) -> &GetColumnLineageRequestView<'_> {
24155                self.0.reborrow()
24156            }
24157            /// Convert to the owned message type.
24158            #[must_use]
24159            pub fn to_owned_message(&self) -> super::super::GetColumnLineageRequest {
24160                self.0.to_owned_message()
24161            }
24162            /// The underlying bytes buffer.
24163            #[must_use]
24164            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
24165                self.0.bytes()
24166            }
24167            /// Consume the handle, returning the underlying bytes buffer.
24168            #[must_use]
24169            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
24170                self.0.into_bytes()
24171            }
24172            /// Seed node: a `dataset:<ns>:<name>` (all fields) or a
24173            /// `datasetField:<ns>:<name>:<field>`.
24174            ///
24175            /// Field 1: `node_id`
24176            #[must_use]
24177            pub fn node_id(&self) -> &'_ str {
24178                self.0.reborrow().node_id
24179            }
24180        }
24181        impl ::core::convert::From<
24182            ::buffa::OwnedView<GetColumnLineageRequestView<'static>>,
24183        > for GetColumnLineageRequestOwnedView {
24184            fn from(
24185                inner: ::buffa::OwnedView<GetColumnLineageRequestView<'static>>,
24186            ) -> Self {
24187                GetColumnLineageRequestOwnedView(inner)
24188            }
24189        }
24190        impl ::core::convert::From<GetColumnLineageRequestOwnedView>
24191        for ::buffa::OwnedView<GetColumnLineageRequestView<'static>> {
24192            fn from(wrapper: GetColumnLineageRequestOwnedView) -> Self {
24193                wrapper.0
24194            }
24195        }
24196        impl ::core::convert::AsRef<
24197            ::buffa::OwnedView<GetColumnLineageRequestView<'static>>,
24198        > for GetColumnLineageRequestOwnedView {
24199            fn as_ref(
24200                &self,
24201            ) -> &::buffa::OwnedView<GetColumnLineageRequestView<'static>> {
24202                &self.0
24203            }
24204        }
24205        impl ::buffa::HasMessageView for super::super::GetColumnLineageRequest {
24206            type View<'a> = GetColumnLineageRequestView<'a>;
24207            type ViewHandle = GetColumnLineageRequestOwnedView;
24208        }
24209        impl ::serde::Serialize for GetColumnLineageRequestOwnedView {
24210            fn serialize<__S: ::serde::Serializer>(
24211                &self,
24212                __s: __S,
24213            ) -> ::core::result::Result<__S::Ok, __S::Error> {
24214                ::serde::Serialize::serialize(&self.0, __s)
24215            }
24216        }
24217        #[derive(Clone, Debug, Default)]
24218        pub struct ListEventsRequestView<'a> {
24219            /// Field 1: `limit`
24220            pub limit: i32,
24221            /// Field 2: `offset`
24222            pub offset: i32,
24223            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
24224        }
24225        impl<'a> ListEventsRequestView<'a> {
24226            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
24227            ///
24228            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
24229            /// and by generated sub-message decode arms with `depth - 1`.
24230            ///
24231            /// **Not part of the public API.** Named with a leading underscore to
24232            /// signal that it is for generated-code use only.
24233            #[doc(hidden)]
24234            pub fn _decode_depth(
24235                buf: &'a [u8],
24236                depth: u32,
24237            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24238                let mut view = Self::default();
24239                view._merge_into_view(buf, depth)?;
24240                ::core::result::Result::Ok(view)
24241            }
24242            /// Merge fields from `buf` into this view (proto merge semantics).
24243            ///
24244            /// Repeated fields append; singular fields last-wins; singular
24245            /// MESSAGE fields merge recursively. Used by sub-message decode
24246            /// arms when the same field appears multiple times on the wire.
24247            ///
24248            /// **Not part of the public API.**
24249            #[doc(hidden)]
24250            pub fn _merge_into_view(
24251                &mut self,
24252                buf: &'a [u8],
24253                depth: u32,
24254            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
24255                let _ = depth;
24256                #[allow(unused_variables)]
24257                let view = self;
24258                let mut cur: &'a [u8] = buf;
24259                while !cur.is_empty() {
24260                    let before_tag = cur;
24261                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
24262                    match tag.field_number() {
24263                        1u32 => {
24264                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
24265                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
24266                                    field_number: 1u32,
24267                                    expected: 0u8,
24268                                    actual: tag.wire_type() as u8,
24269                                });
24270                            }
24271                            view.limit = ::buffa::types::decode_int32(&mut cur)?;
24272                        }
24273                        2u32 => {
24274                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
24275                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
24276                                    field_number: 2u32,
24277                                    expected: 0u8,
24278                                    actual: tag.wire_type() as u8,
24279                                });
24280                            }
24281                            view.offset = ::buffa::types::decode_int32(&mut cur)?;
24282                        }
24283                        _ => {
24284                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
24285                            let span_len = before_tag.len() - cur.len();
24286                            view.__buffa_unknown_fields
24287                                .push_raw(&before_tag[..span_len]);
24288                        }
24289                    }
24290                }
24291                ::core::result::Result::Ok(())
24292            }
24293        }
24294        impl<'a> ::buffa::MessageView<'a> for ListEventsRequestView<'a> {
24295            type Owned = super::super::ListEventsRequest;
24296            fn decode_view(
24297                buf: &'a [u8],
24298            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24299                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
24300            }
24301            fn decode_view_with_limit(
24302                buf: &'a [u8],
24303                depth: u32,
24304            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24305                Self::_decode_depth(buf, depth)
24306            }
24307            fn to_owned_message(&self) -> super::super::ListEventsRequest {
24308                self.to_owned_from_source(None)
24309            }
24310            #[allow(clippy::useless_conversion, clippy::needless_update)]
24311            fn to_owned_from_source(
24312                &self,
24313                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
24314            ) -> super::super::ListEventsRequest {
24315                #[allow(unused_imports)]
24316                use ::buffa::alloc::string::ToString as _;
24317                let _ = __buffa_src;
24318                super::super::ListEventsRequest {
24319                    limit: self.limit,
24320                    offset: self.offset,
24321                    __buffa_unknown_fields: self
24322                        .__buffa_unknown_fields
24323                        .to_owned()
24324                        .unwrap_or_default()
24325                        .into(),
24326                    ..::core::default::Default::default()
24327                }
24328            }
24329        }
24330        impl<'a> ::buffa::ViewEncode<'a> for ListEventsRequestView<'a> {
24331            #[allow(clippy::needless_borrow, clippy::let_and_return)]
24332            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
24333                #[allow(unused_imports)]
24334                use ::buffa::Enumeration as _;
24335                let mut size = 0u32;
24336                if self.limit != 0i32 {
24337                    size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
24338                }
24339                if self.offset != 0i32 {
24340                    size += 1u32 + ::buffa::types::int32_encoded_len(self.offset) as u32;
24341                }
24342                size += self.__buffa_unknown_fields.encoded_len() as u32;
24343                size
24344            }
24345            #[allow(clippy::needless_borrow)]
24346            fn write_to(
24347                &self,
24348                _cache: &mut ::buffa::SizeCache,
24349                buf: &mut impl ::buffa::bytes::BufMut,
24350            ) {
24351                #[allow(unused_imports)]
24352                use ::buffa::Enumeration as _;
24353                if self.limit != 0i32 {
24354                    ::buffa::encoding::Tag::new(
24355                            1u32,
24356                            ::buffa::encoding::WireType::Varint,
24357                        )
24358                        .encode(buf);
24359                    ::buffa::types::encode_int32(self.limit, buf);
24360                }
24361                if self.offset != 0i32 {
24362                    ::buffa::encoding::Tag::new(
24363                            2u32,
24364                            ::buffa::encoding::WireType::Varint,
24365                        )
24366                        .encode(buf);
24367                    ::buffa::types::encode_int32(self.offset, buf);
24368                }
24369                self.__buffa_unknown_fields.write_to(buf);
24370            }
24371        }
24372        /// Serializes this view as protobuf JSON.
24373        ///
24374        /// Implicit-presence fields with default values are omitted, `required`
24375        /// fields are always emitted, explicit-presence (`optional`) fields are
24376        /// emitted only when set, bytes fields are base64-encoded, and enum
24377        /// values are their proto name strings.
24378        ///
24379        /// This impl uses `serialize_map(None)` because the number of emitted
24380        /// fields depends on default-omission rules; serializers that require
24381        /// known map lengths (e.g. `bincode`) will return a runtime error.
24382        /// Use the owned message type for those formats.
24383        impl<'__a> ::serde::Serialize for ListEventsRequestView<'__a> {
24384            fn serialize<__S: ::serde::Serializer>(
24385                &self,
24386                __s: __S,
24387            ) -> ::core::result::Result<__S::Ok, __S::Error> {
24388                use ::serde::ser::SerializeMap as _;
24389                let mut __map = __s.serialize_map(::core::option::Option::None)?;
24390                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.limit) {
24391                    struct _W(i32);
24392                    impl ::serde::Serialize for _W {
24393                        fn serialize<__S: ::serde::Serializer>(
24394                            &self,
24395                            __s: __S,
24396                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
24397                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
24398                        }
24399                    }
24400                    __map.serialize_entry("limit", &_W(self.limit))?;
24401                }
24402                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.offset) {
24403                    struct _W(i32);
24404                    impl ::serde::Serialize for _W {
24405                        fn serialize<__S: ::serde::Serializer>(
24406                            &self,
24407                            __s: __S,
24408                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
24409                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
24410                        }
24411                    }
24412                    __map.serialize_entry("offset", &_W(self.offset))?;
24413                }
24414                __map.end()
24415            }
24416        }
24417        impl<'a> ::buffa::MessageName for ListEventsRequestView<'a> {
24418            const PACKAGE: &'static str = "headwaters.read.v1";
24419            const NAME: &'static str = "ListEventsRequest";
24420            const FULL_NAME: &'static str = "headwaters.read.v1.ListEventsRequest";
24421            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListEventsRequest";
24422        }
24423        impl<'v> ::buffa::DefaultViewInstance for ListEventsRequestView<'v> {
24424            fn default_view_instance<'a>() -> &'a Self
24425            where
24426                Self: 'a,
24427            {
24428                static VALUE: ::buffa::__private::OnceBox<
24429                    ListEventsRequestView<'static>,
24430                > = ::buffa::__private::OnceBox::new();
24431                VALUE
24432                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
24433                        <ListEventsRequestView<'static>>::default(),
24434                    ))
24435            }
24436        }
24437        impl ::buffa::ViewReborrow for ListEventsRequestView<'static> {
24438            type Reborrowed<'b> = ListEventsRequestView<'b>;
24439            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
24440                this
24441            }
24442        }
24443        /** Self-contained, `'static` owned view of a `ListEventsRequest` message.
24444
24445 Wraps [`::buffa::OwnedView`]`<`[`ListEventsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
24446
24447 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListEventsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
24448        #[derive(Clone, Debug)]
24449        pub struct ListEventsRequestOwnedView(
24450            ::buffa::OwnedView<ListEventsRequestView<'static>>,
24451        );
24452        impl ListEventsRequestOwnedView {
24453            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
24454            ///
24455            /// The view borrows directly from the buffer's data; the buffer is
24456            /// retained inside the returned handle.
24457            ///
24458            /// # Errors
24459            ///
24460            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
24461            /// protobuf data.
24462            pub fn decode(
24463                bytes: ::buffa::bytes::Bytes,
24464            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24465                ::core::result::Result::Ok(
24466                    ListEventsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
24467                )
24468            }
24469            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
24470            /// max message size).
24471            ///
24472            /// # Errors
24473            ///
24474            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
24475            /// exceeds the configured limits.
24476            pub fn decode_with_options(
24477                bytes: ::buffa::bytes::Bytes,
24478                opts: &::buffa::DecodeOptions,
24479            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24480                ::core::result::Result::Ok(
24481                    ListEventsRequestOwnedView(
24482                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
24483                    ),
24484                )
24485            }
24486            /// Build from an owned message via an encode → decode round-trip.
24487            ///
24488            /// # Errors
24489            ///
24490            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
24491            /// somehow invalid (should not happen for well-formed messages).
24492            pub fn from_owned(
24493                msg: &super::super::ListEventsRequest,
24494            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24495                ::core::result::Result::Ok(
24496                    ListEventsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
24497                )
24498            }
24499            /// Borrow the full [`ListEventsRequestView`] with its lifetime tied to `&self`.
24500            #[must_use]
24501            pub fn view(&self) -> &ListEventsRequestView<'_> {
24502                self.0.reborrow()
24503            }
24504            /// Convert to the owned message type.
24505            #[must_use]
24506            pub fn to_owned_message(&self) -> super::super::ListEventsRequest {
24507                self.0.to_owned_message()
24508            }
24509            /// The underlying bytes buffer.
24510            #[must_use]
24511            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
24512                self.0.bytes()
24513            }
24514            /// Consume the handle, returning the underlying bytes buffer.
24515            #[must_use]
24516            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
24517                self.0.into_bytes()
24518            }
24519            /// Field 1: `limit`
24520            #[must_use]
24521            pub fn limit(&self) -> i32 {
24522                self.0.reborrow().limit
24523            }
24524            /// Field 2: `offset`
24525            #[must_use]
24526            pub fn offset(&self) -> i32 {
24527                self.0.reborrow().offset
24528            }
24529        }
24530        impl ::core::convert::From<::buffa::OwnedView<ListEventsRequestView<'static>>>
24531        for ListEventsRequestOwnedView {
24532            fn from(inner: ::buffa::OwnedView<ListEventsRequestView<'static>>) -> Self {
24533                ListEventsRequestOwnedView(inner)
24534            }
24535        }
24536        impl ::core::convert::From<ListEventsRequestOwnedView>
24537        for ::buffa::OwnedView<ListEventsRequestView<'static>> {
24538            fn from(wrapper: ListEventsRequestOwnedView) -> Self {
24539                wrapper.0
24540            }
24541        }
24542        impl ::core::convert::AsRef<::buffa::OwnedView<ListEventsRequestView<'static>>>
24543        for ListEventsRequestOwnedView {
24544            fn as_ref(&self) -> &::buffa::OwnedView<ListEventsRequestView<'static>> {
24545                &self.0
24546            }
24547        }
24548        impl ::buffa::HasMessageView for super::super::ListEventsRequest {
24549            type View<'a> = ListEventsRequestView<'a>;
24550            type ViewHandle = ListEventsRequestOwnedView;
24551        }
24552        impl ::serde::Serialize for ListEventsRequestOwnedView {
24553            fn serialize<__S: ::serde::Serializer>(
24554                &self,
24555                __s: __S,
24556            ) -> ::core::result::Result<__S::Ok, __S::Error> {
24557                ::serde::Serialize::serialize(&self.0, __s)
24558            }
24559        }
24560        #[derive(Clone, Debug, Default)]
24561        pub struct GetRunFacetsRequestView<'a> {
24562            /// Field 1: `run_id`
24563            pub run_id: &'a str,
24564            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
24565        }
24566        impl<'a> GetRunFacetsRequestView<'a> {
24567            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
24568            ///
24569            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
24570            /// and by generated sub-message decode arms with `depth - 1`.
24571            ///
24572            /// **Not part of the public API.** Named with a leading underscore to
24573            /// signal that it is for generated-code use only.
24574            #[doc(hidden)]
24575            pub fn _decode_depth(
24576                buf: &'a [u8],
24577                depth: u32,
24578            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24579                let mut view = Self::default();
24580                view._merge_into_view(buf, depth)?;
24581                ::core::result::Result::Ok(view)
24582            }
24583            /// Merge fields from `buf` into this view (proto merge semantics).
24584            ///
24585            /// Repeated fields append; singular fields last-wins; singular
24586            /// MESSAGE fields merge recursively. Used by sub-message decode
24587            /// arms when the same field appears multiple times on the wire.
24588            ///
24589            /// **Not part of the public API.**
24590            #[doc(hidden)]
24591            pub fn _merge_into_view(
24592                &mut self,
24593                buf: &'a [u8],
24594                depth: u32,
24595            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
24596                let _ = depth;
24597                #[allow(unused_variables)]
24598                let view = self;
24599                let mut cur: &'a [u8] = buf;
24600                while !cur.is_empty() {
24601                    let before_tag = cur;
24602                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
24603                    match tag.field_number() {
24604                        1u32 => {
24605                            if tag.wire_type()
24606                                != ::buffa::encoding::WireType::LengthDelimited
24607                            {
24608                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
24609                                    field_number: 1u32,
24610                                    expected: 2u8,
24611                                    actual: tag.wire_type() as u8,
24612                                });
24613                            }
24614                            view.run_id = ::buffa::types::borrow_str(&mut cur)?;
24615                        }
24616                        _ => {
24617                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
24618                            let span_len = before_tag.len() - cur.len();
24619                            view.__buffa_unknown_fields
24620                                .push_raw(&before_tag[..span_len]);
24621                        }
24622                    }
24623                }
24624                ::core::result::Result::Ok(())
24625            }
24626        }
24627        impl<'a> ::buffa::MessageView<'a> for GetRunFacetsRequestView<'a> {
24628            type Owned = super::super::GetRunFacetsRequest;
24629            fn decode_view(
24630                buf: &'a [u8],
24631            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24632                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
24633            }
24634            fn decode_view_with_limit(
24635                buf: &'a [u8],
24636                depth: u32,
24637            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24638                Self::_decode_depth(buf, depth)
24639            }
24640            fn to_owned_message(&self) -> super::super::GetRunFacetsRequest {
24641                self.to_owned_from_source(None)
24642            }
24643            #[allow(clippy::useless_conversion, clippy::needless_update)]
24644            fn to_owned_from_source(
24645                &self,
24646                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
24647            ) -> super::super::GetRunFacetsRequest {
24648                #[allow(unused_imports)]
24649                use ::buffa::alloc::string::ToString as _;
24650                let _ = __buffa_src;
24651                super::super::GetRunFacetsRequest {
24652                    run_id: self.run_id.to_string(),
24653                    __buffa_unknown_fields: self
24654                        .__buffa_unknown_fields
24655                        .to_owned()
24656                        .unwrap_or_default()
24657                        .into(),
24658                    ..::core::default::Default::default()
24659                }
24660            }
24661        }
24662        impl<'a> ::buffa::ViewEncode<'a> for GetRunFacetsRequestView<'a> {
24663            #[allow(clippy::needless_borrow, clippy::let_and_return)]
24664            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
24665                #[allow(unused_imports)]
24666                use ::buffa::Enumeration as _;
24667                let mut size = 0u32;
24668                if !self.run_id.is_empty() {
24669                    size
24670                        += 1u32
24671                            + ::buffa::types::string_encoded_len(&self.run_id) as u32;
24672                }
24673                size += self.__buffa_unknown_fields.encoded_len() as u32;
24674                size
24675            }
24676            #[allow(clippy::needless_borrow)]
24677            fn write_to(
24678                &self,
24679                _cache: &mut ::buffa::SizeCache,
24680                buf: &mut impl ::buffa::bytes::BufMut,
24681            ) {
24682                #[allow(unused_imports)]
24683                use ::buffa::Enumeration as _;
24684                if !self.run_id.is_empty() {
24685                    ::buffa::encoding::Tag::new(
24686                            1u32,
24687                            ::buffa::encoding::WireType::LengthDelimited,
24688                        )
24689                        .encode(buf);
24690                    ::buffa::types::encode_string(&self.run_id, buf);
24691                }
24692                self.__buffa_unknown_fields.write_to(buf);
24693            }
24694        }
24695        /// Serializes this view as protobuf JSON.
24696        ///
24697        /// Implicit-presence fields with default values are omitted, `required`
24698        /// fields are always emitted, explicit-presence (`optional`) fields are
24699        /// emitted only when set, bytes fields are base64-encoded, and enum
24700        /// values are their proto name strings.
24701        ///
24702        /// This impl uses `serialize_map(None)` because the number of emitted
24703        /// fields depends on default-omission rules; serializers that require
24704        /// known map lengths (e.g. `bincode`) will return a runtime error.
24705        /// Use the owned message type for those formats.
24706        impl<'__a> ::serde::Serialize for GetRunFacetsRequestView<'__a> {
24707            fn serialize<__S: ::serde::Serializer>(
24708                &self,
24709                __s: __S,
24710            ) -> ::core::result::Result<__S::Ok, __S::Error> {
24711                use ::serde::ser::SerializeMap as _;
24712                let mut __map = __s.serialize_map(::core::option::Option::None)?;
24713                if !::buffa::json_helpers::skip_if::is_empty_str(self.run_id) {
24714                    __map.serialize_entry("runId", self.run_id)?;
24715                }
24716                __map.end()
24717            }
24718        }
24719        impl<'a> ::buffa::MessageName for GetRunFacetsRequestView<'a> {
24720            const PACKAGE: &'static str = "headwaters.read.v1";
24721            const NAME: &'static str = "GetRunFacetsRequest";
24722            const FULL_NAME: &'static str = "headwaters.read.v1.GetRunFacetsRequest";
24723            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetRunFacetsRequest";
24724        }
24725        impl<'v> ::buffa::DefaultViewInstance for GetRunFacetsRequestView<'v> {
24726            fn default_view_instance<'a>() -> &'a Self
24727            where
24728                Self: 'a,
24729            {
24730                static VALUE: ::buffa::__private::OnceBox<
24731                    GetRunFacetsRequestView<'static>,
24732                > = ::buffa::__private::OnceBox::new();
24733                VALUE
24734                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
24735                        <GetRunFacetsRequestView<'static>>::default(),
24736                    ))
24737            }
24738        }
24739        impl ::buffa::ViewReborrow for GetRunFacetsRequestView<'static> {
24740            type Reborrowed<'b> = GetRunFacetsRequestView<'b>;
24741            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
24742                this
24743            }
24744        }
24745        /** Self-contained, `'static` owned view of a `GetRunFacetsRequest` message.
24746
24747 Wraps [`::buffa::OwnedView`]`<`[`GetRunFacetsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
24748
24749 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetRunFacetsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
24750        #[derive(Clone, Debug)]
24751        pub struct GetRunFacetsRequestOwnedView(
24752            ::buffa::OwnedView<GetRunFacetsRequestView<'static>>,
24753        );
24754        impl GetRunFacetsRequestOwnedView {
24755            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
24756            ///
24757            /// The view borrows directly from the buffer's data; the buffer is
24758            /// retained inside the returned handle.
24759            ///
24760            /// # Errors
24761            ///
24762            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
24763            /// protobuf data.
24764            pub fn decode(
24765                bytes: ::buffa::bytes::Bytes,
24766            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24767                ::core::result::Result::Ok(
24768                    GetRunFacetsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
24769                )
24770            }
24771            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
24772            /// max message size).
24773            ///
24774            /// # Errors
24775            ///
24776            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
24777            /// exceeds the configured limits.
24778            pub fn decode_with_options(
24779                bytes: ::buffa::bytes::Bytes,
24780                opts: &::buffa::DecodeOptions,
24781            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24782                ::core::result::Result::Ok(
24783                    GetRunFacetsRequestOwnedView(
24784                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
24785                    ),
24786                )
24787            }
24788            /// Build from an owned message via an encode → decode round-trip.
24789            ///
24790            /// # Errors
24791            ///
24792            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
24793            /// somehow invalid (should not happen for well-formed messages).
24794            pub fn from_owned(
24795                msg: &super::super::GetRunFacetsRequest,
24796            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24797                ::core::result::Result::Ok(
24798                    GetRunFacetsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
24799                )
24800            }
24801            /// Borrow the full [`GetRunFacetsRequestView`] with its lifetime tied to `&self`.
24802            #[must_use]
24803            pub fn view(&self) -> &GetRunFacetsRequestView<'_> {
24804                self.0.reborrow()
24805            }
24806            /// Convert to the owned message type.
24807            #[must_use]
24808            pub fn to_owned_message(&self) -> super::super::GetRunFacetsRequest {
24809                self.0.to_owned_message()
24810            }
24811            /// The underlying bytes buffer.
24812            #[must_use]
24813            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
24814                self.0.bytes()
24815            }
24816            /// Consume the handle, returning the underlying bytes buffer.
24817            #[must_use]
24818            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
24819                self.0.into_bytes()
24820            }
24821            /// Field 1: `run_id`
24822            #[must_use]
24823            pub fn run_id(&self) -> &'_ str {
24824                self.0.reborrow().run_id
24825            }
24826        }
24827        impl ::core::convert::From<::buffa::OwnedView<GetRunFacetsRequestView<'static>>>
24828        for GetRunFacetsRequestOwnedView {
24829            fn from(
24830                inner: ::buffa::OwnedView<GetRunFacetsRequestView<'static>>,
24831            ) -> Self {
24832                GetRunFacetsRequestOwnedView(inner)
24833            }
24834        }
24835        impl ::core::convert::From<GetRunFacetsRequestOwnedView>
24836        for ::buffa::OwnedView<GetRunFacetsRequestView<'static>> {
24837            fn from(wrapper: GetRunFacetsRequestOwnedView) -> Self {
24838                wrapper.0
24839            }
24840        }
24841        impl ::core::convert::AsRef<::buffa::OwnedView<GetRunFacetsRequestView<'static>>>
24842        for GetRunFacetsRequestOwnedView {
24843            fn as_ref(&self) -> &::buffa::OwnedView<GetRunFacetsRequestView<'static>> {
24844                &self.0
24845            }
24846        }
24847        impl ::buffa::HasMessageView for super::super::GetRunFacetsRequest {
24848            type View<'a> = GetRunFacetsRequestView<'a>;
24849            type ViewHandle = GetRunFacetsRequestOwnedView;
24850        }
24851        impl ::serde::Serialize for GetRunFacetsRequestOwnedView {
24852            fn serialize<__S: ::serde::Serializer>(
24853                &self,
24854                __s: __S,
24855            ) -> ::core::result::Result<__S::Ok, __S::Error> {
24856                ::serde::Serialize::serialize(&self.0, __s)
24857            }
24858        }
24859        #[derive(Clone, Debug, Default)]
24860        pub struct ListTagsRequestView<'a> {
24861            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
24862        }
24863        impl<'a> ListTagsRequestView<'a> {
24864            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
24865            ///
24866            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
24867            /// and by generated sub-message decode arms with `depth - 1`.
24868            ///
24869            /// **Not part of the public API.** Named with a leading underscore to
24870            /// signal that it is for generated-code use only.
24871            #[doc(hidden)]
24872            pub fn _decode_depth(
24873                buf: &'a [u8],
24874                depth: u32,
24875            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24876                let mut view = Self::default();
24877                view._merge_into_view(buf, depth)?;
24878                ::core::result::Result::Ok(view)
24879            }
24880            /// Merge fields from `buf` into this view (proto merge semantics).
24881            ///
24882            /// Repeated fields append; singular fields last-wins; singular
24883            /// MESSAGE fields merge recursively. Used by sub-message decode
24884            /// arms when the same field appears multiple times on the wire.
24885            ///
24886            /// **Not part of the public API.**
24887            #[doc(hidden)]
24888            pub fn _merge_into_view(
24889                &mut self,
24890                buf: &'a [u8],
24891                depth: u32,
24892            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
24893                let _ = depth;
24894                #[allow(unused_variables)]
24895                let view = self;
24896                let mut cur: &'a [u8] = buf;
24897                while !cur.is_empty() {
24898                    let before_tag = cur;
24899                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
24900                    match tag.field_number() {
24901                        _ => {
24902                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
24903                            let span_len = before_tag.len() - cur.len();
24904                            view.__buffa_unknown_fields
24905                                .push_raw(&before_tag[..span_len]);
24906                        }
24907                    }
24908                }
24909                ::core::result::Result::Ok(())
24910            }
24911        }
24912        impl<'a> ::buffa::MessageView<'a> for ListTagsRequestView<'a> {
24913            type Owned = super::super::ListTagsRequest;
24914            fn decode_view(
24915                buf: &'a [u8],
24916            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24917                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
24918            }
24919            fn decode_view_with_limit(
24920                buf: &'a [u8],
24921                depth: u32,
24922            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
24923                Self::_decode_depth(buf, depth)
24924            }
24925            fn to_owned_message(&self) -> super::super::ListTagsRequest {
24926                self.to_owned_from_source(None)
24927            }
24928            #[allow(clippy::useless_conversion, clippy::needless_update)]
24929            fn to_owned_from_source(
24930                &self,
24931                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
24932            ) -> super::super::ListTagsRequest {
24933                #[allow(unused_imports)]
24934                use ::buffa::alloc::string::ToString as _;
24935                let _ = __buffa_src;
24936                super::super::ListTagsRequest {
24937                    __buffa_unknown_fields: self
24938                        .__buffa_unknown_fields
24939                        .to_owned()
24940                        .unwrap_or_default()
24941                        .into(),
24942                    ..::core::default::Default::default()
24943                }
24944            }
24945        }
24946        impl<'a> ::buffa::ViewEncode<'a> for ListTagsRequestView<'a> {
24947            #[allow(clippy::needless_borrow, clippy::let_and_return)]
24948            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
24949                #[allow(unused_imports)]
24950                use ::buffa::Enumeration as _;
24951                let mut size = 0u32;
24952                size += self.__buffa_unknown_fields.encoded_len() as u32;
24953                size
24954            }
24955            #[allow(clippy::needless_borrow)]
24956            fn write_to(
24957                &self,
24958                _cache: &mut ::buffa::SizeCache,
24959                buf: &mut impl ::buffa::bytes::BufMut,
24960            ) {
24961                #[allow(unused_imports)]
24962                use ::buffa::Enumeration as _;
24963                self.__buffa_unknown_fields.write_to(buf);
24964            }
24965        }
24966        /// Serializes this view as protobuf JSON.
24967        ///
24968        /// Implicit-presence fields with default values are omitted, `required`
24969        /// fields are always emitted, explicit-presence (`optional`) fields are
24970        /// emitted only when set, bytes fields are base64-encoded, and enum
24971        /// values are their proto name strings.
24972        ///
24973        /// This impl uses `serialize_map(None)` because the number of emitted
24974        /// fields depends on default-omission rules; serializers that require
24975        /// known map lengths (e.g. `bincode`) will return a runtime error.
24976        /// Use the owned message type for those formats.
24977        impl<'__a> ::serde::Serialize for ListTagsRequestView<'__a> {
24978            fn serialize<__S: ::serde::Serializer>(
24979                &self,
24980                __s: __S,
24981            ) -> ::core::result::Result<__S::Ok, __S::Error> {
24982                use ::serde::ser::SerializeMap as _;
24983                let mut __map = __s.serialize_map(::core::option::Option::None)?;
24984                __map.end()
24985            }
24986        }
24987        impl<'a> ::buffa::MessageName for ListTagsRequestView<'a> {
24988            const PACKAGE: &'static str = "headwaters.read.v1";
24989            const NAME: &'static str = "ListTagsRequest";
24990            const FULL_NAME: &'static str = "headwaters.read.v1.ListTagsRequest";
24991            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.ListTagsRequest";
24992        }
24993        impl<'v> ::buffa::DefaultViewInstance for ListTagsRequestView<'v> {
24994            fn default_view_instance<'a>() -> &'a Self
24995            where
24996                Self: 'a,
24997            {
24998                static VALUE: ::buffa::__private::OnceBox<
24999                    ListTagsRequestView<'static>,
25000                > = ::buffa::__private::OnceBox::new();
25001                VALUE
25002                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
25003                        <ListTagsRequestView<'static>>::default(),
25004                    ))
25005            }
25006        }
25007        impl ::buffa::ViewReborrow for ListTagsRequestView<'static> {
25008            type Reborrowed<'b> = ListTagsRequestView<'b>;
25009            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
25010                this
25011            }
25012        }
25013        /** Self-contained, `'static` owned view of a `ListTagsRequest` message.
25014
25015 Wraps [`::buffa::OwnedView`]`<`[`ListTagsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
25016
25017 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListTagsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
25018        #[derive(Clone, Debug)]
25019        pub struct ListTagsRequestOwnedView(
25020            ::buffa::OwnedView<ListTagsRequestView<'static>>,
25021        );
25022        impl ListTagsRequestOwnedView {
25023            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
25024            ///
25025            /// The view borrows directly from the buffer's data; the buffer is
25026            /// retained inside the returned handle.
25027            ///
25028            /// # Errors
25029            ///
25030            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
25031            /// protobuf data.
25032            pub fn decode(
25033                bytes: ::buffa::bytes::Bytes,
25034            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25035                ::core::result::Result::Ok(
25036                    ListTagsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
25037                )
25038            }
25039            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
25040            /// max message size).
25041            ///
25042            /// # Errors
25043            ///
25044            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
25045            /// exceeds the configured limits.
25046            pub fn decode_with_options(
25047                bytes: ::buffa::bytes::Bytes,
25048                opts: &::buffa::DecodeOptions,
25049            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25050                ::core::result::Result::Ok(
25051                    ListTagsRequestOwnedView(
25052                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
25053                    ),
25054                )
25055            }
25056            /// Build from an owned message via an encode → decode round-trip.
25057            ///
25058            /// # Errors
25059            ///
25060            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
25061            /// somehow invalid (should not happen for well-formed messages).
25062            pub fn from_owned(
25063                msg: &super::super::ListTagsRequest,
25064            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25065                ::core::result::Result::Ok(
25066                    ListTagsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
25067                )
25068            }
25069            /// Borrow the full [`ListTagsRequestView`] with its lifetime tied to `&self`.
25070            #[must_use]
25071            pub fn view(&self) -> &ListTagsRequestView<'_> {
25072                self.0.reborrow()
25073            }
25074            /// Convert to the owned message type.
25075            #[must_use]
25076            pub fn to_owned_message(&self) -> super::super::ListTagsRequest {
25077                self.0.to_owned_message()
25078            }
25079            /// The underlying bytes buffer.
25080            #[must_use]
25081            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
25082                self.0.bytes()
25083            }
25084            /// Consume the handle, returning the underlying bytes buffer.
25085            #[must_use]
25086            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
25087                self.0.into_bytes()
25088            }
25089        }
25090        impl ::core::convert::From<::buffa::OwnedView<ListTagsRequestView<'static>>>
25091        for ListTagsRequestOwnedView {
25092            fn from(inner: ::buffa::OwnedView<ListTagsRequestView<'static>>) -> Self {
25093                ListTagsRequestOwnedView(inner)
25094            }
25095        }
25096        impl ::core::convert::From<ListTagsRequestOwnedView>
25097        for ::buffa::OwnedView<ListTagsRequestView<'static>> {
25098            fn from(wrapper: ListTagsRequestOwnedView) -> Self {
25099                wrapper.0
25100            }
25101        }
25102        impl ::core::convert::AsRef<::buffa::OwnedView<ListTagsRequestView<'static>>>
25103        for ListTagsRequestOwnedView {
25104            fn as_ref(&self) -> &::buffa::OwnedView<ListTagsRequestView<'static>> {
25105                &self.0
25106            }
25107        }
25108        impl ::buffa::HasMessageView for super::super::ListTagsRequest {
25109            type View<'a> = ListTagsRequestView<'a>;
25110            type ViewHandle = ListTagsRequestOwnedView;
25111        }
25112        impl ::serde::Serialize for ListTagsRequestOwnedView {
25113            fn serialize<__S: ::serde::Serializer>(
25114                &self,
25115                __s: __S,
25116            ) -> ::core::result::Result<__S::Ok, __S::Error> {
25117                ::serde::Serialize::serialize(&self.0, __s)
25118            }
25119        }
25120        #[derive(Clone, Debug, Default)]
25121        pub struct GetTagDownstreamRequestView<'a> {
25122            /// Field 1: `tag`
25123            pub tag: &'a str,
25124            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
25125        }
25126        impl<'a> GetTagDownstreamRequestView<'a> {
25127            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
25128            ///
25129            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
25130            /// and by generated sub-message decode arms with `depth - 1`.
25131            ///
25132            /// **Not part of the public API.** Named with a leading underscore to
25133            /// signal that it is for generated-code use only.
25134            #[doc(hidden)]
25135            pub fn _decode_depth(
25136                buf: &'a [u8],
25137                depth: u32,
25138            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25139                let mut view = Self::default();
25140                view._merge_into_view(buf, depth)?;
25141                ::core::result::Result::Ok(view)
25142            }
25143            /// Merge fields from `buf` into this view (proto merge semantics).
25144            ///
25145            /// Repeated fields append; singular fields last-wins; singular
25146            /// MESSAGE fields merge recursively. Used by sub-message decode
25147            /// arms when the same field appears multiple times on the wire.
25148            ///
25149            /// **Not part of the public API.**
25150            #[doc(hidden)]
25151            pub fn _merge_into_view(
25152                &mut self,
25153                buf: &'a [u8],
25154                depth: u32,
25155            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
25156                let _ = depth;
25157                #[allow(unused_variables)]
25158                let view = self;
25159                let mut cur: &'a [u8] = buf;
25160                while !cur.is_empty() {
25161                    let before_tag = cur;
25162                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
25163                    match tag.field_number() {
25164                        1u32 => {
25165                            if tag.wire_type()
25166                                != ::buffa::encoding::WireType::LengthDelimited
25167                            {
25168                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
25169                                    field_number: 1u32,
25170                                    expected: 2u8,
25171                                    actual: tag.wire_type() as u8,
25172                                });
25173                            }
25174                            view.tag = ::buffa::types::borrow_str(&mut cur)?;
25175                        }
25176                        _ => {
25177                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
25178                            let span_len = before_tag.len() - cur.len();
25179                            view.__buffa_unknown_fields
25180                                .push_raw(&before_tag[..span_len]);
25181                        }
25182                    }
25183                }
25184                ::core::result::Result::Ok(())
25185            }
25186        }
25187        impl<'a> ::buffa::MessageView<'a> for GetTagDownstreamRequestView<'a> {
25188            type Owned = super::super::GetTagDownstreamRequest;
25189            fn decode_view(
25190                buf: &'a [u8],
25191            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25192                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
25193            }
25194            fn decode_view_with_limit(
25195                buf: &'a [u8],
25196                depth: u32,
25197            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25198                Self::_decode_depth(buf, depth)
25199            }
25200            fn to_owned_message(&self) -> super::super::GetTagDownstreamRequest {
25201                self.to_owned_from_source(None)
25202            }
25203            #[allow(clippy::useless_conversion, clippy::needless_update)]
25204            fn to_owned_from_source(
25205                &self,
25206                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
25207            ) -> super::super::GetTagDownstreamRequest {
25208                #[allow(unused_imports)]
25209                use ::buffa::alloc::string::ToString as _;
25210                let _ = __buffa_src;
25211                super::super::GetTagDownstreamRequest {
25212                    tag: self.tag.to_string(),
25213                    __buffa_unknown_fields: self
25214                        .__buffa_unknown_fields
25215                        .to_owned()
25216                        .unwrap_or_default()
25217                        .into(),
25218                    ..::core::default::Default::default()
25219                }
25220            }
25221        }
25222        impl<'a> ::buffa::ViewEncode<'a> for GetTagDownstreamRequestView<'a> {
25223            #[allow(clippy::needless_borrow, clippy::let_and_return)]
25224            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
25225                #[allow(unused_imports)]
25226                use ::buffa::Enumeration as _;
25227                let mut size = 0u32;
25228                if !self.tag.is_empty() {
25229                    size += 1u32 + ::buffa::types::string_encoded_len(&self.tag) as u32;
25230                }
25231                size += self.__buffa_unknown_fields.encoded_len() as u32;
25232                size
25233            }
25234            #[allow(clippy::needless_borrow)]
25235            fn write_to(
25236                &self,
25237                _cache: &mut ::buffa::SizeCache,
25238                buf: &mut impl ::buffa::bytes::BufMut,
25239            ) {
25240                #[allow(unused_imports)]
25241                use ::buffa::Enumeration as _;
25242                if !self.tag.is_empty() {
25243                    ::buffa::encoding::Tag::new(
25244                            1u32,
25245                            ::buffa::encoding::WireType::LengthDelimited,
25246                        )
25247                        .encode(buf);
25248                    ::buffa::types::encode_string(&self.tag, buf);
25249                }
25250                self.__buffa_unknown_fields.write_to(buf);
25251            }
25252        }
25253        /// Serializes this view as protobuf JSON.
25254        ///
25255        /// Implicit-presence fields with default values are omitted, `required`
25256        /// fields are always emitted, explicit-presence (`optional`) fields are
25257        /// emitted only when set, bytes fields are base64-encoded, and enum
25258        /// values are their proto name strings.
25259        ///
25260        /// This impl uses `serialize_map(None)` because the number of emitted
25261        /// fields depends on default-omission rules; serializers that require
25262        /// known map lengths (e.g. `bincode`) will return a runtime error.
25263        /// Use the owned message type for those formats.
25264        impl<'__a> ::serde::Serialize for GetTagDownstreamRequestView<'__a> {
25265            fn serialize<__S: ::serde::Serializer>(
25266                &self,
25267                __s: __S,
25268            ) -> ::core::result::Result<__S::Ok, __S::Error> {
25269                use ::serde::ser::SerializeMap as _;
25270                let mut __map = __s.serialize_map(::core::option::Option::None)?;
25271                if !::buffa::json_helpers::skip_if::is_empty_str(self.tag) {
25272                    __map.serialize_entry("tag", self.tag)?;
25273                }
25274                __map.end()
25275            }
25276        }
25277        impl<'a> ::buffa::MessageName for GetTagDownstreamRequestView<'a> {
25278            const PACKAGE: &'static str = "headwaters.read.v1";
25279            const NAME: &'static str = "GetTagDownstreamRequest";
25280            const FULL_NAME: &'static str = "headwaters.read.v1.GetTagDownstreamRequest";
25281            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetTagDownstreamRequest";
25282        }
25283        impl<'v> ::buffa::DefaultViewInstance for GetTagDownstreamRequestView<'v> {
25284            fn default_view_instance<'a>() -> &'a Self
25285            where
25286                Self: 'a,
25287            {
25288                static VALUE: ::buffa::__private::OnceBox<
25289                    GetTagDownstreamRequestView<'static>,
25290                > = ::buffa::__private::OnceBox::new();
25291                VALUE
25292                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
25293                        <GetTagDownstreamRequestView<'static>>::default(),
25294                    ))
25295            }
25296        }
25297        impl ::buffa::ViewReborrow for GetTagDownstreamRequestView<'static> {
25298            type Reborrowed<'b> = GetTagDownstreamRequestView<'b>;
25299            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
25300                this
25301            }
25302        }
25303        /** Self-contained, `'static` owned view of a `GetTagDownstreamRequest` message.
25304
25305 Wraps [`::buffa::OwnedView`]`<`[`GetTagDownstreamRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
25306
25307 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetTagDownstreamRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
25308        #[derive(Clone, Debug)]
25309        pub struct GetTagDownstreamRequestOwnedView(
25310            ::buffa::OwnedView<GetTagDownstreamRequestView<'static>>,
25311        );
25312        impl GetTagDownstreamRequestOwnedView {
25313            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
25314            ///
25315            /// The view borrows directly from the buffer's data; the buffer is
25316            /// retained inside the returned handle.
25317            ///
25318            /// # Errors
25319            ///
25320            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
25321            /// protobuf data.
25322            pub fn decode(
25323                bytes: ::buffa::bytes::Bytes,
25324            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25325                ::core::result::Result::Ok(
25326                    GetTagDownstreamRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
25327                )
25328            }
25329            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
25330            /// max message size).
25331            ///
25332            /// # Errors
25333            ///
25334            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
25335            /// exceeds the configured limits.
25336            pub fn decode_with_options(
25337                bytes: ::buffa::bytes::Bytes,
25338                opts: &::buffa::DecodeOptions,
25339            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25340                ::core::result::Result::Ok(
25341                    GetTagDownstreamRequestOwnedView(
25342                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
25343                    ),
25344                )
25345            }
25346            /// Build from an owned message via an encode → decode round-trip.
25347            ///
25348            /// # Errors
25349            ///
25350            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
25351            /// somehow invalid (should not happen for well-formed messages).
25352            pub fn from_owned(
25353                msg: &super::super::GetTagDownstreamRequest,
25354            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25355                ::core::result::Result::Ok(
25356                    GetTagDownstreamRequestOwnedView(
25357                        ::buffa::OwnedView::from_owned(msg)?,
25358                    ),
25359                )
25360            }
25361            /// Borrow the full [`GetTagDownstreamRequestView`] with its lifetime tied to `&self`.
25362            #[must_use]
25363            pub fn view(&self) -> &GetTagDownstreamRequestView<'_> {
25364                self.0.reborrow()
25365            }
25366            /// Convert to the owned message type.
25367            #[must_use]
25368            pub fn to_owned_message(&self) -> super::super::GetTagDownstreamRequest {
25369                self.0.to_owned_message()
25370            }
25371            /// The underlying bytes buffer.
25372            #[must_use]
25373            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
25374                self.0.bytes()
25375            }
25376            /// Consume the handle, returning the underlying bytes buffer.
25377            #[must_use]
25378            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
25379                self.0.into_bytes()
25380            }
25381            /// Field 1: `tag`
25382            #[must_use]
25383            pub fn tag(&self) -> &'_ str {
25384                self.0.reborrow().tag
25385            }
25386        }
25387        impl ::core::convert::From<
25388            ::buffa::OwnedView<GetTagDownstreamRequestView<'static>>,
25389        > for GetTagDownstreamRequestOwnedView {
25390            fn from(
25391                inner: ::buffa::OwnedView<GetTagDownstreamRequestView<'static>>,
25392            ) -> Self {
25393                GetTagDownstreamRequestOwnedView(inner)
25394            }
25395        }
25396        impl ::core::convert::From<GetTagDownstreamRequestOwnedView>
25397        for ::buffa::OwnedView<GetTagDownstreamRequestView<'static>> {
25398            fn from(wrapper: GetTagDownstreamRequestOwnedView) -> Self {
25399                wrapper.0
25400            }
25401        }
25402        impl ::core::convert::AsRef<
25403            ::buffa::OwnedView<GetTagDownstreamRequestView<'static>>,
25404        > for GetTagDownstreamRequestOwnedView {
25405            fn as_ref(
25406                &self,
25407            ) -> &::buffa::OwnedView<GetTagDownstreamRequestView<'static>> {
25408                &self.0
25409            }
25410        }
25411        impl ::buffa::HasMessageView for super::super::GetTagDownstreamRequest {
25412            type View<'a> = GetTagDownstreamRequestView<'a>;
25413            type ViewHandle = GetTagDownstreamRequestOwnedView;
25414        }
25415        impl ::serde::Serialize for GetTagDownstreamRequestOwnedView {
25416            fn serialize<__S: ::serde::Serializer>(
25417                &self,
25418                __s: __S,
25419            ) -> ::core::result::Result<__S::Ok, __S::Error> {
25420                ::serde::Serialize::serialize(&self.0, __s)
25421            }
25422        }
25423        #[derive(Clone, Debug, Default)]
25424        pub struct GetLineageEventStatsRequestView<'a> {
25425            /// Bucket size: `HOUR`, `DAY` (default), `WEEK`, or `MONTH`.
25426            ///
25427            /// Field 1: `period`
25428            pub period: &'a str,
25429            /// Maximum number of buckets to return.
25430            ///
25431            /// Field 2: `limit`
25432            pub limit: i32,
25433            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
25434        }
25435        impl<'a> GetLineageEventStatsRequestView<'a> {
25436            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
25437            ///
25438            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
25439            /// and by generated sub-message decode arms with `depth - 1`.
25440            ///
25441            /// **Not part of the public API.** Named with a leading underscore to
25442            /// signal that it is for generated-code use only.
25443            #[doc(hidden)]
25444            pub fn _decode_depth(
25445                buf: &'a [u8],
25446                depth: u32,
25447            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25448                let mut view = Self::default();
25449                view._merge_into_view(buf, depth)?;
25450                ::core::result::Result::Ok(view)
25451            }
25452            /// Merge fields from `buf` into this view (proto merge semantics).
25453            ///
25454            /// Repeated fields append; singular fields last-wins; singular
25455            /// MESSAGE fields merge recursively. Used by sub-message decode
25456            /// arms when the same field appears multiple times on the wire.
25457            ///
25458            /// **Not part of the public API.**
25459            #[doc(hidden)]
25460            pub fn _merge_into_view(
25461                &mut self,
25462                buf: &'a [u8],
25463                depth: u32,
25464            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
25465                let _ = depth;
25466                #[allow(unused_variables)]
25467                let view = self;
25468                let mut cur: &'a [u8] = buf;
25469                while !cur.is_empty() {
25470                    let before_tag = cur;
25471                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
25472                    match tag.field_number() {
25473                        1u32 => {
25474                            if tag.wire_type()
25475                                != ::buffa::encoding::WireType::LengthDelimited
25476                            {
25477                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
25478                                    field_number: 1u32,
25479                                    expected: 2u8,
25480                                    actual: tag.wire_type() as u8,
25481                                });
25482                            }
25483                            view.period = ::buffa::types::borrow_str(&mut cur)?;
25484                        }
25485                        2u32 => {
25486                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
25487                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
25488                                    field_number: 2u32,
25489                                    expected: 0u8,
25490                                    actual: tag.wire_type() as u8,
25491                                });
25492                            }
25493                            view.limit = ::buffa::types::decode_int32(&mut cur)?;
25494                        }
25495                        _ => {
25496                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
25497                            let span_len = before_tag.len() - cur.len();
25498                            view.__buffa_unknown_fields
25499                                .push_raw(&before_tag[..span_len]);
25500                        }
25501                    }
25502                }
25503                ::core::result::Result::Ok(())
25504            }
25505        }
25506        impl<'a> ::buffa::MessageView<'a> for GetLineageEventStatsRequestView<'a> {
25507            type Owned = super::super::GetLineageEventStatsRequest;
25508            fn decode_view(
25509                buf: &'a [u8],
25510            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25511                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
25512            }
25513            fn decode_view_with_limit(
25514                buf: &'a [u8],
25515                depth: u32,
25516            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25517                Self::_decode_depth(buf, depth)
25518            }
25519            fn to_owned_message(&self) -> super::super::GetLineageEventStatsRequest {
25520                self.to_owned_from_source(None)
25521            }
25522            #[allow(clippy::useless_conversion, clippy::needless_update)]
25523            fn to_owned_from_source(
25524                &self,
25525                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
25526            ) -> super::super::GetLineageEventStatsRequest {
25527                #[allow(unused_imports)]
25528                use ::buffa::alloc::string::ToString as _;
25529                let _ = __buffa_src;
25530                super::super::GetLineageEventStatsRequest {
25531                    period: self.period.to_string(),
25532                    limit: self.limit,
25533                    __buffa_unknown_fields: self
25534                        .__buffa_unknown_fields
25535                        .to_owned()
25536                        .unwrap_or_default()
25537                        .into(),
25538                    ..::core::default::Default::default()
25539                }
25540            }
25541        }
25542        impl<'a> ::buffa::ViewEncode<'a> for GetLineageEventStatsRequestView<'a> {
25543            #[allow(clippy::needless_borrow, clippy::let_and_return)]
25544            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
25545                #[allow(unused_imports)]
25546                use ::buffa::Enumeration as _;
25547                let mut size = 0u32;
25548                if !self.period.is_empty() {
25549                    size
25550                        += 1u32
25551                            + ::buffa::types::string_encoded_len(&self.period) as u32;
25552                }
25553                if self.limit != 0i32 {
25554                    size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
25555                }
25556                size += self.__buffa_unknown_fields.encoded_len() as u32;
25557                size
25558            }
25559            #[allow(clippy::needless_borrow)]
25560            fn write_to(
25561                &self,
25562                _cache: &mut ::buffa::SizeCache,
25563                buf: &mut impl ::buffa::bytes::BufMut,
25564            ) {
25565                #[allow(unused_imports)]
25566                use ::buffa::Enumeration as _;
25567                if !self.period.is_empty() {
25568                    ::buffa::encoding::Tag::new(
25569                            1u32,
25570                            ::buffa::encoding::WireType::LengthDelimited,
25571                        )
25572                        .encode(buf);
25573                    ::buffa::types::encode_string(&self.period, buf);
25574                }
25575                if self.limit != 0i32 {
25576                    ::buffa::encoding::Tag::new(
25577                            2u32,
25578                            ::buffa::encoding::WireType::Varint,
25579                        )
25580                        .encode(buf);
25581                    ::buffa::types::encode_int32(self.limit, buf);
25582                }
25583                self.__buffa_unknown_fields.write_to(buf);
25584            }
25585        }
25586        /// Serializes this view as protobuf JSON.
25587        ///
25588        /// Implicit-presence fields with default values are omitted, `required`
25589        /// fields are always emitted, explicit-presence (`optional`) fields are
25590        /// emitted only when set, bytes fields are base64-encoded, and enum
25591        /// values are their proto name strings.
25592        ///
25593        /// This impl uses `serialize_map(None)` because the number of emitted
25594        /// fields depends on default-omission rules; serializers that require
25595        /// known map lengths (e.g. `bincode`) will return a runtime error.
25596        /// Use the owned message type for those formats.
25597        impl<'__a> ::serde::Serialize for GetLineageEventStatsRequestView<'__a> {
25598            fn serialize<__S: ::serde::Serializer>(
25599                &self,
25600                __s: __S,
25601            ) -> ::core::result::Result<__S::Ok, __S::Error> {
25602                use ::serde::ser::SerializeMap as _;
25603                let mut __map = __s.serialize_map(::core::option::Option::None)?;
25604                if !::buffa::json_helpers::skip_if::is_empty_str(self.period) {
25605                    __map.serialize_entry("period", self.period)?;
25606                }
25607                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.limit) {
25608                    struct _W(i32);
25609                    impl ::serde::Serialize for _W {
25610                        fn serialize<__S: ::serde::Serializer>(
25611                            &self,
25612                            __s: __S,
25613                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
25614                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
25615                        }
25616                    }
25617                    __map.serialize_entry("limit", &_W(self.limit))?;
25618                }
25619                __map.end()
25620            }
25621        }
25622        impl<'a> ::buffa::MessageName for GetLineageEventStatsRequestView<'a> {
25623            const PACKAGE: &'static str = "headwaters.read.v1";
25624            const NAME: &'static str = "GetLineageEventStatsRequest";
25625            const FULL_NAME: &'static str = "headwaters.read.v1.GetLineageEventStatsRequest";
25626            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetLineageEventStatsRequest";
25627        }
25628        impl<'v> ::buffa::DefaultViewInstance for GetLineageEventStatsRequestView<'v> {
25629            fn default_view_instance<'a>() -> &'a Self
25630            where
25631                Self: 'a,
25632            {
25633                static VALUE: ::buffa::__private::OnceBox<
25634                    GetLineageEventStatsRequestView<'static>,
25635                > = ::buffa::__private::OnceBox::new();
25636                VALUE
25637                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
25638                        <GetLineageEventStatsRequestView<'static>>::default(),
25639                    ))
25640            }
25641        }
25642        impl ::buffa::ViewReborrow for GetLineageEventStatsRequestView<'static> {
25643            type Reborrowed<'b> = GetLineageEventStatsRequestView<'b>;
25644            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
25645                this
25646            }
25647        }
25648        /** Self-contained, `'static` owned view of a `GetLineageEventStatsRequest` message.
25649
25650 Wraps [`::buffa::OwnedView`]`<`[`GetLineageEventStatsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
25651
25652 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetLineageEventStatsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
25653        #[derive(Clone, Debug)]
25654        pub struct GetLineageEventStatsRequestOwnedView(
25655            ::buffa::OwnedView<GetLineageEventStatsRequestView<'static>>,
25656        );
25657        impl GetLineageEventStatsRequestOwnedView {
25658            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
25659            ///
25660            /// The view borrows directly from the buffer's data; the buffer is
25661            /// retained inside the returned handle.
25662            ///
25663            /// # Errors
25664            ///
25665            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
25666            /// protobuf data.
25667            pub fn decode(
25668                bytes: ::buffa::bytes::Bytes,
25669            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25670                ::core::result::Result::Ok(
25671                    GetLineageEventStatsRequestOwnedView(
25672                        ::buffa::OwnedView::decode(bytes)?,
25673                    ),
25674                )
25675            }
25676            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
25677            /// max message size).
25678            ///
25679            /// # Errors
25680            ///
25681            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
25682            /// exceeds the configured limits.
25683            pub fn decode_with_options(
25684                bytes: ::buffa::bytes::Bytes,
25685                opts: &::buffa::DecodeOptions,
25686            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25687                ::core::result::Result::Ok(
25688                    GetLineageEventStatsRequestOwnedView(
25689                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
25690                    ),
25691                )
25692            }
25693            /// Build from an owned message via an encode → decode round-trip.
25694            ///
25695            /// # Errors
25696            ///
25697            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
25698            /// somehow invalid (should not happen for well-formed messages).
25699            pub fn from_owned(
25700                msg: &super::super::GetLineageEventStatsRequest,
25701            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25702                ::core::result::Result::Ok(
25703                    GetLineageEventStatsRequestOwnedView(
25704                        ::buffa::OwnedView::from_owned(msg)?,
25705                    ),
25706                )
25707            }
25708            /// Borrow the full [`GetLineageEventStatsRequestView`] with its lifetime tied to `&self`.
25709            #[must_use]
25710            pub fn view(&self) -> &GetLineageEventStatsRequestView<'_> {
25711                self.0.reborrow()
25712            }
25713            /// Convert to the owned message type.
25714            #[must_use]
25715            pub fn to_owned_message(&self) -> super::super::GetLineageEventStatsRequest {
25716                self.0.to_owned_message()
25717            }
25718            /// The underlying bytes buffer.
25719            #[must_use]
25720            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
25721                self.0.bytes()
25722            }
25723            /// Consume the handle, returning the underlying bytes buffer.
25724            #[must_use]
25725            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
25726                self.0.into_bytes()
25727            }
25728            /// Bucket size: `HOUR`, `DAY` (default), `WEEK`, or `MONTH`.
25729            ///
25730            /// Field 1: `period`
25731            #[must_use]
25732            pub fn period(&self) -> &'_ str {
25733                self.0.reborrow().period
25734            }
25735            /// Maximum number of buckets to return.
25736            ///
25737            /// Field 2: `limit`
25738            #[must_use]
25739            pub fn limit(&self) -> i32 {
25740                self.0.reborrow().limit
25741            }
25742        }
25743        impl ::core::convert::From<
25744            ::buffa::OwnedView<GetLineageEventStatsRequestView<'static>>,
25745        > for GetLineageEventStatsRequestOwnedView {
25746            fn from(
25747                inner: ::buffa::OwnedView<GetLineageEventStatsRequestView<'static>>,
25748            ) -> Self {
25749                GetLineageEventStatsRequestOwnedView(inner)
25750            }
25751        }
25752        impl ::core::convert::From<GetLineageEventStatsRequestOwnedView>
25753        for ::buffa::OwnedView<GetLineageEventStatsRequestView<'static>> {
25754            fn from(wrapper: GetLineageEventStatsRequestOwnedView) -> Self {
25755                wrapper.0
25756            }
25757        }
25758        impl ::core::convert::AsRef<
25759            ::buffa::OwnedView<GetLineageEventStatsRequestView<'static>>,
25760        > for GetLineageEventStatsRequestOwnedView {
25761            fn as_ref(
25762                &self,
25763            ) -> &::buffa::OwnedView<GetLineageEventStatsRequestView<'static>> {
25764                &self.0
25765            }
25766        }
25767        impl ::buffa::HasMessageView for super::super::GetLineageEventStatsRequest {
25768            type View<'a> = GetLineageEventStatsRequestView<'a>;
25769            type ViewHandle = GetLineageEventStatsRequestOwnedView;
25770        }
25771        impl ::serde::Serialize for GetLineageEventStatsRequestOwnedView {
25772            fn serialize<__S: ::serde::Serializer>(
25773                &self,
25774                __s: __S,
25775            ) -> ::core::result::Result<__S::Ok, __S::Error> {
25776                ::serde::Serialize::serialize(&self.0, __s)
25777            }
25778        }
25779        #[derive(Clone, Debug, Default)]
25780        pub struct GetAssetStatsRequestView<'a> {
25781            /// Which asset to count: `jobs` or `datasets`.
25782            ///
25783            /// Field 1: `asset`
25784            pub asset: &'a str,
25785            /// Bucket size: `HOUR`, `DAY` (default), `WEEK`, or `MONTH`.
25786            ///
25787            /// Field 2: `period`
25788            pub period: &'a str,
25789            /// Field 3: `limit`
25790            pub limit: i32,
25791            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
25792        }
25793        impl<'a> GetAssetStatsRequestView<'a> {
25794            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
25795            ///
25796            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
25797            /// and by generated sub-message decode arms with `depth - 1`.
25798            ///
25799            /// **Not part of the public API.** Named with a leading underscore to
25800            /// signal that it is for generated-code use only.
25801            #[doc(hidden)]
25802            pub fn _decode_depth(
25803                buf: &'a [u8],
25804                depth: u32,
25805            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25806                let mut view = Self::default();
25807                view._merge_into_view(buf, depth)?;
25808                ::core::result::Result::Ok(view)
25809            }
25810            /// Merge fields from `buf` into this view (proto merge semantics).
25811            ///
25812            /// Repeated fields append; singular fields last-wins; singular
25813            /// MESSAGE fields merge recursively. Used by sub-message decode
25814            /// arms when the same field appears multiple times on the wire.
25815            ///
25816            /// **Not part of the public API.**
25817            #[doc(hidden)]
25818            pub fn _merge_into_view(
25819                &mut self,
25820                buf: &'a [u8],
25821                depth: u32,
25822            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
25823                let _ = depth;
25824                #[allow(unused_variables)]
25825                let view = self;
25826                let mut cur: &'a [u8] = buf;
25827                while !cur.is_empty() {
25828                    let before_tag = cur;
25829                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
25830                    match tag.field_number() {
25831                        1u32 => {
25832                            if tag.wire_type()
25833                                != ::buffa::encoding::WireType::LengthDelimited
25834                            {
25835                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
25836                                    field_number: 1u32,
25837                                    expected: 2u8,
25838                                    actual: tag.wire_type() as u8,
25839                                });
25840                            }
25841                            view.asset = ::buffa::types::borrow_str(&mut cur)?;
25842                        }
25843                        2u32 => {
25844                            if tag.wire_type()
25845                                != ::buffa::encoding::WireType::LengthDelimited
25846                            {
25847                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
25848                                    field_number: 2u32,
25849                                    expected: 2u8,
25850                                    actual: tag.wire_type() as u8,
25851                                });
25852                            }
25853                            view.period = ::buffa::types::borrow_str(&mut cur)?;
25854                        }
25855                        3u32 => {
25856                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
25857                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
25858                                    field_number: 3u32,
25859                                    expected: 0u8,
25860                                    actual: tag.wire_type() as u8,
25861                                });
25862                            }
25863                            view.limit = ::buffa::types::decode_int32(&mut cur)?;
25864                        }
25865                        _ => {
25866                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
25867                            let span_len = before_tag.len() - cur.len();
25868                            view.__buffa_unknown_fields
25869                                .push_raw(&before_tag[..span_len]);
25870                        }
25871                    }
25872                }
25873                ::core::result::Result::Ok(())
25874            }
25875        }
25876        impl<'a> ::buffa::MessageView<'a> for GetAssetStatsRequestView<'a> {
25877            type Owned = super::super::GetAssetStatsRequest;
25878            fn decode_view(
25879                buf: &'a [u8],
25880            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25881                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
25882            }
25883            fn decode_view_with_limit(
25884                buf: &'a [u8],
25885                depth: u32,
25886            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25887                Self::_decode_depth(buf, depth)
25888            }
25889            fn to_owned_message(&self) -> super::super::GetAssetStatsRequest {
25890                self.to_owned_from_source(None)
25891            }
25892            #[allow(clippy::useless_conversion, clippy::needless_update)]
25893            fn to_owned_from_source(
25894                &self,
25895                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
25896            ) -> super::super::GetAssetStatsRequest {
25897                #[allow(unused_imports)]
25898                use ::buffa::alloc::string::ToString as _;
25899                let _ = __buffa_src;
25900                super::super::GetAssetStatsRequest {
25901                    asset: self.asset.to_string(),
25902                    period: self.period.to_string(),
25903                    limit: self.limit,
25904                    __buffa_unknown_fields: self
25905                        .__buffa_unknown_fields
25906                        .to_owned()
25907                        .unwrap_or_default()
25908                        .into(),
25909                    ..::core::default::Default::default()
25910                }
25911            }
25912        }
25913        impl<'a> ::buffa::ViewEncode<'a> for GetAssetStatsRequestView<'a> {
25914            #[allow(clippy::needless_borrow, clippy::let_and_return)]
25915            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
25916                #[allow(unused_imports)]
25917                use ::buffa::Enumeration as _;
25918                let mut size = 0u32;
25919                if !self.asset.is_empty() {
25920                    size
25921                        += 1u32 + ::buffa::types::string_encoded_len(&self.asset) as u32;
25922                }
25923                if !self.period.is_empty() {
25924                    size
25925                        += 1u32
25926                            + ::buffa::types::string_encoded_len(&self.period) as u32;
25927                }
25928                if self.limit != 0i32 {
25929                    size += 1u32 + ::buffa::types::int32_encoded_len(self.limit) as u32;
25930                }
25931                size += self.__buffa_unknown_fields.encoded_len() as u32;
25932                size
25933            }
25934            #[allow(clippy::needless_borrow)]
25935            fn write_to(
25936                &self,
25937                _cache: &mut ::buffa::SizeCache,
25938                buf: &mut impl ::buffa::bytes::BufMut,
25939            ) {
25940                #[allow(unused_imports)]
25941                use ::buffa::Enumeration as _;
25942                if !self.asset.is_empty() {
25943                    ::buffa::encoding::Tag::new(
25944                            1u32,
25945                            ::buffa::encoding::WireType::LengthDelimited,
25946                        )
25947                        .encode(buf);
25948                    ::buffa::types::encode_string(&self.asset, buf);
25949                }
25950                if !self.period.is_empty() {
25951                    ::buffa::encoding::Tag::new(
25952                            2u32,
25953                            ::buffa::encoding::WireType::LengthDelimited,
25954                        )
25955                        .encode(buf);
25956                    ::buffa::types::encode_string(&self.period, buf);
25957                }
25958                if self.limit != 0i32 {
25959                    ::buffa::encoding::Tag::new(
25960                            3u32,
25961                            ::buffa::encoding::WireType::Varint,
25962                        )
25963                        .encode(buf);
25964                    ::buffa::types::encode_int32(self.limit, buf);
25965                }
25966                self.__buffa_unknown_fields.write_to(buf);
25967            }
25968        }
25969        /// Serializes this view as protobuf JSON.
25970        ///
25971        /// Implicit-presence fields with default values are omitted, `required`
25972        /// fields are always emitted, explicit-presence (`optional`) fields are
25973        /// emitted only when set, bytes fields are base64-encoded, and enum
25974        /// values are their proto name strings.
25975        ///
25976        /// This impl uses `serialize_map(None)` because the number of emitted
25977        /// fields depends on default-omission rules; serializers that require
25978        /// known map lengths (e.g. `bincode`) will return a runtime error.
25979        /// Use the owned message type for those formats.
25980        impl<'__a> ::serde::Serialize for GetAssetStatsRequestView<'__a> {
25981            fn serialize<__S: ::serde::Serializer>(
25982                &self,
25983                __s: __S,
25984            ) -> ::core::result::Result<__S::Ok, __S::Error> {
25985                use ::serde::ser::SerializeMap as _;
25986                let mut __map = __s.serialize_map(::core::option::Option::None)?;
25987                if !::buffa::json_helpers::skip_if::is_empty_str(self.asset) {
25988                    __map.serialize_entry("asset", self.asset)?;
25989                }
25990                if !::buffa::json_helpers::skip_if::is_empty_str(self.period) {
25991                    __map.serialize_entry("period", self.period)?;
25992                }
25993                if !::buffa::json_helpers::skip_if::is_zero_i32(&self.limit) {
25994                    struct _W(i32);
25995                    impl ::serde::Serialize for _W {
25996                        fn serialize<__S: ::serde::Serializer>(
25997                            &self,
25998                            __s: __S,
25999                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
26000                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
26001                        }
26002                    }
26003                    __map.serialize_entry("limit", &_W(self.limit))?;
26004                }
26005                __map.end()
26006            }
26007        }
26008        impl<'a> ::buffa::MessageName for GetAssetStatsRequestView<'a> {
26009            const PACKAGE: &'static str = "headwaters.read.v1";
26010            const NAME: &'static str = "GetAssetStatsRequest";
26011            const FULL_NAME: &'static str = "headwaters.read.v1.GetAssetStatsRequest";
26012            const TYPE_URL: &'static str = "type.googleapis.com/headwaters.read.v1.GetAssetStatsRequest";
26013        }
26014        impl<'v> ::buffa::DefaultViewInstance for GetAssetStatsRequestView<'v> {
26015            fn default_view_instance<'a>() -> &'a Self
26016            where
26017                Self: 'a,
26018            {
26019                static VALUE: ::buffa::__private::OnceBox<
26020                    GetAssetStatsRequestView<'static>,
26021                > = ::buffa::__private::OnceBox::new();
26022                VALUE
26023                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
26024                        <GetAssetStatsRequestView<'static>>::default(),
26025                    ))
26026            }
26027        }
26028        impl ::buffa::ViewReborrow for GetAssetStatsRequestView<'static> {
26029            type Reborrowed<'b> = GetAssetStatsRequestView<'b>;
26030            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
26031                this
26032            }
26033        }
26034        /** Self-contained, `'static` owned view of a `GetAssetStatsRequest` message.
26035
26036 Wraps [`::buffa::OwnedView`]`<`[`GetAssetStatsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
26037
26038 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetAssetStatsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
26039        #[derive(Clone, Debug)]
26040        pub struct GetAssetStatsRequestOwnedView(
26041            ::buffa::OwnedView<GetAssetStatsRequestView<'static>>,
26042        );
26043        impl GetAssetStatsRequestOwnedView {
26044            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
26045            ///
26046            /// The view borrows directly from the buffer's data; the buffer is
26047            /// retained inside the returned handle.
26048            ///
26049            /// # Errors
26050            ///
26051            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
26052            /// protobuf data.
26053            pub fn decode(
26054                bytes: ::buffa::bytes::Bytes,
26055            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
26056                ::core::result::Result::Ok(
26057                    GetAssetStatsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
26058                )
26059            }
26060            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
26061            /// max message size).
26062            ///
26063            /// # Errors
26064            ///
26065            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
26066            /// exceeds the configured limits.
26067            pub fn decode_with_options(
26068                bytes: ::buffa::bytes::Bytes,
26069                opts: &::buffa::DecodeOptions,
26070            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
26071                ::core::result::Result::Ok(
26072                    GetAssetStatsRequestOwnedView(
26073                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
26074                    ),
26075                )
26076            }
26077            /// Build from an owned message via an encode → decode round-trip.
26078            ///
26079            /// # Errors
26080            ///
26081            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
26082            /// somehow invalid (should not happen for well-formed messages).
26083            pub fn from_owned(
26084                msg: &super::super::GetAssetStatsRequest,
26085            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
26086                ::core::result::Result::Ok(
26087                    GetAssetStatsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
26088                )
26089            }
26090            /// Borrow the full [`GetAssetStatsRequestView`] with its lifetime tied to `&self`.
26091            #[must_use]
26092            pub fn view(&self) -> &GetAssetStatsRequestView<'_> {
26093                self.0.reborrow()
26094            }
26095            /// Convert to the owned message type.
26096            #[must_use]
26097            pub fn to_owned_message(&self) -> super::super::GetAssetStatsRequest {
26098                self.0.to_owned_message()
26099            }
26100            /// The underlying bytes buffer.
26101            #[must_use]
26102            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
26103                self.0.bytes()
26104            }
26105            /// Consume the handle, returning the underlying bytes buffer.
26106            #[must_use]
26107            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
26108                self.0.into_bytes()
26109            }
26110            /// Which asset to count: `jobs` or `datasets`.
26111            ///
26112            /// Field 1: `asset`
26113            #[must_use]
26114            pub fn asset(&self) -> &'_ str {
26115                self.0.reborrow().asset
26116            }
26117            /// Bucket size: `HOUR`, `DAY` (default), `WEEK`, or `MONTH`.
26118            ///
26119            /// Field 2: `period`
26120            #[must_use]
26121            pub fn period(&self) -> &'_ str {
26122                self.0.reborrow().period
26123            }
26124            /// Field 3: `limit`
26125            #[must_use]
26126            pub fn limit(&self) -> i32 {
26127                self.0.reborrow().limit
26128            }
26129        }
26130        impl ::core::convert::From<::buffa::OwnedView<GetAssetStatsRequestView<'static>>>
26131        for GetAssetStatsRequestOwnedView {
26132            fn from(
26133                inner: ::buffa::OwnedView<GetAssetStatsRequestView<'static>>,
26134            ) -> Self {
26135                GetAssetStatsRequestOwnedView(inner)
26136            }
26137        }
26138        impl ::core::convert::From<GetAssetStatsRequestOwnedView>
26139        for ::buffa::OwnedView<GetAssetStatsRequestView<'static>> {
26140            fn from(wrapper: GetAssetStatsRequestOwnedView) -> Self {
26141                wrapper.0
26142            }
26143        }
26144        impl ::core::convert::AsRef<
26145            ::buffa::OwnedView<GetAssetStatsRequestView<'static>>,
26146        > for GetAssetStatsRequestOwnedView {
26147            fn as_ref(&self) -> &::buffa::OwnedView<GetAssetStatsRequestView<'static>> {
26148                &self.0
26149            }
26150        }
26151        impl ::buffa::HasMessageView for super::super::GetAssetStatsRequest {
26152            type View<'a> = GetAssetStatsRequestView<'a>;
26153            type ViewHandle = GetAssetStatsRequestOwnedView;
26154        }
26155        impl ::serde::Serialize for GetAssetStatsRequestOwnedView {
26156            fn serialize<__S: ::serde::Serializer>(
26157                &self,
26158                __s: __S,
26159            ) -> ::core::result::Result<__S::Ok, __S::Error> {
26160                ::serde::Serialize::serialize(&self.0, __s)
26161            }
26162        }
26163    }
26164    /// Register this package's `Any` type entries and extension entries.
26165    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
26166        reg.register_json_any(super::__ENTITY_ID_JSON_ANY);
26167        reg.register_json_any(super::__NAMESPACE_JSON_ANY);
26168        reg.register_json_any(super::__LIST_NAMESPACES_RESPONSE_JSON_ANY);
26169        reg.register_json_any(super::__JOB_DETAIL_JSON_ANY);
26170        reg.register_json_any(super::__RUN_DETAIL_JSON_ANY);
26171        reg.register_json_any(super::__LIST_JOBS_RESPONSE_JSON_ANY);
26172        reg.register_json_any(super::__LIST_RUNS_RESPONSE_JSON_ANY);
26173        reg.register_json_any(super::__DATASET_JSON_ANY);
26174        reg.register_json_any(super::__LIST_DATASETS_RESPONSE_JSON_ANY);
26175        reg.register_json_any(super::__DATASET_VERSION_JSON_ANY);
26176        reg.register_json_any(super::__DATASET_VERSION_ID_JSON_ANY);
26177        reg.register_json_any(super::__LIST_DATASET_VERSIONS_RESPONSE_JSON_ANY);
26178        reg.register_json_any(super::__SEARCH_RESULT_JSON_ANY);
26179        reg.register_json_any(super::__SEARCH_RESPONSE_JSON_ANY);
26180        reg.register_json_any(super::__LIST_EVENTS_RESPONSE_JSON_ANY);
26181        reg.register_json_any(super::__RUN_FACETS_RESPONSE_JSON_ANY);
26182        reg.register_json_any(super::__LINEAGE_EDGE_JSON_ANY);
26183        reg.register_json_any(super::__LINEAGE_NODE_JSON_ANY);
26184        reg.register_json_any(super::__LINEAGE_GRAPH_JSON_ANY);
26185        reg.register_json_any(super::__TAG_JSON_ANY);
26186        reg.register_json_any(super::__LIST_TAGS_RESPONSE_JSON_ANY);
26187        reg.register_json_any(super::__TAGGED_FIELD_JSON_ANY);
26188        reg.register_json_any(super::__TAG_PROPAGATION_JSON_ANY);
26189        reg.register_json_any(super::__STAT_BUCKET_JSON_ANY);
26190        reg.register_json_any(super::__STATS_RESPONSE_JSON_ANY);
26191        reg.register_json_any(super::__LIST_NAMESPACES_REQUEST_JSON_ANY);
26192        reg.register_json_any(super::__LIST_JOBS_REQUEST_JSON_ANY);
26193        reg.register_json_any(super::__GET_JOB_REQUEST_JSON_ANY);
26194        reg.register_json_any(super::__GET_JOB_RUNS_REQUEST_JSON_ANY);
26195        reg.register_json_any(super::__LIST_DATASETS_REQUEST_JSON_ANY);
26196        reg.register_json_any(super::__GET_DATASET_REQUEST_JSON_ANY);
26197        reg.register_json_any(super::__LIST_DATASET_VERSIONS_REQUEST_JSON_ANY);
26198        reg.register_json_any(super::__SEARCH_REQUEST_JSON_ANY);
26199        reg.register_json_any(super::__GET_LINEAGE_REQUEST_JSON_ANY);
26200        reg.register_json_any(super::__GET_COLUMN_LINEAGE_REQUEST_JSON_ANY);
26201        reg.register_json_any(super::__LIST_EVENTS_REQUEST_JSON_ANY);
26202        reg.register_json_any(super::__GET_RUN_FACETS_REQUEST_JSON_ANY);
26203        reg.register_json_any(super::__LIST_TAGS_REQUEST_JSON_ANY);
26204        reg.register_json_any(super::__GET_TAG_DOWNSTREAM_REQUEST_JSON_ANY);
26205        reg.register_json_any(super::__GET_LINEAGE_EVENT_STATS_REQUEST_JSON_ANY);
26206        reg.register_json_any(super::__GET_ASSET_STATS_REQUEST_JSON_ANY);
26207    }
26208}
26209#[doc(inline)]
26210pub use self::__buffa::view::EntityIdView;
26211#[doc(inline)]
26212pub use self::__buffa::view::EntityIdOwnedView;
26213#[doc(inline)]
26214pub use self::__buffa::view::NamespaceView;
26215#[doc(inline)]
26216pub use self::__buffa::view::NamespaceOwnedView;
26217#[doc(inline)]
26218pub use self::__buffa::view::ListNamespacesResponseView;
26219#[doc(inline)]
26220pub use self::__buffa::view::ListNamespacesResponseOwnedView;
26221#[doc(inline)]
26222pub use self::__buffa::view::JobDetailView;
26223#[doc(inline)]
26224pub use self::__buffa::view::JobDetailOwnedView;
26225#[doc(inline)]
26226pub use self::__buffa::view::RunDetailView;
26227#[doc(inline)]
26228pub use self::__buffa::view::RunDetailOwnedView;
26229#[doc(inline)]
26230pub use self::__buffa::view::ListJobsResponseView;
26231#[doc(inline)]
26232pub use self::__buffa::view::ListJobsResponseOwnedView;
26233#[doc(inline)]
26234pub use self::__buffa::view::ListRunsResponseView;
26235#[doc(inline)]
26236pub use self::__buffa::view::ListRunsResponseOwnedView;
26237#[doc(inline)]
26238pub use self::__buffa::view::DatasetView;
26239#[doc(inline)]
26240pub use self::__buffa::view::DatasetOwnedView;
26241#[doc(inline)]
26242pub use self::__buffa::view::ListDatasetsResponseView;
26243#[doc(inline)]
26244pub use self::__buffa::view::ListDatasetsResponseOwnedView;
26245#[doc(inline)]
26246pub use self::__buffa::view::DatasetVersionView;
26247#[doc(inline)]
26248pub use self::__buffa::view::DatasetVersionOwnedView;
26249#[doc(inline)]
26250pub use self::__buffa::view::DatasetVersionIdView;
26251#[doc(inline)]
26252pub use self::__buffa::view::DatasetVersionIdOwnedView;
26253#[doc(inline)]
26254pub use self::__buffa::view::ListDatasetVersionsResponseView;
26255#[doc(inline)]
26256pub use self::__buffa::view::ListDatasetVersionsResponseOwnedView;
26257#[doc(inline)]
26258pub use self::__buffa::view::SearchResultView;
26259#[doc(inline)]
26260pub use self::__buffa::view::SearchResultOwnedView;
26261#[doc(inline)]
26262pub use self::__buffa::view::SearchResponseView;
26263#[doc(inline)]
26264pub use self::__buffa::view::SearchResponseOwnedView;
26265#[doc(inline)]
26266pub use self::__buffa::view::ListEventsResponseView;
26267#[doc(inline)]
26268pub use self::__buffa::view::ListEventsResponseOwnedView;
26269#[doc(inline)]
26270pub use self::__buffa::view::RunFacetsResponseView;
26271#[doc(inline)]
26272pub use self::__buffa::view::RunFacetsResponseOwnedView;
26273#[doc(inline)]
26274pub use self::__buffa::view::LineageEdgeView;
26275#[doc(inline)]
26276pub use self::__buffa::view::LineageEdgeOwnedView;
26277#[doc(inline)]
26278pub use self::__buffa::view::LineageNodeView;
26279#[doc(inline)]
26280pub use self::__buffa::view::LineageNodeOwnedView;
26281#[doc(inline)]
26282pub use self::__buffa::view::LineageGraphView;
26283#[doc(inline)]
26284pub use self::__buffa::view::LineageGraphOwnedView;
26285#[doc(inline)]
26286pub use self::__buffa::view::TagView;
26287#[doc(inline)]
26288pub use self::__buffa::view::TagOwnedView;
26289#[doc(inline)]
26290pub use self::__buffa::view::ListTagsResponseView;
26291#[doc(inline)]
26292pub use self::__buffa::view::ListTagsResponseOwnedView;
26293#[doc(inline)]
26294pub use self::__buffa::view::TaggedFieldView;
26295#[doc(inline)]
26296pub use self::__buffa::view::TaggedFieldOwnedView;
26297#[doc(inline)]
26298pub use self::__buffa::view::TagPropagationView;
26299#[doc(inline)]
26300pub use self::__buffa::view::TagPropagationOwnedView;
26301#[doc(inline)]
26302pub use self::__buffa::view::StatBucketView;
26303#[doc(inline)]
26304pub use self::__buffa::view::StatBucketOwnedView;
26305#[doc(inline)]
26306pub use self::__buffa::view::StatsResponseView;
26307#[doc(inline)]
26308pub use self::__buffa::view::StatsResponseOwnedView;
26309#[doc(inline)]
26310pub use self::__buffa::view::ListNamespacesRequestView;
26311#[doc(inline)]
26312pub use self::__buffa::view::ListNamespacesRequestOwnedView;
26313#[doc(inline)]
26314pub use self::__buffa::view::ListJobsRequestView;
26315#[doc(inline)]
26316pub use self::__buffa::view::ListJobsRequestOwnedView;
26317#[doc(inline)]
26318pub use self::__buffa::view::GetJobRequestView;
26319#[doc(inline)]
26320pub use self::__buffa::view::GetJobRequestOwnedView;
26321#[doc(inline)]
26322pub use self::__buffa::view::GetJobRunsRequestView;
26323#[doc(inline)]
26324pub use self::__buffa::view::GetJobRunsRequestOwnedView;
26325#[doc(inline)]
26326pub use self::__buffa::view::ListDatasetsRequestView;
26327#[doc(inline)]
26328pub use self::__buffa::view::ListDatasetsRequestOwnedView;
26329#[doc(inline)]
26330pub use self::__buffa::view::GetDatasetRequestView;
26331#[doc(inline)]
26332pub use self::__buffa::view::GetDatasetRequestOwnedView;
26333#[doc(inline)]
26334pub use self::__buffa::view::ListDatasetVersionsRequestView;
26335#[doc(inline)]
26336pub use self::__buffa::view::ListDatasetVersionsRequestOwnedView;
26337#[doc(inline)]
26338pub use self::__buffa::view::SearchRequestView;
26339#[doc(inline)]
26340pub use self::__buffa::view::SearchRequestOwnedView;
26341#[doc(inline)]
26342pub use self::__buffa::view::GetLineageRequestView;
26343#[doc(inline)]
26344pub use self::__buffa::view::GetLineageRequestOwnedView;
26345#[doc(inline)]
26346pub use self::__buffa::view::GetColumnLineageRequestView;
26347#[doc(inline)]
26348pub use self::__buffa::view::GetColumnLineageRequestOwnedView;
26349#[doc(inline)]
26350pub use self::__buffa::view::ListEventsRequestView;
26351#[doc(inline)]
26352pub use self::__buffa::view::ListEventsRequestOwnedView;
26353#[doc(inline)]
26354pub use self::__buffa::view::GetRunFacetsRequestView;
26355#[doc(inline)]
26356pub use self::__buffa::view::GetRunFacetsRequestOwnedView;
26357#[doc(inline)]
26358pub use self::__buffa::view::ListTagsRequestView;
26359#[doc(inline)]
26360pub use self::__buffa::view::ListTagsRequestOwnedView;
26361#[doc(inline)]
26362pub use self::__buffa::view::GetTagDownstreamRequestView;
26363#[doc(inline)]
26364pub use self::__buffa::view::GetTagDownstreamRequestOwnedView;
26365#[doc(inline)]
26366pub use self::__buffa::view::GetLineageEventStatsRequestView;
26367#[doc(inline)]
26368pub use self::__buffa::view::GetLineageEventStatsRequestOwnedView;
26369#[doc(inline)]
26370pub use self::__buffa::view::GetAssetStatsRequestView;
26371#[doc(inline)]
26372pub use self::__buffa::view::GetAssetStatsRequestOwnedView;
26373#[doc(inline)]
26374pub use self::__buffa::register_types;