Skip to main content

exoware_sdk/gen/
common.kv.v1.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// A raw key-value pair shared by store APIs that move complete rows without
4/// additional per-entry metadata.
5///
6/// Keys must be between 0 and 254 bytes (inclusive) anywhere this message is
7/// used for ingestion.
8#[derive(Clone, PartialEq, Default)]
9#[derive(::serde::Serialize, ::serde::Deserialize)]
10#[serde(default)]
11pub struct Entry {
12    /// Field 1: `key`
13    #[serde(
14        rename = "key",
15        with = "::buffa::json_helpers::bytes",
16        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
17    )]
18    pub key: ::buffa::alloc::vec::Vec<u8>,
19    /// Field 2: `value`
20    #[serde(
21        rename = "value",
22        with = "::buffa::json_helpers::bytes",
23        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
24    )]
25    pub value: ::buffa::bytes::Bytes,
26    #[serde(skip)]
27    #[doc(hidden)]
28    pub __buffa_unknown_fields: ::buffa::UnknownFields,
29}
30impl ::core::fmt::Debug for Entry {
31    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
32        f.debug_struct("Entry")
33            .field("key", &self.key)
34            .field("value", &self.value)
35            .finish()
36    }
37}
38impl Entry {
39    /// Protobuf type URL for this message, for use with `Any::pack` and
40    /// `Any::unpack_if`.
41    ///
42    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
43    pub const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Entry";
44}
45::buffa::impl_default_instance!(Entry);
46impl ::buffa::MessageName for Entry {
47    const PACKAGE: &'static str = "common.kv.v1";
48    const NAME: &'static str = "Entry";
49    const FULL_NAME: &'static str = "common.kv.v1.Entry";
50    const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Entry";
51}
52impl ::buffa::Message for Entry {
53    /// Returns the total encoded size in bytes.
54    ///
55    /// Accumulates in `u64` (which cannot overflow for in-memory
56    /// data) and saturates to `u32` at return, so a message whose
57    /// encoded size exceeds the 2 GiB protobuf limit yields a value
58    /// above [`::buffa::MAX_MESSAGE_BYTES`] that the encode entry
59    /// points reject, never a silently wrapped size.
60    #[allow(clippy::let_and_return)]
61    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
62        #[allow(unused_imports)]
63        use ::buffa::Enumeration as _;
64        let mut size = 0u64;
65        if !self.key.is_empty() {
66            size += 1u64 + ::buffa::types::bytes_encoded_len(&self.key) as u64;
67        }
68        if !self.value.is_empty() {
69            size += 1u64 + ::buffa::types::bytes_encoded_len(&self.value) as u64;
70        }
71        size += self.__buffa_unknown_fields.encoded_len() as u64;
72        ::buffa::saturate_size(size)
73    }
74    fn write_to(
75        &self,
76        _cache: &mut ::buffa::SizeCache,
77        buf: &mut impl ::buffa::EncodeSink,
78    ) {
79        #[allow(unused_imports)]
80        use ::buffa::Enumeration as _;
81        if !self.key.is_empty() {
82            ::buffa::types::put_shared_bytes_field(1u32, &self.key, buf);
83        }
84        if !self.value.is_empty() {
85            ::buffa::types::put_shared_bytes_field(2u32, &self.value, buf);
86        }
87        self.__buffa_unknown_fields.write_to(buf);
88    }
89    fn merge_field(
90        &mut self,
91        tag: ::buffa::encoding::Tag,
92        buf: &mut impl ::buffa::bytes::Buf,
93        ctx: ::buffa::DecodeContext<'_>,
94    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
95        #[allow(unused_imports)]
96        use ::buffa::bytes::Buf as _;
97        #[allow(unused_imports)]
98        use ::buffa::Enumeration as _;
99        match tag.field_number() {
100            1u32 => {
101                ::buffa::encoding::check_wire_type(
102                    tag,
103                    ::buffa::encoding::WireType::LengthDelimited,
104                )?;
105                ::buffa::types::merge_bytes(&mut self.key, buf)?;
106            }
107            2u32 => {
108                ::buffa::encoding::check_wire_type(
109                    tag,
110                    ::buffa::encoding::WireType::LengthDelimited,
111                )?;
112                self.value = ::buffa::types::decode_bytes_to_bytes(buf)?;
113            }
114            _ => {
115                self.__buffa_unknown_fields
116                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
117            }
118        }
119        ::core::result::Result::Ok(())
120    }
121    fn clear(&mut self) {
122        self.key.clear();
123        self.value = ::core::default::Default::default();
124        self.__buffa_unknown_fields.clear();
125    }
126}
127impl ::buffa::ExtensionSet for Entry {
128    const PROTO_FQN: &'static str = "common.kv.v1.Entry";
129    fn unknown_fields(&self) -> &::buffa::UnknownFields {
130        &self.__buffa_unknown_fields
131    }
132    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
133        &mut self.__buffa_unknown_fields
134    }
135}
136impl ::buffa::json_helpers::ProtoElemJson for Entry {
137    fn serialize_proto_json<S: ::serde::Serializer>(
138        v: &Self,
139        s: S,
140    ) -> ::core::result::Result<S::Ok, S::Error> {
141        ::serde::Serialize::serialize(v, s)
142    }
143    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
144        d: D,
145    ) -> ::core::result::Result<Self, D::Error> {
146        <Self as ::serde::Deserialize>::deserialize(d)
147    }
148}
149#[doc(hidden)]
150pub const __ENTRY_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
151    type_url: "type.googleapis.com/common.kv.v1.Entry",
152    to_json: ::buffa::type_registry::any_to_json::<Entry>,
153    from_json: ::buffa::type_registry::any_from_json::<Entry>,
154    is_wkt: false,
155};
156/// Identifies a subset of keys by a byte prefix and a byte regex over the
157/// payload portion of each key (the bytes after the prefix). Shared across
158/// `store.prune.v1` prune policies, `log.stream.v1` subscriptions, and any
159/// future filter-by-key surface so that one domain type is used end-to-end.
160///
161/// Named capture groups referenced by callers (e.g. `PolicyGroupBy` /
162/// `PolicyOrderBy`) must exist in `payload_regex`.
163#[derive(Clone, PartialEq, Default)]
164#[derive(::serde::Serialize, ::serde::Deserialize)]
165#[serde(default)]
166pub struct Selector {
167    /// Byte prefix identifying the key family; the payload is the remainder of
168    /// the key. May be empty (matches all keys). Namespace composition is
169    /// prefix concatenation.
170    ///
171    /// Field 1: `prefix`
172    #[serde(
173        rename = "prefix",
174        with = "::buffa::json_helpers::bytes",
175        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
176    )]
177    pub prefix: ::buffa::bytes::Bytes,
178    /// Regex applied to the payload portion of each key. Must be non-empty.
179    ///
180    /// Field 2: `payload_regex`
181    #[serde(
182        rename = "payloadRegex",
183        alias = "payload_regex",
184        with = "::buffa::json_helpers::proto_string",
185        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
186    )]
187    pub payload_regex: ::buffa::alloc::string::String,
188    #[serde(skip)]
189    #[doc(hidden)]
190    pub __buffa_unknown_fields: ::buffa::UnknownFields,
191}
192impl ::core::fmt::Debug for Selector {
193    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
194        f.debug_struct("Selector")
195            .field("prefix", &self.prefix)
196            .field("payload_regex", &self.payload_regex)
197            .finish()
198    }
199}
200impl Selector {
201    /// Protobuf type URL for this message, for use with `Any::pack` and
202    /// `Any::unpack_if`.
203    ///
204    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
205    pub const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Selector";
206}
207::buffa::impl_default_instance!(Selector);
208impl ::buffa::MessageName for Selector {
209    const PACKAGE: &'static str = "common.kv.v1";
210    const NAME: &'static str = "Selector";
211    const FULL_NAME: &'static str = "common.kv.v1.Selector";
212    const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Selector";
213}
214impl ::buffa::Message for Selector {
215    /// Returns the total encoded size in bytes.
216    ///
217    /// Accumulates in `u64` (which cannot overflow for in-memory
218    /// data) and saturates to `u32` at return, so a message whose
219    /// encoded size exceeds the 2 GiB protobuf limit yields a value
220    /// above [`::buffa::MAX_MESSAGE_BYTES`] that the encode entry
221    /// points reject, never a silently wrapped size.
222    #[allow(clippy::let_and_return)]
223    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
224        #[allow(unused_imports)]
225        use ::buffa::Enumeration as _;
226        let mut size = 0u64;
227        if !self.prefix.is_empty() {
228            size += 1u64 + ::buffa::types::bytes_encoded_len(&self.prefix) as u64;
229        }
230        if !self.payload_regex.is_empty() {
231            size
232                += 1u64 + ::buffa::types::string_encoded_len(&self.payload_regex) as u64;
233        }
234        size += self.__buffa_unknown_fields.encoded_len() as u64;
235        ::buffa::saturate_size(size)
236    }
237    fn write_to(
238        &self,
239        _cache: &mut ::buffa::SizeCache,
240        buf: &mut impl ::buffa::EncodeSink,
241    ) {
242        #[allow(unused_imports)]
243        use ::buffa::Enumeration as _;
244        if !self.prefix.is_empty() {
245            ::buffa::types::put_shared_bytes_field(1u32, &self.prefix, buf);
246        }
247        if !self.payload_regex.is_empty() {
248            ::buffa::types::put_string_field(2u32, &self.payload_regex, buf);
249        }
250        self.__buffa_unknown_fields.write_to(buf);
251    }
252    fn merge_field(
253        &mut self,
254        tag: ::buffa::encoding::Tag,
255        buf: &mut impl ::buffa::bytes::Buf,
256        ctx: ::buffa::DecodeContext<'_>,
257    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
258        #[allow(unused_imports)]
259        use ::buffa::bytes::Buf as _;
260        #[allow(unused_imports)]
261        use ::buffa::Enumeration as _;
262        match tag.field_number() {
263            1u32 => {
264                ::buffa::encoding::check_wire_type(
265                    tag,
266                    ::buffa::encoding::WireType::LengthDelimited,
267                )?;
268                self.prefix = ::buffa::types::decode_bytes_to_bytes(buf)?;
269            }
270            2u32 => {
271                ::buffa::encoding::check_wire_type(
272                    tag,
273                    ::buffa::encoding::WireType::LengthDelimited,
274                )?;
275                ::buffa::types::merge_string(&mut self.payload_regex, buf)?;
276            }
277            _ => {
278                self.__buffa_unknown_fields
279                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
280            }
281        }
282        ::core::result::Result::Ok(())
283    }
284    fn clear(&mut self) {
285        self.prefix = ::core::default::Default::default();
286        self.payload_regex.clear();
287        self.__buffa_unknown_fields.clear();
288    }
289}
290impl ::buffa::ExtensionSet for Selector {
291    const PROTO_FQN: &'static str = "common.kv.v1.Selector";
292    fn unknown_fields(&self) -> &::buffa::UnknownFields {
293        &self.__buffa_unknown_fields
294    }
295    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
296        &mut self.__buffa_unknown_fields
297    }
298}
299impl ::buffa::json_helpers::ProtoElemJson for Selector {
300    fn serialize_proto_json<S: ::serde::Serializer>(
301        v: &Self,
302        s: S,
303    ) -> ::core::result::Result<S::Ok, S::Error> {
304        ::serde::Serialize::serialize(v, s)
305    }
306    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
307        d: D,
308    ) -> ::core::result::Result<Self, D::Error> {
309        <Self as ::serde::Deserialize>::deserialize(d)
310    }
311}
312#[doc(hidden)]
313pub const __SELECTOR_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
314    type_url: "type.googleapis.com/common.kv.v1.Selector",
315    to_json: ::buffa::type_registry::any_to_json::<Selector>,
316    from_json: ::buffa::type_registry::any_from_json::<Selector>,
317    is_wkt: false,
318};
319/// Matches an uninterpreted byte string by exact value, prefix, or full-string
320/// regex. Used for filtering both decoded logical keys and operation values in
321/// APIs that operate above the store-row key-prefix layer.
322#[derive(Clone, PartialEq, Default)]
323#[derive(::serde::Serialize)]
324#[serde(default)]
325pub struct Filter {
326    #[serde(flatten)]
327    pub kind: ::core::option::Option<__buffa::oneof::filter::Kind>,
328    #[serde(skip)]
329    #[doc(hidden)]
330    pub __buffa_unknown_fields: ::buffa::UnknownFields,
331}
332impl ::core::fmt::Debug for Filter {
333    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
334        f.debug_struct("Filter").field("kind", &self.kind).finish()
335    }
336}
337impl Filter {
338    /// Protobuf type URL for this message, for use with `Any::pack` and
339    /// `Any::unpack_if`.
340    ///
341    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
342    pub const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Filter";
343}
344::buffa::impl_default_instance!(Filter);
345impl ::buffa::MessageName for Filter {
346    const PACKAGE: &'static str = "common.kv.v1";
347    const NAME: &'static str = "Filter";
348    const FULL_NAME: &'static str = "common.kv.v1.Filter";
349    const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Filter";
350}
351impl ::buffa::Message for Filter {
352    /// Returns the total encoded size in bytes.
353    ///
354    /// Accumulates in `u64` (which cannot overflow for in-memory
355    /// data) and saturates to `u32` at return, so a message whose
356    /// encoded size exceeds the 2 GiB protobuf limit yields a value
357    /// above [`::buffa::MAX_MESSAGE_BYTES`] that the encode entry
358    /// points reject, never a silently wrapped size.
359    #[allow(clippy::let_and_return)]
360    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
361        #[allow(unused_imports)]
362        use ::buffa::Enumeration as _;
363        let mut size = 0u64;
364        if let ::core::option::Option::Some(ref v) = self.kind {
365            match v {
366                __buffa::oneof::filter::Kind::Exact(x) => {
367                    size += 1u64 + ::buffa::types::bytes_encoded_len(x) as u64;
368                }
369                __buffa::oneof::filter::Kind::Prefix(x) => {
370                    size += 1u64 + ::buffa::types::bytes_encoded_len(x) as u64;
371                }
372                __buffa::oneof::filter::Kind::Regex(x) => {
373                    size += 1u64 + ::buffa::types::string_encoded_len(x) as u64;
374                }
375            }
376        }
377        size += self.__buffa_unknown_fields.encoded_len() as u64;
378        ::buffa::saturate_size(size)
379    }
380    fn write_to(
381        &self,
382        _cache: &mut ::buffa::SizeCache,
383        buf: &mut impl ::buffa::EncodeSink,
384    ) {
385        #[allow(unused_imports)]
386        use ::buffa::Enumeration as _;
387        if let ::core::option::Option::Some(ref v) = self.kind {
388            match v {
389                __buffa::oneof::filter::Kind::Exact(x) => {
390                    ::buffa::types::put_shared_bytes_field(1u32, x, buf);
391                }
392                __buffa::oneof::filter::Kind::Prefix(x) => {
393                    ::buffa::types::put_shared_bytes_field(2u32, x, buf);
394                }
395                __buffa::oneof::filter::Kind::Regex(x) => {
396                    ::buffa::types::put_string_field(3u32, x, buf);
397                }
398            }
399        }
400        self.__buffa_unknown_fields.write_to(buf);
401    }
402    fn merge_field(
403        &mut self,
404        tag: ::buffa::encoding::Tag,
405        buf: &mut impl ::buffa::bytes::Buf,
406        ctx: ::buffa::DecodeContext<'_>,
407    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
408        #[allow(unused_imports)]
409        use ::buffa::bytes::Buf as _;
410        #[allow(unused_imports)]
411        use ::buffa::Enumeration as _;
412        match tag.field_number() {
413            1u32 => {
414                ::buffa::encoding::check_wire_type(
415                    tag,
416                    ::buffa::encoding::WireType::LengthDelimited,
417                )?;
418                self.kind = ::core::option::Option::Some(
419                    __buffa::oneof::filter::Kind::Exact(
420                        ::buffa::types::decode_bytes_to_bytes(buf)?,
421                    ),
422                );
423            }
424            2u32 => {
425                ::buffa::encoding::check_wire_type(
426                    tag,
427                    ::buffa::encoding::WireType::LengthDelimited,
428                )?;
429                self.kind = ::core::option::Option::Some(
430                    __buffa::oneof::filter::Kind::Prefix(
431                        ::buffa::types::decode_bytes_to_bytes(buf)?,
432                    ),
433                );
434            }
435            3u32 => {
436                ::buffa::encoding::check_wire_type(
437                    tag,
438                    ::buffa::encoding::WireType::LengthDelimited,
439                )?;
440                self.kind = ::core::option::Option::Some(
441                    __buffa::oneof::filter::Kind::Regex(
442                        ::buffa::types::decode_string(buf)?,
443                    ),
444                );
445            }
446            _ => {
447                self.__buffa_unknown_fields
448                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
449            }
450        }
451        ::core::result::Result::Ok(())
452    }
453    fn clear(&mut self) {
454        self.kind = ::core::option::Option::None;
455        self.__buffa_unknown_fields.clear();
456    }
457}
458impl ::buffa::ExtensionSet for Filter {
459    const PROTO_FQN: &'static str = "common.kv.v1.Filter";
460    fn unknown_fields(&self) -> &::buffa::UnknownFields {
461        &self.__buffa_unknown_fields
462    }
463    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
464        &mut self.__buffa_unknown_fields
465    }
466}
467impl<'de> serde::Deserialize<'de> for Filter {
468    fn deserialize<D: serde::Deserializer<'de>>(
469        d: D,
470    ) -> ::core::result::Result<Self, D::Error> {
471        struct _V;
472        impl<'de> serde::de::Visitor<'de> for _V {
473            type Value = Filter;
474            fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
475                f.write_str("struct Filter")
476            }
477            #[allow(clippy::field_reassign_with_default)]
478            fn visit_map<A: serde::de::MapAccess<'de>>(
479                self,
480                mut map: A,
481            ) -> ::core::result::Result<Filter, A::Error> {
482                let mut __oneof_kind: ::core::option::Option<
483                    __buffa::oneof::filter::Kind,
484                > = None;
485                while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
486                    match key.as_str() {
487                        "exact" => {
488                            struct _DeserSeed;
489                            impl<'de> serde::de::DeserializeSeed<'de> for _DeserSeed {
490                                type Value = ::buffa::bytes::Bytes;
491                                fn deserialize<D: serde::Deserializer<'de>>(
492                                    self,
493                                    d: D,
494                                ) -> ::core::result::Result<
495                                    ::buffa::bytes::Bytes,
496                                    D::Error,
497                                > {
498                                    ::buffa::json_helpers::bytes::deserialize(d)
499                                }
500                            }
501                            let v: ::core::option::Option<::buffa::bytes::Bytes> = map
502                                .next_value_seed(
503                                    ::buffa::json_helpers::NullableDeserializeSeed(_DeserSeed),
504                                )?;
505                            if let Some(v) = v {
506                                if __oneof_kind.is_some() {
507                                    return Err(
508                                        serde::de::Error::custom(
509                                            "multiple oneof fields set for 'kind'",
510                                        ),
511                                    );
512                                }
513                                __oneof_kind = Some(__buffa::oneof::filter::Kind::Exact(v));
514                            }
515                        }
516                        "prefix" => {
517                            struct _DeserSeed;
518                            impl<'de> serde::de::DeserializeSeed<'de> for _DeserSeed {
519                                type Value = ::buffa::bytes::Bytes;
520                                fn deserialize<D: serde::Deserializer<'de>>(
521                                    self,
522                                    d: D,
523                                ) -> ::core::result::Result<
524                                    ::buffa::bytes::Bytes,
525                                    D::Error,
526                                > {
527                                    ::buffa::json_helpers::bytes::deserialize(d)
528                                }
529                            }
530                            let v: ::core::option::Option<::buffa::bytes::Bytes> = map
531                                .next_value_seed(
532                                    ::buffa::json_helpers::NullableDeserializeSeed(_DeserSeed),
533                                )?;
534                            if let Some(v) = v {
535                                if __oneof_kind.is_some() {
536                                    return Err(
537                                        serde::de::Error::custom(
538                                            "multiple oneof fields set for 'kind'",
539                                        ),
540                                    );
541                                }
542                                __oneof_kind = Some(
543                                    __buffa::oneof::filter::Kind::Prefix(v),
544                                );
545                            }
546                        }
547                        "regex" => {
548                            let v: ::core::option::Option<
549                                ::buffa::alloc::string::String,
550                            > = map
551                                .next_value_seed(
552                                    ::buffa::json_helpers::NullableDeserializeSeed(
553                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
554                                            ::buffa::alloc::string::String,
555                                        >::new(),
556                                    ),
557                                )?;
558                            if let Some(v) = v {
559                                if __oneof_kind.is_some() {
560                                    return Err(
561                                        serde::de::Error::custom(
562                                            "multiple oneof fields set for 'kind'",
563                                        ),
564                                    );
565                                }
566                                __oneof_kind = Some(__buffa::oneof::filter::Kind::Regex(v));
567                            }
568                        }
569                        _ => {
570                            map.next_value::<serde::de::IgnoredAny>()?;
571                        }
572                    }
573                }
574                let mut __r = <Filter as ::core::default::Default>::default();
575                __r.kind = __oneof_kind;
576                Ok(__r)
577            }
578        }
579        d.deserialize_map(_V)
580    }
581}
582impl ::buffa::json_helpers::ProtoElemJson for Filter {
583    fn serialize_proto_json<S: ::serde::Serializer>(
584        v: &Self,
585        s: S,
586    ) -> ::core::result::Result<S::Ok, S::Error> {
587        ::serde::Serialize::serialize(v, s)
588    }
589    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
590        d: D,
591    ) -> ::core::result::Result<Self, D::Error> {
592        <Self as ::serde::Deserialize>::deserialize(d)
593    }
594}
595#[doc(hidden)]
596pub const __FILTER_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
597    type_url: "type.googleapis.com/common.kv.v1.Filter",
598    to_json: ::buffa::type_registry::any_to_json::<Filter>,
599    from_json: ::buffa::type_registry::any_from_json::<Filter>,
600    is_wkt: false,
601};
602pub mod filter {
603    #[allow(unused_imports)]
604    use super::*;
605    #[doc(inline)]
606    pub use super::__buffa::oneof::filter::Kind;
607    #[doc(inline)]
608    pub use super::__buffa::view::oneof::filter::Kind as KindView;
609}
610#[allow(
611    non_camel_case_types,
612    dead_code,
613    unused_imports,
614    unused_qualifications,
615    clippy::derivable_impls,
616    clippy::match_single_binding,
617    clippy::uninlined_format_args,
618    clippy::doc_lazy_continuation,
619    clippy::module_inception
620)]
621pub mod __buffa {
622    #[allow(unused_imports)]
623    use super::*;
624    pub mod view {
625        #[allow(unused_imports)]
626        use super::*;
627        /// A raw key-value pair shared by store APIs that move complete rows without
628        /// additional per-entry metadata.
629        ///
630        /// Keys must be between 0 and 254 bytes (inclusive) anywhere this message is
631        /// used for ingestion.
632        #[derive(Clone, Debug, Default)]
633        pub struct EntryView<'a> {
634            /// Field 1: `key`
635            pub key: &'a [u8],
636            /// Field 2: `value`
637            pub value: &'a [u8],
638            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
639        }
640        impl<'a> ::buffa::MessageView<'a> for EntryView<'a> {
641            type Owned = super::super::Entry;
642            fn decode_view(
643                buf: &'a [u8],
644            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
645                let __limit = ::core::cell::Cell::new(
646                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
647                );
648                <Self as ::buffa::MessageView>::decode_view_ctx(
649                    buf,
650                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
651                )
652            }
653            fn decode_view_with_ctx(
654                buf: &'a [u8],
655                ctx: ::buffa::DecodeContext<'_>,
656            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
657                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
658            }
659            #[inline]
660            fn merge_view_field(
661                &mut self,
662                tag: ::buffa::encoding::Tag,
663                cur: &'a [u8],
664                before_tag: &'a [u8],
665                ctx: ::buffa::DecodeContext<'_>,
666            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
667                let _ = ctx;
668                #[allow(unused_variables)]
669                let view = self;
670                let mut cur = cur;
671                match tag.field_number() {
672                    1u32 => {
673                        ::buffa::encoding::check_wire_type(
674                            tag,
675                            ::buffa::encoding::WireType::LengthDelimited,
676                        )?;
677                        view.key = ::buffa::types::borrow_bytes(&mut cur)?;
678                    }
679                    2u32 => {
680                        ::buffa::encoding::check_wire_type(
681                            tag,
682                            ::buffa::encoding::WireType::LengthDelimited,
683                        )?;
684                        view.value = ::buffa::types::borrow_bytes(&mut cur)?;
685                    }
686                    _ => {
687                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
688                        let span_len = before_tag.len() - cur.len();
689                        view.__buffa_unknown_fields
690                            .push_record(before_tag, span_len, ctx)?;
691                    }
692                }
693                ::core::result::Result::Ok(cur)
694            }
695            fn to_owned_message(
696                &self,
697            ) -> ::core::result::Result<super::super::Entry, ::buffa::DecodeError> {
698                self.to_owned_from_source(None)
699            }
700            #[allow(clippy::useless_conversion, clippy::needless_update)]
701            fn to_owned_from_source(
702                &self,
703                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
704            ) -> ::core::result::Result<super::super::Entry, ::buffa::DecodeError> {
705                #[allow(unused_imports)]
706                use ::buffa::alloc::string::ToString as _;
707                let _ = __buffa_src;
708                ::core::result::Result::Ok(super::super::Entry {
709                    key: (self.key).to_vec(),
710                    value: ::buffa::view::bytes_from_source(__buffa_src, self.value),
711                    __buffa_unknown_fields: self
712                        .__buffa_unknown_fields
713                        .to_owned()?
714                        .into(),
715                    ..::core::default::Default::default()
716                })
717            }
718        }
719        impl<'a> ::buffa::ViewEncode<'a> for EntryView<'a> {
720            #[allow(clippy::needless_borrow, clippy::let_and_return)]
721            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
722                #[allow(unused_imports)]
723                use ::buffa::Enumeration as _;
724                let mut size = 0u64;
725                if !self.key.is_empty() {
726                    size += 1u64 + ::buffa::types::bytes_encoded_len(&self.key) as u64;
727                }
728                if !self.value.is_empty() {
729                    size += 1u64 + ::buffa::types::bytes_encoded_len(&self.value) as u64;
730                }
731                size += self.__buffa_unknown_fields.encoded_len() as u64;
732                ::buffa::saturate_size(size)
733            }
734            #[allow(clippy::needless_borrow)]
735            fn write_to(
736                &self,
737                _cache: &mut ::buffa::SizeCache,
738                buf: &mut impl ::buffa::EncodeSink,
739            ) {
740                #[allow(unused_imports)]
741                use ::buffa::Enumeration as _;
742                if !self.key.is_empty() {
743                    ::buffa::types::put_shared_bytes_field(1u32, &self.key, buf);
744                }
745                if !self.value.is_empty() {
746                    ::buffa::types::put_shared_bytes_field(2u32, &self.value, buf);
747                }
748                self.__buffa_unknown_fields.write_to(buf);
749            }
750        }
751        /// Serializes this view as protobuf JSON.
752        ///
753        /// Implicit-presence fields with default values are omitted, `required`
754        /// fields are always emitted, explicit-presence (`optional`) fields are
755        /// emitted only when set, bytes fields are base64-encoded, and enum
756        /// values are their proto name strings.
757        ///
758        /// This impl uses `serialize_map(None)` because the number of emitted
759        /// fields depends on default-omission rules; serializers that require
760        /// known map lengths (e.g. `bincode`) will return a runtime error.
761        /// Use the owned message type for those formats.
762        impl<'__a> ::serde::Serialize for EntryView<'__a> {
763            fn serialize<__S: ::serde::Serializer>(
764                &self,
765                __s: __S,
766            ) -> ::core::result::Result<__S::Ok, __S::Error> {
767                use ::serde::ser::SerializeMap as _;
768                let mut __map = __s.serialize_map(::core::option::Option::None)?;
769                if !::buffa::json_helpers::skip_if::is_empty_bytes(self.key) {
770                    __map
771                        .serialize_entry(
772                            "key",
773                            &::buffa::json_helpers::BytesJson(self.key),
774                        )?;
775                }
776                if !::buffa::json_helpers::skip_if::is_empty_bytes(self.value) {
777                    __map
778                        .serialize_entry(
779                            "value",
780                            &::buffa::json_helpers::BytesJson(self.value),
781                        )?;
782                }
783                __map.end()
784            }
785        }
786        impl<'a> ::buffa::MessageName for EntryView<'a> {
787            const PACKAGE: &'static str = "common.kv.v1";
788            const NAME: &'static str = "Entry";
789            const FULL_NAME: &'static str = "common.kv.v1.Entry";
790            const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Entry";
791        }
792        ::buffa::impl_default_view_instance!(EntryView);
793        ::buffa::impl_view_reborrow!(EntryView);
794        /** Self-contained, `'static` owned view of a `Entry` message.
795
796 Wraps [`::buffa::OwnedView`]`<`[`EntryView`]`<'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.
797
798 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`EntryView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
799        #[derive(Clone, Debug)]
800        pub struct EntryOwnedView(::buffa::OwnedView<EntryView<'static>>);
801        impl EntryOwnedView {
802            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
803            ///
804            /// The view borrows directly from the buffer's data; the buffer is
805            /// retained inside the returned handle.
806            ///
807            /// # Errors
808            ///
809            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
810            /// protobuf data.
811            pub fn decode(
812                bytes: ::buffa::bytes::Bytes,
813            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
814                ::core::result::Result::Ok(
815                    EntryOwnedView(::buffa::OwnedView::decode(bytes)?),
816                )
817            }
818            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
819            /// max message size).
820            ///
821            /// # Errors
822            ///
823            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
824            /// exceeds the configured limits.
825            pub fn decode_with_options(
826                bytes: ::buffa::bytes::Bytes,
827                opts: &::buffa::DecodeOptions,
828            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
829                ::core::result::Result::Ok(
830                    EntryOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
831                )
832            }
833            /// Build from an owned message via an encode → decode round-trip.
834            ///
835            /// # Errors
836            ///
837            /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
838            /// message's encoded size exceeds the 2 GiB protobuf limit, or
839            /// another [`::buffa::DecodeError`] if the re-encoded bytes are
840            /// somehow invalid (should not happen for well-formed messages).
841            pub fn from_owned(
842                msg: &super::super::Entry,
843            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
844                ::core::result::Result::Ok(
845                    EntryOwnedView(::buffa::OwnedView::from_owned(msg)?),
846                )
847            }
848            /// Borrow the full [`EntryView`] with its lifetime tied to `&self`.
849            #[must_use]
850            pub fn view(&self) -> &EntryView<'_> {
851                self.0.reborrow()
852            }
853            /// Convert to the owned message type.
854            ///
855            /// Infallible: this type's constructors wire-decode their
856            /// buffer, and a view produced by wire decoding always
857            /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
858            /// whose contract also governs handles converted from a raw
859            /// [`::buffa::OwnedView`].
860            #[must_use]
861            pub fn to_owned_message(&self) -> super::super::Entry {
862                self.0.to_owned_message()
863            }
864            /// The underlying bytes buffer.
865            #[must_use]
866            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
867                self.0.bytes()
868            }
869            /// Consume the handle, returning the underlying bytes buffer.
870            #[must_use]
871            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
872                self.0.into_bytes()
873            }
874            /// Field 1: `key`
875            #[must_use]
876            pub fn key(&self) -> &'_ [u8] {
877                self.0.reborrow().key
878            }
879            /// Field 2: `value`
880            #[must_use]
881            pub fn value(&self) -> &'_ [u8] {
882                self.0.reborrow().value
883            }
884        }
885        impl ::core::convert::From<::buffa::OwnedView<EntryView<'static>>>
886        for EntryOwnedView {
887            fn from(inner: ::buffa::OwnedView<EntryView<'static>>) -> Self {
888                EntryOwnedView(inner)
889            }
890        }
891        impl ::core::convert::From<EntryOwnedView>
892        for ::buffa::OwnedView<EntryView<'static>> {
893            fn from(wrapper: EntryOwnedView) -> Self {
894                wrapper.0
895            }
896        }
897        impl ::core::convert::AsRef<::buffa::OwnedView<EntryView<'static>>>
898        for EntryOwnedView {
899            fn as_ref(&self) -> &::buffa::OwnedView<EntryView<'static>> {
900                &self.0
901            }
902        }
903        impl ::buffa::HasMessageView for super::super::Entry {
904            type View<'a> = EntryView<'a>;
905            type ViewHandle = EntryOwnedView;
906        }
907        impl ::serde::Serialize for EntryOwnedView {
908            fn serialize<__S: ::serde::Serializer>(
909                &self,
910                __s: __S,
911            ) -> ::core::result::Result<__S::Ok, __S::Error> {
912                ::serde::Serialize::serialize(&self.0, __s)
913            }
914        }
915        /// Identifies a subset of keys by a byte prefix and a byte regex over the
916        /// payload portion of each key (the bytes after the prefix). Shared across
917        /// `store.prune.v1` prune policies, `log.stream.v1` subscriptions, and any
918        /// future filter-by-key surface so that one domain type is used end-to-end.
919        ///
920        /// Named capture groups referenced by callers (e.g. `PolicyGroupBy` /
921        /// `PolicyOrderBy`) must exist in `payload_regex`.
922        #[derive(Clone, Debug, Default)]
923        pub struct SelectorView<'a> {
924            /// Byte prefix identifying the key family; the payload is the remainder of
925            /// the key. May be empty (matches all keys). Namespace composition is
926            /// prefix concatenation.
927            ///
928            /// Field 1: `prefix`
929            pub prefix: &'a [u8],
930            /// Regex applied to the payload portion of each key. Must be non-empty.
931            ///
932            /// Field 2: `payload_regex`
933            pub payload_regex: &'a str,
934            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
935        }
936        impl<'a> ::buffa::MessageView<'a> for SelectorView<'a> {
937            type Owned = super::super::Selector;
938            fn decode_view(
939                buf: &'a [u8],
940            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
941                let __limit = ::core::cell::Cell::new(
942                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
943                );
944                <Self as ::buffa::MessageView>::decode_view_ctx(
945                    buf,
946                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
947                )
948            }
949            fn decode_view_with_ctx(
950                buf: &'a [u8],
951                ctx: ::buffa::DecodeContext<'_>,
952            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
953                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
954            }
955            #[inline]
956            fn merge_view_field(
957                &mut self,
958                tag: ::buffa::encoding::Tag,
959                cur: &'a [u8],
960                before_tag: &'a [u8],
961                ctx: ::buffa::DecodeContext<'_>,
962            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
963                let _ = ctx;
964                #[allow(unused_variables)]
965                let view = self;
966                let mut cur = cur;
967                match tag.field_number() {
968                    1u32 => {
969                        ::buffa::encoding::check_wire_type(
970                            tag,
971                            ::buffa::encoding::WireType::LengthDelimited,
972                        )?;
973                        view.prefix = ::buffa::types::borrow_bytes(&mut cur)?;
974                    }
975                    2u32 => {
976                        ::buffa::encoding::check_wire_type(
977                            tag,
978                            ::buffa::encoding::WireType::LengthDelimited,
979                        )?;
980                        view.payload_regex = ::buffa::types::borrow_str(&mut cur)?;
981                    }
982                    _ => {
983                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
984                        let span_len = before_tag.len() - cur.len();
985                        view.__buffa_unknown_fields
986                            .push_record(before_tag, span_len, ctx)?;
987                    }
988                }
989                ::core::result::Result::Ok(cur)
990            }
991            fn to_owned_message(
992                &self,
993            ) -> ::core::result::Result<super::super::Selector, ::buffa::DecodeError> {
994                self.to_owned_from_source(None)
995            }
996            #[allow(clippy::useless_conversion, clippy::needless_update)]
997            fn to_owned_from_source(
998                &self,
999                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1000            ) -> ::core::result::Result<super::super::Selector, ::buffa::DecodeError> {
1001                #[allow(unused_imports)]
1002                use ::buffa::alloc::string::ToString as _;
1003                let _ = __buffa_src;
1004                ::core::result::Result::Ok(super::super::Selector {
1005                    prefix: ::buffa::view::bytes_from_source(__buffa_src, self.prefix),
1006                    payload_regex: self.payload_regex.to_string(),
1007                    __buffa_unknown_fields: self
1008                        .__buffa_unknown_fields
1009                        .to_owned()?
1010                        .into(),
1011                    ..::core::default::Default::default()
1012                })
1013            }
1014        }
1015        impl<'a> ::buffa::ViewEncode<'a> for SelectorView<'a> {
1016            #[allow(clippy::needless_borrow, clippy::let_and_return)]
1017            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1018                #[allow(unused_imports)]
1019                use ::buffa::Enumeration as _;
1020                let mut size = 0u64;
1021                if !self.prefix.is_empty() {
1022                    size
1023                        += 1u64 + ::buffa::types::bytes_encoded_len(&self.prefix) as u64;
1024                }
1025                if !self.payload_regex.is_empty() {
1026                    size
1027                        += 1u64
1028                            + ::buffa::types::string_encoded_len(&self.payload_regex)
1029                                as u64;
1030                }
1031                size += self.__buffa_unknown_fields.encoded_len() as u64;
1032                ::buffa::saturate_size(size)
1033            }
1034            #[allow(clippy::needless_borrow)]
1035            fn write_to(
1036                &self,
1037                _cache: &mut ::buffa::SizeCache,
1038                buf: &mut impl ::buffa::EncodeSink,
1039            ) {
1040                #[allow(unused_imports)]
1041                use ::buffa::Enumeration as _;
1042                if !self.prefix.is_empty() {
1043                    ::buffa::types::put_shared_bytes_field(1u32, &self.prefix, buf);
1044                }
1045                if !self.payload_regex.is_empty() {
1046                    ::buffa::types::put_string_field(2u32, &self.payload_regex, buf);
1047                }
1048                self.__buffa_unknown_fields.write_to(buf);
1049            }
1050        }
1051        /// Serializes this view as protobuf JSON.
1052        ///
1053        /// Implicit-presence fields with default values are omitted, `required`
1054        /// fields are always emitted, explicit-presence (`optional`) fields are
1055        /// emitted only when set, bytes fields are base64-encoded, and enum
1056        /// values are their proto name strings.
1057        ///
1058        /// This impl uses `serialize_map(None)` because the number of emitted
1059        /// fields depends on default-omission rules; serializers that require
1060        /// known map lengths (e.g. `bincode`) will return a runtime error.
1061        /// Use the owned message type for those formats.
1062        impl<'__a> ::serde::Serialize for SelectorView<'__a> {
1063            fn serialize<__S: ::serde::Serializer>(
1064                &self,
1065                __s: __S,
1066            ) -> ::core::result::Result<__S::Ok, __S::Error> {
1067                use ::serde::ser::SerializeMap as _;
1068                let mut __map = __s.serialize_map(::core::option::Option::None)?;
1069                if !::buffa::json_helpers::skip_if::is_empty_bytes(self.prefix) {
1070                    __map
1071                        .serialize_entry(
1072                            "prefix",
1073                            &::buffa::json_helpers::BytesJson(self.prefix),
1074                        )?;
1075                }
1076                if !::buffa::json_helpers::skip_if::is_empty_str(self.payload_regex) {
1077                    __map.serialize_entry("payloadRegex", self.payload_regex)?;
1078                }
1079                __map.end()
1080            }
1081        }
1082        impl<'a> ::buffa::MessageName for SelectorView<'a> {
1083            const PACKAGE: &'static str = "common.kv.v1";
1084            const NAME: &'static str = "Selector";
1085            const FULL_NAME: &'static str = "common.kv.v1.Selector";
1086            const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Selector";
1087        }
1088        ::buffa::impl_default_view_instance!(SelectorView);
1089        ::buffa::impl_view_reborrow!(SelectorView);
1090        /** Self-contained, `'static` owned view of a `Selector` message.
1091
1092 Wraps [`::buffa::OwnedView`]`<`[`SelectorView`]`<'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.
1093
1094 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`SelectorView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1095        #[derive(Clone, Debug)]
1096        pub struct SelectorOwnedView(::buffa::OwnedView<SelectorView<'static>>);
1097        impl SelectorOwnedView {
1098            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1099            ///
1100            /// The view borrows directly from the buffer's data; the buffer is
1101            /// retained inside the returned handle.
1102            ///
1103            /// # Errors
1104            ///
1105            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1106            /// protobuf data.
1107            pub fn decode(
1108                bytes: ::buffa::bytes::Bytes,
1109            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1110                ::core::result::Result::Ok(
1111                    SelectorOwnedView(::buffa::OwnedView::decode(bytes)?),
1112                )
1113            }
1114            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1115            /// max message size).
1116            ///
1117            /// # Errors
1118            ///
1119            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1120            /// exceeds the configured limits.
1121            pub fn decode_with_options(
1122                bytes: ::buffa::bytes::Bytes,
1123                opts: &::buffa::DecodeOptions,
1124            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1125                ::core::result::Result::Ok(
1126                    SelectorOwnedView(
1127                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
1128                    ),
1129                )
1130            }
1131            /// Build from an owned message via an encode → decode round-trip.
1132            ///
1133            /// # Errors
1134            ///
1135            /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
1136            /// message's encoded size exceeds the 2 GiB protobuf limit, or
1137            /// another [`::buffa::DecodeError`] if the re-encoded bytes are
1138            /// somehow invalid (should not happen for well-formed messages).
1139            pub fn from_owned(
1140                msg: &super::super::Selector,
1141            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1142                ::core::result::Result::Ok(
1143                    SelectorOwnedView(::buffa::OwnedView::from_owned(msg)?),
1144                )
1145            }
1146            /// Borrow the full [`SelectorView`] with its lifetime tied to `&self`.
1147            #[must_use]
1148            pub fn view(&self) -> &SelectorView<'_> {
1149                self.0.reborrow()
1150            }
1151            /// Convert to the owned message type.
1152            ///
1153            /// Infallible: this type's constructors wire-decode their
1154            /// buffer, and a view produced by wire decoding always
1155            /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
1156            /// whose contract also governs handles converted from a raw
1157            /// [`::buffa::OwnedView`].
1158            #[must_use]
1159            pub fn to_owned_message(&self) -> super::super::Selector {
1160                self.0.to_owned_message()
1161            }
1162            /// The underlying bytes buffer.
1163            #[must_use]
1164            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
1165                self.0.bytes()
1166            }
1167            /// Consume the handle, returning the underlying bytes buffer.
1168            #[must_use]
1169            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
1170                self.0.into_bytes()
1171            }
1172            /// Byte prefix identifying the key family; the payload is the remainder of
1173            /// the key. May be empty (matches all keys). Namespace composition is
1174            /// prefix concatenation.
1175            ///
1176            /// Field 1: `prefix`
1177            #[must_use]
1178            pub fn prefix(&self) -> &'_ [u8] {
1179                self.0.reborrow().prefix
1180            }
1181            /// Regex applied to the payload portion of each key. Must be non-empty.
1182            ///
1183            /// Field 2: `payload_regex`
1184            #[must_use]
1185            pub fn payload_regex(&self) -> &'_ str {
1186                self.0.reborrow().payload_regex
1187            }
1188        }
1189        impl ::core::convert::From<::buffa::OwnedView<SelectorView<'static>>>
1190        for SelectorOwnedView {
1191            fn from(inner: ::buffa::OwnedView<SelectorView<'static>>) -> Self {
1192                SelectorOwnedView(inner)
1193            }
1194        }
1195        impl ::core::convert::From<SelectorOwnedView>
1196        for ::buffa::OwnedView<SelectorView<'static>> {
1197            fn from(wrapper: SelectorOwnedView) -> Self {
1198                wrapper.0
1199            }
1200        }
1201        impl ::core::convert::AsRef<::buffa::OwnedView<SelectorView<'static>>>
1202        for SelectorOwnedView {
1203            fn as_ref(&self) -> &::buffa::OwnedView<SelectorView<'static>> {
1204                &self.0
1205            }
1206        }
1207        impl ::buffa::HasMessageView for super::super::Selector {
1208            type View<'a> = SelectorView<'a>;
1209            type ViewHandle = SelectorOwnedView;
1210        }
1211        impl ::serde::Serialize for SelectorOwnedView {
1212            fn serialize<__S: ::serde::Serializer>(
1213                &self,
1214                __s: __S,
1215            ) -> ::core::result::Result<__S::Ok, __S::Error> {
1216                ::serde::Serialize::serialize(&self.0, __s)
1217            }
1218        }
1219        /// Matches an uninterpreted byte string by exact value, prefix, or full-string
1220        /// regex. Used for filtering both decoded logical keys and operation values in
1221        /// APIs that operate above the store-row key-prefix layer.
1222        #[derive(Clone, Debug, Default)]
1223        pub struct FilterView<'a> {
1224            pub kind: ::core::option::Option<
1225                super::super::__buffa::view::oneof::filter::Kind<'a>,
1226            >,
1227            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1228        }
1229        impl<'a> ::buffa::MessageView<'a> for FilterView<'a> {
1230            type Owned = super::super::Filter;
1231            fn decode_view(
1232                buf: &'a [u8],
1233            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1234                let __limit = ::core::cell::Cell::new(
1235                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
1236                );
1237                <Self as ::buffa::MessageView>::decode_view_ctx(
1238                    buf,
1239                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
1240                )
1241            }
1242            fn decode_view_with_ctx(
1243                buf: &'a [u8],
1244                ctx: ::buffa::DecodeContext<'_>,
1245            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1246                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
1247            }
1248            #[inline]
1249            fn merge_view_field(
1250                &mut self,
1251                tag: ::buffa::encoding::Tag,
1252                cur: &'a [u8],
1253                before_tag: &'a [u8],
1254                ctx: ::buffa::DecodeContext<'_>,
1255            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
1256                let _ = ctx;
1257                #[allow(unused_variables)]
1258                let view = self;
1259                let mut cur = cur;
1260                match tag.field_number() {
1261                    1u32 => {
1262                        ::buffa::encoding::check_wire_type(
1263                            tag,
1264                            ::buffa::encoding::WireType::LengthDelimited,
1265                        )?;
1266                        view.kind = Some(
1267                            super::super::__buffa::view::oneof::filter::Kind::Exact(
1268                                ::buffa::types::borrow_bytes(&mut cur)?,
1269                            ),
1270                        );
1271                    }
1272                    2u32 => {
1273                        ::buffa::encoding::check_wire_type(
1274                            tag,
1275                            ::buffa::encoding::WireType::LengthDelimited,
1276                        )?;
1277                        view.kind = Some(
1278                            super::super::__buffa::view::oneof::filter::Kind::Prefix(
1279                                ::buffa::types::borrow_bytes(&mut cur)?,
1280                            ),
1281                        );
1282                    }
1283                    3u32 => {
1284                        ::buffa::encoding::check_wire_type(
1285                            tag,
1286                            ::buffa::encoding::WireType::LengthDelimited,
1287                        )?;
1288                        view.kind = Some(
1289                            super::super::__buffa::view::oneof::filter::Kind::Regex(
1290                                ::buffa::types::borrow_str(&mut cur)?,
1291                            ),
1292                        );
1293                    }
1294                    _ => {
1295                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
1296                        let span_len = before_tag.len() - cur.len();
1297                        view.__buffa_unknown_fields
1298                            .push_record(before_tag, span_len, ctx)?;
1299                    }
1300                }
1301                ::core::result::Result::Ok(cur)
1302            }
1303            fn to_owned_message(
1304                &self,
1305            ) -> ::core::result::Result<super::super::Filter, ::buffa::DecodeError> {
1306                self.to_owned_from_source(None)
1307            }
1308            #[allow(clippy::useless_conversion, clippy::needless_update)]
1309            fn to_owned_from_source(
1310                &self,
1311                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1312            ) -> ::core::result::Result<super::super::Filter, ::buffa::DecodeError> {
1313                #[allow(unused_imports)]
1314                use ::buffa::alloc::string::ToString as _;
1315                let _ = __buffa_src;
1316                ::core::result::Result::Ok(super::super::Filter {
1317                    kind: self
1318                        .kind
1319                        .as_ref()
1320                        .map(|v| match v {
1321                            super::super::__buffa::view::oneof::filter::Kind::Exact(
1322                                v,
1323                            ) => {
1324                                super::super::__buffa::oneof::filter::Kind::Exact(
1325                                    ::buffa::view::bytes_from_source(__buffa_src, v),
1326                                )
1327                            }
1328                            super::super::__buffa::view::oneof::filter::Kind::Prefix(
1329                                v,
1330                            ) => {
1331                                super::super::__buffa::oneof::filter::Kind::Prefix(
1332                                    ::buffa::view::bytes_from_source(__buffa_src, v),
1333                                )
1334                            }
1335                            super::super::__buffa::view::oneof::filter::Kind::Regex(
1336                                v,
1337                            ) => {
1338                                super::super::__buffa::oneof::filter::Kind::Regex(
1339                                    v.to_string(),
1340                                )
1341                            }
1342                        }),
1343                    __buffa_unknown_fields: self
1344                        .__buffa_unknown_fields
1345                        .to_owned()?
1346                        .into(),
1347                    ..::core::default::Default::default()
1348                })
1349            }
1350        }
1351        impl<'a> ::buffa::ViewEncode<'a> for FilterView<'a> {
1352            #[allow(clippy::needless_borrow, clippy::let_and_return)]
1353            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1354                #[allow(unused_imports)]
1355                use ::buffa::Enumeration as _;
1356                let mut size = 0u64;
1357                if let ::core::option::Option::Some(ref v) = self.kind {
1358                    match v {
1359                        super::super::__buffa::view::oneof::filter::Kind::Exact(x) => {
1360                            size += 1u64 + ::buffa::types::bytes_encoded_len(x) as u64;
1361                        }
1362                        super::super::__buffa::view::oneof::filter::Kind::Prefix(x) => {
1363                            size += 1u64 + ::buffa::types::bytes_encoded_len(x) as u64;
1364                        }
1365                        super::super::__buffa::view::oneof::filter::Kind::Regex(x) => {
1366                            size += 1u64 + ::buffa::types::string_encoded_len(x) as u64;
1367                        }
1368                    }
1369                }
1370                size += self.__buffa_unknown_fields.encoded_len() as u64;
1371                ::buffa::saturate_size(size)
1372            }
1373            #[allow(clippy::needless_borrow)]
1374            fn write_to(
1375                &self,
1376                _cache: &mut ::buffa::SizeCache,
1377                buf: &mut impl ::buffa::EncodeSink,
1378            ) {
1379                #[allow(unused_imports)]
1380                use ::buffa::Enumeration as _;
1381                if let ::core::option::Option::Some(ref v) = self.kind {
1382                    match v {
1383                        super::super::__buffa::view::oneof::filter::Kind::Exact(x) => {
1384                            ::buffa::types::put_shared_bytes_field(1u32, x, buf);
1385                        }
1386                        super::super::__buffa::view::oneof::filter::Kind::Prefix(x) => {
1387                            ::buffa::types::put_shared_bytes_field(2u32, x, buf);
1388                        }
1389                        super::super::__buffa::view::oneof::filter::Kind::Regex(x) => {
1390                            ::buffa::types::put_string_field(3u32, x, buf);
1391                        }
1392                    }
1393                }
1394                self.__buffa_unknown_fields.write_to(buf);
1395            }
1396        }
1397        /// Serializes this view as protobuf JSON.
1398        ///
1399        /// Implicit-presence fields with default values are omitted, `required`
1400        /// fields are always emitted, explicit-presence (`optional`) fields are
1401        /// emitted only when set, bytes fields are base64-encoded, and enum
1402        /// values are their proto name strings.
1403        ///
1404        /// This impl uses `serialize_map(None)` because the number of emitted
1405        /// fields depends on default-omission rules; serializers that require
1406        /// known map lengths (e.g. `bincode`) will return a runtime error.
1407        /// Use the owned message type for those formats.
1408        impl<'__a> ::serde::Serialize for FilterView<'__a> {
1409            fn serialize<__S: ::serde::Serializer>(
1410                &self,
1411                __s: __S,
1412            ) -> ::core::result::Result<__S::Ok, __S::Error> {
1413                use ::serde::ser::SerializeMap as _;
1414                let mut __map = __s.serialize_map(::core::option::Option::None)?;
1415                if let ::core::option::Option::Some(ref __ov) = self.kind {
1416                    match __ov {
1417                        super::super::__buffa::view::oneof::filter::Kind::Exact(v) => {
1418                            __map
1419                                .serialize_entry(
1420                                    "exact",
1421                                    &::buffa::json_helpers::BytesJson(v),
1422                                )?;
1423                        }
1424                        super::super::__buffa::view::oneof::filter::Kind::Prefix(v) => {
1425                            __map
1426                                .serialize_entry(
1427                                    "prefix",
1428                                    &::buffa::json_helpers::BytesJson(v),
1429                                )?;
1430                        }
1431                        super::super::__buffa::view::oneof::filter::Kind::Regex(v) => {
1432                            __map.serialize_entry("regex", v)?;
1433                        }
1434                    }
1435                }
1436                __map.end()
1437            }
1438        }
1439        impl<'a> ::buffa::MessageName for FilterView<'a> {
1440            const PACKAGE: &'static str = "common.kv.v1";
1441            const NAME: &'static str = "Filter";
1442            const FULL_NAME: &'static str = "common.kv.v1.Filter";
1443            const TYPE_URL: &'static str = "type.googleapis.com/common.kv.v1.Filter";
1444        }
1445        ::buffa::impl_default_view_instance!(FilterView);
1446        ::buffa::impl_view_reborrow!(FilterView);
1447        /** Self-contained, `'static` owned view of a `Filter` message.
1448
1449 Wraps [`::buffa::OwnedView`]`<`[`FilterView`]`<'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.
1450
1451 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FilterView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1452        #[derive(Clone, Debug)]
1453        pub struct FilterOwnedView(::buffa::OwnedView<FilterView<'static>>);
1454        impl FilterOwnedView {
1455            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1456            ///
1457            /// The view borrows directly from the buffer's data; the buffer is
1458            /// retained inside the returned handle.
1459            ///
1460            /// # Errors
1461            ///
1462            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1463            /// protobuf data.
1464            pub fn decode(
1465                bytes: ::buffa::bytes::Bytes,
1466            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1467                ::core::result::Result::Ok(
1468                    FilterOwnedView(::buffa::OwnedView::decode(bytes)?),
1469                )
1470            }
1471            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1472            /// max message size).
1473            ///
1474            /// # Errors
1475            ///
1476            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1477            /// exceeds the configured limits.
1478            pub fn decode_with_options(
1479                bytes: ::buffa::bytes::Bytes,
1480                opts: &::buffa::DecodeOptions,
1481            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1482                ::core::result::Result::Ok(
1483                    FilterOwnedView(
1484                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
1485                    ),
1486                )
1487            }
1488            /// Build from an owned message via an encode → decode round-trip.
1489            ///
1490            /// # Errors
1491            ///
1492            /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
1493            /// message's encoded size exceeds the 2 GiB protobuf limit, or
1494            /// another [`::buffa::DecodeError`] if the re-encoded bytes are
1495            /// somehow invalid (should not happen for well-formed messages).
1496            pub fn from_owned(
1497                msg: &super::super::Filter,
1498            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1499                ::core::result::Result::Ok(
1500                    FilterOwnedView(::buffa::OwnedView::from_owned(msg)?),
1501                )
1502            }
1503            /// Borrow the full [`FilterView`] with its lifetime tied to `&self`.
1504            #[must_use]
1505            pub fn view(&self) -> &FilterView<'_> {
1506                self.0.reborrow()
1507            }
1508            /// Convert to the owned message type.
1509            ///
1510            /// Infallible: this type's constructors wire-decode their
1511            /// buffer, and a view produced by wire decoding always
1512            /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
1513            /// whose contract also governs handles converted from a raw
1514            /// [`::buffa::OwnedView`].
1515            #[must_use]
1516            pub fn to_owned_message(&self) -> super::super::Filter {
1517                self.0.to_owned_message()
1518            }
1519            /// The underlying bytes buffer.
1520            #[must_use]
1521            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
1522                self.0.bytes()
1523            }
1524            /// Consume the handle, returning the underlying bytes buffer.
1525            #[must_use]
1526            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
1527                self.0.into_bytes()
1528            }
1529            /// Oneof `kind`.
1530            #[must_use]
1531            pub fn kind(
1532                &self,
1533            ) -> ::core::option::Option<
1534                &super::super::__buffa::view::oneof::filter::Kind<'_>,
1535            > {
1536                self.0.reborrow().kind.as_ref()
1537            }
1538        }
1539        impl ::core::convert::From<::buffa::OwnedView<FilterView<'static>>>
1540        for FilterOwnedView {
1541            fn from(inner: ::buffa::OwnedView<FilterView<'static>>) -> Self {
1542                FilterOwnedView(inner)
1543            }
1544        }
1545        impl ::core::convert::From<FilterOwnedView>
1546        for ::buffa::OwnedView<FilterView<'static>> {
1547            fn from(wrapper: FilterOwnedView) -> Self {
1548                wrapper.0
1549            }
1550        }
1551        impl ::core::convert::AsRef<::buffa::OwnedView<FilterView<'static>>>
1552        for FilterOwnedView {
1553            fn as_ref(&self) -> &::buffa::OwnedView<FilterView<'static>> {
1554                &self.0
1555            }
1556        }
1557        impl ::buffa::HasMessageView for super::super::Filter {
1558            type View<'a> = FilterView<'a>;
1559            type ViewHandle = FilterOwnedView;
1560        }
1561        impl ::serde::Serialize for FilterOwnedView {
1562            fn serialize<__S: ::serde::Serializer>(
1563                &self,
1564                __s: __S,
1565            ) -> ::core::result::Result<__S::Ok, __S::Error> {
1566                ::serde::Serialize::serialize(&self.0, __s)
1567            }
1568        }
1569        pub mod oneof {
1570            #[allow(unused_imports)]
1571            use super::*;
1572            pub mod filter {
1573                #[allow(unused_imports)]
1574                use super::*;
1575                #[derive(Clone, Debug)]
1576                pub enum Kind<'a> {
1577                    Exact(&'a [u8]),
1578                    Prefix(&'a [u8]),
1579                    Regex(&'a str),
1580                }
1581            }
1582        }
1583    }
1584    pub mod oneof {
1585        #[allow(unused_imports)]
1586        use super::*;
1587        pub mod filter {
1588            #[allow(unused_imports)]
1589            use super::*;
1590            #[derive(Clone, PartialEq, Debug)]
1591            pub enum Kind {
1592                Exact(::buffa::bytes::Bytes),
1593                Prefix(::buffa::bytes::Bytes),
1594                Regex(::buffa::alloc::string::String),
1595            }
1596            impl ::buffa::Oneof for Kind {}
1597            impl serde::Serialize for Kind {
1598                fn serialize<S: serde::Serializer>(
1599                    &self,
1600                    s: S,
1601                ) -> ::core::result::Result<S::Ok, S::Error> {
1602                    use serde::ser::SerializeMap;
1603                    let mut map = s.serialize_map(Some(1))?;
1604                    match self {
1605                        Self::Exact(v) => {
1606                            map.serialize_entry(
1607                                "exact",
1608                                &::buffa::json_helpers::ProtoJson(v),
1609                            )?;
1610                        }
1611                        Self::Prefix(v) => {
1612                            map.serialize_entry(
1613                                "prefix",
1614                                &::buffa::json_helpers::ProtoJson(v),
1615                            )?;
1616                        }
1617                        Self::Regex(v) => {
1618                            map.serialize_entry("regex", v)?;
1619                        }
1620                    }
1621                    map.end()
1622                }
1623            }
1624        }
1625    }
1626}
1627#[doc(inline)]
1628pub use self::__buffa::view::EntryView;
1629#[doc(inline)]
1630pub use self::__buffa::view::EntryOwnedView;
1631#[doc(inline)]
1632pub use self::__buffa::view::SelectorView;
1633#[doc(inline)]
1634pub use self::__buffa::view::SelectorOwnedView;
1635#[doc(inline)]
1636pub use self::__buffa::view::FilterView;
1637#[doc(inline)]
1638pub use self::__buffa::view::FilterOwnedView;