Skip to main content

polyester/gen/buffa/
collab.v1.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// BoardAudience controls which audience rule applies when no explicit ACL entry matches.
4#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5#[repr(i32)]
6pub enum BoardAudience {
7    /// Audience is not specified.
8    AUDIENCE_UNSPECIFIED = 0i32,
9    /// Only the owner and explicit ACL entries have access.
10    PRIVATE = 1i32,
11    /// Any caller gets the board default role.
12    PUBLIC = 2i32,
13    /// Followers of the owner get the board default role.
14    FOLLOWERS = 3i32,
15}
16impl BoardAudience {
17    ///Idiomatic alias for [`Self::AUDIENCE_UNSPECIFIED`]; `Debug` prints the variant name.
18    #[allow(non_upper_case_globals)]
19    pub const AudienceUnspecified: Self = Self::AUDIENCE_UNSPECIFIED;
20    ///Idiomatic alias for [`Self::PRIVATE`]; `Debug` prints the variant name.
21    #[allow(non_upper_case_globals)]
22    pub const Private: Self = Self::PRIVATE;
23    ///Idiomatic alias for [`Self::PUBLIC`]; `Debug` prints the variant name.
24    #[allow(non_upper_case_globals)]
25    pub const Public: Self = Self::PUBLIC;
26    ///Idiomatic alias for [`Self::FOLLOWERS`]; `Debug` prints the variant name.
27    #[allow(non_upper_case_globals)]
28    pub const Followers: Self = Self::FOLLOWERS;
29}
30impl ::core::default::Default for BoardAudience {
31    fn default() -> Self {
32        Self::AUDIENCE_UNSPECIFIED
33    }
34}
35impl ::serde::Serialize for BoardAudience {
36    fn serialize<S: ::serde::Serializer>(
37        &self,
38        s: S,
39    ) -> ::core::result::Result<S::Ok, S::Error> {
40        s.serialize_str(::buffa::Enumeration::proto_name(self))
41    }
42}
43impl<'de> ::serde::Deserialize<'de> for BoardAudience {
44    fn deserialize<D: ::serde::Deserializer<'de>>(
45        d: D,
46    ) -> ::core::result::Result<Self, D::Error> {
47        struct _V;
48        impl ::serde::de::Visitor<'_> for _V {
49            type Value = BoardAudience;
50            fn expecting(
51                &self,
52                f: &mut ::core::fmt::Formatter<'_>,
53            ) -> ::core::fmt::Result {
54                f.write_str(
55                    concat!("a string, integer, or null for ", stringify!(BoardAudience)),
56                )
57            }
58            fn visit_str<E: ::serde::de::Error>(
59                self,
60                v: &str,
61            ) -> ::core::result::Result<BoardAudience, E> {
62                <BoardAudience as ::buffa::Enumeration>::from_proto_name(v)
63                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
64            }
65            fn visit_i64<E: ::serde::de::Error>(
66                self,
67                v: i64,
68            ) -> ::core::result::Result<BoardAudience, E> {
69                let v32 = i32::try_from(v)
70                    .map_err(|_| {
71                        ::serde::de::Error::custom(
72                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
73                        )
74                    })?;
75                <BoardAudience as ::buffa::Enumeration>::from_i32(v32)
76                    .ok_or_else(|| {
77                        ::serde::de::Error::custom(
78                            ::buffa::alloc::format!("unknown enum value {v32}"),
79                        )
80                    })
81            }
82            fn visit_u64<E: ::serde::de::Error>(
83                self,
84                v: u64,
85            ) -> ::core::result::Result<BoardAudience, E> {
86                let v32 = i32::try_from(v)
87                    .map_err(|_| {
88                        ::serde::de::Error::custom(
89                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
90                        )
91                    })?;
92                <BoardAudience as ::buffa::Enumeration>::from_i32(v32)
93                    .ok_or_else(|| {
94                        ::serde::de::Error::custom(
95                            ::buffa::alloc::format!("unknown enum value {v32}"),
96                        )
97                    })
98            }
99            fn visit_unit<E: ::serde::de::Error>(
100                self,
101            ) -> ::core::result::Result<BoardAudience, E> {
102                ::core::result::Result::Ok(::core::default::Default::default())
103            }
104        }
105        d.deserialize_any(_V)
106    }
107}
108impl ::buffa::json_helpers::ProtoElemJson for BoardAudience {
109    fn serialize_proto_json<S: ::serde::Serializer>(
110        v: &Self,
111        s: S,
112    ) -> ::core::result::Result<S::Ok, S::Error> {
113        ::serde::Serialize::serialize(v, s)
114    }
115    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
116        d: D,
117    ) -> ::core::result::Result<Self, D::Error> {
118        <Self as ::serde::Deserialize>::deserialize(d)
119    }
120}
121impl ::buffa::Enumeration for BoardAudience {
122    fn from_i32(value: i32) -> ::core::option::Option<Self> {
123        match value {
124            0i32 => ::core::option::Option::Some(Self::AUDIENCE_UNSPECIFIED),
125            1i32 => ::core::option::Option::Some(Self::PRIVATE),
126            2i32 => ::core::option::Option::Some(Self::PUBLIC),
127            3i32 => ::core::option::Option::Some(Self::FOLLOWERS),
128            _ => ::core::option::Option::None,
129        }
130    }
131    fn to_i32(&self) -> i32 {
132        *self as i32
133    }
134    fn proto_name(&self) -> &'static str {
135        match self {
136            Self::AUDIENCE_UNSPECIFIED => "AUDIENCE_UNSPECIFIED",
137            Self::PRIVATE => "PRIVATE",
138            Self::PUBLIC => "PUBLIC",
139            Self::FOLLOWERS => "FOLLOWERS",
140        }
141    }
142    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
143        match name {
144            "AUDIENCE_UNSPECIFIED" => {
145                ::core::option::Option::Some(Self::AUDIENCE_UNSPECIFIED)
146            }
147            "PRIVATE" => ::core::option::Option::Some(Self::PRIVATE),
148            "PUBLIC" => ::core::option::Option::Some(Self::PUBLIC),
149            "FOLLOWERS" => ::core::option::Option::Some(Self::FOLLOWERS),
150            _ => ::core::option::Option::None,
151        }
152    }
153    fn values() -> &'static [Self] {
154        &[Self::AUDIENCE_UNSPECIFIED, Self::PRIVATE, Self::PUBLIC, Self::FOLLOWERS]
155    }
156}
157/// BoardRole is the resolved capability level for a caller on a board.
158#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
159#[repr(i32)]
160pub enum BoardRole {
161    /// Role is not specified, which means the caller has no board access.
162    ROLE_UNSPECIFIED = 0i32,
163    /// Viewer can read board metadata and join the room as read-only.
164    VIEWER = 1i32,
165    /// Editor can view and edit board content in the room.
166    EDITOR = 2i32,
167    /// Owner can view, edit, archive, and manage sharing settings.
168    OWNER = 3i32,
169}
170impl BoardRole {
171    ///Idiomatic alias for [`Self::ROLE_UNSPECIFIED`]; `Debug` prints the variant name.
172    #[allow(non_upper_case_globals)]
173    pub const RoleUnspecified: Self = Self::ROLE_UNSPECIFIED;
174    ///Idiomatic alias for [`Self::VIEWER`]; `Debug` prints the variant name.
175    #[allow(non_upper_case_globals)]
176    pub const Viewer: Self = Self::VIEWER;
177    ///Idiomatic alias for [`Self::EDITOR`]; `Debug` prints the variant name.
178    #[allow(non_upper_case_globals)]
179    pub const Editor: Self = Self::EDITOR;
180    ///Idiomatic alias for [`Self::OWNER`]; `Debug` prints the variant name.
181    #[allow(non_upper_case_globals)]
182    pub const Owner: Self = Self::OWNER;
183}
184impl ::core::default::Default for BoardRole {
185    fn default() -> Self {
186        Self::ROLE_UNSPECIFIED
187    }
188}
189impl ::serde::Serialize for BoardRole {
190    fn serialize<S: ::serde::Serializer>(
191        &self,
192        s: S,
193    ) -> ::core::result::Result<S::Ok, S::Error> {
194        s.serialize_str(::buffa::Enumeration::proto_name(self))
195    }
196}
197impl<'de> ::serde::Deserialize<'de> for BoardRole {
198    fn deserialize<D: ::serde::Deserializer<'de>>(
199        d: D,
200    ) -> ::core::result::Result<Self, D::Error> {
201        struct _V;
202        impl ::serde::de::Visitor<'_> for _V {
203            type Value = BoardRole;
204            fn expecting(
205                &self,
206                f: &mut ::core::fmt::Formatter<'_>,
207            ) -> ::core::fmt::Result {
208                f.write_str(
209                    concat!("a string, integer, or null for ", stringify!(BoardRole)),
210                )
211            }
212            fn visit_str<E: ::serde::de::Error>(
213                self,
214                v: &str,
215            ) -> ::core::result::Result<BoardRole, E> {
216                <BoardRole as ::buffa::Enumeration>::from_proto_name(v)
217                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
218            }
219            fn visit_i64<E: ::serde::de::Error>(
220                self,
221                v: i64,
222            ) -> ::core::result::Result<BoardRole, E> {
223                let v32 = i32::try_from(v)
224                    .map_err(|_| {
225                        ::serde::de::Error::custom(
226                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
227                        )
228                    })?;
229                <BoardRole as ::buffa::Enumeration>::from_i32(v32)
230                    .ok_or_else(|| {
231                        ::serde::de::Error::custom(
232                            ::buffa::alloc::format!("unknown enum value {v32}"),
233                        )
234                    })
235            }
236            fn visit_u64<E: ::serde::de::Error>(
237                self,
238                v: u64,
239            ) -> ::core::result::Result<BoardRole, E> {
240                let v32 = i32::try_from(v)
241                    .map_err(|_| {
242                        ::serde::de::Error::custom(
243                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
244                        )
245                    })?;
246                <BoardRole as ::buffa::Enumeration>::from_i32(v32)
247                    .ok_or_else(|| {
248                        ::serde::de::Error::custom(
249                            ::buffa::alloc::format!("unknown enum value {v32}"),
250                        )
251                    })
252            }
253            fn visit_unit<E: ::serde::de::Error>(
254                self,
255            ) -> ::core::result::Result<BoardRole, E> {
256                ::core::result::Result::Ok(::core::default::Default::default())
257            }
258        }
259        d.deserialize_any(_V)
260    }
261}
262impl ::buffa::json_helpers::ProtoElemJson for BoardRole {
263    fn serialize_proto_json<S: ::serde::Serializer>(
264        v: &Self,
265        s: S,
266    ) -> ::core::result::Result<S::Ok, S::Error> {
267        ::serde::Serialize::serialize(v, s)
268    }
269    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
270        d: D,
271    ) -> ::core::result::Result<Self, D::Error> {
272        <Self as ::serde::Deserialize>::deserialize(d)
273    }
274}
275impl ::buffa::Enumeration for BoardRole {
276    fn from_i32(value: i32) -> ::core::option::Option<Self> {
277        match value {
278            0i32 => ::core::option::Option::Some(Self::ROLE_UNSPECIFIED),
279            1i32 => ::core::option::Option::Some(Self::VIEWER),
280            2i32 => ::core::option::Option::Some(Self::EDITOR),
281            3i32 => ::core::option::Option::Some(Self::OWNER),
282            _ => ::core::option::Option::None,
283        }
284    }
285    fn to_i32(&self) -> i32 {
286        *self as i32
287    }
288    fn proto_name(&self) -> &'static str {
289        match self {
290            Self::ROLE_UNSPECIFIED => "ROLE_UNSPECIFIED",
291            Self::VIEWER => "VIEWER",
292            Self::EDITOR => "EDITOR",
293            Self::OWNER => "OWNER",
294        }
295    }
296    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
297        match name {
298            "ROLE_UNSPECIFIED" => ::core::option::Option::Some(Self::ROLE_UNSPECIFIED),
299            "VIEWER" => ::core::option::Option::Some(Self::VIEWER),
300            "EDITOR" => ::core::option::Option::Some(Self::EDITOR),
301            "OWNER" => ::core::option::Option::Some(Self::OWNER),
302            _ => ::core::option::Option::None,
303        }
304    }
305    fn values() -> &'static [Self] {
306        &[Self::ROLE_UNSPECIFIED, Self::VIEWER, Self::EDITOR, Self::OWNER]
307    }
308}
309/// BoardAclSubjectType identifies the explicit ACL subject domain.
310#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
311#[repr(i32)]
312pub enum BoardAclSubjectType {
313    /// ACL subject type is not specified.
314    SUBJECT_TYPE_UNSPECIFIED = 0i32,
315    /// ACL entry applies to one account.
316    USER_SUBJECT = 1i32,
317    /// ACL entry applies to one collaboration group.
318    GROUP_SUBJECT = 2i32,
319}
320impl BoardAclSubjectType {
321    ///Idiomatic alias for [`Self::SUBJECT_TYPE_UNSPECIFIED`]; `Debug` prints the variant name.
322    #[allow(non_upper_case_globals)]
323    pub const SubjectTypeUnspecified: Self = Self::SUBJECT_TYPE_UNSPECIFIED;
324    ///Idiomatic alias for [`Self::USER_SUBJECT`]; `Debug` prints the variant name.
325    #[allow(non_upper_case_globals)]
326    pub const UserSubject: Self = Self::USER_SUBJECT;
327    ///Idiomatic alias for [`Self::GROUP_SUBJECT`]; `Debug` prints the variant name.
328    #[allow(non_upper_case_globals)]
329    pub const GroupSubject: Self = Self::GROUP_SUBJECT;
330}
331impl ::core::default::Default for BoardAclSubjectType {
332    fn default() -> Self {
333        Self::SUBJECT_TYPE_UNSPECIFIED
334    }
335}
336impl ::serde::Serialize for BoardAclSubjectType {
337    fn serialize<S: ::serde::Serializer>(
338        &self,
339        s: S,
340    ) -> ::core::result::Result<S::Ok, S::Error> {
341        s.serialize_str(::buffa::Enumeration::proto_name(self))
342    }
343}
344impl<'de> ::serde::Deserialize<'de> for BoardAclSubjectType {
345    fn deserialize<D: ::serde::Deserializer<'de>>(
346        d: D,
347    ) -> ::core::result::Result<Self, D::Error> {
348        struct _V;
349        impl ::serde::de::Visitor<'_> for _V {
350            type Value = BoardAclSubjectType;
351            fn expecting(
352                &self,
353                f: &mut ::core::fmt::Formatter<'_>,
354            ) -> ::core::fmt::Result {
355                f.write_str(
356                    concat!(
357                        "a string, integer, or null for ",
358                        stringify!(BoardAclSubjectType)
359                    ),
360                )
361            }
362            fn visit_str<E: ::serde::de::Error>(
363                self,
364                v: &str,
365            ) -> ::core::result::Result<BoardAclSubjectType, E> {
366                <BoardAclSubjectType as ::buffa::Enumeration>::from_proto_name(v)
367                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
368            }
369            fn visit_i64<E: ::serde::de::Error>(
370                self,
371                v: i64,
372            ) -> ::core::result::Result<BoardAclSubjectType, E> {
373                let v32 = i32::try_from(v)
374                    .map_err(|_| {
375                        ::serde::de::Error::custom(
376                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
377                        )
378                    })?;
379                <BoardAclSubjectType as ::buffa::Enumeration>::from_i32(v32)
380                    .ok_or_else(|| {
381                        ::serde::de::Error::custom(
382                            ::buffa::alloc::format!("unknown enum value {v32}"),
383                        )
384                    })
385            }
386            fn visit_u64<E: ::serde::de::Error>(
387                self,
388                v: u64,
389            ) -> ::core::result::Result<BoardAclSubjectType, E> {
390                let v32 = i32::try_from(v)
391                    .map_err(|_| {
392                        ::serde::de::Error::custom(
393                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
394                        )
395                    })?;
396                <BoardAclSubjectType as ::buffa::Enumeration>::from_i32(v32)
397                    .ok_or_else(|| {
398                        ::serde::de::Error::custom(
399                            ::buffa::alloc::format!("unknown enum value {v32}"),
400                        )
401                    })
402            }
403            fn visit_unit<E: ::serde::de::Error>(
404                self,
405            ) -> ::core::result::Result<BoardAclSubjectType, E> {
406                ::core::result::Result::Ok(::core::default::Default::default())
407            }
408        }
409        d.deserialize_any(_V)
410    }
411}
412impl ::buffa::json_helpers::ProtoElemJson for BoardAclSubjectType {
413    fn serialize_proto_json<S: ::serde::Serializer>(
414        v: &Self,
415        s: S,
416    ) -> ::core::result::Result<S::Ok, S::Error> {
417        ::serde::Serialize::serialize(v, s)
418    }
419    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
420        d: D,
421    ) -> ::core::result::Result<Self, D::Error> {
422        <Self as ::serde::Deserialize>::deserialize(d)
423    }
424}
425impl ::buffa::Enumeration for BoardAclSubjectType {
426    fn from_i32(value: i32) -> ::core::option::Option<Self> {
427        match value {
428            0i32 => ::core::option::Option::Some(Self::SUBJECT_TYPE_UNSPECIFIED),
429            1i32 => ::core::option::Option::Some(Self::USER_SUBJECT),
430            2i32 => ::core::option::Option::Some(Self::GROUP_SUBJECT),
431            _ => ::core::option::Option::None,
432        }
433    }
434    fn to_i32(&self) -> i32 {
435        *self as i32
436    }
437    fn proto_name(&self) -> &'static str {
438        match self {
439            Self::SUBJECT_TYPE_UNSPECIFIED => "SUBJECT_TYPE_UNSPECIFIED",
440            Self::USER_SUBJECT => "USER_SUBJECT",
441            Self::GROUP_SUBJECT => "GROUP_SUBJECT",
442        }
443    }
444    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
445        match name {
446            "SUBJECT_TYPE_UNSPECIFIED" => {
447                ::core::option::Option::Some(Self::SUBJECT_TYPE_UNSPECIFIED)
448            }
449            "USER_SUBJECT" => ::core::option::Option::Some(Self::USER_SUBJECT),
450            "GROUP_SUBJECT" => ::core::option::Option::Some(Self::GROUP_SUBJECT),
451            _ => ::core::option::Option::None,
452        }
453    }
454    fn values() -> &'static [Self] {
455        &[Self::SUBJECT_TYPE_UNSPECIFIED, Self::USER_SUBJECT, Self::GROUP_SUBJECT]
456    }
457}
458/// BoardAclEntry grants a role to one explicit ACL subject.
459#[derive(Clone, PartialEq, Default)]
460#[derive(::serde::Serialize, ::serde::Deserialize)]
461#[serde(default)]
462pub struct BoardAclEntry {
463    /// Subject domain for the ACL row.
464    ///
465    /// Field 1: `subject_type`
466    #[serde(
467        rename = "subjectType",
468        alias = "subject_type",
469        with = "::buffa::json_helpers::proto_enum",
470        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
471    )]
472    pub subject_type: ::buffa::EnumValue<BoardAclSubjectType>,
473    /// Subject public ID. For USER_SUBJECT this is an account ID; for GROUP_SUBJECT this is a group ID.
474    ///
475    /// Field 2: `subject_id`
476    #[serde(
477        rename = "subjectId",
478        alias = "subject_id",
479        with = "::buffa::json_helpers::uint64",
480        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
481    )]
482    pub subject_id: u64,
483    /// Granted role for the subject. Only VIEWER and EDITOR are valid ACL roles.
484    ///
485    /// Field 3: `role`
486    #[serde(
487        rename = "role",
488        with = "::buffa::json_helpers::proto_enum",
489        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
490    )]
491    pub role: ::buffa::EnumValue<BoardRole>,
492    #[serde(skip)]
493    #[doc(hidden)]
494    pub __buffa_unknown_fields: ::buffa::UnknownFields,
495}
496impl ::core::fmt::Debug for BoardAclEntry {
497    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
498        f.debug_struct("BoardAclEntry")
499            .field("subject_type", &self.subject_type)
500            .field("subject_id", &self.subject_id)
501            .field("role", &self.role)
502            .finish()
503    }
504}
505impl BoardAclEntry {
506    /// Protobuf type URL for this message, for use with `Any::pack` and
507    /// `Any::unpack_if`.
508    ///
509    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
510    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardAclEntry";
511}
512::buffa::impl_default_instance!(BoardAclEntry);
513impl ::buffa::MessageName for BoardAclEntry {
514    const PACKAGE: &'static str = "collab.v1";
515    const NAME: &'static str = "BoardAclEntry";
516    const FULL_NAME: &'static str = "collab.v1.BoardAclEntry";
517    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardAclEntry";
518}
519impl ::buffa::Message for BoardAclEntry {
520    /// Returns the total encoded size in bytes.
521    ///
522    /// The result is a `u32`; the protobuf specification requires all
523    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
524    /// compliant message will never overflow this type.
525    #[allow(clippy::let_and_return)]
526    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
527        #[allow(unused_imports)]
528        use ::buffa::Enumeration as _;
529        let mut size = 0u32;
530        {
531            let val = self.subject_type.to_i32();
532            if val != 0 {
533                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
534            }
535        }
536        if self.subject_id != 0u64 {
537            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
538        }
539        {
540            let val = self.role.to_i32();
541            if val != 0 {
542                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
543            }
544        }
545        size += self.__buffa_unknown_fields.encoded_len() as u32;
546        size
547    }
548    fn write_to(
549        &self,
550        _cache: &mut ::buffa::SizeCache,
551        buf: &mut impl ::buffa::bytes::BufMut,
552    ) {
553        #[allow(unused_imports)]
554        use ::buffa::Enumeration as _;
555        {
556            let val = self.subject_type.to_i32();
557            if val != 0 {
558                ::buffa::types::put_int32_field(1u32, val, buf);
559            }
560        }
561        if self.subject_id != 0u64 {
562            ::buffa::types::put_fixed64_field(2u32, self.subject_id, buf);
563        }
564        {
565            let val = self.role.to_i32();
566            if val != 0 {
567                ::buffa::types::put_int32_field(3u32, val, buf);
568            }
569        }
570        self.__buffa_unknown_fields.write_to(buf);
571    }
572    fn merge_field(
573        &mut self,
574        tag: ::buffa::encoding::Tag,
575        buf: &mut impl ::buffa::bytes::Buf,
576        ctx: ::buffa::DecodeContext<'_>,
577    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
578        #[allow(unused_imports)]
579        use ::buffa::bytes::Buf as _;
580        #[allow(unused_imports)]
581        use ::buffa::Enumeration as _;
582        match tag.field_number() {
583            1u32 => {
584                ::buffa::encoding::check_wire_type(
585                    tag,
586                    ::buffa::encoding::WireType::Varint,
587                )?;
588                self.subject_type = ::buffa::EnumValue::from(
589                    ::buffa::types::decode_int32(buf)?,
590                );
591            }
592            2u32 => {
593                ::buffa::encoding::check_wire_type(
594                    tag,
595                    ::buffa::encoding::WireType::Fixed64,
596                )?;
597                self.subject_id = ::buffa::types::decode_fixed64(buf)?;
598            }
599            3u32 => {
600                ::buffa::encoding::check_wire_type(
601                    tag,
602                    ::buffa::encoding::WireType::Varint,
603                )?;
604                self.role = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
605            }
606            _ => {
607                self.__buffa_unknown_fields
608                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
609            }
610        }
611        ::core::result::Result::Ok(())
612    }
613    fn clear(&mut self) {
614        self.subject_type = ::buffa::EnumValue::from(0);
615        self.subject_id = 0u64;
616        self.role = ::buffa::EnumValue::from(0);
617        self.__buffa_unknown_fields.clear();
618    }
619}
620impl ::buffa::ExtensionSet for BoardAclEntry {
621    const PROTO_FQN: &'static str = "collab.v1.BoardAclEntry";
622    fn unknown_fields(&self) -> &::buffa::UnknownFields {
623        &self.__buffa_unknown_fields
624    }
625    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
626        &mut self.__buffa_unknown_fields
627    }
628}
629impl ::buffa::json_helpers::ProtoElemJson for BoardAclEntry {
630    fn serialize_proto_json<S: ::serde::Serializer>(
631        v: &Self,
632        s: S,
633    ) -> ::core::result::Result<S::Ok, S::Error> {
634        ::serde::Serialize::serialize(v, s)
635    }
636    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
637        d: D,
638    ) -> ::core::result::Result<Self, D::Error> {
639        <Self as ::serde::Deserialize>::deserialize(d)
640    }
641}
642#[doc(hidden)]
643pub const __BOARD_ACL_ENTRY_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
644    type_url: "type.googleapis.com/collab.v1.BoardAclEntry",
645    to_json: ::buffa::type_registry::any_to_json::<BoardAclEntry>,
646    from_json: ::buffa::type_registry::any_from_json::<BoardAclEntry>,
647    is_wkt: false,
648};
649/// BoardPermissions is the resolved permission set for the caller.
650#[derive(Clone, PartialEq, Default)]
651#[derive(::serde::Serialize, ::serde::Deserialize)]
652#[serde(default)]
653pub struct BoardPermissions {
654    /// Whether the caller may view metadata and join the room.
655    ///
656    /// Field 1: `can_view`
657    #[serde(
658        rename = "canView",
659        alias = "can_view",
660        with = "::buffa::json_helpers::proto_bool",
661        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
662    )]
663    pub can_view: bool,
664    /// Whether the caller may edit board content in the room.
665    ///
666    /// Field 2: `can_edit`
667    #[serde(
668        rename = "canEdit",
669        alias = "can_edit",
670        with = "::buffa::json_helpers::proto_bool",
671        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
672    )]
673    pub can_edit: bool,
674    /// Whether the caller may manage sharing and board settings.
675    ///
676    /// Field 3: `can_manage`
677    #[serde(
678        rename = "canManage",
679        alias = "can_manage",
680        with = "::buffa::json_helpers::proto_bool",
681        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
682    )]
683    pub can_manage: bool,
684    #[serde(skip)]
685    #[doc(hidden)]
686    pub __buffa_unknown_fields: ::buffa::UnknownFields,
687}
688impl ::core::fmt::Debug for BoardPermissions {
689    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
690        f.debug_struct("BoardPermissions")
691            .field("can_view", &self.can_view)
692            .field("can_edit", &self.can_edit)
693            .field("can_manage", &self.can_manage)
694            .finish()
695    }
696}
697impl BoardPermissions {
698    /// Protobuf type URL for this message, for use with `Any::pack` and
699    /// `Any::unpack_if`.
700    ///
701    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
702    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardPermissions";
703}
704::buffa::impl_default_instance!(BoardPermissions);
705impl ::buffa::MessageName for BoardPermissions {
706    const PACKAGE: &'static str = "collab.v1";
707    const NAME: &'static str = "BoardPermissions";
708    const FULL_NAME: &'static str = "collab.v1.BoardPermissions";
709    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardPermissions";
710}
711impl ::buffa::Message for BoardPermissions {
712    /// Returns the total encoded size in bytes.
713    ///
714    /// The result is a `u32`; the protobuf specification requires all
715    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
716    /// compliant message will never overflow this type.
717    #[allow(clippy::let_and_return)]
718    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
719        #[allow(unused_imports)]
720        use ::buffa::Enumeration as _;
721        let mut size = 0u32;
722        if self.can_view {
723            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
724        }
725        if self.can_edit {
726            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
727        }
728        if self.can_manage {
729            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
730        }
731        size += self.__buffa_unknown_fields.encoded_len() as u32;
732        size
733    }
734    fn write_to(
735        &self,
736        _cache: &mut ::buffa::SizeCache,
737        buf: &mut impl ::buffa::bytes::BufMut,
738    ) {
739        #[allow(unused_imports)]
740        use ::buffa::Enumeration as _;
741        if self.can_view {
742            ::buffa::types::put_bool_field(1u32, self.can_view, buf);
743        }
744        if self.can_edit {
745            ::buffa::types::put_bool_field(2u32, self.can_edit, buf);
746        }
747        if self.can_manage {
748            ::buffa::types::put_bool_field(3u32, self.can_manage, buf);
749        }
750        self.__buffa_unknown_fields.write_to(buf);
751    }
752    fn merge_field(
753        &mut self,
754        tag: ::buffa::encoding::Tag,
755        buf: &mut impl ::buffa::bytes::Buf,
756        ctx: ::buffa::DecodeContext<'_>,
757    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
758        #[allow(unused_imports)]
759        use ::buffa::bytes::Buf as _;
760        #[allow(unused_imports)]
761        use ::buffa::Enumeration as _;
762        match tag.field_number() {
763            1u32 => {
764                ::buffa::encoding::check_wire_type(
765                    tag,
766                    ::buffa::encoding::WireType::Varint,
767                )?;
768                self.can_view = ::buffa::types::decode_bool(buf)?;
769            }
770            2u32 => {
771                ::buffa::encoding::check_wire_type(
772                    tag,
773                    ::buffa::encoding::WireType::Varint,
774                )?;
775                self.can_edit = ::buffa::types::decode_bool(buf)?;
776            }
777            3u32 => {
778                ::buffa::encoding::check_wire_type(
779                    tag,
780                    ::buffa::encoding::WireType::Varint,
781                )?;
782                self.can_manage = ::buffa::types::decode_bool(buf)?;
783            }
784            _ => {
785                self.__buffa_unknown_fields
786                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
787            }
788        }
789        ::core::result::Result::Ok(())
790    }
791    fn clear(&mut self) {
792        self.can_view = false;
793        self.can_edit = false;
794        self.can_manage = false;
795        self.__buffa_unknown_fields.clear();
796    }
797}
798impl ::buffa::ExtensionSet for BoardPermissions {
799    const PROTO_FQN: &'static str = "collab.v1.BoardPermissions";
800    fn unknown_fields(&self) -> &::buffa::UnknownFields {
801        &self.__buffa_unknown_fields
802    }
803    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
804        &mut self.__buffa_unknown_fields
805    }
806}
807impl ::buffa::json_helpers::ProtoElemJson for BoardPermissions {
808    fn serialize_proto_json<S: ::serde::Serializer>(
809        v: &Self,
810        s: S,
811    ) -> ::core::result::Result<S::Ok, S::Error> {
812        ::serde::Serialize::serialize(v, s)
813    }
814    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
815        d: D,
816    ) -> ::core::result::Result<Self, D::Error> {
817        <Self as ::serde::Deserialize>::deserialize(d)
818    }
819}
820#[doc(hidden)]
821pub const __BOARD_PERMISSIONS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
822    type_url: "type.googleapis.com/collab.v1.BoardPermissions",
823    to_json: ::buffa::type_registry::any_to_json::<BoardPermissions>,
824    from_json: ::buffa::type_registry::any_from_json::<BoardPermissions>,
825    is_wkt: false,
826};
827/// BoardAccess is the resolved caller access for a board.
828/// Access resolution prefers owner, explicit user ACL, explicit group ACL, then audience policy.
829#[derive(Clone, PartialEq, Default)]
830#[derive(::serde::Serialize, ::serde::Deserialize)]
831#[serde(default)]
832pub struct BoardAccess {
833    /// Highest resolved role for the caller.
834    ///
835    /// Field 1: `role`
836    #[serde(
837        rename = "role",
838        with = "::buffa::json_helpers::proto_enum",
839        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
840    )]
841    pub role: ::buffa::EnumValue<BoardRole>,
842    /// Expanded permission flags for the caller.
843    ///
844    /// Field 2: `permissions`
845    #[serde(
846        rename = "permissions",
847        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
848    )]
849    pub permissions: ::buffa::MessageField<BoardPermissions>,
850    #[serde(skip)]
851    #[doc(hidden)]
852    pub __buffa_unknown_fields: ::buffa::UnknownFields,
853}
854impl ::core::fmt::Debug for BoardAccess {
855    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
856        f.debug_struct("BoardAccess")
857            .field("role", &self.role)
858            .field("permissions", &self.permissions)
859            .finish()
860    }
861}
862impl BoardAccess {
863    /// Protobuf type URL for this message, for use with `Any::pack` and
864    /// `Any::unpack_if`.
865    ///
866    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
867    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardAccess";
868}
869::buffa::impl_default_instance!(BoardAccess);
870impl ::buffa::MessageName for BoardAccess {
871    const PACKAGE: &'static str = "collab.v1";
872    const NAME: &'static str = "BoardAccess";
873    const FULL_NAME: &'static str = "collab.v1.BoardAccess";
874    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardAccess";
875}
876impl ::buffa::Message for BoardAccess {
877    /// Returns the total encoded size in bytes.
878    ///
879    /// The result is a `u32`; the protobuf specification requires all
880    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
881    /// compliant message will never overflow this type.
882    #[allow(clippy::let_and_return)]
883    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
884        #[allow(unused_imports)]
885        use ::buffa::Enumeration as _;
886        let mut size = 0u32;
887        {
888            let val = self.role.to_i32();
889            if val != 0 {
890                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
891            }
892        }
893        if self.permissions.is_set() {
894            let __slot = __cache.reserve();
895            let inner_size = self.permissions.compute_size(__cache);
896            __cache.set(__slot, inner_size);
897            size
898                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
899                    + inner_size;
900        }
901        size += self.__buffa_unknown_fields.encoded_len() as u32;
902        size
903    }
904    fn write_to(
905        &self,
906        __cache: &mut ::buffa::SizeCache,
907        buf: &mut impl ::buffa::bytes::BufMut,
908    ) {
909        #[allow(unused_imports)]
910        use ::buffa::Enumeration as _;
911        {
912            let val = self.role.to_i32();
913            if val != 0 {
914                ::buffa::types::put_int32_field(1u32, val, buf);
915            }
916        }
917        if self.permissions.is_set() {
918            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
919            self.permissions.write_to(__cache, buf);
920        }
921        self.__buffa_unknown_fields.write_to(buf);
922    }
923    fn merge_field(
924        &mut self,
925        tag: ::buffa::encoding::Tag,
926        buf: &mut impl ::buffa::bytes::Buf,
927        ctx: ::buffa::DecodeContext<'_>,
928    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
929        #[allow(unused_imports)]
930        use ::buffa::bytes::Buf as _;
931        #[allow(unused_imports)]
932        use ::buffa::Enumeration as _;
933        match tag.field_number() {
934            1u32 => {
935                ::buffa::encoding::check_wire_type(
936                    tag,
937                    ::buffa::encoding::WireType::Varint,
938                )?;
939                self.role = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
940            }
941            2u32 => {
942                ::buffa::encoding::check_wire_type(
943                    tag,
944                    ::buffa::encoding::WireType::LengthDelimited,
945                )?;
946                ::buffa::Message::merge_length_delimited(
947                    self.permissions.get_or_insert_default(),
948                    buf,
949                    ctx,
950                )?;
951            }
952            _ => {
953                self.__buffa_unknown_fields
954                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
955            }
956        }
957        ::core::result::Result::Ok(())
958    }
959    fn clear(&mut self) {
960        self.role = ::buffa::EnumValue::from(0);
961        self.permissions = ::buffa::MessageField::none();
962        self.__buffa_unknown_fields.clear();
963    }
964}
965impl ::buffa::ExtensionSet for BoardAccess {
966    const PROTO_FQN: &'static str = "collab.v1.BoardAccess";
967    fn unknown_fields(&self) -> &::buffa::UnknownFields {
968        &self.__buffa_unknown_fields
969    }
970    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
971        &mut self.__buffa_unknown_fields
972    }
973}
974impl ::buffa::json_helpers::ProtoElemJson for BoardAccess {
975    fn serialize_proto_json<S: ::serde::Serializer>(
976        v: &Self,
977        s: S,
978    ) -> ::core::result::Result<S::Ok, S::Error> {
979        ::serde::Serialize::serialize(v, s)
980    }
981    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
982        d: D,
983    ) -> ::core::result::Result<Self, D::Error> {
984        <Self as ::serde::Deserialize>::deserialize(d)
985    }
986}
987#[doc(hidden)]
988pub const __BOARD_ACCESS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
989    type_url: "type.googleapis.com/collab.v1.BoardAccess",
990    to_json: ::buffa::type_registry::any_to_json::<BoardAccess>,
991    from_json: ::buffa::type_registry::any_from_json::<BoardAccess>,
992    is_wkt: false,
993};
994/// Board is the persisted metadata for a collaborative whiteboard.
995#[derive(Clone, PartialEq, Default)]
996#[derive(::serde::Serialize, ::serde::Deserialize)]
997#[serde(default)]
998pub struct Board {
999    /// Stable board identifier as a UUID string.
1000    ///
1001    /// Field 1: `board_id`
1002    #[serde(
1003        rename = "boardId",
1004        alias = "board_id",
1005        with = "::buffa::json_helpers::proto_string",
1006        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1007    )]
1008    pub board_id: ::buffa::alloc::string::String,
1009    /// Board owner account public ID.
1010    ///
1011    /// Field 2: `owner_account_id`
1012    #[serde(
1013        rename = "ownerAccountId",
1014        alias = "owner_account_id",
1015        with = "::buffa::json_helpers::uint64",
1016        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
1017    )]
1018    pub owner_account_id: u64,
1019    /// Human-readable board title, max 200 characters and 400 bytes.
1020    ///
1021    /// Field 3: `title`
1022    #[serde(
1023        rename = "title",
1024        with = "::buffa::json_helpers::proto_string",
1025        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1026    )]
1027    pub title: ::buffa::alloc::string::String,
1028    /// Default audience policy used when no explicit ACL entry matches.
1029    ///
1030    /// Field 4: `audience`
1031    #[serde(
1032        rename = "audience",
1033        with = "::buffa::json_helpers::proto_enum",
1034        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1035    )]
1036    pub audience: ::buffa::EnumValue<BoardAudience>,
1037    /// Default role granted by the audience policy. This is always VIEWER or EDITOR.
1038    ///
1039    /// Field 5: `default_role`
1040    #[serde(
1041        rename = "defaultRole",
1042        alias = "default_role",
1043        with = "::buffa::json_helpers::proto_enum",
1044        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1045    )]
1046    pub default_role: ::buffa::EnumValue<BoardRole>,
1047    /// Monotonic access version incremented when audience, default role, ACL, or archive state changes.
1048    ///
1049    /// Field 6: `access_version`
1050    #[serde(
1051        rename = "accessVersion",
1052        alias = "access_version",
1053        with = "::buffa::json_helpers::uint64",
1054        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
1055    )]
1056    pub access_version: u64,
1057    /// Optional initial document snapshot as a JSON object.
1058    ///
1059    /// Field 7: `initial_snapshot`
1060    #[serde(
1061        rename = "initialSnapshot",
1062        alias = "initial_snapshot",
1063        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1064    )]
1065    pub initial_snapshot: ::buffa::MessageField<::buffa_types::google::protobuf::Struct>,
1066    /// Creation time in UTC.
1067    ///
1068    /// Field 8: `created_at`
1069    #[serde(
1070        rename = "createdAt",
1071        alias = "created_at",
1072        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1073    )]
1074    pub created_at: ::buffa::MessageField<::buffa_types::google::protobuf::Timestamp>,
1075    /// Last update time in UTC.
1076    ///
1077    /// Field 9: `updated_at`
1078    #[serde(
1079        rename = "updatedAt",
1080        alias = "updated_at",
1081        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1082    )]
1083    pub updated_at: ::buffa::MessageField<::buffa_types::google::protobuf::Timestamp>,
1084    /// Archive time in UTC. Unset when the board is active.
1085    ///
1086    /// Field 10: `archived_at`
1087    #[serde(
1088        rename = "archivedAt",
1089        alias = "archived_at",
1090        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1091    )]
1092    pub archived_at: ::buffa::MessageField<::buffa_types::google::protobuf::Timestamp>,
1093    #[serde(skip)]
1094    #[doc(hidden)]
1095    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1096}
1097impl ::core::fmt::Debug for Board {
1098    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1099        f.debug_struct("Board")
1100            .field("board_id", &self.board_id)
1101            .field("owner_account_id", &self.owner_account_id)
1102            .field("title", &self.title)
1103            .field("audience", &self.audience)
1104            .field("default_role", &self.default_role)
1105            .field("access_version", &self.access_version)
1106            .field("initial_snapshot", &self.initial_snapshot)
1107            .field("created_at", &self.created_at)
1108            .field("updated_at", &self.updated_at)
1109            .field("archived_at", &self.archived_at)
1110            .finish()
1111    }
1112}
1113impl Board {
1114    /// Protobuf type URL for this message, for use with `Any::pack` and
1115    /// `Any::unpack_if`.
1116    ///
1117    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1118    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.Board";
1119}
1120::buffa::impl_default_instance!(Board);
1121impl ::buffa::MessageName for Board {
1122    const PACKAGE: &'static str = "collab.v1";
1123    const NAME: &'static str = "Board";
1124    const FULL_NAME: &'static str = "collab.v1.Board";
1125    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.Board";
1126}
1127impl ::buffa::Message for Board {
1128    /// Returns the total encoded size in bytes.
1129    ///
1130    /// The result is a `u32`; the protobuf specification requires all
1131    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1132    /// compliant message will never overflow this type.
1133    #[allow(clippy::let_and_return)]
1134    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1135        #[allow(unused_imports)]
1136        use ::buffa::Enumeration as _;
1137        let mut size = 0u32;
1138        if !self.board_id.is_empty() {
1139            size += 1u32 + ::buffa::types::string_encoded_len(&self.board_id) as u32;
1140        }
1141        if self.owner_account_id != 0u64 {
1142            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
1143        }
1144        if !self.title.is_empty() {
1145            size += 1u32 + ::buffa::types::string_encoded_len(&self.title) as u32;
1146        }
1147        {
1148            let val = self.audience.to_i32();
1149            if val != 0 {
1150                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1151            }
1152        }
1153        {
1154            let val = self.default_role.to_i32();
1155            if val != 0 {
1156                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1157            }
1158        }
1159        if self.access_version != 0u64 {
1160            size
1161                += 1u32 + ::buffa::types::uint64_encoded_len(self.access_version) as u32;
1162        }
1163        if self.initial_snapshot.is_set() {
1164            let __slot = __cache.reserve();
1165            let inner_size = self.initial_snapshot.compute_size(__cache);
1166            __cache.set(__slot, inner_size);
1167            size
1168                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1169                    + inner_size;
1170        }
1171        if self.created_at.is_set() {
1172            let __slot = __cache.reserve();
1173            let inner_size = self.created_at.compute_size(__cache);
1174            __cache.set(__slot, inner_size);
1175            size
1176                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1177                    + inner_size;
1178        }
1179        if self.updated_at.is_set() {
1180            let __slot = __cache.reserve();
1181            let inner_size = self.updated_at.compute_size(__cache);
1182            __cache.set(__slot, inner_size);
1183            size
1184                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1185                    + inner_size;
1186        }
1187        if self.archived_at.is_set() {
1188            let __slot = __cache.reserve();
1189            let inner_size = self.archived_at.compute_size(__cache);
1190            __cache.set(__slot, inner_size);
1191            size
1192                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1193                    + inner_size;
1194        }
1195        size += self.__buffa_unknown_fields.encoded_len() as u32;
1196        size
1197    }
1198    fn write_to(
1199        &self,
1200        __cache: &mut ::buffa::SizeCache,
1201        buf: &mut impl ::buffa::bytes::BufMut,
1202    ) {
1203        #[allow(unused_imports)]
1204        use ::buffa::Enumeration as _;
1205        if !self.board_id.is_empty() {
1206            ::buffa::types::put_string_field(1u32, &self.board_id, buf);
1207        }
1208        if self.owner_account_id != 0u64 {
1209            ::buffa::types::put_fixed64_field(2u32, self.owner_account_id, buf);
1210        }
1211        if !self.title.is_empty() {
1212            ::buffa::types::put_string_field(3u32, &self.title, buf);
1213        }
1214        {
1215            let val = self.audience.to_i32();
1216            if val != 0 {
1217                ::buffa::types::put_int32_field(4u32, val, buf);
1218            }
1219        }
1220        {
1221            let val = self.default_role.to_i32();
1222            if val != 0 {
1223                ::buffa::types::put_int32_field(5u32, val, buf);
1224            }
1225        }
1226        if self.access_version != 0u64 {
1227            ::buffa::types::put_uint64_field(6u32, self.access_version, buf);
1228        }
1229        if self.initial_snapshot.is_set() {
1230            ::buffa::types::put_len_delimited_header(7u32, __cache.consume_next(), buf);
1231            self.initial_snapshot.write_to(__cache, buf);
1232        }
1233        if self.created_at.is_set() {
1234            ::buffa::types::put_len_delimited_header(8u32, __cache.consume_next(), buf);
1235            self.created_at.write_to(__cache, buf);
1236        }
1237        if self.updated_at.is_set() {
1238            ::buffa::types::put_len_delimited_header(9u32, __cache.consume_next(), buf);
1239            self.updated_at.write_to(__cache, buf);
1240        }
1241        if self.archived_at.is_set() {
1242            ::buffa::types::put_len_delimited_header(10u32, __cache.consume_next(), buf);
1243            self.archived_at.write_to(__cache, buf);
1244        }
1245        self.__buffa_unknown_fields.write_to(buf);
1246    }
1247    fn merge_field(
1248        &mut self,
1249        tag: ::buffa::encoding::Tag,
1250        buf: &mut impl ::buffa::bytes::Buf,
1251        ctx: ::buffa::DecodeContext<'_>,
1252    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1253        #[allow(unused_imports)]
1254        use ::buffa::bytes::Buf as _;
1255        #[allow(unused_imports)]
1256        use ::buffa::Enumeration as _;
1257        match tag.field_number() {
1258            1u32 => {
1259                ::buffa::encoding::check_wire_type(
1260                    tag,
1261                    ::buffa::encoding::WireType::LengthDelimited,
1262                )?;
1263                ::buffa::types::merge_string(&mut self.board_id, buf)?;
1264            }
1265            2u32 => {
1266                ::buffa::encoding::check_wire_type(
1267                    tag,
1268                    ::buffa::encoding::WireType::Fixed64,
1269                )?;
1270                self.owner_account_id = ::buffa::types::decode_fixed64(buf)?;
1271            }
1272            3u32 => {
1273                ::buffa::encoding::check_wire_type(
1274                    tag,
1275                    ::buffa::encoding::WireType::LengthDelimited,
1276                )?;
1277                ::buffa::types::merge_string(&mut self.title, buf)?;
1278            }
1279            4u32 => {
1280                ::buffa::encoding::check_wire_type(
1281                    tag,
1282                    ::buffa::encoding::WireType::Varint,
1283                )?;
1284                self.audience = ::buffa::EnumValue::from(
1285                    ::buffa::types::decode_int32(buf)?,
1286                );
1287            }
1288            5u32 => {
1289                ::buffa::encoding::check_wire_type(
1290                    tag,
1291                    ::buffa::encoding::WireType::Varint,
1292                )?;
1293                self.default_role = ::buffa::EnumValue::from(
1294                    ::buffa::types::decode_int32(buf)?,
1295                );
1296            }
1297            6u32 => {
1298                ::buffa::encoding::check_wire_type(
1299                    tag,
1300                    ::buffa::encoding::WireType::Varint,
1301                )?;
1302                self.access_version = ::buffa::types::decode_uint64(buf)?;
1303            }
1304            7u32 => {
1305                ::buffa::encoding::check_wire_type(
1306                    tag,
1307                    ::buffa::encoding::WireType::LengthDelimited,
1308                )?;
1309                ::buffa::Message::merge_length_delimited(
1310                    self.initial_snapshot.get_or_insert_default(),
1311                    buf,
1312                    ctx,
1313                )?;
1314            }
1315            8u32 => {
1316                ::buffa::encoding::check_wire_type(
1317                    tag,
1318                    ::buffa::encoding::WireType::LengthDelimited,
1319                )?;
1320                ::buffa::Message::merge_length_delimited(
1321                    self.created_at.get_or_insert_default(),
1322                    buf,
1323                    ctx,
1324                )?;
1325            }
1326            9u32 => {
1327                ::buffa::encoding::check_wire_type(
1328                    tag,
1329                    ::buffa::encoding::WireType::LengthDelimited,
1330                )?;
1331                ::buffa::Message::merge_length_delimited(
1332                    self.updated_at.get_or_insert_default(),
1333                    buf,
1334                    ctx,
1335                )?;
1336            }
1337            10u32 => {
1338                ::buffa::encoding::check_wire_type(
1339                    tag,
1340                    ::buffa::encoding::WireType::LengthDelimited,
1341                )?;
1342                ::buffa::Message::merge_length_delimited(
1343                    self.archived_at.get_or_insert_default(),
1344                    buf,
1345                    ctx,
1346                )?;
1347            }
1348            _ => {
1349                self.__buffa_unknown_fields
1350                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1351            }
1352        }
1353        ::core::result::Result::Ok(())
1354    }
1355    fn clear(&mut self) {
1356        self.board_id.clear();
1357        self.owner_account_id = 0u64;
1358        self.title.clear();
1359        self.audience = ::buffa::EnumValue::from(0);
1360        self.default_role = ::buffa::EnumValue::from(0);
1361        self.access_version = 0u64;
1362        self.initial_snapshot = ::buffa::MessageField::none();
1363        self.created_at = ::buffa::MessageField::none();
1364        self.updated_at = ::buffa::MessageField::none();
1365        self.archived_at = ::buffa::MessageField::none();
1366        self.__buffa_unknown_fields.clear();
1367    }
1368}
1369impl ::buffa::ExtensionSet for Board {
1370    const PROTO_FQN: &'static str = "collab.v1.Board";
1371    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1372        &self.__buffa_unknown_fields
1373    }
1374    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1375        &mut self.__buffa_unknown_fields
1376    }
1377}
1378impl ::buffa::json_helpers::ProtoElemJson for Board {
1379    fn serialize_proto_json<S: ::serde::Serializer>(
1380        v: &Self,
1381        s: S,
1382    ) -> ::core::result::Result<S::Ok, S::Error> {
1383        ::serde::Serialize::serialize(v, s)
1384    }
1385    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1386        d: D,
1387    ) -> ::core::result::Result<Self, D::Error> {
1388        <Self as ::serde::Deserialize>::deserialize(d)
1389    }
1390}
1391#[doc(hidden)]
1392pub const __BOARD_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1393    type_url: "type.googleapis.com/collab.v1.Board",
1394    to_json: ::buffa::type_registry::any_to_json::<Board>,
1395    from_json: ::buffa::type_registry::any_from_json::<Board>,
1396    is_wkt: false,
1397};
1398/// BoardListItem is one visible board plus the caller's resolved access.
1399#[derive(Clone, PartialEq, Default)]
1400#[derive(::serde::Serialize, ::serde::Deserialize)]
1401#[serde(default)]
1402pub struct BoardListItem {
1403    /// Board metadata.
1404    ///
1405    /// Field 1: `board`
1406    #[serde(
1407        rename = "board",
1408        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1409    )]
1410    pub board: ::buffa::MessageField<Board>,
1411    /// Resolved access for the current caller.
1412    ///
1413    /// Field 2: `access`
1414    #[serde(
1415        rename = "access",
1416        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1417    )]
1418    pub access: ::buffa::MessageField<BoardAccess>,
1419    #[serde(skip)]
1420    #[doc(hidden)]
1421    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1422}
1423impl ::core::fmt::Debug for BoardListItem {
1424    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1425        f.debug_struct("BoardListItem")
1426            .field("board", &self.board)
1427            .field("access", &self.access)
1428            .finish()
1429    }
1430}
1431impl BoardListItem {
1432    /// Protobuf type URL for this message, for use with `Any::pack` and
1433    /// `Any::unpack_if`.
1434    ///
1435    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1436    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardListItem";
1437}
1438::buffa::impl_default_instance!(BoardListItem);
1439impl ::buffa::MessageName for BoardListItem {
1440    const PACKAGE: &'static str = "collab.v1";
1441    const NAME: &'static str = "BoardListItem";
1442    const FULL_NAME: &'static str = "collab.v1.BoardListItem";
1443    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardListItem";
1444}
1445impl ::buffa::Message for BoardListItem {
1446    /// Returns the total encoded size in bytes.
1447    ///
1448    /// The result is a `u32`; the protobuf specification requires all
1449    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1450    /// compliant message will never overflow this type.
1451    #[allow(clippy::let_and_return)]
1452    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1453        #[allow(unused_imports)]
1454        use ::buffa::Enumeration as _;
1455        let mut size = 0u32;
1456        if self.board.is_set() {
1457            let __slot = __cache.reserve();
1458            let inner_size = self.board.compute_size(__cache);
1459            __cache.set(__slot, inner_size);
1460            size
1461                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1462                    + inner_size;
1463        }
1464        if self.access.is_set() {
1465            let __slot = __cache.reserve();
1466            let inner_size = self.access.compute_size(__cache);
1467            __cache.set(__slot, inner_size);
1468            size
1469                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1470                    + inner_size;
1471        }
1472        size += self.__buffa_unknown_fields.encoded_len() as u32;
1473        size
1474    }
1475    fn write_to(
1476        &self,
1477        __cache: &mut ::buffa::SizeCache,
1478        buf: &mut impl ::buffa::bytes::BufMut,
1479    ) {
1480        #[allow(unused_imports)]
1481        use ::buffa::Enumeration as _;
1482        if self.board.is_set() {
1483            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
1484            self.board.write_to(__cache, buf);
1485        }
1486        if self.access.is_set() {
1487            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
1488            self.access.write_to(__cache, buf);
1489        }
1490        self.__buffa_unknown_fields.write_to(buf);
1491    }
1492    fn merge_field(
1493        &mut self,
1494        tag: ::buffa::encoding::Tag,
1495        buf: &mut impl ::buffa::bytes::Buf,
1496        ctx: ::buffa::DecodeContext<'_>,
1497    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1498        #[allow(unused_imports)]
1499        use ::buffa::bytes::Buf as _;
1500        #[allow(unused_imports)]
1501        use ::buffa::Enumeration as _;
1502        match tag.field_number() {
1503            1u32 => {
1504                ::buffa::encoding::check_wire_type(
1505                    tag,
1506                    ::buffa::encoding::WireType::LengthDelimited,
1507                )?;
1508                ::buffa::Message::merge_length_delimited(
1509                    self.board.get_or_insert_default(),
1510                    buf,
1511                    ctx,
1512                )?;
1513            }
1514            2u32 => {
1515                ::buffa::encoding::check_wire_type(
1516                    tag,
1517                    ::buffa::encoding::WireType::LengthDelimited,
1518                )?;
1519                ::buffa::Message::merge_length_delimited(
1520                    self.access.get_or_insert_default(),
1521                    buf,
1522                    ctx,
1523                )?;
1524            }
1525            _ => {
1526                self.__buffa_unknown_fields
1527                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1528            }
1529        }
1530        ::core::result::Result::Ok(())
1531    }
1532    fn clear(&mut self) {
1533        self.board = ::buffa::MessageField::none();
1534        self.access = ::buffa::MessageField::none();
1535        self.__buffa_unknown_fields.clear();
1536    }
1537}
1538impl ::buffa::ExtensionSet for BoardListItem {
1539    const PROTO_FQN: &'static str = "collab.v1.BoardListItem";
1540    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1541        &self.__buffa_unknown_fields
1542    }
1543    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1544        &mut self.__buffa_unknown_fields
1545    }
1546}
1547impl ::buffa::json_helpers::ProtoElemJson for BoardListItem {
1548    fn serialize_proto_json<S: ::serde::Serializer>(
1549        v: &Self,
1550        s: S,
1551    ) -> ::core::result::Result<S::Ok, S::Error> {
1552        ::serde::Serialize::serialize(v, s)
1553    }
1554    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1555        d: D,
1556    ) -> ::core::result::Result<Self, D::Error> {
1557        <Self as ::serde::Deserialize>::deserialize(d)
1558    }
1559}
1560#[doc(hidden)]
1561pub const __BOARD_LIST_ITEM_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1562    type_url: "type.googleapis.com/collab.v1.BoardListItem",
1563    to_json: ::buffa::type_registry::any_to_json::<BoardListItem>,
1564    from_json: ::buffa::type_registry::any_from_json::<BoardListItem>,
1565    is_wkt: false,
1566};
1567/// PresencePayload is a lightweight identity payload the client can reuse locally.
1568#[derive(Clone, PartialEq, Default)]
1569#[derive(::serde::Serialize, ::serde::Deserialize)]
1570#[serde(default)]
1571pub struct PresencePayload {
1572    /// Caller account public ID.
1573    ///
1574    /// Field 1: `account_id`
1575    #[serde(
1576        rename = "accountId",
1577        alias = "account_id",
1578        with = "::buffa::json_helpers::uint64",
1579        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
1580    )]
1581    pub account_id: u64,
1582    /// Resolved board role for this join.
1583    ///
1584    /// Field 2: `role`
1585    #[serde(
1586        rename = "role",
1587        with = "::buffa::json_helpers::proto_enum",
1588        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1589    )]
1590    pub role: ::buffa::EnumValue<BoardRole>,
1591    #[serde(skip)]
1592    #[doc(hidden)]
1593    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1594}
1595impl ::core::fmt::Debug for PresencePayload {
1596    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1597        f.debug_struct("PresencePayload")
1598            .field("account_id", &self.account_id)
1599            .field("role", &self.role)
1600            .finish()
1601    }
1602}
1603impl PresencePayload {
1604    /// Protobuf type URL for this message, for use with `Any::pack` and
1605    /// `Any::unpack_if`.
1606    ///
1607    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1608    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.PresencePayload";
1609}
1610::buffa::impl_default_instance!(PresencePayload);
1611impl ::buffa::MessageName for PresencePayload {
1612    const PACKAGE: &'static str = "collab.v1";
1613    const NAME: &'static str = "PresencePayload";
1614    const FULL_NAME: &'static str = "collab.v1.PresencePayload";
1615    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.PresencePayload";
1616}
1617impl ::buffa::Message for PresencePayload {
1618    /// Returns the total encoded size in bytes.
1619    ///
1620    /// The result is a `u32`; the protobuf specification requires all
1621    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1622    /// compliant message will never overflow this type.
1623    #[allow(clippy::let_and_return)]
1624    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1625        #[allow(unused_imports)]
1626        use ::buffa::Enumeration as _;
1627        let mut size = 0u32;
1628        if self.account_id != 0u64 {
1629            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
1630        }
1631        {
1632            let val = self.role.to_i32();
1633            if val != 0 {
1634                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1635            }
1636        }
1637        size += self.__buffa_unknown_fields.encoded_len() as u32;
1638        size
1639    }
1640    fn write_to(
1641        &self,
1642        _cache: &mut ::buffa::SizeCache,
1643        buf: &mut impl ::buffa::bytes::BufMut,
1644    ) {
1645        #[allow(unused_imports)]
1646        use ::buffa::Enumeration as _;
1647        if self.account_id != 0u64 {
1648            ::buffa::types::put_fixed64_field(1u32, self.account_id, buf);
1649        }
1650        {
1651            let val = self.role.to_i32();
1652            if val != 0 {
1653                ::buffa::types::put_int32_field(2u32, val, buf);
1654            }
1655        }
1656        self.__buffa_unknown_fields.write_to(buf);
1657    }
1658    fn merge_field(
1659        &mut self,
1660        tag: ::buffa::encoding::Tag,
1661        buf: &mut impl ::buffa::bytes::Buf,
1662        ctx: ::buffa::DecodeContext<'_>,
1663    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1664        #[allow(unused_imports)]
1665        use ::buffa::bytes::Buf as _;
1666        #[allow(unused_imports)]
1667        use ::buffa::Enumeration as _;
1668        match tag.field_number() {
1669            1u32 => {
1670                ::buffa::encoding::check_wire_type(
1671                    tag,
1672                    ::buffa::encoding::WireType::Fixed64,
1673                )?;
1674                self.account_id = ::buffa::types::decode_fixed64(buf)?;
1675            }
1676            2u32 => {
1677                ::buffa::encoding::check_wire_type(
1678                    tag,
1679                    ::buffa::encoding::WireType::Varint,
1680                )?;
1681                self.role = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
1682            }
1683            _ => {
1684                self.__buffa_unknown_fields
1685                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1686            }
1687        }
1688        ::core::result::Result::Ok(())
1689    }
1690    fn clear(&mut self) {
1691        self.account_id = 0u64;
1692        self.role = ::buffa::EnumValue::from(0);
1693        self.__buffa_unknown_fields.clear();
1694    }
1695}
1696impl ::buffa::ExtensionSet for PresencePayload {
1697    const PROTO_FQN: &'static str = "collab.v1.PresencePayload";
1698    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1699        &self.__buffa_unknown_fields
1700    }
1701    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1702        &mut self.__buffa_unknown_fields
1703    }
1704}
1705impl ::buffa::json_helpers::ProtoElemJson for PresencePayload {
1706    fn serialize_proto_json<S: ::serde::Serializer>(
1707        v: &Self,
1708        s: S,
1709    ) -> ::core::result::Result<S::Ok, S::Error> {
1710        ::serde::Serialize::serialize(v, s)
1711    }
1712    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1713        d: D,
1714    ) -> ::core::result::Result<Self, D::Error> {
1715        <Self as ::serde::Deserialize>::deserialize(d)
1716    }
1717}
1718#[doc(hidden)]
1719pub const __PRESENCE_PAYLOAD_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1720    type_url: "type.googleapis.com/collab.v1.PresencePayload",
1721    to_json: ::buffa::type_registry::any_to_json::<PresencePayload>,
1722    from_json: ::buffa::type_registry::any_from_json::<PresencePayload>,
1723    is_wkt: false,
1724};
1725/// CreateBoardRequest creates a new board owned by the caller.
1726#[derive(Clone, PartialEq, Default)]
1727#[derive(::serde::Serialize, ::serde::Deserialize)]
1728#[serde(default)]
1729pub struct CreateBoardRequest {
1730    /// Board title, max 200 characters and 400 bytes.
1731    ///
1732    /// Field 1: `title`
1733    #[serde(
1734        rename = "title",
1735        with = "::buffa::json_helpers::proto_string",
1736        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1737    )]
1738    pub title: ::buffa::alloc::string::String,
1739    /// Initial audience policy for the board.
1740    ///
1741    /// Field 2: `audience`
1742    #[serde(
1743        rename = "audience",
1744        with = "::buffa::json_helpers::proto_enum",
1745        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1746    )]
1747    pub audience: ::buffa::EnumValue<BoardAudience>,
1748    /// Default audience role for callers admitted by PUBLIC or FOLLOWERS audience policy.
1749    ///
1750    /// Field 3: `default_role`
1751    #[serde(
1752        rename = "defaultRole",
1753        alias = "default_role",
1754        with = "::buffa::json_helpers::proto_enum",
1755        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1756    )]
1757    pub default_role: ::buffa::EnumValue<BoardRole>,
1758    /// Optional explicit ACL entries created with the board, max 256 entries.
1759    ///
1760    /// Field 4: `acl_entries`
1761    #[serde(
1762        rename = "aclEntries",
1763        alias = "acl_entries",
1764        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1765        deserialize_with = "::buffa::json_helpers::null_as_default"
1766    )]
1767    pub acl_entries: ::buffa::alloc::vec::Vec<BoardAclEntry>,
1768    /// Optional initial document snapshot as a JSON object.
1769    ///
1770    /// Field 5: `initial_snapshot`
1771    #[serde(
1772        rename = "initialSnapshot",
1773        alias = "initial_snapshot",
1774        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1775    )]
1776    pub initial_snapshot: ::buffa::MessageField<::buffa_types::google::protobuf::Struct>,
1777    #[serde(skip)]
1778    #[doc(hidden)]
1779    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1780}
1781impl ::core::fmt::Debug for CreateBoardRequest {
1782    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1783        f.debug_struct("CreateBoardRequest")
1784            .field("title", &self.title)
1785            .field("audience", &self.audience)
1786            .field("default_role", &self.default_role)
1787            .field("acl_entries", &self.acl_entries)
1788            .field("initial_snapshot", &self.initial_snapshot)
1789            .finish()
1790    }
1791}
1792impl CreateBoardRequest {
1793    /// Protobuf type URL for this message, for use with `Any::pack` and
1794    /// `Any::unpack_if`.
1795    ///
1796    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1797    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.CreateBoardRequest";
1798}
1799::buffa::impl_default_instance!(CreateBoardRequest);
1800impl ::buffa::MessageName for CreateBoardRequest {
1801    const PACKAGE: &'static str = "collab.v1";
1802    const NAME: &'static str = "CreateBoardRequest";
1803    const FULL_NAME: &'static str = "collab.v1.CreateBoardRequest";
1804    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.CreateBoardRequest";
1805}
1806impl ::buffa::Message for CreateBoardRequest {
1807    /// Returns the total encoded size in bytes.
1808    ///
1809    /// The result is a `u32`; the protobuf specification requires all
1810    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1811    /// compliant message will never overflow this type.
1812    #[allow(clippy::let_and_return)]
1813    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1814        #[allow(unused_imports)]
1815        use ::buffa::Enumeration as _;
1816        let mut size = 0u32;
1817        if !self.title.is_empty() {
1818            size += 1u32 + ::buffa::types::string_encoded_len(&self.title) as u32;
1819        }
1820        {
1821            let val = self.audience.to_i32();
1822            if val != 0 {
1823                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1824            }
1825        }
1826        {
1827            let val = self.default_role.to_i32();
1828            if val != 0 {
1829                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1830            }
1831        }
1832        for v in &self.acl_entries {
1833            let __slot = __cache.reserve();
1834            let inner_size = v.compute_size(__cache);
1835            __cache.set(__slot, inner_size);
1836            size
1837                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1838                    + inner_size;
1839        }
1840        if self.initial_snapshot.is_set() {
1841            let __slot = __cache.reserve();
1842            let inner_size = self.initial_snapshot.compute_size(__cache);
1843            __cache.set(__slot, inner_size);
1844            size
1845                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1846                    + inner_size;
1847        }
1848        size += self.__buffa_unknown_fields.encoded_len() as u32;
1849        size
1850    }
1851    fn write_to(
1852        &self,
1853        __cache: &mut ::buffa::SizeCache,
1854        buf: &mut impl ::buffa::bytes::BufMut,
1855    ) {
1856        #[allow(unused_imports)]
1857        use ::buffa::Enumeration as _;
1858        if !self.title.is_empty() {
1859            ::buffa::types::put_string_field(1u32, &self.title, buf);
1860        }
1861        {
1862            let val = self.audience.to_i32();
1863            if val != 0 {
1864                ::buffa::types::put_int32_field(2u32, val, buf);
1865            }
1866        }
1867        {
1868            let val = self.default_role.to_i32();
1869            if val != 0 {
1870                ::buffa::types::put_int32_field(3u32, val, buf);
1871            }
1872        }
1873        for v in &self.acl_entries {
1874            ::buffa::types::put_len_delimited_header(4u32, __cache.consume_next(), buf);
1875            v.write_to(__cache, buf);
1876        }
1877        if self.initial_snapshot.is_set() {
1878            ::buffa::types::put_len_delimited_header(5u32, __cache.consume_next(), buf);
1879            self.initial_snapshot.write_to(__cache, buf);
1880        }
1881        self.__buffa_unknown_fields.write_to(buf);
1882    }
1883    fn merge_field(
1884        &mut self,
1885        tag: ::buffa::encoding::Tag,
1886        buf: &mut impl ::buffa::bytes::Buf,
1887        ctx: ::buffa::DecodeContext<'_>,
1888    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1889        #[allow(unused_imports)]
1890        use ::buffa::bytes::Buf as _;
1891        #[allow(unused_imports)]
1892        use ::buffa::Enumeration as _;
1893        match tag.field_number() {
1894            1u32 => {
1895                ::buffa::encoding::check_wire_type(
1896                    tag,
1897                    ::buffa::encoding::WireType::LengthDelimited,
1898                )?;
1899                ::buffa::types::merge_string(&mut self.title, buf)?;
1900            }
1901            2u32 => {
1902                ::buffa::encoding::check_wire_type(
1903                    tag,
1904                    ::buffa::encoding::WireType::Varint,
1905                )?;
1906                self.audience = ::buffa::EnumValue::from(
1907                    ::buffa::types::decode_int32(buf)?,
1908                );
1909            }
1910            3u32 => {
1911                ::buffa::encoding::check_wire_type(
1912                    tag,
1913                    ::buffa::encoding::WireType::Varint,
1914                )?;
1915                self.default_role = ::buffa::EnumValue::from(
1916                    ::buffa::types::decode_int32(buf)?,
1917                );
1918            }
1919            4u32 => {
1920                ::buffa::encoding::check_wire_type(
1921                    tag,
1922                    ::buffa::encoding::WireType::LengthDelimited,
1923                )?;
1924                let mut elem = ::core::default::Default::default();
1925                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
1926                self.acl_entries.push(elem);
1927            }
1928            5u32 => {
1929                ::buffa::encoding::check_wire_type(
1930                    tag,
1931                    ::buffa::encoding::WireType::LengthDelimited,
1932                )?;
1933                ::buffa::Message::merge_length_delimited(
1934                    self.initial_snapshot.get_or_insert_default(),
1935                    buf,
1936                    ctx,
1937                )?;
1938            }
1939            _ => {
1940                self.__buffa_unknown_fields
1941                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1942            }
1943        }
1944        ::core::result::Result::Ok(())
1945    }
1946    fn clear(&mut self) {
1947        self.title.clear();
1948        self.audience = ::buffa::EnumValue::from(0);
1949        self.default_role = ::buffa::EnumValue::from(0);
1950        self.acl_entries.clear();
1951        self.initial_snapshot = ::buffa::MessageField::none();
1952        self.__buffa_unknown_fields.clear();
1953    }
1954}
1955impl ::buffa::ExtensionSet for CreateBoardRequest {
1956    const PROTO_FQN: &'static str = "collab.v1.CreateBoardRequest";
1957    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1958        &self.__buffa_unknown_fields
1959    }
1960    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1961        &mut self.__buffa_unknown_fields
1962    }
1963}
1964impl ::buffa::json_helpers::ProtoElemJson for CreateBoardRequest {
1965    fn serialize_proto_json<S: ::serde::Serializer>(
1966        v: &Self,
1967        s: S,
1968    ) -> ::core::result::Result<S::Ok, S::Error> {
1969        ::serde::Serialize::serialize(v, s)
1970    }
1971    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1972        d: D,
1973    ) -> ::core::result::Result<Self, D::Error> {
1974        <Self as ::serde::Deserialize>::deserialize(d)
1975    }
1976}
1977#[doc(hidden)]
1978pub const __CREATE_BOARD_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1979    type_url: "type.googleapis.com/collab.v1.CreateBoardRequest",
1980    to_json: ::buffa::type_registry::any_to_json::<CreateBoardRequest>,
1981    from_json: ::buffa::type_registry::any_from_json::<CreateBoardRequest>,
1982    is_wkt: false,
1983};
1984/// CreateBoardResponse returns the created board and resolved caller access.
1985#[derive(Clone, PartialEq, Default)]
1986#[derive(::serde::Serialize, ::serde::Deserialize)]
1987#[serde(default)]
1988pub struct CreateBoardResponse {
1989    /// Created board metadata.
1990    ///
1991    /// Field 1: `board`
1992    #[serde(
1993        rename = "board",
1994        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1995    )]
1996    pub board: ::buffa::MessageField<Board>,
1997    /// Stored explicit ACL entries ordered by creation time, subject type, then subject ID.
1998    ///
1999    /// Field 2: `acl_entries`
2000    #[serde(
2001        rename = "aclEntries",
2002        alias = "acl_entries",
2003        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2004        deserialize_with = "::buffa::json_helpers::null_as_default"
2005    )]
2006    pub acl_entries: ::buffa::alloc::vec::Vec<BoardAclEntry>,
2007    /// Resolved caller access for the board.
2008    ///
2009    /// Field 3: `access`
2010    #[serde(
2011        rename = "access",
2012        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2013    )]
2014    pub access: ::buffa::MessageField<BoardAccess>,
2015    #[serde(skip)]
2016    #[doc(hidden)]
2017    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2018}
2019impl ::core::fmt::Debug for CreateBoardResponse {
2020    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2021        f.debug_struct("CreateBoardResponse")
2022            .field("board", &self.board)
2023            .field("acl_entries", &self.acl_entries)
2024            .field("access", &self.access)
2025            .finish()
2026    }
2027}
2028impl CreateBoardResponse {
2029    /// Protobuf type URL for this message, for use with `Any::pack` and
2030    /// `Any::unpack_if`.
2031    ///
2032    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2033    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.CreateBoardResponse";
2034}
2035::buffa::impl_default_instance!(CreateBoardResponse);
2036impl ::buffa::MessageName for CreateBoardResponse {
2037    const PACKAGE: &'static str = "collab.v1";
2038    const NAME: &'static str = "CreateBoardResponse";
2039    const FULL_NAME: &'static str = "collab.v1.CreateBoardResponse";
2040    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.CreateBoardResponse";
2041}
2042impl ::buffa::Message for CreateBoardResponse {
2043    /// Returns the total encoded size in bytes.
2044    ///
2045    /// The result is a `u32`; the protobuf specification requires all
2046    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2047    /// compliant message will never overflow this type.
2048    #[allow(clippy::let_and_return)]
2049    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2050        #[allow(unused_imports)]
2051        use ::buffa::Enumeration as _;
2052        let mut size = 0u32;
2053        if self.board.is_set() {
2054            let __slot = __cache.reserve();
2055            let inner_size = self.board.compute_size(__cache);
2056            __cache.set(__slot, inner_size);
2057            size
2058                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2059                    + inner_size;
2060        }
2061        for v in &self.acl_entries {
2062            let __slot = __cache.reserve();
2063            let inner_size = v.compute_size(__cache);
2064            __cache.set(__slot, inner_size);
2065            size
2066                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2067                    + inner_size;
2068        }
2069        if self.access.is_set() {
2070            let __slot = __cache.reserve();
2071            let inner_size = self.access.compute_size(__cache);
2072            __cache.set(__slot, inner_size);
2073            size
2074                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2075                    + inner_size;
2076        }
2077        size += self.__buffa_unknown_fields.encoded_len() as u32;
2078        size
2079    }
2080    fn write_to(
2081        &self,
2082        __cache: &mut ::buffa::SizeCache,
2083        buf: &mut impl ::buffa::bytes::BufMut,
2084    ) {
2085        #[allow(unused_imports)]
2086        use ::buffa::Enumeration as _;
2087        if self.board.is_set() {
2088            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
2089            self.board.write_to(__cache, buf);
2090        }
2091        for v in &self.acl_entries {
2092            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
2093            v.write_to(__cache, buf);
2094        }
2095        if self.access.is_set() {
2096            ::buffa::types::put_len_delimited_header(3u32, __cache.consume_next(), buf);
2097            self.access.write_to(__cache, buf);
2098        }
2099        self.__buffa_unknown_fields.write_to(buf);
2100    }
2101    fn merge_field(
2102        &mut self,
2103        tag: ::buffa::encoding::Tag,
2104        buf: &mut impl ::buffa::bytes::Buf,
2105        ctx: ::buffa::DecodeContext<'_>,
2106    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2107        #[allow(unused_imports)]
2108        use ::buffa::bytes::Buf as _;
2109        #[allow(unused_imports)]
2110        use ::buffa::Enumeration as _;
2111        match tag.field_number() {
2112            1u32 => {
2113                ::buffa::encoding::check_wire_type(
2114                    tag,
2115                    ::buffa::encoding::WireType::LengthDelimited,
2116                )?;
2117                ::buffa::Message::merge_length_delimited(
2118                    self.board.get_or_insert_default(),
2119                    buf,
2120                    ctx,
2121                )?;
2122            }
2123            2u32 => {
2124                ::buffa::encoding::check_wire_type(
2125                    tag,
2126                    ::buffa::encoding::WireType::LengthDelimited,
2127                )?;
2128                let mut elem = ::core::default::Default::default();
2129                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
2130                self.acl_entries.push(elem);
2131            }
2132            3u32 => {
2133                ::buffa::encoding::check_wire_type(
2134                    tag,
2135                    ::buffa::encoding::WireType::LengthDelimited,
2136                )?;
2137                ::buffa::Message::merge_length_delimited(
2138                    self.access.get_or_insert_default(),
2139                    buf,
2140                    ctx,
2141                )?;
2142            }
2143            _ => {
2144                self.__buffa_unknown_fields
2145                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2146            }
2147        }
2148        ::core::result::Result::Ok(())
2149    }
2150    fn clear(&mut self) {
2151        self.board = ::buffa::MessageField::none();
2152        self.acl_entries.clear();
2153        self.access = ::buffa::MessageField::none();
2154        self.__buffa_unknown_fields.clear();
2155    }
2156}
2157impl ::buffa::ExtensionSet for CreateBoardResponse {
2158    const PROTO_FQN: &'static str = "collab.v1.CreateBoardResponse";
2159    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2160        &self.__buffa_unknown_fields
2161    }
2162    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2163        &mut self.__buffa_unknown_fields
2164    }
2165}
2166impl ::buffa::json_helpers::ProtoElemJson for CreateBoardResponse {
2167    fn serialize_proto_json<S: ::serde::Serializer>(
2168        v: &Self,
2169        s: S,
2170    ) -> ::core::result::Result<S::Ok, S::Error> {
2171        ::serde::Serialize::serialize(v, s)
2172    }
2173    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2174        d: D,
2175    ) -> ::core::result::Result<Self, D::Error> {
2176        <Self as ::serde::Deserialize>::deserialize(d)
2177    }
2178}
2179#[doc(hidden)]
2180pub const __CREATE_BOARD_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2181    type_url: "type.googleapis.com/collab.v1.CreateBoardResponse",
2182    to_json: ::buffa::type_registry::any_to_json::<CreateBoardResponse>,
2183    from_json: ::buffa::type_registry::any_from_json::<CreateBoardResponse>,
2184    is_wkt: false,
2185};
2186/// GetBoardRequest loads one board by ID.
2187#[derive(Clone, PartialEq, Default)]
2188#[derive(::serde::Serialize, ::serde::Deserialize)]
2189#[serde(default)]
2190pub struct GetBoardRequest {
2191    /// Board identifier as a UUID string.
2192    ///
2193    /// Field 1: `board_id`
2194    #[serde(
2195        rename = "boardId",
2196        alias = "board_id",
2197        with = "::buffa::json_helpers::proto_string",
2198        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2199    )]
2200    pub board_id: ::buffa::alloc::string::String,
2201    #[serde(skip)]
2202    #[doc(hidden)]
2203    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2204}
2205impl ::core::fmt::Debug for GetBoardRequest {
2206    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2207        f.debug_struct("GetBoardRequest").field("board_id", &self.board_id).finish()
2208    }
2209}
2210impl GetBoardRequest {
2211    /// Protobuf type URL for this message, for use with `Any::pack` and
2212    /// `Any::unpack_if`.
2213    ///
2214    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2215    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.GetBoardRequest";
2216}
2217::buffa::impl_default_instance!(GetBoardRequest);
2218impl ::buffa::MessageName for GetBoardRequest {
2219    const PACKAGE: &'static str = "collab.v1";
2220    const NAME: &'static str = "GetBoardRequest";
2221    const FULL_NAME: &'static str = "collab.v1.GetBoardRequest";
2222    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.GetBoardRequest";
2223}
2224impl ::buffa::Message for GetBoardRequest {
2225    /// Returns the total encoded size in bytes.
2226    ///
2227    /// The result is a `u32`; the protobuf specification requires all
2228    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2229    /// compliant message will never overflow this type.
2230    #[allow(clippy::let_and_return)]
2231    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2232        #[allow(unused_imports)]
2233        use ::buffa::Enumeration as _;
2234        let mut size = 0u32;
2235        if !self.board_id.is_empty() {
2236            size += 1u32 + ::buffa::types::string_encoded_len(&self.board_id) as u32;
2237        }
2238        size += self.__buffa_unknown_fields.encoded_len() as u32;
2239        size
2240    }
2241    fn write_to(
2242        &self,
2243        _cache: &mut ::buffa::SizeCache,
2244        buf: &mut impl ::buffa::bytes::BufMut,
2245    ) {
2246        #[allow(unused_imports)]
2247        use ::buffa::Enumeration as _;
2248        if !self.board_id.is_empty() {
2249            ::buffa::types::put_string_field(1u32, &self.board_id, buf);
2250        }
2251        self.__buffa_unknown_fields.write_to(buf);
2252    }
2253    fn merge_field(
2254        &mut self,
2255        tag: ::buffa::encoding::Tag,
2256        buf: &mut impl ::buffa::bytes::Buf,
2257        ctx: ::buffa::DecodeContext<'_>,
2258    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2259        #[allow(unused_imports)]
2260        use ::buffa::bytes::Buf as _;
2261        #[allow(unused_imports)]
2262        use ::buffa::Enumeration as _;
2263        match tag.field_number() {
2264            1u32 => {
2265                ::buffa::encoding::check_wire_type(
2266                    tag,
2267                    ::buffa::encoding::WireType::LengthDelimited,
2268                )?;
2269                ::buffa::types::merge_string(&mut self.board_id, buf)?;
2270            }
2271            _ => {
2272                self.__buffa_unknown_fields
2273                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2274            }
2275        }
2276        ::core::result::Result::Ok(())
2277    }
2278    fn clear(&mut self) {
2279        self.board_id.clear();
2280        self.__buffa_unknown_fields.clear();
2281    }
2282}
2283impl ::buffa::ExtensionSet for GetBoardRequest {
2284    const PROTO_FQN: &'static str = "collab.v1.GetBoardRequest";
2285    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2286        &self.__buffa_unknown_fields
2287    }
2288    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2289        &mut self.__buffa_unknown_fields
2290    }
2291}
2292impl ::buffa::json_helpers::ProtoElemJson for GetBoardRequest {
2293    fn serialize_proto_json<S: ::serde::Serializer>(
2294        v: &Self,
2295        s: S,
2296    ) -> ::core::result::Result<S::Ok, S::Error> {
2297        ::serde::Serialize::serialize(v, s)
2298    }
2299    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2300        d: D,
2301    ) -> ::core::result::Result<Self, D::Error> {
2302        <Self as ::serde::Deserialize>::deserialize(d)
2303    }
2304}
2305#[doc(hidden)]
2306pub const __GET_BOARD_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2307    type_url: "type.googleapis.com/collab.v1.GetBoardRequest",
2308    to_json: ::buffa::type_registry::any_to_json::<GetBoardRequest>,
2309    from_json: ::buffa::type_registry::any_from_json::<GetBoardRequest>,
2310    is_wkt: false,
2311};
2312/// GetBoardResponse returns one visible board.
2313#[derive(Clone, PartialEq, Default)]
2314#[derive(::serde::Serialize, ::serde::Deserialize)]
2315#[serde(default)]
2316pub struct GetBoardResponse {
2317    /// Board metadata.
2318    ///
2319    /// Field 1: `board`
2320    #[serde(
2321        rename = "board",
2322        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2323    )]
2324    pub board: ::buffa::MessageField<Board>,
2325    /// Explicit ACL entries ordered by creation time, subject type, then subject ID. Returned only for callers who can manage the board.
2326    ///
2327    /// Field 2: `acl_entries`
2328    #[serde(
2329        rename = "aclEntries",
2330        alias = "acl_entries",
2331        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2332        deserialize_with = "::buffa::json_helpers::null_as_default"
2333    )]
2334    pub acl_entries: ::buffa::alloc::vec::Vec<BoardAclEntry>,
2335    /// Resolved caller access.
2336    ///
2337    /// Field 3: `access`
2338    #[serde(
2339        rename = "access",
2340        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2341    )]
2342    pub access: ::buffa::MessageField<BoardAccess>,
2343    #[serde(skip)]
2344    #[doc(hidden)]
2345    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2346}
2347impl ::core::fmt::Debug for GetBoardResponse {
2348    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2349        f.debug_struct("GetBoardResponse")
2350            .field("board", &self.board)
2351            .field("acl_entries", &self.acl_entries)
2352            .field("access", &self.access)
2353            .finish()
2354    }
2355}
2356impl GetBoardResponse {
2357    /// Protobuf type URL for this message, for use with `Any::pack` and
2358    /// `Any::unpack_if`.
2359    ///
2360    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2361    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.GetBoardResponse";
2362}
2363::buffa::impl_default_instance!(GetBoardResponse);
2364impl ::buffa::MessageName for GetBoardResponse {
2365    const PACKAGE: &'static str = "collab.v1";
2366    const NAME: &'static str = "GetBoardResponse";
2367    const FULL_NAME: &'static str = "collab.v1.GetBoardResponse";
2368    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.GetBoardResponse";
2369}
2370impl ::buffa::Message for GetBoardResponse {
2371    /// Returns the total encoded size in bytes.
2372    ///
2373    /// The result is a `u32`; the protobuf specification requires all
2374    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2375    /// compliant message will never overflow this type.
2376    #[allow(clippy::let_and_return)]
2377    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2378        #[allow(unused_imports)]
2379        use ::buffa::Enumeration as _;
2380        let mut size = 0u32;
2381        if self.board.is_set() {
2382            let __slot = __cache.reserve();
2383            let inner_size = self.board.compute_size(__cache);
2384            __cache.set(__slot, inner_size);
2385            size
2386                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2387                    + inner_size;
2388        }
2389        for v in &self.acl_entries {
2390            let __slot = __cache.reserve();
2391            let inner_size = v.compute_size(__cache);
2392            __cache.set(__slot, inner_size);
2393            size
2394                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2395                    + inner_size;
2396        }
2397        if self.access.is_set() {
2398            let __slot = __cache.reserve();
2399            let inner_size = self.access.compute_size(__cache);
2400            __cache.set(__slot, inner_size);
2401            size
2402                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2403                    + inner_size;
2404        }
2405        size += self.__buffa_unknown_fields.encoded_len() as u32;
2406        size
2407    }
2408    fn write_to(
2409        &self,
2410        __cache: &mut ::buffa::SizeCache,
2411        buf: &mut impl ::buffa::bytes::BufMut,
2412    ) {
2413        #[allow(unused_imports)]
2414        use ::buffa::Enumeration as _;
2415        if self.board.is_set() {
2416            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
2417            self.board.write_to(__cache, buf);
2418        }
2419        for v in &self.acl_entries {
2420            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
2421            v.write_to(__cache, buf);
2422        }
2423        if self.access.is_set() {
2424            ::buffa::types::put_len_delimited_header(3u32, __cache.consume_next(), buf);
2425            self.access.write_to(__cache, buf);
2426        }
2427        self.__buffa_unknown_fields.write_to(buf);
2428    }
2429    fn merge_field(
2430        &mut self,
2431        tag: ::buffa::encoding::Tag,
2432        buf: &mut impl ::buffa::bytes::Buf,
2433        ctx: ::buffa::DecodeContext<'_>,
2434    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2435        #[allow(unused_imports)]
2436        use ::buffa::bytes::Buf as _;
2437        #[allow(unused_imports)]
2438        use ::buffa::Enumeration as _;
2439        match tag.field_number() {
2440            1u32 => {
2441                ::buffa::encoding::check_wire_type(
2442                    tag,
2443                    ::buffa::encoding::WireType::LengthDelimited,
2444                )?;
2445                ::buffa::Message::merge_length_delimited(
2446                    self.board.get_or_insert_default(),
2447                    buf,
2448                    ctx,
2449                )?;
2450            }
2451            2u32 => {
2452                ::buffa::encoding::check_wire_type(
2453                    tag,
2454                    ::buffa::encoding::WireType::LengthDelimited,
2455                )?;
2456                let mut elem = ::core::default::Default::default();
2457                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
2458                self.acl_entries.push(elem);
2459            }
2460            3u32 => {
2461                ::buffa::encoding::check_wire_type(
2462                    tag,
2463                    ::buffa::encoding::WireType::LengthDelimited,
2464                )?;
2465                ::buffa::Message::merge_length_delimited(
2466                    self.access.get_or_insert_default(),
2467                    buf,
2468                    ctx,
2469                )?;
2470            }
2471            _ => {
2472                self.__buffa_unknown_fields
2473                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2474            }
2475        }
2476        ::core::result::Result::Ok(())
2477    }
2478    fn clear(&mut self) {
2479        self.board = ::buffa::MessageField::none();
2480        self.acl_entries.clear();
2481        self.access = ::buffa::MessageField::none();
2482        self.__buffa_unknown_fields.clear();
2483    }
2484}
2485impl ::buffa::ExtensionSet for GetBoardResponse {
2486    const PROTO_FQN: &'static str = "collab.v1.GetBoardResponse";
2487    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2488        &self.__buffa_unknown_fields
2489    }
2490    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2491        &mut self.__buffa_unknown_fields
2492    }
2493}
2494impl ::buffa::json_helpers::ProtoElemJson for GetBoardResponse {
2495    fn serialize_proto_json<S: ::serde::Serializer>(
2496        v: &Self,
2497        s: S,
2498    ) -> ::core::result::Result<S::Ok, S::Error> {
2499        ::serde::Serialize::serialize(v, s)
2500    }
2501    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2502        d: D,
2503    ) -> ::core::result::Result<Self, D::Error> {
2504        <Self as ::serde::Deserialize>::deserialize(d)
2505    }
2506}
2507#[doc(hidden)]
2508pub const __GET_BOARD_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2509    type_url: "type.googleapis.com/collab.v1.GetBoardResponse",
2510    to_json: ::buffa::type_registry::any_to_json::<GetBoardResponse>,
2511    from_json: ::buffa::type_registry::any_from_json::<GetBoardResponse>,
2512    is_wkt: false,
2513};
2514/// ListBoardsRequest lists boards visible to the caller.
2515#[derive(Clone, PartialEq, Default)]
2516#[derive(::serde::Serialize, ::serde::Deserialize)]
2517#[serde(default)]
2518pub struct ListBoardsRequest {
2519    /// When true, include archived boards in the response.
2520    ///
2521    /// Field 1: `include_archived`
2522    #[serde(
2523        rename = "includeArchived",
2524        alias = "include_archived",
2525        with = "::buffa::json_helpers::proto_bool",
2526        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
2527    )]
2528    pub include_archived: bool,
2529    /// Maximum number of boards to return. Defaults to 100 when omitted; maximum
2530    /// is 500.
2531    ///
2532    /// Field 2: `limit`
2533    #[serde(
2534        rename = "limit",
2535        with = "::buffa::json_helpers::uint32",
2536        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
2537    )]
2538    pub limit: u32,
2539    /// Opaque keyset cursor from a previous response. The cursor is exclusive and
2540    /// bound to the authenticated caller, archive filter, and newest-updated sort
2541    /// order.
2542    ///
2543    /// Field 3: `page_token`
2544    #[serde(
2545        rename = "pageToken",
2546        alias = "page_token",
2547        with = "::buffa::json_helpers::proto_string",
2548        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2549    )]
2550    pub page_token: ::buffa::alloc::string::String,
2551    #[serde(skip)]
2552    #[doc(hidden)]
2553    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2554}
2555impl ::core::fmt::Debug for ListBoardsRequest {
2556    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2557        f.debug_struct("ListBoardsRequest")
2558            .field("include_archived", &self.include_archived)
2559            .field("limit", &self.limit)
2560            .field("page_token", &self.page_token)
2561            .finish()
2562    }
2563}
2564impl ListBoardsRequest {
2565    /// Protobuf type URL for this message, for use with `Any::pack` and
2566    /// `Any::unpack_if`.
2567    ///
2568    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2569    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ListBoardsRequest";
2570}
2571::buffa::impl_default_instance!(ListBoardsRequest);
2572impl ::buffa::MessageName for ListBoardsRequest {
2573    const PACKAGE: &'static str = "collab.v1";
2574    const NAME: &'static str = "ListBoardsRequest";
2575    const FULL_NAME: &'static str = "collab.v1.ListBoardsRequest";
2576    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ListBoardsRequest";
2577}
2578impl ::buffa::Message for ListBoardsRequest {
2579    /// Returns the total encoded size in bytes.
2580    ///
2581    /// The result is a `u32`; the protobuf specification requires all
2582    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2583    /// compliant message will never overflow this type.
2584    #[allow(clippy::let_and_return)]
2585    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2586        #[allow(unused_imports)]
2587        use ::buffa::Enumeration as _;
2588        let mut size = 0u32;
2589        if self.include_archived {
2590            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2591        }
2592        if self.limit != 0u32 {
2593            size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
2594        }
2595        if !self.page_token.is_empty() {
2596            size += 1u32 + ::buffa::types::string_encoded_len(&self.page_token) as u32;
2597        }
2598        size += self.__buffa_unknown_fields.encoded_len() as u32;
2599        size
2600    }
2601    fn write_to(
2602        &self,
2603        _cache: &mut ::buffa::SizeCache,
2604        buf: &mut impl ::buffa::bytes::BufMut,
2605    ) {
2606        #[allow(unused_imports)]
2607        use ::buffa::Enumeration as _;
2608        if self.include_archived {
2609            ::buffa::types::put_bool_field(1u32, self.include_archived, buf);
2610        }
2611        if self.limit != 0u32 {
2612            ::buffa::types::put_uint32_field(2u32, self.limit, buf);
2613        }
2614        if !self.page_token.is_empty() {
2615            ::buffa::types::put_string_field(3u32, &self.page_token, buf);
2616        }
2617        self.__buffa_unknown_fields.write_to(buf);
2618    }
2619    fn merge_field(
2620        &mut self,
2621        tag: ::buffa::encoding::Tag,
2622        buf: &mut impl ::buffa::bytes::Buf,
2623        ctx: ::buffa::DecodeContext<'_>,
2624    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2625        #[allow(unused_imports)]
2626        use ::buffa::bytes::Buf as _;
2627        #[allow(unused_imports)]
2628        use ::buffa::Enumeration as _;
2629        match tag.field_number() {
2630            1u32 => {
2631                ::buffa::encoding::check_wire_type(
2632                    tag,
2633                    ::buffa::encoding::WireType::Varint,
2634                )?;
2635                self.include_archived = ::buffa::types::decode_bool(buf)?;
2636            }
2637            2u32 => {
2638                ::buffa::encoding::check_wire_type(
2639                    tag,
2640                    ::buffa::encoding::WireType::Varint,
2641                )?;
2642                self.limit = ::buffa::types::decode_uint32(buf)?;
2643            }
2644            3u32 => {
2645                ::buffa::encoding::check_wire_type(
2646                    tag,
2647                    ::buffa::encoding::WireType::LengthDelimited,
2648                )?;
2649                ::buffa::types::merge_string(&mut self.page_token, buf)?;
2650            }
2651            _ => {
2652                self.__buffa_unknown_fields
2653                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2654            }
2655        }
2656        ::core::result::Result::Ok(())
2657    }
2658    fn clear(&mut self) {
2659        self.include_archived = false;
2660        self.limit = 0u32;
2661        self.page_token.clear();
2662        self.__buffa_unknown_fields.clear();
2663    }
2664}
2665impl ::buffa::ExtensionSet for ListBoardsRequest {
2666    const PROTO_FQN: &'static str = "collab.v1.ListBoardsRequest";
2667    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2668        &self.__buffa_unknown_fields
2669    }
2670    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2671        &mut self.__buffa_unknown_fields
2672    }
2673}
2674impl ::buffa::json_helpers::ProtoElemJson for ListBoardsRequest {
2675    fn serialize_proto_json<S: ::serde::Serializer>(
2676        v: &Self,
2677        s: S,
2678    ) -> ::core::result::Result<S::Ok, S::Error> {
2679        ::serde::Serialize::serialize(v, s)
2680    }
2681    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2682        d: D,
2683    ) -> ::core::result::Result<Self, D::Error> {
2684        <Self as ::serde::Deserialize>::deserialize(d)
2685    }
2686}
2687#[doc(hidden)]
2688pub const __LIST_BOARDS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2689    type_url: "type.googleapis.com/collab.v1.ListBoardsRequest",
2690    to_json: ::buffa::type_registry::any_to_json::<ListBoardsRequest>,
2691    from_json: ::buffa::type_registry::any_from_json::<ListBoardsRequest>,
2692    is_wkt: false,
2693};
2694/// ListBoardsResponse lists boards visible to the caller in most-recently-updated order.
2695#[derive(Clone, PartialEq, Default)]
2696#[derive(::serde::Serialize, ::serde::Deserialize)]
2697#[serde(default)]
2698pub struct ListBoardsResponse {
2699    /// Visible boards ordered by updated_at descending, then board_id descending.
2700    ///
2701    /// Field 1: `boards`
2702    #[serde(
2703        rename = "boards",
2704        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2705        deserialize_with = "::buffa::json_helpers::null_as_default"
2706    )]
2707    pub boards: ::buffa::alloc::vec::Vec<BoardListItem>,
2708    /// Opaque cursor for the next page. Empty when no more results exist.
2709    ///
2710    /// Field 2: `next_page_token`
2711    #[serde(
2712        rename = "nextPageToken",
2713        alias = "next_page_token",
2714        with = "::buffa::json_helpers::proto_string",
2715        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2716    )]
2717    pub next_page_token: ::buffa::alloc::string::String,
2718    #[serde(skip)]
2719    #[doc(hidden)]
2720    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2721}
2722impl ::core::fmt::Debug for ListBoardsResponse {
2723    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2724        f.debug_struct("ListBoardsResponse")
2725            .field("boards", &self.boards)
2726            .field("next_page_token", &self.next_page_token)
2727            .finish()
2728    }
2729}
2730impl ListBoardsResponse {
2731    /// Protobuf type URL for this message, for use with `Any::pack` and
2732    /// `Any::unpack_if`.
2733    ///
2734    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2735    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ListBoardsResponse";
2736}
2737::buffa::impl_default_instance!(ListBoardsResponse);
2738impl ::buffa::MessageName for ListBoardsResponse {
2739    const PACKAGE: &'static str = "collab.v1";
2740    const NAME: &'static str = "ListBoardsResponse";
2741    const FULL_NAME: &'static str = "collab.v1.ListBoardsResponse";
2742    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ListBoardsResponse";
2743}
2744impl ::buffa::Message for ListBoardsResponse {
2745    /// Returns the total encoded size in bytes.
2746    ///
2747    /// The result is a `u32`; the protobuf specification requires all
2748    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2749    /// compliant message will never overflow this type.
2750    #[allow(clippy::let_and_return)]
2751    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2752        #[allow(unused_imports)]
2753        use ::buffa::Enumeration as _;
2754        let mut size = 0u32;
2755        for v in &self.boards {
2756            let __slot = __cache.reserve();
2757            let inner_size = v.compute_size(__cache);
2758            __cache.set(__slot, inner_size);
2759            size
2760                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2761                    + inner_size;
2762        }
2763        if !self.next_page_token.is_empty() {
2764            size
2765                += 1u32
2766                    + ::buffa::types::string_encoded_len(&self.next_page_token) as u32;
2767        }
2768        size += self.__buffa_unknown_fields.encoded_len() as u32;
2769        size
2770    }
2771    fn write_to(
2772        &self,
2773        __cache: &mut ::buffa::SizeCache,
2774        buf: &mut impl ::buffa::bytes::BufMut,
2775    ) {
2776        #[allow(unused_imports)]
2777        use ::buffa::Enumeration as _;
2778        for v in &self.boards {
2779            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
2780            v.write_to(__cache, buf);
2781        }
2782        if !self.next_page_token.is_empty() {
2783            ::buffa::types::put_string_field(2u32, &self.next_page_token, buf);
2784        }
2785        self.__buffa_unknown_fields.write_to(buf);
2786    }
2787    fn merge_field(
2788        &mut self,
2789        tag: ::buffa::encoding::Tag,
2790        buf: &mut impl ::buffa::bytes::Buf,
2791        ctx: ::buffa::DecodeContext<'_>,
2792    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2793        #[allow(unused_imports)]
2794        use ::buffa::bytes::Buf as _;
2795        #[allow(unused_imports)]
2796        use ::buffa::Enumeration as _;
2797        match tag.field_number() {
2798            1u32 => {
2799                ::buffa::encoding::check_wire_type(
2800                    tag,
2801                    ::buffa::encoding::WireType::LengthDelimited,
2802                )?;
2803                let mut elem = ::core::default::Default::default();
2804                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
2805                self.boards.push(elem);
2806            }
2807            2u32 => {
2808                ::buffa::encoding::check_wire_type(
2809                    tag,
2810                    ::buffa::encoding::WireType::LengthDelimited,
2811                )?;
2812                ::buffa::types::merge_string(&mut self.next_page_token, buf)?;
2813            }
2814            _ => {
2815                self.__buffa_unknown_fields
2816                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2817            }
2818        }
2819        ::core::result::Result::Ok(())
2820    }
2821    fn clear(&mut self) {
2822        self.boards.clear();
2823        self.next_page_token.clear();
2824        self.__buffa_unknown_fields.clear();
2825    }
2826}
2827impl ::buffa::ExtensionSet for ListBoardsResponse {
2828    const PROTO_FQN: &'static str = "collab.v1.ListBoardsResponse";
2829    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2830        &self.__buffa_unknown_fields
2831    }
2832    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2833        &mut self.__buffa_unknown_fields
2834    }
2835}
2836impl ::buffa::json_helpers::ProtoElemJson for ListBoardsResponse {
2837    fn serialize_proto_json<S: ::serde::Serializer>(
2838        v: &Self,
2839        s: S,
2840    ) -> ::core::result::Result<S::Ok, S::Error> {
2841        ::serde::Serialize::serialize(v, s)
2842    }
2843    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2844        d: D,
2845    ) -> ::core::result::Result<Self, D::Error> {
2846        <Self as ::serde::Deserialize>::deserialize(d)
2847    }
2848}
2849#[doc(hidden)]
2850pub const __LIST_BOARDS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2851    type_url: "type.googleapis.com/collab.v1.ListBoardsResponse",
2852    to_json: ::buffa::type_registry::any_to_json::<ListBoardsResponse>,
2853    from_json: ::buffa::type_registry::any_from_json::<ListBoardsResponse>,
2854    is_wkt: false,
2855};
2856/// UpdateBoardRequest updates mutable board metadata.
2857#[derive(Clone, PartialEq, Default)]
2858#[derive(::serde::Serialize, ::serde::Deserialize)]
2859#[serde(default)]
2860pub struct UpdateBoardRequest {
2861    /// Board identifier as a UUID string.
2862    ///
2863    /// Field 1: `board_id`
2864    #[serde(
2865        rename = "boardId",
2866        alias = "board_id",
2867        with = "::buffa::json_helpers::proto_string",
2868        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2869    )]
2870    pub board_id: ::buffa::alloc::string::String,
2871    /// New board title, max 200 characters and 400 bytes. When unset, the title is unchanged.
2872    ///
2873    /// Field 2: `title`
2874    #[serde(rename = "title", skip_serializing_if = "::core::option::Option::is_none")]
2875    pub title: ::core::option::Option<::buffa::alloc::string::String>,
2876    /// New audience policy. When unset, the audience is unchanged.
2877    ///
2878    /// Field 3: `audience`
2879    #[serde(
2880        rename = "audience",
2881        with = "::buffa::json_helpers::opt_enum",
2882        skip_serializing_if = "::core::option::Option::is_none"
2883    )]
2884    pub audience: ::core::option::Option<::buffa::EnumValue<BoardAudience>>,
2885    /// New default audience role for PUBLIC or FOLLOWERS access. When unset, the role is unchanged.
2886    ///
2887    /// Field 4: `default_role`
2888    #[serde(
2889        rename = "defaultRole",
2890        alias = "default_role",
2891        with = "::buffa::json_helpers::opt_enum",
2892        skip_serializing_if = "::core::option::Option::is_none"
2893    )]
2894    pub default_role: ::core::option::Option<::buffa::EnumValue<BoardRole>>,
2895    /// New initial snapshot as a JSON object. When unset, the snapshot is unchanged.
2896    ///
2897    /// Field 5: `initial_snapshot`
2898    #[serde(
2899        rename = "initialSnapshot",
2900        alias = "initial_snapshot",
2901        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2902    )]
2903    pub initial_snapshot: ::buffa::MessageField<::buffa_types::google::protobuf::Struct>,
2904    #[serde(skip)]
2905    #[doc(hidden)]
2906    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2907}
2908impl ::core::fmt::Debug for UpdateBoardRequest {
2909    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2910        f.debug_struct("UpdateBoardRequest")
2911            .field("board_id", &self.board_id)
2912            .field("title", &self.title)
2913            .field("audience", &self.audience)
2914            .field("default_role", &self.default_role)
2915            .field("initial_snapshot", &self.initial_snapshot)
2916            .finish()
2917    }
2918}
2919impl UpdateBoardRequest {
2920    /// Protobuf type URL for this message, for use with `Any::pack` and
2921    /// `Any::unpack_if`.
2922    ///
2923    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2924    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardRequest";
2925}
2926impl UpdateBoardRequest {
2927    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2928    #[inline]
2929    ///Sets [`Self::title`] to `Some(value)`, consuming and returning `self`.
2930    pub fn with_title(
2931        mut self,
2932        value: impl Into<::buffa::alloc::string::String>,
2933    ) -> Self {
2934        self.title = Some(value.into());
2935        self
2936    }
2937    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2938    #[inline]
2939    ///Sets [`Self::audience`] to `Some(value)`, consuming and returning `self`.
2940    pub fn with_audience(
2941        mut self,
2942        value: impl Into<::buffa::EnumValue<BoardAudience>>,
2943    ) -> Self {
2944        self.audience = Some(value.into());
2945        self
2946    }
2947    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2948    #[inline]
2949    ///Sets [`Self::default_role`] to `Some(value)`, consuming and returning `self`.
2950    pub fn with_default_role(
2951        mut self,
2952        value: impl Into<::buffa::EnumValue<BoardRole>>,
2953    ) -> Self {
2954        self.default_role = Some(value.into());
2955        self
2956    }
2957}
2958::buffa::impl_default_instance!(UpdateBoardRequest);
2959impl ::buffa::MessageName for UpdateBoardRequest {
2960    const PACKAGE: &'static str = "collab.v1";
2961    const NAME: &'static str = "UpdateBoardRequest";
2962    const FULL_NAME: &'static str = "collab.v1.UpdateBoardRequest";
2963    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardRequest";
2964}
2965impl ::buffa::Message for UpdateBoardRequest {
2966    /// Returns the total encoded size in bytes.
2967    ///
2968    /// The result is a `u32`; the protobuf specification requires all
2969    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2970    /// compliant message will never overflow this type.
2971    #[allow(clippy::let_and_return)]
2972    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2973        #[allow(unused_imports)]
2974        use ::buffa::Enumeration as _;
2975        let mut size = 0u32;
2976        if !self.board_id.is_empty() {
2977            size += 1u32 + ::buffa::types::string_encoded_len(&self.board_id) as u32;
2978        }
2979        if let Some(ref v) = self.title {
2980            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2981        }
2982        if let Some(ref v) = self.audience {
2983            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2984        }
2985        if let Some(ref v) = self.default_role {
2986            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2987        }
2988        if self.initial_snapshot.is_set() {
2989            let __slot = __cache.reserve();
2990            let inner_size = self.initial_snapshot.compute_size(__cache);
2991            __cache.set(__slot, inner_size);
2992            size
2993                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2994                    + inner_size;
2995        }
2996        size += self.__buffa_unknown_fields.encoded_len() as u32;
2997        size
2998    }
2999    fn write_to(
3000        &self,
3001        __cache: &mut ::buffa::SizeCache,
3002        buf: &mut impl ::buffa::bytes::BufMut,
3003    ) {
3004        #[allow(unused_imports)]
3005        use ::buffa::Enumeration as _;
3006        if !self.board_id.is_empty() {
3007            ::buffa::types::put_string_field(1u32, &self.board_id, buf);
3008        }
3009        if let Some(ref v) = self.title {
3010            ::buffa::types::put_string_field(2u32, v, buf);
3011        }
3012        if let Some(ref v) = self.audience {
3013            ::buffa::types::put_int32_field(3u32, v.to_i32(), buf);
3014        }
3015        if let Some(ref v) = self.default_role {
3016            ::buffa::types::put_int32_field(4u32, v.to_i32(), buf);
3017        }
3018        if self.initial_snapshot.is_set() {
3019            ::buffa::types::put_len_delimited_header(5u32, __cache.consume_next(), buf);
3020            self.initial_snapshot.write_to(__cache, buf);
3021        }
3022        self.__buffa_unknown_fields.write_to(buf);
3023    }
3024    fn merge_field(
3025        &mut self,
3026        tag: ::buffa::encoding::Tag,
3027        buf: &mut impl ::buffa::bytes::Buf,
3028        ctx: ::buffa::DecodeContext<'_>,
3029    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3030        #[allow(unused_imports)]
3031        use ::buffa::bytes::Buf as _;
3032        #[allow(unused_imports)]
3033        use ::buffa::Enumeration as _;
3034        match tag.field_number() {
3035            1u32 => {
3036                ::buffa::encoding::check_wire_type(
3037                    tag,
3038                    ::buffa::encoding::WireType::LengthDelimited,
3039                )?;
3040                ::buffa::types::merge_string(&mut self.board_id, buf)?;
3041            }
3042            2u32 => {
3043                ::buffa::encoding::check_wire_type(
3044                    tag,
3045                    ::buffa::encoding::WireType::LengthDelimited,
3046                )?;
3047                ::buffa::types::merge_string(
3048                    self.title.get_or_insert_with(::buffa::alloc::string::String::new),
3049                    buf,
3050                )?;
3051            }
3052            3u32 => {
3053                ::buffa::encoding::check_wire_type(
3054                    tag,
3055                    ::buffa::encoding::WireType::Varint,
3056                )?;
3057                self.audience = ::core::option::Option::Some(
3058                    ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?),
3059                );
3060            }
3061            4u32 => {
3062                ::buffa::encoding::check_wire_type(
3063                    tag,
3064                    ::buffa::encoding::WireType::Varint,
3065                )?;
3066                self.default_role = ::core::option::Option::Some(
3067                    ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?),
3068                );
3069            }
3070            5u32 => {
3071                ::buffa::encoding::check_wire_type(
3072                    tag,
3073                    ::buffa::encoding::WireType::LengthDelimited,
3074                )?;
3075                ::buffa::Message::merge_length_delimited(
3076                    self.initial_snapshot.get_or_insert_default(),
3077                    buf,
3078                    ctx,
3079                )?;
3080            }
3081            _ => {
3082                self.__buffa_unknown_fields
3083                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3084            }
3085        }
3086        ::core::result::Result::Ok(())
3087    }
3088    fn clear(&mut self) {
3089        self.board_id.clear();
3090        self.title = ::core::option::Option::None;
3091        self.audience = ::core::option::Option::None;
3092        self.default_role = ::core::option::Option::None;
3093        self.initial_snapshot = ::buffa::MessageField::none();
3094        self.__buffa_unknown_fields.clear();
3095    }
3096}
3097impl ::buffa::ExtensionSet for UpdateBoardRequest {
3098    const PROTO_FQN: &'static str = "collab.v1.UpdateBoardRequest";
3099    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3100        &self.__buffa_unknown_fields
3101    }
3102    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3103        &mut self.__buffa_unknown_fields
3104    }
3105}
3106impl ::buffa::json_helpers::ProtoElemJson for UpdateBoardRequest {
3107    fn serialize_proto_json<S: ::serde::Serializer>(
3108        v: &Self,
3109        s: S,
3110    ) -> ::core::result::Result<S::Ok, S::Error> {
3111        ::serde::Serialize::serialize(v, s)
3112    }
3113    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3114        d: D,
3115    ) -> ::core::result::Result<Self, D::Error> {
3116        <Self as ::serde::Deserialize>::deserialize(d)
3117    }
3118}
3119#[doc(hidden)]
3120pub const __UPDATE_BOARD_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3121    type_url: "type.googleapis.com/collab.v1.UpdateBoardRequest",
3122    to_json: ::buffa::type_registry::any_to_json::<UpdateBoardRequest>,
3123    from_json: ::buffa::type_registry::any_from_json::<UpdateBoardRequest>,
3124    is_wkt: false,
3125};
3126/// UpdateBoardResponse returns the updated board.
3127#[derive(Clone, PartialEq, Default)]
3128#[derive(::serde::Serialize, ::serde::Deserialize)]
3129#[serde(default)]
3130pub struct UpdateBoardResponse {
3131    /// Updated board metadata.
3132    ///
3133    /// Field 1: `board`
3134    #[serde(
3135        rename = "board",
3136        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3137    )]
3138    pub board: ::buffa::MessageField<Board>,
3139    /// Explicit ACL entries ordered by creation time, subject type, then subject ID. Returned only for callers who can manage the board.
3140    ///
3141    /// Field 2: `acl_entries`
3142    #[serde(
3143        rename = "aclEntries",
3144        alias = "acl_entries",
3145        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3146        deserialize_with = "::buffa::json_helpers::null_as_default"
3147    )]
3148    pub acl_entries: ::buffa::alloc::vec::Vec<BoardAclEntry>,
3149    /// Resolved caller access.
3150    ///
3151    /// Field 3: `access`
3152    #[serde(
3153        rename = "access",
3154        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3155    )]
3156    pub access: ::buffa::MessageField<BoardAccess>,
3157    #[serde(skip)]
3158    #[doc(hidden)]
3159    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3160}
3161impl ::core::fmt::Debug for UpdateBoardResponse {
3162    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3163        f.debug_struct("UpdateBoardResponse")
3164            .field("board", &self.board)
3165            .field("acl_entries", &self.acl_entries)
3166            .field("access", &self.access)
3167            .finish()
3168    }
3169}
3170impl UpdateBoardResponse {
3171    /// Protobuf type URL for this message, for use with `Any::pack` and
3172    /// `Any::unpack_if`.
3173    ///
3174    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3175    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardResponse";
3176}
3177::buffa::impl_default_instance!(UpdateBoardResponse);
3178impl ::buffa::MessageName for UpdateBoardResponse {
3179    const PACKAGE: &'static str = "collab.v1";
3180    const NAME: &'static str = "UpdateBoardResponse";
3181    const FULL_NAME: &'static str = "collab.v1.UpdateBoardResponse";
3182    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardResponse";
3183}
3184impl ::buffa::Message for UpdateBoardResponse {
3185    /// Returns the total encoded size in bytes.
3186    ///
3187    /// The result is a `u32`; the protobuf specification requires all
3188    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3189    /// compliant message will never overflow this type.
3190    #[allow(clippy::let_and_return)]
3191    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3192        #[allow(unused_imports)]
3193        use ::buffa::Enumeration as _;
3194        let mut size = 0u32;
3195        if self.board.is_set() {
3196            let __slot = __cache.reserve();
3197            let inner_size = self.board.compute_size(__cache);
3198            __cache.set(__slot, inner_size);
3199            size
3200                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3201                    + inner_size;
3202        }
3203        for v in &self.acl_entries {
3204            let __slot = __cache.reserve();
3205            let inner_size = v.compute_size(__cache);
3206            __cache.set(__slot, inner_size);
3207            size
3208                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3209                    + inner_size;
3210        }
3211        if self.access.is_set() {
3212            let __slot = __cache.reserve();
3213            let inner_size = self.access.compute_size(__cache);
3214            __cache.set(__slot, inner_size);
3215            size
3216                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3217                    + inner_size;
3218        }
3219        size += self.__buffa_unknown_fields.encoded_len() as u32;
3220        size
3221    }
3222    fn write_to(
3223        &self,
3224        __cache: &mut ::buffa::SizeCache,
3225        buf: &mut impl ::buffa::bytes::BufMut,
3226    ) {
3227        #[allow(unused_imports)]
3228        use ::buffa::Enumeration as _;
3229        if self.board.is_set() {
3230            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
3231            self.board.write_to(__cache, buf);
3232        }
3233        for v in &self.acl_entries {
3234            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
3235            v.write_to(__cache, buf);
3236        }
3237        if self.access.is_set() {
3238            ::buffa::types::put_len_delimited_header(3u32, __cache.consume_next(), buf);
3239            self.access.write_to(__cache, buf);
3240        }
3241        self.__buffa_unknown_fields.write_to(buf);
3242    }
3243    fn merge_field(
3244        &mut self,
3245        tag: ::buffa::encoding::Tag,
3246        buf: &mut impl ::buffa::bytes::Buf,
3247        ctx: ::buffa::DecodeContext<'_>,
3248    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3249        #[allow(unused_imports)]
3250        use ::buffa::bytes::Buf as _;
3251        #[allow(unused_imports)]
3252        use ::buffa::Enumeration as _;
3253        match tag.field_number() {
3254            1u32 => {
3255                ::buffa::encoding::check_wire_type(
3256                    tag,
3257                    ::buffa::encoding::WireType::LengthDelimited,
3258                )?;
3259                ::buffa::Message::merge_length_delimited(
3260                    self.board.get_or_insert_default(),
3261                    buf,
3262                    ctx,
3263                )?;
3264            }
3265            2u32 => {
3266                ::buffa::encoding::check_wire_type(
3267                    tag,
3268                    ::buffa::encoding::WireType::LengthDelimited,
3269                )?;
3270                let mut elem = ::core::default::Default::default();
3271                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
3272                self.acl_entries.push(elem);
3273            }
3274            3u32 => {
3275                ::buffa::encoding::check_wire_type(
3276                    tag,
3277                    ::buffa::encoding::WireType::LengthDelimited,
3278                )?;
3279                ::buffa::Message::merge_length_delimited(
3280                    self.access.get_or_insert_default(),
3281                    buf,
3282                    ctx,
3283                )?;
3284            }
3285            _ => {
3286                self.__buffa_unknown_fields
3287                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3288            }
3289        }
3290        ::core::result::Result::Ok(())
3291    }
3292    fn clear(&mut self) {
3293        self.board = ::buffa::MessageField::none();
3294        self.acl_entries.clear();
3295        self.access = ::buffa::MessageField::none();
3296        self.__buffa_unknown_fields.clear();
3297    }
3298}
3299impl ::buffa::ExtensionSet for UpdateBoardResponse {
3300    const PROTO_FQN: &'static str = "collab.v1.UpdateBoardResponse";
3301    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3302        &self.__buffa_unknown_fields
3303    }
3304    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3305        &mut self.__buffa_unknown_fields
3306    }
3307}
3308impl ::buffa::json_helpers::ProtoElemJson for UpdateBoardResponse {
3309    fn serialize_proto_json<S: ::serde::Serializer>(
3310        v: &Self,
3311        s: S,
3312    ) -> ::core::result::Result<S::Ok, S::Error> {
3313        ::serde::Serialize::serialize(v, s)
3314    }
3315    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3316        d: D,
3317    ) -> ::core::result::Result<Self, D::Error> {
3318        <Self as ::serde::Deserialize>::deserialize(d)
3319    }
3320}
3321#[doc(hidden)]
3322pub const __UPDATE_BOARD_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3323    type_url: "type.googleapis.com/collab.v1.UpdateBoardResponse",
3324    to_json: ::buffa::type_registry::any_to_json::<UpdateBoardResponse>,
3325    from_json: ::buffa::type_registry::any_from_json::<UpdateBoardResponse>,
3326    is_wkt: false,
3327};
3328/// UpdateBoardAclRequest fully replaces the explicit ACL for a board.
3329#[derive(Clone, PartialEq, Default)]
3330#[derive(::serde::Serialize, ::serde::Deserialize)]
3331#[serde(default)]
3332pub struct UpdateBoardAclRequest {
3333    /// Board identifier as a UUID string.
3334    ///
3335    /// Field 1: `board_id`
3336    #[serde(
3337        rename = "boardId",
3338        alias = "board_id",
3339        with = "::buffa::json_helpers::proto_string",
3340        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3341    )]
3342    pub board_id: ::buffa::alloc::string::String,
3343    /// Full replacement ACL set for the board, max 256 entries. Existing ACL entries are replaced atomically.
3344    ///
3345    /// Field 2: `acl_entries`
3346    #[serde(
3347        rename = "aclEntries",
3348        alias = "acl_entries",
3349        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3350        deserialize_with = "::buffa::json_helpers::null_as_default"
3351    )]
3352    pub acl_entries: ::buffa::alloc::vec::Vec<BoardAclEntry>,
3353    #[serde(skip)]
3354    #[doc(hidden)]
3355    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3356}
3357impl ::core::fmt::Debug for UpdateBoardAclRequest {
3358    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3359        f.debug_struct("UpdateBoardAclRequest")
3360            .field("board_id", &self.board_id)
3361            .field("acl_entries", &self.acl_entries)
3362            .finish()
3363    }
3364}
3365impl UpdateBoardAclRequest {
3366    /// Protobuf type URL for this message, for use with `Any::pack` and
3367    /// `Any::unpack_if`.
3368    ///
3369    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3370    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardAclRequest";
3371}
3372::buffa::impl_default_instance!(UpdateBoardAclRequest);
3373impl ::buffa::MessageName for UpdateBoardAclRequest {
3374    const PACKAGE: &'static str = "collab.v1";
3375    const NAME: &'static str = "UpdateBoardAclRequest";
3376    const FULL_NAME: &'static str = "collab.v1.UpdateBoardAclRequest";
3377    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardAclRequest";
3378}
3379impl ::buffa::Message for UpdateBoardAclRequest {
3380    /// Returns the total encoded size in bytes.
3381    ///
3382    /// The result is a `u32`; the protobuf specification requires all
3383    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3384    /// compliant message will never overflow this type.
3385    #[allow(clippy::let_and_return)]
3386    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3387        #[allow(unused_imports)]
3388        use ::buffa::Enumeration as _;
3389        let mut size = 0u32;
3390        if !self.board_id.is_empty() {
3391            size += 1u32 + ::buffa::types::string_encoded_len(&self.board_id) as u32;
3392        }
3393        for v in &self.acl_entries {
3394            let __slot = __cache.reserve();
3395            let inner_size = v.compute_size(__cache);
3396            __cache.set(__slot, inner_size);
3397            size
3398                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3399                    + inner_size;
3400        }
3401        size += self.__buffa_unknown_fields.encoded_len() as u32;
3402        size
3403    }
3404    fn write_to(
3405        &self,
3406        __cache: &mut ::buffa::SizeCache,
3407        buf: &mut impl ::buffa::bytes::BufMut,
3408    ) {
3409        #[allow(unused_imports)]
3410        use ::buffa::Enumeration as _;
3411        if !self.board_id.is_empty() {
3412            ::buffa::types::put_string_field(1u32, &self.board_id, buf);
3413        }
3414        for v in &self.acl_entries {
3415            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
3416            v.write_to(__cache, buf);
3417        }
3418        self.__buffa_unknown_fields.write_to(buf);
3419    }
3420    fn merge_field(
3421        &mut self,
3422        tag: ::buffa::encoding::Tag,
3423        buf: &mut impl ::buffa::bytes::Buf,
3424        ctx: ::buffa::DecodeContext<'_>,
3425    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3426        #[allow(unused_imports)]
3427        use ::buffa::bytes::Buf as _;
3428        #[allow(unused_imports)]
3429        use ::buffa::Enumeration as _;
3430        match tag.field_number() {
3431            1u32 => {
3432                ::buffa::encoding::check_wire_type(
3433                    tag,
3434                    ::buffa::encoding::WireType::LengthDelimited,
3435                )?;
3436                ::buffa::types::merge_string(&mut self.board_id, buf)?;
3437            }
3438            2u32 => {
3439                ::buffa::encoding::check_wire_type(
3440                    tag,
3441                    ::buffa::encoding::WireType::LengthDelimited,
3442                )?;
3443                let mut elem = ::core::default::Default::default();
3444                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
3445                self.acl_entries.push(elem);
3446            }
3447            _ => {
3448                self.__buffa_unknown_fields
3449                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3450            }
3451        }
3452        ::core::result::Result::Ok(())
3453    }
3454    fn clear(&mut self) {
3455        self.board_id.clear();
3456        self.acl_entries.clear();
3457        self.__buffa_unknown_fields.clear();
3458    }
3459}
3460impl ::buffa::ExtensionSet for UpdateBoardAclRequest {
3461    const PROTO_FQN: &'static str = "collab.v1.UpdateBoardAclRequest";
3462    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3463        &self.__buffa_unknown_fields
3464    }
3465    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3466        &mut self.__buffa_unknown_fields
3467    }
3468}
3469impl ::buffa::json_helpers::ProtoElemJson for UpdateBoardAclRequest {
3470    fn serialize_proto_json<S: ::serde::Serializer>(
3471        v: &Self,
3472        s: S,
3473    ) -> ::core::result::Result<S::Ok, S::Error> {
3474        ::serde::Serialize::serialize(v, s)
3475    }
3476    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3477        d: D,
3478    ) -> ::core::result::Result<Self, D::Error> {
3479        <Self as ::serde::Deserialize>::deserialize(d)
3480    }
3481}
3482#[doc(hidden)]
3483pub const __UPDATE_BOARD_ACL_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3484    type_url: "type.googleapis.com/collab.v1.UpdateBoardAclRequest",
3485    to_json: ::buffa::type_registry::any_to_json::<UpdateBoardAclRequest>,
3486    from_json: ::buffa::type_registry::any_from_json::<UpdateBoardAclRequest>,
3487    is_wkt: false,
3488};
3489/// UpdateBoardAclResponse returns the updated board and ACL state.
3490#[derive(Clone, PartialEq, Default)]
3491#[derive(::serde::Serialize, ::serde::Deserialize)]
3492#[serde(default)]
3493pub struct UpdateBoardAclResponse {
3494    /// Updated board metadata.
3495    ///
3496    /// Field 1: `board`
3497    #[serde(
3498        rename = "board",
3499        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3500    )]
3501    pub board: ::buffa::MessageField<Board>,
3502    /// Stored ACL entries after replacement, ordered by creation time, subject type, then subject ID.
3503    ///
3504    /// Field 2: `acl_entries`
3505    #[serde(
3506        rename = "aclEntries",
3507        alias = "acl_entries",
3508        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3509        deserialize_with = "::buffa::json_helpers::null_as_default"
3510    )]
3511    pub acl_entries: ::buffa::alloc::vec::Vec<BoardAclEntry>,
3512    /// Resolved caller access.
3513    ///
3514    /// Field 3: `access`
3515    #[serde(
3516        rename = "access",
3517        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3518    )]
3519    pub access: ::buffa::MessageField<BoardAccess>,
3520    #[serde(skip)]
3521    #[doc(hidden)]
3522    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3523}
3524impl ::core::fmt::Debug for UpdateBoardAclResponse {
3525    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3526        f.debug_struct("UpdateBoardAclResponse")
3527            .field("board", &self.board)
3528            .field("acl_entries", &self.acl_entries)
3529            .field("access", &self.access)
3530            .finish()
3531    }
3532}
3533impl UpdateBoardAclResponse {
3534    /// Protobuf type URL for this message, for use with `Any::pack` and
3535    /// `Any::unpack_if`.
3536    ///
3537    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3538    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardAclResponse";
3539}
3540::buffa::impl_default_instance!(UpdateBoardAclResponse);
3541impl ::buffa::MessageName for UpdateBoardAclResponse {
3542    const PACKAGE: &'static str = "collab.v1";
3543    const NAME: &'static str = "UpdateBoardAclResponse";
3544    const FULL_NAME: &'static str = "collab.v1.UpdateBoardAclResponse";
3545    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardAclResponse";
3546}
3547impl ::buffa::Message for UpdateBoardAclResponse {
3548    /// Returns the total encoded size in bytes.
3549    ///
3550    /// The result is a `u32`; the protobuf specification requires all
3551    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3552    /// compliant message will never overflow this type.
3553    #[allow(clippy::let_and_return)]
3554    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3555        #[allow(unused_imports)]
3556        use ::buffa::Enumeration as _;
3557        let mut size = 0u32;
3558        if self.board.is_set() {
3559            let __slot = __cache.reserve();
3560            let inner_size = self.board.compute_size(__cache);
3561            __cache.set(__slot, inner_size);
3562            size
3563                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3564                    + inner_size;
3565        }
3566        for v in &self.acl_entries {
3567            let __slot = __cache.reserve();
3568            let inner_size = v.compute_size(__cache);
3569            __cache.set(__slot, inner_size);
3570            size
3571                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3572                    + inner_size;
3573        }
3574        if self.access.is_set() {
3575            let __slot = __cache.reserve();
3576            let inner_size = self.access.compute_size(__cache);
3577            __cache.set(__slot, inner_size);
3578            size
3579                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3580                    + inner_size;
3581        }
3582        size += self.__buffa_unknown_fields.encoded_len() as u32;
3583        size
3584    }
3585    fn write_to(
3586        &self,
3587        __cache: &mut ::buffa::SizeCache,
3588        buf: &mut impl ::buffa::bytes::BufMut,
3589    ) {
3590        #[allow(unused_imports)]
3591        use ::buffa::Enumeration as _;
3592        if self.board.is_set() {
3593            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
3594            self.board.write_to(__cache, buf);
3595        }
3596        for v in &self.acl_entries {
3597            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
3598            v.write_to(__cache, buf);
3599        }
3600        if self.access.is_set() {
3601            ::buffa::types::put_len_delimited_header(3u32, __cache.consume_next(), buf);
3602            self.access.write_to(__cache, buf);
3603        }
3604        self.__buffa_unknown_fields.write_to(buf);
3605    }
3606    fn merge_field(
3607        &mut self,
3608        tag: ::buffa::encoding::Tag,
3609        buf: &mut impl ::buffa::bytes::Buf,
3610        ctx: ::buffa::DecodeContext<'_>,
3611    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3612        #[allow(unused_imports)]
3613        use ::buffa::bytes::Buf as _;
3614        #[allow(unused_imports)]
3615        use ::buffa::Enumeration as _;
3616        match tag.field_number() {
3617            1u32 => {
3618                ::buffa::encoding::check_wire_type(
3619                    tag,
3620                    ::buffa::encoding::WireType::LengthDelimited,
3621                )?;
3622                ::buffa::Message::merge_length_delimited(
3623                    self.board.get_or_insert_default(),
3624                    buf,
3625                    ctx,
3626                )?;
3627            }
3628            2u32 => {
3629                ::buffa::encoding::check_wire_type(
3630                    tag,
3631                    ::buffa::encoding::WireType::LengthDelimited,
3632                )?;
3633                let mut elem = ::core::default::Default::default();
3634                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
3635                self.acl_entries.push(elem);
3636            }
3637            3u32 => {
3638                ::buffa::encoding::check_wire_type(
3639                    tag,
3640                    ::buffa::encoding::WireType::LengthDelimited,
3641                )?;
3642                ::buffa::Message::merge_length_delimited(
3643                    self.access.get_or_insert_default(),
3644                    buf,
3645                    ctx,
3646                )?;
3647            }
3648            _ => {
3649                self.__buffa_unknown_fields
3650                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3651            }
3652        }
3653        ::core::result::Result::Ok(())
3654    }
3655    fn clear(&mut self) {
3656        self.board = ::buffa::MessageField::none();
3657        self.acl_entries.clear();
3658        self.access = ::buffa::MessageField::none();
3659        self.__buffa_unknown_fields.clear();
3660    }
3661}
3662impl ::buffa::ExtensionSet for UpdateBoardAclResponse {
3663    const PROTO_FQN: &'static str = "collab.v1.UpdateBoardAclResponse";
3664    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3665        &self.__buffa_unknown_fields
3666    }
3667    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3668        &mut self.__buffa_unknown_fields
3669    }
3670}
3671impl ::buffa::json_helpers::ProtoElemJson for UpdateBoardAclResponse {
3672    fn serialize_proto_json<S: ::serde::Serializer>(
3673        v: &Self,
3674        s: S,
3675    ) -> ::core::result::Result<S::Ok, S::Error> {
3676        ::serde::Serialize::serialize(v, s)
3677    }
3678    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3679        d: D,
3680    ) -> ::core::result::Result<Self, D::Error> {
3681        <Self as ::serde::Deserialize>::deserialize(d)
3682    }
3683}
3684#[doc(hidden)]
3685pub const __UPDATE_BOARD_ACL_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3686    type_url: "type.googleapis.com/collab.v1.UpdateBoardAclResponse",
3687    to_json: ::buffa::type_registry::any_to_json::<UpdateBoardAclResponse>,
3688    from_json: ::buffa::type_registry::any_from_json::<UpdateBoardAclResponse>,
3689    is_wkt: false,
3690};
3691/// ArchiveBoardRequest archives or unarchives a board.
3692#[derive(Clone, PartialEq, Default)]
3693#[derive(::serde::Serialize, ::serde::Deserialize)]
3694#[serde(default)]
3695pub struct ArchiveBoardRequest {
3696    /// Board identifier as a UUID string.
3697    ///
3698    /// Field 1: `board_id`
3699    #[serde(
3700        rename = "boardId",
3701        alias = "board_id",
3702        with = "::buffa::json_helpers::proto_string",
3703        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3704    )]
3705    pub board_id: ::buffa::alloc::string::String,
3706    /// Target archive state. True archives the board, false restores it.
3707    ///
3708    /// Field 2: `archived`
3709    #[serde(
3710        rename = "archived",
3711        with = "::buffa::json_helpers::proto_bool",
3712        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
3713    )]
3714    pub archived: bool,
3715    #[serde(skip)]
3716    #[doc(hidden)]
3717    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3718}
3719impl ::core::fmt::Debug for ArchiveBoardRequest {
3720    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3721        f.debug_struct("ArchiveBoardRequest")
3722            .field("board_id", &self.board_id)
3723            .field("archived", &self.archived)
3724            .finish()
3725    }
3726}
3727impl ArchiveBoardRequest {
3728    /// Protobuf type URL for this message, for use with `Any::pack` and
3729    /// `Any::unpack_if`.
3730    ///
3731    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3732    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ArchiveBoardRequest";
3733}
3734::buffa::impl_default_instance!(ArchiveBoardRequest);
3735impl ::buffa::MessageName for ArchiveBoardRequest {
3736    const PACKAGE: &'static str = "collab.v1";
3737    const NAME: &'static str = "ArchiveBoardRequest";
3738    const FULL_NAME: &'static str = "collab.v1.ArchiveBoardRequest";
3739    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ArchiveBoardRequest";
3740}
3741impl ::buffa::Message for ArchiveBoardRequest {
3742    /// Returns the total encoded size in bytes.
3743    ///
3744    /// The result is a `u32`; the protobuf specification requires all
3745    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3746    /// compliant message will never overflow this type.
3747    #[allow(clippy::let_and_return)]
3748    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3749        #[allow(unused_imports)]
3750        use ::buffa::Enumeration as _;
3751        let mut size = 0u32;
3752        if !self.board_id.is_empty() {
3753            size += 1u32 + ::buffa::types::string_encoded_len(&self.board_id) as u32;
3754        }
3755        if self.archived {
3756            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3757        }
3758        size += self.__buffa_unknown_fields.encoded_len() as u32;
3759        size
3760    }
3761    fn write_to(
3762        &self,
3763        _cache: &mut ::buffa::SizeCache,
3764        buf: &mut impl ::buffa::bytes::BufMut,
3765    ) {
3766        #[allow(unused_imports)]
3767        use ::buffa::Enumeration as _;
3768        if !self.board_id.is_empty() {
3769            ::buffa::types::put_string_field(1u32, &self.board_id, buf);
3770        }
3771        if self.archived {
3772            ::buffa::types::put_bool_field(2u32, self.archived, buf);
3773        }
3774        self.__buffa_unknown_fields.write_to(buf);
3775    }
3776    fn merge_field(
3777        &mut self,
3778        tag: ::buffa::encoding::Tag,
3779        buf: &mut impl ::buffa::bytes::Buf,
3780        ctx: ::buffa::DecodeContext<'_>,
3781    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3782        #[allow(unused_imports)]
3783        use ::buffa::bytes::Buf as _;
3784        #[allow(unused_imports)]
3785        use ::buffa::Enumeration as _;
3786        match tag.field_number() {
3787            1u32 => {
3788                ::buffa::encoding::check_wire_type(
3789                    tag,
3790                    ::buffa::encoding::WireType::LengthDelimited,
3791                )?;
3792                ::buffa::types::merge_string(&mut self.board_id, buf)?;
3793            }
3794            2u32 => {
3795                ::buffa::encoding::check_wire_type(
3796                    tag,
3797                    ::buffa::encoding::WireType::Varint,
3798                )?;
3799                self.archived = ::buffa::types::decode_bool(buf)?;
3800            }
3801            _ => {
3802                self.__buffa_unknown_fields
3803                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3804            }
3805        }
3806        ::core::result::Result::Ok(())
3807    }
3808    fn clear(&mut self) {
3809        self.board_id.clear();
3810        self.archived = false;
3811        self.__buffa_unknown_fields.clear();
3812    }
3813}
3814impl ::buffa::ExtensionSet for ArchiveBoardRequest {
3815    const PROTO_FQN: &'static str = "collab.v1.ArchiveBoardRequest";
3816    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3817        &self.__buffa_unknown_fields
3818    }
3819    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3820        &mut self.__buffa_unknown_fields
3821    }
3822}
3823impl ::buffa::json_helpers::ProtoElemJson for ArchiveBoardRequest {
3824    fn serialize_proto_json<S: ::serde::Serializer>(
3825        v: &Self,
3826        s: S,
3827    ) -> ::core::result::Result<S::Ok, S::Error> {
3828        ::serde::Serialize::serialize(v, s)
3829    }
3830    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3831        d: D,
3832    ) -> ::core::result::Result<Self, D::Error> {
3833        <Self as ::serde::Deserialize>::deserialize(d)
3834    }
3835}
3836#[doc(hidden)]
3837pub const __ARCHIVE_BOARD_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3838    type_url: "type.googleapis.com/collab.v1.ArchiveBoardRequest",
3839    to_json: ::buffa::type_registry::any_to_json::<ArchiveBoardRequest>,
3840    from_json: ::buffa::type_registry::any_from_json::<ArchiveBoardRequest>,
3841    is_wkt: false,
3842};
3843/// ArchiveBoardResponse returns the updated archive state.
3844#[derive(Clone, PartialEq, Default)]
3845#[derive(::serde::Serialize, ::serde::Deserialize)]
3846#[serde(default)]
3847pub struct ArchiveBoardResponse {
3848    /// Updated board metadata.
3849    ///
3850    /// Field 1: `board`
3851    #[serde(
3852        rename = "board",
3853        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3854    )]
3855    pub board: ::buffa::MessageField<Board>,
3856    /// Resolved caller access.
3857    ///
3858    /// Field 2: `access`
3859    #[serde(
3860        rename = "access",
3861        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3862    )]
3863    pub access: ::buffa::MessageField<BoardAccess>,
3864    #[serde(skip)]
3865    #[doc(hidden)]
3866    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3867}
3868impl ::core::fmt::Debug for ArchiveBoardResponse {
3869    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3870        f.debug_struct("ArchiveBoardResponse")
3871            .field("board", &self.board)
3872            .field("access", &self.access)
3873            .finish()
3874    }
3875}
3876impl ArchiveBoardResponse {
3877    /// Protobuf type URL for this message, for use with `Any::pack` and
3878    /// `Any::unpack_if`.
3879    ///
3880    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3881    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ArchiveBoardResponse";
3882}
3883::buffa::impl_default_instance!(ArchiveBoardResponse);
3884impl ::buffa::MessageName for ArchiveBoardResponse {
3885    const PACKAGE: &'static str = "collab.v1";
3886    const NAME: &'static str = "ArchiveBoardResponse";
3887    const FULL_NAME: &'static str = "collab.v1.ArchiveBoardResponse";
3888    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ArchiveBoardResponse";
3889}
3890impl ::buffa::Message for ArchiveBoardResponse {
3891    /// Returns the total encoded size in bytes.
3892    ///
3893    /// The result is a `u32`; the protobuf specification requires all
3894    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3895    /// compliant message will never overflow this type.
3896    #[allow(clippy::let_and_return)]
3897    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3898        #[allow(unused_imports)]
3899        use ::buffa::Enumeration as _;
3900        let mut size = 0u32;
3901        if self.board.is_set() {
3902            let __slot = __cache.reserve();
3903            let inner_size = self.board.compute_size(__cache);
3904            __cache.set(__slot, inner_size);
3905            size
3906                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3907                    + inner_size;
3908        }
3909        if self.access.is_set() {
3910            let __slot = __cache.reserve();
3911            let inner_size = self.access.compute_size(__cache);
3912            __cache.set(__slot, inner_size);
3913            size
3914                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3915                    + inner_size;
3916        }
3917        size += self.__buffa_unknown_fields.encoded_len() as u32;
3918        size
3919    }
3920    fn write_to(
3921        &self,
3922        __cache: &mut ::buffa::SizeCache,
3923        buf: &mut impl ::buffa::bytes::BufMut,
3924    ) {
3925        #[allow(unused_imports)]
3926        use ::buffa::Enumeration as _;
3927        if self.board.is_set() {
3928            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
3929            self.board.write_to(__cache, buf);
3930        }
3931        if self.access.is_set() {
3932            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
3933            self.access.write_to(__cache, buf);
3934        }
3935        self.__buffa_unknown_fields.write_to(buf);
3936    }
3937    fn merge_field(
3938        &mut self,
3939        tag: ::buffa::encoding::Tag,
3940        buf: &mut impl ::buffa::bytes::Buf,
3941        ctx: ::buffa::DecodeContext<'_>,
3942    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3943        #[allow(unused_imports)]
3944        use ::buffa::bytes::Buf as _;
3945        #[allow(unused_imports)]
3946        use ::buffa::Enumeration as _;
3947        match tag.field_number() {
3948            1u32 => {
3949                ::buffa::encoding::check_wire_type(
3950                    tag,
3951                    ::buffa::encoding::WireType::LengthDelimited,
3952                )?;
3953                ::buffa::Message::merge_length_delimited(
3954                    self.board.get_or_insert_default(),
3955                    buf,
3956                    ctx,
3957                )?;
3958            }
3959            2u32 => {
3960                ::buffa::encoding::check_wire_type(
3961                    tag,
3962                    ::buffa::encoding::WireType::LengthDelimited,
3963                )?;
3964                ::buffa::Message::merge_length_delimited(
3965                    self.access.get_or_insert_default(),
3966                    buf,
3967                    ctx,
3968                )?;
3969            }
3970            _ => {
3971                self.__buffa_unknown_fields
3972                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3973            }
3974        }
3975        ::core::result::Result::Ok(())
3976    }
3977    fn clear(&mut self) {
3978        self.board = ::buffa::MessageField::none();
3979        self.access = ::buffa::MessageField::none();
3980        self.__buffa_unknown_fields.clear();
3981    }
3982}
3983impl ::buffa::ExtensionSet for ArchiveBoardResponse {
3984    const PROTO_FQN: &'static str = "collab.v1.ArchiveBoardResponse";
3985    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3986        &self.__buffa_unknown_fields
3987    }
3988    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3989        &mut self.__buffa_unknown_fields
3990    }
3991}
3992impl ::buffa::json_helpers::ProtoElemJson for ArchiveBoardResponse {
3993    fn serialize_proto_json<S: ::serde::Serializer>(
3994        v: &Self,
3995        s: S,
3996    ) -> ::core::result::Result<S::Ok, S::Error> {
3997        ::serde::Serialize::serialize(v, s)
3998    }
3999    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4000        d: D,
4001    ) -> ::core::result::Result<Self, D::Error> {
4002        <Self as ::serde::Deserialize>::deserialize(d)
4003    }
4004}
4005#[doc(hidden)]
4006pub const __ARCHIVE_BOARD_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4007    type_url: "type.googleapis.com/collab.v1.ArchiveBoardResponse",
4008    to_json: ::buffa::type_registry::any_to_json::<ArchiveBoardResponse>,
4009    from_json: ::buffa::type_registry::any_from_json::<ArchiveBoardResponse>,
4010    is_wkt: false,
4011};
4012/// MintJoinTokenRequest resolves access and mints a short-lived room admission token.
4013#[derive(Clone, PartialEq, Default)]
4014#[derive(::serde::Serialize, ::serde::Deserialize)]
4015#[serde(default)]
4016pub struct MintJoinTokenRequest {
4017    /// Board identifier as a UUID string.
4018    ///
4019    /// Field 1: `board_id`
4020    #[serde(
4021        rename = "boardId",
4022        alias = "board_id",
4023        with = "::buffa::json_helpers::proto_string",
4024        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4025    )]
4026    pub board_id: ::buffa::alloc::string::String,
4027    #[serde(skip)]
4028    #[doc(hidden)]
4029    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4030}
4031impl ::core::fmt::Debug for MintJoinTokenRequest {
4032    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4033        f.debug_struct("MintJoinTokenRequest").field("board_id", &self.board_id).finish()
4034    }
4035}
4036impl MintJoinTokenRequest {
4037    /// Protobuf type URL for this message, for use with `Any::pack` and
4038    /// `Any::unpack_if`.
4039    ///
4040    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4041    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.MintJoinTokenRequest";
4042}
4043::buffa::impl_default_instance!(MintJoinTokenRequest);
4044impl ::buffa::MessageName for MintJoinTokenRequest {
4045    const PACKAGE: &'static str = "collab.v1";
4046    const NAME: &'static str = "MintJoinTokenRequest";
4047    const FULL_NAME: &'static str = "collab.v1.MintJoinTokenRequest";
4048    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.MintJoinTokenRequest";
4049}
4050impl ::buffa::Message for MintJoinTokenRequest {
4051    /// Returns the total encoded size in bytes.
4052    ///
4053    /// The result is a `u32`; the protobuf specification requires all
4054    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4055    /// compliant message will never overflow this type.
4056    #[allow(clippy::let_and_return)]
4057    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4058        #[allow(unused_imports)]
4059        use ::buffa::Enumeration as _;
4060        let mut size = 0u32;
4061        if !self.board_id.is_empty() {
4062            size += 1u32 + ::buffa::types::string_encoded_len(&self.board_id) as u32;
4063        }
4064        size += self.__buffa_unknown_fields.encoded_len() as u32;
4065        size
4066    }
4067    fn write_to(
4068        &self,
4069        _cache: &mut ::buffa::SizeCache,
4070        buf: &mut impl ::buffa::bytes::BufMut,
4071    ) {
4072        #[allow(unused_imports)]
4073        use ::buffa::Enumeration as _;
4074        if !self.board_id.is_empty() {
4075            ::buffa::types::put_string_field(1u32, &self.board_id, buf);
4076        }
4077        self.__buffa_unknown_fields.write_to(buf);
4078    }
4079    fn merge_field(
4080        &mut self,
4081        tag: ::buffa::encoding::Tag,
4082        buf: &mut impl ::buffa::bytes::Buf,
4083        ctx: ::buffa::DecodeContext<'_>,
4084    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4085        #[allow(unused_imports)]
4086        use ::buffa::bytes::Buf as _;
4087        #[allow(unused_imports)]
4088        use ::buffa::Enumeration as _;
4089        match tag.field_number() {
4090            1u32 => {
4091                ::buffa::encoding::check_wire_type(
4092                    tag,
4093                    ::buffa::encoding::WireType::LengthDelimited,
4094                )?;
4095                ::buffa::types::merge_string(&mut self.board_id, buf)?;
4096            }
4097            _ => {
4098                self.__buffa_unknown_fields
4099                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
4100            }
4101        }
4102        ::core::result::Result::Ok(())
4103    }
4104    fn clear(&mut self) {
4105        self.board_id.clear();
4106        self.__buffa_unknown_fields.clear();
4107    }
4108}
4109impl ::buffa::ExtensionSet for MintJoinTokenRequest {
4110    const PROTO_FQN: &'static str = "collab.v1.MintJoinTokenRequest";
4111    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4112        &self.__buffa_unknown_fields
4113    }
4114    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4115        &mut self.__buffa_unknown_fields
4116    }
4117}
4118impl ::buffa::json_helpers::ProtoElemJson for MintJoinTokenRequest {
4119    fn serialize_proto_json<S: ::serde::Serializer>(
4120        v: &Self,
4121        s: S,
4122    ) -> ::core::result::Result<S::Ok, S::Error> {
4123        ::serde::Serialize::serialize(v, s)
4124    }
4125    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4126        d: D,
4127    ) -> ::core::result::Result<Self, D::Error> {
4128        <Self as ::serde::Deserialize>::deserialize(d)
4129    }
4130}
4131#[doc(hidden)]
4132pub const __MINT_JOIN_TOKEN_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4133    type_url: "type.googleapis.com/collab.v1.MintJoinTokenRequest",
4134    to_json: ::buffa::type_registry::any_to_json::<MintJoinTokenRequest>,
4135    from_json: ::buffa::type_registry::any_from_json::<MintJoinTokenRequest>,
4136    is_wkt: false,
4137};
4138/// MintJoinTokenResponse returns the signed room admission contract for the caller.
4139#[derive(Clone, PartialEq, Default)]
4140#[derive(::serde::Serialize, ::serde::Deserialize)]
4141#[serde(default)]
4142pub struct MintJoinTokenResponse {
4143    /// Board identifier as a UUID string.
4144    ///
4145    /// Field 1: `board_id`
4146    #[serde(
4147        rename = "boardId",
4148        alias = "board_id",
4149        with = "::buffa::json_helpers::proto_string",
4150        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4151    )]
4152    pub board_id: ::buffa::alloc::string::String,
4153    /// Resolved caller access for the board.
4154    ///
4155    /// Field 2: `access`
4156    #[serde(
4157        rename = "access",
4158        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4159    )]
4160    pub access: ::buffa::MessageField<BoardAccess>,
4161    /// Token expiry time in UTC. Join tokens expire 5 minutes after issuance.
4162    ///
4163    /// Field 3: `expires_at`
4164    #[serde(
4165        rename = "expiresAt",
4166        alias = "expires_at",
4167        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4168    )]
4169    pub expires_at: ::buffa::MessageField<::buffa_types::google::protobuf::Timestamp>,
4170    /// Signed short-lived room admission token.
4171    ///
4172    /// Field 4: `token`
4173    #[serde(
4174        rename = "token",
4175        with = "::buffa::json_helpers::proto_string",
4176        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4177    )]
4178    pub token: ::buffa::alloc::string::String,
4179    /// Room identifier the client should join. This is the board ID.
4180    ///
4181    /// Field 5: `room_id`
4182    #[serde(
4183        rename = "roomId",
4184        alias = "room_id",
4185        with = "::buffa::json_helpers::proto_string",
4186        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4187    )]
4188    pub room_id: ::buffa::alloc::string::String,
4189    /// Unique connection identifier embedded in the token.
4190    ///
4191    /// Field 6: `connection_id`
4192    #[serde(
4193        rename = "connectionId",
4194        alias = "connection_id",
4195        with = "::buffa::json_helpers::proto_string",
4196        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4197    )]
4198    pub connection_id: ::buffa::alloc::string::String,
4199    /// Realtime room URL the client should connect to.
4200    ///
4201    /// Field 7: `socket_path`
4202    #[serde(
4203        rename = "socketPath",
4204        alias = "socket_path",
4205        with = "::buffa::json_helpers::proto_string",
4206        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4207    )]
4208    pub socket_path: ::buffa::alloc::string::String,
4209    /// Lightweight local presence payload for the caller.
4210    ///
4211    /// Field 8: `presence`
4212    #[serde(
4213        rename = "presence",
4214        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4215    )]
4216    pub presence: ::buffa::MessageField<PresencePayload>,
4217    /// Access version embedded in the token; clients must refresh when the board access version changes.
4218    ///
4219    /// Field 9: `access_version`
4220    #[serde(
4221        rename = "accessVersion",
4222        alias = "access_version",
4223        with = "::buffa::json_helpers::uint64",
4224        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4225    )]
4226    pub access_version: u64,
4227    #[serde(skip)]
4228    #[doc(hidden)]
4229    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4230}
4231impl ::core::fmt::Debug for MintJoinTokenResponse {
4232    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4233        f.debug_struct("MintJoinTokenResponse")
4234            .field("board_id", &self.board_id)
4235            .field("access", &self.access)
4236            .field("expires_at", &self.expires_at)
4237            .field("token", &self.token)
4238            .field("room_id", &self.room_id)
4239            .field("connection_id", &self.connection_id)
4240            .field("socket_path", &self.socket_path)
4241            .field("presence", &self.presence)
4242            .field("access_version", &self.access_version)
4243            .finish()
4244    }
4245}
4246impl MintJoinTokenResponse {
4247    /// Protobuf type URL for this message, for use with `Any::pack` and
4248    /// `Any::unpack_if`.
4249    ///
4250    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4251    pub const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.MintJoinTokenResponse";
4252}
4253::buffa::impl_default_instance!(MintJoinTokenResponse);
4254impl ::buffa::MessageName for MintJoinTokenResponse {
4255    const PACKAGE: &'static str = "collab.v1";
4256    const NAME: &'static str = "MintJoinTokenResponse";
4257    const FULL_NAME: &'static str = "collab.v1.MintJoinTokenResponse";
4258    const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.MintJoinTokenResponse";
4259}
4260impl ::buffa::Message for MintJoinTokenResponse {
4261    /// Returns the total encoded size in bytes.
4262    ///
4263    /// The result is a `u32`; the protobuf specification requires all
4264    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4265    /// compliant message will never overflow this type.
4266    #[allow(clippy::let_and_return)]
4267    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4268        #[allow(unused_imports)]
4269        use ::buffa::Enumeration as _;
4270        let mut size = 0u32;
4271        if !self.board_id.is_empty() {
4272            size += 1u32 + ::buffa::types::string_encoded_len(&self.board_id) as u32;
4273        }
4274        if self.access.is_set() {
4275            let __slot = __cache.reserve();
4276            let inner_size = self.access.compute_size(__cache);
4277            __cache.set(__slot, inner_size);
4278            size
4279                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4280                    + inner_size;
4281        }
4282        if self.expires_at.is_set() {
4283            let __slot = __cache.reserve();
4284            let inner_size = self.expires_at.compute_size(__cache);
4285            __cache.set(__slot, inner_size);
4286            size
4287                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4288                    + inner_size;
4289        }
4290        if !self.token.is_empty() {
4291            size += 1u32 + ::buffa::types::string_encoded_len(&self.token) as u32;
4292        }
4293        if !self.room_id.is_empty() {
4294            size += 1u32 + ::buffa::types::string_encoded_len(&self.room_id) as u32;
4295        }
4296        if !self.connection_id.is_empty() {
4297            size
4298                += 1u32 + ::buffa::types::string_encoded_len(&self.connection_id) as u32;
4299        }
4300        if !self.socket_path.is_empty() {
4301            size += 1u32 + ::buffa::types::string_encoded_len(&self.socket_path) as u32;
4302        }
4303        if self.presence.is_set() {
4304            let __slot = __cache.reserve();
4305            let inner_size = self.presence.compute_size(__cache);
4306            __cache.set(__slot, inner_size);
4307            size
4308                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4309                    + inner_size;
4310        }
4311        if self.access_version != 0u64 {
4312            size
4313                += 1u32 + ::buffa::types::uint64_encoded_len(self.access_version) as u32;
4314        }
4315        size += self.__buffa_unknown_fields.encoded_len() as u32;
4316        size
4317    }
4318    fn write_to(
4319        &self,
4320        __cache: &mut ::buffa::SizeCache,
4321        buf: &mut impl ::buffa::bytes::BufMut,
4322    ) {
4323        #[allow(unused_imports)]
4324        use ::buffa::Enumeration as _;
4325        if !self.board_id.is_empty() {
4326            ::buffa::types::put_string_field(1u32, &self.board_id, buf);
4327        }
4328        if self.access.is_set() {
4329            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
4330            self.access.write_to(__cache, buf);
4331        }
4332        if self.expires_at.is_set() {
4333            ::buffa::types::put_len_delimited_header(3u32, __cache.consume_next(), buf);
4334            self.expires_at.write_to(__cache, buf);
4335        }
4336        if !self.token.is_empty() {
4337            ::buffa::types::put_string_field(4u32, &self.token, buf);
4338        }
4339        if !self.room_id.is_empty() {
4340            ::buffa::types::put_string_field(5u32, &self.room_id, buf);
4341        }
4342        if !self.connection_id.is_empty() {
4343            ::buffa::types::put_string_field(6u32, &self.connection_id, buf);
4344        }
4345        if !self.socket_path.is_empty() {
4346            ::buffa::types::put_string_field(7u32, &self.socket_path, buf);
4347        }
4348        if self.presence.is_set() {
4349            ::buffa::types::put_len_delimited_header(8u32, __cache.consume_next(), buf);
4350            self.presence.write_to(__cache, buf);
4351        }
4352        if self.access_version != 0u64 {
4353            ::buffa::types::put_uint64_field(9u32, self.access_version, buf);
4354        }
4355        self.__buffa_unknown_fields.write_to(buf);
4356    }
4357    fn merge_field(
4358        &mut self,
4359        tag: ::buffa::encoding::Tag,
4360        buf: &mut impl ::buffa::bytes::Buf,
4361        ctx: ::buffa::DecodeContext<'_>,
4362    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4363        #[allow(unused_imports)]
4364        use ::buffa::bytes::Buf as _;
4365        #[allow(unused_imports)]
4366        use ::buffa::Enumeration as _;
4367        match tag.field_number() {
4368            1u32 => {
4369                ::buffa::encoding::check_wire_type(
4370                    tag,
4371                    ::buffa::encoding::WireType::LengthDelimited,
4372                )?;
4373                ::buffa::types::merge_string(&mut self.board_id, buf)?;
4374            }
4375            2u32 => {
4376                ::buffa::encoding::check_wire_type(
4377                    tag,
4378                    ::buffa::encoding::WireType::LengthDelimited,
4379                )?;
4380                ::buffa::Message::merge_length_delimited(
4381                    self.access.get_or_insert_default(),
4382                    buf,
4383                    ctx,
4384                )?;
4385            }
4386            3u32 => {
4387                ::buffa::encoding::check_wire_type(
4388                    tag,
4389                    ::buffa::encoding::WireType::LengthDelimited,
4390                )?;
4391                ::buffa::Message::merge_length_delimited(
4392                    self.expires_at.get_or_insert_default(),
4393                    buf,
4394                    ctx,
4395                )?;
4396            }
4397            4u32 => {
4398                ::buffa::encoding::check_wire_type(
4399                    tag,
4400                    ::buffa::encoding::WireType::LengthDelimited,
4401                )?;
4402                ::buffa::types::merge_string(&mut self.token, buf)?;
4403            }
4404            5u32 => {
4405                ::buffa::encoding::check_wire_type(
4406                    tag,
4407                    ::buffa::encoding::WireType::LengthDelimited,
4408                )?;
4409                ::buffa::types::merge_string(&mut self.room_id, buf)?;
4410            }
4411            6u32 => {
4412                ::buffa::encoding::check_wire_type(
4413                    tag,
4414                    ::buffa::encoding::WireType::LengthDelimited,
4415                )?;
4416                ::buffa::types::merge_string(&mut self.connection_id, buf)?;
4417            }
4418            7u32 => {
4419                ::buffa::encoding::check_wire_type(
4420                    tag,
4421                    ::buffa::encoding::WireType::LengthDelimited,
4422                )?;
4423                ::buffa::types::merge_string(&mut self.socket_path, buf)?;
4424            }
4425            8u32 => {
4426                ::buffa::encoding::check_wire_type(
4427                    tag,
4428                    ::buffa::encoding::WireType::LengthDelimited,
4429                )?;
4430                ::buffa::Message::merge_length_delimited(
4431                    self.presence.get_or_insert_default(),
4432                    buf,
4433                    ctx,
4434                )?;
4435            }
4436            9u32 => {
4437                ::buffa::encoding::check_wire_type(
4438                    tag,
4439                    ::buffa::encoding::WireType::Varint,
4440                )?;
4441                self.access_version = ::buffa::types::decode_uint64(buf)?;
4442            }
4443            _ => {
4444                self.__buffa_unknown_fields
4445                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
4446            }
4447        }
4448        ::core::result::Result::Ok(())
4449    }
4450    fn clear(&mut self) {
4451        self.board_id.clear();
4452        self.access = ::buffa::MessageField::none();
4453        self.expires_at = ::buffa::MessageField::none();
4454        self.token.clear();
4455        self.room_id.clear();
4456        self.connection_id.clear();
4457        self.socket_path.clear();
4458        self.presence = ::buffa::MessageField::none();
4459        self.access_version = 0u64;
4460        self.__buffa_unknown_fields.clear();
4461    }
4462}
4463impl ::buffa::ExtensionSet for MintJoinTokenResponse {
4464    const PROTO_FQN: &'static str = "collab.v1.MintJoinTokenResponse";
4465    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4466        &self.__buffa_unknown_fields
4467    }
4468    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4469        &mut self.__buffa_unknown_fields
4470    }
4471}
4472impl ::buffa::json_helpers::ProtoElemJson for MintJoinTokenResponse {
4473    fn serialize_proto_json<S: ::serde::Serializer>(
4474        v: &Self,
4475        s: S,
4476    ) -> ::core::result::Result<S::Ok, S::Error> {
4477        ::serde::Serialize::serialize(v, s)
4478    }
4479    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4480        d: D,
4481    ) -> ::core::result::Result<Self, D::Error> {
4482        <Self as ::serde::Deserialize>::deserialize(d)
4483    }
4484}
4485#[doc(hidden)]
4486pub const __MINT_JOIN_TOKEN_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4487    type_url: "type.googleapis.com/collab.v1.MintJoinTokenResponse",
4488    to_json: ::buffa::type_registry::any_to_json::<MintJoinTokenResponse>,
4489    from_json: ::buffa::type_registry::any_from_json::<MintJoinTokenResponse>,
4490    is_wkt: false,
4491};
4492#[allow(
4493    non_camel_case_types,
4494    dead_code,
4495    unused_imports,
4496    unused_qualifications,
4497    clippy::derivable_impls,
4498    clippy::match_single_binding,
4499    clippy::uninlined_format_args,
4500    clippy::doc_lazy_continuation,
4501    clippy::module_inception
4502)]
4503pub mod __buffa {
4504    #[allow(unused_imports)]
4505    use super::*;
4506    pub mod view {
4507        #[allow(unused_imports)]
4508        use super::*;
4509        /// BoardAclEntry grants a role to one explicit ACL subject.
4510        #[derive(Clone, Debug, Default)]
4511        pub struct BoardAclEntryView<'a> {
4512            /// Subject domain for the ACL row.
4513            ///
4514            /// Field 1: `subject_type`
4515            pub subject_type: ::buffa::EnumValue<super::super::BoardAclSubjectType>,
4516            /// Subject public ID. For USER_SUBJECT this is an account ID; for GROUP_SUBJECT this is a group ID.
4517            ///
4518            /// Field 2: `subject_id`
4519            pub subject_id: u64,
4520            /// Granted role for the subject. Only VIEWER and EDITOR are valid ACL roles.
4521            ///
4522            /// Field 3: `role`
4523            pub role: ::buffa::EnumValue<super::super::BoardRole>,
4524            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4525        }
4526        impl<'a> ::buffa::MessageView<'a> for BoardAclEntryView<'a> {
4527            type Owned = super::super::BoardAclEntry;
4528            fn decode_view(
4529                buf: &'a [u8],
4530            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4531                let __limit = ::core::cell::Cell::new(
4532                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4533                );
4534                <Self as ::buffa::MessageView>::decode_view_ctx(
4535                    buf,
4536                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4537                )
4538            }
4539            fn decode_view_with_ctx(
4540                buf: &'a [u8],
4541                ctx: ::buffa::DecodeContext<'_>,
4542            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4543                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4544            }
4545            fn merge_view_field(
4546                &mut self,
4547                tag: ::buffa::encoding::Tag,
4548                cur: &'a [u8],
4549                before_tag: &'a [u8],
4550                ctx: ::buffa::DecodeContext<'_>,
4551            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4552                let _ = ctx;
4553                #[allow(unused_variables)]
4554                let view = self;
4555                let mut cur = cur;
4556                match tag.field_number() {
4557                    1u32 => {
4558                        ::buffa::encoding::check_wire_type(
4559                            tag,
4560                            ::buffa::encoding::WireType::Varint,
4561                        )?;
4562                        view.subject_type = ::buffa::EnumValue::from(
4563                            ::buffa::types::decode_int32(&mut cur)?,
4564                        );
4565                    }
4566                    2u32 => {
4567                        ::buffa::encoding::check_wire_type(
4568                            tag,
4569                            ::buffa::encoding::WireType::Fixed64,
4570                        )?;
4571                        view.subject_id = ::buffa::types::decode_fixed64(&mut cur)?;
4572                    }
4573                    3u32 => {
4574                        ::buffa::encoding::check_wire_type(
4575                            tag,
4576                            ::buffa::encoding::WireType::Varint,
4577                        )?;
4578                        view.role = ::buffa::EnumValue::from(
4579                            ::buffa::types::decode_int32(&mut cur)?,
4580                        );
4581                    }
4582                    _ => {
4583                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4584                        let span_len = before_tag.len() - cur.len();
4585                        view.__buffa_unknown_fields
4586                            .push_record(before_tag, span_len, ctx)?;
4587                    }
4588                }
4589                ::core::result::Result::Ok(cur)
4590            }
4591            fn to_owned_message(
4592                &self,
4593            ) -> ::core::result::Result<
4594                super::super::BoardAclEntry,
4595                ::buffa::DecodeError,
4596            > {
4597                self.to_owned_from_source(None)
4598            }
4599            #[allow(clippy::useless_conversion, clippy::needless_update)]
4600            fn to_owned_from_source(
4601                &self,
4602                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4603            ) -> ::core::result::Result<
4604                super::super::BoardAclEntry,
4605                ::buffa::DecodeError,
4606            > {
4607                #[allow(unused_imports)]
4608                use ::buffa::alloc::string::ToString as _;
4609                let _ = __buffa_src;
4610                ::core::result::Result::Ok(super::super::BoardAclEntry {
4611                    subject_type: self.subject_type,
4612                    subject_id: self.subject_id,
4613                    role: self.role,
4614                    __buffa_unknown_fields: self
4615                        .__buffa_unknown_fields
4616                        .to_owned()?
4617                        .into(),
4618                    ..::core::default::Default::default()
4619                })
4620            }
4621        }
4622        impl<'a> ::buffa::ViewEncode<'a> for BoardAclEntryView<'a> {
4623            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4624            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4625                #[allow(unused_imports)]
4626                use ::buffa::Enumeration as _;
4627                let mut size = 0u32;
4628                {
4629                    let val = self.subject_type.to_i32();
4630                    if val != 0 {
4631                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4632                    }
4633                }
4634                if self.subject_id != 0u64 {
4635                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
4636                }
4637                {
4638                    let val = self.role.to_i32();
4639                    if val != 0 {
4640                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4641                    }
4642                }
4643                size += self.__buffa_unknown_fields.encoded_len() as u32;
4644                size
4645            }
4646            #[allow(clippy::needless_borrow)]
4647            fn write_to(
4648                &self,
4649                _cache: &mut ::buffa::SizeCache,
4650                buf: &mut impl ::buffa::bytes::BufMut,
4651            ) {
4652                #[allow(unused_imports)]
4653                use ::buffa::Enumeration as _;
4654                {
4655                    let val = self.subject_type.to_i32();
4656                    if val != 0 {
4657                        ::buffa::types::put_int32_field(1u32, val, buf);
4658                    }
4659                }
4660                if self.subject_id != 0u64 {
4661                    ::buffa::types::put_fixed64_field(2u32, self.subject_id, buf);
4662                }
4663                {
4664                    let val = self.role.to_i32();
4665                    if val != 0 {
4666                        ::buffa::types::put_int32_field(3u32, val, buf);
4667                    }
4668                }
4669                self.__buffa_unknown_fields.write_to(buf);
4670            }
4671        }
4672        /// Serializes this view as protobuf JSON.
4673        ///
4674        /// Implicit-presence fields with default values are omitted, `required`
4675        /// fields are always emitted, explicit-presence (`optional`) fields are
4676        /// emitted only when set, bytes fields are base64-encoded, and enum
4677        /// values are their proto name strings.
4678        ///
4679        /// This impl uses `serialize_map(None)` because the number of emitted
4680        /// fields depends on default-omission rules; serializers that require
4681        /// known map lengths (e.g. `bincode`) will return a runtime error.
4682        /// Use the owned message type for those formats.
4683        impl<'__a> ::serde::Serialize for BoardAclEntryView<'__a> {
4684            fn serialize<__S: ::serde::Serializer>(
4685                &self,
4686                __s: __S,
4687            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4688                use ::serde::ser::SerializeMap as _;
4689                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4690                if !::buffa::json_helpers::skip_if::is_default_enum_value(
4691                    &self.subject_type,
4692                ) {
4693                    __map.serialize_entry("subjectType", &self.subject_type)?;
4694                }
4695                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.subject_id) {
4696                    __map
4697                        .serialize_entry(
4698                            "subjectId",
4699                            &::buffa::json_helpers::ProtoJson(&self.subject_id),
4700                        )?;
4701                }
4702                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.role) {
4703                    __map.serialize_entry("role", &self.role)?;
4704                }
4705                __map.end()
4706            }
4707        }
4708        impl<'a> ::buffa::MessageName for BoardAclEntryView<'a> {
4709            const PACKAGE: &'static str = "collab.v1";
4710            const NAME: &'static str = "BoardAclEntry";
4711            const FULL_NAME: &'static str = "collab.v1.BoardAclEntry";
4712            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardAclEntry";
4713        }
4714        ::buffa::impl_default_view_instance!(BoardAclEntryView);
4715        ::buffa::impl_view_reborrow!(BoardAclEntryView);
4716        /** Self-contained, `'static` owned view of a `BoardAclEntry` message.
4717
4718 Wraps [`::buffa::OwnedView`]`<`[`BoardAclEntryView`]`<'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.
4719
4720 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BoardAclEntryView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4721        #[derive(Clone, Debug)]
4722        pub struct BoardAclEntryOwnedView(
4723            ::buffa::OwnedView<BoardAclEntryView<'static>>,
4724        );
4725        impl BoardAclEntryOwnedView {
4726            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4727            ///
4728            /// The view borrows directly from the buffer's data; the buffer is
4729            /// retained inside the returned handle.
4730            ///
4731            /// # Errors
4732            ///
4733            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4734            /// protobuf data.
4735            pub fn decode(
4736                bytes: ::buffa::bytes::Bytes,
4737            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4738                ::core::result::Result::Ok(
4739                    BoardAclEntryOwnedView(::buffa::OwnedView::decode(bytes)?),
4740                )
4741            }
4742            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4743            /// max message size).
4744            ///
4745            /// # Errors
4746            ///
4747            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4748            /// exceeds the configured limits.
4749            pub fn decode_with_options(
4750                bytes: ::buffa::bytes::Bytes,
4751                opts: &::buffa::DecodeOptions,
4752            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4753                ::core::result::Result::Ok(
4754                    BoardAclEntryOwnedView(
4755                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4756                    ),
4757                )
4758            }
4759            /// Build from an owned message via an encode → decode round-trip.
4760            ///
4761            /// # Errors
4762            ///
4763            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4764            /// somehow invalid (should not happen for well-formed messages).
4765            pub fn from_owned(
4766                msg: &super::super::BoardAclEntry,
4767            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4768                ::core::result::Result::Ok(
4769                    BoardAclEntryOwnedView(::buffa::OwnedView::from_owned(msg)?),
4770                )
4771            }
4772            /// Borrow the full [`BoardAclEntryView`] with its lifetime tied to `&self`.
4773            #[must_use]
4774            pub fn view(&self) -> &BoardAclEntryView<'_> {
4775                self.0.reborrow()
4776            }
4777            /// Convert to the owned message type.
4778            ///
4779            /// # Errors
4780            ///
4781            /// Returns an error if re-materializing preserved unknown fields
4782            /// fails (e.g. the unknown-field limit is exceeded).
4783            pub fn to_owned_message(
4784                &self,
4785            ) -> ::core::result::Result<
4786                super::super::BoardAclEntry,
4787                ::buffa::DecodeError,
4788            > {
4789                self.0.to_owned_message()
4790            }
4791            /// The underlying bytes buffer.
4792            #[must_use]
4793            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4794                self.0.bytes()
4795            }
4796            /// Consume the handle, returning the underlying bytes buffer.
4797            #[must_use]
4798            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4799                self.0.into_bytes()
4800            }
4801            /// Subject domain for the ACL row.
4802            ///
4803            /// Field 1: `subject_type`
4804            #[must_use]
4805            pub fn subject_type(
4806                &self,
4807            ) -> ::buffa::EnumValue<super::super::BoardAclSubjectType> {
4808                self.0.reborrow().subject_type
4809            }
4810            /// Subject public ID. For USER_SUBJECT this is an account ID; for GROUP_SUBJECT this is a group ID.
4811            ///
4812            /// Field 2: `subject_id`
4813            #[must_use]
4814            pub fn subject_id(&self) -> u64 {
4815                self.0.reborrow().subject_id
4816            }
4817            /// Granted role for the subject. Only VIEWER and EDITOR are valid ACL roles.
4818            ///
4819            /// Field 3: `role`
4820            #[must_use]
4821            pub fn role(&self) -> ::buffa::EnumValue<super::super::BoardRole> {
4822                self.0.reborrow().role
4823            }
4824        }
4825        impl ::core::convert::From<::buffa::OwnedView<BoardAclEntryView<'static>>>
4826        for BoardAclEntryOwnedView {
4827            fn from(inner: ::buffa::OwnedView<BoardAclEntryView<'static>>) -> Self {
4828                BoardAclEntryOwnedView(inner)
4829            }
4830        }
4831        impl ::core::convert::From<BoardAclEntryOwnedView>
4832        for ::buffa::OwnedView<BoardAclEntryView<'static>> {
4833            fn from(wrapper: BoardAclEntryOwnedView) -> Self {
4834                wrapper.0
4835            }
4836        }
4837        impl ::core::convert::AsRef<::buffa::OwnedView<BoardAclEntryView<'static>>>
4838        for BoardAclEntryOwnedView {
4839            fn as_ref(&self) -> &::buffa::OwnedView<BoardAclEntryView<'static>> {
4840                &self.0
4841            }
4842        }
4843        impl ::buffa::HasMessageView for super::super::BoardAclEntry {
4844            type View<'a> = BoardAclEntryView<'a>;
4845            type ViewHandle = BoardAclEntryOwnedView;
4846        }
4847        impl ::serde::Serialize for BoardAclEntryOwnedView {
4848            fn serialize<__S: ::serde::Serializer>(
4849                &self,
4850                __s: __S,
4851            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4852                ::serde::Serialize::serialize(&self.0, __s)
4853            }
4854        }
4855        /// BoardPermissions is the resolved permission set for the caller.
4856        #[derive(Clone, Debug, Default)]
4857        pub struct BoardPermissionsView<'a> {
4858            /// Whether the caller may view metadata and join the room.
4859            ///
4860            /// Field 1: `can_view`
4861            pub can_view: bool,
4862            /// Whether the caller may edit board content in the room.
4863            ///
4864            /// Field 2: `can_edit`
4865            pub can_edit: bool,
4866            /// Whether the caller may manage sharing and board settings.
4867            ///
4868            /// Field 3: `can_manage`
4869            pub can_manage: bool,
4870            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4871        }
4872        impl<'a> ::buffa::MessageView<'a> for BoardPermissionsView<'a> {
4873            type Owned = super::super::BoardPermissions;
4874            fn decode_view(
4875                buf: &'a [u8],
4876            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4877                let __limit = ::core::cell::Cell::new(
4878                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4879                );
4880                <Self as ::buffa::MessageView>::decode_view_ctx(
4881                    buf,
4882                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4883                )
4884            }
4885            fn decode_view_with_ctx(
4886                buf: &'a [u8],
4887                ctx: ::buffa::DecodeContext<'_>,
4888            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4889                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4890            }
4891            fn merge_view_field(
4892                &mut self,
4893                tag: ::buffa::encoding::Tag,
4894                cur: &'a [u8],
4895                before_tag: &'a [u8],
4896                ctx: ::buffa::DecodeContext<'_>,
4897            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4898                let _ = ctx;
4899                #[allow(unused_variables)]
4900                let view = self;
4901                let mut cur = cur;
4902                match tag.field_number() {
4903                    1u32 => {
4904                        ::buffa::encoding::check_wire_type(
4905                            tag,
4906                            ::buffa::encoding::WireType::Varint,
4907                        )?;
4908                        view.can_view = ::buffa::types::decode_bool(&mut cur)?;
4909                    }
4910                    2u32 => {
4911                        ::buffa::encoding::check_wire_type(
4912                            tag,
4913                            ::buffa::encoding::WireType::Varint,
4914                        )?;
4915                        view.can_edit = ::buffa::types::decode_bool(&mut cur)?;
4916                    }
4917                    3u32 => {
4918                        ::buffa::encoding::check_wire_type(
4919                            tag,
4920                            ::buffa::encoding::WireType::Varint,
4921                        )?;
4922                        view.can_manage = ::buffa::types::decode_bool(&mut cur)?;
4923                    }
4924                    _ => {
4925                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4926                        let span_len = before_tag.len() - cur.len();
4927                        view.__buffa_unknown_fields
4928                            .push_record(before_tag, span_len, ctx)?;
4929                    }
4930                }
4931                ::core::result::Result::Ok(cur)
4932            }
4933            fn to_owned_message(
4934                &self,
4935            ) -> ::core::result::Result<
4936                super::super::BoardPermissions,
4937                ::buffa::DecodeError,
4938            > {
4939                self.to_owned_from_source(None)
4940            }
4941            #[allow(clippy::useless_conversion, clippy::needless_update)]
4942            fn to_owned_from_source(
4943                &self,
4944                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4945            ) -> ::core::result::Result<
4946                super::super::BoardPermissions,
4947                ::buffa::DecodeError,
4948            > {
4949                #[allow(unused_imports)]
4950                use ::buffa::alloc::string::ToString as _;
4951                let _ = __buffa_src;
4952                ::core::result::Result::Ok(super::super::BoardPermissions {
4953                    can_view: self.can_view,
4954                    can_edit: self.can_edit,
4955                    can_manage: self.can_manage,
4956                    __buffa_unknown_fields: self
4957                        .__buffa_unknown_fields
4958                        .to_owned()?
4959                        .into(),
4960                    ..::core::default::Default::default()
4961                })
4962            }
4963        }
4964        impl<'a> ::buffa::ViewEncode<'a> for BoardPermissionsView<'a> {
4965            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4966            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4967                #[allow(unused_imports)]
4968                use ::buffa::Enumeration as _;
4969                let mut size = 0u32;
4970                if self.can_view {
4971                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4972                }
4973                if self.can_edit {
4974                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4975                }
4976                if self.can_manage {
4977                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4978                }
4979                size += self.__buffa_unknown_fields.encoded_len() as u32;
4980                size
4981            }
4982            #[allow(clippy::needless_borrow)]
4983            fn write_to(
4984                &self,
4985                _cache: &mut ::buffa::SizeCache,
4986                buf: &mut impl ::buffa::bytes::BufMut,
4987            ) {
4988                #[allow(unused_imports)]
4989                use ::buffa::Enumeration as _;
4990                if self.can_view {
4991                    ::buffa::types::put_bool_field(1u32, self.can_view, buf);
4992                }
4993                if self.can_edit {
4994                    ::buffa::types::put_bool_field(2u32, self.can_edit, buf);
4995                }
4996                if self.can_manage {
4997                    ::buffa::types::put_bool_field(3u32, self.can_manage, buf);
4998                }
4999                self.__buffa_unknown_fields.write_to(buf);
5000            }
5001        }
5002        /// Serializes this view as protobuf JSON.
5003        ///
5004        /// Implicit-presence fields with default values are omitted, `required`
5005        /// fields are always emitted, explicit-presence (`optional`) fields are
5006        /// emitted only when set, bytes fields are base64-encoded, and enum
5007        /// values are their proto name strings.
5008        ///
5009        /// This impl uses `serialize_map(None)` because the number of emitted
5010        /// fields depends on default-omission rules; serializers that require
5011        /// known map lengths (e.g. `bincode`) will return a runtime error.
5012        /// Use the owned message type for those formats.
5013        impl<'__a> ::serde::Serialize for BoardPermissionsView<'__a> {
5014            fn serialize<__S: ::serde::Serializer>(
5015                &self,
5016                __s: __S,
5017            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5018                use ::serde::ser::SerializeMap as _;
5019                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5020                if self.can_view {
5021                    __map.serialize_entry("canView", &self.can_view)?;
5022                }
5023                if self.can_edit {
5024                    __map.serialize_entry("canEdit", &self.can_edit)?;
5025                }
5026                if self.can_manage {
5027                    __map.serialize_entry("canManage", &self.can_manage)?;
5028                }
5029                __map.end()
5030            }
5031        }
5032        impl<'a> ::buffa::MessageName for BoardPermissionsView<'a> {
5033            const PACKAGE: &'static str = "collab.v1";
5034            const NAME: &'static str = "BoardPermissions";
5035            const FULL_NAME: &'static str = "collab.v1.BoardPermissions";
5036            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardPermissions";
5037        }
5038        ::buffa::impl_default_view_instance!(BoardPermissionsView);
5039        ::buffa::impl_view_reborrow!(BoardPermissionsView);
5040        /** Self-contained, `'static` owned view of a `BoardPermissions` message.
5041
5042 Wraps [`::buffa::OwnedView`]`<`[`BoardPermissionsView`]`<'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.
5043
5044 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BoardPermissionsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5045        #[derive(Clone, Debug)]
5046        pub struct BoardPermissionsOwnedView(
5047            ::buffa::OwnedView<BoardPermissionsView<'static>>,
5048        );
5049        impl BoardPermissionsOwnedView {
5050            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5051            ///
5052            /// The view borrows directly from the buffer's data; the buffer is
5053            /// retained inside the returned handle.
5054            ///
5055            /// # Errors
5056            ///
5057            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5058            /// protobuf data.
5059            pub fn decode(
5060                bytes: ::buffa::bytes::Bytes,
5061            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5062                ::core::result::Result::Ok(
5063                    BoardPermissionsOwnedView(::buffa::OwnedView::decode(bytes)?),
5064                )
5065            }
5066            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5067            /// max message size).
5068            ///
5069            /// # Errors
5070            ///
5071            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5072            /// exceeds the configured limits.
5073            pub fn decode_with_options(
5074                bytes: ::buffa::bytes::Bytes,
5075                opts: &::buffa::DecodeOptions,
5076            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5077                ::core::result::Result::Ok(
5078                    BoardPermissionsOwnedView(
5079                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5080                    ),
5081                )
5082            }
5083            /// Build from an owned message via an encode → decode round-trip.
5084            ///
5085            /// # Errors
5086            ///
5087            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5088            /// somehow invalid (should not happen for well-formed messages).
5089            pub fn from_owned(
5090                msg: &super::super::BoardPermissions,
5091            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5092                ::core::result::Result::Ok(
5093                    BoardPermissionsOwnedView(::buffa::OwnedView::from_owned(msg)?),
5094                )
5095            }
5096            /// Borrow the full [`BoardPermissionsView`] with its lifetime tied to `&self`.
5097            #[must_use]
5098            pub fn view(&self) -> &BoardPermissionsView<'_> {
5099                self.0.reborrow()
5100            }
5101            /// Convert to the owned message type.
5102            ///
5103            /// # Errors
5104            ///
5105            /// Returns an error if re-materializing preserved unknown fields
5106            /// fails (e.g. the unknown-field limit is exceeded).
5107            pub fn to_owned_message(
5108                &self,
5109            ) -> ::core::result::Result<
5110                super::super::BoardPermissions,
5111                ::buffa::DecodeError,
5112            > {
5113                self.0.to_owned_message()
5114            }
5115            /// The underlying bytes buffer.
5116            #[must_use]
5117            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5118                self.0.bytes()
5119            }
5120            /// Consume the handle, returning the underlying bytes buffer.
5121            #[must_use]
5122            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5123                self.0.into_bytes()
5124            }
5125            /// Whether the caller may view metadata and join the room.
5126            ///
5127            /// Field 1: `can_view`
5128            #[must_use]
5129            pub fn can_view(&self) -> bool {
5130                self.0.reborrow().can_view
5131            }
5132            /// Whether the caller may edit board content in the room.
5133            ///
5134            /// Field 2: `can_edit`
5135            #[must_use]
5136            pub fn can_edit(&self) -> bool {
5137                self.0.reborrow().can_edit
5138            }
5139            /// Whether the caller may manage sharing and board settings.
5140            ///
5141            /// Field 3: `can_manage`
5142            #[must_use]
5143            pub fn can_manage(&self) -> bool {
5144                self.0.reborrow().can_manage
5145            }
5146        }
5147        impl ::core::convert::From<::buffa::OwnedView<BoardPermissionsView<'static>>>
5148        for BoardPermissionsOwnedView {
5149            fn from(inner: ::buffa::OwnedView<BoardPermissionsView<'static>>) -> Self {
5150                BoardPermissionsOwnedView(inner)
5151            }
5152        }
5153        impl ::core::convert::From<BoardPermissionsOwnedView>
5154        for ::buffa::OwnedView<BoardPermissionsView<'static>> {
5155            fn from(wrapper: BoardPermissionsOwnedView) -> Self {
5156                wrapper.0
5157            }
5158        }
5159        impl ::core::convert::AsRef<::buffa::OwnedView<BoardPermissionsView<'static>>>
5160        for BoardPermissionsOwnedView {
5161            fn as_ref(&self) -> &::buffa::OwnedView<BoardPermissionsView<'static>> {
5162                &self.0
5163            }
5164        }
5165        impl ::buffa::HasMessageView for super::super::BoardPermissions {
5166            type View<'a> = BoardPermissionsView<'a>;
5167            type ViewHandle = BoardPermissionsOwnedView;
5168        }
5169        impl ::serde::Serialize for BoardPermissionsOwnedView {
5170            fn serialize<__S: ::serde::Serializer>(
5171                &self,
5172                __s: __S,
5173            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5174                ::serde::Serialize::serialize(&self.0, __s)
5175            }
5176        }
5177        /// BoardAccess is the resolved caller access for a board.
5178        /// Access resolution prefers owner, explicit user ACL, explicit group ACL, then audience policy.
5179        #[derive(Clone, Debug, Default)]
5180        pub struct BoardAccessView<'a> {
5181            /// Highest resolved role for the caller.
5182            ///
5183            /// Field 1: `role`
5184            pub role: ::buffa::EnumValue<super::super::BoardRole>,
5185            /// Expanded permission flags for the caller.
5186            ///
5187            /// Field 2: `permissions`
5188            pub permissions: ::buffa::MessageFieldView<
5189                super::super::__buffa::view::BoardPermissionsView<'a>,
5190            >,
5191            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5192        }
5193        impl<'a> ::buffa::MessageView<'a> for BoardAccessView<'a> {
5194            type Owned = super::super::BoardAccess;
5195            fn decode_view(
5196                buf: &'a [u8],
5197            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5198                let __limit = ::core::cell::Cell::new(
5199                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
5200                );
5201                <Self as ::buffa::MessageView>::decode_view_ctx(
5202                    buf,
5203                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
5204                )
5205            }
5206            fn decode_view_with_ctx(
5207                buf: &'a [u8],
5208                ctx: ::buffa::DecodeContext<'_>,
5209            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5210                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
5211            }
5212            fn merge_view_field(
5213                &mut self,
5214                tag: ::buffa::encoding::Tag,
5215                cur: &'a [u8],
5216                before_tag: &'a [u8],
5217                ctx: ::buffa::DecodeContext<'_>,
5218            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
5219                let _ = ctx;
5220                #[allow(unused_variables)]
5221                let view = self;
5222                let mut cur = cur;
5223                match tag.field_number() {
5224                    1u32 => {
5225                        ::buffa::encoding::check_wire_type(
5226                            tag,
5227                            ::buffa::encoding::WireType::Varint,
5228                        )?;
5229                        view.role = ::buffa::EnumValue::from(
5230                            ::buffa::types::decode_int32(&mut cur)?,
5231                        );
5232                    }
5233                    2u32 => {
5234                        ::buffa::encoding::check_wire_type(
5235                            tag,
5236                            ::buffa::encoding::WireType::LengthDelimited,
5237                        )?;
5238                        let __sub_ctx = ctx.descend()?;
5239                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5240                        match view.permissions.as_mut() {
5241                            Some(existing) => {
5242                                ::buffa::MessageView::merge_into_view(
5243                                    existing,
5244                                    sub,
5245                                    __sub_ctx,
5246                                )?
5247                            }
5248                            None => {
5249                                view.permissions = ::buffa::MessageFieldView::set(
5250                                    <super::super::__buffa::view::BoardPermissionsView as ::buffa::MessageView>::decode_view_ctx(
5251                                        sub,
5252                                        __sub_ctx,
5253                                    )?,
5254                                );
5255                            }
5256                        }
5257                    }
5258                    _ => {
5259                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
5260                        let span_len = before_tag.len() - cur.len();
5261                        view.__buffa_unknown_fields
5262                            .push_record(before_tag, span_len, ctx)?;
5263                    }
5264                }
5265                ::core::result::Result::Ok(cur)
5266            }
5267            fn to_owned_message(
5268                &self,
5269            ) -> ::core::result::Result<
5270                super::super::BoardAccess,
5271                ::buffa::DecodeError,
5272            > {
5273                self.to_owned_from_source(None)
5274            }
5275            #[allow(clippy::useless_conversion, clippy::needless_update)]
5276            fn to_owned_from_source(
5277                &self,
5278                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5279            ) -> ::core::result::Result<
5280                super::super::BoardAccess,
5281                ::buffa::DecodeError,
5282            > {
5283                #[allow(unused_imports)]
5284                use ::buffa::alloc::string::ToString as _;
5285                let _ = __buffa_src;
5286                ::core::result::Result::Ok(super::super::BoardAccess {
5287                    role: self.role,
5288                    permissions: match self.permissions.as_option() {
5289                        Some(v) => {
5290                            ::buffa::MessageField::<
5291                                super::super::BoardPermissions,
5292                            >::some(v.to_owned_from_source(__buffa_src)?)
5293                        }
5294                        None => ::buffa::MessageField::none(),
5295                    },
5296                    __buffa_unknown_fields: self
5297                        .__buffa_unknown_fields
5298                        .to_owned()?
5299                        .into(),
5300                    ..::core::default::Default::default()
5301                })
5302            }
5303        }
5304        impl<'a> ::buffa::ViewEncode<'a> for BoardAccessView<'a> {
5305            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5306            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5307                #[allow(unused_imports)]
5308                use ::buffa::Enumeration as _;
5309                let mut size = 0u32;
5310                {
5311                    let val = self.role.to_i32();
5312                    if val != 0 {
5313                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5314                    }
5315                }
5316                if self.permissions.is_set() {
5317                    let __slot = __cache.reserve();
5318                    let inner_size = self.permissions.compute_size(__cache);
5319                    __cache.set(__slot, inner_size);
5320                    size
5321                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5322                            + inner_size;
5323                }
5324                size += self.__buffa_unknown_fields.encoded_len() as u32;
5325                size
5326            }
5327            #[allow(clippy::needless_borrow)]
5328            fn write_to(
5329                &self,
5330                __cache: &mut ::buffa::SizeCache,
5331                buf: &mut impl ::buffa::bytes::BufMut,
5332            ) {
5333                #[allow(unused_imports)]
5334                use ::buffa::Enumeration as _;
5335                {
5336                    let val = self.role.to_i32();
5337                    if val != 0 {
5338                        ::buffa::types::put_int32_field(1u32, val, buf);
5339                    }
5340                }
5341                if self.permissions.is_set() {
5342                    ::buffa::types::put_len_delimited_header(
5343                        2u32,
5344                        __cache.consume_next(),
5345                        buf,
5346                    );
5347                    self.permissions.write_to(__cache, buf);
5348                }
5349                self.__buffa_unknown_fields.write_to(buf);
5350            }
5351        }
5352        /// Serializes this view as protobuf JSON.
5353        ///
5354        /// Implicit-presence fields with default values are omitted, `required`
5355        /// fields are always emitted, explicit-presence (`optional`) fields are
5356        /// emitted only when set, bytes fields are base64-encoded, and enum
5357        /// values are their proto name strings.
5358        ///
5359        /// This impl uses `serialize_map(None)` because the number of emitted
5360        /// fields depends on default-omission rules; serializers that require
5361        /// known map lengths (e.g. `bincode`) will return a runtime error.
5362        /// Use the owned message type for those formats.
5363        impl<'__a> ::serde::Serialize for BoardAccessView<'__a> {
5364            fn serialize<__S: ::serde::Serializer>(
5365                &self,
5366                __s: __S,
5367            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5368                use ::serde::ser::SerializeMap as _;
5369                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5370                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.role) {
5371                    __map.serialize_entry("role", &self.role)?;
5372                }
5373                {
5374                    if let ::core::option::Option::Some(__v) = self
5375                        .permissions
5376                        .as_option()
5377                    {
5378                        __map.serialize_entry("permissions", __v)?;
5379                    }
5380                }
5381                __map.end()
5382            }
5383        }
5384        impl<'a> ::buffa::MessageName for BoardAccessView<'a> {
5385            const PACKAGE: &'static str = "collab.v1";
5386            const NAME: &'static str = "BoardAccess";
5387            const FULL_NAME: &'static str = "collab.v1.BoardAccess";
5388            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardAccess";
5389        }
5390        ::buffa::impl_default_view_instance!(BoardAccessView);
5391        ::buffa::impl_view_reborrow!(BoardAccessView);
5392        /** Self-contained, `'static` owned view of a `BoardAccess` message.
5393
5394 Wraps [`::buffa::OwnedView`]`<`[`BoardAccessView`]`<'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.
5395
5396 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BoardAccessView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5397        #[derive(Clone, Debug)]
5398        pub struct BoardAccessOwnedView(::buffa::OwnedView<BoardAccessView<'static>>);
5399        impl BoardAccessOwnedView {
5400            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5401            ///
5402            /// The view borrows directly from the buffer's data; the buffer is
5403            /// retained inside the returned handle.
5404            ///
5405            /// # Errors
5406            ///
5407            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5408            /// protobuf data.
5409            pub fn decode(
5410                bytes: ::buffa::bytes::Bytes,
5411            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5412                ::core::result::Result::Ok(
5413                    BoardAccessOwnedView(::buffa::OwnedView::decode(bytes)?),
5414                )
5415            }
5416            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5417            /// max message size).
5418            ///
5419            /// # Errors
5420            ///
5421            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5422            /// exceeds the configured limits.
5423            pub fn decode_with_options(
5424                bytes: ::buffa::bytes::Bytes,
5425                opts: &::buffa::DecodeOptions,
5426            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5427                ::core::result::Result::Ok(
5428                    BoardAccessOwnedView(
5429                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5430                    ),
5431                )
5432            }
5433            /// Build from an owned message via an encode → decode round-trip.
5434            ///
5435            /// # Errors
5436            ///
5437            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5438            /// somehow invalid (should not happen for well-formed messages).
5439            pub fn from_owned(
5440                msg: &super::super::BoardAccess,
5441            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5442                ::core::result::Result::Ok(
5443                    BoardAccessOwnedView(::buffa::OwnedView::from_owned(msg)?),
5444                )
5445            }
5446            /// Borrow the full [`BoardAccessView`] with its lifetime tied to `&self`.
5447            #[must_use]
5448            pub fn view(&self) -> &BoardAccessView<'_> {
5449                self.0.reborrow()
5450            }
5451            /// Convert to the owned message type.
5452            ///
5453            /// # Errors
5454            ///
5455            /// Returns an error if re-materializing preserved unknown fields
5456            /// fails (e.g. the unknown-field limit is exceeded).
5457            pub fn to_owned_message(
5458                &self,
5459            ) -> ::core::result::Result<
5460                super::super::BoardAccess,
5461                ::buffa::DecodeError,
5462            > {
5463                self.0.to_owned_message()
5464            }
5465            /// The underlying bytes buffer.
5466            #[must_use]
5467            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5468                self.0.bytes()
5469            }
5470            /// Consume the handle, returning the underlying bytes buffer.
5471            #[must_use]
5472            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5473                self.0.into_bytes()
5474            }
5475            /// Highest resolved role for the caller.
5476            ///
5477            /// Field 1: `role`
5478            #[must_use]
5479            pub fn role(&self) -> ::buffa::EnumValue<super::super::BoardRole> {
5480                self.0.reborrow().role
5481            }
5482            /// Expanded permission flags for the caller.
5483            ///
5484            /// Field 2: `permissions`
5485            #[must_use]
5486            pub fn permissions(
5487                &self,
5488            ) -> &::buffa::MessageFieldView<
5489                super::super::__buffa::view::BoardPermissionsView<'_>,
5490            > {
5491                &self.0.reborrow().permissions
5492            }
5493        }
5494        impl ::core::convert::From<::buffa::OwnedView<BoardAccessView<'static>>>
5495        for BoardAccessOwnedView {
5496            fn from(inner: ::buffa::OwnedView<BoardAccessView<'static>>) -> Self {
5497                BoardAccessOwnedView(inner)
5498            }
5499        }
5500        impl ::core::convert::From<BoardAccessOwnedView>
5501        for ::buffa::OwnedView<BoardAccessView<'static>> {
5502            fn from(wrapper: BoardAccessOwnedView) -> Self {
5503                wrapper.0
5504            }
5505        }
5506        impl ::core::convert::AsRef<::buffa::OwnedView<BoardAccessView<'static>>>
5507        for BoardAccessOwnedView {
5508            fn as_ref(&self) -> &::buffa::OwnedView<BoardAccessView<'static>> {
5509                &self.0
5510            }
5511        }
5512        impl ::buffa::HasMessageView for super::super::BoardAccess {
5513            type View<'a> = BoardAccessView<'a>;
5514            type ViewHandle = BoardAccessOwnedView;
5515        }
5516        impl ::serde::Serialize for BoardAccessOwnedView {
5517            fn serialize<__S: ::serde::Serializer>(
5518                &self,
5519                __s: __S,
5520            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5521                ::serde::Serialize::serialize(&self.0, __s)
5522            }
5523        }
5524        /// Board is the persisted metadata for a collaborative whiteboard.
5525        #[derive(Clone, Debug, Default)]
5526        pub struct BoardView<'a> {
5527            /// Stable board identifier as a UUID string.
5528            ///
5529            /// Field 1: `board_id`
5530            pub board_id: &'a str,
5531            /// Board owner account public ID.
5532            ///
5533            /// Field 2: `owner_account_id`
5534            pub owner_account_id: u64,
5535            /// Human-readable board title, max 200 characters and 400 bytes.
5536            ///
5537            /// Field 3: `title`
5538            pub title: &'a str,
5539            /// Default audience policy used when no explicit ACL entry matches.
5540            ///
5541            /// Field 4: `audience`
5542            pub audience: ::buffa::EnumValue<super::super::BoardAudience>,
5543            /// Default role granted by the audience policy. This is always VIEWER or EDITOR.
5544            ///
5545            /// Field 5: `default_role`
5546            pub default_role: ::buffa::EnumValue<super::super::BoardRole>,
5547            /// Monotonic access version incremented when audience, default role, ACL, or archive state changes.
5548            ///
5549            /// Field 6: `access_version`
5550            pub access_version: u64,
5551            /// Optional initial document snapshot as a JSON object.
5552            ///
5553            /// Field 7: `initial_snapshot`
5554            pub initial_snapshot: ::buffa::MessageFieldView<
5555                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
5556            >,
5557            /// Creation time in UTC.
5558            ///
5559            /// Field 8: `created_at`
5560            pub created_at: ::buffa::MessageFieldView<
5561                ::buffa_types::google::protobuf::__buffa::view::TimestampView<'a>,
5562            >,
5563            /// Last update time in UTC.
5564            ///
5565            /// Field 9: `updated_at`
5566            pub updated_at: ::buffa::MessageFieldView<
5567                ::buffa_types::google::protobuf::__buffa::view::TimestampView<'a>,
5568            >,
5569            /// Archive time in UTC. Unset when the board is active.
5570            ///
5571            /// Field 10: `archived_at`
5572            pub archived_at: ::buffa::MessageFieldView<
5573                ::buffa_types::google::protobuf::__buffa::view::TimestampView<'a>,
5574            >,
5575            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5576        }
5577        impl<'a> ::buffa::MessageView<'a> for BoardView<'a> {
5578            type Owned = super::super::Board;
5579            fn decode_view(
5580                buf: &'a [u8],
5581            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5582                let __limit = ::core::cell::Cell::new(
5583                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
5584                );
5585                <Self as ::buffa::MessageView>::decode_view_ctx(
5586                    buf,
5587                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
5588                )
5589            }
5590            fn decode_view_with_ctx(
5591                buf: &'a [u8],
5592                ctx: ::buffa::DecodeContext<'_>,
5593            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5594                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
5595            }
5596            fn merge_view_field(
5597                &mut self,
5598                tag: ::buffa::encoding::Tag,
5599                cur: &'a [u8],
5600                before_tag: &'a [u8],
5601                ctx: ::buffa::DecodeContext<'_>,
5602            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
5603                let _ = ctx;
5604                #[allow(unused_variables)]
5605                let view = self;
5606                let mut cur = cur;
5607                match tag.field_number() {
5608                    1u32 => {
5609                        ::buffa::encoding::check_wire_type(
5610                            tag,
5611                            ::buffa::encoding::WireType::LengthDelimited,
5612                        )?;
5613                        view.board_id = ::buffa::types::borrow_str(&mut cur)?;
5614                    }
5615                    2u32 => {
5616                        ::buffa::encoding::check_wire_type(
5617                            tag,
5618                            ::buffa::encoding::WireType::Fixed64,
5619                        )?;
5620                        view.owner_account_id = ::buffa::types::decode_fixed64(
5621                            &mut cur,
5622                        )?;
5623                    }
5624                    3u32 => {
5625                        ::buffa::encoding::check_wire_type(
5626                            tag,
5627                            ::buffa::encoding::WireType::LengthDelimited,
5628                        )?;
5629                        view.title = ::buffa::types::borrow_str(&mut cur)?;
5630                    }
5631                    4u32 => {
5632                        ::buffa::encoding::check_wire_type(
5633                            tag,
5634                            ::buffa::encoding::WireType::Varint,
5635                        )?;
5636                        view.audience = ::buffa::EnumValue::from(
5637                            ::buffa::types::decode_int32(&mut cur)?,
5638                        );
5639                    }
5640                    5u32 => {
5641                        ::buffa::encoding::check_wire_type(
5642                            tag,
5643                            ::buffa::encoding::WireType::Varint,
5644                        )?;
5645                        view.default_role = ::buffa::EnumValue::from(
5646                            ::buffa::types::decode_int32(&mut cur)?,
5647                        );
5648                    }
5649                    6u32 => {
5650                        ::buffa::encoding::check_wire_type(
5651                            tag,
5652                            ::buffa::encoding::WireType::Varint,
5653                        )?;
5654                        view.access_version = ::buffa::types::decode_uint64(&mut cur)?;
5655                    }
5656                    7u32 => {
5657                        ::buffa::encoding::check_wire_type(
5658                            tag,
5659                            ::buffa::encoding::WireType::LengthDelimited,
5660                        )?;
5661                        let __sub_ctx = ctx.descend()?;
5662                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5663                        match view.initial_snapshot.as_mut() {
5664                            Some(existing) => {
5665                                ::buffa::MessageView::merge_into_view(
5666                                    existing,
5667                                    sub,
5668                                    __sub_ctx,
5669                                )?
5670                            }
5671                            None => {
5672                                view.initial_snapshot = ::buffa::MessageFieldView::set(
5673                                    <::buffa_types::google::protobuf::__buffa::view::StructView as ::buffa::MessageView>::decode_view_ctx(
5674                                        sub,
5675                                        __sub_ctx,
5676                                    )?,
5677                                );
5678                            }
5679                        }
5680                    }
5681                    8u32 => {
5682                        ::buffa::encoding::check_wire_type(
5683                            tag,
5684                            ::buffa::encoding::WireType::LengthDelimited,
5685                        )?;
5686                        let __sub_ctx = ctx.descend()?;
5687                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5688                        match view.created_at.as_mut() {
5689                            Some(existing) => {
5690                                ::buffa::MessageView::merge_into_view(
5691                                    existing,
5692                                    sub,
5693                                    __sub_ctx,
5694                                )?
5695                            }
5696                            None => {
5697                                view.created_at = ::buffa::MessageFieldView::set(
5698                                    <::buffa_types::google::protobuf::__buffa::view::TimestampView as ::buffa::MessageView>::decode_view_ctx(
5699                                        sub,
5700                                        __sub_ctx,
5701                                    )?,
5702                                );
5703                            }
5704                        }
5705                    }
5706                    9u32 => {
5707                        ::buffa::encoding::check_wire_type(
5708                            tag,
5709                            ::buffa::encoding::WireType::LengthDelimited,
5710                        )?;
5711                        let __sub_ctx = ctx.descend()?;
5712                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5713                        match view.updated_at.as_mut() {
5714                            Some(existing) => {
5715                                ::buffa::MessageView::merge_into_view(
5716                                    existing,
5717                                    sub,
5718                                    __sub_ctx,
5719                                )?
5720                            }
5721                            None => {
5722                                view.updated_at = ::buffa::MessageFieldView::set(
5723                                    <::buffa_types::google::protobuf::__buffa::view::TimestampView as ::buffa::MessageView>::decode_view_ctx(
5724                                        sub,
5725                                        __sub_ctx,
5726                                    )?,
5727                                );
5728                            }
5729                        }
5730                    }
5731                    10u32 => {
5732                        ::buffa::encoding::check_wire_type(
5733                            tag,
5734                            ::buffa::encoding::WireType::LengthDelimited,
5735                        )?;
5736                        let __sub_ctx = ctx.descend()?;
5737                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5738                        match view.archived_at.as_mut() {
5739                            Some(existing) => {
5740                                ::buffa::MessageView::merge_into_view(
5741                                    existing,
5742                                    sub,
5743                                    __sub_ctx,
5744                                )?
5745                            }
5746                            None => {
5747                                view.archived_at = ::buffa::MessageFieldView::set(
5748                                    <::buffa_types::google::protobuf::__buffa::view::TimestampView as ::buffa::MessageView>::decode_view_ctx(
5749                                        sub,
5750                                        __sub_ctx,
5751                                    )?,
5752                                );
5753                            }
5754                        }
5755                    }
5756                    _ => {
5757                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
5758                        let span_len = before_tag.len() - cur.len();
5759                        view.__buffa_unknown_fields
5760                            .push_record(before_tag, span_len, ctx)?;
5761                    }
5762                }
5763                ::core::result::Result::Ok(cur)
5764            }
5765            fn to_owned_message(
5766                &self,
5767            ) -> ::core::result::Result<super::super::Board, ::buffa::DecodeError> {
5768                self.to_owned_from_source(None)
5769            }
5770            #[allow(clippy::useless_conversion, clippy::needless_update)]
5771            fn to_owned_from_source(
5772                &self,
5773                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5774            ) -> ::core::result::Result<super::super::Board, ::buffa::DecodeError> {
5775                #[allow(unused_imports)]
5776                use ::buffa::alloc::string::ToString as _;
5777                let _ = __buffa_src;
5778                ::core::result::Result::Ok(super::super::Board {
5779                    board_id: self.board_id.to_string(),
5780                    owner_account_id: self.owner_account_id,
5781                    title: self.title.to_string(),
5782                    audience: self.audience,
5783                    default_role: self.default_role,
5784                    access_version: self.access_version,
5785                    initial_snapshot: match self.initial_snapshot.as_option() {
5786                        Some(v) => {
5787                            ::buffa::MessageField::<
5788                                ::buffa_types::google::protobuf::Struct,
5789                            >::some(v.to_owned_from_source(__buffa_src)?)
5790                        }
5791                        None => ::buffa::MessageField::none(),
5792                    },
5793                    created_at: match self.created_at.as_option() {
5794                        Some(v) => {
5795                            ::buffa::MessageField::<
5796                                ::buffa_types::google::protobuf::Timestamp,
5797                            >::some(v.to_owned_from_source(__buffa_src)?)
5798                        }
5799                        None => ::buffa::MessageField::none(),
5800                    },
5801                    updated_at: match self.updated_at.as_option() {
5802                        Some(v) => {
5803                            ::buffa::MessageField::<
5804                                ::buffa_types::google::protobuf::Timestamp,
5805                            >::some(v.to_owned_from_source(__buffa_src)?)
5806                        }
5807                        None => ::buffa::MessageField::none(),
5808                    },
5809                    archived_at: match self.archived_at.as_option() {
5810                        Some(v) => {
5811                            ::buffa::MessageField::<
5812                                ::buffa_types::google::protobuf::Timestamp,
5813                            >::some(v.to_owned_from_source(__buffa_src)?)
5814                        }
5815                        None => ::buffa::MessageField::none(),
5816                    },
5817                    __buffa_unknown_fields: self
5818                        .__buffa_unknown_fields
5819                        .to_owned()?
5820                        .into(),
5821                    ..::core::default::Default::default()
5822                })
5823            }
5824        }
5825        impl<'a> ::buffa::ViewEncode<'a> for BoardView<'a> {
5826            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5827            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5828                #[allow(unused_imports)]
5829                use ::buffa::Enumeration as _;
5830                let mut size = 0u32;
5831                if !self.board_id.is_empty() {
5832                    size
5833                        += 1u32
5834                            + ::buffa::types::string_encoded_len(&self.board_id) as u32;
5835                }
5836                if self.owner_account_id != 0u64 {
5837                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
5838                }
5839                if !self.title.is_empty() {
5840                    size
5841                        += 1u32 + ::buffa::types::string_encoded_len(&self.title) as u32;
5842                }
5843                {
5844                    let val = self.audience.to_i32();
5845                    if val != 0 {
5846                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5847                    }
5848                }
5849                {
5850                    let val = self.default_role.to_i32();
5851                    if val != 0 {
5852                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5853                    }
5854                }
5855                if self.access_version != 0u64 {
5856                    size
5857                        += 1u32
5858                            + ::buffa::types::uint64_encoded_len(self.access_version)
5859                                as u32;
5860                }
5861                if self.initial_snapshot.is_set() {
5862                    let __slot = __cache.reserve();
5863                    let inner_size = self.initial_snapshot.compute_size(__cache);
5864                    __cache.set(__slot, inner_size);
5865                    size
5866                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5867                            + inner_size;
5868                }
5869                if self.created_at.is_set() {
5870                    let __slot = __cache.reserve();
5871                    let inner_size = self.created_at.compute_size(__cache);
5872                    __cache.set(__slot, inner_size);
5873                    size
5874                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5875                            + inner_size;
5876                }
5877                if self.updated_at.is_set() {
5878                    let __slot = __cache.reserve();
5879                    let inner_size = self.updated_at.compute_size(__cache);
5880                    __cache.set(__slot, inner_size);
5881                    size
5882                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5883                            + inner_size;
5884                }
5885                if self.archived_at.is_set() {
5886                    let __slot = __cache.reserve();
5887                    let inner_size = self.archived_at.compute_size(__cache);
5888                    __cache.set(__slot, inner_size);
5889                    size
5890                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5891                            + inner_size;
5892                }
5893                size += self.__buffa_unknown_fields.encoded_len() as u32;
5894                size
5895            }
5896            #[allow(clippy::needless_borrow)]
5897            fn write_to(
5898                &self,
5899                __cache: &mut ::buffa::SizeCache,
5900                buf: &mut impl ::buffa::bytes::BufMut,
5901            ) {
5902                #[allow(unused_imports)]
5903                use ::buffa::Enumeration as _;
5904                if !self.board_id.is_empty() {
5905                    ::buffa::types::put_string_field(1u32, &self.board_id, buf);
5906                }
5907                if self.owner_account_id != 0u64 {
5908                    ::buffa::types::put_fixed64_field(2u32, self.owner_account_id, buf);
5909                }
5910                if !self.title.is_empty() {
5911                    ::buffa::types::put_string_field(3u32, &self.title, buf);
5912                }
5913                {
5914                    let val = self.audience.to_i32();
5915                    if val != 0 {
5916                        ::buffa::types::put_int32_field(4u32, val, buf);
5917                    }
5918                }
5919                {
5920                    let val = self.default_role.to_i32();
5921                    if val != 0 {
5922                        ::buffa::types::put_int32_field(5u32, val, buf);
5923                    }
5924                }
5925                if self.access_version != 0u64 {
5926                    ::buffa::types::put_uint64_field(6u32, self.access_version, buf);
5927                }
5928                if self.initial_snapshot.is_set() {
5929                    ::buffa::types::put_len_delimited_header(
5930                        7u32,
5931                        __cache.consume_next(),
5932                        buf,
5933                    );
5934                    self.initial_snapshot.write_to(__cache, buf);
5935                }
5936                if self.created_at.is_set() {
5937                    ::buffa::types::put_len_delimited_header(
5938                        8u32,
5939                        __cache.consume_next(),
5940                        buf,
5941                    );
5942                    self.created_at.write_to(__cache, buf);
5943                }
5944                if self.updated_at.is_set() {
5945                    ::buffa::types::put_len_delimited_header(
5946                        9u32,
5947                        __cache.consume_next(),
5948                        buf,
5949                    );
5950                    self.updated_at.write_to(__cache, buf);
5951                }
5952                if self.archived_at.is_set() {
5953                    ::buffa::types::put_len_delimited_header(
5954                        10u32,
5955                        __cache.consume_next(),
5956                        buf,
5957                    );
5958                    self.archived_at.write_to(__cache, buf);
5959                }
5960                self.__buffa_unknown_fields.write_to(buf);
5961            }
5962        }
5963        /// Serializes this view as protobuf JSON.
5964        ///
5965        /// Implicit-presence fields with default values are omitted, `required`
5966        /// fields are always emitted, explicit-presence (`optional`) fields are
5967        /// emitted only when set, bytes fields are base64-encoded, and enum
5968        /// values are their proto name strings.
5969        ///
5970        /// This impl uses `serialize_map(None)` because the number of emitted
5971        /// fields depends on default-omission rules; serializers that require
5972        /// known map lengths (e.g. `bincode`) will return a runtime error.
5973        /// Use the owned message type for those formats.
5974        impl<'__a> ::serde::Serialize for BoardView<'__a> {
5975            fn serialize<__S: ::serde::Serializer>(
5976                &self,
5977                __s: __S,
5978            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5979                use ::serde::ser::SerializeMap as _;
5980                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5981                if !::buffa::json_helpers::skip_if::is_empty_str(self.board_id) {
5982                    __map.serialize_entry("boardId", self.board_id)?;
5983                }
5984                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.owner_account_id) {
5985                    __map
5986                        .serialize_entry(
5987                            "ownerAccountId",
5988                            &::buffa::json_helpers::ProtoJson(&self.owner_account_id),
5989                        )?;
5990                }
5991                if !::buffa::json_helpers::skip_if::is_empty_str(self.title) {
5992                    __map.serialize_entry("title", self.title)?;
5993                }
5994                if !::buffa::json_helpers::skip_if::is_default_enum_value(
5995                    &self.audience,
5996                ) {
5997                    __map.serialize_entry("audience", &self.audience)?;
5998                }
5999                if !::buffa::json_helpers::skip_if::is_default_enum_value(
6000                    &self.default_role,
6001                ) {
6002                    __map.serialize_entry("defaultRole", &self.default_role)?;
6003                }
6004                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.access_version) {
6005                    __map
6006                        .serialize_entry(
6007                            "accessVersion",
6008                            &::buffa::json_helpers::ProtoJson(&self.access_version),
6009                        )?;
6010                }
6011                {
6012                    if let ::core::option::Option::Some(__v) = self
6013                        .initial_snapshot
6014                        .as_option()
6015                    {
6016                        __map.serialize_entry("initialSnapshot", __v)?;
6017                    }
6018                }
6019                {
6020                    if let ::core::option::Option::Some(__v) = self
6021                        .created_at
6022                        .as_option()
6023                    {
6024                        __map.serialize_entry("createdAt", __v)?;
6025                    }
6026                }
6027                {
6028                    if let ::core::option::Option::Some(__v) = self
6029                        .updated_at
6030                        .as_option()
6031                    {
6032                        __map.serialize_entry("updatedAt", __v)?;
6033                    }
6034                }
6035                {
6036                    if let ::core::option::Option::Some(__v) = self
6037                        .archived_at
6038                        .as_option()
6039                    {
6040                        __map.serialize_entry("archivedAt", __v)?;
6041                    }
6042                }
6043                __map.end()
6044            }
6045        }
6046        impl<'a> ::buffa::MessageName for BoardView<'a> {
6047            const PACKAGE: &'static str = "collab.v1";
6048            const NAME: &'static str = "Board";
6049            const FULL_NAME: &'static str = "collab.v1.Board";
6050            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.Board";
6051        }
6052        ::buffa::impl_default_view_instance!(BoardView);
6053        ::buffa::impl_view_reborrow!(BoardView);
6054        /** Self-contained, `'static` owned view of a `Board` message.
6055
6056 Wraps [`::buffa::OwnedView`]`<`[`BoardView`]`<'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.
6057
6058 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BoardView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6059        #[derive(Clone, Debug)]
6060        pub struct BoardOwnedView(::buffa::OwnedView<BoardView<'static>>);
6061        impl BoardOwnedView {
6062            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6063            ///
6064            /// The view borrows directly from the buffer's data; the buffer is
6065            /// retained inside the returned handle.
6066            ///
6067            /// # Errors
6068            ///
6069            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6070            /// protobuf data.
6071            pub fn decode(
6072                bytes: ::buffa::bytes::Bytes,
6073            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6074                ::core::result::Result::Ok(
6075                    BoardOwnedView(::buffa::OwnedView::decode(bytes)?),
6076                )
6077            }
6078            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6079            /// max message size).
6080            ///
6081            /// # Errors
6082            ///
6083            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6084            /// exceeds the configured limits.
6085            pub fn decode_with_options(
6086                bytes: ::buffa::bytes::Bytes,
6087                opts: &::buffa::DecodeOptions,
6088            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6089                ::core::result::Result::Ok(
6090                    BoardOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
6091                )
6092            }
6093            /// Build from an owned message via an encode → decode round-trip.
6094            ///
6095            /// # Errors
6096            ///
6097            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6098            /// somehow invalid (should not happen for well-formed messages).
6099            pub fn from_owned(
6100                msg: &super::super::Board,
6101            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6102                ::core::result::Result::Ok(
6103                    BoardOwnedView(::buffa::OwnedView::from_owned(msg)?),
6104                )
6105            }
6106            /// Borrow the full [`BoardView`] with its lifetime tied to `&self`.
6107            #[must_use]
6108            pub fn view(&self) -> &BoardView<'_> {
6109                self.0.reborrow()
6110            }
6111            /// Convert to the owned message type.
6112            ///
6113            /// # Errors
6114            ///
6115            /// Returns an error if re-materializing preserved unknown fields
6116            /// fails (e.g. the unknown-field limit is exceeded).
6117            pub fn to_owned_message(
6118                &self,
6119            ) -> ::core::result::Result<super::super::Board, ::buffa::DecodeError> {
6120                self.0.to_owned_message()
6121            }
6122            /// The underlying bytes buffer.
6123            #[must_use]
6124            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6125                self.0.bytes()
6126            }
6127            /// Consume the handle, returning the underlying bytes buffer.
6128            #[must_use]
6129            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6130                self.0.into_bytes()
6131            }
6132            /// Stable board identifier as a UUID string.
6133            ///
6134            /// Field 1: `board_id`
6135            #[must_use]
6136            pub fn board_id(&self) -> &'_ str {
6137                self.0.reborrow().board_id
6138            }
6139            /// Board owner account public ID.
6140            ///
6141            /// Field 2: `owner_account_id`
6142            #[must_use]
6143            pub fn owner_account_id(&self) -> u64 {
6144                self.0.reborrow().owner_account_id
6145            }
6146            /// Human-readable board title, max 200 characters and 400 bytes.
6147            ///
6148            /// Field 3: `title`
6149            #[must_use]
6150            pub fn title(&self) -> &'_ str {
6151                self.0.reborrow().title
6152            }
6153            /// Default audience policy used when no explicit ACL entry matches.
6154            ///
6155            /// Field 4: `audience`
6156            #[must_use]
6157            pub fn audience(&self) -> ::buffa::EnumValue<super::super::BoardAudience> {
6158                self.0.reborrow().audience
6159            }
6160            /// Default role granted by the audience policy. This is always VIEWER or EDITOR.
6161            ///
6162            /// Field 5: `default_role`
6163            #[must_use]
6164            pub fn default_role(&self) -> ::buffa::EnumValue<super::super::BoardRole> {
6165                self.0.reborrow().default_role
6166            }
6167            /// Monotonic access version incremented when audience, default role, ACL, or archive state changes.
6168            ///
6169            /// Field 6: `access_version`
6170            #[must_use]
6171            pub fn access_version(&self) -> u64 {
6172                self.0.reborrow().access_version
6173            }
6174            /// Optional initial document snapshot as a JSON object.
6175            ///
6176            /// Field 7: `initial_snapshot`
6177            #[must_use]
6178            pub fn initial_snapshot(
6179                &self,
6180            ) -> &::buffa::MessageFieldView<
6181                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
6182            > {
6183                &self.0.reborrow().initial_snapshot
6184            }
6185            /// Creation time in UTC.
6186            ///
6187            /// Field 8: `created_at`
6188            #[must_use]
6189            pub fn created_at(
6190                &self,
6191            ) -> &::buffa::MessageFieldView<
6192                ::buffa_types::google::protobuf::__buffa::view::TimestampView<'_>,
6193            > {
6194                &self.0.reborrow().created_at
6195            }
6196            /// Last update time in UTC.
6197            ///
6198            /// Field 9: `updated_at`
6199            #[must_use]
6200            pub fn updated_at(
6201                &self,
6202            ) -> &::buffa::MessageFieldView<
6203                ::buffa_types::google::protobuf::__buffa::view::TimestampView<'_>,
6204            > {
6205                &self.0.reborrow().updated_at
6206            }
6207            /// Archive time in UTC. Unset when the board is active.
6208            ///
6209            /// Field 10: `archived_at`
6210            #[must_use]
6211            pub fn archived_at(
6212                &self,
6213            ) -> &::buffa::MessageFieldView<
6214                ::buffa_types::google::protobuf::__buffa::view::TimestampView<'_>,
6215            > {
6216                &self.0.reborrow().archived_at
6217            }
6218        }
6219        impl ::core::convert::From<::buffa::OwnedView<BoardView<'static>>>
6220        for BoardOwnedView {
6221            fn from(inner: ::buffa::OwnedView<BoardView<'static>>) -> Self {
6222                BoardOwnedView(inner)
6223            }
6224        }
6225        impl ::core::convert::From<BoardOwnedView>
6226        for ::buffa::OwnedView<BoardView<'static>> {
6227            fn from(wrapper: BoardOwnedView) -> Self {
6228                wrapper.0
6229            }
6230        }
6231        impl ::core::convert::AsRef<::buffa::OwnedView<BoardView<'static>>>
6232        for BoardOwnedView {
6233            fn as_ref(&self) -> &::buffa::OwnedView<BoardView<'static>> {
6234                &self.0
6235            }
6236        }
6237        impl ::buffa::HasMessageView for super::super::Board {
6238            type View<'a> = BoardView<'a>;
6239            type ViewHandle = BoardOwnedView;
6240        }
6241        impl ::serde::Serialize for BoardOwnedView {
6242            fn serialize<__S: ::serde::Serializer>(
6243                &self,
6244                __s: __S,
6245            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6246                ::serde::Serialize::serialize(&self.0, __s)
6247            }
6248        }
6249        /// BoardListItem is one visible board plus the caller's resolved access.
6250        #[derive(Clone, Debug, Default)]
6251        pub struct BoardListItemView<'a> {
6252            /// Board metadata.
6253            ///
6254            /// Field 1: `board`
6255            pub board: ::buffa::MessageFieldView<
6256                super::super::__buffa::view::BoardView<'a>,
6257            >,
6258            /// Resolved access for the current caller.
6259            ///
6260            /// Field 2: `access`
6261            pub access: ::buffa::MessageFieldView<
6262                super::super::__buffa::view::BoardAccessView<'a>,
6263            >,
6264            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6265        }
6266        impl<'a> ::buffa::MessageView<'a> for BoardListItemView<'a> {
6267            type Owned = super::super::BoardListItem;
6268            fn decode_view(
6269                buf: &'a [u8],
6270            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6271                let __limit = ::core::cell::Cell::new(
6272                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
6273                );
6274                <Self as ::buffa::MessageView>::decode_view_ctx(
6275                    buf,
6276                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
6277                )
6278            }
6279            fn decode_view_with_ctx(
6280                buf: &'a [u8],
6281                ctx: ::buffa::DecodeContext<'_>,
6282            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6283                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
6284            }
6285            fn merge_view_field(
6286                &mut self,
6287                tag: ::buffa::encoding::Tag,
6288                cur: &'a [u8],
6289                before_tag: &'a [u8],
6290                ctx: ::buffa::DecodeContext<'_>,
6291            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
6292                let _ = ctx;
6293                #[allow(unused_variables)]
6294                let view = self;
6295                let mut cur = cur;
6296                match tag.field_number() {
6297                    1u32 => {
6298                        ::buffa::encoding::check_wire_type(
6299                            tag,
6300                            ::buffa::encoding::WireType::LengthDelimited,
6301                        )?;
6302                        let __sub_ctx = ctx.descend()?;
6303                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
6304                        match view.board.as_mut() {
6305                            Some(existing) => {
6306                                ::buffa::MessageView::merge_into_view(
6307                                    existing,
6308                                    sub,
6309                                    __sub_ctx,
6310                                )?
6311                            }
6312                            None => {
6313                                view.board = ::buffa::MessageFieldView::set(
6314                                    <super::super::__buffa::view::BoardView as ::buffa::MessageView>::decode_view_ctx(
6315                                        sub,
6316                                        __sub_ctx,
6317                                    )?,
6318                                );
6319                            }
6320                        }
6321                    }
6322                    2u32 => {
6323                        ::buffa::encoding::check_wire_type(
6324                            tag,
6325                            ::buffa::encoding::WireType::LengthDelimited,
6326                        )?;
6327                        let __sub_ctx = ctx.descend()?;
6328                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
6329                        match view.access.as_mut() {
6330                            Some(existing) => {
6331                                ::buffa::MessageView::merge_into_view(
6332                                    existing,
6333                                    sub,
6334                                    __sub_ctx,
6335                                )?
6336                            }
6337                            None => {
6338                                view.access = ::buffa::MessageFieldView::set(
6339                                    <super::super::__buffa::view::BoardAccessView as ::buffa::MessageView>::decode_view_ctx(
6340                                        sub,
6341                                        __sub_ctx,
6342                                    )?,
6343                                );
6344                            }
6345                        }
6346                    }
6347                    _ => {
6348                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
6349                        let span_len = before_tag.len() - cur.len();
6350                        view.__buffa_unknown_fields
6351                            .push_record(before_tag, span_len, ctx)?;
6352                    }
6353                }
6354                ::core::result::Result::Ok(cur)
6355            }
6356            fn to_owned_message(
6357                &self,
6358            ) -> ::core::result::Result<
6359                super::super::BoardListItem,
6360                ::buffa::DecodeError,
6361            > {
6362                self.to_owned_from_source(None)
6363            }
6364            #[allow(clippy::useless_conversion, clippy::needless_update)]
6365            fn to_owned_from_source(
6366                &self,
6367                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6368            ) -> ::core::result::Result<
6369                super::super::BoardListItem,
6370                ::buffa::DecodeError,
6371            > {
6372                #[allow(unused_imports)]
6373                use ::buffa::alloc::string::ToString as _;
6374                let _ = __buffa_src;
6375                ::core::result::Result::Ok(super::super::BoardListItem {
6376                    board: match self.board.as_option() {
6377                        Some(v) => {
6378                            ::buffa::MessageField::<
6379                                super::super::Board,
6380                            >::some(v.to_owned_from_source(__buffa_src)?)
6381                        }
6382                        None => ::buffa::MessageField::none(),
6383                    },
6384                    access: match self.access.as_option() {
6385                        Some(v) => {
6386                            ::buffa::MessageField::<
6387                                super::super::BoardAccess,
6388                            >::some(v.to_owned_from_source(__buffa_src)?)
6389                        }
6390                        None => ::buffa::MessageField::none(),
6391                    },
6392                    __buffa_unknown_fields: self
6393                        .__buffa_unknown_fields
6394                        .to_owned()?
6395                        .into(),
6396                    ..::core::default::Default::default()
6397                })
6398            }
6399        }
6400        impl<'a> ::buffa::ViewEncode<'a> for BoardListItemView<'a> {
6401            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6402            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6403                #[allow(unused_imports)]
6404                use ::buffa::Enumeration as _;
6405                let mut size = 0u32;
6406                if self.board.is_set() {
6407                    let __slot = __cache.reserve();
6408                    let inner_size = self.board.compute_size(__cache);
6409                    __cache.set(__slot, inner_size);
6410                    size
6411                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6412                            + inner_size;
6413                }
6414                if self.access.is_set() {
6415                    let __slot = __cache.reserve();
6416                    let inner_size = self.access.compute_size(__cache);
6417                    __cache.set(__slot, inner_size);
6418                    size
6419                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6420                            + inner_size;
6421                }
6422                size += self.__buffa_unknown_fields.encoded_len() as u32;
6423                size
6424            }
6425            #[allow(clippy::needless_borrow)]
6426            fn write_to(
6427                &self,
6428                __cache: &mut ::buffa::SizeCache,
6429                buf: &mut impl ::buffa::bytes::BufMut,
6430            ) {
6431                #[allow(unused_imports)]
6432                use ::buffa::Enumeration as _;
6433                if self.board.is_set() {
6434                    ::buffa::types::put_len_delimited_header(
6435                        1u32,
6436                        __cache.consume_next(),
6437                        buf,
6438                    );
6439                    self.board.write_to(__cache, buf);
6440                }
6441                if self.access.is_set() {
6442                    ::buffa::types::put_len_delimited_header(
6443                        2u32,
6444                        __cache.consume_next(),
6445                        buf,
6446                    );
6447                    self.access.write_to(__cache, buf);
6448                }
6449                self.__buffa_unknown_fields.write_to(buf);
6450            }
6451        }
6452        /// Serializes this view as protobuf JSON.
6453        ///
6454        /// Implicit-presence fields with default values are omitted, `required`
6455        /// fields are always emitted, explicit-presence (`optional`) fields are
6456        /// emitted only when set, bytes fields are base64-encoded, and enum
6457        /// values are their proto name strings.
6458        ///
6459        /// This impl uses `serialize_map(None)` because the number of emitted
6460        /// fields depends on default-omission rules; serializers that require
6461        /// known map lengths (e.g. `bincode`) will return a runtime error.
6462        /// Use the owned message type for those formats.
6463        impl<'__a> ::serde::Serialize for BoardListItemView<'__a> {
6464            fn serialize<__S: ::serde::Serializer>(
6465                &self,
6466                __s: __S,
6467            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6468                use ::serde::ser::SerializeMap as _;
6469                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6470                {
6471                    if let ::core::option::Option::Some(__v) = self.board.as_option() {
6472                        __map.serialize_entry("board", __v)?;
6473                    }
6474                }
6475                {
6476                    if let ::core::option::Option::Some(__v) = self.access.as_option() {
6477                        __map.serialize_entry("access", __v)?;
6478                    }
6479                }
6480                __map.end()
6481            }
6482        }
6483        impl<'a> ::buffa::MessageName for BoardListItemView<'a> {
6484            const PACKAGE: &'static str = "collab.v1";
6485            const NAME: &'static str = "BoardListItem";
6486            const FULL_NAME: &'static str = "collab.v1.BoardListItem";
6487            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.BoardListItem";
6488        }
6489        ::buffa::impl_default_view_instance!(BoardListItemView);
6490        ::buffa::impl_view_reborrow!(BoardListItemView);
6491        /** Self-contained, `'static` owned view of a `BoardListItem` message.
6492
6493 Wraps [`::buffa::OwnedView`]`<`[`BoardListItemView`]`<'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.
6494
6495 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BoardListItemView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6496        #[derive(Clone, Debug)]
6497        pub struct BoardListItemOwnedView(
6498            ::buffa::OwnedView<BoardListItemView<'static>>,
6499        );
6500        impl BoardListItemOwnedView {
6501            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6502            ///
6503            /// The view borrows directly from the buffer's data; the buffer is
6504            /// retained inside the returned handle.
6505            ///
6506            /// # Errors
6507            ///
6508            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6509            /// protobuf data.
6510            pub fn decode(
6511                bytes: ::buffa::bytes::Bytes,
6512            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6513                ::core::result::Result::Ok(
6514                    BoardListItemOwnedView(::buffa::OwnedView::decode(bytes)?),
6515                )
6516            }
6517            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6518            /// max message size).
6519            ///
6520            /// # Errors
6521            ///
6522            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6523            /// exceeds the configured limits.
6524            pub fn decode_with_options(
6525                bytes: ::buffa::bytes::Bytes,
6526                opts: &::buffa::DecodeOptions,
6527            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6528                ::core::result::Result::Ok(
6529                    BoardListItemOwnedView(
6530                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6531                    ),
6532                )
6533            }
6534            /// Build from an owned message via an encode → decode round-trip.
6535            ///
6536            /// # Errors
6537            ///
6538            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6539            /// somehow invalid (should not happen for well-formed messages).
6540            pub fn from_owned(
6541                msg: &super::super::BoardListItem,
6542            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6543                ::core::result::Result::Ok(
6544                    BoardListItemOwnedView(::buffa::OwnedView::from_owned(msg)?),
6545                )
6546            }
6547            /// Borrow the full [`BoardListItemView`] with its lifetime tied to `&self`.
6548            #[must_use]
6549            pub fn view(&self) -> &BoardListItemView<'_> {
6550                self.0.reborrow()
6551            }
6552            /// Convert to the owned message type.
6553            ///
6554            /// # Errors
6555            ///
6556            /// Returns an error if re-materializing preserved unknown fields
6557            /// fails (e.g. the unknown-field limit is exceeded).
6558            pub fn to_owned_message(
6559                &self,
6560            ) -> ::core::result::Result<
6561                super::super::BoardListItem,
6562                ::buffa::DecodeError,
6563            > {
6564                self.0.to_owned_message()
6565            }
6566            /// The underlying bytes buffer.
6567            #[must_use]
6568            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6569                self.0.bytes()
6570            }
6571            /// Consume the handle, returning the underlying bytes buffer.
6572            #[must_use]
6573            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6574                self.0.into_bytes()
6575            }
6576            /// Board metadata.
6577            ///
6578            /// Field 1: `board`
6579            #[must_use]
6580            pub fn board(
6581                &self,
6582            ) -> &::buffa::MessageFieldView<super::super::__buffa::view::BoardView<'_>> {
6583                &self.0.reborrow().board
6584            }
6585            /// Resolved access for the current caller.
6586            ///
6587            /// Field 2: `access`
6588            #[must_use]
6589            pub fn access(
6590                &self,
6591            ) -> &::buffa::MessageFieldView<
6592                super::super::__buffa::view::BoardAccessView<'_>,
6593            > {
6594                &self.0.reborrow().access
6595            }
6596        }
6597        impl ::core::convert::From<::buffa::OwnedView<BoardListItemView<'static>>>
6598        for BoardListItemOwnedView {
6599            fn from(inner: ::buffa::OwnedView<BoardListItemView<'static>>) -> Self {
6600                BoardListItemOwnedView(inner)
6601            }
6602        }
6603        impl ::core::convert::From<BoardListItemOwnedView>
6604        for ::buffa::OwnedView<BoardListItemView<'static>> {
6605            fn from(wrapper: BoardListItemOwnedView) -> Self {
6606                wrapper.0
6607            }
6608        }
6609        impl ::core::convert::AsRef<::buffa::OwnedView<BoardListItemView<'static>>>
6610        for BoardListItemOwnedView {
6611            fn as_ref(&self) -> &::buffa::OwnedView<BoardListItemView<'static>> {
6612                &self.0
6613            }
6614        }
6615        impl ::buffa::HasMessageView for super::super::BoardListItem {
6616            type View<'a> = BoardListItemView<'a>;
6617            type ViewHandle = BoardListItemOwnedView;
6618        }
6619        impl ::serde::Serialize for BoardListItemOwnedView {
6620            fn serialize<__S: ::serde::Serializer>(
6621                &self,
6622                __s: __S,
6623            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6624                ::serde::Serialize::serialize(&self.0, __s)
6625            }
6626        }
6627        /// PresencePayload is a lightweight identity payload the client can reuse locally.
6628        #[derive(Clone, Debug, Default)]
6629        pub struct PresencePayloadView<'a> {
6630            /// Caller account public ID.
6631            ///
6632            /// Field 1: `account_id`
6633            pub account_id: u64,
6634            /// Resolved board role for this join.
6635            ///
6636            /// Field 2: `role`
6637            pub role: ::buffa::EnumValue<super::super::BoardRole>,
6638            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6639        }
6640        impl<'a> ::buffa::MessageView<'a> for PresencePayloadView<'a> {
6641            type Owned = super::super::PresencePayload;
6642            fn decode_view(
6643                buf: &'a [u8],
6644            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6645                let __limit = ::core::cell::Cell::new(
6646                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
6647                );
6648                <Self as ::buffa::MessageView>::decode_view_ctx(
6649                    buf,
6650                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
6651                )
6652            }
6653            fn decode_view_with_ctx(
6654                buf: &'a [u8],
6655                ctx: ::buffa::DecodeContext<'_>,
6656            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6657                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
6658            }
6659            fn merge_view_field(
6660                &mut self,
6661                tag: ::buffa::encoding::Tag,
6662                cur: &'a [u8],
6663                before_tag: &'a [u8],
6664                ctx: ::buffa::DecodeContext<'_>,
6665            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
6666                let _ = ctx;
6667                #[allow(unused_variables)]
6668                let view = self;
6669                let mut cur = cur;
6670                match tag.field_number() {
6671                    1u32 => {
6672                        ::buffa::encoding::check_wire_type(
6673                            tag,
6674                            ::buffa::encoding::WireType::Fixed64,
6675                        )?;
6676                        view.account_id = ::buffa::types::decode_fixed64(&mut cur)?;
6677                    }
6678                    2u32 => {
6679                        ::buffa::encoding::check_wire_type(
6680                            tag,
6681                            ::buffa::encoding::WireType::Varint,
6682                        )?;
6683                        view.role = ::buffa::EnumValue::from(
6684                            ::buffa::types::decode_int32(&mut cur)?,
6685                        );
6686                    }
6687                    _ => {
6688                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
6689                        let span_len = before_tag.len() - cur.len();
6690                        view.__buffa_unknown_fields
6691                            .push_record(before_tag, span_len, ctx)?;
6692                    }
6693                }
6694                ::core::result::Result::Ok(cur)
6695            }
6696            fn to_owned_message(
6697                &self,
6698            ) -> ::core::result::Result<
6699                super::super::PresencePayload,
6700                ::buffa::DecodeError,
6701            > {
6702                self.to_owned_from_source(None)
6703            }
6704            #[allow(clippy::useless_conversion, clippy::needless_update)]
6705            fn to_owned_from_source(
6706                &self,
6707                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6708            ) -> ::core::result::Result<
6709                super::super::PresencePayload,
6710                ::buffa::DecodeError,
6711            > {
6712                #[allow(unused_imports)]
6713                use ::buffa::alloc::string::ToString as _;
6714                let _ = __buffa_src;
6715                ::core::result::Result::Ok(super::super::PresencePayload {
6716                    account_id: self.account_id,
6717                    role: self.role,
6718                    __buffa_unknown_fields: self
6719                        .__buffa_unknown_fields
6720                        .to_owned()?
6721                        .into(),
6722                    ..::core::default::Default::default()
6723                })
6724            }
6725        }
6726        impl<'a> ::buffa::ViewEncode<'a> for PresencePayloadView<'a> {
6727            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6728            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6729                #[allow(unused_imports)]
6730                use ::buffa::Enumeration as _;
6731                let mut size = 0u32;
6732                if self.account_id != 0u64 {
6733                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
6734                }
6735                {
6736                    let val = self.role.to_i32();
6737                    if val != 0 {
6738                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6739                    }
6740                }
6741                size += self.__buffa_unknown_fields.encoded_len() as u32;
6742                size
6743            }
6744            #[allow(clippy::needless_borrow)]
6745            fn write_to(
6746                &self,
6747                _cache: &mut ::buffa::SizeCache,
6748                buf: &mut impl ::buffa::bytes::BufMut,
6749            ) {
6750                #[allow(unused_imports)]
6751                use ::buffa::Enumeration as _;
6752                if self.account_id != 0u64 {
6753                    ::buffa::types::put_fixed64_field(1u32, self.account_id, buf);
6754                }
6755                {
6756                    let val = self.role.to_i32();
6757                    if val != 0 {
6758                        ::buffa::types::put_int32_field(2u32, val, buf);
6759                    }
6760                }
6761                self.__buffa_unknown_fields.write_to(buf);
6762            }
6763        }
6764        /// Serializes this view as protobuf JSON.
6765        ///
6766        /// Implicit-presence fields with default values are omitted, `required`
6767        /// fields are always emitted, explicit-presence (`optional`) fields are
6768        /// emitted only when set, bytes fields are base64-encoded, and enum
6769        /// values are their proto name strings.
6770        ///
6771        /// This impl uses `serialize_map(None)` because the number of emitted
6772        /// fields depends on default-omission rules; serializers that require
6773        /// known map lengths (e.g. `bincode`) will return a runtime error.
6774        /// Use the owned message type for those formats.
6775        impl<'__a> ::serde::Serialize for PresencePayloadView<'__a> {
6776            fn serialize<__S: ::serde::Serializer>(
6777                &self,
6778                __s: __S,
6779            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6780                use ::serde::ser::SerializeMap as _;
6781                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6782                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.account_id) {
6783                    __map
6784                        .serialize_entry(
6785                            "accountId",
6786                            &::buffa::json_helpers::ProtoJson(&self.account_id),
6787                        )?;
6788                }
6789                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.role) {
6790                    __map.serialize_entry("role", &self.role)?;
6791                }
6792                __map.end()
6793            }
6794        }
6795        impl<'a> ::buffa::MessageName for PresencePayloadView<'a> {
6796            const PACKAGE: &'static str = "collab.v1";
6797            const NAME: &'static str = "PresencePayload";
6798            const FULL_NAME: &'static str = "collab.v1.PresencePayload";
6799            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.PresencePayload";
6800        }
6801        ::buffa::impl_default_view_instance!(PresencePayloadView);
6802        ::buffa::impl_view_reborrow!(PresencePayloadView);
6803        /** Self-contained, `'static` owned view of a `PresencePayload` message.
6804
6805 Wraps [`::buffa::OwnedView`]`<`[`PresencePayloadView`]`<'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.
6806
6807 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`PresencePayloadView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6808        #[derive(Clone, Debug)]
6809        pub struct PresencePayloadOwnedView(
6810            ::buffa::OwnedView<PresencePayloadView<'static>>,
6811        );
6812        impl PresencePayloadOwnedView {
6813            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6814            ///
6815            /// The view borrows directly from the buffer's data; the buffer is
6816            /// retained inside the returned handle.
6817            ///
6818            /// # Errors
6819            ///
6820            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6821            /// protobuf data.
6822            pub fn decode(
6823                bytes: ::buffa::bytes::Bytes,
6824            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6825                ::core::result::Result::Ok(
6826                    PresencePayloadOwnedView(::buffa::OwnedView::decode(bytes)?),
6827                )
6828            }
6829            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6830            /// max message size).
6831            ///
6832            /// # Errors
6833            ///
6834            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6835            /// exceeds the configured limits.
6836            pub fn decode_with_options(
6837                bytes: ::buffa::bytes::Bytes,
6838                opts: &::buffa::DecodeOptions,
6839            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6840                ::core::result::Result::Ok(
6841                    PresencePayloadOwnedView(
6842                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6843                    ),
6844                )
6845            }
6846            /// Build from an owned message via an encode → decode round-trip.
6847            ///
6848            /// # Errors
6849            ///
6850            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6851            /// somehow invalid (should not happen for well-formed messages).
6852            pub fn from_owned(
6853                msg: &super::super::PresencePayload,
6854            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6855                ::core::result::Result::Ok(
6856                    PresencePayloadOwnedView(::buffa::OwnedView::from_owned(msg)?),
6857                )
6858            }
6859            /// Borrow the full [`PresencePayloadView`] with its lifetime tied to `&self`.
6860            #[must_use]
6861            pub fn view(&self) -> &PresencePayloadView<'_> {
6862                self.0.reborrow()
6863            }
6864            /// Convert to the owned message type.
6865            ///
6866            /// # Errors
6867            ///
6868            /// Returns an error if re-materializing preserved unknown fields
6869            /// fails (e.g. the unknown-field limit is exceeded).
6870            pub fn to_owned_message(
6871                &self,
6872            ) -> ::core::result::Result<
6873                super::super::PresencePayload,
6874                ::buffa::DecodeError,
6875            > {
6876                self.0.to_owned_message()
6877            }
6878            /// The underlying bytes buffer.
6879            #[must_use]
6880            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6881                self.0.bytes()
6882            }
6883            /// Consume the handle, returning the underlying bytes buffer.
6884            #[must_use]
6885            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6886                self.0.into_bytes()
6887            }
6888            /// Caller account public ID.
6889            ///
6890            /// Field 1: `account_id`
6891            #[must_use]
6892            pub fn account_id(&self) -> u64 {
6893                self.0.reborrow().account_id
6894            }
6895            /// Resolved board role for this join.
6896            ///
6897            /// Field 2: `role`
6898            #[must_use]
6899            pub fn role(&self) -> ::buffa::EnumValue<super::super::BoardRole> {
6900                self.0.reborrow().role
6901            }
6902        }
6903        impl ::core::convert::From<::buffa::OwnedView<PresencePayloadView<'static>>>
6904        for PresencePayloadOwnedView {
6905            fn from(inner: ::buffa::OwnedView<PresencePayloadView<'static>>) -> Self {
6906                PresencePayloadOwnedView(inner)
6907            }
6908        }
6909        impl ::core::convert::From<PresencePayloadOwnedView>
6910        for ::buffa::OwnedView<PresencePayloadView<'static>> {
6911            fn from(wrapper: PresencePayloadOwnedView) -> Self {
6912                wrapper.0
6913            }
6914        }
6915        impl ::core::convert::AsRef<::buffa::OwnedView<PresencePayloadView<'static>>>
6916        for PresencePayloadOwnedView {
6917            fn as_ref(&self) -> &::buffa::OwnedView<PresencePayloadView<'static>> {
6918                &self.0
6919            }
6920        }
6921        impl ::buffa::HasMessageView for super::super::PresencePayload {
6922            type View<'a> = PresencePayloadView<'a>;
6923            type ViewHandle = PresencePayloadOwnedView;
6924        }
6925        impl ::serde::Serialize for PresencePayloadOwnedView {
6926            fn serialize<__S: ::serde::Serializer>(
6927                &self,
6928                __s: __S,
6929            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6930                ::serde::Serialize::serialize(&self.0, __s)
6931            }
6932        }
6933        /// CreateBoardRequest creates a new board owned by the caller.
6934        #[derive(Clone, Debug, Default)]
6935        pub struct CreateBoardRequestView<'a> {
6936            /// Board title, max 200 characters and 400 bytes.
6937            ///
6938            /// Field 1: `title`
6939            pub title: &'a str,
6940            /// Initial audience policy for the board.
6941            ///
6942            /// Field 2: `audience`
6943            pub audience: ::buffa::EnumValue<super::super::BoardAudience>,
6944            /// Default audience role for callers admitted by PUBLIC or FOLLOWERS audience policy.
6945            ///
6946            /// Field 3: `default_role`
6947            pub default_role: ::buffa::EnumValue<super::super::BoardRole>,
6948            /// Optional explicit ACL entries created with the board, max 256 entries.
6949            ///
6950            /// Field 4: `acl_entries`
6951            pub acl_entries: ::buffa::RepeatedView<
6952                'a,
6953                super::super::__buffa::view::BoardAclEntryView<'a>,
6954            >,
6955            /// Optional initial document snapshot as a JSON object.
6956            ///
6957            /// Field 5: `initial_snapshot`
6958            pub initial_snapshot: ::buffa::MessageFieldView<
6959                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
6960            >,
6961            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6962        }
6963        impl<'a> ::buffa::MessageView<'a> for CreateBoardRequestView<'a> {
6964            type Owned = super::super::CreateBoardRequest;
6965            fn decode_view(
6966                buf: &'a [u8],
6967            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6968                let __limit = ::core::cell::Cell::new(
6969                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
6970                );
6971                <Self as ::buffa::MessageView>::decode_view_ctx(
6972                    buf,
6973                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
6974                )
6975            }
6976            fn decode_view_with_ctx(
6977                buf: &'a [u8],
6978                ctx: ::buffa::DecodeContext<'_>,
6979            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6980                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
6981            }
6982            fn merge_view_field(
6983                &mut self,
6984                tag: ::buffa::encoding::Tag,
6985                cur: &'a [u8],
6986                before_tag: &'a [u8],
6987                ctx: ::buffa::DecodeContext<'_>,
6988            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
6989                let _ = ctx;
6990                #[allow(unused_variables)]
6991                let view = self;
6992                let mut cur = cur;
6993                match tag.field_number() {
6994                    1u32 => {
6995                        ::buffa::encoding::check_wire_type(
6996                            tag,
6997                            ::buffa::encoding::WireType::LengthDelimited,
6998                        )?;
6999                        view.title = ::buffa::types::borrow_str(&mut cur)?;
7000                    }
7001                    2u32 => {
7002                        ::buffa::encoding::check_wire_type(
7003                            tag,
7004                            ::buffa::encoding::WireType::Varint,
7005                        )?;
7006                        view.audience = ::buffa::EnumValue::from(
7007                            ::buffa::types::decode_int32(&mut cur)?,
7008                        );
7009                    }
7010                    3u32 => {
7011                        ::buffa::encoding::check_wire_type(
7012                            tag,
7013                            ::buffa::encoding::WireType::Varint,
7014                        )?;
7015                        view.default_role = ::buffa::EnumValue::from(
7016                            ::buffa::types::decode_int32(&mut cur)?,
7017                        );
7018                    }
7019                    5u32 => {
7020                        ::buffa::encoding::check_wire_type(
7021                            tag,
7022                            ::buffa::encoding::WireType::LengthDelimited,
7023                        )?;
7024                        let __sub_ctx = ctx.descend()?;
7025                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7026                        match view.initial_snapshot.as_mut() {
7027                            Some(existing) => {
7028                                ::buffa::MessageView::merge_into_view(
7029                                    existing,
7030                                    sub,
7031                                    __sub_ctx,
7032                                )?
7033                            }
7034                            None => {
7035                                view.initial_snapshot = ::buffa::MessageFieldView::set(
7036                                    <::buffa_types::google::protobuf::__buffa::view::StructView as ::buffa::MessageView>::decode_view_ctx(
7037                                        sub,
7038                                        __sub_ctx,
7039                                    )?,
7040                                );
7041                            }
7042                        }
7043                    }
7044                    4u32 => {
7045                        ::buffa::encoding::check_wire_type(
7046                            tag,
7047                            ::buffa::encoding::WireType::LengthDelimited,
7048                        )?;
7049                        let __sub_ctx = ctx.descend()?;
7050                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7051                        view.acl_entries
7052                            .push(
7053                                <super::super::__buffa::view::BoardAclEntryView as ::buffa::MessageView>::decode_view_ctx(
7054                                    sub,
7055                                    __sub_ctx,
7056                                )?,
7057                            );
7058                    }
7059                    _ => {
7060                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
7061                        let span_len = before_tag.len() - cur.len();
7062                        view.__buffa_unknown_fields
7063                            .push_record(before_tag, span_len, ctx)?;
7064                    }
7065                }
7066                ::core::result::Result::Ok(cur)
7067            }
7068            fn to_owned_message(
7069                &self,
7070            ) -> ::core::result::Result<
7071                super::super::CreateBoardRequest,
7072                ::buffa::DecodeError,
7073            > {
7074                self.to_owned_from_source(None)
7075            }
7076            #[allow(clippy::useless_conversion, clippy::needless_update)]
7077            fn to_owned_from_source(
7078                &self,
7079                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7080            ) -> ::core::result::Result<
7081                super::super::CreateBoardRequest,
7082                ::buffa::DecodeError,
7083            > {
7084                #[allow(unused_imports)]
7085                use ::buffa::alloc::string::ToString as _;
7086                let _ = __buffa_src;
7087                ::core::result::Result::Ok(super::super::CreateBoardRequest {
7088                    title: self.title.to_string(),
7089                    audience: self.audience,
7090                    default_role: self.default_role,
7091                    acl_entries: self
7092                        .acl_entries
7093                        .iter()
7094                        .map(|v| v.to_owned_from_source(__buffa_src))
7095                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
7096                    initial_snapshot: match self.initial_snapshot.as_option() {
7097                        Some(v) => {
7098                            ::buffa::MessageField::<
7099                                ::buffa_types::google::protobuf::Struct,
7100                            >::some(v.to_owned_from_source(__buffa_src)?)
7101                        }
7102                        None => ::buffa::MessageField::none(),
7103                    },
7104                    __buffa_unknown_fields: self
7105                        .__buffa_unknown_fields
7106                        .to_owned()?
7107                        .into(),
7108                    ..::core::default::Default::default()
7109                })
7110            }
7111        }
7112        impl<'a> ::buffa::ViewEncode<'a> for CreateBoardRequestView<'a> {
7113            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7114            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7115                #[allow(unused_imports)]
7116                use ::buffa::Enumeration as _;
7117                let mut size = 0u32;
7118                if !self.title.is_empty() {
7119                    size
7120                        += 1u32 + ::buffa::types::string_encoded_len(&self.title) as u32;
7121                }
7122                {
7123                    let val = self.audience.to_i32();
7124                    if val != 0 {
7125                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7126                    }
7127                }
7128                {
7129                    let val = self.default_role.to_i32();
7130                    if val != 0 {
7131                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7132                    }
7133                }
7134                for v in &self.acl_entries {
7135                    let __slot = __cache.reserve();
7136                    let inner_size = v.compute_size(__cache);
7137                    __cache.set(__slot, inner_size);
7138                    size
7139                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7140                            + inner_size;
7141                }
7142                if self.initial_snapshot.is_set() {
7143                    let __slot = __cache.reserve();
7144                    let inner_size = self.initial_snapshot.compute_size(__cache);
7145                    __cache.set(__slot, inner_size);
7146                    size
7147                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7148                            + inner_size;
7149                }
7150                size += self.__buffa_unknown_fields.encoded_len() as u32;
7151                size
7152            }
7153            #[allow(clippy::needless_borrow)]
7154            fn write_to(
7155                &self,
7156                __cache: &mut ::buffa::SizeCache,
7157                buf: &mut impl ::buffa::bytes::BufMut,
7158            ) {
7159                #[allow(unused_imports)]
7160                use ::buffa::Enumeration as _;
7161                if !self.title.is_empty() {
7162                    ::buffa::types::put_string_field(1u32, &self.title, buf);
7163                }
7164                {
7165                    let val = self.audience.to_i32();
7166                    if val != 0 {
7167                        ::buffa::types::put_int32_field(2u32, val, buf);
7168                    }
7169                }
7170                {
7171                    let val = self.default_role.to_i32();
7172                    if val != 0 {
7173                        ::buffa::types::put_int32_field(3u32, val, buf);
7174                    }
7175                }
7176                for v in &self.acl_entries {
7177                    ::buffa::types::put_len_delimited_header(
7178                        4u32,
7179                        __cache.consume_next(),
7180                        buf,
7181                    );
7182                    v.write_to(__cache, buf);
7183                }
7184                if self.initial_snapshot.is_set() {
7185                    ::buffa::types::put_len_delimited_header(
7186                        5u32,
7187                        __cache.consume_next(),
7188                        buf,
7189                    );
7190                    self.initial_snapshot.write_to(__cache, buf);
7191                }
7192                self.__buffa_unknown_fields.write_to(buf);
7193            }
7194        }
7195        /// Serializes this view as protobuf JSON.
7196        ///
7197        /// Implicit-presence fields with default values are omitted, `required`
7198        /// fields are always emitted, explicit-presence (`optional`) fields are
7199        /// emitted only when set, bytes fields are base64-encoded, and enum
7200        /// values are their proto name strings.
7201        ///
7202        /// This impl uses `serialize_map(None)` because the number of emitted
7203        /// fields depends on default-omission rules; serializers that require
7204        /// known map lengths (e.g. `bincode`) will return a runtime error.
7205        /// Use the owned message type for those formats.
7206        impl<'__a> ::serde::Serialize for CreateBoardRequestView<'__a> {
7207            fn serialize<__S: ::serde::Serializer>(
7208                &self,
7209                __s: __S,
7210            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7211                use ::serde::ser::SerializeMap as _;
7212                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7213                if !::buffa::json_helpers::skip_if::is_empty_str(self.title) {
7214                    __map.serialize_entry("title", self.title)?;
7215                }
7216                if !::buffa::json_helpers::skip_if::is_default_enum_value(
7217                    &self.audience,
7218                ) {
7219                    __map.serialize_entry("audience", &self.audience)?;
7220                }
7221                if !::buffa::json_helpers::skip_if::is_default_enum_value(
7222                    &self.default_role,
7223                ) {
7224                    __map.serialize_entry("defaultRole", &self.default_role)?;
7225                }
7226                if !self.acl_entries.is_empty() {
7227                    __map.serialize_entry("aclEntries", &*self.acl_entries)?;
7228                }
7229                {
7230                    if let ::core::option::Option::Some(__v) = self
7231                        .initial_snapshot
7232                        .as_option()
7233                    {
7234                        __map.serialize_entry("initialSnapshot", __v)?;
7235                    }
7236                }
7237                __map.end()
7238            }
7239        }
7240        impl<'a> ::buffa::MessageName for CreateBoardRequestView<'a> {
7241            const PACKAGE: &'static str = "collab.v1";
7242            const NAME: &'static str = "CreateBoardRequest";
7243            const FULL_NAME: &'static str = "collab.v1.CreateBoardRequest";
7244            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.CreateBoardRequest";
7245        }
7246        ::buffa::impl_default_view_instance!(CreateBoardRequestView);
7247        ::buffa::impl_view_reborrow!(CreateBoardRequestView);
7248        /** Self-contained, `'static` owned view of a `CreateBoardRequest` message.
7249
7250 Wraps [`::buffa::OwnedView`]`<`[`CreateBoardRequestView`]`<'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.
7251
7252 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateBoardRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7253        #[derive(Clone, Debug)]
7254        pub struct CreateBoardRequestOwnedView(
7255            ::buffa::OwnedView<CreateBoardRequestView<'static>>,
7256        );
7257        impl CreateBoardRequestOwnedView {
7258            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7259            ///
7260            /// The view borrows directly from the buffer's data; the buffer is
7261            /// retained inside the returned handle.
7262            ///
7263            /// # Errors
7264            ///
7265            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7266            /// protobuf data.
7267            pub fn decode(
7268                bytes: ::buffa::bytes::Bytes,
7269            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7270                ::core::result::Result::Ok(
7271                    CreateBoardRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
7272                )
7273            }
7274            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7275            /// max message size).
7276            ///
7277            /// # Errors
7278            ///
7279            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7280            /// exceeds the configured limits.
7281            pub fn decode_with_options(
7282                bytes: ::buffa::bytes::Bytes,
7283                opts: &::buffa::DecodeOptions,
7284            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7285                ::core::result::Result::Ok(
7286                    CreateBoardRequestOwnedView(
7287                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7288                    ),
7289                )
7290            }
7291            /// Build from an owned message via an encode → decode round-trip.
7292            ///
7293            /// # Errors
7294            ///
7295            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7296            /// somehow invalid (should not happen for well-formed messages).
7297            pub fn from_owned(
7298                msg: &super::super::CreateBoardRequest,
7299            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7300                ::core::result::Result::Ok(
7301                    CreateBoardRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
7302                )
7303            }
7304            /// Borrow the full [`CreateBoardRequestView`] with its lifetime tied to `&self`.
7305            #[must_use]
7306            pub fn view(&self) -> &CreateBoardRequestView<'_> {
7307                self.0.reborrow()
7308            }
7309            /// Convert to the owned message type.
7310            ///
7311            /// # Errors
7312            ///
7313            /// Returns an error if re-materializing preserved unknown fields
7314            /// fails (e.g. the unknown-field limit is exceeded).
7315            pub fn to_owned_message(
7316                &self,
7317            ) -> ::core::result::Result<
7318                super::super::CreateBoardRequest,
7319                ::buffa::DecodeError,
7320            > {
7321                self.0.to_owned_message()
7322            }
7323            /// The underlying bytes buffer.
7324            #[must_use]
7325            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7326                self.0.bytes()
7327            }
7328            /// Consume the handle, returning the underlying bytes buffer.
7329            #[must_use]
7330            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7331                self.0.into_bytes()
7332            }
7333            /// Board title, max 200 characters and 400 bytes.
7334            ///
7335            /// Field 1: `title`
7336            #[must_use]
7337            pub fn title(&self) -> &'_ str {
7338                self.0.reborrow().title
7339            }
7340            /// Initial audience policy for the board.
7341            ///
7342            /// Field 2: `audience`
7343            #[must_use]
7344            pub fn audience(&self) -> ::buffa::EnumValue<super::super::BoardAudience> {
7345                self.0.reborrow().audience
7346            }
7347            /// Default audience role for callers admitted by PUBLIC or FOLLOWERS audience policy.
7348            ///
7349            /// Field 3: `default_role`
7350            #[must_use]
7351            pub fn default_role(&self) -> ::buffa::EnumValue<super::super::BoardRole> {
7352                self.0.reborrow().default_role
7353            }
7354            /// Optional explicit ACL entries created with the board, max 256 entries.
7355            ///
7356            /// Field 4: `acl_entries`
7357            #[must_use]
7358            pub fn acl_entries(
7359                &self,
7360            ) -> &::buffa::RepeatedView<
7361                '_,
7362                super::super::__buffa::view::BoardAclEntryView<'_>,
7363            > {
7364                &self.0.reborrow().acl_entries
7365            }
7366            /// Optional initial document snapshot as a JSON object.
7367            ///
7368            /// Field 5: `initial_snapshot`
7369            #[must_use]
7370            pub fn initial_snapshot(
7371                &self,
7372            ) -> &::buffa::MessageFieldView<
7373                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
7374            > {
7375                &self.0.reborrow().initial_snapshot
7376            }
7377        }
7378        impl ::core::convert::From<::buffa::OwnedView<CreateBoardRequestView<'static>>>
7379        for CreateBoardRequestOwnedView {
7380            fn from(inner: ::buffa::OwnedView<CreateBoardRequestView<'static>>) -> Self {
7381                CreateBoardRequestOwnedView(inner)
7382            }
7383        }
7384        impl ::core::convert::From<CreateBoardRequestOwnedView>
7385        for ::buffa::OwnedView<CreateBoardRequestView<'static>> {
7386            fn from(wrapper: CreateBoardRequestOwnedView) -> Self {
7387                wrapper.0
7388            }
7389        }
7390        impl ::core::convert::AsRef<::buffa::OwnedView<CreateBoardRequestView<'static>>>
7391        for CreateBoardRequestOwnedView {
7392            fn as_ref(&self) -> &::buffa::OwnedView<CreateBoardRequestView<'static>> {
7393                &self.0
7394            }
7395        }
7396        impl ::buffa::HasMessageView for super::super::CreateBoardRequest {
7397            type View<'a> = CreateBoardRequestView<'a>;
7398            type ViewHandle = CreateBoardRequestOwnedView;
7399        }
7400        impl ::serde::Serialize for CreateBoardRequestOwnedView {
7401            fn serialize<__S: ::serde::Serializer>(
7402                &self,
7403                __s: __S,
7404            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7405                ::serde::Serialize::serialize(&self.0, __s)
7406            }
7407        }
7408        /// CreateBoardResponse returns the created board and resolved caller access.
7409        #[derive(Clone, Debug, Default)]
7410        pub struct CreateBoardResponseView<'a> {
7411            /// Created board metadata.
7412            ///
7413            /// Field 1: `board`
7414            pub board: ::buffa::MessageFieldView<
7415                super::super::__buffa::view::BoardView<'a>,
7416            >,
7417            /// Stored explicit ACL entries ordered by creation time, subject type, then subject ID.
7418            ///
7419            /// Field 2: `acl_entries`
7420            pub acl_entries: ::buffa::RepeatedView<
7421                'a,
7422                super::super::__buffa::view::BoardAclEntryView<'a>,
7423            >,
7424            /// Resolved caller access for the board.
7425            ///
7426            /// Field 3: `access`
7427            pub access: ::buffa::MessageFieldView<
7428                super::super::__buffa::view::BoardAccessView<'a>,
7429            >,
7430            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7431        }
7432        impl<'a> ::buffa::MessageView<'a> for CreateBoardResponseView<'a> {
7433            type Owned = super::super::CreateBoardResponse;
7434            fn decode_view(
7435                buf: &'a [u8],
7436            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7437                let __limit = ::core::cell::Cell::new(
7438                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
7439                );
7440                <Self as ::buffa::MessageView>::decode_view_ctx(
7441                    buf,
7442                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
7443                )
7444            }
7445            fn decode_view_with_ctx(
7446                buf: &'a [u8],
7447                ctx: ::buffa::DecodeContext<'_>,
7448            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7449                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
7450            }
7451            fn merge_view_field(
7452                &mut self,
7453                tag: ::buffa::encoding::Tag,
7454                cur: &'a [u8],
7455                before_tag: &'a [u8],
7456                ctx: ::buffa::DecodeContext<'_>,
7457            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
7458                let _ = ctx;
7459                #[allow(unused_variables)]
7460                let view = self;
7461                let mut cur = cur;
7462                match tag.field_number() {
7463                    1u32 => {
7464                        ::buffa::encoding::check_wire_type(
7465                            tag,
7466                            ::buffa::encoding::WireType::LengthDelimited,
7467                        )?;
7468                        let __sub_ctx = ctx.descend()?;
7469                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7470                        match view.board.as_mut() {
7471                            Some(existing) => {
7472                                ::buffa::MessageView::merge_into_view(
7473                                    existing,
7474                                    sub,
7475                                    __sub_ctx,
7476                                )?
7477                            }
7478                            None => {
7479                                view.board = ::buffa::MessageFieldView::set(
7480                                    <super::super::__buffa::view::BoardView as ::buffa::MessageView>::decode_view_ctx(
7481                                        sub,
7482                                        __sub_ctx,
7483                                    )?,
7484                                );
7485                            }
7486                        }
7487                    }
7488                    3u32 => {
7489                        ::buffa::encoding::check_wire_type(
7490                            tag,
7491                            ::buffa::encoding::WireType::LengthDelimited,
7492                        )?;
7493                        let __sub_ctx = ctx.descend()?;
7494                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7495                        match view.access.as_mut() {
7496                            Some(existing) => {
7497                                ::buffa::MessageView::merge_into_view(
7498                                    existing,
7499                                    sub,
7500                                    __sub_ctx,
7501                                )?
7502                            }
7503                            None => {
7504                                view.access = ::buffa::MessageFieldView::set(
7505                                    <super::super::__buffa::view::BoardAccessView as ::buffa::MessageView>::decode_view_ctx(
7506                                        sub,
7507                                        __sub_ctx,
7508                                    )?,
7509                                );
7510                            }
7511                        }
7512                    }
7513                    2u32 => {
7514                        ::buffa::encoding::check_wire_type(
7515                            tag,
7516                            ::buffa::encoding::WireType::LengthDelimited,
7517                        )?;
7518                        let __sub_ctx = ctx.descend()?;
7519                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7520                        view.acl_entries
7521                            .push(
7522                                <super::super::__buffa::view::BoardAclEntryView as ::buffa::MessageView>::decode_view_ctx(
7523                                    sub,
7524                                    __sub_ctx,
7525                                )?,
7526                            );
7527                    }
7528                    _ => {
7529                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
7530                        let span_len = before_tag.len() - cur.len();
7531                        view.__buffa_unknown_fields
7532                            .push_record(before_tag, span_len, ctx)?;
7533                    }
7534                }
7535                ::core::result::Result::Ok(cur)
7536            }
7537            fn to_owned_message(
7538                &self,
7539            ) -> ::core::result::Result<
7540                super::super::CreateBoardResponse,
7541                ::buffa::DecodeError,
7542            > {
7543                self.to_owned_from_source(None)
7544            }
7545            #[allow(clippy::useless_conversion, clippy::needless_update)]
7546            fn to_owned_from_source(
7547                &self,
7548                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7549            ) -> ::core::result::Result<
7550                super::super::CreateBoardResponse,
7551                ::buffa::DecodeError,
7552            > {
7553                #[allow(unused_imports)]
7554                use ::buffa::alloc::string::ToString as _;
7555                let _ = __buffa_src;
7556                ::core::result::Result::Ok(super::super::CreateBoardResponse {
7557                    board: match self.board.as_option() {
7558                        Some(v) => {
7559                            ::buffa::MessageField::<
7560                                super::super::Board,
7561                            >::some(v.to_owned_from_source(__buffa_src)?)
7562                        }
7563                        None => ::buffa::MessageField::none(),
7564                    },
7565                    acl_entries: self
7566                        .acl_entries
7567                        .iter()
7568                        .map(|v| v.to_owned_from_source(__buffa_src))
7569                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
7570                    access: match self.access.as_option() {
7571                        Some(v) => {
7572                            ::buffa::MessageField::<
7573                                super::super::BoardAccess,
7574                            >::some(v.to_owned_from_source(__buffa_src)?)
7575                        }
7576                        None => ::buffa::MessageField::none(),
7577                    },
7578                    __buffa_unknown_fields: self
7579                        .__buffa_unknown_fields
7580                        .to_owned()?
7581                        .into(),
7582                    ..::core::default::Default::default()
7583                })
7584            }
7585        }
7586        impl<'a> ::buffa::ViewEncode<'a> for CreateBoardResponseView<'a> {
7587            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7588            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7589                #[allow(unused_imports)]
7590                use ::buffa::Enumeration as _;
7591                let mut size = 0u32;
7592                if self.board.is_set() {
7593                    let __slot = __cache.reserve();
7594                    let inner_size = self.board.compute_size(__cache);
7595                    __cache.set(__slot, inner_size);
7596                    size
7597                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7598                            + inner_size;
7599                }
7600                for v in &self.acl_entries {
7601                    let __slot = __cache.reserve();
7602                    let inner_size = v.compute_size(__cache);
7603                    __cache.set(__slot, inner_size);
7604                    size
7605                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7606                            + inner_size;
7607                }
7608                if self.access.is_set() {
7609                    let __slot = __cache.reserve();
7610                    let inner_size = self.access.compute_size(__cache);
7611                    __cache.set(__slot, inner_size);
7612                    size
7613                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7614                            + inner_size;
7615                }
7616                size += self.__buffa_unknown_fields.encoded_len() as u32;
7617                size
7618            }
7619            #[allow(clippy::needless_borrow)]
7620            fn write_to(
7621                &self,
7622                __cache: &mut ::buffa::SizeCache,
7623                buf: &mut impl ::buffa::bytes::BufMut,
7624            ) {
7625                #[allow(unused_imports)]
7626                use ::buffa::Enumeration as _;
7627                if self.board.is_set() {
7628                    ::buffa::types::put_len_delimited_header(
7629                        1u32,
7630                        __cache.consume_next(),
7631                        buf,
7632                    );
7633                    self.board.write_to(__cache, buf);
7634                }
7635                for v in &self.acl_entries {
7636                    ::buffa::types::put_len_delimited_header(
7637                        2u32,
7638                        __cache.consume_next(),
7639                        buf,
7640                    );
7641                    v.write_to(__cache, buf);
7642                }
7643                if self.access.is_set() {
7644                    ::buffa::types::put_len_delimited_header(
7645                        3u32,
7646                        __cache.consume_next(),
7647                        buf,
7648                    );
7649                    self.access.write_to(__cache, buf);
7650                }
7651                self.__buffa_unknown_fields.write_to(buf);
7652            }
7653        }
7654        /// Serializes this view as protobuf JSON.
7655        ///
7656        /// Implicit-presence fields with default values are omitted, `required`
7657        /// fields are always emitted, explicit-presence (`optional`) fields are
7658        /// emitted only when set, bytes fields are base64-encoded, and enum
7659        /// values are their proto name strings.
7660        ///
7661        /// This impl uses `serialize_map(None)` because the number of emitted
7662        /// fields depends on default-omission rules; serializers that require
7663        /// known map lengths (e.g. `bincode`) will return a runtime error.
7664        /// Use the owned message type for those formats.
7665        impl<'__a> ::serde::Serialize for CreateBoardResponseView<'__a> {
7666            fn serialize<__S: ::serde::Serializer>(
7667                &self,
7668                __s: __S,
7669            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7670                use ::serde::ser::SerializeMap as _;
7671                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7672                {
7673                    if let ::core::option::Option::Some(__v) = self.board.as_option() {
7674                        __map.serialize_entry("board", __v)?;
7675                    }
7676                }
7677                if !self.acl_entries.is_empty() {
7678                    __map.serialize_entry("aclEntries", &*self.acl_entries)?;
7679                }
7680                {
7681                    if let ::core::option::Option::Some(__v) = self.access.as_option() {
7682                        __map.serialize_entry("access", __v)?;
7683                    }
7684                }
7685                __map.end()
7686            }
7687        }
7688        impl<'a> ::buffa::MessageName for CreateBoardResponseView<'a> {
7689            const PACKAGE: &'static str = "collab.v1";
7690            const NAME: &'static str = "CreateBoardResponse";
7691            const FULL_NAME: &'static str = "collab.v1.CreateBoardResponse";
7692            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.CreateBoardResponse";
7693        }
7694        ::buffa::impl_default_view_instance!(CreateBoardResponseView);
7695        ::buffa::impl_view_reborrow!(CreateBoardResponseView);
7696        /** Self-contained, `'static` owned view of a `CreateBoardResponse` message.
7697
7698 Wraps [`::buffa::OwnedView`]`<`[`CreateBoardResponseView`]`<'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.
7699
7700 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateBoardResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7701        #[derive(Clone, Debug)]
7702        pub struct CreateBoardResponseOwnedView(
7703            ::buffa::OwnedView<CreateBoardResponseView<'static>>,
7704        );
7705        impl CreateBoardResponseOwnedView {
7706            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7707            ///
7708            /// The view borrows directly from the buffer's data; the buffer is
7709            /// retained inside the returned handle.
7710            ///
7711            /// # Errors
7712            ///
7713            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7714            /// protobuf data.
7715            pub fn decode(
7716                bytes: ::buffa::bytes::Bytes,
7717            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7718                ::core::result::Result::Ok(
7719                    CreateBoardResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
7720                )
7721            }
7722            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7723            /// max message size).
7724            ///
7725            /// # Errors
7726            ///
7727            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7728            /// exceeds the configured limits.
7729            pub fn decode_with_options(
7730                bytes: ::buffa::bytes::Bytes,
7731                opts: &::buffa::DecodeOptions,
7732            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7733                ::core::result::Result::Ok(
7734                    CreateBoardResponseOwnedView(
7735                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7736                    ),
7737                )
7738            }
7739            /// Build from an owned message via an encode → decode round-trip.
7740            ///
7741            /// # Errors
7742            ///
7743            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7744            /// somehow invalid (should not happen for well-formed messages).
7745            pub fn from_owned(
7746                msg: &super::super::CreateBoardResponse,
7747            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7748                ::core::result::Result::Ok(
7749                    CreateBoardResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
7750                )
7751            }
7752            /// Borrow the full [`CreateBoardResponseView`] with its lifetime tied to `&self`.
7753            #[must_use]
7754            pub fn view(&self) -> &CreateBoardResponseView<'_> {
7755                self.0.reborrow()
7756            }
7757            /// Convert to the owned message type.
7758            ///
7759            /// # Errors
7760            ///
7761            /// Returns an error if re-materializing preserved unknown fields
7762            /// fails (e.g. the unknown-field limit is exceeded).
7763            pub fn to_owned_message(
7764                &self,
7765            ) -> ::core::result::Result<
7766                super::super::CreateBoardResponse,
7767                ::buffa::DecodeError,
7768            > {
7769                self.0.to_owned_message()
7770            }
7771            /// The underlying bytes buffer.
7772            #[must_use]
7773            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7774                self.0.bytes()
7775            }
7776            /// Consume the handle, returning the underlying bytes buffer.
7777            #[must_use]
7778            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7779                self.0.into_bytes()
7780            }
7781            /// Created board metadata.
7782            ///
7783            /// Field 1: `board`
7784            #[must_use]
7785            pub fn board(
7786                &self,
7787            ) -> &::buffa::MessageFieldView<super::super::__buffa::view::BoardView<'_>> {
7788                &self.0.reborrow().board
7789            }
7790            /// Stored explicit ACL entries ordered by creation time, subject type, then subject ID.
7791            ///
7792            /// Field 2: `acl_entries`
7793            #[must_use]
7794            pub fn acl_entries(
7795                &self,
7796            ) -> &::buffa::RepeatedView<
7797                '_,
7798                super::super::__buffa::view::BoardAclEntryView<'_>,
7799            > {
7800                &self.0.reborrow().acl_entries
7801            }
7802            /// Resolved caller access for the board.
7803            ///
7804            /// Field 3: `access`
7805            #[must_use]
7806            pub fn access(
7807                &self,
7808            ) -> &::buffa::MessageFieldView<
7809                super::super::__buffa::view::BoardAccessView<'_>,
7810            > {
7811                &self.0.reborrow().access
7812            }
7813        }
7814        impl ::core::convert::From<::buffa::OwnedView<CreateBoardResponseView<'static>>>
7815        for CreateBoardResponseOwnedView {
7816            fn from(
7817                inner: ::buffa::OwnedView<CreateBoardResponseView<'static>>,
7818            ) -> Self {
7819                CreateBoardResponseOwnedView(inner)
7820            }
7821        }
7822        impl ::core::convert::From<CreateBoardResponseOwnedView>
7823        for ::buffa::OwnedView<CreateBoardResponseView<'static>> {
7824            fn from(wrapper: CreateBoardResponseOwnedView) -> Self {
7825                wrapper.0
7826            }
7827        }
7828        impl ::core::convert::AsRef<::buffa::OwnedView<CreateBoardResponseView<'static>>>
7829        for CreateBoardResponseOwnedView {
7830            fn as_ref(&self) -> &::buffa::OwnedView<CreateBoardResponseView<'static>> {
7831                &self.0
7832            }
7833        }
7834        impl ::buffa::HasMessageView for super::super::CreateBoardResponse {
7835            type View<'a> = CreateBoardResponseView<'a>;
7836            type ViewHandle = CreateBoardResponseOwnedView;
7837        }
7838        impl ::serde::Serialize for CreateBoardResponseOwnedView {
7839            fn serialize<__S: ::serde::Serializer>(
7840                &self,
7841                __s: __S,
7842            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7843                ::serde::Serialize::serialize(&self.0, __s)
7844            }
7845        }
7846        /// GetBoardRequest loads one board by ID.
7847        #[derive(Clone, Debug, Default)]
7848        pub struct GetBoardRequestView<'a> {
7849            /// Board identifier as a UUID string.
7850            ///
7851            /// Field 1: `board_id`
7852            pub board_id: &'a str,
7853            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7854        }
7855        impl<'a> ::buffa::MessageView<'a> for GetBoardRequestView<'a> {
7856            type Owned = super::super::GetBoardRequest;
7857            fn decode_view(
7858                buf: &'a [u8],
7859            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7860                let __limit = ::core::cell::Cell::new(
7861                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
7862                );
7863                <Self as ::buffa::MessageView>::decode_view_ctx(
7864                    buf,
7865                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
7866                )
7867            }
7868            fn decode_view_with_ctx(
7869                buf: &'a [u8],
7870                ctx: ::buffa::DecodeContext<'_>,
7871            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7872                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
7873            }
7874            fn merge_view_field(
7875                &mut self,
7876                tag: ::buffa::encoding::Tag,
7877                cur: &'a [u8],
7878                before_tag: &'a [u8],
7879                ctx: ::buffa::DecodeContext<'_>,
7880            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
7881                let _ = ctx;
7882                #[allow(unused_variables)]
7883                let view = self;
7884                let mut cur = cur;
7885                match tag.field_number() {
7886                    1u32 => {
7887                        ::buffa::encoding::check_wire_type(
7888                            tag,
7889                            ::buffa::encoding::WireType::LengthDelimited,
7890                        )?;
7891                        view.board_id = ::buffa::types::borrow_str(&mut cur)?;
7892                    }
7893                    _ => {
7894                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
7895                        let span_len = before_tag.len() - cur.len();
7896                        view.__buffa_unknown_fields
7897                            .push_record(before_tag, span_len, ctx)?;
7898                    }
7899                }
7900                ::core::result::Result::Ok(cur)
7901            }
7902            fn to_owned_message(
7903                &self,
7904            ) -> ::core::result::Result<
7905                super::super::GetBoardRequest,
7906                ::buffa::DecodeError,
7907            > {
7908                self.to_owned_from_source(None)
7909            }
7910            #[allow(clippy::useless_conversion, clippy::needless_update)]
7911            fn to_owned_from_source(
7912                &self,
7913                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7914            ) -> ::core::result::Result<
7915                super::super::GetBoardRequest,
7916                ::buffa::DecodeError,
7917            > {
7918                #[allow(unused_imports)]
7919                use ::buffa::alloc::string::ToString as _;
7920                let _ = __buffa_src;
7921                ::core::result::Result::Ok(super::super::GetBoardRequest {
7922                    board_id: self.board_id.to_string(),
7923                    __buffa_unknown_fields: self
7924                        .__buffa_unknown_fields
7925                        .to_owned()?
7926                        .into(),
7927                    ..::core::default::Default::default()
7928                })
7929            }
7930        }
7931        impl<'a> ::buffa::ViewEncode<'a> for GetBoardRequestView<'a> {
7932            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7933            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7934                #[allow(unused_imports)]
7935                use ::buffa::Enumeration as _;
7936                let mut size = 0u32;
7937                if !self.board_id.is_empty() {
7938                    size
7939                        += 1u32
7940                            + ::buffa::types::string_encoded_len(&self.board_id) as u32;
7941                }
7942                size += self.__buffa_unknown_fields.encoded_len() as u32;
7943                size
7944            }
7945            #[allow(clippy::needless_borrow)]
7946            fn write_to(
7947                &self,
7948                _cache: &mut ::buffa::SizeCache,
7949                buf: &mut impl ::buffa::bytes::BufMut,
7950            ) {
7951                #[allow(unused_imports)]
7952                use ::buffa::Enumeration as _;
7953                if !self.board_id.is_empty() {
7954                    ::buffa::types::put_string_field(1u32, &self.board_id, buf);
7955                }
7956                self.__buffa_unknown_fields.write_to(buf);
7957            }
7958        }
7959        /// Serializes this view as protobuf JSON.
7960        ///
7961        /// Implicit-presence fields with default values are omitted, `required`
7962        /// fields are always emitted, explicit-presence (`optional`) fields are
7963        /// emitted only when set, bytes fields are base64-encoded, and enum
7964        /// values are their proto name strings.
7965        ///
7966        /// This impl uses `serialize_map(None)` because the number of emitted
7967        /// fields depends on default-omission rules; serializers that require
7968        /// known map lengths (e.g. `bincode`) will return a runtime error.
7969        /// Use the owned message type for those formats.
7970        impl<'__a> ::serde::Serialize for GetBoardRequestView<'__a> {
7971            fn serialize<__S: ::serde::Serializer>(
7972                &self,
7973                __s: __S,
7974            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7975                use ::serde::ser::SerializeMap as _;
7976                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7977                if !::buffa::json_helpers::skip_if::is_empty_str(self.board_id) {
7978                    __map.serialize_entry("boardId", self.board_id)?;
7979                }
7980                __map.end()
7981            }
7982        }
7983        impl<'a> ::buffa::MessageName for GetBoardRequestView<'a> {
7984            const PACKAGE: &'static str = "collab.v1";
7985            const NAME: &'static str = "GetBoardRequest";
7986            const FULL_NAME: &'static str = "collab.v1.GetBoardRequest";
7987            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.GetBoardRequest";
7988        }
7989        ::buffa::impl_default_view_instance!(GetBoardRequestView);
7990        ::buffa::impl_view_reborrow!(GetBoardRequestView);
7991        /** Self-contained, `'static` owned view of a `GetBoardRequest` message.
7992
7993 Wraps [`::buffa::OwnedView`]`<`[`GetBoardRequestView`]`<'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.
7994
7995 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetBoardRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7996        #[derive(Clone, Debug)]
7997        pub struct GetBoardRequestOwnedView(
7998            ::buffa::OwnedView<GetBoardRequestView<'static>>,
7999        );
8000        impl GetBoardRequestOwnedView {
8001            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8002            ///
8003            /// The view borrows directly from the buffer's data; the buffer is
8004            /// retained inside the returned handle.
8005            ///
8006            /// # Errors
8007            ///
8008            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8009            /// protobuf data.
8010            pub fn decode(
8011                bytes: ::buffa::bytes::Bytes,
8012            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8013                ::core::result::Result::Ok(
8014                    GetBoardRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
8015                )
8016            }
8017            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8018            /// max message size).
8019            ///
8020            /// # Errors
8021            ///
8022            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8023            /// exceeds the configured limits.
8024            pub fn decode_with_options(
8025                bytes: ::buffa::bytes::Bytes,
8026                opts: &::buffa::DecodeOptions,
8027            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8028                ::core::result::Result::Ok(
8029                    GetBoardRequestOwnedView(
8030                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8031                    ),
8032                )
8033            }
8034            /// Build from an owned message via an encode → decode round-trip.
8035            ///
8036            /// # Errors
8037            ///
8038            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8039            /// somehow invalid (should not happen for well-formed messages).
8040            pub fn from_owned(
8041                msg: &super::super::GetBoardRequest,
8042            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8043                ::core::result::Result::Ok(
8044                    GetBoardRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
8045                )
8046            }
8047            /// Borrow the full [`GetBoardRequestView`] with its lifetime tied to `&self`.
8048            #[must_use]
8049            pub fn view(&self) -> &GetBoardRequestView<'_> {
8050                self.0.reborrow()
8051            }
8052            /// Convert to the owned message type.
8053            ///
8054            /// # Errors
8055            ///
8056            /// Returns an error if re-materializing preserved unknown fields
8057            /// fails (e.g. the unknown-field limit is exceeded).
8058            pub fn to_owned_message(
8059                &self,
8060            ) -> ::core::result::Result<
8061                super::super::GetBoardRequest,
8062                ::buffa::DecodeError,
8063            > {
8064                self.0.to_owned_message()
8065            }
8066            /// The underlying bytes buffer.
8067            #[must_use]
8068            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8069                self.0.bytes()
8070            }
8071            /// Consume the handle, returning the underlying bytes buffer.
8072            #[must_use]
8073            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8074                self.0.into_bytes()
8075            }
8076            /// Board identifier as a UUID string.
8077            ///
8078            /// Field 1: `board_id`
8079            #[must_use]
8080            pub fn board_id(&self) -> &'_ str {
8081                self.0.reborrow().board_id
8082            }
8083        }
8084        impl ::core::convert::From<::buffa::OwnedView<GetBoardRequestView<'static>>>
8085        for GetBoardRequestOwnedView {
8086            fn from(inner: ::buffa::OwnedView<GetBoardRequestView<'static>>) -> Self {
8087                GetBoardRequestOwnedView(inner)
8088            }
8089        }
8090        impl ::core::convert::From<GetBoardRequestOwnedView>
8091        for ::buffa::OwnedView<GetBoardRequestView<'static>> {
8092            fn from(wrapper: GetBoardRequestOwnedView) -> Self {
8093                wrapper.0
8094            }
8095        }
8096        impl ::core::convert::AsRef<::buffa::OwnedView<GetBoardRequestView<'static>>>
8097        for GetBoardRequestOwnedView {
8098            fn as_ref(&self) -> &::buffa::OwnedView<GetBoardRequestView<'static>> {
8099                &self.0
8100            }
8101        }
8102        impl ::buffa::HasMessageView for super::super::GetBoardRequest {
8103            type View<'a> = GetBoardRequestView<'a>;
8104            type ViewHandle = GetBoardRequestOwnedView;
8105        }
8106        impl ::serde::Serialize for GetBoardRequestOwnedView {
8107            fn serialize<__S: ::serde::Serializer>(
8108                &self,
8109                __s: __S,
8110            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8111                ::serde::Serialize::serialize(&self.0, __s)
8112            }
8113        }
8114        /// GetBoardResponse returns one visible board.
8115        #[derive(Clone, Debug, Default)]
8116        pub struct GetBoardResponseView<'a> {
8117            /// Board metadata.
8118            ///
8119            /// Field 1: `board`
8120            pub board: ::buffa::MessageFieldView<
8121                super::super::__buffa::view::BoardView<'a>,
8122            >,
8123            /// Explicit ACL entries ordered by creation time, subject type, then subject ID. Returned only for callers who can manage the board.
8124            ///
8125            /// Field 2: `acl_entries`
8126            pub acl_entries: ::buffa::RepeatedView<
8127                'a,
8128                super::super::__buffa::view::BoardAclEntryView<'a>,
8129            >,
8130            /// Resolved caller access.
8131            ///
8132            /// Field 3: `access`
8133            pub access: ::buffa::MessageFieldView<
8134                super::super::__buffa::view::BoardAccessView<'a>,
8135            >,
8136            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8137        }
8138        impl<'a> ::buffa::MessageView<'a> for GetBoardResponseView<'a> {
8139            type Owned = super::super::GetBoardResponse;
8140            fn decode_view(
8141                buf: &'a [u8],
8142            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8143                let __limit = ::core::cell::Cell::new(
8144                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8145                );
8146                <Self as ::buffa::MessageView>::decode_view_ctx(
8147                    buf,
8148                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8149                )
8150            }
8151            fn decode_view_with_ctx(
8152                buf: &'a [u8],
8153                ctx: ::buffa::DecodeContext<'_>,
8154            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8155                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8156            }
8157            fn merge_view_field(
8158                &mut self,
8159                tag: ::buffa::encoding::Tag,
8160                cur: &'a [u8],
8161                before_tag: &'a [u8],
8162                ctx: ::buffa::DecodeContext<'_>,
8163            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8164                let _ = ctx;
8165                #[allow(unused_variables)]
8166                let view = self;
8167                let mut cur = cur;
8168                match tag.field_number() {
8169                    1u32 => {
8170                        ::buffa::encoding::check_wire_type(
8171                            tag,
8172                            ::buffa::encoding::WireType::LengthDelimited,
8173                        )?;
8174                        let __sub_ctx = ctx.descend()?;
8175                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8176                        match view.board.as_mut() {
8177                            Some(existing) => {
8178                                ::buffa::MessageView::merge_into_view(
8179                                    existing,
8180                                    sub,
8181                                    __sub_ctx,
8182                                )?
8183                            }
8184                            None => {
8185                                view.board = ::buffa::MessageFieldView::set(
8186                                    <super::super::__buffa::view::BoardView as ::buffa::MessageView>::decode_view_ctx(
8187                                        sub,
8188                                        __sub_ctx,
8189                                    )?,
8190                                );
8191                            }
8192                        }
8193                    }
8194                    3u32 => {
8195                        ::buffa::encoding::check_wire_type(
8196                            tag,
8197                            ::buffa::encoding::WireType::LengthDelimited,
8198                        )?;
8199                        let __sub_ctx = ctx.descend()?;
8200                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8201                        match view.access.as_mut() {
8202                            Some(existing) => {
8203                                ::buffa::MessageView::merge_into_view(
8204                                    existing,
8205                                    sub,
8206                                    __sub_ctx,
8207                                )?
8208                            }
8209                            None => {
8210                                view.access = ::buffa::MessageFieldView::set(
8211                                    <super::super::__buffa::view::BoardAccessView as ::buffa::MessageView>::decode_view_ctx(
8212                                        sub,
8213                                        __sub_ctx,
8214                                    )?,
8215                                );
8216                            }
8217                        }
8218                    }
8219                    2u32 => {
8220                        ::buffa::encoding::check_wire_type(
8221                            tag,
8222                            ::buffa::encoding::WireType::LengthDelimited,
8223                        )?;
8224                        let __sub_ctx = ctx.descend()?;
8225                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8226                        view.acl_entries
8227                            .push(
8228                                <super::super::__buffa::view::BoardAclEntryView as ::buffa::MessageView>::decode_view_ctx(
8229                                    sub,
8230                                    __sub_ctx,
8231                                )?,
8232                            );
8233                    }
8234                    _ => {
8235                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8236                        let span_len = before_tag.len() - cur.len();
8237                        view.__buffa_unknown_fields
8238                            .push_record(before_tag, span_len, ctx)?;
8239                    }
8240                }
8241                ::core::result::Result::Ok(cur)
8242            }
8243            fn to_owned_message(
8244                &self,
8245            ) -> ::core::result::Result<
8246                super::super::GetBoardResponse,
8247                ::buffa::DecodeError,
8248            > {
8249                self.to_owned_from_source(None)
8250            }
8251            #[allow(clippy::useless_conversion, clippy::needless_update)]
8252            fn to_owned_from_source(
8253                &self,
8254                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8255            ) -> ::core::result::Result<
8256                super::super::GetBoardResponse,
8257                ::buffa::DecodeError,
8258            > {
8259                #[allow(unused_imports)]
8260                use ::buffa::alloc::string::ToString as _;
8261                let _ = __buffa_src;
8262                ::core::result::Result::Ok(super::super::GetBoardResponse {
8263                    board: match self.board.as_option() {
8264                        Some(v) => {
8265                            ::buffa::MessageField::<
8266                                super::super::Board,
8267                            >::some(v.to_owned_from_source(__buffa_src)?)
8268                        }
8269                        None => ::buffa::MessageField::none(),
8270                    },
8271                    acl_entries: self
8272                        .acl_entries
8273                        .iter()
8274                        .map(|v| v.to_owned_from_source(__buffa_src))
8275                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
8276                    access: match self.access.as_option() {
8277                        Some(v) => {
8278                            ::buffa::MessageField::<
8279                                super::super::BoardAccess,
8280                            >::some(v.to_owned_from_source(__buffa_src)?)
8281                        }
8282                        None => ::buffa::MessageField::none(),
8283                    },
8284                    __buffa_unknown_fields: self
8285                        .__buffa_unknown_fields
8286                        .to_owned()?
8287                        .into(),
8288                    ..::core::default::Default::default()
8289                })
8290            }
8291        }
8292        impl<'a> ::buffa::ViewEncode<'a> for GetBoardResponseView<'a> {
8293            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8294            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8295                #[allow(unused_imports)]
8296                use ::buffa::Enumeration as _;
8297                let mut size = 0u32;
8298                if self.board.is_set() {
8299                    let __slot = __cache.reserve();
8300                    let inner_size = self.board.compute_size(__cache);
8301                    __cache.set(__slot, inner_size);
8302                    size
8303                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8304                            + inner_size;
8305                }
8306                for v in &self.acl_entries {
8307                    let __slot = __cache.reserve();
8308                    let inner_size = v.compute_size(__cache);
8309                    __cache.set(__slot, inner_size);
8310                    size
8311                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8312                            + inner_size;
8313                }
8314                if self.access.is_set() {
8315                    let __slot = __cache.reserve();
8316                    let inner_size = self.access.compute_size(__cache);
8317                    __cache.set(__slot, inner_size);
8318                    size
8319                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8320                            + inner_size;
8321                }
8322                size += self.__buffa_unknown_fields.encoded_len() as u32;
8323                size
8324            }
8325            #[allow(clippy::needless_borrow)]
8326            fn write_to(
8327                &self,
8328                __cache: &mut ::buffa::SizeCache,
8329                buf: &mut impl ::buffa::bytes::BufMut,
8330            ) {
8331                #[allow(unused_imports)]
8332                use ::buffa::Enumeration as _;
8333                if self.board.is_set() {
8334                    ::buffa::types::put_len_delimited_header(
8335                        1u32,
8336                        __cache.consume_next(),
8337                        buf,
8338                    );
8339                    self.board.write_to(__cache, buf);
8340                }
8341                for v in &self.acl_entries {
8342                    ::buffa::types::put_len_delimited_header(
8343                        2u32,
8344                        __cache.consume_next(),
8345                        buf,
8346                    );
8347                    v.write_to(__cache, buf);
8348                }
8349                if self.access.is_set() {
8350                    ::buffa::types::put_len_delimited_header(
8351                        3u32,
8352                        __cache.consume_next(),
8353                        buf,
8354                    );
8355                    self.access.write_to(__cache, buf);
8356                }
8357                self.__buffa_unknown_fields.write_to(buf);
8358            }
8359        }
8360        /// Serializes this view as protobuf JSON.
8361        ///
8362        /// Implicit-presence fields with default values are omitted, `required`
8363        /// fields are always emitted, explicit-presence (`optional`) fields are
8364        /// emitted only when set, bytes fields are base64-encoded, and enum
8365        /// values are their proto name strings.
8366        ///
8367        /// This impl uses `serialize_map(None)` because the number of emitted
8368        /// fields depends on default-omission rules; serializers that require
8369        /// known map lengths (e.g. `bincode`) will return a runtime error.
8370        /// Use the owned message type for those formats.
8371        impl<'__a> ::serde::Serialize for GetBoardResponseView<'__a> {
8372            fn serialize<__S: ::serde::Serializer>(
8373                &self,
8374                __s: __S,
8375            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8376                use ::serde::ser::SerializeMap as _;
8377                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8378                {
8379                    if let ::core::option::Option::Some(__v) = self.board.as_option() {
8380                        __map.serialize_entry("board", __v)?;
8381                    }
8382                }
8383                if !self.acl_entries.is_empty() {
8384                    __map.serialize_entry("aclEntries", &*self.acl_entries)?;
8385                }
8386                {
8387                    if let ::core::option::Option::Some(__v) = self.access.as_option() {
8388                        __map.serialize_entry("access", __v)?;
8389                    }
8390                }
8391                __map.end()
8392            }
8393        }
8394        impl<'a> ::buffa::MessageName for GetBoardResponseView<'a> {
8395            const PACKAGE: &'static str = "collab.v1";
8396            const NAME: &'static str = "GetBoardResponse";
8397            const FULL_NAME: &'static str = "collab.v1.GetBoardResponse";
8398            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.GetBoardResponse";
8399        }
8400        ::buffa::impl_default_view_instance!(GetBoardResponseView);
8401        ::buffa::impl_view_reborrow!(GetBoardResponseView);
8402        /** Self-contained, `'static` owned view of a `GetBoardResponse` message.
8403
8404 Wraps [`::buffa::OwnedView`]`<`[`GetBoardResponseView`]`<'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.
8405
8406 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetBoardResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8407        #[derive(Clone, Debug)]
8408        pub struct GetBoardResponseOwnedView(
8409            ::buffa::OwnedView<GetBoardResponseView<'static>>,
8410        );
8411        impl GetBoardResponseOwnedView {
8412            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8413            ///
8414            /// The view borrows directly from the buffer's data; the buffer is
8415            /// retained inside the returned handle.
8416            ///
8417            /// # Errors
8418            ///
8419            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8420            /// protobuf data.
8421            pub fn decode(
8422                bytes: ::buffa::bytes::Bytes,
8423            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8424                ::core::result::Result::Ok(
8425                    GetBoardResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
8426                )
8427            }
8428            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8429            /// max message size).
8430            ///
8431            /// # Errors
8432            ///
8433            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8434            /// exceeds the configured limits.
8435            pub fn decode_with_options(
8436                bytes: ::buffa::bytes::Bytes,
8437                opts: &::buffa::DecodeOptions,
8438            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8439                ::core::result::Result::Ok(
8440                    GetBoardResponseOwnedView(
8441                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8442                    ),
8443                )
8444            }
8445            /// Build from an owned message via an encode → decode round-trip.
8446            ///
8447            /// # Errors
8448            ///
8449            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8450            /// somehow invalid (should not happen for well-formed messages).
8451            pub fn from_owned(
8452                msg: &super::super::GetBoardResponse,
8453            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8454                ::core::result::Result::Ok(
8455                    GetBoardResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
8456                )
8457            }
8458            /// Borrow the full [`GetBoardResponseView`] with its lifetime tied to `&self`.
8459            #[must_use]
8460            pub fn view(&self) -> &GetBoardResponseView<'_> {
8461                self.0.reborrow()
8462            }
8463            /// Convert to the owned message type.
8464            ///
8465            /// # Errors
8466            ///
8467            /// Returns an error if re-materializing preserved unknown fields
8468            /// fails (e.g. the unknown-field limit is exceeded).
8469            pub fn to_owned_message(
8470                &self,
8471            ) -> ::core::result::Result<
8472                super::super::GetBoardResponse,
8473                ::buffa::DecodeError,
8474            > {
8475                self.0.to_owned_message()
8476            }
8477            /// The underlying bytes buffer.
8478            #[must_use]
8479            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8480                self.0.bytes()
8481            }
8482            /// Consume the handle, returning the underlying bytes buffer.
8483            #[must_use]
8484            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8485                self.0.into_bytes()
8486            }
8487            /// Board metadata.
8488            ///
8489            /// Field 1: `board`
8490            #[must_use]
8491            pub fn board(
8492                &self,
8493            ) -> &::buffa::MessageFieldView<super::super::__buffa::view::BoardView<'_>> {
8494                &self.0.reborrow().board
8495            }
8496            /// Explicit ACL entries ordered by creation time, subject type, then subject ID. Returned only for callers who can manage the board.
8497            ///
8498            /// Field 2: `acl_entries`
8499            #[must_use]
8500            pub fn acl_entries(
8501                &self,
8502            ) -> &::buffa::RepeatedView<
8503                '_,
8504                super::super::__buffa::view::BoardAclEntryView<'_>,
8505            > {
8506                &self.0.reborrow().acl_entries
8507            }
8508            /// Resolved caller access.
8509            ///
8510            /// Field 3: `access`
8511            #[must_use]
8512            pub fn access(
8513                &self,
8514            ) -> &::buffa::MessageFieldView<
8515                super::super::__buffa::view::BoardAccessView<'_>,
8516            > {
8517                &self.0.reborrow().access
8518            }
8519        }
8520        impl ::core::convert::From<::buffa::OwnedView<GetBoardResponseView<'static>>>
8521        for GetBoardResponseOwnedView {
8522            fn from(inner: ::buffa::OwnedView<GetBoardResponseView<'static>>) -> Self {
8523                GetBoardResponseOwnedView(inner)
8524            }
8525        }
8526        impl ::core::convert::From<GetBoardResponseOwnedView>
8527        for ::buffa::OwnedView<GetBoardResponseView<'static>> {
8528            fn from(wrapper: GetBoardResponseOwnedView) -> Self {
8529                wrapper.0
8530            }
8531        }
8532        impl ::core::convert::AsRef<::buffa::OwnedView<GetBoardResponseView<'static>>>
8533        for GetBoardResponseOwnedView {
8534            fn as_ref(&self) -> &::buffa::OwnedView<GetBoardResponseView<'static>> {
8535                &self.0
8536            }
8537        }
8538        impl ::buffa::HasMessageView for super::super::GetBoardResponse {
8539            type View<'a> = GetBoardResponseView<'a>;
8540            type ViewHandle = GetBoardResponseOwnedView;
8541        }
8542        impl ::serde::Serialize for GetBoardResponseOwnedView {
8543            fn serialize<__S: ::serde::Serializer>(
8544                &self,
8545                __s: __S,
8546            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8547                ::serde::Serialize::serialize(&self.0, __s)
8548            }
8549        }
8550        /// ListBoardsRequest lists boards visible to the caller.
8551        #[derive(Clone, Debug, Default)]
8552        pub struct ListBoardsRequestView<'a> {
8553            /// When true, include archived boards in the response.
8554            ///
8555            /// Field 1: `include_archived`
8556            pub include_archived: bool,
8557            /// Maximum number of boards to return. Defaults to 100 when omitted; maximum
8558            /// is 500.
8559            ///
8560            /// Field 2: `limit`
8561            pub limit: u32,
8562            /// Opaque keyset cursor from a previous response. The cursor is exclusive and
8563            /// bound to the authenticated caller, archive filter, and newest-updated sort
8564            /// order.
8565            ///
8566            /// Field 3: `page_token`
8567            pub page_token: &'a str,
8568            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8569        }
8570        impl<'a> ::buffa::MessageView<'a> for ListBoardsRequestView<'a> {
8571            type Owned = super::super::ListBoardsRequest;
8572            fn decode_view(
8573                buf: &'a [u8],
8574            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8575                let __limit = ::core::cell::Cell::new(
8576                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8577                );
8578                <Self as ::buffa::MessageView>::decode_view_ctx(
8579                    buf,
8580                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8581                )
8582            }
8583            fn decode_view_with_ctx(
8584                buf: &'a [u8],
8585                ctx: ::buffa::DecodeContext<'_>,
8586            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8587                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8588            }
8589            fn merge_view_field(
8590                &mut self,
8591                tag: ::buffa::encoding::Tag,
8592                cur: &'a [u8],
8593                before_tag: &'a [u8],
8594                ctx: ::buffa::DecodeContext<'_>,
8595            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8596                let _ = ctx;
8597                #[allow(unused_variables)]
8598                let view = self;
8599                let mut cur = cur;
8600                match tag.field_number() {
8601                    1u32 => {
8602                        ::buffa::encoding::check_wire_type(
8603                            tag,
8604                            ::buffa::encoding::WireType::Varint,
8605                        )?;
8606                        view.include_archived = ::buffa::types::decode_bool(&mut cur)?;
8607                    }
8608                    2u32 => {
8609                        ::buffa::encoding::check_wire_type(
8610                            tag,
8611                            ::buffa::encoding::WireType::Varint,
8612                        )?;
8613                        view.limit = ::buffa::types::decode_uint32(&mut cur)?;
8614                    }
8615                    3u32 => {
8616                        ::buffa::encoding::check_wire_type(
8617                            tag,
8618                            ::buffa::encoding::WireType::LengthDelimited,
8619                        )?;
8620                        view.page_token = ::buffa::types::borrow_str(&mut cur)?;
8621                    }
8622                    _ => {
8623                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8624                        let span_len = before_tag.len() - cur.len();
8625                        view.__buffa_unknown_fields
8626                            .push_record(before_tag, span_len, ctx)?;
8627                    }
8628                }
8629                ::core::result::Result::Ok(cur)
8630            }
8631            fn to_owned_message(
8632                &self,
8633            ) -> ::core::result::Result<
8634                super::super::ListBoardsRequest,
8635                ::buffa::DecodeError,
8636            > {
8637                self.to_owned_from_source(None)
8638            }
8639            #[allow(clippy::useless_conversion, clippy::needless_update)]
8640            fn to_owned_from_source(
8641                &self,
8642                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8643            ) -> ::core::result::Result<
8644                super::super::ListBoardsRequest,
8645                ::buffa::DecodeError,
8646            > {
8647                #[allow(unused_imports)]
8648                use ::buffa::alloc::string::ToString as _;
8649                let _ = __buffa_src;
8650                ::core::result::Result::Ok(super::super::ListBoardsRequest {
8651                    include_archived: self.include_archived,
8652                    limit: self.limit,
8653                    page_token: self.page_token.to_string(),
8654                    __buffa_unknown_fields: self
8655                        .__buffa_unknown_fields
8656                        .to_owned()?
8657                        .into(),
8658                    ..::core::default::Default::default()
8659                })
8660            }
8661        }
8662        impl<'a> ::buffa::ViewEncode<'a> for ListBoardsRequestView<'a> {
8663            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8664            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8665                #[allow(unused_imports)]
8666                use ::buffa::Enumeration as _;
8667                let mut size = 0u32;
8668                if self.include_archived {
8669                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
8670                }
8671                if self.limit != 0u32 {
8672                    size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
8673                }
8674                if !self.page_token.is_empty() {
8675                    size
8676                        += 1u32
8677                            + ::buffa::types::string_encoded_len(&self.page_token)
8678                                as u32;
8679                }
8680                size += self.__buffa_unknown_fields.encoded_len() as u32;
8681                size
8682            }
8683            #[allow(clippy::needless_borrow)]
8684            fn write_to(
8685                &self,
8686                _cache: &mut ::buffa::SizeCache,
8687                buf: &mut impl ::buffa::bytes::BufMut,
8688            ) {
8689                #[allow(unused_imports)]
8690                use ::buffa::Enumeration as _;
8691                if self.include_archived {
8692                    ::buffa::types::put_bool_field(1u32, self.include_archived, buf);
8693                }
8694                if self.limit != 0u32 {
8695                    ::buffa::types::put_uint32_field(2u32, self.limit, buf);
8696                }
8697                if !self.page_token.is_empty() {
8698                    ::buffa::types::put_string_field(3u32, &self.page_token, buf);
8699                }
8700                self.__buffa_unknown_fields.write_to(buf);
8701            }
8702        }
8703        /// Serializes this view as protobuf JSON.
8704        ///
8705        /// Implicit-presence fields with default values are omitted, `required`
8706        /// fields are always emitted, explicit-presence (`optional`) fields are
8707        /// emitted only when set, bytes fields are base64-encoded, and enum
8708        /// values are their proto name strings.
8709        ///
8710        /// This impl uses `serialize_map(None)` because the number of emitted
8711        /// fields depends on default-omission rules; serializers that require
8712        /// known map lengths (e.g. `bincode`) will return a runtime error.
8713        /// Use the owned message type for those formats.
8714        impl<'__a> ::serde::Serialize for ListBoardsRequestView<'__a> {
8715            fn serialize<__S: ::serde::Serializer>(
8716                &self,
8717                __s: __S,
8718            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8719                use ::serde::ser::SerializeMap as _;
8720                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8721                if self.include_archived {
8722                    __map.serialize_entry("includeArchived", &self.include_archived)?;
8723                }
8724                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.limit) {
8725                    __map
8726                        .serialize_entry(
8727                            "limit",
8728                            &::buffa::json_helpers::ProtoJson(&self.limit),
8729                        )?;
8730                }
8731                if !::buffa::json_helpers::skip_if::is_empty_str(self.page_token) {
8732                    __map.serialize_entry("pageToken", self.page_token)?;
8733                }
8734                __map.end()
8735            }
8736        }
8737        impl<'a> ::buffa::MessageName for ListBoardsRequestView<'a> {
8738            const PACKAGE: &'static str = "collab.v1";
8739            const NAME: &'static str = "ListBoardsRequest";
8740            const FULL_NAME: &'static str = "collab.v1.ListBoardsRequest";
8741            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ListBoardsRequest";
8742        }
8743        ::buffa::impl_default_view_instance!(ListBoardsRequestView);
8744        ::buffa::impl_view_reborrow!(ListBoardsRequestView);
8745        /** Self-contained, `'static` owned view of a `ListBoardsRequest` message.
8746
8747 Wraps [`::buffa::OwnedView`]`<`[`ListBoardsRequestView`]`<'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.
8748
8749 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListBoardsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8750        #[derive(Clone, Debug)]
8751        pub struct ListBoardsRequestOwnedView(
8752            ::buffa::OwnedView<ListBoardsRequestView<'static>>,
8753        );
8754        impl ListBoardsRequestOwnedView {
8755            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8756            ///
8757            /// The view borrows directly from the buffer's data; the buffer is
8758            /// retained inside the returned handle.
8759            ///
8760            /// # Errors
8761            ///
8762            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8763            /// protobuf data.
8764            pub fn decode(
8765                bytes: ::buffa::bytes::Bytes,
8766            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8767                ::core::result::Result::Ok(
8768                    ListBoardsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
8769                )
8770            }
8771            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8772            /// max message size).
8773            ///
8774            /// # Errors
8775            ///
8776            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8777            /// exceeds the configured limits.
8778            pub fn decode_with_options(
8779                bytes: ::buffa::bytes::Bytes,
8780                opts: &::buffa::DecodeOptions,
8781            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8782                ::core::result::Result::Ok(
8783                    ListBoardsRequestOwnedView(
8784                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8785                    ),
8786                )
8787            }
8788            /// Build from an owned message via an encode → decode round-trip.
8789            ///
8790            /// # Errors
8791            ///
8792            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8793            /// somehow invalid (should not happen for well-formed messages).
8794            pub fn from_owned(
8795                msg: &super::super::ListBoardsRequest,
8796            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8797                ::core::result::Result::Ok(
8798                    ListBoardsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
8799                )
8800            }
8801            /// Borrow the full [`ListBoardsRequestView`] with its lifetime tied to `&self`.
8802            #[must_use]
8803            pub fn view(&self) -> &ListBoardsRequestView<'_> {
8804                self.0.reborrow()
8805            }
8806            /// Convert to the owned message type.
8807            ///
8808            /// # Errors
8809            ///
8810            /// Returns an error if re-materializing preserved unknown fields
8811            /// fails (e.g. the unknown-field limit is exceeded).
8812            pub fn to_owned_message(
8813                &self,
8814            ) -> ::core::result::Result<
8815                super::super::ListBoardsRequest,
8816                ::buffa::DecodeError,
8817            > {
8818                self.0.to_owned_message()
8819            }
8820            /// The underlying bytes buffer.
8821            #[must_use]
8822            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8823                self.0.bytes()
8824            }
8825            /// Consume the handle, returning the underlying bytes buffer.
8826            #[must_use]
8827            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8828                self.0.into_bytes()
8829            }
8830            /// When true, include archived boards in the response.
8831            ///
8832            /// Field 1: `include_archived`
8833            #[must_use]
8834            pub fn include_archived(&self) -> bool {
8835                self.0.reborrow().include_archived
8836            }
8837            /// Maximum number of boards to return. Defaults to 100 when omitted; maximum
8838            /// is 500.
8839            ///
8840            /// Field 2: `limit`
8841            #[must_use]
8842            pub fn limit(&self) -> u32 {
8843                self.0.reborrow().limit
8844            }
8845            /// Opaque keyset cursor from a previous response. The cursor is exclusive and
8846            /// bound to the authenticated caller, archive filter, and newest-updated sort
8847            /// order.
8848            ///
8849            /// Field 3: `page_token`
8850            #[must_use]
8851            pub fn page_token(&self) -> &'_ str {
8852                self.0.reborrow().page_token
8853            }
8854        }
8855        impl ::core::convert::From<::buffa::OwnedView<ListBoardsRequestView<'static>>>
8856        for ListBoardsRequestOwnedView {
8857            fn from(inner: ::buffa::OwnedView<ListBoardsRequestView<'static>>) -> Self {
8858                ListBoardsRequestOwnedView(inner)
8859            }
8860        }
8861        impl ::core::convert::From<ListBoardsRequestOwnedView>
8862        for ::buffa::OwnedView<ListBoardsRequestView<'static>> {
8863            fn from(wrapper: ListBoardsRequestOwnedView) -> Self {
8864                wrapper.0
8865            }
8866        }
8867        impl ::core::convert::AsRef<::buffa::OwnedView<ListBoardsRequestView<'static>>>
8868        for ListBoardsRequestOwnedView {
8869            fn as_ref(&self) -> &::buffa::OwnedView<ListBoardsRequestView<'static>> {
8870                &self.0
8871            }
8872        }
8873        impl ::buffa::HasMessageView for super::super::ListBoardsRequest {
8874            type View<'a> = ListBoardsRequestView<'a>;
8875            type ViewHandle = ListBoardsRequestOwnedView;
8876        }
8877        impl ::serde::Serialize for ListBoardsRequestOwnedView {
8878            fn serialize<__S: ::serde::Serializer>(
8879                &self,
8880                __s: __S,
8881            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8882                ::serde::Serialize::serialize(&self.0, __s)
8883            }
8884        }
8885        /// ListBoardsResponse lists boards visible to the caller in most-recently-updated order.
8886        #[derive(Clone, Debug, Default)]
8887        pub struct ListBoardsResponseView<'a> {
8888            /// Visible boards ordered by updated_at descending, then board_id descending.
8889            ///
8890            /// Field 1: `boards`
8891            pub boards: ::buffa::RepeatedView<
8892                'a,
8893                super::super::__buffa::view::BoardListItemView<'a>,
8894            >,
8895            /// Opaque cursor for the next page. Empty when no more results exist.
8896            ///
8897            /// Field 2: `next_page_token`
8898            pub next_page_token: &'a str,
8899            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8900        }
8901        impl<'a> ::buffa::MessageView<'a> for ListBoardsResponseView<'a> {
8902            type Owned = super::super::ListBoardsResponse;
8903            fn decode_view(
8904                buf: &'a [u8],
8905            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8906                let __limit = ::core::cell::Cell::new(
8907                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8908                );
8909                <Self as ::buffa::MessageView>::decode_view_ctx(
8910                    buf,
8911                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8912                )
8913            }
8914            fn decode_view_with_ctx(
8915                buf: &'a [u8],
8916                ctx: ::buffa::DecodeContext<'_>,
8917            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8918                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8919            }
8920            fn merge_view_field(
8921                &mut self,
8922                tag: ::buffa::encoding::Tag,
8923                cur: &'a [u8],
8924                before_tag: &'a [u8],
8925                ctx: ::buffa::DecodeContext<'_>,
8926            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8927                let _ = ctx;
8928                #[allow(unused_variables)]
8929                let view = self;
8930                let mut cur = cur;
8931                match tag.field_number() {
8932                    2u32 => {
8933                        ::buffa::encoding::check_wire_type(
8934                            tag,
8935                            ::buffa::encoding::WireType::LengthDelimited,
8936                        )?;
8937                        view.next_page_token = ::buffa::types::borrow_str(&mut cur)?;
8938                    }
8939                    1u32 => {
8940                        ::buffa::encoding::check_wire_type(
8941                            tag,
8942                            ::buffa::encoding::WireType::LengthDelimited,
8943                        )?;
8944                        let __sub_ctx = ctx.descend()?;
8945                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8946                        view.boards
8947                            .push(
8948                                <super::super::__buffa::view::BoardListItemView as ::buffa::MessageView>::decode_view_ctx(
8949                                    sub,
8950                                    __sub_ctx,
8951                                )?,
8952                            );
8953                    }
8954                    _ => {
8955                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8956                        let span_len = before_tag.len() - cur.len();
8957                        view.__buffa_unknown_fields
8958                            .push_record(before_tag, span_len, ctx)?;
8959                    }
8960                }
8961                ::core::result::Result::Ok(cur)
8962            }
8963            fn to_owned_message(
8964                &self,
8965            ) -> ::core::result::Result<
8966                super::super::ListBoardsResponse,
8967                ::buffa::DecodeError,
8968            > {
8969                self.to_owned_from_source(None)
8970            }
8971            #[allow(clippy::useless_conversion, clippy::needless_update)]
8972            fn to_owned_from_source(
8973                &self,
8974                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8975            ) -> ::core::result::Result<
8976                super::super::ListBoardsResponse,
8977                ::buffa::DecodeError,
8978            > {
8979                #[allow(unused_imports)]
8980                use ::buffa::alloc::string::ToString as _;
8981                let _ = __buffa_src;
8982                ::core::result::Result::Ok(super::super::ListBoardsResponse {
8983                    boards: self
8984                        .boards
8985                        .iter()
8986                        .map(|v| v.to_owned_from_source(__buffa_src))
8987                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
8988                    next_page_token: self.next_page_token.to_string(),
8989                    __buffa_unknown_fields: self
8990                        .__buffa_unknown_fields
8991                        .to_owned()?
8992                        .into(),
8993                    ..::core::default::Default::default()
8994                })
8995            }
8996        }
8997        impl<'a> ::buffa::ViewEncode<'a> for ListBoardsResponseView<'a> {
8998            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8999            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9000                #[allow(unused_imports)]
9001                use ::buffa::Enumeration as _;
9002                let mut size = 0u32;
9003                for v in &self.boards {
9004                    let __slot = __cache.reserve();
9005                    let inner_size = v.compute_size(__cache);
9006                    __cache.set(__slot, inner_size);
9007                    size
9008                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9009                            + inner_size;
9010                }
9011                if !self.next_page_token.is_empty() {
9012                    size
9013                        += 1u32
9014                            + ::buffa::types::string_encoded_len(&self.next_page_token)
9015                                as u32;
9016                }
9017                size += self.__buffa_unknown_fields.encoded_len() as u32;
9018                size
9019            }
9020            #[allow(clippy::needless_borrow)]
9021            fn write_to(
9022                &self,
9023                __cache: &mut ::buffa::SizeCache,
9024                buf: &mut impl ::buffa::bytes::BufMut,
9025            ) {
9026                #[allow(unused_imports)]
9027                use ::buffa::Enumeration as _;
9028                for v in &self.boards {
9029                    ::buffa::types::put_len_delimited_header(
9030                        1u32,
9031                        __cache.consume_next(),
9032                        buf,
9033                    );
9034                    v.write_to(__cache, buf);
9035                }
9036                if !self.next_page_token.is_empty() {
9037                    ::buffa::types::put_string_field(2u32, &self.next_page_token, buf);
9038                }
9039                self.__buffa_unknown_fields.write_to(buf);
9040            }
9041        }
9042        /// Serializes this view as protobuf JSON.
9043        ///
9044        /// Implicit-presence fields with default values are omitted, `required`
9045        /// fields are always emitted, explicit-presence (`optional`) fields are
9046        /// emitted only when set, bytes fields are base64-encoded, and enum
9047        /// values are their proto name strings.
9048        ///
9049        /// This impl uses `serialize_map(None)` because the number of emitted
9050        /// fields depends on default-omission rules; serializers that require
9051        /// known map lengths (e.g. `bincode`) will return a runtime error.
9052        /// Use the owned message type for those formats.
9053        impl<'__a> ::serde::Serialize for ListBoardsResponseView<'__a> {
9054            fn serialize<__S: ::serde::Serializer>(
9055                &self,
9056                __s: __S,
9057            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9058                use ::serde::ser::SerializeMap as _;
9059                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9060                if !self.boards.is_empty() {
9061                    __map.serialize_entry("boards", &*self.boards)?;
9062                }
9063                if !::buffa::json_helpers::skip_if::is_empty_str(self.next_page_token) {
9064                    __map.serialize_entry("nextPageToken", self.next_page_token)?;
9065                }
9066                __map.end()
9067            }
9068        }
9069        impl<'a> ::buffa::MessageName for ListBoardsResponseView<'a> {
9070            const PACKAGE: &'static str = "collab.v1";
9071            const NAME: &'static str = "ListBoardsResponse";
9072            const FULL_NAME: &'static str = "collab.v1.ListBoardsResponse";
9073            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ListBoardsResponse";
9074        }
9075        ::buffa::impl_default_view_instance!(ListBoardsResponseView);
9076        ::buffa::impl_view_reborrow!(ListBoardsResponseView);
9077        /** Self-contained, `'static` owned view of a `ListBoardsResponse` message.
9078
9079 Wraps [`::buffa::OwnedView`]`<`[`ListBoardsResponseView`]`<'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.
9080
9081 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListBoardsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9082        #[derive(Clone, Debug)]
9083        pub struct ListBoardsResponseOwnedView(
9084            ::buffa::OwnedView<ListBoardsResponseView<'static>>,
9085        );
9086        impl ListBoardsResponseOwnedView {
9087            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9088            ///
9089            /// The view borrows directly from the buffer's data; the buffer is
9090            /// retained inside the returned handle.
9091            ///
9092            /// # Errors
9093            ///
9094            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9095            /// protobuf data.
9096            pub fn decode(
9097                bytes: ::buffa::bytes::Bytes,
9098            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9099                ::core::result::Result::Ok(
9100                    ListBoardsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
9101                )
9102            }
9103            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9104            /// max message size).
9105            ///
9106            /// # Errors
9107            ///
9108            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9109            /// exceeds the configured limits.
9110            pub fn decode_with_options(
9111                bytes: ::buffa::bytes::Bytes,
9112                opts: &::buffa::DecodeOptions,
9113            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9114                ::core::result::Result::Ok(
9115                    ListBoardsResponseOwnedView(
9116                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9117                    ),
9118                )
9119            }
9120            /// Build from an owned message via an encode → decode round-trip.
9121            ///
9122            /// # Errors
9123            ///
9124            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9125            /// somehow invalid (should not happen for well-formed messages).
9126            pub fn from_owned(
9127                msg: &super::super::ListBoardsResponse,
9128            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9129                ::core::result::Result::Ok(
9130                    ListBoardsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
9131                )
9132            }
9133            /// Borrow the full [`ListBoardsResponseView`] with its lifetime tied to `&self`.
9134            #[must_use]
9135            pub fn view(&self) -> &ListBoardsResponseView<'_> {
9136                self.0.reborrow()
9137            }
9138            /// Convert to the owned message type.
9139            ///
9140            /// # Errors
9141            ///
9142            /// Returns an error if re-materializing preserved unknown fields
9143            /// fails (e.g. the unknown-field limit is exceeded).
9144            pub fn to_owned_message(
9145                &self,
9146            ) -> ::core::result::Result<
9147                super::super::ListBoardsResponse,
9148                ::buffa::DecodeError,
9149            > {
9150                self.0.to_owned_message()
9151            }
9152            /// The underlying bytes buffer.
9153            #[must_use]
9154            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9155                self.0.bytes()
9156            }
9157            /// Consume the handle, returning the underlying bytes buffer.
9158            #[must_use]
9159            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9160                self.0.into_bytes()
9161            }
9162            /// Visible boards ordered by updated_at descending, then board_id descending.
9163            ///
9164            /// Field 1: `boards`
9165            #[must_use]
9166            pub fn boards(
9167                &self,
9168            ) -> &::buffa::RepeatedView<
9169                '_,
9170                super::super::__buffa::view::BoardListItemView<'_>,
9171            > {
9172                &self.0.reborrow().boards
9173            }
9174            /// Opaque cursor for the next page. Empty when no more results exist.
9175            ///
9176            /// Field 2: `next_page_token`
9177            #[must_use]
9178            pub fn next_page_token(&self) -> &'_ str {
9179                self.0.reborrow().next_page_token
9180            }
9181        }
9182        impl ::core::convert::From<::buffa::OwnedView<ListBoardsResponseView<'static>>>
9183        for ListBoardsResponseOwnedView {
9184            fn from(inner: ::buffa::OwnedView<ListBoardsResponseView<'static>>) -> Self {
9185                ListBoardsResponseOwnedView(inner)
9186            }
9187        }
9188        impl ::core::convert::From<ListBoardsResponseOwnedView>
9189        for ::buffa::OwnedView<ListBoardsResponseView<'static>> {
9190            fn from(wrapper: ListBoardsResponseOwnedView) -> Self {
9191                wrapper.0
9192            }
9193        }
9194        impl ::core::convert::AsRef<::buffa::OwnedView<ListBoardsResponseView<'static>>>
9195        for ListBoardsResponseOwnedView {
9196            fn as_ref(&self) -> &::buffa::OwnedView<ListBoardsResponseView<'static>> {
9197                &self.0
9198            }
9199        }
9200        impl ::buffa::HasMessageView for super::super::ListBoardsResponse {
9201            type View<'a> = ListBoardsResponseView<'a>;
9202            type ViewHandle = ListBoardsResponseOwnedView;
9203        }
9204        impl ::serde::Serialize for ListBoardsResponseOwnedView {
9205            fn serialize<__S: ::serde::Serializer>(
9206                &self,
9207                __s: __S,
9208            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9209                ::serde::Serialize::serialize(&self.0, __s)
9210            }
9211        }
9212        /// UpdateBoardRequest updates mutable board metadata.
9213        #[derive(Clone, Debug, Default)]
9214        pub struct UpdateBoardRequestView<'a> {
9215            /// Board identifier as a UUID string.
9216            ///
9217            /// Field 1: `board_id`
9218            pub board_id: &'a str,
9219            /// New board title, max 200 characters and 400 bytes. When unset, the title is unchanged.
9220            ///
9221            /// Field 2: `title`
9222            pub title: ::core::option::Option<&'a str>,
9223            /// New audience policy. When unset, the audience is unchanged.
9224            ///
9225            /// Field 3: `audience`
9226            pub audience: ::core::option::Option<
9227                ::buffa::EnumValue<super::super::BoardAudience>,
9228            >,
9229            /// New default audience role for PUBLIC or FOLLOWERS access. When unset, the role is unchanged.
9230            ///
9231            /// Field 4: `default_role`
9232            pub default_role: ::core::option::Option<
9233                ::buffa::EnumValue<super::super::BoardRole>,
9234            >,
9235            /// New initial snapshot as a JSON object. When unset, the snapshot is unchanged.
9236            ///
9237            /// Field 5: `initial_snapshot`
9238            pub initial_snapshot: ::buffa::MessageFieldView<
9239                ::buffa_types::google::protobuf::__buffa::view::StructView<'a>,
9240            >,
9241            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9242        }
9243        impl<'a> ::buffa::MessageView<'a> for UpdateBoardRequestView<'a> {
9244            type Owned = super::super::UpdateBoardRequest;
9245            fn decode_view(
9246                buf: &'a [u8],
9247            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9248                let __limit = ::core::cell::Cell::new(
9249                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9250                );
9251                <Self as ::buffa::MessageView>::decode_view_ctx(
9252                    buf,
9253                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9254                )
9255            }
9256            fn decode_view_with_ctx(
9257                buf: &'a [u8],
9258                ctx: ::buffa::DecodeContext<'_>,
9259            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9260                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9261            }
9262            fn merge_view_field(
9263                &mut self,
9264                tag: ::buffa::encoding::Tag,
9265                cur: &'a [u8],
9266                before_tag: &'a [u8],
9267                ctx: ::buffa::DecodeContext<'_>,
9268            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9269                let _ = ctx;
9270                #[allow(unused_variables)]
9271                let view = self;
9272                let mut cur = cur;
9273                match tag.field_number() {
9274                    1u32 => {
9275                        ::buffa::encoding::check_wire_type(
9276                            tag,
9277                            ::buffa::encoding::WireType::LengthDelimited,
9278                        )?;
9279                        view.board_id = ::buffa::types::borrow_str(&mut cur)?;
9280                    }
9281                    2u32 => {
9282                        ::buffa::encoding::check_wire_type(
9283                            tag,
9284                            ::buffa::encoding::WireType::LengthDelimited,
9285                        )?;
9286                        view.title = Some(::buffa::types::borrow_str(&mut cur)?);
9287                    }
9288                    3u32 => {
9289                        ::buffa::encoding::check_wire_type(
9290                            tag,
9291                            ::buffa::encoding::WireType::Varint,
9292                        )?;
9293                        view.audience = Some(
9294                            ::buffa::EnumValue::from(
9295                                ::buffa::types::decode_int32(&mut cur)?,
9296                            ),
9297                        );
9298                    }
9299                    4u32 => {
9300                        ::buffa::encoding::check_wire_type(
9301                            tag,
9302                            ::buffa::encoding::WireType::Varint,
9303                        )?;
9304                        view.default_role = Some(
9305                            ::buffa::EnumValue::from(
9306                                ::buffa::types::decode_int32(&mut cur)?,
9307                            ),
9308                        );
9309                    }
9310                    5u32 => {
9311                        ::buffa::encoding::check_wire_type(
9312                            tag,
9313                            ::buffa::encoding::WireType::LengthDelimited,
9314                        )?;
9315                        let __sub_ctx = ctx.descend()?;
9316                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9317                        match view.initial_snapshot.as_mut() {
9318                            Some(existing) => {
9319                                ::buffa::MessageView::merge_into_view(
9320                                    existing,
9321                                    sub,
9322                                    __sub_ctx,
9323                                )?
9324                            }
9325                            None => {
9326                                view.initial_snapshot = ::buffa::MessageFieldView::set(
9327                                    <::buffa_types::google::protobuf::__buffa::view::StructView as ::buffa::MessageView>::decode_view_ctx(
9328                                        sub,
9329                                        __sub_ctx,
9330                                    )?,
9331                                );
9332                            }
9333                        }
9334                    }
9335                    _ => {
9336                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9337                        let span_len = before_tag.len() - cur.len();
9338                        view.__buffa_unknown_fields
9339                            .push_record(before_tag, span_len, ctx)?;
9340                    }
9341                }
9342                ::core::result::Result::Ok(cur)
9343            }
9344            fn to_owned_message(
9345                &self,
9346            ) -> ::core::result::Result<
9347                super::super::UpdateBoardRequest,
9348                ::buffa::DecodeError,
9349            > {
9350                self.to_owned_from_source(None)
9351            }
9352            #[allow(clippy::useless_conversion, clippy::needless_update)]
9353            fn to_owned_from_source(
9354                &self,
9355                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9356            ) -> ::core::result::Result<
9357                super::super::UpdateBoardRequest,
9358                ::buffa::DecodeError,
9359            > {
9360                #[allow(unused_imports)]
9361                use ::buffa::alloc::string::ToString as _;
9362                let _ = __buffa_src;
9363                ::core::result::Result::Ok(super::super::UpdateBoardRequest {
9364                    board_id: self.board_id.to_string(),
9365                    title: self.title.map(|s| s.to_string()),
9366                    audience: self.audience,
9367                    default_role: self.default_role,
9368                    initial_snapshot: match self.initial_snapshot.as_option() {
9369                        Some(v) => {
9370                            ::buffa::MessageField::<
9371                                ::buffa_types::google::protobuf::Struct,
9372                            >::some(v.to_owned_from_source(__buffa_src)?)
9373                        }
9374                        None => ::buffa::MessageField::none(),
9375                    },
9376                    __buffa_unknown_fields: self
9377                        .__buffa_unknown_fields
9378                        .to_owned()?
9379                        .into(),
9380                    ..::core::default::Default::default()
9381                })
9382            }
9383        }
9384        impl<'a> ::buffa::ViewEncode<'a> for UpdateBoardRequestView<'a> {
9385            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9386            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9387                #[allow(unused_imports)]
9388                use ::buffa::Enumeration as _;
9389                let mut size = 0u32;
9390                if !self.board_id.is_empty() {
9391                    size
9392                        += 1u32
9393                            + ::buffa::types::string_encoded_len(&self.board_id) as u32;
9394                }
9395                if let Some(ref v) = self.title {
9396                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9397                }
9398                if let Some(ref v) = self.audience {
9399                    size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
9400                }
9401                if let Some(ref v) = self.default_role {
9402                    size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
9403                }
9404                if self.initial_snapshot.is_set() {
9405                    let __slot = __cache.reserve();
9406                    let inner_size = self.initial_snapshot.compute_size(__cache);
9407                    __cache.set(__slot, inner_size);
9408                    size
9409                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9410                            + inner_size;
9411                }
9412                size += self.__buffa_unknown_fields.encoded_len() as u32;
9413                size
9414            }
9415            #[allow(clippy::needless_borrow)]
9416            fn write_to(
9417                &self,
9418                __cache: &mut ::buffa::SizeCache,
9419                buf: &mut impl ::buffa::bytes::BufMut,
9420            ) {
9421                #[allow(unused_imports)]
9422                use ::buffa::Enumeration as _;
9423                if !self.board_id.is_empty() {
9424                    ::buffa::types::put_string_field(1u32, &self.board_id, buf);
9425                }
9426                if let Some(ref v) = self.title {
9427                    ::buffa::types::put_string_field(2u32, v, buf);
9428                }
9429                if let Some(ref v) = self.audience {
9430                    ::buffa::types::put_int32_field(3u32, v.to_i32(), buf);
9431                }
9432                if let Some(ref v) = self.default_role {
9433                    ::buffa::types::put_int32_field(4u32, v.to_i32(), buf);
9434                }
9435                if self.initial_snapshot.is_set() {
9436                    ::buffa::types::put_len_delimited_header(
9437                        5u32,
9438                        __cache.consume_next(),
9439                        buf,
9440                    );
9441                    self.initial_snapshot.write_to(__cache, buf);
9442                }
9443                self.__buffa_unknown_fields.write_to(buf);
9444            }
9445        }
9446        /// Serializes this view as protobuf JSON.
9447        ///
9448        /// Implicit-presence fields with default values are omitted, `required`
9449        /// fields are always emitted, explicit-presence (`optional`) fields are
9450        /// emitted only when set, bytes fields are base64-encoded, and enum
9451        /// values are their proto name strings.
9452        ///
9453        /// This impl uses `serialize_map(None)` because the number of emitted
9454        /// fields depends on default-omission rules; serializers that require
9455        /// known map lengths (e.g. `bincode`) will return a runtime error.
9456        /// Use the owned message type for those formats.
9457        impl<'__a> ::serde::Serialize for UpdateBoardRequestView<'__a> {
9458            fn serialize<__S: ::serde::Serializer>(
9459                &self,
9460                __s: __S,
9461            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9462                use ::serde::ser::SerializeMap as _;
9463                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9464                if !::buffa::json_helpers::skip_if::is_empty_str(self.board_id) {
9465                    __map.serialize_entry("boardId", self.board_id)?;
9466                }
9467                if let ::core::option::Option::Some(__v) = self.title {
9468                    __map.serialize_entry("title", __v)?;
9469                }
9470                if let ::core::option::Option::Some(ref __v) = self.audience {
9471                    __map.serialize_entry("audience", __v)?;
9472                }
9473                if let ::core::option::Option::Some(ref __v) = self.default_role {
9474                    __map.serialize_entry("defaultRole", __v)?;
9475                }
9476                {
9477                    if let ::core::option::Option::Some(__v) = self
9478                        .initial_snapshot
9479                        .as_option()
9480                    {
9481                        __map.serialize_entry("initialSnapshot", __v)?;
9482                    }
9483                }
9484                __map.end()
9485            }
9486        }
9487        impl<'a> ::buffa::MessageName for UpdateBoardRequestView<'a> {
9488            const PACKAGE: &'static str = "collab.v1";
9489            const NAME: &'static str = "UpdateBoardRequest";
9490            const FULL_NAME: &'static str = "collab.v1.UpdateBoardRequest";
9491            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardRequest";
9492        }
9493        ::buffa::impl_default_view_instance!(UpdateBoardRequestView);
9494        ::buffa::impl_view_reborrow!(UpdateBoardRequestView);
9495        /** Self-contained, `'static` owned view of a `UpdateBoardRequest` message.
9496
9497 Wraps [`::buffa::OwnedView`]`<`[`UpdateBoardRequestView`]`<'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.
9498
9499 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdateBoardRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9500        #[derive(Clone, Debug)]
9501        pub struct UpdateBoardRequestOwnedView(
9502            ::buffa::OwnedView<UpdateBoardRequestView<'static>>,
9503        );
9504        impl UpdateBoardRequestOwnedView {
9505            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9506            ///
9507            /// The view borrows directly from the buffer's data; the buffer is
9508            /// retained inside the returned handle.
9509            ///
9510            /// # Errors
9511            ///
9512            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9513            /// protobuf data.
9514            pub fn decode(
9515                bytes: ::buffa::bytes::Bytes,
9516            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9517                ::core::result::Result::Ok(
9518                    UpdateBoardRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9519                )
9520            }
9521            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9522            /// max message size).
9523            ///
9524            /// # Errors
9525            ///
9526            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9527            /// exceeds the configured limits.
9528            pub fn decode_with_options(
9529                bytes: ::buffa::bytes::Bytes,
9530                opts: &::buffa::DecodeOptions,
9531            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9532                ::core::result::Result::Ok(
9533                    UpdateBoardRequestOwnedView(
9534                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9535                    ),
9536                )
9537            }
9538            /// Build from an owned message via an encode → decode round-trip.
9539            ///
9540            /// # Errors
9541            ///
9542            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9543            /// somehow invalid (should not happen for well-formed messages).
9544            pub fn from_owned(
9545                msg: &super::super::UpdateBoardRequest,
9546            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9547                ::core::result::Result::Ok(
9548                    UpdateBoardRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9549                )
9550            }
9551            /// Borrow the full [`UpdateBoardRequestView`] with its lifetime tied to `&self`.
9552            #[must_use]
9553            pub fn view(&self) -> &UpdateBoardRequestView<'_> {
9554                self.0.reborrow()
9555            }
9556            /// Convert to the owned message type.
9557            ///
9558            /// # Errors
9559            ///
9560            /// Returns an error if re-materializing preserved unknown fields
9561            /// fails (e.g. the unknown-field limit is exceeded).
9562            pub fn to_owned_message(
9563                &self,
9564            ) -> ::core::result::Result<
9565                super::super::UpdateBoardRequest,
9566                ::buffa::DecodeError,
9567            > {
9568                self.0.to_owned_message()
9569            }
9570            /// The underlying bytes buffer.
9571            #[must_use]
9572            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9573                self.0.bytes()
9574            }
9575            /// Consume the handle, returning the underlying bytes buffer.
9576            #[must_use]
9577            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9578                self.0.into_bytes()
9579            }
9580            /// Board identifier as a UUID string.
9581            ///
9582            /// Field 1: `board_id`
9583            #[must_use]
9584            pub fn board_id(&self) -> &'_ str {
9585                self.0.reborrow().board_id
9586            }
9587            /// New board title, max 200 characters and 400 bytes. When unset, the title is unchanged.
9588            ///
9589            /// Field 2: `title`
9590            #[must_use]
9591            pub fn title(&self) -> ::core::option::Option<&'_ str> {
9592                self.0.reborrow().title
9593            }
9594            /// New audience policy. When unset, the audience is unchanged.
9595            ///
9596            /// Field 3: `audience`
9597            #[must_use]
9598            pub fn audience(
9599                &self,
9600            ) -> ::core::option::Option<
9601                ::buffa::EnumValue<super::super::BoardAudience>,
9602            > {
9603                self.0.reborrow().audience
9604            }
9605            /// New default audience role for PUBLIC or FOLLOWERS access. When unset, the role is unchanged.
9606            ///
9607            /// Field 4: `default_role`
9608            #[must_use]
9609            pub fn default_role(
9610                &self,
9611            ) -> ::core::option::Option<::buffa::EnumValue<super::super::BoardRole>> {
9612                self.0.reborrow().default_role
9613            }
9614            /// New initial snapshot as a JSON object. When unset, the snapshot is unchanged.
9615            ///
9616            /// Field 5: `initial_snapshot`
9617            #[must_use]
9618            pub fn initial_snapshot(
9619                &self,
9620            ) -> &::buffa::MessageFieldView<
9621                ::buffa_types::google::protobuf::__buffa::view::StructView<'_>,
9622            > {
9623                &self.0.reborrow().initial_snapshot
9624            }
9625        }
9626        impl ::core::convert::From<::buffa::OwnedView<UpdateBoardRequestView<'static>>>
9627        for UpdateBoardRequestOwnedView {
9628            fn from(inner: ::buffa::OwnedView<UpdateBoardRequestView<'static>>) -> Self {
9629                UpdateBoardRequestOwnedView(inner)
9630            }
9631        }
9632        impl ::core::convert::From<UpdateBoardRequestOwnedView>
9633        for ::buffa::OwnedView<UpdateBoardRequestView<'static>> {
9634            fn from(wrapper: UpdateBoardRequestOwnedView) -> Self {
9635                wrapper.0
9636            }
9637        }
9638        impl ::core::convert::AsRef<::buffa::OwnedView<UpdateBoardRequestView<'static>>>
9639        for UpdateBoardRequestOwnedView {
9640            fn as_ref(&self) -> &::buffa::OwnedView<UpdateBoardRequestView<'static>> {
9641                &self.0
9642            }
9643        }
9644        impl ::buffa::HasMessageView for super::super::UpdateBoardRequest {
9645            type View<'a> = UpdateBoardRequestView<'a>;
9646            type ViewHandle = UpdateBoardRequestOwnedView;
9647        }
9648        impl ::serde::Serialize for UpdateBoardRequestOwnedView {
9649            fn serialize<__S: ::serde::Serializer>(
9650                &self,
9651                __s: __S,
9652            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9653                ::serde::Serialize::serialize(&self.0, __s)
9654            }
9655        }
9656        /// UpdateBoardResponse returns the updated board.
9657        #[derive(Clone, Debug, Default)]
9658        pub struct UpdateBoardResponseView<'a> {
9659            /// Updated board metadata.
9660            ///
9661            /// Field 1: `board`
9662            pub board: ::buffa::MessageFieldView<
9663                super::super::__buffa::view::BoardView<'a>,
9664            >,
9665            /// Explicit ACL entries ordered by creation time, subject type, then subject ID. Returned only for callers who can manage the board.
9666            ///
9667            /// Field 2: `acl_entries`
9668            pub acl_entries: ::buffa::RepeatedView<
9669                'a,
9670                super::super::__buffa::view::BoardAclEntryView<'a>,
9671            >,
9672            /// Resolved caller access.
9673            ///
9674            /// Field 3: `access`
9675            pub access: ::buffa::MessageFieldView<
9676                super::super::__buffa::view::BoardAccessView<'a>,
9677            >,
9678            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9679        }
9680        impl<'a> ::buffa::MessageView<'a> for UpdateBoardResponseView<'a> {
9681            type Owned = super::super::UpdateBoardResponse;
9682            fn decode_view(
9683                buf: &'a [u8],
9684            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9685                let __limit = ::core::cell::Cell::new(
9686                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9687                );
9688                <Self as ::buffa::MessageView>::decode_view_ctx(
9689                    buf,
9690                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9691                )
9692            }
9693            fn decode_view_with_ctx(
9694                buf: &'a [u8],
9695                ctx: ::buffa::DecodeContext<'_>,
9696            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9697                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9698            }
9699            fn merge_view_field(
9700                &mut self,
9701                tag: ::buffa::encoding::Tag,
9702                cur: &'a [u8],
9703                before_tag: &'a [u8],
9704                ctx: ::buffa::DecodeContext<'_>,
9705            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9706                let _ = ctx;
9707                #[allow(unused_variables)]
9708                let view = self;
9709                let mut cur = cur;
9710                match tag.field_number() {
9711                    1u32 => {
9712                        ::buffa::encoding::check_wire_type(
9713                            tag,
9714                            ::buffa::encoding::WireType::LengthDelimited,
9715                        )?;
9716                        let __sub_ctx = ctx.descend()?;
9717                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9718                        match view.board.as_mut() {
9719                            Some(existing) => {
9720                                ::buffa::MessageView::merge_into_view(
9721                                    existing,
9722                                    sub,
9723                                    __sub_ctx,
9724                                )?
9725                            }
9726                            None => {
9727                                view.board = ::buffa::MessageFieldView::set(
9728                                    <super::super::__buffa::view::BoardView as ::buffa::MessageView>::decode_view_ctx(
9729                                        sub,
9730                                        __sub_ctx,
9731                                    )?,
9732                                );
9733                            }
9734                        }
9735                    }
9736                    3u32 => {
9737                        ::buffa::encoding::check_wire_type(
9738                            tag,
9739                            ::buffa::encoding::WireType::LengthDelimited,
9740                        )?;
9741                        let __sub_ctx = ctx.descend()?;
9742                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9743                        match view.access.as_mut() {
9744                            Some(existing) => {
9745                                ::buffa::MessageView::merge_into_view(
9746                                    existing,
9747                                    sub,
9748                                    __sub_ctx,
9749                                )?
9750                            }
9751                            None => {
9752                                view.access = ::buffa::MessageFieldView::set(
9753                                    <super::super::__buffa::view::BoardAccessView as ::buffa::MessageView>::decode_view_ctx(
9754                                        sub,
9755                                        __sub_ctx,
9756                                    )?,
9757                                );
9758                            }
9759                        }
9760                    }
9761                    2u32 => {
9762                        ::buffa::encoding::check_wire_type(
9763                            tag,
9764                            ::buffa::encoding::WireType::LengthDelimited,
9765                        )?;
9766                        let __sub_ctx = ctx.descend()?;
9767                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9768                        view.acl_entries
9769                            .push(
9770                                <super::super::__buffa::view::BoardAclEntryView as ::buffa::MessageView>::decode_view_ctx(
9771                                    sub,
9772                                    __sub_ctx,
9773                                )?,
9774                            );
9775                    }
9776                    _ => {
9777                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9778                        let span_len = before_tag.len() - cur.len();
9779                        view.__buffa_unknown_fields
9780                            .push_record(before_tag, span_len, ctx)?;
9781                    }
9782                }
9783                ::core::result::Result::Ok(cur)
9784            }
9785            fn to_owned_message(
9786                &self,
9787            ) -> ::core::result::Result<
9788                super::super::UpdateBoardResponse,
9789                ::buffa::DecodeError,
9790            > {
9791                self.to_owned_from_source(None)
9792            }
9793            #[allow(clippy::useless_conversion, clippy::needless_update)]
9794            fn to_owned_from_source(
9795                &self,
9796                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9797            ) -> ::core::result::Result<
9798                super::super::UpdateBoardResponse,
9799                ::buffa::DecodeError,
9800            > {
9801                #[allow(unused_imports)]
9802                use ::buffa::alloc::string::ToString as _;
9803                let _ = __buffa_src;
9804                ::core::result::Result::Ok(super::super::UpdateBoardResponse {
9805                    board: match self.board.as_option() {
9806                        Some(v) => {
9807                            ::buffa::MessageField::<
9808                                super::super::Board,
9809                            >::some(v.to_owned_from_source(__buffa_src)?)
9810                        }
9811                        None => ::buffa::MessageField::none(),
9812                    },
9813                    acl_entries: self
9814                        .acl_entries
9815                        .iter()
9816                        .map(|v| v.to_owned_from_source(__buffa_src))
9817                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
9818                    access: match self.access.as_option() {
9819                        Some(v) => {
9820                            ::buffa::MessageField::<
9821                                super::super::BoardAccess,
9822                            >::some(v.to_owned_from_source(__buffa_src)?)
9823                        }
9824                        None => ::buffa::MessageField::none(),
9825                    },
9826                    __buffa_unknown_fields: self
9827                        .__buffa_unknown_fields
9828                        .to_owned()?
9829                        .into(),
9830                    ..::core::default::Default::default()
9831                })
9832            }
9833        }
9834        impl<'a> ::buffa::ViewEncode<'a> for UpdateBoardResponseView<'a> {
9835            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9836            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9837                #[allow(unused_imports)]
9838                use ::buffa::Enumeration as _;
9839                let mut size = 0u32;
9840                if self.board.is_set() {
9841                    let __slot = __cache.reserve();
9842                    let inner_size = self.board.compute_size(__cache);
9843                    __cache.set(__slot, inner_size);
9844                    size
9845                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9846                            + inner_size;
9847                }
9848                for v in &self.acl_entries {
9849                    let __slot = __cache.reserve();
9850                    let inner_size = v.compute_size(__cache);
9851                    __cache.set(__slot, inner_size);
9852                    size
9853                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9854                            + inner_size;
9855                }
9856                if self.access.is_set() {
9857                    let __slot = __cache.reserve();
9858                    let inner_size = self.access.compute_size(__cache);
9859                    __cache.set(__slot, inner_size);
9860                    size
9861                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9862                            + inner_size;
9863                }
9864                size += self.__buffa_unknown_fields.encoded_len() as u32;
9865                size
9866            }
9867            #[allow(clippy::needless_borrow)]
9868            fn write_to(
9869                &self,
9870                __cache: &mut ::buffa::SizeCache,
9871                buf: &mut impl ::buffa::bytes::BufMut,
9872            ) {
9873                #[allow(unused_imports)]
9874                use ::buffa::Enumeration as _;
9875                if self.board.is_set() {
9876                    ::buffa::types::put_len_delimited_header(
9877                        1u32,
9878                        __cache.consume_next(),
9879                        buf,
9880                    );
9881                    self.board.write_to(__cache, buf);
9882                }
9883                for v in &self.acl_entries {
9884                    ::buffa::types::put_len_delimited_header(
9885                        2u32,
9886                        __cache.consume_next(),
9887                        buf,
9888                    );
9889                    v.write_to(__cache, buf);
9890                }
9891                if self.access.is_set() {
9892                    ::buffa::types::put_len_delimited_header(
9893                        3u32,
9894                        __cache.consume_next(),
9895                        buf,
9896                    );
9897                    self.access.write_to(__cache, buf);
9898                }
9899                self.__buffa_unknown_fields.write_to(buf);
9900            }
9901        }
9902        /// Serializes this view as protobuf JSON.
9903        ///
9904        /// Implicit-presence fields with default values are omitted, `required`
9905        /// fields are always emitted, explicit-presence (`optional`) fields are
9906        /// emitted only when set, bytes fields are base64-encoded, and enum
9907        /// values are their proto name strings.
9908        ///
9909        /// This impl uses `serialize_map(None)` because the number of emitted
9910        /// fields depends on default-omission rules; serializers that require
9911        /// known map lengths (e.g. `bincode`) will return a runtime error.
9912        /// Use the owned message type for those formats.
9913        impl<'__a> ::serde::Serialize for UpdateBoardResponseView<'__a> {
9914            fn serialize<__S: ::serde::Serializer>(
9915                &self,
9916                __s: __S,
9917            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9918                use ::serde::ser::SerializeMap as _;
9919                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9920                {
9921                    if let ::core::option::Option::Some(__v) = self.board.as_option() {
9922                        __map.serialize_entry("board", __v)?;
9923                    }
9924                }
9925                if !self.acl_entries.is_empty() {
9926                    __map.serialize_entry("aclEntries", &*self.acl_entries)?;
9927                }
9928                {
9929                    if let ::core::option::Option::Some(__v) = self.access.as_option() {
9930                        __map.serialize_entry("access", __v)?;
9931                    }
9932                }
9933                __map.end()
9934            }
9935        }
9936        impl<'a> ::buffa::MessageName for UpdateBoardResponseView<'a> {
9937            const PACKAGE: &'static str = "collab.v1";
9938            const NAME: &'static str = "UpdateBoardResponse";
9939            const FULL_NAME: &'static str = "collab.v1.UpdateBoardResponse";
9940            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardResponse";
9941        }
9942        ::buffa::impl_default_view_instance!(UpdateBoardResponseView);
9943        ::buffa::impl_view_reborrow!(UpdateBoardResponseView);
9944        /** Self-contained, `'static` owned view of a `UpdateBoardResponse` message.
9945
9946 Wraps [`::buffa::OwnedView`]`<`[`UpdateBoardResponseView`]`<'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.
9947
9948 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdateBoardResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9949        #[derive(Clone, Debug)]
9950        pub struct UpdateBoardResponseOwnedView(
9951            ::buffa::OwnedView<UpdateBoardResponseView<'static>>,
9952        );
9953        impl UpdateBoardResponseOwnedView {
9954            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9955            ///
9956            /// The view borrows directly from the buffer's data; the buffer is
9957            /// retained inside the returned handle.
9958            ///
9959            /// # Errors
9960            ///
9961            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9962            /// protobuf data.
9963            pub fn decode(
9964                bytes: ::buffa::bytes::Bytes,
9965            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9966                ::core::result::Result::Ok(
9967                    UpdateBoardResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
9968                )
9969            }
9970            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9971            /// max message size).
9972            ///
9973            /// # Errors
9974            ///
9975            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9976            /// exceeds the configured limits.
9977            pub fn decode_with_options(
9978                bytes: ::buffa::bytes::Bytes,
9979                opts: &::buffa::DecodeOptions,
9980            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9981                ::core::result::Result::Ok(
9982                    UpdateBoardResponseOwnedView(
9983                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9984                    ),
9985                )
9986            }
9987            /// Build from an owned message via an encode → decode round-trip.
9988            ///
9989            /// # Errors
9990            ///
9991            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9992            /// somehow invalid (should not happen for well-formed messages).
9993            pub fn from_owned(
9994                msg: &super::super::UpdateBoardResponse,
9995            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9996                ::core::result::Result::Ok(
9997                    UpdateBoardResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
9998                )
9999            }
10000            /// Borrow the full [`UpdateBoardResponseView`] with its lifetime tied to `&self`.
10001            #[must_use]
10002            pub fn view(&self) -> &UpdateBoardResponseView<'_> {
10003                self.0.reborrow()
10004            }
10005            /// Convert to the owned message type.
10006            ///
10007            /// # Errors
10008            ///
10009            /// Returns an error if re-materializing preserved unknown fields
10010            /// fails (e.g. the unknown-field limit is exceeded).
10011            pub fn to_owned_message(
10012                &self,
10013            ) -> ::core::result::Result<
10014                super::super::UpdateBoardResponse,
10015                ::buffa::DecodeError,
10016            > {
10017                self.0.to_owned_message()
10018            }
10019            /// The underlying bytes buffer.
10020            #[must_use]
10021            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10022                self.0.bytes()
10023            }
10024            /// Consume the handle, returning the underlying bytes buffer.
10025            #[must_use]
10026            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10027                self.0.into_bytes()
10028            }
10029            /// Updated board metadata.
10030            ///
10031            /// Field 1: `board`
10032            #[must_use]
10033            pub fn board(
10034                &self,
10035            ) -> &::buffa::MessageFieldView<super::super::__buffa::view::BoardView<'_>> {
10036                &self.0.reborrow().board
10037            }
10038            /// Explicit ACL entries ordered by creation time, subject type, then subject ID. Returned only for callers who can manage the board.
10039            ///
10040            /// Field 2: `acl_entries`
10041            #[must_use]
10042            pub fn acl_entries(
10043                &self,
10044            ) -> &::buffa::RepeatedView<
10045                '_,
10046                super::super::__buffa::view::BoardAclEntryView<'_>,
10047            > {
10048                &self.0.reborrow().acl_entries
10049            }
10050            /// Resolved caller access.
10051            ///
10052            /// Field 3: `access`
10053            #[must_use]
10054            pub fn access(
10055                &self,
10056            ) -> &::buffa::MessageFieldView<
10057                super::super::__buffa::view::BoardAccessView<'_>,
10058            > {
10059                &self.0.reborrow().access
10060            }
10061        }
10062        impl ::core::convert::From<::buffa::OwnedView<UpdateBoardResponseView<'static>>>
10063        for UpdateBoardResponseOwnedView {
10064            fn from(
10065                inner: ::buffa::OwnedView<UpdateBoardResponseView<'static>>,
10066            ) -> Self {
10067                UpdateBoardResponseOwnedView(inner)
10068            }
10069        }
10070        impl ::core::convert::From<UpdateBoardResponseOwnedView>
10071        for ::buffa::OwnedView<UpdateBoardResponseView<'static>> {
10072            fn from(wrapper: UpdateBoardResponseOwnedView) -> Self {
10073                wrapper.0
10074            }
10075        }
10076        impl ::core::convert::AsRef<::buffa::OwnedView<UpdateBoardResponseView<'static>>>
10077        for UpdateBoardResponseOwnedView {
10078            fn as_ref(&self) -> &::buffa::OwnedView<UpdateBoardResponseView<'static>> {
10079                &self.0
10080            }
10081        }
10082        impl ::buffa::HasMessageView for super::super::UpdateBoardResponse {
10083            type View<'a> = UpdateBoardResponseView<'a>;
10084            type ViewHandle = UpdateBoardResponseOwnedView;
10085        }
10086        impl ::serde::Serialize for UpdateBoardResponseOwnedView {
10087            fn serialize<__S: ::serde::Serializer>(
10088                &self,
10089                __s: __S,
10090            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10091                ::serde::Serialize::serialize(&self.0, __s)
10092            }
10093        }
10094        /// UpdateBoardAclRequest fully replaces the explicit ACL for a board.
10095        #[derive(Clone, Debug, Default)]
10096        pub struct UpdateBoardAclRequestView<'a> {
10097            /// Board identifier as a UUID string.
10098            ///
10099            /// Field 1: `board_id`
10100            pub board_id: &'a str,
10101            /// Full replacement ACL set for the board, max 256 entries. Existing ACL entries are replaced atomically.
10102            ///
10103            /// Field 2: `acl_entries`
10104            pub acl_entries: ::buffa::RepeatedView<
10105                'a,
10106                super::super::__buffa::view::BoardAclEntryView<'a>,
10107            >,
10108            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10109        }
10110        impl<'a> ::buffa::MessageView<'a> for UpdateBoardAclRequestView<'a> {
10111            type Owned = super::super::UpdateBoardAclRequest;
10112            fn decode_view(
10113                buf: &'a [u8],
10114            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10115                let __limit = ::core::cell::Cell::new(
10116                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
10117                );
10118                <Self as ::buffa::MessageView>::decode_view_ctx(
10119                    buf,
10120                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
10121                )
10122            }
10123            fn decode_view_with_ctx(
10124                buf: &'a [u8],
10125                ctx: ::buffa::DecodeContext<'_>,
10126            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10127                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
10128            }
10129            fn merge_view_field(
10130                &mut self,
10131                tag: ::buffa::encoding::Tag,
10132                cur: &'a [u8],
10133                before_tag: &'a [u8],
10134                ctx: ::buffa::DecodeContext<'_>,
10135            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
10136                let _ = ctx;
10137                #[allow(unused_variables)]
10138                let view = self;
10139                let mut cur = cur;
10140                match tag.field_number() {
10141                    1u32 => {
10142                        ::buffa::encoding::check_wire_type(
10143                            tag,
10144                            ::buffa::encoding::WireType::LengthDelimited,
10145                        )?;
10146                        view.board_id = ::buffa::types::borrow_str(&mut cur)?;
10147                    }
10148                    2u32 => {
10149                        ::buffa::encoding::check_wire_type(
10150                            tag,
10151                            ::buffa::encoding::WireType::LengthDelimited,
10152                        )?;
10153                        let __sub_ctx = ctx.descend()?;
10154                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10155                        view.acl_entries
10156                            .push(
10157                                <super::super::__buffa::view::BoardAclEntryView as ::buffa::MessageView>::decode_view_ctx(
10158                                    sub,
10159                                    __sub_ctx,
10160                                )?,
10161                            );
10162                    }
10163                    _ => {
10164                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10165                        let span_len = before_tag.len() - cur.len();
10166                        view.__buffa_unknown_fields
10167                            .push_record(before_tag, span_len, ctx)?;
10168                    }
10169                }
10170                ::core::result::Result::Ok(cur)
10171            }
10172            fn to_owned_message(
10173                &self,
10174            ) -> ::core::result::Result<
10175                super::super::UpdateBoardAclRequest,
10176                ::buffa::DecodeError,
10177            > {
10178                self.to_owned_from_source(None)
10179            }
10180            #[allow(clippy::useless_conversion, clippy::needless_update)]
10181            fn to_owned_from_source(
10182                &self,
10183                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10184            ) -> ::core::result::Result<
10185                super::super::UpdateBoardAclRequest,
10186                ::buffa::DecodeError,
10187            > {
10188                #[allow(unused_imports)]
10189                use ::buffa::alloc::string::ToString as _;
10190                let _ = __buffa_src;
10191                ::core::result::Result::Ok(super::super::UpdateBoardAclRequest {
10192                    board_id: self.board_id.to_string(),
10193                    acl_entries: self
10194                        .acl_entries
10195                        .iter()
10196                        .map(|v| v.to_owned_from_source(__buffa_src))
10197                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
10198                    __buffa_unknown_fields: self
10199                        .__buffa_unknown_fields
10200                        .to_owned()?
10201                        .into(),
10202                    ..::core::default::Default::default()
10203                })
10204            }
10205        }
10206        impl<'a> ::buffa::ViewEncode<'a> for UpdateBoardAclRequestView<'a> {
10207            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10208            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10209                #[allow(unused_imports)]
10210                use ::buffa::Enumeration as _;
10211                let mut size = 0u32;
10212                if !self.board_id.is_empty() {
10213                    size
10214                        += 1u32
10215                            + ::buffa::types::string_encoded_len(&self.board_id) as u32;
10216                }
10217                for v in &self.acl_entries {
10218                    let __slot = __cache.reserve();
10219                    let inner_size = v.compute_size(__cache);
10220                    __cache.set(__slot, inner_size);
10221                    size
10222                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10223                            + inner_size;
10224                }
10225                size += self.__buffa_unknown_fields.encoded_len() as u32;
10226                size
10227            }
10228            #[allow(clippy::needless_borrow)]
10229            fn write_to(
10230                &self,
10231                __cache: &mut ::buffa::SizeCache,
10232                buf: &mut impl ::buffa::bytes::BufMut,
10233            ) {
10234                #[allow(unused_imports)]
10235                use ::buffa::Enumeration as _;
10236                if !self.board_id.is_empty() {
10237                    ::buffa::types::put_string_field(1u32, &self.board_id, buf);
10238                }
10239                for v in &self.acl_entries {
10240                    ::buffa::types::put_len_delimited_header(
10241                        2u32,
10242                        __cache.consume_next(),
10243                        buf,
10244                    );
10245                    v.write_to(__cache, buf);
10246                }
10247                self.__buffa_unknown_fields.write_to(buf);
10248            }
10249        }
10250        /// Serializes this view as protobuf JSON.
10251        ///
10252        /// Implicit-presence fields with default values are omitted, `required`
10253        /// fields are always emitted, explicit-presence (`optional`) fields are
10254        /// emitted only when set, bytes fields are base64-encoded, and enum
10255        /// values are their proto name strings.
10256        ///
10257        /// This impl uses `serialize_map(None)` because the number of emitted
10258        /// fields depends on default-omission rules; serializers that require
10259        /// known map lengths (e.g. `bincode`) will return a runtime error.
10260        /// Use the owned message type for those formats.
10261        impl<'__a> ::serde::Serialize for UpdateBoardAclRequestView<'__a> {
10262            fn serialize<__S: ::serde::Serializer>(
10263                &self,
10264                __s: __S,
10265            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10266                use ::serde::ser::SerializeMap as _;
10267                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10268                if !::buffa::json_helpers::skip_if::is_empty_str(self.board_id) {
10269                    __map.serialize_entry("boardId", self.board_id)?;
10270                }
10271                if !self.acl_entries.is_empty() {
10272                    __map.serialize_entry("aclEntries", &*self.acl_entries)?;
10273                }
10274                __map.end()
10275            }
10276        }
10277        impl<'a> ::buffa::MessageName for UpdateBoardAclRequestView<'a> {
10278            const PACKAGE: &'static str = "collab.v1";
10279            const NAME: &'static str = "UpdateBoardAclRequest";
10280            const FULL_NAME: &'static str = "collab.v1.UpdateBoardAclRequest";
10281            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardAclRequest";
10282        }
10283        ::buffa::impl_default_view_instance!(UpdateBoardAclRequestView);
10284        ::buffa::impl_view_reborrow!(UpdateBoardAclRequestView);
10285        /** Self-contained, `'static` owned view of a `UpdateBoardAclRequest` message.
10286
10287 Wraps [`::buffa::OwnedView`]`<`[`UpdateBoardAclRequestView`]`<'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.
10288
10289 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdateBoardAclRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10290        #[derive(Clone, Debug)]
10291        pub struct UpdateBoardAclRequestOwnedView(
10292            ::buffa::OwnedView<UpdateBoardAclRequestView<'static>>,
10293        );
10294        impl UpdateBoardAclRequestOwnedView {
10295            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10296            ///
10297            /// The view borrows directly from the buffer's data; the buffer is
10298            /// retained inside the returned handle.
10299            ///
10300            /// # Errors
10301            ///
10302            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10303            /// protobuf data.
10304            pub fn decode(
10305                bytes: ::buffa::bytes::Bytes,
10306            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10307                ::core::result::Result::Ok(
10308                    UpdateBoardAclRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
10309                )
10310            }
10311            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10312            /// max message size).
10313            ///
10314            /// # Errors
10315            ///
10316            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10317            /// exceeds the configured limits.
10318            pub fn decode_with_options(
10319                bytes: ::buffa::bytes::Bytes,
10320                opts: &::buffa::DecodeOptions,
10321            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10322                ::core::result::Result::Ok(
10323                    UpdateBoardAclRequestOwnedView(
10324                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10325                    ),
10326                )
10327            }
10328            /// Build from an owned message via an encode → decode round-trip.
10329            ///
10330            /// # Errors
10331            ///
10332            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10333            /// somehow invalid (should not happen for well-formed messages).
10334            pub fn from_owned(
10335                msg: &super::super::UpdateBoardAclRequest,
10336            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10337                ::core::result::Result::Ok(
10338                    UpdateBoardAclRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
10339                )
10340            }
10341            /// Borrow the full [`UpdateBoardAclRequestView`] with its lifetime tied to `&self`.
10342            #[must_use]
10343            pub fn view(&self) -> &UpdateBoardAclRequestView<'_> {
10344                self.0.reborrow()
10345            }
10346            /// Convert to the owned message type.
10347            ///
10348            /// # Errors
10349            ///
10350            /// Returns an error if re-materializing preserved unknown fields
10351            /// fails (e.g. the unknown-field limit is exceeded).
10352            pub fn to_owned_message(
10353                &self,
10354            ) -> ::core::result::Result<
10355                super::super::UpdateBoardAclRequest,
10356                ::buffa::DecodeError,
10357            > {
10358                self.0.to_owned_message()
10359            }
10360            /// The underlying bytes buffer.
10361            #[must_use]
10362            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10363                self.0.bytes()
10364            }
10365            /// Consume the handle, returning the underlying bytes buffer.
10366            #[must_use]
10367            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10368                self.0.into_bytes()
10369            }
10370            /// Board identifier as a UUID string.
10371            ///
10372            /// Field 1: `board_id`
10373            #[must_use]
10374            pub fn board_id(&self) -> &'_ str {
10375                self.0.reborrow().board_id
10376            }
10377            /// Full replacement ACL set for the board, max 256 entries. Existing ACL entries are replaced atomically.
10378            ///
10379            /// Field 2: `acl_entries`
10380            #[must_use]
10381            pub fn acl_entries(
10382                &self,
10383            ) -> &::buffa::RepeatedView<
10384                '_,
10385                super::super::__buffa::view::BoardAclEntryView<'_>,
10386            > {
10387                &self.0.reborrow().acl_entries
10388            }
10389        }
10390        impl ::core::convert::From<
10391            ::buffa::OwnedView<UpdateBoardAclRequestView<'static>>,
10392        > for UpdateBoardAclRequestOwnedView {
10393            fn from(
10394                inner: ::buffa::OwnedView<UpdateBoardAclRequestView<'static>>,
10395            ) -> Self {
10396                UpdateBoardAclRequestOwnedView(inner)
10397            }
10398        }
10399        impl ::core::convert::From<UpdateBoardAclRequestOwnedView>
10400        for ::buffa::OwnedView<UpdateBoardAclRequestView<'static>> {
10401            fn from(wrapper: UpdateBoardAclRequestOwnedView) -> Self {
10402                wrapper.0
10403            }
10404        }
10405        impl ::core::convert::AsRef<
10406            ::buffa::OwnedView<UpdateBoardAclRequestView<'static>>,
10407        > for UpdateBoardAclRequestOwnedView {
10408            fn as_ref(&self) -> &::buffa::OwnedView<UpdateBoardAclRequestView<'static>> {
10409                &self.0
10410            }
10411        }
10412        impl ::buffa::HasMessageView for super::super::UpdateBoardAclRequest {
10413            type View<'a> = UpdateBoardAclRequestView<'a>;
10414            type ViewHandle = UpdateBoardAclRequestOwnedView;
10415        }
10416        impl ::serde::Serialize for UpdateBoardAclRequestOwnedView {
10417            fn serialize<__S: ::serde::Serializer>(
10418                &self,
10419                __s: __S,
10420            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10421                ::serde::Serialize::serialize(&self.0, __s)
10422            }
10423        }
10424        /// UpdateBoardAclResponse returns the updated board and ACL state.
10425        #[derive(Clone, Debug, Default)]
10426        pub struct UpdateBoardAclResponseView<'a> {
10427            /// Updated board metadata.
10428            ///
10429            /// Field 1: `board`
10430            pub board: ::buffa::MessageFieldView<
10431                super::super::__buffa::view::BoardView<'a>,
10432            >,
10433            /// Stored ACL entries after replacement, ordered by creation time, subject type, then subject ID.
10434            ///
10435            /// Field 2: `acl_entries`
10436            pub acl_entries: ::buffa::RepeatedView<
10437                'a,
10438                super::super::__buffa::view::BoardAclEntryView<'a>,
10439            >,
10440            /// Resolved caller access.
10441            ///
10442            /// Field 3: `access`
10443            pub access: ::buffa::MessageFieldView<
10444                super::super::__buffa::view::BoardAccessView<'a>,
10445            >,
10446            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10447        }
10448        impl<'a> ::buffa::MessageView<'a> for UpdateBoardAclResponseView<'a> {
10449            type Owned = super::super::UpdateBoardAclResponse;
10450            fn decode_view(
10451                buf: &'a [u8],
10452            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10453                let __limit = ::core::cell::Cell::new(
10454                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
10455                );
10456                <Self as ::buffa::MessageView>::decode_view_ctx(
10457                    buf,
10458                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
10459                )
10460            }
10461            fn decode_view_with_ctx(
10462                buf: &'a [u8],
10463                ctx: ::buffa::DecodeContext<'_>,
10464            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10465                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
10466            }
10467            fn merge_view_field(
10468                &mut self,
10469                tag: ::buffa::encoding::Tag,
10470                cur: &'a [u8],
10471                before_tag: &'a [u8],
10472                ctx: ::buffa::DecodeContext<'_>,
10473            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
10474                let _ = ctx;
10475                #[allow(unused_variables)]
10476                let view = self;
10477                let mut cur = cur;
10478                match tag.field_number() {
10479                    1u32 => {
10480                        ::buffa::encoding::check_wire_type(
10481                            tag,
10482                            ::buffa::encoding::WireType::LengthDelimited,
10483                        )?;
10484                        let __sub_ctx = ctx.descend()?;
10485                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10486                        match view.board.as_mut() {
10487                            Some(existing) => {
10488                                ::buffa::MessageView::merge_into_view(
10489                                    existing,
10490                                    sub,
10491                                    __sub_ctx,
10492                                )?
10493                            }
10494                            None => {
10495                                view.board = ::buffa::MessageFieldView::set(
10496                                    <super::super::__buffa::view::BoardView as ::buffa::MessageView>::decode_view_ctx(
10497                                        sub,
10498                                        __sub_ctx,
10499                                    )?,
10500                                );
10501                            }
10502                        }
10503                    }
10504                    3u32 => {
10505                        ::buffa::encoding::check_wire_type(
10506                            tag,
10507                            ::buffa::encoding::WireType::LengthDelimited,
10508                        )?;
10509                        let __sub_ctx = ctx.descend()?;
10510                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10511                        match view.access.as_mut() {
10512                            Some(existing) => {
10513                                ::buffa::MessageView::merge_into_view(
10514                                    existing,
10515                                    sub,
10516                                    __sub_ctx,
10517                                )?
10518                            }
10519                            None => {
10520                                view.access = ::buffa::MessageFieldView::set(
10521                                    <super::super::__buffa::view::BoardAccessView as ::buffa::MessageView>::decode_view_ctx(
10522                                        sub,
10523                                        __sub_ctx,
10524                                    )?,
10525                                );
10526                            }
10527                        }
10528                    }
10529                    2u32 => {
10530                        ::buffa::encoding::check_wire_type(
10531                            tag,
10532                            ::buffa::encoding::WireType::LengthDelimited,
10533                        )?;
10534                        let __sub_ctx = ctx.descend()?;
10535                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10536                        view.acl_entries
10537                            .push(
10538                                <super::super::__buffa::view::BoardAclEntryView as ::buffa::MessageView>::decode_view_ctx(
10539                                    sub,
10540                                    __sub_ctx,
10541                                )?,
10542                            );
10543                    }
10544                    _ => {
10545                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10546                        let span_len = before_tag.len() - cur.len();
10547                        view.__buffa_unknown_fields
10548                            .push_record(before_tag, span_len, ctx)?;
10549                    }
10550                }
10551                ::core::result::Result::Ok(cur)
10552            }
10553            fn to_owned_message(
10554                &self,
10555            ) -> ::core::result::Result<
10556                super::super::UpdateBoardAclResponse,
10557                ::buffa::DecodeError,
10558            > {
10559                self.to_owned_from_source(None)
10560            }
10561            #[allow(clippy::useless_conversion, clippy::needless_update)]
10562            fn to_owned_from_source(
10563                &self,
10564                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10565            ) -> ::core::result::Result<
10566                super::super::UpdateBoardAclResponse,
10567                ::buffa::DecodeError,
10568            > {
10569                #[allow(unused_imports)]
10570                use ::buffa::alloc::string::ToString as _;
10571                let _ = __buffa_src;
10572                ::core::result::Result::Ok(super::super::UpdateBoardAclResponse {
10573                    board: match self.board.as_option() {
10574                        Some(v) => {
10575                            ::buffa::MessageField::<
10576                                super::super::Board,
10577                            >::some(v.to_owned_from_source(__buffa_src)?)
10578                        }
10579                        None => ::buffa::MessageField::none(),
10580                    },
10581                    acl_entries: self
10582                        .acl_entries
10583                        .iter()
10584                        .map(|v| v.to_owned_from_source(__buffa_src))
10585                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
10586                    access: match self.access.as_option() {
10587                        Some(v) => {
10588                            ::buffa::MessageField::<
10589                                super::super::BoardAccess,
10590                            >::some(v.to_owned_from_source(__buffa_src)?)
10591                        }
10592                        None => ::buffa::MessageField::none(),
10593                    },
10594                    __buffa_unknown_fields: self
10595                        .__buffa_unknown_fields
10596                        .to_owned()?
10597                        .into(),
10598                    ..::core::default::Default::default()
10599                })
10600            }
10601        }
10602        impl<'a> ::buffa::ViewEncode<'a> for UpdateBoardAclResponseView<'a> {
10603            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10604            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10605                #[allow(unused_imports)]
10606                use ::buffa::Enumeration as _;
10607                let mut size = 0u32;
10608                if self.board.is_set() {
10609                    let __slot = __cache.reserve();
10610                    let inner_size = self.board.compute_size(__cache);
10611                    __cache.set(__slot, inner_size);
10612                    size
10613                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10614                            + inner_size;
10615                }
10616                for v in &self.acl_entries {
10617                    let __slot = __cache.reserve();
10618                    let inner_size = v.compute_size(__cache);
10619                    __cache.set(__slot, inner_size);
10620                    size
10621                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10622                            + inner_size;
10623                }
10624                if self.access.is_set() {
10625                    let __slot = __cache.reserve();
10626                    let inner_size = self.access.compute_size(__cache);
10627                    __cache.set(__slot, inner_size);
10628                    size
10629                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10630                            + inner_size;
10631                }
10632                size += self.__buffa_unknown_fields.encoded_len() as u32;
10633                size
10634            }
10635            #[allow(clippy::needless_borrow)]
10636            fn write_to(
10637                &self,
10638                __cache: &mut ::buffa::SizeCache,
10639                buf: &mut impl ::buffa::bytes::BufMut,
10640            ) {
10641                #[allow(unused_imports)]
10642                use ::buffa::Enumeration as _;
10643                if self.board.is_set() {
10644                    ::buffa::types::put_len_delimited_header(
10645                        1u32,
10646                        __cache.consume_next(),
10647                        buf,
10648                    );
10649                    self.board.write_to(__cache, buf);
10650                }
10651                for v in &self.acl_entries {
10652                    ::buffa::types::put_len_delimited_header(
10653                        2u32,
10654                        __cache.consume_next(),
10655                        buf,
10656                    );
10657                    v.write_to(__cache, buf);
10658                }
10659                if self.access.is_set() {
10660                    ::buffa::types::put_len_delimited_header(
10661                        3u32,
10662                        __cache.consume_next(),
10663                        buf,
10664                    );
10665                    self.access.write_to(__cache, buf);
10666                }
10667                self.__buffa_unknown_fields.write_to(buf);
10668            }
10669        }
10670        /// Serializes this view as protobuf JSON.
10671        ///
10672        /// Implicit-presence fields with default values are omitted, `required`
10673        /// fields are always emitted, explicit-presence (`optional`) fields are
10674        /// emitted only when set, bytes fields are base64-encoded, and enum
10675        /// values are their proto name strings.
10676        ///
10677        /// This impl uses `serialize_map(None)` because the number of emitted
10678        /// fields depends on default-omission rules; serializers that require
10679        /// known map lengths (e.g. `bincode`) will return a runtime error.
10680        /// Use the owned message type for those formats.
10681        impl<'__a> ::serde::Serialize for UpdateBoardAclResponseView<'__a> {
10682            fn serialize<__S: ::serde::Serializer>(
10683                &self,
10684                __s: __S,
10685            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10686                use ::serde::ser::SerializeMap as _;
10687                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10688                {
10689                    if let ::core::option::Option::Some(__v) = self.board.as_option() {
10690                        __map.serialize_entry("board", __v)?;
10691                    }
10692                }
10693                if !self.acl_entries.is_empty() {
10694                    __map.serialize_entry("aclEntries", &*self.acl_entries)?;
10695                }
10696                {
10697                    if let ::core::option::Option::Some(__v) = self.access.as_option() {
10698                        __map.serialize_entry("access", __v)?;
10699                    }
10700                }
10701                __map.end()
10702            }
10703        }
10704        impl<'a> ::buffa::MessageName for UpdateBoardAclResponseView<'a> {
10705            const PACKAGE: &'static str = "collab.v1";
10706            const NAME: &'static str = "UpdateBoardAclResponse";
10707            const FULL_NAME: &'static str = "collab.v1.UpdateBoardAclResponse";
10708            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.UpdateBoardAclResponse";
10709        }
10710        ::buffa::impl_default_view_instance!(UpdateBoardAclResponseView);
10711        ::buffa::impl_view_reborrow!(UpdateBoardAclResponseView);
10712        /** Self-contained, `'static` owned view of a `UpdateBoardAclResponse` message.
10713
10714 Wraps [`::buffa::OwnedView`]`<`[`UpdateBoardAclResponseView`]`<'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.
10715
10716 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdateBoardAclResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10717        #[derive(Clone, Debug)]
10718        pub struct UpdateBoardAclResponseOwnedView(
10719            ::buffa::OwnedView<UpdateBoardAclResponseView<'static>>,
10720        );
10721        impl UpdateBoardAclResponseOwnedView {
10722            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10723            ///
10724            /// The view borrows directly from the buffer's data; the buffer is
10725            /// retained inside the returned handle.
10726            ///
10727            /// # Errors
10728            ///
10729            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10730            /// protobuf data.
10731            pub fn decode(
10732                bytes: ::buffa::bytes::Bytes,
10733            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10734                ::core::result::Result::Ok(
10735                    UpdateBoardAclResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
10736                )
10737            }
10738            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10739            /// max message size).
10740            ///
10741            /// # Errors
10742            ///
10743            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10744            /// exceeds the configured limits.
10745            pub fn decode_with_options(
10746                bytes: ::buffa::bytes::Bytes,
10747                opts: &::buffa::DecodeOptions,
10748            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10749                ::core::result::Result::Ok(
10750                    UpdateBoardAclResponseOwnedView(
10751                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10752                    ),
10753                )
10754            }
10755            /// Build from an owned message via an encode → decode round-trip.
10756            ///
10757            /// # Errors
10758            ///
10759            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10760            /// somehow invalid (should not happen for well-formed messages).
10761            pub fn from_owned(
10762                msg: &super::super::UpdateBoardAclResponse,
10763            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10764                ::core::result::Result::Ok(
10765                    UpdateBoardAclResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
10766                )
10767            }
10768            /// Borrow the full [`UpdateBoardAclResponseView`] with its lifetime tied to `&self`.
10769            #[must_use]
10770            pub fn view(&self) -> &UpdateBoardAclResponseView<'_> {
10771                self.0.reborrow()
10772            }
10773            /// Convert to the owned message type.
10774            ///
10775            /// # Errors
10776            ///
10777            /// Returns an error if re-materializing preserved unknown fields
10778            /// fails (e.g. the unknown-field limit is exceeded).
10779            pub fn to_owned_message(
10780                &self,
10781            ) -> ::core::result::Result<
10782                super::super::UpdateBoardAclResponse,
10783                ::buffa::DecodeError,
10784            > {
10785                self.0.to_owned_message()
10786            }
10787            /// The underlying bytes buffer.
10788            #[must_use]
10789            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10790                self.0.bytes()
10791            }
10792            /// Consume the handle, returning the underlying bytes buffer.
10793            #[must_use]
10794            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10795                self.0.into_bytes()
10796            }
10797            /// Updated board metadata.
10798            ///
10799            /// Field 1: `board`
10800            #[must_use]
10801            pub fn board(
10802                &self,
10803            ) -> &::buffa::MessageFieldView<super::super::__buffa::view::BoardView<'_>> {
10804                &self.0.reborrow().board
10805            }
10806            /// Stored ACL entries after replacement, ordered by creation time, subject type, then subject ID.
10807            ///
10808            /// Field 2: `acl_entries`
10809            #[must_use]
10810            pub fn acl_entries(
10811                &self,
10812            ) -> &::buffa::RepeatedView<
10813                '_,
10814                super::super::__buffa::view::BoardAclEntryView<'_>,
10815            > {
10816                &self.0.reborrow().acl_entries
10817            }
10818            /// Resolved caller access.
10819            ///
10820            /// Field 3: `access`
10821            #[must_use]
10822            pub fn access(
10823                &self,
10824            ) -> &::buffa::MessageFieldView<
10825                super::super::__buffa::view::BoardAccessView<'_>,
10826            > {
10827                &self.0.reborrow().access
10828            }
10829        }
10830        impl ::core::convert::From<
10831            ::buffa::OwnedView<UpdateBoardAclResponseView<'static>>,
10832        > for UpdateBoardAclResponseOwnedView {
10833            fn from(
10834                inner: ::buffa::OwnedView<UpdateBoardAclResponseView<'static>>,
10835            ) -> Self {
10836                UpdateBoardAclResponseOwnedView(inner)
10837            }
10838        }
10839        impl ::core::convert::From<UpdateBoardAclResponseOwnedView>
10840        for ::buffa::OwnedView<UpdateBoardAclResponseView<'static>> {
10841            fn from(wrapper: UpdateBoardAclResponseOwnedView) -> Self {
10842                wrapper.0
10843            }
10844        }
10845        impl ::core::convert::AsRef<
10846            ::buffa::OwnedView<UpdateBoardAclResponseView<'static>>,
10847        > for UpdateBoardAclResponseOwnedView {
10848            fn as_ref(
10849                &self,
10850            ) -> &::buffa::OwnedView<UpdateBoardAclResponseView<'static>> {
10851                &self.0
10852            }
10853        }
10854        impl ::buffa::HasMessageView for super::super::UpdateBoardAclResponse {
10855            type View<'a> = UpdateBoardAclResponseView<'a>;
10856            type ViewHandle = UpdateBoardAclResponseOwnedView;
10857        }
10858        impl ::serde::Serialize for UpdateBoardAclResponseOwnedView {
10859            fn serialize<__S: ::serde::Serializer>(
10860                &self,
10861                __s: __S,
10862            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10863                ::serde::Serialize::serialize(&self.0, __s)
10864            }
10865        }
10866        /// ArchiveBoardRequest archives or unarchives a board.
10867        #[derive(Clone, Debug, Default)]
10868        pub struct ArchiveBoardRequestView<'a> {
10869            /// Board identifier as a UUID string.
10870            ///
10871            /// Field 1: `board_id`
10872            pub board_id: &'a str,
10873            /// Target archive state. True archives the board, false restores it.
10874            ///
10875            /// Field 2: `archived`
10876            pub archived: bool,
10877            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10878        }
10879        impl<'a> ::buffa::MessageView<'a> for ArchiveBoardRequestView<'a> {
10880            type Owned = super::super::ArchiveBoardRequest;
10881            fn decode_view(
10882                buf: &'a [u8],
10883            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10884                let __limit = ::core::cell::Cell::new(
10885                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
10886                );
10887                <Self as ::buffa::MessageView>::decode_view_ctx(
10888                    buf,
10889                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
10890                )
10891            }
10892            fn decode_view_with_ctx(
10893                buf: &'a [u8],
10894                ctx: ::buffa::DecodeContext<'_>,
10895            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10896                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
10897            }
10898            fn merge_view_field(
10899                &mut self,
10900                tag: ::buffa::encoding::Tag,
10901                cur: &'a [u8],
10902                before_tag: &'a [u8],
10903                ctx: ::buffa::DecodeContext<'_>,
10904            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
10905                let _ = ctx;
10906                #[allow(unused_variables)]
10907                let view = self;
10908                let mut cur = cur;
10909                match tag.field_number() {
10910                    1u32 => {
10911                        ::buffa::encoding::check_wire_type(
10912                            tag,
10913                            ::buffa::encoding::WireType::LengthDelimited,
10914                        )?;
10915                        view.board_id = ::buffa::types::borrow_str(&mut cur)?;
10916                    }
10917                    2u32 => {
10918                        ::buffa::encoding::check_wire_type(
10919                            tag,
10920                            ::buffa::encoding::WireType::Varint,
10921                        )?;
10922                        view.archived = ::buffa::types::decode_bool(&mut cur)?;
10923                    }
10924                    _ => {
10925                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10926                        let span_len = before_tag.len() - cur.len();
10927                        view.__buffa_unknown_fields
10928                            .push_record(before_tag, span_len, ctx)?;
10929                    }
10930                }
10931                ::core::result::Result::Ok(cur)
10932            }
10933            fn to_owned_message(
10934                &self,
10935            ) -> ::core::result::Result<
10936                super::super::ArchiveBoardRequest,
10937                ::buffa::DecodeError,
10938            > {
10939                self.to_owned_from_source(None)
10940            }
10941            #[allow(clippy::useless_conversion, clippy::needless_update)]
10942            fn to_owned_from_source(
10943                &self,
10944                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10945            ) -> ::core::result::Result<
10946                super::super::ArchiveBoardRequest,
10947                ::buffa::DecodeError,
10948            > {
10949                #[allow(unused_imports)]
10950                use ::buffa::alloc::string::ToString as _;
10951                let _ = __buffa_src;
10952                ::core::result::Result::Ok(super::super::ArchiveBoardRequest {
10953                    board_id: self.board_id.to_string(),
10954                    archived: self.archived,
10955                    __buffa_unknown_fields: self
10956                        .__buffa_unknown_fields
10957                        .to_owned()?
10958                        .into(),
10959                    ..::core::default::Default::default()
10960                })
10961            }
10962        }
10963        impl<'a> ::buffa::ViewEncode<'a> for ArchiveBoardRequestView<'a> {
10964            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10965            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
10966                #[allow(unused_imports)]
10967                use ::buffa::Enumeration as _;
10968                let mut size = 0u32;
10969                if !self.board_id.is_empty() {
10970                    size
10971                        += 1u32
10972                            + ::buffa::types::string_encoded_len(&self.board_id) as u32;
10973                }
10974                if self.archived {
10975                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10976                }
10977                size += self.__buffa_unknown_fields.encoded_len() as u32;
10978                size
10979            }
10980            #[allow(clippy::needless_borrow)]
10981            fn write_to(
10982                &self,
10983                _cache: &mut ::buffa::SizeCache,
10984                buf: &mut impl ::buffa::bytes::BufMut,
10985            ) {
10986                #[allow(unused_imports)]
10987                use ::buffa::Enumeration as _;
10988                if !self.board_id.is_empty() {
10989                    ::buffa::types::put_string_field(1u32, &self.board_id, buf);
10990                }
10991                if self.archived {
10992                    ::buffa::types::put_bool_field(2u32, self.archived, buf);
10993                }
10994                self.__buffa_unknown_fields.write_to(buf);
10995            }
10996        }
10997        /// Serializes this view as protobuf JSON.
10998        ///
10999        /// Implicit-presence fields with default values are omitted, `required`
11000        /// fields are always emitted, explicit-presence (`optional`) fields are
11001        /// emitted only when set, bytes fields are base64-encoded, and enum
11002        /// values are their proto name strings.
11003        ///
11004        /// This impl uses `serialize_map(None)` because the number of emitted
11005        /// fields depends on default-omission rules; serializers that require
11006        /// known map lengths (e.g. `bincode`) will return a runtime error.
11007        /// Use the owned message type for those formats.
11008        impl<'__a> ::serde::Serialize for ArchiveBoardRequestView<'__a> {
11009            fn serialize<__S: ::serde::Serializer>(
11010                &self,
11011                __s: __S,
11012            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11013                use ::serde::ser::SerializeMap as _;
11014                let mut __map = __s.serialize_map(::core::option::Option::None)?;
11015                if !::buffa::json_helpers::skip_if::is_empty_str(self.board_id) {
11016                    __map.serialize_entry("boardId", self.board_id)?;
11017                }
11018                if self.archived {
11019                    __map.serialize_entry("archived", &self.archived)?;
11020                }
11021                __map.end()
11022            }
11023        }
11024        impl<'a> ::buffa::MessageName for ArchiveBoardRequestView<'a> {
11025            const PACKAGE: &'static str = "collab.v1";
11026            const NAME: &'static str = "ArchiveBoardRequest";
11027            const FULL_NAME: &'static str = "collab.v1.ArchiveBoardRequest";
11028            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ArchiveBoardRequest";
11029        }
11030        ::buffa::impl_default_view_instance!(ArchiveBoardRequestView);
11031        ::buffa::impl_view_reborrow!(ArchiveBoardRequestView);
11032        /** Self-contained, `'static` owned view of a `ArchiveBoardRequest` message.
11033
11034 Wraps [`::buffa::OwnedView`]`<`[`ArchiveBoardRequestView`]`<'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.
11035
11036 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ArchiveBoardRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
11037        #[derive(Clone, Debug)]
11038        pub struct ArchiveBoardRequestOwnedView(
11039            ::buffa::OwnedView<ArchiveBoardRequestView<'static>>,
11040        );
11041        impl ArchiveBoardRequestOwnedView {
11042            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
11043            ///
11044            /// The view borrows directly from the buffer's data; the buffer is
11045            /// retained inside the returned handle.
11046            ///
11047            /// # Errors
11048            ///
11049            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
11050            /// protobuf data.
11051            pub fn decode(
11052                bytes: ::buffa::bytes::Bytes,
11053            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11054                ::core::result::Result::Ok(
11055                    ArchiveBoardRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
11056                )
11057            }
11058            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
11059            /// max message size).
11060            ///
11061            /// # Errors
11062            ///
11063            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
11064            /// exceeds the configured limits.
11065            pub fn decode_with_options(
11066                bytes: ::buffa::bytes::Bytes,
11067                opts: &::buffa::DecodeOptions,
11068            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11069                ::core::result::Result::Ok(
11070                    ArchiveBoardRequestOwnedView(
11071                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11072                    ),
11073                )
11074            }
11075            /// Build from an owned message via an encode → decode round-trip.
11076            ///
11077            /// # Errors
11078            ///
11079            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
11080            /// somehow invalid (should not happen for well-formed messages).
11081            pub fn from_owned(
11082                msg: &super::super::ArchiveBoardRequest,
11083            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11084                ::core::result::Result::Ok(
11085                    ArchiveBoardRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
11086                )
11087            }
11088            /// Borrow the full [`ArchiveBoardRequestView`] with its lifetime tied to `&self`.
11089            #[must_use]
11090            pub fn view(&self) -> &ArchiveBoardRequestView<'_> {
11091                self.0.reborrow()
11092            }
11093            /// Convert to the owned message type.
11094            ///
11095            /// # Errors
11096            ///
11097            /// Returns an error if re-materializing preserved unknown fields
11098            /// fails (e.g. the unknown-field limit is exceeded).
11099            pub fn to_owned_message(
11100                &self,
11101            ) -> ::core::result::Result<
11102                super::super::ArchiveBoardRequest,
11103                ::buffa::DecodeError,
11104            > {
11105                self.0.to_owned_message()
11106            }
11107            /// The underlying bytes buffer.
11108            #[must_use]
11109            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11110                self.0.bytes()
11111            }
11112            /// Consume the handle, returning the underlying bytes buffer.
11113            #[must_use]
11114            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11115                self.0.into_bytes()
11116            }
11117            /// Board identifier as a UUID string.
11118            ///
11119            /// Field 1: `board_id`
11120            #[must_use]
11121            pub fn board_id(&self) -> &'_ str {
11122                self.0.reborrow().board_id
11123            }
11124            /// Target archive state. True archives the board, false restores it.
11125            ///
11126            /// Field 2: `archived`
11127            #[must_use]
11128            pub fn archived(&self) -> bool {
11129                self.0.reborrow().archived
11130            }
11131        }
11132        impl ::core::convert::From<::buffa::OwnedView<ArchiveBoardRequestView<'static>>>
11133        for ArchiveBoardRequestOwnedView {
11134            fn from(
11135                inner: ::buffa::OwnedView<ArchiveBoardRequestView<'static>>,
11136            ) -> Self {
11137                ArchiveBoardRequestOwnedView(inner)
11138            }
11139        }
11140        impl ::core::convert::From<ArchiveBoardRequestOwnedView>
11141        for ::buffa::OwnedView<ArchiveBoardRequestView<'static>> {
11142            fn from(wrapper: ArchiveBoardRequestOwnedView) -> Self {
11143                wrapper.0
11144            }
11145        }
11146        impl ::core::convert::AsRef<::buffa::OwnedView<ArchiveBoardRequestView<'static>>>
11147        for ArchiveBoardRequestOwnedView {
11148            fn as_ref(&self) -> &::buffa::OwnedView<ArchiveBoardRequestView<'static>> {
11149                &self.0
11150            }
11151        }
11152        impl ::buffa::HasMessageView for super::super::ArchiveBoardRequest {
11153            type View<'a> = ArchiveBoardRequestView<'a>;
11154            type ViewHandle = ArchiveBoardRequestOwnedView;
11155        }
11156        impl ::serde::Serialize for ArchiveBoardRequestOwnedView {
11157            fn serialize<__S: ::serde::Serializer>(
11158                &self,
11159                __s: __S,
11160            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11161                ::serde::Serialize::serialize(&self.0, __s)
11162            }
11163        }
11164        /// ArchiveBoardResponse returns the updated archive state.
11165        #[derive(Clone, Debug, Default)]
11166        pub struct ArchiveBoardResponseView<'a> {
11167            /// Updated board metadata.
11168            ///
11169            /// Field 1: `board`
11170            pub board: ::buffa::MessageFieldView<
11171                super::super::__buffa::view::BoardView<'a>,
11172            >,
11173            /// Resolved caller access.
11174            ///
11175            /// Field 2: `access`
11176            pub access: ::buffa::MessageFieldView<
11177                super::super::__buffa::view::BoardAccessView<'a>,
11178            >,
11179            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11180        }
11181        impl<'a> ::buffa::MessageView<'a> for ArchiveBoardResponseView<'a> {
11182            type Owned = super::super::ArchiveBoardResponse;
11183            fn decode_view(
11184                buf: &'a [u8],
11185            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11186                let __limit = ::core::cell::Cell::new(
11187                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
11188                );
11189                <Self as ::buffa::MessageView>::decode_view_ctx(
11190                    buf,
11191                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
11192                )
11193            }
11194            fn decode_view_with_ctx(
11195                buf: &'a [u8],
11196                ctx: ::buffa::DecodeContext<'_>,
11197            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11198                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
11199            }
11200            fn merge_view_field(
11201                &mut self,
11202                tag: ::buffa::encoding::Tag,
11203                cur: &'a [u8],
11204                before_tag: &'a [u8],
11205                ctx: ::buffa::DecodeContext<'_>,
11206            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
11207                let _ = ctx;
11208                #[allow(unused_variables)]
11209                let view = self;
11210                let mut cur = cur;
11211                match tag.field_number() {
11212                    1u32 => {
11213                        ::buffa::encoding::check_wire_type(
11214                            tag,
11215                            ::buffa::encoding::WireType::LengthDelimited,
11216                        )?;
11217                        let __sub_ctx = ctx.descend()?;
11218                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11219                        match view.board.as_mut() {
11220                            Some(existing) => {
11221                                ::buffa::MessageView::merge_into_view(
11222                                    existing,
11223                                    sub,
11224                                    __sub_ctx,
11225                                )?
11226                            }
11227                            None => {
11228                                view.board = ::buffa::MessageFieldView::set(
11229                                    <super::super::__buffa::view::BoardView as ::buffa::MessageView>::decode_view_ctx(
11230                                        sub,
11231                                        __sub_ctx,
11232                                    )?,
11233                                );
11234                            }
11235                        }
11236                    }
11237                    2u32 => {
11238                        ::buffa::encoding::check_wire_type(
11239                            tag,
11240                            ::buffa::encoding::WireType::LengthDelimited,
11241                        )?;
11242                        let __sub_ctx = ctx.descend()?;
11243                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11244                        match view.access.as_mut() {
11245                            Some(existing) => {
11246                                ::buffa::MessageView::merge_into_view(
11247                                    existing,
11248                                    sub,
11249                                    __sub_ctx,
11250                                )?
11251                            }
11252                            None => {
11253                                view.access = ::buffa::MessageFieldView::set(
11254                                    <super::super::__buffa::view::BoardAccessView as ::buffa::MessageView>::decode_view_ctx(
11255                                        sub,
11256                                        __sub_ctx,
11257                                    )?,
11258                                );
11259                            }
11260                        }
11261                    }
11262                    _ => {
11263                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
11264                        let span_len = before_tag.len() - cur.len();
11265                        view.__buffa_unknown_fields
11266                            .push_record(before_tag, span_len, ctx)?;
11267                    }
11268                }
11269                ::core::result::Result::Ok(cur)
11270            }
11271            fn to_owned_message(
11272                &self,
11273            ) -> ::core::result::Result<
11274                super::super::ArchiveBoardResponse,
11275                ::buffa::DecodeError,
11276            > {
11277                self.to_owned_from_source(None)
11278            }
11279            #[allow(clippy::useless_conversion, clippy::needless_update)]
11280            fn to_owned_from_source(
11281                &self,
11282                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
11283            ) -> ::core::result::Result<
11284                super::super::ArchiveBoardResponse,
11285                ::buffa::DecodeError,
11286            > {
11287                #[allow(unused_imports)]
11288                use ::buffa::alloc::string::ToString as _;
11289                let _ = __buffa_src;
11290                ::core::result::Result::Ok(super::super::ArchiveBoardResponse {
11291                    board: match self.board.as_option() {
11292                        Some(v) => {
11293                            ::buffa::MessageField::<
11294                                super::super::Board,
11295                            >::some(v.to_owned_from_source(__buffa_src)?)
11296                        }
11297                        None => ::buffa::MessageField::none(),
11298                    },
11299                    access: match self.access.as_option() {
11300                        Some(v) => {
11301                            ::buffa::MessageField::<
11302                                super::super::BoardAccess,
11303                            >::some(v.to_owned_from_source(__buffa_src)?)
11304                        }
11305                        None => ::buffa::MessageField::none(),
11306                    },
11307                    __buffa_unknown_fields: self
11308                        .__buffa_unknown_fields
11309                        .to_owned()?
11310                        .into(),
11311                    ..::core::default::Default::default()
11312                })
11313            }
11314        }
11315        impl<'a> ::buffa::ViewEncode<'a> for ArchiveBoardResponseView<'a> {
11316            #[allow(clippy::needless_borrow, clippy::let_and_return)]
11317            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
11318                #[allow(unused_imports)]
11319                use ::buffa::Enumeration as _;
11320                let mut size = 0u32;
11321                if self.board.is_set() {
11322                    let __slot = __cache.reserve();
11323                    let inner_size = self.board.compute_size(__cache);
11324                    __cache.set(__slot, inner_size);
11325                    size
11326                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11327                            + inner_size;
11328                }
11329                if self.access.is_set() {
11330                    let __slot = __cache.reserve();
11331                    let inner_size = self.access.compute_size(__cache);
11332                    __cache.set(__slot, inner_size);
11333                    size
11334                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11335                            + inner_size;
11336                }
11337                size += self.__buffa_unknown_fields.encoded_len() as u32;
11338                size
11339            }
11340            #[allow(clippy::needless_borrow)]
11341            fn write_to(
11342                &self,
11343                __cache: &mut ::buffa::SizeCache,
11344                buf: &mut impl ::buffa::bytes::BufMut,
11345            ) {
11346                #[allow(unused_imports)]
11347                use ::buffa::Enumeration as _;
11348                if self.board.is_set() {
11349                    ::buffa::types::put_len_delimited_header(
11350                        1u32,
11351                        __cache.consume_next(),
11352                        buf,
11353                    );
11354                    self.board.write_to(__cache, buf);
11355                }
11356                if self.access.is_set() {
11357                    ::buffa::types::put_len_delimited_header(
11358                        2u32,
11359                        __cache.consume_next(),
11360                        buf,
11361                    );
11362                    self.access.write_to(__cache, buf);
11363                }
11364                self.__buffa_unknown_fields.write_to(buf);
11365            }
11366        }
11367        /// Serializes this view as protobuf JSON.
11368        ///
11369        /// Implicit-presence fields with default values are omitted, `required`
11370        /// fields are always emitted, explicit-presence (`optional`) fields are
11371        /// emitted only when set, bytes fields are base64-encoded, and enum
11372        /// values are their proto name strings.
11373        ///
11374        /// This impl uses `serialize_map(None)` because the number of emitted
11375        /// fields depends on default-omission rules; serializers that require
11376        /// known map lengths (e.g. `bincode`) will return a runtime error.
11377        /// Use the owned message type for those formats.
11378        impl<'__a> ::serde::Serialize for ArchiveBoardResponseView<'__a> {
11379            fn serialize<__S: ::serde::Serializer>(
11380                &self,
11381                __s: __S,
11382            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11383                use ::serde::ser::SerializeMap as _;
11384                let mut __map = __s.serialize_map(::core::option::Option::None)?;
11385                {
11386                    if let ::core::option::Option::Some(__v) = self.board.as_option() {
11387                        __map.serialize_entry("board", __v)?;
11388                    }
11389                }
11390                {
11391                    if let ::core::option::Option::Some(__v) = self.access.as_option() {
11392                        __map.serialize_entry("access", __v)?;
11393                    }
11394                }
11395                __map.end()
11396            }
11397        }
11398        impl<'a> ::buffa::MessageName for ArchiveBoardResponseView<'a> {
11399            const PACKAGE: &'static str = "collab.v1";
11400            const NAME: &'static str = "ArchiveBoardResponse";
11401            const FULL_NAME: &'static str = "collab.v1.ArchiveBoardResponse";
11402            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.ArchiveBoardResponse";
11403        }
11404        ::buffa::impl_default_view_instance!(ArchiveBoardResponseView);
11405        ::buffa::impl_view_reborrow!(ArchiveBoardResponseView);
11406        /** Self-contained, `'static` owned view of a `ArchiveBoardResponse` message.
11407
11408 Wraps [`::buffa::OwnedView`]`<`[`ArchiveBoardResponseView`]`<'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.
11409
11410 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ArchiveBoardResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
11411        #[derive(Clone, Debug)]
11412        pub struct ArchiveBoardResponseOwnedView(
11413            ::buffa::OwnedView<ArchiveBoardResponseView<'static>>,
11414        );
11415        impl ArchiveBoardResponseOwnedView {
11416            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
11417            ///
11418            /// The view borrows directly from the buffer's data; the buffer is
11419            /// retained inside the returned handle.
11420            ///
11421            /// # Errors
11422            ///
11423            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
11424            /// protobuf data.
11425            pub fn decode(
11426                bytes: ::buffa::bytes::Bytes,
11427            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11428                ::core::result::Result::Ok(
11429                    ArchiveBoardResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
11430                )
11431            }
11432            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
11433            /// max message size).
11434            ///
11435            /// # Errors
11436            ///
11437            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
11438            /// exceeds the configured limits.
11439            pub fn decode_with_options(
11440                bytes: ::buffa::bytes::Bytes,
11441                opts: &::buffa::DecodeOptions,
11442            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11443                ::core::result::Result::Ok(
11444                    ArchiveBoardResponseOwnedView(
11445                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11446                    ),
11447                )
11448            }
11449            /// Build from an owned message via an encode → decode round-trip.
11450            ///
11451            /// # Errors
11452            ///
11453            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
11454            /// somehow invalid (should not happen for well-formed messages).
11455            pub fn from_owned(
11456                msg: &super::super::ArchiveBoardResponse,
11457            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11458                ::core::result::Result::Ok(
11459                    ArchiveBoardResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
11460                )
11461            }
11462            /// Borrow the full [`ArchiveBoardResponseView`] with its lifetime tied to `&self`.
11463            #[must_use]
11464            pub fn view(&self) -> &ArchiveBoardResponseView<'_> {
11465                self.0.reborrow()
11466            }
11467            /// Convert to the owned message type.
11468            ///
11469            /// # Errors
11470            ///
11471            /// Returns an error if re-materializing preserved unknown fields
11472            /// fails (e.g. the unknown-field limit is exceeded).
11473            pub fn to_owned_message(
11474                &self,
11475            ) -> ::core::result::Result<
11476                super::super::ArchiveBoardResponse,
11477                ::buffa::DecodeError,
11478            > {
11479                self.0.to_owned_message()
11480            }
11481            /// The underlying bytes buffer.
11482            #[must_use]
11483            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11484                self.0.bytes()
11485            }
11486            /// Consume the handle, returning the underlying bytes buffer.
11487            #[must_use]
11488            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11489                self.0.into_bytes()
11490            }
11491            /// Updated board metadata.
11492            ///
11493            /// Field 1: `board`
11494            #[must_use]
11495            pub fn board(
11496                &self,
11497            ) -> &::buffa::MessageFieldView<super::super::__buffa::view::BoardView<'_>> {
11498                &self.0.reborrow().board
11499            }
11500            /// Resolved caller access.
11501            ///
11502            /// Field 2: `access`
11503            #[must_use]
11504            pub fn access(
11505                &self,
11506            ) -> &::buffa::MessageFieldView<
11507                super::super::__buffa::view::BoardAccessView<'_>,
11508            > {
11509                &self.0.reborrow().access
11510            }
11511        }
11512        impl ::core::convert::From<::buffa::OwnedView<ArchiveBoardResponseView<'static>>>
11513        for ArchiveBoardResponseOwnedView {
11514            fn from(
11515                inner: ::buffa::OwnedView<ArchiveBoardResponseView<'static>>,
11516            ) -> Self {
11517                ArchiveBoardResponseOwnedView(inner)
11518            }
11519        }
11520        impl ::core::convert::From<ArchiveBoardResponseOwnedView>
11521        for ::buffa::OwnedView<ArchiveBoardResponseView<'static>> {
11522            fn from(wrapper: ArchiveBoardResponseOwnedView) -> Self {
11523                wrapper.0
11524            }
11525        }
11526        impl ::core::convert::AsRef<
11527            ::buffa::OwnedView<ArchiveBoardResponseView<'static>>,
11528        > for ArchiveBoardResponseOwnedView {
11529            fn as_ref(&self) -> &::buffa::OwnedView<ArchiveBoardResponseView<'static>> {
11530                &self.0
11531            }
11532        }
11533        impl ::buffa::HasMessageView for super::super::ArchiveBoardResponse {
11534            type View<'a> = ArchiveBoardResponseView<'a>;
11535            type ViewHandle = ArchiveBoardResponseOwnedView;
11536        }
11537        impl ::serde::Serialize for ArchiveBoardResponseOwnedView {
11538            fn serialize<__S: ::serde::Serializer>(
11539                &self,
11540                __s: __S,
11541            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11542                ::serde::Serialize::serialize(&self.0, __s)
11543            }
11544        }
11545        /// MintJoinTokenRequest resolves access and mints a short-lived room admission token.
11546        #[derive(Clone, Debug, Default)]
11547        pub struct MintJoinTokenRequestView<'a> {
11548            /// Board identifier as a UUID string.
11549            ///
11550            /// Field 1: `board_id`
11551            pub board_id: &'a str,
11552            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11553        }
11554        impl<'a> ::buffa::MessageView<'a> for MintJoinTokenRequestView<'a> {
11555            type Owned = super::super::MintJoinTokenRequest;
11556            fn decode_view(
11557                buf: &'a [u8],
11558            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11559                let __limit = ::core::cell::Cell::new(
11560                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
11561                );
11562                <Self as ::buffa::MessageView>::decode_view_ctx(
11563                    buf,
11564                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
11565                )
11566            }
11567            fn decode_view_with_ctx(
11568                buf: &'a [u8],
11569                ctx: ::buffa::DecodeContext<'_>,
11570            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11571                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
11572            }
11573            fn merge_view_field(
11574                &mut self,
11575                tag: ::buffa::encoding::Tag,
11576                cur: &'a [u8],
11577                before_tag: &'a [u8],
11578                ctx: ::buffa::DecodeContext<'_>,
11579            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
11580                let _ = ctx;
11581                #[allow(unused_variables)]
11582                let view = self;
11583                let mut cur = cur;
11584                match tag.field_number() {
11585                    1u32 => {
11586                        ::buffa::encoding::check_wire_type(
11587                            tag,
11588                            ::buffa::encoding::WireType::LengthDelimited,
11589                        )?;
11590                        view.board_id = ::buffa::types::borrow_str(&mut cur)?;
11591                    }
11592                    _ => {
11593                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
11594                        let span_len = before_tag.len() - cur.len();
11595                        view.__buffa_unknown_fields
11596                            .push_record(before_tag, span_len, ctx)?;
11597                    }
11598                }
11599                ::core::result::Result::Ok(cur)
11600            }
11601            fn to_owned_message(
11602                &self,
11603            ) -> ::core::result::Result<
11604                super::super::MintJoinTokenRequest,
11605                ::buffa::DecodeError,
11606            > {
11607                self.to_owned_from_source(None)
11608            }
11609            #[allow(clippy::useless_conversion, clippy::needless_update)]
11610            fn to_owned_from_source(
11611                &self,
11612                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
11613            ) -> ::core::result::Result<
11614                super::super::MintJoinTokenRequest,
11615                ::buffa::DecodeError,
11616            > {
11617                #[allow(unused_imports)]
11618                use ::buffa::alloc::string::ToString as _;
11619                let _ = __buffa_src;
11620                ::core::result::Result::Ok(super::super::MintJoinTokenRequest {
11621                    board_id: self.board_id.to_string(),
11622                    __buffa_unknown_fields: self
11623                        .__buffa_unknown_fields
11624                        .to_owned()?
11625                        .into(),
11626                    ..::core::default::Default::default()
11627                })
11628            }
11629        }
11630        impl<'a> ::buffa::ViewEncode<'a> for MintJoinTokenRequestView<'a> {
11631            #[allow(clippy::needless_borrow, clippy::let_and_return)]
11632            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
11633                #[allow(unused_imports)]
11634                use ::buffa::Enumeration as _;
11635                let mut size = 0u32;
11636                if !self.board_id.is_empty() {
11637                    size
11638                        += 1u32
11639                            + ::buffa::types::string_encoded_len(&self.board_id) as u32;
11640                }
11641                size += self.__buffa_unknown_fields.encoded_len() as u32;
11642                size
11643            }
11644            #[allow(clippy::needless_borrow)]
11645            fn write_to(
11646                &self,
11647                _cache: &mut ::buffa::SizeCache,
11648                buf: &mut impl ::buffa::bytes::BufMut,
11649            ) {
11650                #[allow(unused_imports)]
11651                use ::buffa::Enumeration as _;
11652                if !self.board_id.is_empty() {
11653                    ::buffa::types::put_string_field(1u32, &self.board_id, buf);
11654                }
11655                self.__buffa_unknown_fields.write_to(buf);
11656            }
11657        }
11658        /// Serializes this view as protobuf JSON.
11659        ///
11660        /// Implicit-presence fields with default values are omitted, `required`
11661        /// fields are always emitted, explicit-presence (`optional`) fields are
11662        /// emitted only when set, bytes fields are base64-encoded, and enum
11663        /// values are their proto name strings.
11664        ///
11665        /// This impl uses `serialize_map(None)` because the number of emitted
11666        /// fields depends on default-omission rules; serializers that require
11667        /// known map lengths (e.g. `bincode`) will return a runtime error.
11668        /// Use the owned message type for those formats.
11669        impl<'__a> ::serde::Serialize for MintJoinTokenRequestView<'__a> {
11670            fn serialize<__S: ::serde::Serializer>(
11671                &self,
11672                __s: __S,
11673            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11674                use ::serde::ser::SerializeMap as _;
11675                let mut __map = __s.serialize_map(::core::option::Option::None)?;
11676                if !::buffa::json_helpers::skip_if::is_empty_str(self.board_id) {
11677                    __map.serialize_entry("boardId", self.board_id)?;
11678                }
11679                __map.end()
11680            }
11681        }
11682        impl<'a> ::buffa::MessageName for MintJoinTokenRequestView<'a> {
11683            const PACKAGE: &'static str = "collab.v1";
11684            const NAME: &'static str = "MintJoinTokenRequest";
11685            const FULL_NAME: &'static str = "collab.v1.MintJoinTokenRequest";
11686            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.MintJoinTokenRequest";
11687        }
11688        ::buffa::impl_default_view_instance!(MintJoinTokenRequestView);
11689        ::buffa::impl_view_reborrow!(MintJoinTokenRequestView);
11690        /** Self-contained, `'static` owned view of a `MintJoinTokenRequest` message.
11691
11692 Wraps [`::buffa::OwnedView`]`<`[`MintJoinTokenRequestView`]`<'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.
11693
11694 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`MintJoinTokenRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
11695        #[derive(Clone, Debug)]
11696        pub struct MintJoinTokenRequestOwnedView(
11697            ::buffa::OwnedView<MintJoinTokenRequestView<'static>>,
11698        );
11699        impl MintJoinTokenRequestOwnedView {
11700            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
11701            ///
11702            /// The view borrows directly from the buffer's data; the buffer is
11703            /// retained inside the returned handle.
11704            ///
11705            /// # Errors
11706            ///
11707            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
11708            /// protobuf data.
11709            pub fn decode(
11710                bytes: ::buffa::bytes::Bytes,
11711            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11712                ::core::result::Result::Ok(
11713                    MintJoinTokenRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
11714                )
11715            }
11716            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
11717            /// max message size).
11718            ///
11719            /// # Errors
11720            ///
11721            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
11722            /// exceeds the configured limits.
11723            pub fn decode_with_options(
11724                bytes: ::buffa::bytes::Bytes,
11725                opts: &::buffa::DecodeOptions,
11726            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11727                ::core::result::Result::Ok(
11728                    MintJoinTokenRequestOwnedView(
11729                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11730                    ),
11731                )
11732            }
11733            /// Build from an owned message via an encode → decode round-trip.
11734            ///
11735            /// # Errors
11736            ///
11737            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
11738            /// somehow invalid (should not happen for well-formed messages).
11739            pub fn from_owned(
11740                msg: &super::super::MintJoinTokenRequest,
11741            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11742                ::core::result::Result::Ok(
11743                    MintJoinTokenRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
11744                )
11745            }
11746            /// Borrow the full [`MintJoinTokenRequestView`] with its lifetime tied to `&self`.
11747            #[must_use]
11748            pub fn view(&self) -> &MintJoinTokenRequestView<'_> {
11749                self.0.reborrow()
11750            }
11751            /// Convert to the owned message type.
11752            ///
11753            /// # Errors
11754            ///
11755            /// Returns an error if re-materializing preserved unknown fields
11756            /// fails (e.g. the unknown-field limit is exceeded).
11757            pub fn to_owned_message(
11758                &self,
11759            ) -> ::core::result::Result<
11760                super::super::MintJoinTokenRequest,
11761                ::buffa::DecodeError,
11762            > {
11763                self.0.to_owned_message()
11764            }
11765            /// The underlying bytes buffer.
11766            #[must_use]
11767            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11768                self.0.bytes()
11769            }
11770            /// Consume the handle, returning the underlying bytes buffer.
11771            #[must_use]
11772            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11773                self.0.into_bytes()
11774            }
11775            /// Board identifier as a UUID string.
11776            ///
11777            /// Field 1: `board_id`
11778            #[must_use]
11779            pub fn board_id(&self) -> &'_ str {
11780                self.0.reborrow().board_id
11781            }
11782        }
11783        impl ::core::convert::From<::buffa::OwnedView<MintJoinTokenRequestView<'static>>>
11784        for MintJoinTokenRequestOwnedView {
11785            fn from(
11786                inner: ::buffa::OwnedView<MintJoinTokenRequestView<'static>>,
11787            ) -> Self {
11788                MintJoinTokenRequestOwnedView(inner)
11789            }
11790        }
11791        impl ::core::convert::From<MintJoinTokenRequestOwnedView>
11792        for ::buffa::OwnedView<MintJoinTokenRequestView<'static>> {
11793            fn from(wrapper: MintJoinTokenRequestOwnedView) -> Self {
11794                wrapper.0
11795            }
11796        }
11797        impl ::core::convert::AsRef<
11798            ::buffa::OwnedView<MintJoinTokenRequestView<'static>>,
11799        > for MintJoinTokenRequestOwnedView {
11800            fn as_ref(&self) -> &::buffa::OwnedView<MintJoinTokenRequestView<'static>> {
11801                &self.0
11802            }
11803        }
11804        impl ::buffa::HasMessageView for super::super::MintJoinTokenRequest {
11805            type View<'a> = MintJoinTokenRequestView<'a>;
11806            type ViewHandle = MintJoinTokenRequestOwnedView;
11807        }
11808        impl ::serde::Serialize for MintJoinTokenRequestOwnedView {
11809            fn serialize<__S: ::serde::Serializer>(
11810                &self,
11811                __s: __S,
11812            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11813                ::serde::Serialize::serialize(&self.0, __s)
11814            }
11815        }
11816        /// MintJoinTokenResponse returns the signed room admission contract for the caller.
11817        #[derive(Clone, Debug, Default)]
11818        pub struct MintJoinTokenResponseView<'a> {
11819            /// Board identifier as a UUID string.
11820            ///
11821            /// Field 1: `board_id`
11822            pub board_id: &'a str,
11823            /// Resolved caller access for the board.
11824            ///
11825            /// Field 2: `access`
11826            pub access: ::buffa::MessageFieldView<
11827                super::super::__buffa::view::BoardAccessView<'a>,
11828            >,
11829            /// Token expiry time in UTC. Join tokens expire 5 minutes after issuance.
11830            ///
11831            /// Field 3: `expires_at`
11832            pub expires_at: ::buffa::MessageFieldView<
11833                ::buffa_types::google::protobuf::__buffa::view::TimestampView<'a>,
11834            >,
11835            /// Signed short-lived room admission token.
11836            ///
11837            /// Field 4: `token`
11838            pub token: &'a str,
11839            /// Room identifier the client should join. This is the board ID.
11840            ///
11841            /// Field 5: `room_id`
11842            pub room_id: &'a str,
11843            /// Unique connection identifier embedded in the token.
11844            ///
11845            /// Field 6: `connection_id`
11846            pub connection_id: &'a str,
11847            /// Realtime room URL the client should connect to.
11848            ///
11849            /// Field 7: `socket_path`
11850            pub socket_path: &'a str,
11851            /// Lightweight local presence payload for the caller.
11852            ///
11853            /// Field 8: `presence`
11854            pub presence: ::buffa::MessageFieldView<
11855                super::super::__buffa::view::PresencePayloadView<'a>,
11856            >,
11857            /// Access version embedded in the token; clients must refresh when the board access version changes.
11858            ///
11859            /// Field 9: `access_version`
11860            pub access_version: u64,
11861            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11862        }
11863        impl<'a> ::buffa::MessageView<'a> for MintJoinTokenResponseView<'a> {
11864            type Owned = super::super::MintJoinTokenResponse;
11865            fn decode_view(
11866                buf: &'a [u8],
11867            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11868                let __limit = ::core::cell::Cell::new(
11869                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
11870                );
11871                <Self as ::buffa::MessageView>::decode_view_ctx(
11872                    buf,
11873                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
11874                )
11875            }
11876            fn decode_view_with_ctx(
11877                buf: &'a [u8],
11878                ctx: ::buffa::DecodeContext<'_>,
11879            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11880                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
11881            }
11882            fn merge_view_field(
11883                &mut self,
11884                tag: ::buffa::encoding::Tag,
11885                cur: &'a [u8],
11886                before_tag: &'a [u8],
11887                ctx: ::buffa::DecodeContext<'_>,
11888            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
11889                let _ = ctx;
11890                #[allow(unused_variables)]
11891                let view = self;
11892                let mut cur = cur;
11893                match tag.field_number() {
11894                    1u32 => {
11895                        ::buffa::encoding::check_wire_type(
11896                            tag,
11897                            ::buffa::encoding::WireType::LengthDelimited,
11898                        )?;
11899                        view.board_id = ::buffa::types::borrow_str(&mut cur)?;
11900                    }
11901                    2u32 => {
11902                        ::buffa::encoding::check_wire_type(
11903                            tag,
11904                            ::buffa::encoding::WireType::LengthDelimited,
11905                        )?;
11906                        let __sub_ctx = ctx.descend()?;
11907                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11908                        match view.access.as_mut() {
11909                            Some(existing) => {
11910                                ::buffa::MessageView::merge_into_view(
11911                                    existing,
11912                                    sub,
11913                                    __sub_ctx,
11914                                )?
11915                            }
11916                            None => {
11917                                view.access = ::buffa::MessageFieldView::set(
11918                                    <super::super::__buffa::view::BoardAccessView as ::buffa::MessageView>::decode_view_ctx(
11919                                        sub,
11920                                        __sub_ctx,
11921                                    )?,
11922                                );
11923                            }
11924                        }
11925                    }
11926                    3u32 => {
11927                        ::buffa::encoding::check_wire_type(
11928                            tag,
11929                            ::buffa::encoding::WireType::LengthDelimited,
11930                        )?;
11931                        let __sub_ctx = ctx.descend()?;
11932                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11933                        match view.expires_at.as_mut() {
11934                            Some(existing) => {
11935                                ::buffa::MessageView::merge_into_view(
11936                                    existing,
11937                                    sub,
11938                                    __sub_ctx,
11939                                )?
11940                            }
11941                            None => {
11942                                view.expires_at = ::buffa::MessageFieldView::set(
11943                                    <::buffa_types::google::protobuf::__buffa::view::TimestampView as ::buffa::MessageView>::decode_view_ctx(
11944                                        sub,
11945                                        __sub_ctx,
11946                                    )?,
11947                                );
11948                            }
11949                        }
11950                    }
11951                    4u32 => {
11952                        ::buffa::encoding::check_wire_type(
11953                            tag,
11954                            ::buffa::encoding::WireType::LengthDelimited,
11955                        )?;
11956                        view.token = ::buffa::types::borrow_str(&mut cur)?;
11957                    }
11958                    5u32 => {
11959                        ::buffa::encoding::check_wire_type(
11960                            tag,
11961                            ::buffa::encoding::WireType::LengthDelimited,
11962                        )?;
11963                        view.room_id = ::buffa::types::borrow_str(&mut cur)?;
11964                    }
11965                    6u32 => {
11966                        ::buffa::encoding::check_wire_type(
11967                            tag,
11968                            ::buffa::encoding::WireType::LengthDelimited,
11969                        )?;
11970                        view.connection_id = ::buffa::types::borrow_str(&mut cur)?;
11971                    }
11972                    7u32 => {
11973                        ::buffa::encoding::check_wire_type(
11974                            tag,
11975                            ::buffa::encoding::WireType::LengthDelimited,
11976                        )?;
11977                        view.socket_path = ::buffa::types::borrow_str(&mut cur)?;
11978                    }
11979                    8u32 => {
11980                        ::buffa::encoding::check_wire_type(
11981                            tag,
11982                            ::buffa::encoding::WireType::LengthDelimited,
11983                        )?;
11984                        let __sub_ctx = ctx.descend()?;
11985                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11986                        match view.presence.as_mut() {
11987                            Some(existing) => {
11988                                ::buffa::MessageView::merge_into_view(
11989                                    existing,
11990                                    sub,
11991                                    __sub_ctx,
11992                                )?
11993                            }
11994                            None => {
11995                                view.presence = ::buffa::MessageFieldView::set(
11996                                    <super::super::__buffa::view::PresencePayloadView as ::buffa::MessageView>::decode_view_ctx(
11997                                        sub,
11998                                        __sub_ctx,
11999                                    )?,
12000                                );
12001                            }
12002                        }
12003                    }
12004                    9u32 => {
12005                        ::buffa::encoding::check_wire_type(
12006                            tag,
12007                            ::buffa::encoding::WireType::Varint,
12008                        )?;
12009                        view.access_version = ::buffa::types::decode_uint64(&mut cur)?;
12010                    }
12011                    _ => {
12012                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
12013                        let span_len = before_tag.len() - cur.len();
12014                        view.__buffa_unknown_fields
12015                            .push_record(before_tag, span_len, ctx)?;
12016                    }
12017                }
12018                ::core::result::Result::Ok(cur)
12019            }
12020            fn to_owned_message(
12021                &self,
12022            ) -> ::core::result::Result<
12023                super::super::MintJoinTokenResponse,
12024                ::buffa::DecodeError,
12025            > {
12026                self.to_owned_from_source(None)
12027            }
12028            #[allow(clippy::useless_conversion, clippy::needless_update)]
12029            fn to_owned_from_source(
12030                &self,
12031                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12032            ) -> ::core::result::Result<
12033                super::super::MintJoinTokenResponse,
12034                ::buffa::DecodeError,
12035            > {
12036                #[allow(unused_imports)]
12037                use ::buffa::alloc::string::ToString as _;
12038                let _ = __buffa_src;
12039                ::core::result::Result::Ok(super::super::MintJoinTokenResponse {
12040                    board_id: self.board_id.to_string(),
12041                    access: match self.access.as_option() {
12042                        Some(v) => {
12043                            ::buffa::MessageField::<
12044                                super::super::BoardAccess,
12045                            >::some(v.to_owned_from_source(__buffa_src)?)
12046                        }
12047                        None => ::buffa::MessageField::none(),
12048                    },
12049                    expires_at: match self.expires_at.as_option() {
12050                        Some(v) => {
12051                            ::buffa::MessageField::<
12052                                ::buffa_types::google::protobuf::Timestamp,
12053                            >::some(v.to_owned_from_source(__buffa_src)?)
12054                        }
12055                        None => ::buffa::MessageField::none(),
12056                    },
12057                    token: self.token.to_string(),
12058                    room_id: self.room_id.to_string(),
12059                    connection_id: self.connection_id.to_string(),
12060                    socket_path: self.socket_path.to_string(),
12061                    presence: match self.presence.as_option() {
12062                        Some(v) => {
12063                            ::buffa::MessageField::<
12064                                super::super::PresencePayload,
12065                            >::some(v.to_owned_from_source(__buffa_src)?)
12066                        }
12067                        None => ::buffa::MessageField::none(),
12068                    },
12069                    access_version: self.access_version,
12070                    __buffa_unknown_fields: self
12071                        .__buffa_unknown_fields
12072                        .to_owned()?
12073                        .into(),
12074                    ..::core::default::Default::default()
12075                })
12076            }
12077        }
12078        impl<'a> ::buffa::ViewEncode<'a> for MintJoinTokenResponseView<'a> {
12079            #[allow(clippy::needless_borrow, clippy::let_and_return)]
12080            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
12081                #[allow(unused_imports)]
12082                use ::buffa::Enumeration as _;
12083                let mut size = 0u32;
12084                if !self.board_id.is_empty() {
12085                    size
12086                        += 1u32
12087                            + ::buffa::types::string_encoded_len(&self.board_id) as u32;
12088                }
12089                if self.access.is_set() {
12090                    let __slot = __cache.reserve();
12091                    let inner_size = self.access.compute_size(__cache);
12092                    __cache.set(__slot, inner_size);
12093                    size
12094                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12095                            + inner_size;
12096                }
12097                if self.expires_at.is_set() {
12098                    let __slot = __cache.reserve();
12099                    let inner_size = self.expires_at.compute_size(__cache);
12100                    __cache.set(__slot, inner_size);
12101                    size
12102                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12103                            + inner_size;
12104                }
12105                if !self.token.is_empty() {
12106                    size
12107                        += 1u32 + ::buffa::types::string_encoded_len(&self.token) as u32;
12108                }
12109                if !self.room_id.is_empty() {
12110                    size
12111                        += 1u32
12112                            + ::buffa::types::string_encoded_len(&self.room_id) as u32;
12113                }
12114                if !self.connection_id.is_empty() {
12115                    size
12116                        += 1u32
12117                            + ::buffa::types::string_encoded_len(&self.connection_id)
12118                                as u32;
12119                }
12120                if !self.socket_path.is_empty() {
12121                    size
12122                        += 1u32
12123                            + ::buffa::types::string_encoded_len(&self.socket_path)
12124                                as u32;
12125                }
12126                if self.presence.is_set() {
12127                    let __slot = __cache.reserve();
12128                    let inner_size = self.presence.compute_size(__cache);
12129                    __cache.set(__slot, inner_size);
12130                    size
12131                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12132                            + inner_size;
12133                }
12134                if self.access_version != 0u64 {
12135                    size
12136                        += 1u32
12137                            + ::buffa::types::uint64_encoded_len(self.access_version)
12138                                as u32;
12139                }
12140                size += self.__buffa_unknown_fields.encoded_len() as u32;
12141                size
12142            }
12143            #[allow(clippy::needless_borrow)]
12144            fn write_to(
12145                &self,
12146                __cache: &mut ::buffa::SizeCache,
12147                buf: &mut impl ::buffa::bytes::BufMut,
12148            ) {
12149                #[allow(unused_imports)]
12150                use ::buffa::Enumeration as _;
12151                if !self.board_id.is_empty() {
12152                    ::buffa::types::put_string_field(1u32, &self.board_id, buf);
12153                }
12154                if self.access.is_set() {
12155                    ::buffa::types::put_len_delimited_header(
12156                        2u32,
12157                        __cache.consume_next(),
12158                        buf,
12159                    );
12160                    self.access.write_to(__cache, buf);
12161                }
12162                if self.expires_at.is_set() {
12163                    ::buffa::types::put_len_delimited_header(
12164                        3u32,
12165                        __cache.consume_next(),
12166                        buf,
12167                    );
12168                    self.expires_at.write_to(__cache, buf);
12169                }
12170                if !self.token.is_empty() {
12171                    ::buffa::types::put_string_field(4u32, &self.token, buf);
12172                }
12173                if !self.room_id.is_empty() {
12174                    ::buffa::types::put_string_field(5u32, &self.room_id, buf);
12175                }
12176                if !self.connection_id.is_empty() {
12177                    ::buffa::types::put_string_field(6u32, &self.connection_id, buf);
12178                }
12179                if !self.socket_path.is_empty() {
12180                    ::buffa::types::put_string_field(7u32, &self.socket_path, buf);
12181                }
12182                if self.presence.is_set() {
12183                    ::buffa::types::put_len_delimited_header(
12184                        8u32,
12185                        __cache.consume_next(),
12186                        buf,
12187                    );
12188                    self.presence.write_to(__cache, buf);
12189                }
12190                if self.access_version != 0u64 {
12191                    ::buffa::types::put_uint64_field(9u32, self.access_version, buf);
12192                }
12193                self.__buffa_unknown_fields.write_to(buf);
12194            }
12195        }
12196        /// Serializes this view as protobuf JSON.
12197        ///
12198        /// Implicit-presence fields with default values are omitted, `required`
12199        /// fields are always emitted, explicit-presence (`optional`) fields are
12200        /// emitted only when set, bytes fields are base64-encoded, and enum
12201        /// values are their proto name strings.
12202        ///
12203        /// This impl uses `serialize_map(None)` because the number of emitted
12204        /// fields depends on default-omission rules; serializers that require
12205        /// known map lengths (e.g. `bincode`) will return a runtime error.
12206        /// Use the owned message type for those formats.
12207        impl<'__a> ::serde::Serialize for MintJoinTokenResponseView<'__a> {
12208            fn serialize<__S: ::serde::Serializer>(
12209                &self,
12210                __s: __S,
12211            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12212                use ::serde::ser::SerializeMap as _;
12213                let mut __map = __s.serialize_map(::core::option::Option::None)?;
12214                if !::buffa::json_helpers::skip_if::is_empty_str(self.board_id) {
12215                    __map.serialize_entry("boardId", self.board_id)?;
12216                }
12217                {
12218                    if let ::core::option::Option::Some(__v) = self.access.as_option() {
12219                        __map.serialize_entry("access", __v)?;
12220                    }
12221                }
12222                {
12223                    if let ::core::option::Option::Some(__v) = self
12224                        .expires_at
12225                        .as_option()
12226                    {
12227                        __map.serialize_entry("expiresAt", __v)?;
12228                    }
12229                }
12230                if !::buffa::json_helpers::skip_if::is_empty_str(self.token) {
12231                    __map.serialize_entry("token", self.token)?;
12232                }
12233                if !::buffa::json_helpers::skip_if::is_empty_str(self.room_id) {
12234                    __map.serialize_entry("roomId", self.room_id)?;
12235                }
12236                if !::buffa::json_helpers::skip_if::is_empty_str(self.connection_id) {
12237                    __map.serialize_entry("connectionId", self.connection_id)?;
12238                }
12239                if !::buffa::json_helpers::skip_if::is_empty_str(self.socket_path) {
12240                    __map.serialize_entry("socketPath", self.socket_path)?;
12241                }
12242                {
12243                    if let ::core::option::Option::Some(__v) = self.presence.as_option()
12244                    {
12245                        __map.serialize_entry("presence", __v)?;
12246                    }
12247                }
12248                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.access_version) {
12249                    __map
12250                        .serialize_entry(
12251                            "accessVersion",
12252                            &::buffa::json_helpers::ProtoJson(&self.access_version),
12253                        )?;
12254                }
12255                __map.end()
12256            }
12257        }
12258        impl<'a> ::buffa::MessageName for MintJoinTokenResponseView<'a> {
12259            const PACKAGE: &'static str = "collab.v1";
12260            const NAME: &'static str = "MintJoinTokenResponse";
12261            const FULL_NAME: &'static str = "collab.v1.MintJoinTokenResponse";
12262            const TYPE_URL: &'static str = "type.googleapis.com/collab.v1.MintJoinTokenResponse";
12263        }
12264        ::buffa::impl_default_view_instance!(MintJoinTokenResponseView);
12265        ::buffa::impl_view_reborrow!(MintJoinTokenResponseView);
12266        /** Self-contained, `'static` owned view of a `MintJoinTokenResponse` message.
12267
12268 Wraps [`::buffa::OwnedView`]`<`[`MintJoinTokenResponseView`]`<'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.
12269
12270 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`MintJoinTokenResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
12271        #[derive(Clone, Debug)]
12272        pub struct MintJoinTokenResponseOwnedView(
12273            ::buffa::OwnedView<MintJoinTokenResponseView<'static>>,
12274        );
12275        impl MintJoinTokenResponseOwnedView {
12276            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
12277            ///
12278            /// The view borrows directly from the buffer's data; the buffer is
12279            /// retained inside the returned handle.
12280            ///
12281            /// # Errors
12282            ///
12283            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
12284            /// protobuf data.
12285            pub fn decode(
12286                bytes: ::buffa::bytes::Bytes,
12287            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12288                ::core::result::Result::Ok(
12289                    MintJoinTokenResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
12290                )
12291            }
12292            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
12293            /// max message size).
12294            ///
12295            /// # Errors
12296            ///
12297            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
12298            /// exceeds the configured limits.
12299            pub fn decode_with_options(
12300                bytes: ::buffa::bytes::Bytes,
12301                opts: &::buffa::DecodeOptions,
12302            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12303                ::core::result::Result::Ok(
12304                    MintJoinTokenResponseOwnedView(
12305                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12306                    ),
12307                )
12308            }
12309            /// Build from an owned message via an encode → decode round-trip.
12310            ///
12311            /// # Errors
12312            ///
12313            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
12314            /// somehow invalid (should not happen for well-formed messages).
12315            pub fn from_owned(
12316                msg: &super::super::MintJoinTokenResponse,
12317            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12318                ::core::result::Result::Ok(
12319                    MintJoinTokenResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
12320                )
12321            }
12322            /// Borrow the full [`MintJoinTokenResponseView`] with its lifetime tied to `&self`.
12323            #[must_use]
12324            pub fn view(&self) -> &MintJoinTokenResponseView<'_> {
12325                self.0.reborrow()
12326            }
12327            /// Convert to the owned message type.
12328            ///
12329            /// # Errors
12330            ///
12331            /// Returns an error if re-materializing preserved unknown fields
12332            /// fails (e.g. the unknown-field limit is exceeded).
12333            pub fn to_owned_message(
12334                &self,
12335            ) -> ::core::result::Result<
12336                super::super::MintJoinTokenResponse,
12337                ::buffa::DecodeError,
12338            > {
12339                self.0.to_owned_message()
12340            }
12341            /// The underlying bytes buffer.
12342            #[must_use]
12343            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12344                self.0.bytes()
12345            }
12346            /// Consume the handle, returning the underlying bytes buffer.
12347            #[must_use]
12348            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12349                self.0.into_bytes()
12350            }
12351            /// Board identifier as a UUID string.
12352            ///
12353            /// Field 1: `board_id`
12354            #[must_use]
12355            pub fn board_id(&self) -> &'_ str {
12356                self.0.reborrow().board_id
12357            }
12358            /// Resolved caller access for the board.
12359            ///
12360            /// Field 2: `access`
12361            #[must_use]
12362            pub fn access(
12363                &self,
12364            ) -> &::buffa::MessageFieldView<
12365                super::super::__buffa::view::BoardAccessView<'_>,
12366            > {
12367                &self.0.reborrow().access
12368            }
12369            /// Token expiry time in UTC. Join tokens expire 5 minutes after issuance.
12370            ///
12371            /// Field 3: `expires_at`
12372            #[must_use]
12373            pub fn expires_at(
12374                &self,
12375            ) -> &::buffa::MessageFieldView<
12376                ::buffa_types::google::protobuf::__buffa::view::TimestampView<'_>,
12377            > {
12378                &self.0.reborrow().expires_at
12379            }
12380            /// Signed short-lived room admission token.
12381            ///
12382            /// Field 4: `token`
12383            #[must_use]
12384            pub fn token(&self) -> &'_ str {
12385                self.0.reborrow().token
12386            }
12387            /// Room identifier the client should join. This is the board ID.
12388            ///
12389            /// Field 5: `room_id`
12390            #[must_use]
12391            pub fn room_id(&self) -> &'_ str {
12392                self.0.reborrow().room_id
12393            }
12394            /// Unique connection identifier embedded in the token.
12395            ///
12396            /// Field 6: `connection_id`
12397            #[must_use]
12398            pub fn connection_id(&self) -> &'_ str {
12399                self.0.reborrow().connection_id
12400            }
12401            /// Realtime room URL the client should connect to.
12402            ///
12403            /// Field 7: `socket_path`
12404            #[must_use]
12405            pub fn socket_path(&self) -> &'_ str {
12406                self.0.reborrow().socket_path
12407            }
12408            /// Lightweight local presence payload for the caller.
12409            ///
12410            /// Field 8: `presence`
12411            #[must_use]
12412            pub fn presence(
12413                &self,
12414            ) -> &::buffa::MessageFieldView<
12415                super::super::__buffa::view::PresencePayloadView<'_>,
12416            > {
12417                &self.0.reborrow().presence
12418            }
12419            /// Access version embedded in the token; clients must refresh when the board access version changes.
12420            ///
12421            /// Field 9: `access_version`
12422            #[must_use]
12423            pub fn access_version(&self) -> u64 {
12424                self.0.reborrow().access_version
12425            }
12426        }
12427        impl ::core::convert::From<
12428            ::buffa::OwnedView<MintJoinTokenResponseView<'static>>,
12429        > for MintJoinTokenResponseOwnedView {
12430            fn from(
12431                inner: ::buffa::OwnedView<MintJoinTokenResponseView<'static>>,
12432            ) -> Self {
12433                MintJoinTokenResponseOwnedView(inner)
12434            }
12435        }
12436        impl ::core::convert::From<MintJoinTokenResponseOwnedView>
12437        for ::buffa::OwnedView<MintJoinTokenResponseView<'static>> {
12438            fn from(wrapper: MintJoinTokenResponseOwnedView) -> Self {
12439                wrapper.0
12440            }
12441        }
12442        impl ::core::convert::AsRef<
12443            ::buffa::OwnedView<MintJoinTokenResponseView<'static>>,
12444        > for MintJoinTokenResponseOwnedView {
12445            fn as_ref(&self) -> &::buffa::OwnedView<MintJoinTokenResponseView<'static>> {
12446                &self.0
12447            }
12448        }
12449        impl ::buffa::HasMessageView for super::super::MintJoinTokenResponse {
12450            type View<'a> = MintJoinTokenResponseView<'a>;
12451            type ViewHandle = MintJoinTokenResponseOwnedView;
12452        }
12453        impl ::serde::Serialize for MintJoinTokenResponseOwnedView {
12454            fn serialize<__S: ::serde::Serializer>(
12455                &self,
12456                __s: __S,
12457            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12458                ::serde::Serialize::serialize(&self.0, __s)
12459            }
12460        }
12461    }
12462    /// Register this package's `Any` type entries and extension entries.
12463    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
12464        reg.register_json_any(super::__BOARD_ACL_ENTRY_JSON_ANY);
12465        reg.register_json_any(super::__BOARD_PERMISSIONS_JSON_ANY);
12466        reg.register_json_any(super::__BOARD_ACCESS_JSON_ANY);
12467        reg.register_json_any(super::__BOARD_JSON_ANY);
12468        reg.register_json_any(super::__BOARD_LIST_ITEM_JSON_ANY);
12469        reg.register_json_any(super::__PRESENCE_PAYLOAD_JSON_ANY);
12470        reg.register_json_any(super::__CREATE_BOARD_REQUEST_JSON_ANY);
12471        reg.register_json_any(super::__CREATE_BOARD_RESPONSE_JSON_ANY);
12472        reg.register_json_any(super::__GET_BOARD_REQUEST_JSON_ANY);
12473        reg.register_json_any(super::__GET_BOARD_RESPONSE_JSON_ANY);
12474        reg.register_json_any(super::__LIST_BOARDS_REQUEST_JSON_ANY);
12475        reg.register_json_any(super::__LIST_BOARDS_RESPONSE_JSON_ANY);
12476        reg.register_json_any(super::__UPDATE_BOARD_REQUEST_JSON_ANY);
12477        reg.register_json_any(super::__UPDATE_BOARD_RESPONSE_JSON_ANY);
12478        reg.register_json_any(super::__UPDATE_BOARD_ACL_REQUEST_JSON_ANY);
12479        reg.register_json_any(super::__UPDATE_BOARD_ACL_RESPONSE_JSON_ANY);
12480        reg.register_json_any(super::__ARCHIVE_BOARD_REQUEST_JSON_ANY);
12481        reg.register_json_any(super::__ARCHIVE_BOARD_RESPONSE_JSON_ANY);
12482        reg.register_json_any(super::__MINT_JOIN_TOKEN_REQUEST_JSON_ANY);
12483        reg.register_json_any(super::__MINT_JOIN_TOKEN_RESPONSE_JSON_ANY);
12484    }
12485}
12486#[doc(inline)]
12487pub use self::__buffa::view::BoardAclEntryView;
12488#[doc(inline)]
12489pub use self::__buffa::view::BoardAclEntryOwnedView;
12490#[doc(inline)]
12491pub use self::__buffa::view::BoardPermissionsView;
12492#[doc(inline)]
12493pub use self::__buffa::view::BoardPermissionsOwnedView;
12494#[doc(inline)]
12495pub use self::__buffa::view::BoardAccessView;
12496#[doc(inline)]
12497pub use self::__buffa::view::BoardAccessOwnedView;
12498#[doc(inline)]
12499pub use self::__buffa::view::BoardView;
12500#[doc(inline)]
12501pub use self::__buffa::view::BoardOwnedView;
12502#[doc(inline)]
12503pub use self::__buffa::view::BoardListItemView;
12504#[doc(inline)]
12505pub use self::__buffa::view::BoardListItemOwnedView;
12506#[doc(inline)]
12507pub use self::__buffa::view::PresencePayloadView;
12508#[doc(inline)]
12509pub use self::__buffa::view::PresencePayloadOwnedView;
12510#[doc(inline)]
12511pub use self::__buffa::view::CreateBoardRequestView;
12512#[doc(inline)]
12513pub use self::__buffa::view::CreateBoardRequestOwnedView;
12514#[doc(inline)]
12515pub use self::__buffa::view::CreateBoardResponseView;
12516#[doc(inline)]
12517pub use self::__buffa::view::CreateBoardResponseOwnedView;
12518#[doc(inline)]
12519pub use self::__buffa::view::GetBoardRequestView;
12520#[doc(inline)]
12521pub use self::__buffa::view::GetBoardRequestOwnedView;
12522#[doc(inline)]
12523pub use self::__buffa::view::GetBoardResponseView;
12524#[doc(inline)]
12525pub use self::__buffa::view::GetBoardResponseOwnedView;
12526#[doc(inline)]
12527pub use self::__buffa::view::ListBoardsRequestView;
12528#[doc(inline)]
12529pub use self::__buffa::view::ListBoardsRequestOwnedView;
12530#[doc(inline)]
12531pub use self::__buffa::view::ListBoardsResponseView;
12532#[doc(inline)]
12533pub use self::__buffa::view::ListBoardsResponseOwnedView;
12534#[doc(inline)]
12535pub use self::__buffa::view::UpdateBoardRequestView;
12536#[doc(inline)]
12537pub use self::__buffa::view::UpdateBoardRequestOwnedView;
12538#[doc(inline)]
12539pub use self::__buffa::view::UpdateBoardResponseView;
12540#[doc(inline)]
12541pub use self::__buffa::view::UpdateBoardResponseOwnedView;
12542#[doc(inline)]
12543pub use self::__buffa::view::UpdateBoardAclRequestView;
12544#[doc(inline)]
12545pub use self::__buffa::view::UpdateBoardAclRequestOwnedView;
12546#[doc(inline)]
12547pub use self::__buffa::view::UpdateBoardAclResponseView;
12548#[doc(inline)]
12549pub use self::__buffa::view::UpdateBoardAclResponseOwnedView;
12550#[doc(inline)]
12551pub use self::__buffa::view::ArchiveBoardRequestView;
12552#[doc(inline)]
12553pub use self::__buffa::view::ArchiveBoardRequestOwnedView;
12554#[doc(inline)]
12555pub use self::__buffa::view::ArchiveBoardResponseView;
12556#[doc(inline)]
12557pub use self::__buffa::view::ArchiveBoardResponseOwnedView;
12558#[doc(inline)]
12559pub use self::__buffa::view::MintJoinTokenRequestView;
12560#[doc(inline)]
12561pub use self::__buffa::view::MintJoinTokenRequestOwnedView;
12562#[doc(inline)]
12563pub use self::__buffa::view::MintJoinTokenResponseView;
12564#[doc(inline)]
12565pub use self::__buffa::view::MintJoinTokenResponseOwnedView;
12566#[doc(inline)]
12567pub use self::__buffa::register_types;