Skip to main content

polyester/gen/buffa/
chain.lifecycle.v1.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// RequestFeeStatus identifies the current lifecycle state of a request-scoped
4/// on-chain fee snapshot.
5#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
6#[repr(i32)]
7pub enum RequestFeeStatus {
8    REQUEST_FEE_STATUS_UNSPECIFIED = 0i32,
9    /// The request locked a fee snapshot at creation time.
10    REQUEST_FEE_STATUS_LOCKED = 1i32,
11    /// The request completed far enough for the locked fee to settle.
12    REQUEST_FEE_STATUS_SETTLED = 2i32,
13}
14impl RequestFeeStatus {
15    ///Idiomatic alias for [`Self::REQUEST_FEE_STATUS_UNSPECIFIED`]; `Debug` prints the variant name.
16    #[allow(non_upper_case_globals)]
17    pub const Unspecified: Self = Self::REQUEST_FEE_STATUS_UNSPECIFIED;
18    ///Idiomatic alias for [`Self::REQUEST_FEE_STATUS_LOCKED`]; `Debug` prints the variant name.
19    #[allow(non_upper_case_globals)]
20    pub const Locked: Self = Self::REQUEST_FEE_STATUS_LOCKED;
21    ///Idiomatic alias for [`Self::REQUEST_FEE_STATUS_SETTLED`]; `Debug` prints the variant name.
22    #[allow(non_upper_case_globals)]
23    pub const Settled: Self = Self::REQUEST_FEE_STATUS_SETTLED;
24}
25impl ::core::default::Default for RequestFeeStatus {
26    fn default() -> Self {
27        Self::REQUEST_FEE_STATUS_UNSPECIFIED
28    }
29}
30impl ::serde::Serialize for RequestFeeStatus {
31    fn serialize<S: ::serde::Serializer>(
32        &self,
33        s: S,
34    ) -> ::core::result::Result<S::Ok, S::Error> {
35        s.serialize_str(::buffa::Enumeration::proto_name(self))
36    }
37}
38impl<'de> ::serde::Deserialize<'de> for RequestFeeStatus {
39    fn deserialize<D: ::serde::Deserializer<'de>>(
40        d: D,
41    ) -> ::core::result::Result<Self, D::Error> {
42        struct _V;
43        impl ::serde::de::Visitor<'_> for _V {
44            type Value = RequestFeeStatus;
45            fn expecting(
46                &self,
47                f: &mut ::core::fmt::Formatter<'_>,
48            ) -> ::core::fmt::Result {
49                f.write_str(
50                    concat!(
51                        "a string, integer, or null for ", stringify!(RequestFeeStatus)
52                    ),
53                )
54            }
55            fn visit_str<E: ::serde::de::Error>(
56                self,
57                v: &str,
58            ) -> ::core::result::Result<RequestFeeStatus, E> {
59                <RequestFeeStatus as ::buffa::Enumeration>::from_proto_name(v)
60                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
61            }
62            fn visit_i64<E: ::serde::de::Error>(
63                self,
64                v: i64,
65            ) -> ::core::result::Result<RequestFeeStatus, E> {
66                let v32 = i32::try_from(v)
67                    .map_err(|_| {
68                        ::serde::de::Error::custom(
69                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
70                        )
71                    })?;
72                <RequestFeeStatus as ::buffa::Enumeration>::from_i32(v32)
73                    .ok_or_else(|| {
74                        ::serde::de::Error::custom(
75                            ::buffa::alloc::format!("unknown enum value {v32}"),
76                        )
77                    })
78            }
79            fn visit_u64<E: ::serde::de::Error>(
80                self,
81                v: u64,
82            ) -> ::core::result::Result<RequestFeeStatus, E> {
83                let v32 = i32::try_from(v)
84                    .map_err(|_| {
85                        ::serde::de::Error::custom(
86                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
87                        )
88                    })?;
89                <RequestFeeStatus as ::buffa::Enumeration>::from_i32(v32)
90                    .ok_or_else(|| {
91                        ::serde::de::Error::custom(
92                            ::buffa::alloc::format!("unknown enum value {v32}"),
93                        )
94                    })
95            }
96            fn visit_unit<E: ::serde::de::Error>(
97                self,
98            ) -> ::core::result::Result<RequestFeeStatus, E> {
99                ::core::result::Result::Ok(::core::default::Default::default())
100            }
101        }
102        d.deserialize_any(_V)
103    }
104}
105impl ::buffa::json_helpers::ProtoElemJson for RequestFeeStatus {
106    fn serialize_proto_json<S: ::serde::Serializer>(
107        v: &Self,
108        s: S,
109    ) -> ::core::result::Result<S::Ok, S::Error> {
110        ::serde::Serialize::serialize(v, s)
111    }
112    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
113        d: D,
114    ) -> ::core::result::Result<Self, D::Error> {
115        <Self as ::serde::Deserialize>::deserialize(d)
116    }
117}
118impl ::buffa::Enumeration for RequestFeeStatus {
119    fn from_i32(value: i32) -> ::core::option::Option<Self> {
120        match value {
121            0i32 => ::core::option::Option::Some(Self::REQUEST_FEE_STATUS_UNSPECIFIED),
122            1i32 => ::core::option::Option::Some(Self::REQUEST_FEE_STATUS_LOCKED),
123            2i32 => ::core::option::Option::Some(Self::REQUEST_FEE_STATUS_SETTLED),
124            _ => ::core::option::Option::None,
125        }
126    }
127    fn to_i32(&self) -> i32 {
128        *self as i32
129    }
130    fn proto_name(&self) -> &'static str {
131        match self {
132            Self::REQUEST_FEE_STATUS_UNSPECIFIED => "REQUEST_FEE_STATUS_UNSPECIFIED",
133            Self::REQUEST_FEE_STATUS_LOCKED => "REQUEST_FEE_STATUS_LOCKED",
134            Self::REQUEST_FEE_STATUS_SETTLED => "REQUEST_FEE_STATUS_SETTLED",
135        }
136    }
137    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
138        match name {
139            "REQUEST_FEE_STATUS_UNSPECIFIED" => {
140                ::core::option::Option::Some(Self::REQUEST_FEE_STATUS_UNSPECIFIED)
141            }
142            "REQUEST_FEE_STATUS_LOCKED" => {
143                ::core::option::Option::Some(Self::REQUEST_FEE_STATUS_LOCKED)
144            }
145            "REQUEST_FEE_STATUS_SETTLED" => {
146                ::core::option::Option::Some(Self::REQUEST_FEE_STATUS_SETTLED)
147            }
148            _ => ::core::option::Option::None,
149        }
150    }
151    fn values() -> &'static [Self] {
152        &[
153            Self::REQUEST_FEE_STATUS_UNSPECIFIED,
154            Self::REQUEST_FEE_STATUS_LOCKED,
155            Self::REQUEST_FEE_STATUS_SETTLED,
156        ]
157    }
158}
159/// FlowReason is the stable product-facing reason catalog for failed, dropped,
160/// refunded, or otherwise notable lifecycle states.
161#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
162#[repr(i32)]
163pub enum FlowReason {
164    FLOW_REASON_UNSPECIFIED = 0i32,
165    /// Zipper validators reached the rejection quorum.
166    FLOW_REASON_ZIPPER_VALIDATION_REJECTED = 101i32,
167    /// Zipper execution rejected the request.
168    FLOW_REASON_ZIPPER_EXECUTION_REJECTED = 102i32,
169    /// Zipper withdraw execution failed.
170    FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED = 103i32,
171    /// Zipper deposit refund failed.
172    FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED = 104i32,
173    /// Ledger mirror rejected a command before it could be durably applied.
174    FLOW_REASON_LEDGER_MIRROR_REJECTED = 200i32,
175    /// Ledger settlement rejected the mirror command because the source account did
176    /// not have enough credits for the transfer.
177    FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS = 201i32,
178    /// Ledger settlement reported that the transfer already exists for this mirror
179    /// command identity.
180    FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS = 202i32,
181    /// Ledger settlement reported that the pending transfer referenced by the
182    /// command was not found.
183    FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND = 203i32,
184    /// Ledger settlement reported that this transfer id is already marked failed.
185    FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED = 204i32,
186}
187impl FlowReason {
188    ///Idiomatic alias for [`Self::FLOW_REASON_UNSPECIFIED`]; `Debug` prints the variant name.
189    #[allow(non_upper_case_globals)]
190    pub const Unspecified: Self = Self::FLOW_REASON_UNSPECIFIED;
191    ///Idiomatic alias for [`Self::FLOW_REASON_ZIPPER_VALIDATION_REJECTED`]; `Debug` prints the variant name.
192    #[allow(non_upper_case_globals)]
193    pub const ZipperValidationRejected: Self = Self::FLOW_REASON_ZIPPER_VALIDATION_REJECTED;
194    ///Idiomatic alias for [`Self::FLOW_REASON_ZIPPER_EXECUTION_REJECTED`]; `Debug` prints the variant name.
195    #[allow(non_upper_case_globals)]
196    pub const ZipperExecutionRejected: Self = Self::FLOW_REASON_ZIPPER_EXECUTION_REJECTED;
197    ///Idiomatic alias for [`Self::FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED`]; `Debug` prints the variant name.
198    #[allow(non_upper_case_globals)]
199    pub const ZipperWithdrawExecutionFailed: Self = Self::FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED;
200    ///Idiomatic alias for [`Self::FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED`]; `Debug` prints the variant name.
201    #[allow(non_upper_case_globals)]
202    pub const ZipperDepositRefundFailed: Self = Self::FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED;
203    ///Idiomatic alias for [`Self::FLOW_REASON_LEDGER_MIRROR_REJECTED`]; `Debug` prints the variant name.
204    #[allow(non_upper_case_globals)]
205    pub const LedgerMirrorRejected: Self = Self::FLOW_REASON_LEDGER_MIRROR_REJECTED;
206    ///Idiomatic alias for [`Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS`]; `Debug` prints the variant name.
207    #[allow(non_upper_case_globals)]
208    pub const LedgerMirrorTransferExceedsCredits: Self = Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS;
209    ///Idiomatic alias for [`Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS`]; `Debug` prints the variant name.
210    #[allow(non_upper_case_globals)]
211    pub const LedgerMirrorTransferExists: Self = Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS;
212    ///Idiomatic alias for [`Self::FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND`]; `Debug` prints the variant name.
213    #[allow(non_upper_case_globals)]
214    pub const LedgerMirrorPendingTransferNotFound: Self = Self::FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND;
215    ///Idiomatic alias for [`Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED`]; `Debug` prints the variant name.
216    #[allow(non_upper_case_globals)]
217    pub const LedgerMirrorTransferIdAlreadyFailed: Self = Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED;
218}
219impl ::core::default::Default for FlowReason {
220    fn default() -> Self {
221        Self::FLOW_REASON_UNSPECIFIED
222    }
223}
224impl ::serde::Serialize for FlowReason {
225    fn serialize<S: ::serde::Serializer>(
226        &self,
227        s: S,
228    ) -> ::core::result::Result<S::Ok, S::Error> {
229        s.serialize_str(::buffa::Enumeration::proto_name(self))
230    }
231}
232impl<'de> ::serde::Deserialize<'de> for FlowReason {
233    fn deserialize<D: ::serde::Deserializer<'de>>(
234        d: D,
235    ) -> ::core::result::Result<Self, D::Error> {
236        struct _V;
237        impl ::serde::de::Visitor<'_> for _V {
238            type Value = FlowReason;
239            fn expecting(
240                &self,
241                f: &mut ::core::fmt::Formatter<'_>,
242            ) -> ::core::fmt::Result {
243                f.write_str(
244                    concat!("a string, integer, or null for ", stringify!(FlowReason)),
245                )
246            }
247            fn visit_str<E: ::serde::de::Error>(
248                self,
249                v: &str,
250            ) -> ::core::result::Result<FlowReason, E> {
251                <FlowReason as ::buffa::Enumeration>::from_proto_name(v)
252                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
253            }
254            fn visit_i64<E: ::serde::de::Error>(
255                self,
256                v: i64,
257            ) -> ::core::result::Result<FlowReason, E> {
258                let v32 = i32::try_from(v)
259                    .map_err(|_| {
260                        ::serde::de::Error::custom(
261                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
262                        )
263                    })?;
264                <FlowReason as ::buffa::Enumeration>::from_i32(v32)
265                    .ok_or_else(|| {
266                        ::serde::de::Error::custom(
267                            ::buffa::alloc::format!("unknown enum value {v32}"),
268                        )
269                    })
270            }
271            fn visit_u64<E: ::serde::de::Error>(
272                self,
273                v: u64,
274            ) -> ::core::result::Result<FlowReason, E> {
275                let v32 = i32::try_from(v)
276                    .map_err(|_| {
277                        ::serde::de::Error::custom(
278                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
279                        )
280                    })?;
281                <FlowReason as ::buffa::Enumeration>::from_i32(v32)
282                    .ok_or_else(|| {
283                        ::serde::de::Error::custom(
284                            ::buffa::alloc::format!("unknown enum value {v32}"),
285                        )
286                    })
287            }
288            fn visit_unit<E: ::serde::de::Error>(
289                self,
290            ) -> ::core::result::Result<FlowReason, E> {
291                ::core::result::Result::Ok(::core::default::Default::default())
292            }
293        }
294        d.deserialize_any(_V)
295    }
296}
297impl ::buffa::json_helpers::ProtoElemJson for FlowReason {
298    fn serialize_proto_json<S: ::serde::Serializer>(
299        v: &Self,
300        s: S,
301    ) -> ::core::result::Result<S::Ok, S::Error> {
302        ::serde::Serialize::serialize(v, s)
303    }
304    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
305        d: D,
306    ) -> ::core::result::Result<Self, D::Error> {
307        <Self as ::serde::Deserialize>::deserialize(d)
308    }
309}
310impl ::buffa::Enumeration for FlowReason {
311    fn from_i32(value: i32) -> ::core::option::Option<Self> {
312        match value {
313            0i32 => ::core::option::Option::Some(Self::FLOW_REASON_UNSPECIFIED),
314            101i32 => {
315                ::core::option::Option::Some(
316                    Self::FLOW_REASON_ZIPPER_VALIDATION_REJECTED,
317                )
318            }
319            102i32 => {
320                ::core::option::Option::Some(Self::FLOW_REASON_ZIPPER_EXECUTION_REJECTED)
321            }
322            103i32 => {
323                ::core::option::Option::Some(
324                    Self::FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED,
325                )
326            }
327            104i32 => {
328                ::core::option::Option::Some(
329                    Self::FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED,
330                )
331            }
332            200i32 => {
333                ::core::option::Option::Some(Self::FLOW_REASON_LEDGER_MIRROR_REJECTED)
334            }
335            201i32 => {
336                ::core::option::Option::Some(
337                    Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
338                )
339            }
340            202i32 => {
341                ::core::option::Option::Some(
342                    Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS,
343                )
344            }
345            203i32 => {
346                ::core::option::Option::Some(
347                    Self::FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
348                )
349            }
350            204i32 => {
351                ::core::option::Option::Some(
352                    Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
353                )
354            }
355            _ => ::core::option::Option::None,
356        }
357    }
358    fn to_i32(&self) -> i32 {
359        *self as i32
360    }
361    fn proto_name(&self) -> &'static str {
362        match self {
363            Self::FLOW_REASON_UNSPECIFIED => "FLOW_REASON_UNSPECIFIED",
364            Self::FLOW_REASON_ZIPPER_VALIDATION_REJECTED => {
365                "FLOW_REASON_ZIPPER_VALIDATION_REJECTED"
366            }
367            Self::FLOW_REASON_ZIPPER_EXECUTION_REJECTED => {
368                "FLOW_REASON_ZIPPER_EXECUTION_REJECTED"
369            }
370            Self::FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED => {
371                "FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED"
372            }
373            Self::FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED => {
374                "FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED"
375            }
376            Self::FLOW_REASON_LEDGER_MIRROR_REJECTED => {
377                "FLOW_REASON_LEDGER_MIRROR_REJECTED"
378            }
379            Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS => {
380                "FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS"
381            }
382            Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS => {
383                "FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS"
384            }
385            Self::FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND => {
386                "FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND"
387            }
388            Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED => {
389                "FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED"
390            }
391        }
392    }
393    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
394        match name {
395            "FLOW_REASON_UNSPECIFIED" => {
396                ::core::option::Option::Some(Self::FLOW_REASON_UNSPECIFIED)
397            }
398            "FLOW_REASON_ZIPPER_VALIDATION_REJECTED" => {
399                ::core::option::Option::Some(
400                    Self::FLOW_REASON_ZIPPER_VALIDATION_REJECTED,
401                )
402            }
403            "FLOW_REASON_ZIPPER_EXECUTION_REJECTED" => {
404                ::core::option::Option::Some(Self::FLOW_REASON_ZIPPER_EXECUTION_REJECTED)
405            }
406            "FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED" => {
407                ::core::option::Option::Some(
408                    Self::FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED,
409                )
410            }
411            "FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED" => {
412                ::core::option::Option::Some(
413                    Self::FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED,
414                )
415            }
416            "FLOW_REASON_LEDGER_MIRROR_REJECTED" => {
417                ::core::option::Option::Some(Self::FLOW_REASON_LEDGER_MIRROR_REJECTED)
418            }
419            "FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS" => {
420                ::core::option::Option::Some(
421                    Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
422                )
423            }
424            "FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS" => {
425                ::core::option::Option::Some(
426                    Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS,
427                )
428            }
429            "FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND" => {
430                ::core::option::Option::Some(
431                    Self::FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
432                )
433            }
434            "FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED" => {
435                ::core::option::Option::Some(
436                    Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
437                )
438            }
439            _ => ::core::option::Option::None,
440        }
441    }
442    fn values() -> &'static [Self] {
443        &[
444            Self::FLOW_REASON_UNSPECIFIED,
445            Self::FLOW_REASON_ZIPPER_VALIDATION_REJECTED,
446            Self::FLOW_REASON_ZIPPER_EXECUTION_REJECTED,
447            Self::FLOW_REASON_ZIPPER_WITHDRAW_EXECUTION_FAILED,
448            Self::FLOW_REASON_ZIPPER_DEPOSIT_REFUND_FAILED,
449            Self::FLOW_REASON_LEDGER_MIRROR_REJECTED,
450            Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
451            Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_EXISTS,
452            Self::FLOW_REASON_LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
453            Self::FLOW_REASON_LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
454        ]
455    }
456}
457/// FlowKind identifies the product flow family.
458#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
459#[repr(i32)]
460pub enum FlowKind {
461    KIND_UNSPECIFIED = 0i32,
462    /// Deposit flow into Polyester-controlled assets or accounts.
463    KIND_DEPOSIT = 1i32,
464    /// Withdraw flow out of Polyester-controlled assets or accounts.
465    KIND_WITHDRAW = 2i32,
466    /// Internal transfer flow between Polyester-controlled accounts.
467    KIND_TRANSFER = 3i32,
468}
469impl FlowKind {
470    ///Idiomatic alias for [`Self::KIND_UNSPECIFIED`]; `Debug` prints the variant name.
471    #[allow(non_upper_case_globals)]
472    pub const KindUnspecified: Self = Self::KIND_UNSPECIFIED;
473    ///Idiomatic alias for [`Self::KIND_DEPOSIT`]; `Debug` prints the variant name.
474    #[allow(non_upper_case_globals)]
475    pub const KindDeposit: Self = Self::KIND_DEPOSIT;
476    ///Idiomatic alias for [`Self::KIND_WITHDRAW`]; `Debug` prints the variant name.
477    #[allow(non_upper_case_globals)]
478    pub const KindWithdraw: Self = Self::KIND_WITHDRAW;
479    ///Idiomatic alias for [`Self::KIND_TRANSFER`]; `Debug` prints the variant name.
480    #[allow(non_upper_case_globals)]
481    pub const KindTransfer: Self = Self::KIND_TRANSFER;
482}
483impl ::core::default::Default for FlowKind {
484    fn default() -> Self {
485        Self::KIND_UNSPECIFIED
486    }
487}
488impl ::serde::Serialize for FlowKind {
489    fn serialize<S: ::serde::Serializer>(
490        &self,
491        s: S,
492    ) -> ::core::result::Result<S::Ok, S::Error> {
493        s.serialize_str(::buffa::Enumeration::proto_name(self))
494    }
495}
496impl<'de> ::serde::Deserialize<'de> for FlowKind {
497    fn deserialize<D: ::serde::Deserializer<'de>>(
498        d: D,
499    ) -> ::core::result::Result<Self, D::Error> {
500        struct _V;
501        impl ::serde::de::Visitor<'_> for _V {
502            type Value = FlowKind;
503            fn expecting(
504                &self,
505                f: &mut ::core::fmt::Formatter<'_>,
506            ) -> ::core::fmt::Result {
507                f.write_str(
508                    concat!("a string, integer, or null for ", stringify!(FlowKind)),
509                )
510            }
511            fn visit_str<E: ::serde::de::Error>(
512                self,
513                v: &str,
514            ) -> ::core::result::Result<FlowKind, E> {
515                <FlowKind as ::buffa::Enumeration>::from_proto_name(v)
516                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
517            }
518            fn visit_i64<E: ::serde::de::Error>(
519                self,
520                v: i64,
521            ) -> ::core::result::Result<FlowKind, E> {
522                let v32 = i32::try_from(v)
523                    .map_err(|_| {
524                        ::serde::de::Error::custom(
525                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
526                        )
527                    })?;
528                <FlowKind as ::buffa::Enumeration>::from_i32(v32)
529                    .ok_or_else(|| {
530                        ::serde::de::Error::custom(
531                            ::buffa::alloc::format!("unknown enum value {v32}"),
532                        )
533                    })
534            }
535            fn visit_u64<E: ::serde::de::Error>(
536                self,
537                v: u64,
538            ) -> ::core::result::Result<FlowKind, E> {
539                let v32 = i32::try_from(v)
540                    .map_err(|_| {
541                        ::serde::de::Error::custom(
542                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
543                        )
544                    })?;
545                <FlowKind as ::buffa::Enumeration>::from_i32(v32)
546                    .ok_or_else(|| {
547                        ::serde::de::Error::custom(
548                            ::buffa::alloc::format!("unknown enum value {v32}"),
549                        )
550                    })
551            }
552            fn visit_unit<E: ::serde::de::Error>(
553                self,
554            ) -> ::core::result::Result<FlowKind, E> {
555                ::core::result::Result::Ok(::core::default::Default::default())
556            }
557        }
558        d.deserialize_any(_V)
559    }
560}
561impl ::buffa::json_helpers::ProtoElemJson for FlowKind {
562    fn serialize_proto_json<S: ::serde::Serializer>(
563        v: &Self,
564        s: S,
565    ) -> ::core::result::Result<S::Ok, S::Error> {
566        ::serde::Serialize::serialize(v, s)
567    }
568    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
569        d: D,
570    ) -> ::core::result::Result<Self, D::Error> {
571        <Self as ::serde::Deserialize>::deserialize(d)
572    }
573}
574impl ::buffa::Enumeration for FlowKind {
575    fn from_i32(value: i32) -> ::core::option::Option<Self> {
576        match value {
577            0i32 => ::core::option::Option::Some(Self::KIND_UNSPECIFIED),
578            1i32 => ::core::option::Option::Some(Self::KIND_DEPOSIT),
579            2i32 => ::core::option::Option::Some(Self::KIND_WITHDRAW),
580            3i32 => ::core::option::Option::Some(Self::KIND_TRANSFER),
581            _ => ::core::option::Option::None,
582        }
583    }
584    fn to_i32(&self) -> i32 {
585        *self as i32
586    }
587    fn proto_name(&self) -> &'static str {
588        match self {
589            Self::KIND_UNSPECIFIED => "KIND_UNSPECIFIED",
590            Self::KIND_DEPOSIT => "KIND_DEPOSIT",
591            Self::KIND_WITHDRAW => "KIND_WITHDRAW",
592            Self::KIND_TRANSFER => "KIND_TRANSFER",
593        }
594    }
595    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
596        match name {
597            "KIND_UNSPECIFIED" => ::core::option::Option::Some(Self::KIND_UNSPECIFIED),
598            "KIND_DEPOSIT" => ::core::option::Option::Some(Self::KIND_DEPOSIT),
599            "KIND_WITHDRAW" => ::core::option::Option::Some(Self::KIND_WITHDRAW),
600            "KIND_TRANSFER" => ::core::option::Option::Some(Self::KIND_TRANSFER),
601            _ => ::core::option::Option::None,
602        }
603    }
604    fn values() -> &'static [Self] {
605        &[
606            Self::KIND_UNSPECIFIED,
607            Self::KIND_DEPOSIT,
608            Self::KIND_WITHDRAW,
609            Self::KIND_TRANSFER,
610        ]
611    }
612}
613/// FlowDomain identifies the product domain that currently owns or processes the
614/// value represented by the lifecycle.
615#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
616#[repr(i32)]
617pub enum FlowDomain {
618    DOMAIN_UNSPECIFIED = 0i32,
619    /// Value still belongs to an external chain outside Polyester.
620    DOMAIN_EXTERNAL_CHAIN = 1i32,
621    /// Value is inside the Zipper layer on Polyester Chain.
622    DOMAIN_ZIPPER = 2i32,
623    /// Value is inside FundingAccount.
624    DOMAIN_FUNDING = 3i32,
625    /// Value is inside TradingGateway or the trading domain.
626    DOMAIN_TRADING = 4i32,
627    /// Value is inside the lending domain or pool.
628    DOMAIN_LENDING = 5i32,
629}
630impl FlowDomain {
631    ///Idiomatic alias for [`Self::DOMAIN_UNSPECIFIED`]; `Debug` prints the variant name.
632    #[allow(non_upper_case_globals)]
633    pub const DomainUnspecified: Self = Self::DOMAIN_UNSPECIFIED;
634    ///Idiomatic alias for [`Self::DOMAIN_EXTERNAL_CHAIN`]; `Debug` prints the variant name.
635    #[allow(non_upper_case_globals)]
636    pub const DomainExternalChain: Self = Self::DOMAIN_EXTERNAL_CHAIN;
637    ///Idiomatic alias for [`Self::DOMAIN_ZIPPER`]; `Debug` prints the variant name.
638    #[allow(non_upper_case_globals)]
639    pub const DomainZipper: Self = Self::DOMAIN_ZIPPER;
640    ///Idiomatic alias for [`Self::DOMAIN_FUNDING`]; `Debug` prints the variant name.
641    #[allow(non_upper_case_globals)]
642    pub const DomainFunding: Self = Self::DOMAIN_FUNDING;
643    ///Idiomatic alias for [`Self::DOMAIN_TRADING`]; `Debug` prints the variant name.
644    #[allow(non_upper_case_globals)]
645    pub const DomainTrading: Self = Self::DOMAIN_TRADING;
646    ///Idiomatic alias for [`Self::DOMAIN_LENDING`]; `Debug` prints the variant name.
647    #[allow(non_upper_case_globals)]
648    pub const DomainLending: Self = Self::DOMAIN_LENDING;
649}
650impl ::core::default::Default for FlowDomain {
651    fn default() -> Self {
652        Self::DOMAIN_UNSPECIFIED
653    }
654}
655impl ::serde::Serialize for FlowDomain {
656    fn serialize<S: ::serde::Serializer>(
657        &self,
658        s: S,
659    ) -> ::core::result::Result<S::Ok, S::Error> {
660        s.serialize_str(::buffa::Enumeration::proto_name(self))
661    }
662}
663impl<'de> ::serde::Deserialize<'de> for FlowDomain {
664    fn deserialize<D: ::serde::Deserializer<'de>>(
665        d: D,
666    ) -> ::core::result::Result<Self, D::Error> {
667        struct _V;
668        impl ::serde::de::Visitor<'_> for _V {
669            type Value = FlowDomain;
670            fn expecting(
671                &self,
672                f: &mut ::core::fmt::Formatter<'_>,
673            ) -> ::core::fmt::Result {
674                f.write_str(
675                    concat!("a string, integer, or null for ", stringify!(FlowDomain)),
676                )
677            }
678            fn visit_str<E: ::serde::de::Error>(
679                self,
680                v: &str,
681            ) -> ::core::result::Result<FlowDomain, E> {
682                <FlowDomain as ::buffa::Enumeration>::from_proto_name(v)
683                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
684            }
685            fn visit_i64<E: ::serde::de::Error>(
686                self,
687                v: i64,
688            ) -> ::core::result::Result<FlowDomain, E> {
689                let v32 = i32::try_from(v)
690                    .map_err(|_| {
691                        ::serde::de::Error::custom(
692                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
693                        )
694                    })?;
695                <FlowDomain as ::buffa::Enumeration>::from_i32(v32)
696                    .ok_or_else(|| {
697                        ::serde::de::Error::custom(
698                            ::buffa::alloc::format!("unknown enum value {v32}"),
699                        )
700                    })
701            }
702            fn visit_u64<E: ::serde::de::Error>(
703                self,
704                v: u64,
705            ) -> ::core::result::Result<FlowDomain, E> {
706                let v32 = i32::try_from(v)
707                    .map_err(|_| {
708                        ::serde::de::Error::custom(
709                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
710                        )
711                    })?;
712                <FlowDomain as ::buffa::Enumeration>::from_i32(v32)
713                    .ok_or_else(|| {
714                        ::serde::de::Error::custom(
715                            ::buffa::alloc::format!("unknown enum value {v32}"),
716                        )
717                    })
718            }
719            fn visit_unit<E: ::serde::de::Error>(
720                self,
721            ) -> ::core::result::Result<FlowDomain, E> {
722                ::core::result::Result::Ok(::core::default::Default::default())
723            }
724        }
725        d.deserialize_any(_V)
726    }
727}
728impl ::buffa::json_helpers::ProtoElemJson for FlowDomain {
729    fn serialize_proto_json<S: ::serde::Serializer>(
730        v: &Self,
731        s: S,
732    ) -> ::core::result::Result<S::Ok, S::Error> {
733        ::serde::Serialize::serialize(v, s)
734    }
735    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
736        d: D,
737    ) -> ::core::result::Result<Self, D::Error> {
738        <Self as ::serde::Deserialize>::deserialize(d)
739    }
740}
741impl ::buffa::Enumeration for FlowDomain {
742    fn from_i32(value: i32) -> ::core::option::Option<Self> {
743        match value {
744            0i32 => ::core::option::Option::Some(Self::DOMAIN_UNSPECIFIED),
745            1i32 => ::core::option::Option::Some(Self::DOMAIN_EXTERNAL_CHAIN),
746            2i32 => ::core::option::Option::Some(Self::DOMAIN_ZIPPER),
747            3i32 => ::core::option::Option::Some(Self::DOMAIN_FUNDING),
748            4i32 => ::core::option::Option::Some(Self::DOMAIN_TRADING),
749            5i32 => ::core::option::Option::Some(Self::DOMAIN_LENDING),
750            _ => ::core::option::Option::None,
751        }
752    }
753    fn to_i32(&self) -> i32 {
754        *self as i32
755    }
756    fn proto_name(&self) -> &'static str {
757        match self {
758            Self::DOMAIN_UNSPECIFIED => "DOMAIN_UNSPECIFIED",
759            Self::DOMAIN_EXTERNAL_CHAIN => "DOMAIN_EXTERNAL_CHAIN",
760            Self::DOMAIN_ZIPPER => "DOMAIN_ZIPPER",
761            Self::DOMAIN_FUNDING => "DOMAIN_FUNDING",
762            Self::DOMAIN_TRADING => "DOMAIN_TRADING",
763            Self::DOMAIN_LENDING => "DOMAIN_LENDING",
764        }
765    }
766    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
767        match name {
768            "DOMAIN_UNSPECIFIED" => {
769                ::core::option::Option::Some(Self::DOMAIN_UNSPECIFIED)
770            }
771            "DOMAIN_EXTERNAL_CHAIN" => {
772                ::core::option::Option::Some(Self::DOMAIN_EXTERNAL_CHAIN)
773            }
774            "DOMAIN_ZIPPER" => ::core::option::Option::Some(Self::DOMAIN_ZIPPER),
775            "DOMAIN_FUNDING" => ::core::option::Option::Some(Self::DOMAIN_FUNDING),
776            "DOMAIN_TRADING" => ::core::option::Option::Some(Self::DOMAIN_TRADING),
777            "DOMAIN_LENDING" => ::core::option::Option::Some(Self::DOMAIN_LENDING),
778            _ => ::core::option::Option::None,
779        }
780    }
781    fn values() -> &'static [Self] {
782        &[
783            Self::DOMAIN_UNSPECIFIED,
784            Self::DOMAIN_EXTERNAL_CHAIN,
785            Self::DOMAIN_ZIPPER,
786            Self::DOMAIN_FUNDING,
787            Self::DOMAIN_TRADING,
788            Self::DOMAIN_LENDING,
789        ]
790    }
791}
792/// LifecycleSource identifies the subsystem that emitted a normalized fact or
793/// visible milestone.
794#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
795#[repr(i32)]
796pub enum LifecycleSource {
797    SOURCE_UNSPECIFIED = 0i32,
798    /// Off-chain relayer or source-chain watcher.
799    SOURCE_RELAYER = 1i32,
800    /// Polyester Chain contract event or other chain-owned lifecycle fact.
801    SOURCE_POLYESTER_CHAIN = 2i32,
802    /// Executor-owned lifecycle fact.
803    SOURCE_EXECUTOR = 3i32,
804    /// Off-chain ledger posting or settlement fact.
805    SOURCE_LEDGER = 4i32,
806}
807impl LifecycleSource {
808    ///Idiomatic alias for [`Self::SOURCE_UNSPECIFIED`]; `Debug` prints the variant name.
809    #[allow(non_upper_case_globals)]
810    pub const SourceUnspecified: Self = Self::SOURCE_UNSPECIFIED;
811    ///Idiomatic alias for [`Self::SOURCE_RELAYER`]; `Debug` prints the variant name.
812    #[allow(non_upper_case_globals)]
813    pub const SourceRelayer: Self = Self::SOURCE_RELAYER;
814    ///Idiomatic alias for [`Self::SOURCE_POLYESTER_CHAIN`]; `Debug` prints the variant name.
815    #[allow(non_upper_case_globals)]
816    pub const SourcePolyesterChain: Self = Self::SOURCE_POLYESTER_CHAIN;
817    ///Idiomatic alias for [`Self::SOURCE_EXECUTOR`]; `Debug` prints the variant name.
818    #[allow(non_upper_case_globals)]
819    pub const SourceExecutor: Self = Self::SOURCE_EXECUTOR;
820    ///Idiomatic alias for [`Self::SOURCE_LEDGER`]; `Debug` prints the variant name.
821    #[allow(non_upper_case_globals)]
822    pub const SourceLedger: Self = Self::SOURCE_LEDGER;
823}
824impl ::core::default::Default for LifecycleSource {
825    fn default() -> Self {
826        Self::SOURCE_UNSPECIFIED
827    }
828}
829impl ::serde::Serialize for LifecycleSource {
830    fn serialize<S: ::serde::Serializer>(
831        &self,
832        s: S,
833    ) -> ::core::result::Result<S::Ok, S::Error> {
834        s.serialize_str(::buffa::Enumeration::proto_name(self))
835    }
836}
837impl<'de> ::serde::Deserialize<'de> for LifecycleSource {
838    fn deserialize<D: ::serde::Deserializer<'de>>(
839        d: D,
840    ) -> ::core::result::Result<Self, D::Error> {
841        struct _V;
842        impl ::serde::de::Visitor<'_> for _V {
843            type Value = LifecycleSource;
844            fn expecting(
845                &self,
846                f: &mut ::core::fmt::Formatter<'_>,
847            ) -> ::core::fmt::Result {
848                f.write_str(
849                    concat!(
850                        "a string, integer, or null for ", stringify!(LifecycleSource)
851                    ),
852                )
853            }
854            fn visit_str<E: ::serde::de::Error>(
855                self,
856                v: &str,
857            ) -> ::core::result::Result<LifecycleSource, E> {
858                <LifecycleSource as ::buffa::Enumeration>::from_proto_name(v)
859                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
860            }
861            fn visit_i64<E: ::serde::de::Error>(
862                self,
863                v: i64,
864            ) -> ::core::result::Result<LifecycleSource, E> {
865                let v32 = i32::try_from(v)
866                    .map_err(|_| {
867                        ::serde::de::Error::custom(
868                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
869                        )
870                    })?;
871                <LifecycleSource as ::buffa::Enumeration>::from_i32(v32)
872                    .ok_or_else(|| {
873                        ::serde::de::Error::custom(
874                            ::buffa::alloc::format!("unknown enum value {v32}"),
875                        )
876                    })
877            }
878            fn visit_u64<E: ::serde::de::Error>(
879                self,
880                v: u64,
881            ) -> ::core::result::Result<LifecycleSource, E> {
882                let v32 = i32::try_from(v)
883                    .map_err(|_| {
884                        ::serde::de::Error::custom(
885                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
886                        )
887                    })?;
888                <LifecycleSource as ::buffa::Enumeration>::from_i32(v32)
889                    .ok_or_else(|| {
890                        ::serde::de::Error::custom(
891                            ::buffa::alloc::format!("unknown enum value {v32}"),
892                        )
893                    })
894            }
895            fn visit_unit<E: ::serde::de::Error>(
896                self,
897            ) -> ::core::result::Result<LifecycleSource, E> {
898                ::core::result::Result::Ok(::core::default::Default::default())
899            }
900        }
901        d.deserialize_any(_V)
902    }
903}
904impl ::buffa::json_helpers::ProtoElemJson for LifecycleSource {
905    fn serialize_proto_json<S: ::serde::Serializer>(
906        v: &Self,
907        s: S,
908    ) -> ::core::result::Result<S::Ok, S::Error> {
909        ::serde::Serialize::serialize(v, s)
910    }
911    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
912        d: D,
913    ) -> ::core::result::Result<Self, D::Error> {
914        <Self as ::serde::Deserialize>::deserialize(d)
915    }
916}
917impl ::buffa::Enumeration for LifecycleSource {
918    fn from_i32(value: i32) -> ::core::option::Option<Self> {
919        match value {
920            0i32 => ::core::option::Option::Some(Self::SOURCE_UNSPECIFIED),
921            1i32 => ::core::option::Option::Some(Self::SOURCE_RELAYER),
922            2i32 => ::core::option::Option::Some(Self::SOURCE_POLYESTER_CHAIN),
923            3i32 => ::core::option::Option::Some(Self::SOURCE_EXECUTOR),
924            4i32 => ::core::option::Option::Some(Self::SOURCE_LEDGER),
925            _ => ::core::option::Option::None,
926        }
927    }
928    fn to_i32(&self) -> i32 {
929        *self as i32
930    }
931    fn proto_name(&self) -> &'static str {
932        match self {
933            Self::SOURCE_UNSPECIFIED => "SOURCE_UNSPECIFIED",
934            Self::SOURCE_RELAYER => "SOURCE_RELAYER",
935            Self::SOURCE_POLYESTER_CHAIN => "SOURCE_POLYESTER_CHAIN",
936            Self::SOURCE_EXECUTOR => "SOURCE_EXECUTOR",
937            Self::SOURCE_LEDGER => "SOURCE_LEDGER",
938        }
939    }
940    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
941        match name {
942            "SOURCE_UNSPECIFIED" => {
943                ::core::option::Option::Some(Self::SOURCE_UNSPECIFIED)
944            }
945            "SOURCE_RELAYER" => ::core::option::Option::Some(Self::SOURCE_RELAYER),
946            "SOURCE_POLYESTER_CHAIN" => {
947                ::core::option::Option::Some(Self::SOURCE_POLYESTER_CHAIN)
948            }
949            "SOURCE_EXECUTOR" => ::core::option::Option::Some(Self::SOURCE_EXECUTOR),
950            "SOURCE_LEDGER" => ::core::option::Option::Some(Self::SOURCE_LEDGER),
951            _ => ::core::option::Option::None,
952        }
953    }
954    fn values() -> &'static [Self] {
955        &[
956            Self::SOURCE_UNSPECIFIED,
957            Self::SOURCE_RELAYER,
958            Self::SOURCE_POLYESTER_CHAIN,
959            Self::SOURCE_EXECUTOR,
960            Self::SOURCE_LEDGER,
961        ]
962    }
963}
964/// FlowState is the latest lifecycle state after folding normalized facts.
965#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
966#[repr(i32)]
967pub enum FlowState {
968    STATE_UNSPECIFIED = 0i32,
969    /// Flow exists and is still waiting on source-chain progress.
970    STATE_PENDING_SOURCE = 1i32,
971    /// Flow is now progressing on Polyester Chain after source readiness.
972    STATE_PENDING_POLYESTER_CHAIN = 2i32,
973    /// Flow is now waiting for an off-chain ledger effect or settlement effect.
974    STATE_PENDING_LEDGER = 3i32,
975    /// Flow completed successfully.
976    STATE_COMPLETED = 4i32,
977    /// Flow failed and is no longer progressing.
978    STATE_FAILED = 5i32,
979    /// Flow was dropped before successful completion.
980    STATE_DROPPED = 6i32,
981    /// Flow ended in a refund or reversal.
982    STATE_REFUNDED = 7i32,
983}
984impl FlowState {
985    ///Idiomatic alias for [`Self::STATE_UNSPECIFIED`]; `Debug` prints the variant name.
986    #[allow(non_upper_case_globals)]
987    pub const StateUnspecified: Self = Self::STATE_UNSPECIFIED;
988    ///Idiomatic alias for [`Self::STATE_PENDING_SOURCE`]; `Debug` prints the variant name.
989    #[allow(non_upper_case_globals)]
990    pub const StatePendingSource: Self = Self::STATE_PENDING_SOURCE;
991    ///Idiomatic alias for [`Self::STATE_PENDING_POLYESTER_CHAIN`]; `Debug` prints the variant name.
992    #[allow(non_upper_case_globals)]
993    pub const StatePendingPolyesterChain: Self = Self::STATE_PENDING_POLYESTER_CHAIN;
994    ///Idiomatic alias for [`Self::STATE_PENDING_LEDGER`]; `Debug` prints the variant name.
995    #[allow(non_upper_case_globals)]
996    pub const StatePendingLedger: Self = Self::STATE_PENDING_LEDGER;
997    ///Idiomatic alias for [`Self::STATE_COMPLETED`]; `Debug` prints the variant name.
998    #[allow(non_upper_case_globals)]
999    pub const StateCompleted: Self = Self::STATE_COMPLETED;
1000    ///Idiomatic alias for [`Self::STATE_FAILED`]; `Debug` prints the variant name.
1001    #[allow(non_upper_case_globals)]
1002    pub const StateFailed: Self = Self::STATE_FAILED;
1003    ///Idiomatic alias for [`Self::STATE_DROPPED`]; `Debug` prints the variant name.
1004    #[allow(non_upper_case_globals)]
1005    pub const StateDropped: Self = Self::STATE_DROPPED;
1006    ///Idiomatic alias for [`Self::STATE_REFUNDED`]; `Debug` prints the variant name.
1007    #[allow(non_upper_case_globals)]
1008    pub const StateRefunded: Self = Self::STATE_REFUNDED;
1009}
1010impl ::core::default::Default for FlowState {
1011    fn default() -> Self {
1012        Self::STATE_UNSPECIFIED
1013    }
1014}
1015impl ::serde::Serialize for FlowState {
1016    fn serialize<S: ::serde::Serializer>(
1017        &self,
1018        s: S,
1019    ) -> ::core::result::Result<S::Ok, S::Error> {
1020        s.serialize_str(::buffa::Enumeration::proto_name(self))
1021    }
1022}
1023impl<'de> ::serde::Deserialize<'de> for FlowState {
1024    fn deserialize<D: ::serde::Deserializer<'de>>(
1025        d: D,
1026    ) -> ::core::result::Result<Self, D::Error> {
1027        struct _V;
1028        impl ::serde::de::Visitor<'_> for _V {
1029            type Value = FlowState;
1030            fn expecting(
1031                &self,
1032                f: &mut ::core::fmt::Formatter<'_>,
1033            ) -> ::core::fmt::Result {
1034                f.write_str(
1035                    concat!("a string, integer, or null for ", stringify!(FlowState)),
1036                )
1037            }
1038            fn visit_str<E: ::serde::de::Error>(
1039                self,
1040                v: &str,
1041            ) -> ::core::result::Result<FlowState, E> {
1042                <FlowState as ::buffa::Enumeration>::from_proto_name(v)
1043                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1044            }
1045            fn visit_i64<E: ::serde::de::Error>(
1046                self,
1047                v: i64,
1048            ) -> ::core::result::Result<FlowState, E> {
1049                let v32 = i32::try_from(v)
1050                    .map_err(|_| {
1051                        ::serde::de::Error::custom(
1052                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1053                        )
1054                    })?;
1055                <FlowState as ::buffa::Enumeration>::from_i32(v32)
1056                    .ok_or_else(|| {
1057                        ::serde::de::Error::custom(
1058                            ::buffa::alloc::format!("unknown enum value {v32}"),
1059                        )
1060                    })
1061            }
1062            fn visit_u64<E: ::serde::de::Error>(
1063                self,
1064                v: u64,
1065            ) -> ::core::result::Result<FlowState, E> {
1066                let v32 = i32::try_from(v)
1067                    .map_err(|_| {
1068                        ::serde::de::Error::custom(
1069                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1070                        )
1071                    })?;
1072                <FlowState as ::buffa::Enumeration>::from_i32(v32)
1073                    .ok_or_else(|| {
1074                        ::serde::de::Error::custom(
1075                            ::buffa::alloc::format!("unknown enum value {v32}"),
1076                        )
1077                    })
1078            }
1079            fn visit_unit<E: ::serde::de::Error>(
1080                self,
1081            ) -> ::core::result::Result<FlowState, E> {
1082                ::core::result::Result::Ok(::core::default::Default::default())
1083            }
1084        }
1085        d.deserialize_any(_V)
1086    }
1087}
1088impl ::buffa::json_helpers::ProtoElemJson for FlowState {
1089    fn serialize_proto_json<S: ::serde::Serializer>(
1090        v: &Self,
1091        s: S,
1092    ) -> ::core::result::Result<S::Ok, S::Error> {
1093        ::serde::Serialize::serialize(v, s)
1094    }
1095    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1096        d: D,
1097    ) -> ::core::result::Result<Self, D::Error> {
1098        <Self as ::serde::Deserialize>::deserialize(d)
1099    }
1100}
1101impl ::buffa::Enumeration for FlowState {
1102    fn from_i32(value: i32) -> ::core::option::Option<Self> {
1103        match value {
1104            0i32 => ::core::option::Option::Some(Self::STATE_UNSPECIFIED),
1105            1i32 => ::core::option::Option::Some(Self::STATE_PENDING_SOURCE),
1106            2i32 => ::core::option::Option::Some(Self::STATE_PENDING_POLYESTER_CHAIN),
1107            3i32 => ::core::option::Option::Some(Self::STATE_PENDING_LEDGER),
1108            4i32 => ::core::option::Option::Some(Self::STATE_COMPLETED),
1109            5i32 => ::core::option::Option::Some(Self::STATE_FAILED),
1110            6i32 => ::core::option::Option::Some(Self::STATE_DROPPED),
1111            7i32 => ::core::option::Option::Some(Self::STATE_REFUNDED),
1112            _ => ::core::option::Option::None,
1113        }
1114    }
1115    fn to_i32(&self) -> i32 {
1116        *self as i32
1117    }
1118    fn proto_name(&self) -> &'static str {
1119        match self {
1120            Self::STATE_UNSPECIFIED => "STATE_UNSPECIFIED",
1121            Self::STATE_PENDING_SOURCE => "STATE_PENDING_SOURCE",
1122            Self::STATE_PENDING_POLYESTER_CHAIN => "STATE_PENDING_POLYESTER_CHAIN",
1123            Self::STATE_PENDING_LEDGER => "STATE_PENDING_LEDGER",
1124            Self::STATE_COMPLETED => "STATE_COMPLETED",
1125            Self::STATE_FAILED => "STATE_FAILED",
1126            Self::STATE_DROPPED => "STATE_DROPPED",
1127            Self::STATE_REFUNDED => "STATE_REFUNDED",
1128        }
1129    }
1130    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1131        match name {
1132            "STATE_UNSPECIFIED" => ::core::option::Option::Some(Self::STATE_UNSPECIFIED),
1133            "STATE_PENDING_SOURCE" => {
1134                ::core::option::Option::Some(Self::STATE_PENDING_SOURCE)
1135            }
1136            "STATE_PENDING_POLYESTER_CHAIN" => {
1137                ::core::option::Option::Some(Self::STATE_PENDING_POLYESTER_CHAIN)
1138            }
1139            "STATE_PENDING_LEDGER" => {
1140                ::core::option::Option::Some(Self::STATE_PENDING_LEDGER)
1141            }
1142            "STATE_COMPLETED" => ::core::option::Option::Some(Self::STATE_COMPLETED),
1143            "STATE_FAILED" => ::core::option::Option::Some(Self::STATE_FAILED),
1144            "STATE_DROPPED" => ::core::option::Option::Some(Self::STATE_DROPPED),
1145            "STATE_REFUNDED" => ::core::option::Option::Some(Self::STATE_REFUNDED),
1146            _ => ::core::option::Option::None,
1147        }
1148    }
1149    fn values() -> &'static [Self] {
1150        &[
1151            Self::STATE_UNSPECIFIED,
1152            Self::STATE_PENDING_SOURCE,
1153            Self::STATE_PENDING_POLYESTER_CHAIN,
1154            Self::STATE_PENDING_LEDGER,
1155            Self::STATE_COMPLETED,
1156            Self::STATE_FAILED,
1157            Self::STATE_DROPPED,
1158            Self::STATE_REFUNDED,
1159        ]
1160    }
1161}
1162/// AssetIds identifies the asset roles involved in one lifecycle.
1163#[derive(Clone, PartialEq, Default)]
1164#[derive(::serde::Serialize, ::serde::Deserialize)]
1165#[serde(default)]
1166pub struct AssetIds {
1167    /// Zipped asset identifier for the chain-specific asset mapping row. This is
1168    /// the canonical id from `chain_zipped_assets`, which already represents the
1169    /// source-chain asset metadata plus its mapped zToken relationship when
1170    /// relevant.
1171    ///
1172    /// Field 1: `zipped_asset_id`
1173    #[serde(
1174        rename = "zippedAssetId",
1175        alias = "zipped_asset_id",
1176        with = "::buffa::json_helpers::uint32",
1177        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
1178    )]
1179    pub zipped_asset_id: u32,
1180    /// Unified asset identifier for the uAsset used by funding or trading flows
1181    /// when relevant. This is the canonical Polyester asset identity used by
1182    /// FundingAccount, TradingGateway, Lending, and other downstream product
1183    /// domains.
1184    ///
1185    /// Field 3: `unified_asset_id`
1186    #[serde(
1187        rename = "unifiedAssetId",
1188        alias = "unified_asset_id",
1189        with = "::buffa::json_helpers::uint32",
1190        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
1191    )]
1192    pub unified_asset_id: u32,
1193    #[serde(skip)]
1194    #[doc(hidden)]
1195    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1196}
1197impl ::core::fmt::Debug for AssetIds {
1198    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1199        f.debug_struct("AssetIds")
1200            .field("zipped_asset_id", &self.zipped_asset_id)
1201            .field("unified_asset_id", &self.unified_asset_id)
1202            .finish()
1203    }
1204}
1205impl AssetIds {
1206    /// Protobuf type URL for this message, for use with `Any::pack` and
1207    /// `Any::unpack_if`.
1208    ///
1209    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1210    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
1211}
1212::buffa::impl_default_instance!(AssetIds);
1213impl ::buffa::MessageName for AssetIds {
1214    const PACKAGE: &'static str = "chain.lifecycle.v1";
1215    const NAME: &'static str = "AssetIds";
1216    const FULL_NAME: &'static str = "chain.lifecycle.v1.AssetIds";
1217    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
1218}
1219impl ::buffa::Message for AssetIds {
1220    /// Returns the total encoded size in bytes.
1221    ///
1222    /// The result is a `u32`; the protobuf specification requires all
1223    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1224    /// compliant message will never overflow this type.
1225    #[allow(clippy::let_and_return)]
1226    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1227        #[allow(unused_imports)]
1228        use ::buffa::Enumeration as _;
1229        let mut size = 0u32;
1230        if self.zipped_asset_id != 0u32 {
1231            size
1232                += 1u32
1233                    + ::buffa::types::uint32_encoded_len(self.zipped_asset_id) as u32;
1234        }
1235        if self.unified_asset_id != 0u32 {
1236            size
1237                += 1u32
1238                    + ::buffa::types::uint32_encoded_len(self.unified_asset_id) as u32;
1239        }
1240        size += self.__buffa_unknown_fields.encoded_len() as u32;
1241        size
1242    }
1243    fn write_to(
1244        &self,
1245        _cache: &mut ::buffa::SizeCache,
1246        buf: &mut impl ::buffa::bytes::BufMut,
1247    ) {
1248        #[allow(unused_imports)]
1249        use ::buffa::Enumeration as _;
1250        if self.zipped_asset_id != 0u32 {
1251            ::buffa::types::put_uint32_field(1u32, self.zipped_asset_id, buf);
1252        }
1253        if self.unified_asset_id != 0u32 {
1254            ::buffa::types::put_uint32_field(3u32, self.unified_asset_id, buf);
1255        }
1256        self.__buffa_unknown_fields.write_to(buf);
1257    }
1258    fn merge_field(
1259        &mut self,
1260        tag: ::buffa::encoding::Tag,
1261        buf: &mut impl ::buffa::bytes::Buf,
1262        ctx: ::buffa::DecodeContext<'_>,
1263    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1264        #[allow(unused_imports)]
1265        use ::buffa::bytes::Buf as _;
1266        #[allow(unused_imports)]
1267        use ::buffa::Enumeration as _;
1268        match tag.field_number() {
1269            1u32 => {
1270                ::buffa::encoding::check_wire_type(
1271                    tag,
1272                    ::buffa::encoding::WireType::Varint,
1273                )?;
1274                self.zipped_asset_id = ::buffa::types::decode_uint32(buf)?;
1275            }
1276            3u32 => {
1277                ::buffa::encoding::check_wire_type(
1278                    tag,
1279                    ::buffa::encoding::WireType::Varint,
1280                )?;
1281                self.unified_asset_id = ::buffa::types::decode_uint32(buf)?;
1282            }
1283            _ => {
1284                self.__buffa_unknown_fields
1285                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1286            }
1287        }
1288        ::core::result::Result::Ok(())
1289    }
1290    fn clear(&mut self) {
1291        self.zipped_asset_id = 0u32;
1292        self.unified_asset_id = 0u32;
1293        self.__buffa_unknown_fields.clear();
1294    }
1295}
1296impl ::buffa::ExtensionSet for AssetIds {
1297    const PROTO_FQN: &'static str = "chain.lifecycle.v1.AssetIds";
1298    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1299        &self.__buffa_unknown_fields
1300    }
1301    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1302        &mut self.__buffa_unknown_fields
1303    }
1304}
1305impl ::buffa::json_helpers::ProtoElemJson for AssetIds {
1306    fn serialize_proto_json<S: ::serde::Serializer>(
1307        v: &Self,
1308        s: S,
1309    ) -> ::core::result::Result<S::Ok, S::Error> {
1310        ::serde::Serialize::serialize(v, s)
1311    }
1312    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1313        d: D,
1314    ) -> ::core::result::Result<Self, D::Error> {
1315        <Self as ::serde::Deserialize>::deserialize(d)
1316    }
1317}
1318#[doc(hidden)]
1319pub const __ASSET_IDS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1320    type_url: "type.googleapis.com/chain.lifecycle.v1.AssetIds",
1321    to_json: ::buffa::type_registry::any_to_json::<AssetIds>,
1322    from_json: ::buffa::type_registry::any_from_json::<AssetIds>,
1323    is_wkt: false,
1324};
1325/// RequestFee captures the on-chain fee associated with a deposit or withdrawal
1326/// request. This is separate from summary `amount_e18`, which carries the gross
1327/// request principal for API display.
1328#[derive(Clone, PartialEq, Default)]
1329#[derive(::serde::Serialize, ::serde::Deserialize)]
1330#[serde(default)]
1331pub struct RequestFee {
1332    /// Asset identities for the fee asset.
1333    ///
1334    /// Field 1: `asset_ids`
1335    #[serde(
1336        rename = "assetIds",
1337        alias = "asset_ids",
1338        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1339    )]
1340    pub asset_ids: ::buffa::MessageField<AssetIds>,
1341    /// On-chain request fee in 18-decimal units of the fee asset identified by
1342    /// asset_ids. Separate from gross flow amount_e18 on summaries.
1343    ///
1344    /// Field 2: `amount_e18`
1345    #[serde(
1346        rename = "amountE18",
1347        alias = "amount_e18",
1348        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1349    )]
1350    pub amount_e18: ::buffa::MessageField<
1351        super::super::super::polyester::r#type::v1::U128,
1352    >,
1353    /// Fee recipient address when settled on chain.
1354    ///
1355    /// Field 3: `recipient_address`
1356    #[serde(
1357        rename = "recipientAddress",
1358        alias = "recipient_address",
1359        with = "::buffa::json_helpers::proto_string",
1360        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1361    )]
1362    pub recipient_address: ::buffa::alloc::string::String,
1363    /// Current state of the fee snapshot.
1364    ///
1365    /// Field 4: `status`
1366    #[serde(
1367        rename = "status",
1368        with = "::buffa::json_helpers::proto_enum",
1369        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1370    )]
1371    pub status: ::buffa::EnumValue<RequestFeeStatus>,
1372    #[serde(skip)]
1373    #[doc(hidden)]
1374    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1375}
1376impl ::core::fmt::Debug for RequestFee {
1377    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1378        f.debug_struct("RequestFee")
1379            .field("asset_ids", &self.asset_ids)
1380            .field("amount_e18", &self.amount_e18)
1381            .field("recipient_address", &self.recipient_address)
1382            .field("status", &self.status)
1383            .finish()
1384    }
1385}
1386impl RequestFee {
1387    /// Protobuf type URL for this message, for use with `Any::pack` and
1388    /// `Any::unpack_if`.
1389    ///
1390    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1391    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
1392}
1393::buffa::impl_default_instance!(RequestFee);
1394impl ::buffa::MessageName for RequestFee {
1395    const PACKAGE: &'static str = "chain.lifecycle.v1";
1396    const NAME: &'static str = "RequestFee";
1397    const FULL_NAME: &'static str = "chain.lifecycle.v1.RequestFee";
1398    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
1399}
1400impl ::buffa::Message for RequestFee {
1401    /// Returns the total encoded size in bytes.
1402    ///
1403    /// The result is a `u32`; the protobuf specification requires all
1404    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1405    /// compliant message will never overflow this type.
1406    #[allow(clippy::let_and_return)]
1407    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1408        #[allow(unused_imports)]
1409        use ::buffa::Enumeration as _;
1410        let mut size = 0u32;
1411        if self.asset_ids.is_set() {
1412            let __slot = __cache.reserve();
1413            let inner_size = self.asset_ids.compute_size(__cache);
1414            __cache.set(__slot, inner_size);
1415            size
1416                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1417                    + inner_size;
1418        }
1419        if self.amount_e18.is_set() {
1420            let __slot = __cache.reserve();
1421            let inner_size = self.amount_e18.compute_size(__cache);
1422            __cache.set(__slot, inner_size);
1423            size
1424                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1425                    + inner_size;
1426        }
1427        if !self.recipient_address.is_empty() {
1428            size
1429                += 1u32
1430                    + ::buffa::types::string_encoded_len(&self.recipient_address) as u32;
1431        }
1432        {
1433            let val = self.status.to_i32();
1434            if val != 0 {
1435                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1436            }
1437        }
1438        size += self.__buffa_unknown_fields.encoded_len() as u32;
1439        size
1440    }
1441    fn write_to(
1442        &self,
1443        __cache: &mut ::buffa::SizeCache,
1444        buf: &mut impl ::buffa::bytes::BufMut,
1445    ) {
1446        #[allow(unused_imports)]
1447        use ::buffa::Enumeration as _;
1448        if self.asset_ids.is_set() {
1449            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
1450            self.asset_ids.write_to(__cache, buf);
1451        }
1452        if self.amount_e18.is_set() {
1453            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
1454            self.amount_e18.write_to(__cache, buf);
1455        }
1456        if !self.recipient_address.is_empty() {
1457            ::buffa::types::put_string_field(3u32, &self.recipient_address, buf);
1458        }
1459        {
1460            let val = self.status.to_i32();
1461            if val != 0 {
1462                ::buffa::types::put_int32_field(4u32, val, buf);
1463            }
1464        }
1465        self.__buffa_unknown_fields.write_to(buf);
1466    }
1467    fn merge_field(
1468        &mut self,
1469        tag: ::buffa::encoding::Tag,
1470        buf: &mut impl ::buffa::bytes::Buf,
1471        ctx: ::buffa::DecodeContext<'_>,
1472    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1473        #[allow(unused_imports)]
1474        use ::buffa::bytes::Buf as _;
1475        #[allow(unused_imports)]
1476        use ::buffa::Enumeration as _;
1477        match tag.field_number() {
1478            1u32 => {
1479                ::buffa::encoding::check_wire_type(
1480                    tag,
1481                    ::buffa::encoding::WireType::LengthDelimited,
1482                )?;
1483                ::buffa::Message::merge_length_delimited(
1484                    self.asset_ids.get_or_insert_default(),
1485                    buf,
1486                    ctx,
1487                )?;
1488            }
1489            2u32 => {
1490                ::buffa::encoding::check_wire_type(
1491                    tag,
1492                    ::buffa::encoding::WireType::LengthDelimited,
1493                )?;
1494                ::buffa::Message::merge_length_delimited(
1495                    self.amount_e18.get_or_insert_default(),
1496                    buf,
1497                    ctx,
1498                )?;
1499            }
1500            3u32 => {
1501                ::buffa::encoding::check_wire_type(
1502                    tag,
1503                    ::buffa::encoding::WireType::LengthDelimited,
1504                )?;
1505                ::buffa::types::merge_string(&mut self.recipient_address, buf)?;
1506            }
1507            4u32 => {
1508                ::buffa::encoding::check_wire_type(
1509                    tag,
1510                    ::buffa::encoding::WireType::Varint,
1511                )?;
1512                self.status = ::buffa::EnumValue::from(
1513                    ::buffa::types::decode_int32(buf)?,
1514                );
1515            }
1516            _ => {
1517                self.__buffa_unknown_fields
1518                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1519            }
1520        }
1521        ::core::result::Result::Ok(())
1522    }
1523    fn clear(&mut self) {
1524        self.asset_ids = ::buffa::MessageField::none();
1525        self.amount_e18 = ::buffa::MessageField::none();
1526        self.recipient_address.clear();
1527        self.status = ::buffa::EnumValue::from(0);
1528        self.__buffa_unknown_fields.clear();
1529    }
1530}
1531impl ::buffa::ExtensionSet for RequestFee {
1532    const PROTO_FQN: &'static str = "chain.lifecycle.v1.RequestFee";
1533    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1534        &self.__buffa_unknown_fields
1535    }
1536    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1537        &mut self.__buffa_unknown_fields
1538    }
1539}
1540impl ::buffa::json_helpers::ProtoElemJson for RequestFee {
1541    fn serialize_proto_json<S: ::serde::Serializer>(
1542        v: &Self,
1543        s: S,
1544    ) -> ::core::result::Result<S::Ok, S::Error> {
1545        ::serde::Serialize::serialize(v, s)
1546    }
1547    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1548        d: D,
1549    ) -> ::core::result::Result<Self, D::Error> {
1550        <Self as ::serde::Deserialize>::deserialize(d)
1551    }
1552}
1553#[doc(hidden)]
1554pub const __REQUEST_FEE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1555    type_url: "type.googleapis.com/chain.lifecycle.v1.RequestFee",
1556    to_json: ::buffa::type_registry::any_to_json::<RequestFee>,
1557    from_json: ::buffa::type_registry::any_from_json::<RequestFee>,
1558    is_wkt: false,
1559};
1560/// TxLookupKind controls which transaction reference fields are searched.
1561#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1562#[repr(i32)]
1563pub enum TxLookupKind {
1564    /// Lookup mode was not specified.
1565    TX_UNSPECIFIED = 0i32,
1566    /// Match only the original source transaction hash for a flow.
1567    TX_SOURCE = 1i32,
1568    /// Match either the source transaction hash or the latest known activity
1569    /// transaction reference.
1570    TX_ANY = 2i32,
1571}
1572impl TxLookupKind {
1573    ///Idiomatic alias for [`Self::TX_UNSPECIFIED`]; `Debug` prints the variant name.
1574    #[allow(non_upper_case_globals)]
1575    pub const TxUnspecified: Self = Self::TX_UNSPECIFIED;
1576    ///Idiomatic alias for [`Self::TX_SOURCE`]; `Debug` prints the variant name.
1577    #[allow(non_upper_case_globals)]
1578    pub const TxSource: Self = Self::TX_SOURCE;
1579    ///Idiomatic alias for [`Self::TX_ANY`]; `Debug` prints the variant name.
1580    #[allow(non_upper_case_globals)]
1581    pub const TxAny: Self = Self::TX_ANY;
1582}
1583impl ::core::default::Default for TxLookupKind {
1584    fn default() -> Self {
1585        Self::TX_UNSPECIFIED
1586    }
1587}
1588impl ::serde::Serialize for TxLookupKind {
1589    fn serialize<S: ::serde::Serializer>(
1590        &self,
1591        s: S,
1592    ) -> ::core::result::Result<S::Ok, S::Error> {
1593        s.serialize_str(::buffa::Enumeration::proto_name(self))
1594    }
1595}
1596impl<'de> ::serde::Deserialize<'de> for TxLookupKind {
1597    fn deserialize<D: ::serde::Deserializer<'de>>(
1598        d: D,
1599    ) -> ::core::result::Result<Self, D::Error> {
1600        struct _V;
1601        impl ::serde::de::Visitor<'_> for _V {
1602            type Value = TxLookupKind;
1603            fn expecting(
1604                &self,
1605                f: &mut ::core::fmt::Formatter<'_>,
1606            ) -> ::core::fmt::Result {
1607                f.write_str(
1608                    concat!("a string, integer, or null for ", stringify!(TxLookupKind)),
1609                )
1610            }
1611            fn visit_str<E: ::serde::de::Error>(
1612                self,
1613                v: &str,
1614            ) -> ::core::result::Result<TxLookupKind, E> {
1615                <TxLookupKind as ::buffa::Enumeration>::from_proto_name(v)
1616                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1617            }
1618            fn visit_i64<E: ::serde::de::Error>(
1619                self,
1620                v: i64,
1621            ) -> ::core::result::Result<TxLookupKind, E> {
1622                let v32 = i32::try_from(v)
1623                    .map_err(|_| {
1624                        ::serde::de::Error::custom(
1625                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1626                        )
1627                    })?;
1628                <TxLookupKind as ::buffa::Enumeration>::from_i32(v32)
1629                    .ok_or_else(|| {
1630                        ::serde::de::Error::custom(
1631                            ::buffa::alloc::format!("unknown enum value {v32}"),
1632                        )
1633                    })
1634            }
1635            fn visit_u64<E: ::serde::de::Error>(
1636                self,
1637                v: u64,
1638            ) -> ::core::result::Result<TxLookupKind, E> {
1639                let v32 = i32::try_from(v)
1640                    .map_err(|_| {
1641                        ::serde::de::Error::custom(
1642                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1643                        )
1644                    })?;
1645                <TxLookupKind as ::buffa::Enumeration>::from_i32(v32)
1646                    .ok_or_else(|| {
1647                        ::serde::de::Error::custom(
1648                            ::buffa::alloc::format!("unknown enum value {v32}"),
1649                        )
1650                    })
1651            }
1652            fn visit_unit<E: ::serde::de::Error>(
1653                self,
1654            ) -> ::core::result::Result<TxLookupKind, E> {
1655                ::core::result::Result::Ok(::core::default::Default::default())
1656            }
1657        }
1658        d.deserialize_any(_V)
1659    }
1660}
1661impl ::buffa::json_helpers::ProtoElemJson for TxLookupKind {
1662    fn serialize_proto_json<S: ::serde::Serializer>(
1663        v: &Self,
1664        s: S,
1665    ) -> ::core::result::Result<S::Ok, S::Error> {
1666        ::serde::Serialize::serialize(v, s)
1667    }
1668    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1669        d: D,
1670    ) -> ::core::result::Result<Self, D::Error> {
1671        <Self as ::serde::Deserialize>::deserialize(d)
1672    }
1673}
1674impl ::buffa::Enumeration for TxLookupKind {
1675    fn from_i32(value: i32) -> ::core::option::Option<Self> {
1676        match value {
1677            0i32 => ::core::option::Option::Some(Self::TX_UNSPECIFIED),
1678            1i32 => ::core::option::Option::Some(Self::TX_SOURCE),
1679            2i32 => ::core::option::Option::Some(Self::TX_ANY),
1680            _ => ::core::option::Option::None,
1681        }
1682    }
1683    fn to_i32(&self) -> i32 {
1684        *self as i32
1685    }
1686    fn proto_name(&self) -> &'static str {
1687        match self {
1688            Self::TX_UNSPECIFIED => "TX_UNSPECIFIED",
1689            Self::TX_SOURCE => "TX_SOURCE",
1690            Self::TX_ANY => "TX_ANY",
1691        }
1692    }
1693    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1694        match name {
1695            "TX_UNSPECIFIED" => ::core::option::Option::Some(Self::TX_UNSPECIFIED),
1696            "TX_SOURCE" => ::core::option::Option::Some(Self::TX_SOURCE),
1697            "TX_ANY" => ::core::option::Option::Some(Self::TX_ANY),
1698            _ => ::core::option::Option::None,
1699        }
1700    }
1701    fn values() -> &'static [Self] {
1702        &[Self::TX_UNSPECIFIED, Self::TX_SOURCE, Self::TX_ANY]
1703    }
1704}
1705/// ListScope selects which lifecycle state bucket should be returned.
1706#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1707#[repr(i32)]
1708pub enum ListScope {
1709    /// No explicit scope; server defaults decide which buckets are included.
1710    LIST_UNSPECIFIED = 0i32,
1711    /// Include both open and terminal flows.
1712    LIST_ALL = 1i32,
1713    /// Include only flows that are still progressing.
1714    LIST_OPEN_ONLY = 2i32,
1715    /// Include only flows that reached a terminal state.
1716    LIST_TERMINAL_ONLY = 3i32,
1717}
1718impl ListScope {
1719    ///Idiomatic alias for [`Self::LIST_UNSPECIFIED`]; `Debug` prints the variant name.
1720    #[allow(non_upper_case_globals)]
1721    pub const ListUnspecified: Self = Self::LIST_UNSPECIFIED;
1722    ///Idiomatic alias for [`Self::LIST_ALL`]; `Debug` prints the variant name.
1723    #[allow(non_upper_case_globals)]
1724    pub const ListAll: Self = Self::LIST_ALL;
1725    ///Idiomatic alias for [`Self::LIST_OPEN_ONLY`]; `Debug` prints the variant name.
1726    #[allow(non_upper_case_globals)]
1727    pub const ListOpenOnly: Self = Self::LIST_OPEN_ONLY;
1728    ///Idiomatic alias for [`Self::LIST_TERMINAL_ONLY`]; `Debug` prints the variant name.
1729    #[allow(non_upper_case_globals)]
1730    pub const ListTerminalOnly: Self = Self::LIST_TERMINAL_ONLY;
1731}
1732impl ::core::default::Default for ListScope {
1733    fn default() -> Self {
1734        Self::LIST_UNSPECIFIED
1735    }
1736}
1737impl ::serde::Serialize for ListScope {
1738    fn serialize<S: ::serde::Serializer>(
1739        &self,
1740        s: S,
1741    ) -> ::core::result::Result<S::Ok, S::Error> {
1742        s.serialize_str(::buffa::Enumeration::proto_name(self))
1743    }
1744}
1745impl<'de> ::serde::Deserialize<'de> for ListScope {
1746    fn deserialize<D: ::serde::Deserializer<'de>>(
1747        d: D,
1748    ) -> ::core::result::Result<Self, D::Error> {
1749        struct _V;
1750        impl ::serde::de::Visitor<'_> for _V {
1751            type Value = ListScope;
1752            fn expecting(
1753                &self,
1754                f: &mut ::core::fmt::Formatter<'_>,
1755            ) -> ::core::fmt::Result {
1756                f.write_str(
1757                    concat!("a string, integer, or null for ", stringify!(ListScope)),
1758                )
1759            }
1760            fn visit_str<E: ::serde::de::Error>(
1761                self,
1762                v: &str,
1763            ) -> ::core::result::Result<ListScope, E> {
1764                <ListScope as ::buffa::Enumeration>::from_proto_name(v)
1765                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1766            }
1767            fn visit_i64<E: ::serde::de::Error>(
1768                self,
1769                v: i64,
1770            ) -> ::core::result::Result<ListScope, E> {
1771                let v32 = i32::try_from(v)
1772                    .map_err(|_| {
1773                        ::serde::de::Error::custom(
1774                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1775                        )
1776                    })?;
1777                <ListScope as ::buffa::Enumeration>::from_i32(v32)
1778                    .ok_or_else(|| {
1779                        ::serde::de::Error::custom(
1780                            ::buffa::alloc::format!("unknown enum value {v32}"),
1781                        )
1782                    })
1783            }
1784            fn visit_u64<E: ::serde::de::Error>(
1785                self,
1786                v: u64,
1787            ) -> ::core::result::Result<ListScope, E> {
1788                let v32 = i32::try_from(v)
1789                    .map_err(|_| {
1790                        ::serde::de::Error::custom(
1791                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1792                        )
1793                    })?;
1794                <ListScope as ::buffa::Enumeration>::from_i32(v32)
1795                    .ok_or_else(|| {
1796                        ::serde::de::Error::custom(
1797                            ::buffa::alloc::format!("unknown enum value {v32}"),
1798                        )
1799                    })
1800            }
1801            fn visit_unit<E: ::serde::de::Error>(
1802                self,
1803            ) -> ::core::result::Result<ListScope, E> {
1804                ::core::result::Result::Ok(::core::default::Default::default())
1805            }
1806        }
1807        d.deserialize_any(_V)
1808    }
1809}
1810impl ::buffa::json_helpers::ProtoElemJson for ListScope {
1811    fn serialize_proto_json<S: ::serde::Serializer>(
1812        v: &Self,
1813        s: S,
1814    ) -> ::core::result::Result<S::Ok, S::Error> {
1815        ::serde::Serialize::serialize(v, s)
1816    }
1817    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1818        d: D,
1819    ) -> ::core::result::Result<Self, D::Error> {
1820        <Self as ::serde::Deserialize>::deserialize(d)
1821    }
1822}
1823impl ::buffa::Enumeration for ListScope {
1824    fn from_i32(value: i32) -> ::core::option::Option<Self> {
1825        match value {
1826            0i32 => ::core::option::Option::Some(Self::LIST_UNSPECIFIED),
1827            1i32 => ::core::option::Option::Some(Self::LIST_ALL),
1828            2i32 => ::core::option::Option::Some(Self::LIST_OPEN_ONLY),
1829            3i32 => ::core::option::Option::Some(Self::LIST_TERMINAL_ONLY),
1830            _ => ::core::option::Option::None,
1831        }
1832    }
1833    fn to_i32(&self) -> i32 {
1834        *self as i32
1835    }
1836    fn proto_name(&self) -> &'static str {
1837        match self {
1838            Self::LIST_UNSPECIFIED => "LIST_UNSPECIFIED",
1839            Self::LIST_ALL => "LIST_ALL",
1840            Self::LIST_OPEN_ONLY => "LIST_OPEN_ONLY",
1841            Self::LIST_TERMINAL_ONLY => "LIST_TERMINAL_ONLY",
1842        }
1843    }
1844    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1845        match name {
1846            "LIST_UNSPECIFIED" => ::core::option::Option::Some(Self::LIST_UNSPECIFIED),
1847            "LIST_ALL" => ::core::option::Option::Some(Self::LIST_ALL),
1848            "LIST_OPEN_ONLY" => ::core::option::Option::Some(Self::LIST_OPEN_ONLY),
1849            "LIST_TERMINAL_ONLY" => {
1850                ::core::option::Option::Some(Self::LIST_TERMINAL_ONLY)
1851            }
1852            _ => ::core::option::Option::None,
1853        }
1854    }
1855    fn values() -> &'static [Self] {
1856        &[
1857            Self::LIST_UNSPECIFIED,
1858            Self::LIST_ALL,
1859            Self::LIST_OPEN_ONLY,
1860            Self::LIST_TERMINAL_ONLY,
1861        ]
1862    }
1863}
1864/// Sort selects lifecycle list direction.
1865#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1866#[repr(i32)]
1867pub enum Sort {
1868    /// Sort order was not specified; server defaults apply.
1869    SORT_UNSPECIFIED = 0i32,
1870    /// Return newest rows first for the selected ordering timestamp.
1871    SORT_NEWEST = 1i32,
1872    /// Return oldest rows first for the selected ordering timestamp.
1873    SORT_OLDEST = 2i32,
1874}
1875impl Sort {
1876    ///Idiomatic alias for [`Self::SORT_UNSPECIFIED`]; `Debug` prints the variant name.
1877    #[allow(non_upper_case_globals)]
1878    pub const Unspecified: Self = Self::SORT_UNSPECIFIED;
1879    ///Idiomatic alias for [`Self::SORT_NEWEST`]; `Debug` prints the variant name.
1880    #[allow(non_upper_case_globals)]
1881    pub const Newest: Self = Self::SORT_NEWEST;
1882    ///Idiomatic alias for [`Self::SORT_OLDEST`]; `Debug` prints the variant name.
1883    #[allow(non_upper_case_globals)]
1884    pub const Oldest: Self = Self::SORT_OLDEST;
1885}
1886impl ::core::default::Default for Sort {
1887    fn default() -> Self {
1888        Self::SORT_UNSPECIFIED
1889    }
1890}
1891impl ::serde::Serialize for Sort {
1892    fn serialize<S: ::serde::Serializer>(
1893        &self,
1894        s: S,
1895    ) -> ::core::result::Result<S::Ok, S::Error> {
1896        s.serialize_str(::buffa::Enumeration::proto_name(self))
1897    }
1898}
1899impl<'de> ::serde::Deserialize<'de> for Sort {
1900    fn deserialize<D: ::serde::Deserializer<'de>>(
1901        d: D,
1902    ) -> ::core::result::Result<Self, D::Error> {
1903        struct _V;
1904        impl ::serde::de::Visitor<'_> for _V {
1905            type Value = Sort;
1906            fn expecting(
1907                &self,
1908                f: &mut ::core::fmt::Formatter<'_>,
1909            ) -> ::core::fmt::Result {
1910                f.write_str(concat!("a string, integer, or null for ", stringify!(Sort)))
1911            }
1912            fn visit_str<E: ::serde::de::Error>(
1913                self,
1914                v: &str,
1915            ) -> ::core::result::Result<Sort, E> {
1916                <Sort as ::buffa::Enumeration>::from_proto_name(v)
1917                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1918            }
1919            fn visit_i64<E: ::serde::de::Error>(
1920                self,
1921                v: i64,
1922            ) -> ::core::result::Result<Sort, E> {
1923                let v32 = i32::try_from(v)
1924                    .map_err(|_| {
1925                        ::serde::de::Error::custom(
1926                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1927                        )
1928                    })?;
1929                <Sort as ::buffa::Enumeration>::from_i32(v32)
1930                    .ok_or_else(|| {
1931                        ::serde::de::Error::custom(
1932                            ::buffa::alloc::format!("unknown enum value {v32}"),
1933                        )
1934                    })
1935            }
1936            fn visit_u64<E: ::serde::de::Error>(
1937                self,
1938                v: u64,
1939            ) -> ::core::result::Result<Sort, E> {
1940                let v32 = i32::try_from(v)
1941                    .map_err(|_| {
1942                        ::serde::de::Error::custom(
1943                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1944                        )
1945                    })?;
1946                <Sort as ::buffa::Enumeration>::from_i32(v32)
1947                    .ok_or_else(|| {
1948                        ::serde::de::Error::custom(
1949                            ::buffa::alloc::format!("unknown enum value {v32}"),
1950                        )
1951                    })
1952            }
1953            fn visit_unit<E: ::serde::de::Error>(
1954                self,
1955            ) -> ::core::result::Result<Sort, E> {
1956                ::core::result::Result::Ok(::core::default::Default::default())
1957            }
1958        }
1959        d.deserialize_any(_V)
1960    }
1961}
1962impl ::buffa::json_helpers::ProtoElemJson for Sort {
1963    fn serialize_proto_json<S: ::serde::Serializer>(
1964        v: &Self,
1965        s: S,
1966    ) -> ::core::result::Result<S::Ok, S::Error> {
1967        ::serde::Serialize::serialize(v, s)
1968    }
1969    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1970        d: D,
1971    ) -> ::core::result::Result<Self, D::Error> {
1972        <Self as ::serde::Deserialize>::deserialize(d)
1973    }
1974}
1975impl ::buffa::Enumeration for Sort {
1976    fn from_i32(value: i32) -> ::core::option::Option<Self> {
1977        match value {
1978            0i32 => ::core::option::Option::Some(Self::SORT_UNSPECIFIED),
1979            1i32 => ::core::option::Option::Some(Self::SORT_NEWEST),
1980            2i32 => ::core::option::Option::Some(Self::SORT_OLDEST),
1981            _ => ::core::option::Option::None,
1982        }
1983    }
1984    fn to_i32(&self) -> i32 {
1985        *self as i32
1986    }
1987    fn proto_name(&self) -> &'static str {
1988        match self {
1989            Self::SORT_UNSPECIFIED => "SORT_UNSPECIFIED",
1990            Self::SORT_NEWEST => "SORT_NEWEST",
1991            Self::SORT_OLDEST => "SORT_OLDEST",
1992        }
1993    }
1994    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1995        match name {
1996            "SORT_UNSPECIFIED" => ::core::option::Option::Some(Self::SORT_UNSPECIFIED),
1997            "SORT_NEWEST" => ::core::option::Option::Some(Self::SORT_NEWEST),
1998            "SORT_OLDEST" => ::core::option::Option::Some(Self::SORT_OLDEST),
1999            _ => ::core::option::Option::None,
2000        }
2001    }
2002    fn values() -> &'static [Self] {
2003        &[Self::SORT_UNSPECIFIED, Self::SORT_NEWEST, Self::SORT_OLDEST]
2004    }
2005}
2006/// ListOrderBy selects which timestamp ListFlows uses for ordering and cursors.
2007#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2008#[repr(i32)]
2009pub enum ListOrderBy {
2010    /// Ordering timestamp was not specified; server defaults to last activity.
2011    ORDER_BY_UNSPECIFIED = 0i32,
2012    /// Order by the latest lifecycle activity timestamp.
2013    ORDER_BY_LAST_ACTIVITY = 1i32,
2014    /// Order by the first observed business timestamp. Rows without a start time
2015    /// use their terminal timestamp when available.
2016    ORDER_BY_STARTED_AT = 2i32,
2017}
2018impl ListOrderBy {
2019    ///Idiomatic alias for [`Self::ORDER_BY_UNSPECIFIED`]; `Debug` prints the variant name.
2020    #[allow(non_upper_case_globals)]
2021    pub const OrderByUnspecified: Self = Self::ORDER_BY_UNSPECIFIED;
2022    ///Idiomatic alias for [`Self::ORDER_BY_LAST_ACTIVITY`]; `Debug` prints the variant name.
2023    #[allow(non_upper_case_globals)]
2024    pub const OrderByLastActivity: Self = Self::ORDER_BY_LAST_ACTIVITY;
2025    ///Idiomatic alias for [`Self::ORDER_BY_STARTED_AT`]; `Debug` prints the variant name.
2026    #[allow(non_upper_case_globals)]
2027    pub const OrderByStartedAt: Self = Self::ORDER_BY_STARTED_AT;
2028}
2029impl ::core::default::Default for ListOrderBy {
2030    fn default() -> Self {
2031        Self::ORDER_BY_UNSPECIFIED
2032    }
2033}
2034impl ::serde::Serialize for ListOrderBy {
2035    fn serialize<S: ::serde::Serializer>(
2036        &self,
2037        s: S,
2038    ) -> ::core::result::Result<S::Ok, S::Error> {
2039        s.serialize_str(::buffa::Enumeration::proto_name(self))
2040    }
2041}
2042impl<'de> ::serde::Deserialize<'de> for ListOrderBy {
2043    fn deserialize<D: ::serde::Deserializer<'de>>(
2044        d: D,
2045    ) -> ::core::result::Result<Self, D::Error> {
2046        struct _V;
2047        impl ::serde::de::Visitor<'_> for _V {
2048            type Value = ListOrderBy;
2049            fn expecting(
2050                &self,
2051                f: &mut ::core::fmt::Formatter<'_>,
2052            ) -> ::core::fmt::Result {
2053                f.write_str(
2054                    concat!("a string, integer, or null for ", stringify!(ListOrderBy)),
2055                )
2056            }
2057            fn visit_str<E: ::serde::de::Error>(
2058                self,
2059                v: &str,
2060            ) -> ::core::result::Result<ListOrderBy, E> {
2061                <ListOrderBy as ::buffa::Enumeration>::from_proto_name(v)
2062                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2063            }
2064            fn visit_i64<E: ::serde::de::Error>(
2065                self,
2066                v: i64,
2067            ) -> ::core::result::Result<ListOrderBy, E> {
2068                let v32 = i32::try_from(v)
2069                    .map_err(|_| {
2070                        ::serde::de::Error::custom(
2071                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
2072                        )
2073                    })?;
2074                <ListOrderBy as ::buffa::Enumeration>::from_i32(v32)
2075                    .ok_or_else(|| {
2076                        ::serde::de::Error::custom(
2077                            ::buffa::alloc::format!("unknown enum value {v32}"),
2078                        )
2079                    })
2080            }
2081            fn visit_u64<E: ::serde::de::Error>(
2082                self,
2083                v: u64,
2084            ) -> ::core::result::Result<ListOrderBy, E> {
2085                let v32 = i32::try_from(v)
2086                    .map_err(|_| {
2087                        ::serde::de::Error::custom(
2088                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
2089                        )
2090                    })?;
2091                <ListOrderBy as ::buffa::Enumeration>::from_i32(v32)
2092                    .ok_or_else(|| {
2093                        ::serde::de::Error::custom(
2094                            ::buffa::alloc::format!("unknown enum value {v32}"),
2095                        )
2096                    })
2097            }
2098            fn visit_unit<E: ::serde::de::Error>(
2099                self,
2100            ) -> ::core::result::Result<ListOrderBy, E> {
2101                ::core::result::Result::Ok(::core::default::Default::default())
2102            }
2103        }
2104        d.deserialize_any(_V)
2105    }
2106}
2107impl ::buffa::json_helpers::ProtoElemJson for ListOrderBy {
2108    fn serialize_proto_json<S: ::serde::Serializer>(
2109        v: &Self,
2110        s: S,
2111    ) -> ::core::result::Result<S::Ok, S::Error> {
2112        ::serde::Serialize::serialize(v, s)
2113    }
2114    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2115        d: D,
2116    ) -> ::core::result::Result<Self, D::Error> {
2117        <Self as ::serde::Deserialize>::deserialize(d)
2118    }
2119}
2120impl ::buffa::Enumeration for ListOrderBy {
2121    fn from_i32(value: i32) -> ::core::option::Option<Self> {
2122        match value {
2123            0i32 => ::core::option::Option::Some(Self::ORDER_BY_UNSPECIFIED),
2124            1i32 => ::core::option::Option::Some(Self::ORDER_BY_LAST_ACTIVITY),
2125            2i32 => ::core::option::Option::Some(Self::ORDER_BY_STARTED_AT),
2126            _ => ::core::option::Option::None,
2127        }
2128    }
2129    fn to_i32(&self) -> i32 {
2130        *self as i32
2131    }
2132    fn proto_name(&self) -> &'static str {
2133        match self {
2134            Self::ORDER_BY_UNSPECIFIED => "ORDER_BY_UNSPECIFIED",
2135            Self::ORDER_BY_LAST_ACTIVITY => "ORDER_BY_LAST_ACTIVITY",
2136            Self::ORDER_BY_STARTED_AT => "ORDER_BY_STARTED_AT",
2137        }
2138    }
2139    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2140        match name {
2141            "ORDER_BY_UNSPECIFIED" => {
2142                ::core::option::Option::Some(Self::ORDER_BY_UNSPECIFIED)
2143            }
2144            "ORDER_BY_LAST_ACTIVITY" => {
2145                ::core::option::Option::Some(Self::ORDER_BY_LAST_ACTIVITY)
2146            }
2147            "ORDER_BY_STARTED_AT" => {
2148                ::core::option::Option::Some(Self::ORDER_BY_STARTED_AT)
2149            }
2150            _ => ::core::option::Option::None,
2151        }
2152    }
2153    fn values() -> &'static [Self] {
2154        &[
2155            Self::ORDER_BY_UNSPECIFIED,
2156            Self::ORDER_BY_LAST_ACTIVITY,
2157            Self::ORDER_BY_STARTED_AT,
2158        ]
2159    }
2160}
2161/// FlowStep is the public lifecycle step shown in API and realtime read
2162/// models. It is business-facing and intentionally hides the lower-level
2163/// technical milestone taxonomy.
2164#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2165#[repr(i32)]
2166pub enum FlowStep {
2167    /// Step is not specified.
2168    FLOW_STEP_UNSPECIFIED = 0i32,
2169    /// External-chain / relayer source tracking before Polyester can continue.
2170    FLOW_STEP_SOURCE = 1i32,
2171    /// Deposit-side mint and downstream crediting / transfer stage.
2172    FLOW_STEP_TRANSFER = 2i32,
2173    /// Polyester request creation stage.
2174    FLOW_STEP_REQUEST = 3i32,
2175    /// Polyester validation / quorum stage.
2176    FLOW_STEP_VALIDATION = 4i32,
2177    /// Polyester execution stage.
2178    FLOW_STEP_EXECUTION = 5i32,
2179    /// Bridge fulfillment before final ledger settlement.
2180    FLOW_STEP_BRIDGE_FULFILLMENT = 6i32,
2181    /// Flow was dropped before success.
2182    FLOW_STEP_DROPPED = 7i32,
2183    /// Flow failed in a user-visible way.
2184    FLOW_STEP_FAILED = 8i32,
2185    /// Flow reached a refund or reversal result.
2186    FLOW_STEP_REFUNDED = 9i32,
2187    /// Withdraw destination tx hash was committed and the flow is waiting for the
2188    /// final fulfillment confirmation.
2189    FLOW_STEP_FULFILLING = 10i32,
2190    /// Off-chain ledger settlement was durably confirmed.
2191    FLOW_STEP_SETTLEMENT = 11i32,
2192}
2193impl FlowStep {
2194    ///Idiomatic alias for [`Self::FLOW_STEP_UNSPECIFIED`]; `Debug` prints the variant name.
2195    #[allow(non_upper_case_globals)]
2196    pub const Unspecified: Self = Self::FLOW_STEP_UNSPECIFIED;
2197    ///Idiomatic alias for [`Self::FLOW_STEP_SOURCE`]; `Debug` prints the variant name.
2198    #[allow(non_upper_case_globals)]
2199    pub const Source: Self = Self::FLOW_STEP_SOURCE;
2200    ///Idiomatic alias for [`Self::FLOW_STEP_TRANSFER`]; `Debug` prints the variant name.
2201    #[allow(non_upper_case_globals)]
2202    pub const Transfer: Self = Self::FLOW_STEP_TRANSFER;
2203    ///Idiomatic alias for [`Self::FLOW_STEP_REQUEST`]; `Debug` prints the variant name.
2204    #[allow(non_upper_case_globals)]
2205    pub const Request: Self = Self::FLOW_STEP_REQUEST;
2206    ///Idiomatic alias for [`Self::FLOW_STEP_VALIDATION`]; `Debug` prints the variant name.
2207    #[allow(non_upper_case_globals)]
2208    pub const Validation: Self = Self::FLOW_STEP_VALIDATION;
2209    ///Idiomatic alias for [`Self::FLOW_STEP_EXECUTION`]; `Debug` prints the variant name.
2210    #[allow(non_upper_case_globals)]
2211    pub const Execution: Self = Self::FLOW_STEP_EXECUTION;
2212    ///Idiomatic alias for [`Self::FLOW_STEP_BRIDGE_FULFILLMENT`]; `Debug` prints the variant name.
2213    #[allow(non_upper_case_globals)]
2214    pub const BridgeFulfillment: Self = Self::FLOW_STEP_BRIDGE_FULFILLMENT;
2215    ///Idiomatic alias for [`Self::FLOW_STEP_DROPPED`]; `Debug` prints the variant name.
2216    #[allow(non_upper_case_globals)]
2217    pub const Dropped: Self = Self::FLOW_STEP_DROPPED;
2218    ///Idiomatic alias for [`Self::FLOW_STEP_FAILED`]; `Debug` prints the variant name.
2219    #[allow(non_upper_case_globals)]
2220    pub const Failed: Self = Self::FLOW_STEP_FAILED;
2221    ///Idiomatic alias for [`Self::FLOW_STEP_REFUNDED`]; `Debug` prints the variant name.
2222    #[allow(non_upper_case_globals)]
2223    pub const Refunded: Self = Self::FLOW_STEP_REFUNDED;
2224    ///Idiomatic alias for [`Self::FLOW_STEP_FULFILLING`]; `Debug` prints the variant name.
2225    #[allow(non_upper_case_globals)]
2226    pub const Fulfilling: Self = Self::FLOW_STEP_FULFILLING;
2227    ///Idiomatic alias for [`Self::FLOW_STEP_SETTLEMENT`]; `Debug` prints the variant name.
2228    #[allow(non_upper_case_globals)]
2229    pub const Settlement: Self = Self::FLOW_STEP_SETTLEMENT;
2230}
2231impl ::core::default::Default for FlowStep {
2232    fn default() -> Self {
2233        Self::FLOW_STEP_UNSPECIFIED
2234    }
2235}
2236impl ::serde::Serialize for FlowStep {
2237    fn serialize<S: ::serde::Serializer>(
2238        &self,
2239        s: S,
2240    ) -> ::core::result::Result<S::Ok, S::Error> {
2241        s.serialize_str(::buffa::Enumeration::proto_name(self))
2242    }
2243}
2244impl<'de> ::serde::Deserialize<'de> for FlowStep {
2245    fn deserialize<D: ::serde::Deserializer<'de>>(
2246        d: D,
2247    ) -> ::core::result::Result<Self, D::Error> {
2248        struct _V;
2249        impl ::serde::de::Visitor<'_> for _V {
2250            type Value = FlowStep;
2251            fn expecting(
2252                &self,
2253                f: &mut ::core::fmt::Formatter<'_>,
2254            ) -> ::core::fmt::Result {
2255                f.write_str(
2256                    concat!("a string, integer, or null for ", stringify!(FlowStep)),
2257                )
2258            }
2259            fn visit_str<E: ::serde::de::Error>(
2260                self,
2261                v: &str,
2262            ) -> ::core::result::Result<FlowStep, E> {
2263                <FlowStep as ::buffa::Enumeration>::from_proto_name(v)
2264                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2265            }
2266            fn visit_i64<E: ::serde::de::Error>(
2267                self,
2268                v: i64,
2269            ) -> ::core::result::Result<FlowStep, E> {
2270                let v32 = i32::try_from(v)
2271                    .map_err(|_| {
2272                        ::serde::de::Error::custom(
2273                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
2274                        )
2275                    })?;
2276                <FlowStep as ::buffa::Enumeration>::from_i32(v32)
2277                    .ok_or_else(|| {
2278                        ::serde::de::Error::custom(
2279                            ::buffa::alloc::format!("unknown enum value {v32}"),
2280                        )
2281                    })
2282            }
2283            fn visit_u64<E: ::serde::de::Error>(
2284                self,
2285                v: u64,
2286            ) -> ::core::result::Result<FlowStep, E> {
2287                let v32 = i32::try_from(v)
2288                    .map_err(|_| {
2289                        ::serde::de::Error::custom(
2290                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
2291                        )
2292                    })?;
2293                <FlowStep as ::buffa::Enumeration>::from_i32(v32)
2294                    .ok_or_else(|| {
2295                        ::serde::de::Error::custom(
2296                            ::buffa::alloc::format!("unknown enum value {v32}"),
2297                        )
2298                    })
2299            }
2300            fn visit_unit<E: ::serde::de::Error>(
2301                self,
2302            ) -> ::core::result::Result<FlowStep, E> {
2303                ::core::result::Result::Ok(::core::default::Default::default())
2304            }
2305        }
2306        d.deserialize_any(_V)
2307    }
2308}
2309impl ::buffa::json_helpers::ProtoElemJson for FlowStep {
2310    fn serialize_proto_json<S: ::serde::Serializer>(
2311        v: &Self,
2312        s: S,
2313    ) -> ::core::result::Result<S::Ok, S::Error> {
2314        ::serde::Serialize::serialize(v, s)
2315    }
2316    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2317        d: D,
2318    ) -> ::core::result::Result<Self, D::Error> {
2319        <Self as ::serde::Deserialize>::deserialize(d)
2320    }
2321}
2322impl ::buffa::Enumeration for FlowStep {
2323    fn from_i32(value: i32) -> ::core::option::Option<Self> {
2324        match value {
2325            0i32 => ::core::option::Option::Some(Self::FLOW_STEP_UNSPECIFIED),
2326            1i32 => ::core::option::Option::Some(Self::FLOW_STEP_SOURCE),
2327            2i32 => ::core::option::Option::Some(Self::FLOW_STEP_TRANSFER),
2328            3i32 => ::core::option::Option::Some(Self::FLOW_STEP_REQUEST),
2329            4i32 => ::core::option::Option::Some(Self::FLOW_STEP_VALIDATION),
2330            5i32 => ::core::option::Option::Some(Self::FLOW_STEP_EXECUTION),
2331            6i32 => ::core::option::Option::Some(Self::FLOW_STEP_BRIDGE_FULFILLMENT),
2332            7i32 => ::core::option::Option::Some(Self::FLOW_STEP_DROPPED),
2333            8i32 => ::core::option::Option::Some(Self::FLOW_STEP_FAILED),
2334            9i32 => ::core::option::Option::Some(Self::FLOW_STEP_REFUNDED),
2335            10i32 => ::core::option::Option::Some(Self::FLOW_STEP_FULFILLING),
2336            11i32 => ::core::option::Option::Some(Self::FLOW_STEP_SETTLEMENT),
2337            _ => ::core::option::Option::None,
2338        }
2339    }
2340    fn to_i32(&self) -> i32 {
2341        *self as i32
2342    }
2343    fn proto_name(&self) -> &'static str {
2344        match self {
2345            Self::FLOW_STEP_UNSPECIFIED => "FLOW_STEP_UNSPECIFIED",
2346            Self::FLOW_STEP_SOURCE => "FLOW_STEP_SOURCE",
2347            Self::FLOW_STEP_TRANSFER => "FLOW_STEP_TRANSFER",
2348            Self::FLOW_STEP_REQUEST => "FLOW_STEP_REQUEST",
2349            Self::FLOW_STEP_VALIDATION => "FLOW_STEP_VALIDATION",
2350            Self::FLOW_STEP_EXECUTION => "FLOW_STEP_EXECUTION",
2351            Self::FLOW_STEP_BRIDGE_FULFILLMENT => "FLOW_STEP_BRIDGE_FULFILLMENT",
2352            Self::FLOW_STEP_DROPPED => "FLOW_STEP_DROPPED",
2353            Self::FLOW_STEP_FAILED => "FLOW_STEP_FAILED",
2354            Self::FLOW_STEP_REFUNDED => "FLOW_STEP_REFUNDED",
2355            Self::FLOW_STEP_FULFILLING => "FLOW_STEP_FULFILLING",
2356            Self::FLOW_STEP_SETTLEMENT => "FLOW_STEP_SETTLEMENT",
2357        }
2358    }
2359    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2360        match name {
2361            "FLOW_STEP_UNSPECIFIED" => {
2362                ::core::option::Option::Some(Self::FLOW_STEP_UNSPECIFIED)
2363            }
2364            "FLOW_STEP_SOURCE" => ::core::option::Option::Some(Self::FLOW_STEP_SOURCE),
2365            "FLOW_STEP_TRANSFER" => {
2366                ::core::option::Option::Some(Self::FLOW_STEP_TRANSFER)
2367            }
2368            "FLOW_STEP_REQUEST" => ::core::option::Option::Some(Self::FLOW_STEP_REQUEST),
2369            "FLOW_STEP_VALIDATION" => {
2370                ::core::option::Option::Some(Self::FLOW_STEP_VALIDATION)
2371            }
2372            "FLOW_STEP_EXECUTION" => {
2373                ::core::option::Option::Some(Self::FLOW_STEP_EXECUTION)
2374            }
2375            "FLOW_STEP_BRIDGE_FULFILLMENT" => {
2376                ::core::option::Option::Some(Self::FLOW_STEP_BRIDGE_FULFILLMENT)
2377            }
2378            "FLOW_STEP_DROPPED" => ::core::option::Option::Some(Self::FLOW_STEP_DROPPED),
2379            "FLOW_STEP_FAILED" => ::core::option::Option::Some(Self::FLOW_STEP_FAILED),
2380            "FLOW_STEP_REFUNDED" => {
2381                ::core::option::Option::Some(Self::FLOW_STEP_REFUNDED)
2382            }
2383            "FLOW_STEP_FULFILLING" => {
2384                ::core::option::Option::Some(Self::FLOW_STEP_FULFILLING)
2385            }
2386            "FLOW_STEP_SETTLEMENT" => {
2387                ::core::option::Option::Some(Self::FLOW_STEP_SETTLEMENT)
2388            }
2389            _ => ::core::option::Option::None,
2390        }
2391    }
2392    fn values() -> &'static [Self] {
2393        &[
2394            Self::FLOW_STEP_UNSPECIFIED,
2395            Self::FLOW_STEP_SOURCE,
2396            Self::FLOW_STEP_TRANSFER,
2397            Self::FLOW_STEP_REQUEST,
2398            Self::FLOW_STEP_VALIDATION,
2399            Self::FLOW_STEP_EXECUTION,
2400            Self::FLOW_STEP_BRIDGE_FULFILLMENT,
2401            Self::FLOW_STEP_DROPPED,
2402            Self::FLOW_STEP_FAILED,
2403            Self::FLOW_STEP_REFUNDED,
2404            Self::FLOW_STEP_FULFILLING,
2405            Self::FLOW_STEP_SETTLEMENT,
2406        ]
2407    }
2408}
2409#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2410#[repr(i32)]
2411pub enum FlowStepActivityKind {
2412    /// Activity kind is not specified.
2413    ACTIVITY_UNSPECIFIED = 0i32,
2414    /// Mapped asset was minted on Polyester Chain.
2415    ACTIVITY_MINTED = 1i32,
2416    /// Funding account received the credit.
2417    ACTIVITY_FUNDING = 2i32,
2418    /// Trading account received the credit.
2419    ACTIVITY_TRADING = 3i32,
2420}
2421impl FlowStepActivityKind {
2422    ///Idiomatic alias for [`Self::ACTIVITY_UNSPECIFIED`]; `Debug` prints the variant name.
2423    #[allow(non_upper_case_globals)]
2424    pub const ActivityUnspecified: Self = Self::ACTIVITY_UNSPECIFIED;
2425    ///Idiomatic alias for [`Self::ACTIVITY_MINTED`]; `Debug` prints the variant name.
2426    #[allow(non_upper_case_globals)]
2427    pub const ActivityMinted: Self = Self::ACTIVITY_MINTED;
2428    ///Idiomatic alias for [`Self::ACTIVITY_FUNDING`]; `Debug` prints the variant name.
2429    #[allow(non_upper_case_globals)]
2430    pub const ActivityFunding: Self = Self::ACTIVITY_FUNDING;
2431    ///Idiomatic alias for [`Self::ACTIVITY_TRADING`]; `Debug` prints the variant name.
2432    #[allow(non_upper_case_globals)]
2433    pub const ActivityTrading: Self = Self::ACTIVITY_TRADING;
2434}
2435impl ::core::default::Default for FlowStepActivityKind {
2436    fn default() -> Self {
2437        Self::ACTIVITY_UNSPECIFIED
2438    }
2439}
2440impl ::serde::Serialize for FlowStepActivityKind {
2441    fn serialize<S: ::serde::Serializer>(
2442        &self,
2443        s: S,
2444    ) -> ::core::result::Result<S::Ok, S::Error> {
2445        s.serialize_str(::buffa::Enumeration::proto_name(self))
2446    }
2447}
2448impl<'de> ::serde::Deserialize<'de> for FlowStepActivityKind {
2449    fn deserialize<D: ::serde::Deserializer<'de>>(
2450        d: D,
2451    ) -> ::core::result::Result<Self, D::Error> {
2452        struct _V;
2453        impl ::serde::de::Visitor<'_> for _V {
2454            type Value = FlowStepActivityKind;
2455            fn expecting(
2456                &self,
2457                f: &mut ::core::fmt::Formatter<'_>,
2458            ) -> ::core::fmt::Result {
2459                f.write_str(
2460                    concat!(
2461                        "a string, integer, or null for ",
2462                        stringify!(FlowStepActivityKind)
2463                    ),
2464                )
2465            }
2466            fn visit_str<E: ::serde::de::Error>(
2467                self,
2468                v: &str,
2469            ) -> ::core::result::Result<FlowStepActivityKind, E> {
2470                <FlowStepActivityKind as ::buffa::Enumeration>::from_proto_name(v)
2471                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2472            }
2473            fn visit_i64<E: ::serde::de::Error>(
2474                self,
2475                v: i64,
2476            ) -> ::core::result::Result<FlowStepActivityKind, E> {
2477                let v32 = i32::try_from(v)
2478                    .map_err(|_| {
2479                        ::serde::de::Error::custom(
2480                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
2481                        )
2482                    })?;
2483                <FlowStepActivityKind as ::buffa::Enumeration>::from_i32(v32)
2484                    .ok_or_else(|| {
2485                        ::serde::de::Error::custom(
2486                            ::buffa::alloc::format!("unknown enum value {v32}"),
2487                        )
2488                    })
2489            }
2490            fn visit_u64<E: ::serde::de::Error>(
2491                self,
2492                v: u64,
2493            ) -> ::core::result::Result<FlowStepActivityKind, E> {
2494                let v32 = i32::try_from(v)
2495                    .map_err(|_| {
2496                        ::serde::de::Error::custom(
2497                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
2498                        )
2499                    })?;
2500                <FlowStepActivityKind as ::buffa::Enumeration>::from_i32(v32)
2501                    .ok_or_else(|| {
2502                        ::serde::de::Error::custom(
2503                            ::buffa::alloc::format!("unknown enum value {v32}"),
2504                        )
2505                    })
2506            }
2507            fn visit_unit<E: ::serde::de::Error>(
2508                self,
2509            ) -> ::core::result::Result<FlowStepActivityKind, E> {
2510                ::core::result::Result::Ok(::core::default::Default::default())
2511            }
2512        }
2513        d.deserialize_any(_V)
2514    }
2515}
2516impl ::buffa::json_helpers::ProtoElemJson for FlowStepActivityKind {
2517    fn serialize_proto_json<S: ::serde::Serializer>(
2518        v: &Self,
2519        s: S,
2520    ) -> ::core::result::Result<S::Ok, S::Error> {
2521        ::serde::Serialize::serialize(v, s)
2522    }
2523    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2524        d: D,
2525    ) -> ::core::result::Result<Self, D::Error> {
2526        <Self as ::serde::Deserialize>::deserialize(d)
2527    }
2528}
2529impl ::buffa::Enumeration for FlowStepActivityKind {
2530    fn from_i32(value: i32) -> ::core::option::Option<Self> {
2531        match value {
2532            0i32 => ::core::option::Option::Some(Self::ACTIVITY_UNSPECIFIED),
2533            1i32 => ::core::option::Option::Some(Self::ACTIVITY_MINTED),
2534            2i32 => ::core::option::Option::Some(Self::ACTIVITY_FUNDING),
2535            3i32 => ::core::option::Option::Some(Self::ACTIVITY_TRADING),
2536            _ => ::core::option::Option::None,
2537        }
2538    }
2539    fn to_i32(&self) -> i32 {
2540        *self as i32
2541    }
2542    fn proto_name(&self) -> &'static str {
2543        match self {
2544            Self::ACTIVITY_UNSPECIFIED => "ACTIVITY_UNSPECIFIED",
2545            Self::ACTIVITY_MINTED => "ACTIVITY_MINTED",
2546            Self::ACTIVITY_FUNDING => "ACTIVITY_FUNDING",
2547            Self::ACTIVITY_TRADING => "ACTIVITY_TRADING",
2548        }
2549    }
2550    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2551        match name {
2552            "ACTIVITY_UNSPECIFIED" => {
2553                ::core::option::Option::Some(Self::ACTIVITY_UNSPECIFIED)
2554            }
2555            "ACTIVITY_MINTED" => ::core::option::Option::Some(Self::ACTIVITY_MINTED),
2556            "ACTIVITY_FUNDING" => ::core::option::Option::Some(Self::ACTIVITY_FUNDING),
2557            "ACTIVITY_TRADING" => ::core::option::Option::Some(Self::ACTIVITY_TRADING),
2558            _ => ::core::option::Option::None,
2559        }
2560    }
2561    fn values() -> &'static [Self] {
2562        &[
2563            Self::ACTIVITY_UNSPECIFIED,
2564            Self::ACTIVITY_MINTED,
2565            Self::ACTIVITY_FUNDING,
2566            Self::ACTIVITY_TRADING,
2567        ]
2568    }
2569}
2570/// FlowTimelineStatus describes how a progress timeline item relates to the
2571/// current user-facing flow state.
2572#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2573#[repr(i32)]
2574pub enum FlowTimelineStatus {
2575    /// Timeline status is not specified.
2576    TIMELINE_STATUS_UNSPECIFIED = 0i32,
2577    /// Step has been observed or is behind the current progress step.
2578    TIMELINE_STATUS_COMPLETED = 1i32,
2579    /// Step is the current active progress step.
2580    TIMELINE_STATUS_CURRENT = 2i32,
2581    /// Step is expected but has not been observed yet.
2582    TIMELINE_STATUS_PLANNED = 3i32,
2583}
2584impl FlowTimelineStatus {
2585    ///Idiomatic alias for [`Self::TIMELINE_STATUS_UNSPECIFIED`]; `Debug` prints the variant name.
2586    #[allow(non_upper_case_globals)]
2587    pub const TimelineStatusUnspecified: Self = Self::TIMELINE_STATUS_UNSPECIFIED;
2588    ///Idiomatic alias for [`Self::TIMELINE_STATUS_COMPLETED`]; `Debug` prints the variant name.
2589    #[allow(non_upper_case_globals)]
2590    pub const TimelineStatusCompleted: Self = Self::TIMELINE_STATUS_COMPLETED;
2591    ///Idiomatic alias for [`Self::TIMELINE_STATUS_CURRENT`]; `Debug` prints the variant name.
2592    #[allow(non_upper_case_globals)]
2593    pub const TimelineStatusCurrent: Self = Self::TIMELINE_STATUS_CURRENT;
2594    ///Idiomatic alias for [`Self::TIMELINE_STATUS_PLANNED`]; `Debug` prints the variant name.
2595    #[allow(non_upper_case_globals)]
2596    pub const TimelineStatusPlanned: Self = Self::TIMELINE_STATUS_PLANNED;
2597}
2598impl ::core::default::Default for FlowTimelineStatus {
2599    fn default() -> Self {
2600        Self::TIMELINE_STATUS_UNSPECIFIED
2601    }
2602}
2603impl ::serde::Serialize for FlowTimelineStatus {
2604    fn serialize<S: ::serde::Serializer>(
2605        &self,
2606        s: S,
2607    ) -> ::core::result::Result<S::Ok, S::Error> {
2608        s.serialize_str(::buffa::Enumeration::proto_name(self))
2609    }
2610}
2611impl<'de> ::serde::Deserialize<'de> for FlowTimelineStatus {
2612    fn deserialize<D: ::serde::Deserializer<'de>>(
2613        d: D,
2614    ) -> ::core::result::Result<Self, D::Error> {
2615        struct _V;
2616        impl ::serde::de::Visitor<'_> for _V {
2617            type Value = FlowTimelineStatus;
2618            fn expecting(
2619                &self,
2620                f: &mut ::core::fmt::Formatter<'_>,
2621            ) -> ::core::fmt::Result {
2622                f.write_str(
2623                    concat!(
2624                        "a string, integer, or null for ", stringify!(FlowTimelineStatus)
2625                    ),
2626                )
2627            }
2628            fn visit_str<E: ::serde::de::Error>(
2629                self,
2630                v: &str,
2631            ) -> ::core::result::Result<FlowTimelineStatus, E> {
2632                <FlowTimelineStatus as ::buffa::Enumeration>::from_proto_name(v)
2633                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2634            }
2635            fn visit_i64<E: ::serde::de::Error>(
2636                self,
2637                v: i64,
2638            ) -> ::core::result::Result<FlowTimelineStatus, E> {
2639                let v32 = i32::try_from(v)
2640                    .map_err(|_| {
2641                        ::serde::de::Error::custom(
2642                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
2643                        )
2644                    })?;
2645                <FlowTimelineStatus as ::buffa::Enumeration>::from_i32(v32)
2646                    .ok_or_else(|| {
2647                        ::serde::de::Error::custom(
2648                            ::buffa::alloc::format!("unknown enum value {v32}"),
2649                        )
2650                    })
2651            }
2652            fn visit_u64<E: ::serde::de::Error>(
2653                self,
2654                v: u64,
2655            ) -> ::core::result::Result<FlowTimelineStatus, E> {
2656                let v32 = i32::try_from(v)
2657                    .map_err(|_| {
2658                        ::serde::de::Error::custom(
2659                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
2660                        )
2661                    })?;
2662                <FlowTimelineStatus as ::buffa::Enumeration>::from_i32(v32)
2663                    .ok_or_else(|| {
2664                        ::serde::de::Error::custom(
2665                            ::buffa::alloc::format!("unknown enum value {v32}"),
2666                        )
2667                    })
2668            }
2669            fn visit_unit<E: ::serde::de::Error>(
2670                self,
2671            ) -> ::core::result::Result<FlowTimelineStatus, E> {
2672                ::core::result::Result::Ok(::core::default::Default::default())
2673            }
2674        }
2675        d.deserialize_any(_V)
2676    }
2677}
2678impl ::buffa::json_helpers::ProtoElemJson for FlowTimelineStatus {
2679    fn serialize_proto_json<S: ::serde::Serializer>(
2680        v: &Self,
2681        s: S,
2682    ) -> ::core::result::Result<S::Ok, S::Error> {
2683        ::serde::Serialize::serialize(v, s)
2684    }
2685    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2686        d: D,
2687    ) -> ::core::result::Result<Self, D::Error> {
2688        <Self as ::serde::Deserialize>::deserialize(d)
2689    }
2690}
2691impl ::buffa::Enumeration for FlowTimelineStatus {
2692    fn from_i32(value: i32) -> ::core::option::Option<Self> {
2693        match value {
2694            0i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_UNSPECIFIED),
2695            1i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_COMPLETED),
2696            2i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_CURRENT),
2697            3i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_PLANNED),
2698            _ => ::core::option::Option::None,
2699        }
2700    }
2701    fn to_i32(&self) -> i32 {
2702        *self as i32
2703    }
2704    fn proto_name(&self) -> &'static str {
2705        match self {
2706            Self::TIMELINE_STATUS_UNSPECIFIED => "TIMELINE_STATUS_UNSPECIFIED",
2707            Self::TIMELINE_STATUS_COMPLETED => "TIMELINE_STATUS_COMPLETED",
2708            Self::TIMELINE_STATUS_CURRENT => "TIMELINE_STATUS_CURRENT",
2709            Self::TIMELINE_STATUS_PLANNED => "TIMELINE_STATUS_PLANNED",
2710        }
2711    }
2712    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2713        match name {
2714            "TIMELINE_STATUS_UNSPECIFIED" => {
2715                ::core::option::Option::Some(Self::TIMELINE_STATUS_UNSPECIFIED)
2716            }
2717            "TIMELINE_STATUS_COMPLETED" => {
2718                ::core::option::Option::Some(Self::TIMELINE_STATUS_COMPLETED)
2719            }
2720            "TIMELINE_STATUS_CURRENT" => {
2721                ::core::option::Option::Some(Self::TIMELINE_STATUS_CURRENT)
2722            }
2723            "TIMELINE_STATUS_PLANNED" => {
2724                ::core::option::Option::Some(Self::TIMELINE_STATUS_PLANNED)
2725            }
2726            _ => ::core::option::Option::None,
2727        }
2728    }
2729    fn values() -> &'static [Self] {
2730        &[
2731            Self::TIMELINE_STATUS_UNSPECIFIED,
2732            Self::TIMELINE_STATUS_COMPLETED,
2733            Self::TIMELINE_STATUS_CURRENT,
2734            Self::TIMELINE_STATUS_PLANNED,
2735        ]
2736    }
2737}
2738/// GetFlowResponse returns one lifecycle flow with summary, factual steps, and
2739/// estimated timeline data when available.
2740#[derive(Clone, PartialEq, Default)]
2741#[derive(::serde::Serialize, ::serde::Deserialize)]
2742#[serde(default)]
2743pub struct GetFlowResponse {
2744    /// Lifecycle flow detail for the requested intent id.
2745    ///
2746    /// Field 1: `flow`
2747    #[serde(
2748        rename = "flow",
2749        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2750    )]
2751    pub flow: ::buffa::MessageField<FlowDetailView>,
2752    #[serde(skip)]
2753    #[doc(hidden)]
2754    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2755}
2756impl ::core::fmt::Debug for GetFlowResponse {
2757    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2758        f.debug_struct("GetFlowResponse").field("flow", &self.flow).finish()
2759    }
2760}
2761impl GetFlowResponse {
2762    /// Protobuf type URL for this message, for use with `Any::pack` and
2763    /// `Any::unpack_if`.
2764    ///
2765    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2766    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
2767}
2768::buffa::impl_default_instance!(GetFlowResponse);
2769impl ::buffa::MessageName for GetFlowResponse {
2770    const PACKAGE: &'static str = "chain.lifecycle.v1";
2771    const NAME: &'static str = "GetFlowResponse";
2772    const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowResponse";
2773    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
2774}
2775impl ::buffa::Message for GetFlowResponse {
2776    /// Returns the total encoded size in bytes.
2777    ///
2778    /// The result is a `u32`; the protobuf specification requires all
2779    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2780    /// compliant message will never overflow this type.
2781    #[allow(clippy::let_and_return)]
2782    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2783        #[allow(unused_imports)]
2784        use ::buffa::Enumeration as _;
2785        let mut size = 0u32;
2786        if self.flow.is_set() {
2787            let __slot = __cache.reserve();
2788            let inner_size = self.flow.compute_size(__cache);
2789            __cache.set(__slot, inner_size);
2790            size
2791                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2792                    + inner_size;
2793        }
2794        size += self.__buffa_unknown_fields.encoded_len() as u32;
2795        size
2796    }
2797    fn write_to(
2798        &self,
2799        __cache: &mut ::buffa::SizeCache,
2800        buf: &mut impl ::buffa::bytes::BufMut,
2801    ) {
2802        #[allow(unused_imports)]
2803        use ::buffa::Enumeration as _;
2804        if self.flow.is_set() {
2805            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
2806            self.flow.write_to(__cache, buf);
2807        }
2808        self.__buffa_unknown_fields.write_to(buf);
2809    }
2810    fn merge_field(
2811        &mut self,
2812        tag: ::buffa::encoding::Tag,
2813        buf: &mut impl ::buffa::bytes::Buf,
2814        ctx: ::buffa::DecodeContext<'_>,
2815    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2816        #[allow(unused_imports)]
2817        use ::buffa::bytes::Buf as _;
2818        #[allow(unused_imports)]
2819        use ::buffa::Enumeration as _;
2820        match tag.field_number() {
2821            1u32 => {
2822                ::buffa::encoding::check_wire_type(
2823                    tag,
2824                    ::buffa::encoding::WireType::LengthDelimited,
2825                )?;
2826                ::buffa::Message::merge_length_delimited(
2827                    self.flow.get_or_insert_default(),
2828                    buf,
2829                    ctx,
2830                )?;
2831            }
2832            _ => {
2833                self.__buffa_unknown_fields
2834                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2835            }
2836        }
2837        ::core::result::Result::Ok(())
2838    }
2839    fn clear(&mut self) {
2840        self.flow = ::buffa::MessageField::none();
2841        self.__buffa_unknown_fields.clear();
2842    }
2843}
2844impl ::buffa::ExtensionSet for GetFlowResponse {
2845    const PROTO_FQN: &'static str = "chain.lifecycle.v1.GetFlowResponse";
2846    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2847        &self.__buffa_unknown_fields
2848    }
2849    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2850        &mut self.__buffa_unknown_fields
2851    }
2852}
2853impl ::buffa::json_helpers::ProtoElemJson for GetFlowResponse {
2854    fn serialize_proto_json<S: ::serde::Serializer>(
2855        v: &Self,
2856        s: S,
2857    ) -> ::core::result::Result<S::Ok, S::Error> {
2858        ::serde::Serialize::serialize(v, s)
2859    }
2860    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2861        d: D,
2862    ) -> ::core::result::Result<Self, D::Error> {
2863        <Self as ::serde::Deserialize>::deserialize(d)
2864    }
2865}
2866#[doc(hidden)]
2867pub const __GET_FLOW_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2868    type_url: "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse",
2869    to_json: ::buffa::type_registry::any_to_json::<GetFlowResponse>,
2870    from_json: ::buffa::type_registry::any_from_json::<GetFlowResponse>,
2871    is_wkt: false,
2872};
2873/// GetFlowByIdRequest selects one lifecycle flow by its public flow id.
2874#[derive(Clone, PartialEq, Default)]
2875#[derive(::serde::Serialize, ::serde::Deserialize)]
2876#[serde(default)]
2877pub struct GetFlowByIdRequest {
2878    /// Public, URL-safe lifecycle identifier returned by list/search responses.
2879    ///
2880    /// Field 1: `flow_id`
2881    #[serde(
2882        rename = "flowId",
2883        alias = "flow_id",
2884        with = "::buffa::json_helpers::proto_string",
2885        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2886    )]
2887    pub flow_id: ::buffa::alloc::string::String,
2888    #[serde(skip)]
2889    #[doc(hidden)]
2890    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2891}
2892impl ::core::fmt::Debug for GetFlowByIdRequest {
2893    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2894        f.debug_struct("GetFlowByIdRequest").field("flow_id", &self.flow_id).finish()
2895    }
2896}
2897impl GetFlowByIdRequest {
2898    /// Protobuf type URL for this message, for use with `Any::pack` and
2899    /// `Any::unpack_if`.
2900    ///
2901    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2902    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
2903}
2904::buffa::impl_default_instance!(GetFlowByIdRequest);
2905impl ::buffa::MessageName for GetFlowByIdRequest {
2906    const PACKAGE: &'static str = "chain.lifecycle.v1";
2907    const NAME: &'static str = "GetFlowByIdRequest";
2908    const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
2909    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
2910}
2911impl ::buffa::Message for GetFlowByIdRequest {
2912    /// Returns the total encoded size in bytes.
2913    ///
2914    /// The result is a `u32`; the protobuf specification requires all
2915    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2916    /// compliant message will never overflow this type.
2917    #[allow(clippy::let_and_return)]
2918    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2919        #[allow(unused_imports)]
2920        use ::buffa::Enumeration as _;
2921        let mut size = 0u32;
2922        if !self.flow_id.is_empty() {
2923            size += 1u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
2924        }
2925        size += self.__buffa_unknown_fields.encoded_len() as u32;
2926        size
2927    }
2928    fn write_to(
2929        &self,
2930        _cache: &mut ::buffa::SizeCache,
2931        buf: &mut impl ::buffa::bytes::BufMut,
2932    ) {
2933        #[allow(unused_imports)]
2934        use ::buffa::Enumeration as _;
2935        if !self.flow_id.is_empty() {
2936            ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
2937        }
2938        self.__buffa_unknown_fields.write_to(buf);
2939    }
2940    fn merge_field(
2941        &mut self,
2942        tag: ::buffa::encoding::Tag,
2943        buf: &mut impl ::buffa::bytes::Buf,
2944        ctx: ::buffa::DecodeContext<'_>,
2945    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2946        #[allow(unused_imports)]
2947        use ::buffa::bytes::Buf as _;
2948        #[allow(unused_imports)]
2949        use ::buffa::Enumeration as _;
2950        match tag.field_number() {
2951            1u32 => {
2952                ::buffa::encoding::check_wire_type(
2953                    tag,
2954                    ::buffa::encoding::WireType::LengthDelimited,
2955                )?;
2956                ::buffa::types::merge_string(&mut self.flow_id, buf)?;
2957            }
2958            _ => {
2959                self.__buffa_unknown_fields
2960                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2961            }
2962        }
2963        ::core::result::Result::Ok(())
2964    }
2965    fn clear(&mut self) {
2966        self.flow_id.clear();
2967        self.__buffa_unknown_fields.clear();
2968    }
2969}
2970impl ::buffa::ExtensionSet for GetFlowByIdRequest {
2971    const PROTO_FQN: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
2972    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2973        &self.__buffa_unknown_fields
2974    }
2975    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2976        &mut self.__buffa_unknown_fields
2977    }
2978}
2979impl ::buffa::json_helpers::ProtoElemJson for GetFlowByIdRequest {
2980    fn serialize_proto_json<S: ::serde::Serializer>(
2981        v: &Self,
2982        s: S,
2983    ) -> ::core::result::Result<S::Ok, S::Error> {
2984        ::serde::Serialize::serialize(v, s)
2985    }
2986    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2987        d: D,
2988    ) -> ::core::result::Result<Self, D::Error> {
2989        <Self as ::serde::Deserialize>::deserialize(d)
2990    }
2991}
2992#[doc(hidden)]
2993pub const __GET_FLOW_BY_ID_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2994    type_url: "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest",
2995    to_json: ::buffa::type_registry::any_to_json::<GetFlowByIdRequest>,
2996    from_json: ::buffa::type_registry::any_from_json::<GetFlowByIdRequest>,
2997    is_wkt: false,
2998};
2999/// ListFlowsByTxRequest searches lifecycle flows by transaction identifier. A
3000/// single chain transaction can map to zero, one, or many lifecycle flows.
3001#[derive(Clone, PartialEq, Default)]
3002#[derive(::serde::Serialize, ::serde::Deserialize)]
3003#[serde(default)]
3004pub struct ListFlowsByTxRequest {
3005    /// Chain transaction identifier to search for. Accepts a 0x-prefixed 32-byte
3006    /// EVM hash or a printable chain-native transaction id such as a Solana
3007    /// signature, Bitcoin txid, Litecoin txid, Dogecoin txid, or XRP transaction
3008    /// hash.
3009    ///
3010    /// Field 1: `tx_hash`
3011    #[serde(
3012        rename = "txHash",
3013        alias = "tx_hash",
3014        with = "::buffa::json_helpers::proto_string",
3015        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3016    )]
3017    pub tx_hash: ::buffa::alloc::string::String,
3018    /// Lookup mode that determines which transaction references are searched.
3019    ///
3020    /// Field 2: `lookup_kind`
3021    #[serde(
3022        rename = "lookupKind",
3023        alias = "lookup_kind",
3024        with = "::buffa::json_helpers::proto_enum",
3025        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3026    )]
3027    pub lookup_kind: ::buffa::EnumValue<TxLookupKind>,
3028    /// Maximum number of matches to return. Defaults to 100 when omitted; maximum
3029    /// is 500.
3030    ///
3031    /// Field 3: `limit`
3032    #[serde(
3033        rename = "limit",
3034        with = "::buffa::json_helpers::uint32",
3035        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
3036    )]
3037    pub limit: u32,
3038    /// Opaque keyset cursor returned by a previous response. The cursor is
3039    /// exclusive and bound to the transaction hash and lookup mode.
3040    ///
3041    /// Field 4: `page_token`
3042    #[serde(
3043        rename = "pageToken",
3044        alias = "page_token",
3045        with = "::buffa::json_helpers::proto_string",
3046        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3047    )]
3048    pub page_token: ::buffa::alloc::string::String,
3049    #[serde(skip)]
3050    #[doc(hidden)]
3051    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3052}
3053impl ::core::fmt::Debug for ListFlowsByTxRequest {
3054    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3055        f.debug_struct("ListFlowsByTxRequest")
3056            .field("tx_hash", &self.tx_hash)
3057            .field("lookup_kind", &self.lookup_kind)
3058            .field("limit", &self.limit)
3059            .field("page_token", &self.page_token)
3060            .finish()
3061    }
3062}
3063impl ListFlowsByTxRequest {
3064    /// Protobuf type URL for this message, for use with `Any::pack` and
3065    /// `Any::unpack_if`.
3066    ///
3067    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3068    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
3069}
3070::buffa::impl_default_instance!(ListFlowsByTxRequest);
3071impl ::buffa::MessageName for ListFlowsByTxRequest {
3072    const PACKAGE: &'static str = "chain.lifecycle.v1";
3073    const NAME: &'static str = "ListFlowsByTxRequest";
3074    const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
3075    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
3076}
3077impl ::buffa::Message for ListFlowsByTxRequest {
3078    /// Returns the total encoded size in bytes.
3079    ///
3080    /// The result is a `u32`; the protobuf specification requires all
3081    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3082    /// compliant message will never overflow this type.
3083    #[allow(clippy::let_and_return)]
3084    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3085        #[allow(unused_imports)]
3086        use ::buffa::Enumeration as _;
3087        let mut size = 0u32;
3088        if !self.tx_hash.is_empty() {
3089            size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
3090        }
3091        {
3092            let val = self.lookup_kind.to_i32();
3093            if val != 0 {
3094                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3095            }
3096        }
3097        if self.limit != 0u32 {
3098            size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
3099        }
3100        if !self.page_token.is_empty() {
3101            size += 1u32 + ::buffa::types::string_encoded_len(&self.page_token) as u32;
3102        }
3103        size += self.__buffa_unknown_fields.encoded_len() as u32;
3104        size
3105    }
3106    fn write_to(
3107        &self,
3108        _cache: &mut ::buffa::SizeCache,
3109        buf: &mut impl ::buffa::bytes::BufMut,
3110    ) {
3111        #[allow(unused_imports)]
3112        use ::buffa::Enumeration as _;
3113        if !self.tx_hash.is_empty() {
3114            ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
3115        }
3116        {
3117            let val = self.lookup_kind.to_i32();
3118            if val != 0 {
3119                ::buffa::types::put_int32_field(2u32, val, buf);
3120            }
3121        }
3122        if self.limit != 0u32 {
3123            ::buffa::types::put_uint32_field(3u32, self.limit, buf);
3124        }
3125        if !self.page_token.is_empty() {
3126            ::buffa::types::put_string_field(4u32, &self.page_token, buf);
3127        }
3128        self.__buffa_unknown_fields.write_to(buf);
3129    }
3130    fn merge_field(
3131        &mut self,
3132        tag: ::buffa::encoding::Tag,
3133        buf: &mut impl ::buffa::bytes::Buf,
3134        ctx: ::buffa::DecodeContext<'_>,
3135    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3136        #[allow(unused_imports)]
3137        use ::buffa::bytes::Buf as _;
3138        #[allow(unused_imports)]
3139        use ::buffa::Enumeration as _;
3140        match tag.field_number() {
3141            1u32 => {
3142                ::buffa::encoding::check_wire_type(
3143                    tag,
3144                    ::buffa::encoding::WireType::LengthDelimited,
3145                )?;
3146                ::buffa::types::merge_string(&mut self.tx_hash, buf)?;
3147            }
3148            2u32 => {
3149                ::buffa::encoding::check_wire_type(
3150                    tag,
3151                    ::buffa::encoding::WireType::Varint,
3152                )?;
3153                self.lookup_kind = ::buffa::EnumValue::from(
3154                    ::buffa::types::decode_int32(buf)?,
3155                );
3156            }
3157            3u32 => {
3158                ::buffa::encoding::check_wire_type(
3159                    tag,
3160                    ::buffa::encoding::WireType::Varint,
3161                )?;
3162                self.limit = ::buffa::types::decode_uint32(buf)?;
3163            }
3164            4u32 => {
3165                ::buffa::encoding::check_wire_type(
3166                    tag,
3167                    ::buffa::encoding::WireType::LengthDelimited,
3168                )?;
3169                ::buffa::types::merge_string(&mut self.page_token, buf)?;
3170            }
3171            _ => {
3172                self.__buffa_unknown_fields
3173                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3174            }
3175        }
3176        ::core::result::Result::Ok(())
3177    }
3178    fn clear(&mut self) {
3179        self.tx_hash.clear();
3180        self.lookup_kind = ::buffa::EnumValue::from(0);
3181        self.limit = 0u32;
3182        self.page_token.clear();
3183        self.__buffa_unknown_fields.clear();
3184    }
3185}
3186impl ::buffa::ExtensionSet for ListFlowsByTxRequest {
3187    const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
3188    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3189        &self.__buffa_unknown_fields
3190    }
3191    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3192        &mut self.__buffa_unknown_fields
3193    }
3194}
3195impl ::buffa::json_helpers::ProtoElemJson for ListFlowsByTxRequest {
3196    fn serialize_proto_json<S: ::serde::Serializer>(
3197        v: &Self,
3198        s: S,
3199    ) -> ::core::result::Result<S::Ok, S::Error> {
3200        ::serde::Serialize::serialize(v, s)
3201    }
3202    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3203        d: D,
3204    ) -> ::core::result::Result<Self, D::Error> {
3205        <Self as ::serde::Deserialize>::deserialize(d)
3206    }
3207}
3208#[doc(hidden)]
3209pub const __LIST_FLOWS_BY_TX_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3210    type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest",
3211    to_json: ::buffa::type_registry::any_to_json::<ListFlowsByTxRequest>,
3212    from_json: ::buffa::type_registry::any_from_json::<ListFlowsByTxRequest>,
3213    is_wkt: false,
3214};
3215/// ListFlowsRequest filters and paginates lifecycle flow summaries.
3216#[derive(Clone, PartialEq, Default)]
3217#[derive(::serde::Serialize)]
3218#[serde(default)]
3219pub struct ListFlowsRequest {
3220    /// Maximum number of flows to return. Defaults to 100 when omitted; maximum is
3221    /// 500.
3222    ///
3223    /// Field 1: `limit`
3224    #[serde(
3225        rename = "limit",
3226        with = "::buffa::json_helpers::uint32",
3227        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
3228    )]
3229    pub limit: u32,
3230    /// Sort direction for the selected ordering timestamp.
3231    ///
3232    /// Field 2: `sort`
3233    #[serde(
3234        rename = "sort",
3235        with = "::buffa::json_helpers::proto_enum",
3236        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3237    )]
3238    pub sort: ::buffa::EnumValue<Sort>,
3239    /// Optional product flow kind filter. Unspecified includes all kinds.
3240    ///
3241    /// Field 3: `flow_kind`
3242    #[serde(
3243        rename = "flowKind",
3244        alias = "flow_kind",
3245        with = "::buffa::json_helpers::proto_enum",
3246        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3247    )]
3248    pub flow_kind: ::buffa::EnumValue<FlowKind>,
3249    /// Optional lifecycle state filter. Unspecified includes all states permitted
3250    /// by the selected scope.
3251    ///
3252    /// Field 4: `flow_state`
3253    #[serde(
3254        rename = "flowState",
3255        alias = "flow_state",
3256        with = "::buffa::json_helpers::proto_enum",
3257        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3258    )]
3259    pub flow_state: ::buffa::EnumValue<FlowState>,
3260    /// Optional transaction reference filter. Matches source or latest activity
3261    /// transaction identifiers across supported chains.
3262    ///
3263    /// Field 5: `tx_ref`
3264    #[serde(
3265        rename = "txRef",
3266        alias = "tx_ref",
3267        with = "::buffa::json_helpers::proto_string",
3268        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3269    )]
3270    pub tx_ref: ::buffa::alloc::string::String,
3271    /// Selects open, terminal, or all lifecycle flows.
3272    ///
3273    /// Field 6: `scope`
3274    #[serde(
3275        rename = "scope",
3276        with = "::buffa::json_helpers::proto_enum",
3277        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3278    )]
3279    pub scope: ::buffa::EnumValue<ListScope>,
3280    /// Optional Polyester Chain ids to include. Maximum 100 unique ids.
3281    ///
3282    /// Field 9: `polyester_chain_ids`
3283    #[serde(
3284        rename = "polyesterChainIds",
3285        alias = "polyester_chain_ids",
3286        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3287        deserialize_with = "::buffa::json_helpers::null_as_default"
3288    )]
3289    pub polyester_chain_ids: ::buffa::alloc::vec::Vec<u32>,
3290    /// Optional chain asset mapping ids to include. Maximum 100 unique ids.
3291    ///
3292    /// Field 10: `zipped_asset_ids`
3293    #[serde(
3294        rename = "zippedAssetIds",
3295        alias = "zipped_asset_ids",
3296        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3297        deserialize_with = "::buffa::json_helpers::null_as_default"
3298    )]
3299    pub zipped_asset_ids: ::buffa::alloc::vec::Vec<u32>,
3300    /// Optional unified asset ids to include. Maximum 100 unique ids.
3301    ///
3302    /// Field 11: `unified_asset_ids`
3303    #[serde(
3304        rename = "unifiedAssetIds",
3305        alias = "unified_asset_ids",
3306        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3307        deserialize_with = "::buffa::json_helpers::null_as_default"
3308    )]
3309    pub unified_asset_ids: ::buffa::alloc::vec::Vec<u32>,
3310    /// Opaque keyset cursor returned by a previous response. The cursor is
3311    /// exclusive and bound to the caller, filters, account selector, sort
3312    /// direction, and ordering timestamp.
3313    ///
3314    /// Field 12: `page_token`
3315    #[serde(
3316        rename = "pageToken",
3317        alias = "page_token",
3318        with = "::buffa::json_helpers::proto_string",
3319        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3320    )]
3321    pub page_token: ::buffa::alloc::string::String,
3322    /// Timestamp used for ordering and pagination. Defaults to last activity.
3323    ///
3324    /// Field 13: `order_by`
3325    #[serde(
3326        rename = "orderBy",
3327        alias = "order_by",
3328        with = "::buffa::json_helpers::proto_enum",
3329        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3330    )]
3331    pub order_by: ::buffa::EnumValue<ListOrderBy>,
3332    #[serde(flatten)]
3333    pub account_selector: ::core::option::Option<
3334        __buffa::oneof::list_flows_request::AccountSelector,
3335    >,
3336    #[serde(skip)]
3337    #[doc(hidden)]
3338    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3339}
3340impl ::core::fmt::Debug for ListFlowsRequest {
3341    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3342        f.debug_struct("ListFlowsRequest")
3343            .field("limit", &self.limit)
3344            .field("sort", &self.sort)
3345            .field("flow_kind", &self.flow_kind)
3346            .field("flow_state", &self.flow_state)
3347            .field("tx_ref", &self.tx_ref)
3348            .field("scope", &self.scope)
3349            .field("polyester_chain_ids", &self.polyester_chain_ids)
3350            .field("zipped_asset_ids", &self.zipped_asset_ids)
3351            .field("unified_asset_ids", &self.unified_asset_ids)
3352            .field("page_token", &self.page_token)
3353            .field("order_by", &self.order_by)
3354            .field("account_selector", &self.account_selector)
3355            .finish()
3356    }
3357}
3358impl ListFlowsRequest {
3359    /// Protobuf type URL for this message, for use with `Any::pack` and
3360    /// `Any::unpack_if`.
3361    ///
3362    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3363    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
3364}
3365::buffa::impl_default_instance!(ListFlowsRequest);
3366impl ::buffa::MessageName for ListFlowsRequest {
3367    const PACKAGE: &'static str = "chain.lifecycle.v1";
3368    const NAME: &'static str = "ListFlowsRequest";
3369    const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
3370    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
3371}
3372impl ::buffa::Message for ListFlowsRequest {
3373    /// Returns the total encoded size in bytes.
3374    ///
3375    /// The result is a `u32`; the protobuf specification requires all
3376    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3377    /// compliant message will never overflow this type.
3378    #[allow(clippy::let_and_return)]
3379    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3380        #[allow(unused_imports)]
3381        use ::buffa::Enumeration as _;
3382        let mut size = 0u32;
3383        if self.limit != 0u32 {
3384            size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
3385        }
3386        {
3387            let val = self.sort.to_i32();
3388            if val != 0 {
3389                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3390            }
3391        }
3392        {
3393            let val = self.flow_kind.to_i32();
3394            if val != 0 {
3395                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3396            }
3397        }
3398        {
3399            let val = self.flow_state.to_i32();
3400            if val != 0 {
3401                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3402            }
3403        }
3404        if !self.tx_ref.is_empty() {
3405            size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
3406        }
3407        {
3408            let val = self.scope.to_i32();
3409            if val != 0 {
3410                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3411            }
3412        }
3413        if let ::core::option::Option::Some(ref v) = self.account_selector {
3414            match v {
3415                __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3416                    _x,
3417                ) => {
3418                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
3419                }
3420                __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3421                    x,
3422                ) => {
3423                    size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
3424                }
3425            }
3426        }
3427        if !self.polyester_chain_ids.is_empty() {
3428            let payload: u32 = self
3429                .polyester_chain_ids
3430                .iter()
3431                .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3432                .sum::<u32>();
3433            size
3434                += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3435        }
3436        if !self.zipped_asset_ids.is_empty() {
3437            let payload: u32 = self
3438                .zipped_asset_ids
3439                .iter()
3440                .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3441                .sum::<u32>();
3442            size
3443                += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3444        }
3445        if !self.unified_asset_ids.is_empty() {
3446            let payload: u32 = self
3447                .unified_asset_ids
3448                .iter()
3449                .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3450                .sum::<u32>();
3451            size
3452                += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3453        }
3454        if !self.page_token.is_empty() {
3455            size += 1u32 + ::buffa::types::string_encoded_len(&self.page_token) as u32;
3456        }
3457        {
3458            let val = self.order_by.to_i32();
3459            if val != 0 {
3460                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3461            }
3462        }
3463        size += self.__buffa_unknown_fields.encoded_len() as u32;
3464        size
3465    }
3466    fn write_to(
3467        &self,
3468        _cache: &mut ::buffa::SizeCache,
3469        buf: &mut impl ::buffa::bytes::BufMut,
3470    ) {
3471        #[allow(unused_imports)]
3472        use ::buffa::Enumeration as _;
3473        if self.limit != 0u32 {
3474            ::buffa::types::put_uint32_field(1u32, self.limit, buf);
3475        }
3476        {
3477            let val = self.sort.to_i32();
3478            if val != 0 {
3479                ::buffa::types::put_int32_field(2u32, val, buf);
3480            }
3481        }
3482        {
3483            let val = self.flow_kind.to_i32();
3484            if val != 0 {
3485                ::buffa::types::put_int32_field(3u32, val, buf);
3486            }
3487        }
3488        {
3489            let val = self.flow_state.to_i32();
3490            if val != 0 {
3491                ::buffa::types::put_int32_field(4u32, val, buf);
3492            }
3493        }
3494        if !self.tx_ref.is_empty() {
3495            ::buffa::types::put_string_field(5u32, &self.tx_ref, buf);
3496        }
3497        {
3498            let val = self.scope.to_i32();
3499            if val != 0 {
3500                ::buffa::types::put_int32_field(6u32, val, buf);
3501            }
3502        }
3503        if let ::core::option::Option::Some(ref v) = self.account_selector {
3504            match v {
3505                __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3506                    x,
3507                ) => {
3508                    ::buffa::types::put_fixed64_field(7u32, *x, buf);
3509                }
3510                __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3511                    x,
3512                ) => {
3513                    ::buffa::types::put_string_field(8u32, x, buf);
3514                }
3515            }
3516        }
3517        if !self.polyester_chain_ids.is_empty() {
3518            let payload: u32 = self
3519                .polyester_chain_ids
3520                .iter()
3521                .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3522                .sum::<u32>();
3523            ::buffa::types::put_len_delimited_header(9u32, payload, buf);
3524            for &v in &self.polyester_chain_ids {
3525                ::buffa::types::encode_uint32(v, buf);
3526            }
3527        }
3528        if !self.zipped_asset_ids.is_empty() {
3529            let payload: u32 = self
3530                .zipped_asset_ids
3531                .iter()
3532                .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3533                .sum::<u32>();
3534            ::buffa::types::put_len_delimited_header(10u32, payload, buf);
3535            for &v in &self.zipped_asset_ids {
3536                ::buffa::types::encode_uint32(v, buf);
3537            }
3538        }
3539        if !self.unified_asset_ids.is_empty() {
3540            let payload: u32 = self
3541                .unified_asset_ids
3542                .iter()
3543                .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3544                .sum::<u32>();
3545            ::buffa::types::put_len_delimited_header(11u32, payload, buf);
3546            for &v in &self.unified_asset_ids {
3547                ::buffa::types::encode_uint32(v, buf);
3548            }
3549        }
3550        if !self.page_token.is_empty() {
3551            ::buffa::types::put_string_field(12u32, &self.page_token, buf);
3552        }
3553        {
3554            let val = self.order_by.to_i32();
3555            if val != 0 {
3556                ::buffa::types::put_int32_field(13u32, val, buf);
3557            }
3558        }
3559        self.__buffa_unknown_fields.write_to(buf);
3560    }
3561    fn merge_field(
3562        &mut self,
3563        tag: ::buffa::encoding::Tag,
3564        buf: &mut impl ::buffa::bytes::Buf,
3565        ctx: ::buffa::DecodeContext<'_>,
3566    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3567        #[allow(unused_imports)]
3568        use ::buffa::bytes::Buf as _;
3569        #[allow(unused_imports)]
3570        use ::buffa::Enumeration as _;
3571        match tag.field_number() {
3572            1u32 => {
3573                ::buffa::encoding::check_wire_type(
3574                    tag,
3575                    ::buffa::encoding::WireType::Varint,
3576                )?;
3577                self.limit = ::buffa::types::decode_uint32(buf)?;
3578            }
3579            2u32 => {
3580                ::buffa::encoding::check_wire_type(
3581                    tag,
3582                    ::buffa::encoding::WireType::Varint,
3583                )?;
3584                self.sort = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
3585            }
3586            3u32 => {
3587                ::buffa::encoding::check_wire_type(
3588                    tag,
3589                    ::buffa::encoding::WireType::Varint,
3590                )?;
3591                self.flow_kind = ::buffa::EnumValue::from(
3592                    ::buffa::types::decode_int32(buf)?,
3593                );
3594            }
3595            4u32 => {
3596                ::buffa::encoding::check_wire_type(
3597                    tag,
3598                    ::buffa::encoding::WireType::Varint,
3599                )?;
3600                self.flow_state = ::buffa::EnumValue::from(
3601                    ::buffa::types::decode_int32(buf)?,
3602                );
3603            }
3604            5u32 => {
3605                ::buffa::encoding::check_wire_type(
3606                    tag,
3607                    ::buffa::encoding::WireType::LengthDelimited,
3608                )?;
3609                ::buffa::types::merge_string(&mut self.tx_ref, buf)?;
3610            }
3611            6u32 => {
3612                ::buffa::encoding::check_wire_type(
3613                    tag,
3614                    ::buffa::encoding::WireType::Varint,
3615                )?;
3616                self.scope = ::buffa::EnumValue::from(
3617                    ::buffa::types::decode_int32(buf)?,
3618                );
3619            }
3620            7u32 => {
3621                ::buffa::encoding::check_wire_type(
3622                    tag,
3623                    ::buffa::encoding::WireType::Fixed64,
3624                )?;
3625                self.account_selector = ::core::option::Option::Some(
3626                    __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3627                        ::buffa::types::decode_fixed64(buf)?,
3628                    ),
3629                );
3630            }
3631            8u32 => {
3632                ::buffa::encoding::check_wire_type(
3633                    tag,
3634                    ::buffa::encoding::WireType::LengthDelimited,
3635                )?;
3636                self.account_selector = ::core::option::Option::Some(
3637                    __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3638                        ::buffa::types::decode_string(buf)?,
3639                    ),
3640                );
3641            }
3642            9u32 => {
3643                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3644                    let len = ::buffa::encoding::decode_varint(buf)?;
3645                    let len = usize::try_from(len)
3646                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3647                    if buf.remaining() < len {
3648                        return ::core::result::Result::Err(
3649                            ::buffa::DecodeError::UnexpectedEof,
3650                        );
3651                    }
3652                    self.polyester_chain_ids.reserve(len);
3653                    let mut limited = buf.take(len);
3654                    while limited.has_remaining() {
3655                        self.polyester_chain_ids
3656                            .push(::buffa::types::decode_uint32(&mut limited)?);
3657                    }
3658                    let leftover = limited.remaining();
3659                    if leftover > 0 {
3660                        limited.advance(leftover);
3661                    }
3662                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3663                    self.polyester_chain_ids.push(::buffa::types::decode_uint32(buf)?);
3664                } else {
3665                    return ::core::result::Result::Err(
3666                        ::buffa::encoding::wire_type_mismatch(
3667                            tag,
3668                            ::buffa::encoding::WireType::LengthDelimited,
3669                        ),
3670                    );
3671                }
3672            }
3673            10u32 => {
3674                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3675                    let len = ::buffa::encoding::decode_varint(buf)?;
3676                    let len = usize::try_from(len)
3677                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3678                    if buf.remaining() < len {
3679                        return ::core::result::Result::Err(
3680                            ::buffa::DecodeError::UnexpectedEof,
3681                        );
3682                    }
3683                    self.zipped_asset_ids.reserve(len);
3684                    let mut limited = buf.take(len);
3685                    while limited.has_remaining() {
3686                        self.zipped_asset_ids
3687                            .push(::buffa::types::decode_uint32(&mut limited)?);
3688                    }
3689                    let leftover = limited.remaining();
3690                    if leftover > 0 {
3691                        limited.advance(leftover);
3692                    }
3693                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3694                    self.zipped_asset_ids.push(::buffa::types::decode_uint32(buf)?);
3695                } else {
3696                    return ::core::result::Result::Err(
3697                        ::buffa::encoding::wire_type_mismatch(
3698                            tag,
3699                            ::buffa::encoding::WireType::LengthDelimited,
3700                        ),
3701                    );
3702                }
3703            }
3704            11u32 => {
3705                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3706                    let len = ::buffa::encoding::decode_varint(buf)?;
3707                    let len = usize::try_from(len)
3708                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3709                    if buf.remaining() < len {
3710                        return ::core::result::Result::Err(
3711                            ::buffa::DecodeError::UnexpectedEof,
3712                        );
3713                    }
3714                    self.unified_asset_ids.reserve(len);
3715                    let mut limited = buf.take(len);
3716                    while limited.has_remaining() {
3717                        self.unified_asset_ids
3718                            .push(::buffa::types::decode_uint32(&mut limited)?);
3719                    }
3720                    let leftover = limited.remaining();
3721                    if leftover > 0 {
3722                        limited.advance(leftover);
3723                    }
3724                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3725                    self.unified_asset_ids.push(::buffa::types::decode_uint32(buf)?);
3726                } else {
3727                    return ::core::result::Result::Err(
3728                        ::buffa::encoding::wire_type_mismatch(
3729                            tag,
3730                            ::buffa::encoding::WireType::LengthDelimited,
3731                        ),
3732                    );
3733                }
3734            }
3735            12u32 => {
3736                ::buffa::encoding::check_wire_type(
3737                    tag,
3738                    ::buffa::encoding::WireType::LengthDelimited,
3739                )?;
3740                ::buffa::types::merge_string(&mut self.page_token, buf)?;
3741            }
3742            13u32 => {
3743                ::buffa::encoding::check_wire_type(
3744                    tag,
3745                    ::buffa::encoding::WireType::Varint,
3746                )?;
3747                self.order_by = ::buffa::EnumValue::from(
3748                    ::buffa::types::decode_int32(buf)?,
3749                );
3750            }
3751            _ => {
3752                self.__buffa_unknown_fields
3753                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3754            }
3755        }
3756        ::core::result::Result::Ok(())
3757    }
3758    fn clear(&mut self) {
3759        self.limit = 0u32;
3760        self.sort = ::buffa::EnumValue::from(0);
3761        self.flow_kind = ::buffa::EnumValue::from(0);
3762        self.flow_state = ::buffa::EnumValue::from(0);
3763        self.tx_ref.clear();
3764        self.scope = ::buffa::EnumValue::from(0);
3765        self.account_selector = ::core::option::Option::None;
3766        self.polyester_chain_ids.clear();
3767        self.zipped_asset_ids.clear();
3768        self.unified_asset_ids.clear();
3769        self.page_token.clear();
3770        self.order_by = ::buffa::EnumValue::from(0);
3771        self.__buffa_unknown_fields.clear();
3772    }
3773}
3774impl ::buffa::ExtensionSet for ListFlowsRequest {
3775    const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
3776    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3777        &self.__buffa_unknown_fields
3778    }
3779    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3780        &mut self.__buffa_unknown_fields
3781    }
3782}
3783impl<'de> serde::Deserialize<'de> for ListFlowsRequest {
3784    fn deserialize<D: serde::Deserializer<'de>>(
3785        d: D,
3786    ) -> ::core::result::Result<Self, D::Error> {
3787        struct _V;
3788        impl<'de> serde::de::Visitor<'de> for _V {
3789            type Value = ListFlowsRequest;
3790            fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3791                f.write_str("struct ListFlowsRequest")
3792            }
3793            #[allow(clippy::field_reassign_with_default)]
3794            fn visit_map<A: serde::de::MapAccess<'de>>(
3795                self,
3796                mut map: A,
3797            ) -> ::core::result::Result<ListFlowsRequest, A::Error> {
3798                let mut __f_limit: ::core::option::Option<u32> = None;
3799                let mut __f_sort: ::core::option::Option<::buffa::EnumValue<Sort>> = None;
3800                let mut __f_flow_kind: ::core::option::Option<
3801                    ::buffa::EnumValue<FlowKind>,
3802                > = None;
3803                let mut __f_flow_state: ::core::option::Option<
3804                    ::buffa::EnumValue<FlowState>,
3805                > = None;
3806                let mut __f_tx_ref: ::core::option::Option<
3807                    ::buffa::alloc::string::String,
3808                > = None;
3809                let mut __f_scope: ::core::option::Option<
3810                    ::buffa::EnumValue<ListScope>,
3811                > = None;
3812                let mut __f_polyester_chain_ids: ::core::option::Option<
3813                    ::buffa::alloc::vec::Vec<u32>,
3814                > = None;
3815                let mut __f_zipped_asset_ids: ::core::option::Option<
3816                    ::buffa::alloc::vec::Vec<u32>,
3817                > = None;
3818                let mut __f_unified_asset_ids: ::core::option::Option<
3819                    ::buffa::alloc::vec::Vec<u32>,
3820                > = None;
3821                let mut __f_page_token: ::core::option::Option<
3822                    ::buffa::alloc::string::String,
3823                > = None;
3824                let mut __f_order_by: ::core::option::Option<
3825                    ::buffa::EnumValue<ListOrderBy>,
3826                > = None;
3827                let mut __oneof_account_selector: ::core::option::Option<
3828                    __buffa::oneof::list_flows_request::AccountSelector,
3829                > = None;
3830                while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
3831                    match key.as_str() {
3832                        "limit" => {
3833                            __f_limit = Some({
3834                                struct _S;
3835                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3836                                    type Value = u32;
3837                                    fn deserialize<D: serde::Deserializer<'de>>(
3838                                        self,
3839                                        d: D,
3840                                    ) -> ::core::result::Result<u32, D::Error> {
3841                                        ::buffa::json_helpers::uint32::deserialize(d)
3842                                    }
3843                                }
3844                                map.next_value_seed(_S)?
3845                            });
3846                        }
3847                        "sort" => {
3848                            __f_sort = Some({
3849                                struct _S;
3850                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3851                                    type Value = ::buffa::EnumValue<Sort>;
3852                                    fn deserialize<D: serde::Deserializer<'de>>(
3853                                        self,
3854                                        d: D,
3855                                    ) -> ::core::result::Result<
3856                                        ::buffa::EnumValue<Sort>,
3857                                        D::Error,
3858                                    > {
3859                                        ::buffa::json_helpers::proto_enum::deserialize(d)
3860                                    }
3861                                }
3862                                map.next_value_seed(_S)?
3863                            });
3864                        }
3865                        "flowKind" | "flow_kind" => {
3866                            __f_flow_kind = Some({
3867                                struct _S;
3868                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3869                                    type Value = ::buffa::EnumValue<FlowKind>;
3870                                    fn deserialize<D: serde::Deserializer<'de>>(
3871                                        self,
3872                                        d: D,
3873                                    ) -> ::core::result::Result<
3874                                        ::buffa::EnumValue<FlowKind>,
3875                                        D::Error,
3876                                    > {
3877                                        ::buffa::json_helpers::proto_enum::deserialize(d)
3878                                    }
3879                                }
3880                                map.next_value_seed(_S)?
3881                            });
3882                        }
3883                        "flowState" | "flow_state" => {
3884                            __f_flow_state = Some({
3885                                struct _S;
3886                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3887                                    type Value = ::buffa::EnumValue<FlowState>;
3888                                    fn deserialize<D: serde::Deserializer<'de>>(
3889                                        self,
3890                                        d: D,
3891                                    ) -> ::core::result::Result<
3892                                        ::buffa::EnumValue<FlowState>,
3893                                        D::Error,
3894                                    > {
3895                                        ::buffa::json_helpers::proto_enum::deserialize(d)
3896                                    }
3897                                }
3898                                map.next_value_seed(_S)?
3899                            });
3900                        }
3901                        "txRef" | "tx_ref" => {
3902                            __f_tx_ref = Some({
3903                                struct _S;
3904                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3905                                    type Value = ::buffa::alloc::string::String;
3906                                    fn deserialize<D: serde::Deserializer<'de>>(
3907                                        self,
3908                                        d: D,
3909                                    ) -> ::core::result::Result<
3910                                        ::buffa::alloc::string::String,
3911                                        D::Error,
3912                                    > {
3913                                        ::buffa::json_helpers::proto_string::deserialize(d)
3914                                    }
3915                                }
3916                                map.next_value_seed(_S)?
3917                            });
3918                        }
3919                        "scope" => {
3920                            __f_scope = Some({
3921                                struct _S;
3922                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3923                                    type Value = ::buffa::EnumValue<ListScope>;
3924                                    fn deserialize<D: serde::Deserializer<'de>>(
3925                                        self,
3926                                        d: D,
3927                                    ) -> ::core::result::Result<
3928                                        ::buffa::EnumValue<ListScope>,
3929                                        D::Error,
3930                                    > {
3931                                        ::buffa::json_helpers::proto_enum::deserialize(d)
3932                                    }
3933                                }
3934                                map.next_value_seed(_S)?
3935                            });
3936                        }
3937                        "polyesterChainIds" | "polyester_chain_ids" => {
3938                            __f_polyester_chain_ids = Some({
3939                                struct _S;
3940                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3941                                    type Value = ::buffa::alloc::vec::Vec<u32>;
3942                                    fn deserialize<D: serde::Deserializer<'de>>(
3943                                        self,
3944                                        d: D,
3945                                    ) -> ::core::result::Result<
3946                                        ::buffa::alloc::vec::Vec<u32>,
3947                                        D::Error,
3948                                    > {
3949                                        ::buffa::json_helpers::null_as_default(d)
3950                                    }
3951                                }
3952                                map.next_value_seed(_S)?
3953                            });
3954                        }
3955                        "zippedAssetIds" | "zipped_asset_ids" => {
3956                            __f_zipped_asset_ids = Some({
3957                                struct _S;
3958                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3959                                    type Value = ::buffa::alloc::vec::Vec<u32>;
3960                                    fn deserialize<D: serde::Deserializer<'de>>(
3961                                        self,
3962                                        d: D,
3963                                    ) -> ::core::result::Result<
3964                                        ::buffa::alloc::vec::Vec<u32>,
3965                                        D::Error,
3966                                    > {
3967                                        ::buffa::json_helpers::null_as_default(d)
3968                                    }
3969                                }
3970                                map.next_value_seed(_S)?
3971                            });
3972                        }
3973                        "unifiedAssetIds" | "unified_asset_ids" => {
3974                            __f_unified_asset_ids = Some({
3975                                struct _S;
3976                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3977                                    type Value = ::buffa::alloc::vec::Vec<u32>;
3978                                    fn deserialize<D: serde::Deserializer<'de>>(
3979                                        self,
3980                                        d: D,
3981                                    ) -> ::core::result::Result<
3982                                        ::buffa::alloc::vec::Vec<u32>,
3983                                        D::Error,
3984                                    > {
3985                                        ::buffa::json_helpers::null_as_default(d)
3986                                    }
3987                                }
3988                                map.next_value_seed(_S)?
3989                            });
3990                        }
3991                        "pageToken" | "page_token" => {
3992                            __f_page_token = Some({
3993                                struct _S;
3994                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
3995                                    type Value = ::buffa::alloc::string::String;
3996                                    fn deserialize<D: serde::Deserializer<'de>>(
3997                                        self,
3998                                        d: D,
3999                                    ) -> ::core::result::Result<
4000                                        ::buffa::alloc::string::String,
4001                                        D::Error,
4002                                    > {
4003                                        ::buffa::json_helpers::proto_string::deserialize(d)
4004                                    }
4005                                }
4006                                map.next_value_seed(_S)?
4007                            });
4008                        }
4009                        "orderBy" | "order_by" => {
4010                            __f_order_by = Some({
4011                                struct _S;
4012                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
4013                                    type Value = ::buffa::EnumValue<ListOrderBy>;
4014                                    fn deserialize<D: serde::Deserializer<'de>>(
4015                                        self,
4016                                        d: D,
4017                                    ) -> ::core::result::Result<
4018                                        ::buffa::EnumValue<ListOrderBy>,
4019                                        D::Error,
4020                                    > {
4021                                        ::buffa::json_helpers::proto_enum::deserialize(d)
4022                                    }
4023                                }
4024                                map.next_value_seed(_S)?
4025                            });
4026                        }
4027                        "ownerAccountId" | "owner_account_id" => {
4028                            struct _DeserSeed;
4029                            impl<'de> serde::de::DeserializeSeed<'de> for _DeserSeed {
4030                                type Value = u64;
4031                                fn deserialize<D: serde::Deserializer<'de>>(
4032                                    self,
4033                                    d: D,
4034                                ) -> ::core::result::Result<u64, D::Error> {
4035                                    ::buffa::json_helpers::uint64::deserialize(d)
4036                                }
4037                            }
4038                            let v: ::core::option::Option<u64> = map
4039                                .next_value_seed(
4040                                    ::buffa::json_helpers::NullableDeserializeSeed(_DeserSeed),
4041                                )?;
4042                            if let Some(v) = v {
4043                                if __oneof_account_selector.is_some() {
4044                                    return Err(
4045                                        serde::de::Error::custom(
4046                                            "multiple oneof fields set for 'account_selector'",
4047                                        ),
4048                                    );
4049                                }
4050                                __oneof_account_selector = Some(
4051                                    __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
4052                                        v,
4053                                    ),
4054                                );
4055                            }
4056                        }
4057                        "smartAccountAddress" | "smart_account_address" => {
4058                            let v: ::core::option::Option<
4059                                ::buffa::alloc::string::String,
4060                            > = map
4061                                .next_value_seed(
4062                                    ::buffa::json_helpers::NullableDeserializeSeed(
4063                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
4064                                            ::buffa::alloc::string::String,
4065                                        >::new(),
4066                                    ),
4067                                )?;
4068                            if let Some(v) = v {
4069                                if __oneof_account_selector.is_some() {
4070                                    return Err(
4071                                        serde::de::Error::custom(
4072                                            "multiple oneof fields set for 'account_selector'",
4073                                        ),
4074                                    );
4075                                }
4076                                __oneof_account_selector = Some(
4077                                    __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
4078                                        v,
4079                                    ),
4080                                );
4081                            }
4082                        }
4083                        _ => {
4084                            map.next_value::<serde::de::IgnoredAny>()?;
4085                        }
4086                    }
4087                }
4088                let mut __r = <ListFlowsRequest as ::core::default::Default>::default();
4089                if let ::core::option::Option::Some(v) = __f_limit {
4090                    __r.limit = v;
4091                }
4092                if let ::core::option::Option::Some(v) = __f_sort {
4093                    __r.sort = v;
4094                }
4095                if let ::core::option::Option::Some(v) = __f_flow_kind {
4096                    __r.flow_kind = v;
4097                }
4098                if let ::core::option::Option::Some(v) = __f_flow_state {
4099                    __r.flow_state = v;
4100                }
4101                if let ::core::option::Option::Some(v) = __f_tx_ref {
4102                    __r.tx_ref = v;
4103                }
4104                if let ::core::option::Option::Some(v) = __f_scope {
4105                    __r.scope = v;
4106                }
4107                if let ::core::option::Option::Some(v) = __f_polyester_chain_ids {
4108                    __r.polyester_chain_ids = v;
4109                }
4110                if let ::core::option::Option::Some(v) = __f_zipped_asset_ids {
4111                    __r.zipped_asset_ids = v;
4112                }
4113                if let ::core::option::Option::Some(v) = __f_unified_asset_ids {
4114                    __r.unified_asset_ids = v;
4115                }
4116                if let ::core::option::Option::Some(v) = __f_page_token {
4117                    __r.page_token = v;
4118                }
4119                if let ::core::option::Option::Some(v) = __f_order_by {
4120                    __r.order_by = v;
4121                }
4122                __r.account_selector = __oneof_account_selector;
4123                Ok(__r)
4124            }
4125        }
4126        d.deserialize_map(_V)
4127    }
4128}
4129impl ::buffa::json_helpers::ProtoElemJson for ListFlowsRequest {
4130    fn serialize_proto_json<S: ::serde::Serializer>(
4131        v: &Self,
4132        s: S,
4133    ) -> ::core::result::Result<S::Ok, S::Error> {
4134        ::serde::Serialize::serialize(v, s)
4135    }
4136    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4137        d: D,
4138    ) -> ::core::result::Result<Self, D::Error> {
4139        <Self as ::serde::Deserialize>::deserialize(d)
4140    }
4141}
4142#[doc(hidden)]
4143pub const __LIST_FLOWS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4144    type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest",
4145    to_json: ::buffa::type_registry::any_to_json::<ListFlowsRequest>,
4146    from_json: ::buffa::type_registry::any_from_json::<ListFlowsRequest>,
4147    is_wkt: false,
4148};
4149pub mod list_flows_request {
4150    #[allow(unused_imports)]
4151    use super::*;
4152    #[doc(inline)]
4153    pub use super::__buffa::oneof::list_flows_request::AccountSelector;
4154    #[doc(inline)]
4155    pub use super::__buffa::view::oneof::list_flows_request::AccountSelector as AccountSelectorView;
4156}
4157/// ListFlowsResponse returns one page of flow summaries.
4158#[derive(Clone, PartialEq, Default)]
4159#[derive(::serde::Serialize, ::serde::Deserialize)]
4160#[serde(default)]
4161pub struct ListFlowsResponse {
4162    /// Flow summaries ordered by the selected timestamp, then public flow id. Sort
4163    /// direction is controlled by the request `sort` field.
4164    ///
4165    /// Field 1: `flows`
4166    #[serde(
4167        rename = "flows",
4168        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
4169        deserialize_with = "::buffa::json_helpers::null_as_default"
4170    )]
4171    pub flows: ::buffa::alloc::vec::Vec<FlowSummaryView>,
4172    /// Opaque cursor for the next page. Empty when no more results exist.
4173    ///
4174    /// Field 2: `next_page_token`
4175    #[serde(
4176        rename = "nextPageToken",
4177        alias = "next_page_token",
4178        with = "::buffa::json_helpers::proto_string",
4179        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4180    )]
4181    pub next_page_token: ::buffa::alloc::string::String,
4182    #[serde(skip)]
4183    #[doc(hidden)]
4184    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4185}
4186impl ::core::fmt::Debug for ListFlowsResponse {
4187    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4188        f.debug_struct("ListFlowsResponse")
4189            .field("flows", &self.flows)
4190            .field("next_page_token", &self.next_page_token)
4191            .finish()
4192    }
4193}
4194impl ListFlowsResponse {
4195    /// Protobuf type URL for this message, for use with `Any::pack` and
4196    /// `Any::unpack_if`.
4197    ///
4198    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4199    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
4200}
4201::buffa::impl_default_instance!(ListFlowsResponse);
4202impl ::buffa::MessageName for ListFlowsResponse {
4203    const PACKAGE: &'static str = "chain.lifecycle.v1";
4204    const NAME: &'static str = "ListFlowsResponse";
4205    const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
4206    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
4207}
4208impl ::buffa::Message for ListFlowsResponse {
4209    /// Returns the total encoded size in bytes.
4210    ///
4211    /// The result is a `u32`; the protobuf specification requires all
4212    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4213    /// compliant message will never overflow this type.
4214    #[allow(clippy::let_and_return)]
4215    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4216        #[allow(unused_imports)]
4217        use ::buffa::Enumeration as _;
4218        let mut size = 0u32;
4219        for v in &self.flows {
4220            let __slot = __cache.reserve();
4221            let inner_size = v.compute_size(__cache);
4222            __cache.set(__slot, inner_size);
4223            size
4224                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4225                    + inner_size;
4226        }
4227        if !self.next_page_token.is_empty() {
4228            size
4229                += 1u32
4230                    + ::buffa::types::string_encoded_len(&self.next_page_token) as u32;
4231        }
4232        size += self.__buffa_unknown_fields.encoded_len() as u32;
4233        size
4234    }
4235    fn write_to(
4236        &self,
4237        __cache: &mut ::buffa::SizeCache,
4238        buf: &mut impl ::buffa::bytes::BufMut,
4239    ) {
4240        #[allow(unused_imports)]
4241        use ::buffa::Enumeration as _;
4242        for v in &self.flows {
4243            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
4244            v.write_to(__cache, buf);
4245        }
4246        if !self.next_page_token.is_empty() {
4247            ::buffa::types::put_string_field(2u32, &self.next_page_token, buf);
4248        }
4249        self.__buffa_unknown_fields.write_to(buf);
4250    }
4251    fn merge_field(
4252        &mut self,
4253        tag: ::buffa::encoding::Tag,
4254        buf: &mut impl ::buffa::bytes::Buf,
4255        ctx: ::buffa::DecodeContext<'_>,
4256    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4257        #[allow(unused_imports)]
4258        use ::buffa::bytes::Buf as _;
4259        #[allow(unused_imports)]
4260        use ::buffa::Enumeration as _;
4261        match tag.field_number() {
4262            1u32 => {
4263                ::buffa::encoding::check_wire_type(
4264                    tag,
4265                    ::buffa::encoding::WireType::LengthDelimited,
4266                )?;
4267                let mut elem = ::core::default::Default::default();
4268                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
4269                self.flows.push(elem);
4270            }
4271            2u32 => {
4272                ::buffa::encoding::check_wire_type(
4273                    tag,
4274                    ::buffa::encoding::WireType::LengthDelimited,
4275                )?;
4276                ::buffa::types::merge_string(&mut self.next_page_token, buf)?;
4277            }
4278            _ => {
4279                self.__buffa_unknown_fields
4280                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
4281            }
4282        }
4283        ::core::result::Result::Ok(())
4284    }
4285    fn clear(&mut self) {
4286        self.flows.clear();
4287        self.next_page_token.clear();
4288        self.__buffa_unknown_fields.clear();
4289    }
4290}
4291impl ::buffa::ExtensionSet for ListFlowsResponse {
4292    const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
4293    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4294        &self.__buffa_unknown_fields
4295    }
4296    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4297        &mut self.__buffa_unknown_fields
4298    }
4299}
4300impl ::buffa::json_helpers::ProtoElemJson for ListFlowsResponse {
4301    fn serialize_proto_json<S: ::serde::Serializer>(
4302        v: &Self,
4303        s: S,
4304    ) -> ::core::result::Result<S::Ok, S::Error> {
4305        ::serde::Serialize::serialize(v, s)
4306    }
4307    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4308        d: D,
4309    ) -> ::core::result::Result<Self, D::Error> {
4310        <Self as ::serde::Deserialize>::deserialize(d)
4311    }
4312}
4313#[doc(hidden)]
4314pub const __LIST_FLOWS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4315    type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse",
4316    to_json: ::buffa::type_registry::any_to_json::<ListFlowsResponse>,
4317    from_json: ::buffa::type_registry::any_from_json::<ListFlowsResponse>,
4318    is_wkt: false,
4319};
4320/// FlowTxMatchView is one lifecycle flow matched by a transaction-hash search.
4321#[derive(Clone, PartialEq, Default)]
4322#[derive(::serde::Serialize, ::serde::Deserialize)]
4323#[serde(default)]
4324pub struct FlowTxMatchView {
4325    /// Public, URL-safe lifecycle identifier for display, URLs, and user search.
4326    ///
4327    /// Field 1: `flow_id`
4328    #[serde(
4329        rename = "flowId",
4330        alias = "flow_id",
4331        with = "::buffa::json_helpers::proto_string",
4332        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4333    )]
4334    pub flow_id: ::buffa::alloc::string::String,
4335    /// Product flow family.
4336    ///
4337    /// Field 3: `flow_kind`
4338    #[serde(
4339        rename = "flowKind",
4340        alias = "flow_kind",
4341        with = "::buffa::json_helpers::proto_enum",
4342        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4343    )]
4344    pub flow_kind: ::buffa::EnumValue<FlowKind>,
4345    /// First observed source transaction hash for the flow when known.
4346    ///
4347    /// Field 4: `source_tx_hash`
4348    #[serde(
4349        rename = "sourceTxHash",
4350        alias = "source_tx_hash",
4351        with = "::buffa::json_helpers::proto_string",
4352        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4353    )]
4354    pub source_tx_hash: ::buffa::alloc::string::String,
4355    /// Latest transaction reference associated with the current visible state.
4356    ///
4357    /// Field 5: `latest_tx_ref`
4358    #[serde(
4359        rename = "latestTxRef",
4360        alias = "latest_tx_ref",
4361        with = "::buffa::json_helpers::proto_string",
4362        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4363    )]
4364    pub latest_tx_ref: ::buffa::alloc::string::String,
4365    /// Stable occurrence discriminator within a transaction. For source-chain
4366    /// deposits this is the batched leg index; for on-chain facts it is the log or
4367    /// equivalent per-tx occurrence index when available.
4368    ///
4369    /// Field 6: `tx_occurrence_index`
4370    #[serde(
4371        rename = "txOccurrenceIndex",
4372        alias = "tx_occurrence_index",
4373        with = "::buffa::json_helpers::uint64",
4374        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4375    )]
4376    pub tx_occurrence_index: u64,
4377    /// Product domain where the overall flow starts.
4378    ///
4379    /// Field 7: `source_domain`
4380    #[serde(
4381        rename = "sourceDomain",
4382        alias = "source_domain",
4383        with = "::buffa::json_helpers::proto_enum",
4384        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4385    )]
4386    pub source_domain: ::buffa::EnumValue<FlowDomain>,
4387    /// Product domain where the overall flow ends or currently settles.
4388    ///
4389    /// Field 8: `destination_domain`
4390    #[serde(
4391        rename = "destinationDomain",
4392        alias = "destination_domain",
4393        with = "::buffa::json_helpers::proto_enum",
4394        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4395    )]
4396    pub destination_domain: ::buffa::EnumValue<FlowDomain>,
4397    /// Current user-facing progress step for this flow.
4398    ///
4399    /// Field 9: `current_step`
4400    #[serde(
4401        rename = "currentStep",
4402        alias = "current_step",
4403        with = "::buffa::json_helpers::proto_enum",
4404        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4405    )]
4406    pub current_step: ::buffa::EnumValue<FlowStep>,
4407    /// True when this flow is still progressing.
4408    ///
4409    /// Field 10: `is_open`
4410    #[serde(
4411        rename = "isOpen",
4412        alias = "is_open",
4413        with = "::buffa::json_helpers::proto_bool",
4414        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
4415    )]
4416    pub is_open: bool,
4417    /// True when this flow reached a final state.
4418    ///
4419    /// Field 11: `is_terminal`
4420    #[serde(
4421        rename = "isTerminal",
4422        alias = "is_terminal",
4423        with = "::buffa::json_helpers::proto_bool",
4424        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
4425    )]
4426    pub is_terminal: bool,
4427    /// Asset identifiers involved in this flow.
4428    ///
4429    /// Field 12: `asset_ids`
4430    #[serde(
4431        rename = "assetIds",
4432        alias = "asset_ids",
4433        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4434    )]
4435    pub asset_ids: ::buffa::MessageField<AssetIds>,
4436    /// Polyester Chain id associated with this flow.
4437    ///
4438    /// Field 13: `polyester_chain_id`
4439    #[serde(
4440        rename = "polyesterChainId",
4441        alias = "polyester_chain_id",
4442        with = "::buffa::json_helpers::uint32",
4443        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
4444    )]
4445    pub polyester_chain_id: u32,
4446    /// Gross principal amount for this flow in 18-decimal unified asset units.
4447    ///
4448    /// Field 14: `amount_e18`
4449    #[serde(
4450        rename = "amountE18",
4451        alias = "amount_e18",
4452        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4453    )]
4454    pub amount_e18: ::buffa::MessageField<
4455        super::super::super::polyester::r#type::v1::U128,
4456    >,
4457    /// Source address to show for this flow.
4458    ///
4459    /// Field 15: `source_address`
4460    #[serde(
4461        rename = "sourceAddress",
4462        alias = "source_address",
4463        with = "::buffa::json_helpers::proto_string",
4464        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4465    )]
4466    pub source_address: ::buffa::alloc::string::String,
4467    /// Destination address to show for this flow.
4468    ///
4469    /// Field 16: `destination_address`
4470    #[serde(
4471        rename = "destinationAddress",
4472        alias = "destination_address",
4473        with = "::buffa::json_helpers::proto_string",
4474        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4475    )]
4476    pub destination_address: ::buffa::alloc::string::String,
4477    /// Product-facing reason for failed, dropped, or otherwise notable flows.
4478    ///
4479    /// Field 17: `reason_code`
4480    #[serde(
4481        rename = "reasonCode",
4482        alias = "reason_code",
4483        with = "::buffa::json_helpers::proto_enum",
4484        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4485    )]
4486    pub reason_code: ::buffa::EnumValue<FlowReason>,
4487    /// Timestamp used for list ordering in milliseconds since epoch (UTC).
4488    ///
4489    /// Field 18: `last_activity_at_unix_ms`
4490    #[serde(
4491        rename = "lastActivityAtUnixMs",
4492        alias = "last_activity_at_unix_ms",
4493        with = "::buffa::json_helpers::uint64",
4494        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4495    )]
4496    pub last_activity_at_unix_ms: u64,
4497    /// Public account or subaccount identifier that owns this flow.
4498    ///
4499    /// Field 19: `owner_account_id`
4500    #[serde(
4501        rename = "ownerAccountId",
4502        alias = "owner_account_id",
4503        with = "::buffa::json_helpers::uint64",
4504        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4505    )]
4506    pub owner_account_id: u64,
4507    /// Smart account address on Polyester Chain when known.
4508    ///
4509    /// Field 20: `smart_account_address`
4510    #[serde(
4511        rename = "smartAccountAddress",
4512        alias = "smart_account_address",
4513        with = "::buffa::json_helpers::proto_string",
4514        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4515    )]
4516    pub smart_account_address: ::buffa::alloc::string::String,
4517    #[serde(skip)]
4518    #[doc(hidden)]
4519    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4520}
4521impl ::core::fmt::Debug for FlowTxMatchView {
4522    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4523        f.debug_struct("FlowTxMatchView")
4524            .field("flow_id", &self.flow_id)
4525            .field("flow_kind", &self.flow_kind)
4526            .field("source_tx_hash", &self.source_tx_hash)
4527            .field("latest_tx_ref", &self.latest_tx_ref)
4528            .field("tx_occurrence_index", &self.tx_occurrence_index)
4529            .field("source_domain", &self.source_domain)
4530            .field("destination_domain", &self.destination_domain)
4531            .field("current_step", &self.current_step)
4532            .field("is_open", &self.is_open)
4533            .field("is_terminal", &self.is_terminal)
4534            .field("asset_ids", &self.asset_ids)
4535            .field("polyester_chain_id", &self.polyester_chain_id)
4536            .field("amount_e18", &self.amount_e18)
4537            .field("source_address", &self.source_address)
4538            .field("destination_address", &self.destination_address)
4539            .field("reason_code", &self.reason_code)
4540            .field("last_activity_at_unix_ms", &self.last_activity_at_unix_ms)
4541            .field("owner_account_id", &self.owner_account_id)
4542            .field("smart_account_address", &self.smart_account_address)
4543            .finish()
4544    }
4545}
4546impl FlowTxMatchView {
4547    /// Protobuf type URL for this message, for use with `Any::pack` and
4548    /// `Any::unpack_if`.
4549    ///
4550    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4551    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
4552}
4553::buffa::impl_default_instance!(FlowTxMatchView);
4554impl ::buffa::MessageName for FlowTxMatchView {
4555    const PACKAGE: &'static str = "chain.lifecycle.v1";
4556    const NAME: &'static str = "FlowTxMatchView";
4557    const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTxMatchView";
4558    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
4559}
4560impl ::buffa::Message for FlowTxMatchView {
4561    /// Returns the total encoded size in bytes.
4562    ///
4563    /// The result is a `u32`; the protobuf specification requires all
4564    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4565    /// compliant message will never overflow this type.
4566    #[allow(clippy::let_and_return)]
4567    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4568        #[allow(unused_imports)]
4569        use ::buffa::Enumeration as _;
4570        let mut size = 0u32;
4571        if !self.flow_id.is_empty() {
4572            size += 1u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
4573        }
4574        {
4575            let val = self.flow_kind.to_i32();
4576            if val != 0 {
4577                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4578            }
4579        }
4580        if !self.source_tx_hash.is_empty() {
4581            size
4582                += 1u32
4583                    + ::buffa::types::string_encoded_len(&self.source_tx_hash) as u32;
4584        }
4585        if !self.latest_tx_ref.is_empty() {
4586            size
4587                += 1u32 + ::buffa::types::string_encoded_len(&self.latest_tx_ref) as u32;
4588        }
4589        if self.tx_occurrence_index != 0u64 {
4590            size
4591                += 1u32
4592                    + ::buffa::types::uint64_encoded_len(self.tx_occurrence_index)
4593                        as u32;
4594        }
4595        {
4596            let val = self.source_domain.to_i32();
4597            if val != 0 {
4598                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4599            }
4600        }
4601        {
4602            let val = self.destination_domain.to_i32();
4603            if val != 0 {
4604                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4605            }
4606        }
4607        {
4608            let val = self.current_step.to_i32();
4609            if val != 0 {
4610                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4611            }
4612        }
4613        if self.is_open {
4614            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4615        }
4616        if self.is_terminal {
4617            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4618        }
4619        if self.asset_ids.is_set() {
4620            let __slot = __cache.reserve();
4621            let inner_size = self.asset_ids.compute_size(__cache);
4622            __cache.set(__slot, inner_size);
4623            size
4624                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4625                    + inner_size;
4626        }
4627        if self.polyester_chain_id != 0u32 {
4628            size
4629                += 1u32
4630                    + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
4631        }
4632        if self.amount_e18.is_set() {
4633            let __slot = __cache.reserve();
4634            let inner_size = self.amount_e18.compute_size(__cache);
4635            __cache.set(__slot, inner_size);
4636            size
4637                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4638                    + inner_size;
4639        }
4640        if !self.source_address.is_empty() {
4641            size
4642                += 1u32
4643                    + ::buffa::types::string_encoded_len(&self.source_address) as u32;
4644        }
4645        if !self.destination_address.is_empty() {
4646            size
4647                += 2u32
4648                    + ::buffa::types::string_encoded_len(&self.destination_address)
4649                        as u32;
4650        }
4651        {
4652            let val = self.reason_code.to_i32();
4653            if val != 0 {
4654                size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
4655            }
4656        }
4657        if self.last_activity_at_unix_ms != 0u64 {
4658            size
4659                += 2u32
4660                    + ::buffa::types::uint64_encoded_len(self.last_activity_at_unix_ms)
4661                        as u32;
4662        }
4663        if self.owner_account_id != 0u64 {
4664            size += 2u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
4665        }
4666        if !self.smart_account_address.is_empty() {
4667            size
4668                += 2u32
4669                    + ::buffa::types::string_encoded_len(&self.smart_account_address)
4670                        as u32;
4671        }
4672        size += self.__buffa_unknown_fields.encoded_len() as u32;
4673        size
4674    }
4675    fn write_to(
4676        &self,
4677        __cache: &mut ::buffa::SizeCache,
4678        buf: &mut impl ::buffa::bytes::BufMut,
4679    ) {
4680        #[allow(unused_imports)]
4681        use ::buffa::Enumeration as _;
4682        if !self.flow_id.is_empty() {
4683            ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
4684        }
4685        {
4686            let val = self.flow_kind.to_i32();
4687            if val != 0 {
4688                ::buffa::types::put_int32_field(3u32, val, buf);
4689            }
4690        }
4691        if !self.source_tx_hash.is_empty() {
4692            ::buffa::types::put_string_field(4u32, &self.source_tx_hash, buf);
4693        }
4694        if !self.latest_tx_ref.is_empty() {
4695            ::buffa::types::put_string_field(5u32, &self.latest_tx_ref, buf);
4696        }
4697        if self.tx_occurrence_index != 0u64 {
4698            ::buffa::types::put_uint64_field(6u32, self.tx_occurrence_index, buf);
4699        }
4700        {
4701            let val = self.source_domain.to_i32();
4702            if val != 0 {
4703                ::buffa::types::put_int32_field(7u32, val, buf);
4704            }
4705        }
4706        {
4707            let val = self.destination_domain.to_i32();
4708            if val != 0 {
4709                ::buffa::types::put_int32_field(8u32, val, buf);
4710            }
4711        }
4712        {
4713            let val = self.current_step.to_i32();
4714            if val != 0 {
4715                ::buffa::types::put_int32_field(9u32, val, buf);
4716            }
4717        }
4718        if self.is_open {
4719            ::buffa::types::put_bool_field(10u32, self.is_open, buf);
4720        }
4721        if self.is_terminal {
4722            ::buffa::types::put_bool_field(11u32, self.is_terminal, buf);
4723        }
4724        if self.asset_ids.is_set() {
4725            ::buffa::types::put_len_delimited_header(12u32, __cache.consume_next(), buf);
4726            self.asset_ids.write_to(__cache, buf);
4727        }
4728        if self.polyester_chain_id != 0u32 {
4729            ::buffa::types::put_uint32_field(13u32, self.polyester_chain_id, buf);
4730        }
4731        if self.amount_e18.is_set() {
4732            ::buffa::types::put_len_delimited_header(14u32, __cache.consume_next(), buf);
4733            self.amount_e18.write_to(__cache, buf);
4734        }
4735        if !self.source_address.is_empty() {
4736            ::buffa::types::put_string_field(15u32, &self.source_address, buf);
4737        }
4738        if !self.destination_address.is_empty() {
4739            ::buffa::types::put_string_field(16u32, &self.destination_address, buf);
4740        }
4741        {
4742            let val = self.reason_code.to_i32();
4743            if val != 0 {
4744                ::buffa::types::put_int32_field(17u32, val, buf);
4745            }
4746        }
4747        if self.last_activity_at_unix_ms != 0u64 {
4748            ::buffa::types::put_uint64_field(18u32, self.last_activity_at_unix_ms, buf);
4749        }
4750        if self.owner_account_id != 0u64 {
4751            ::buffa::types::put_fixed64_field(19u32, self.owner_account_id, buf);
4752        }
4753        if !self.smart_account_address.is_empty() {
4754            ::buffa::types::put_string_field(20u32, &self.smart_account_address, buf);
4755        }
4756        self.__buffa_unknown_fields.write_to(buf);
4757    }
4758    fn merge_field(
4759        &mut self,
4760        tag: ::buffa::encoding::Tag,
4761        buf: &mut impl ::buffa::bytes::Buf,
4762        ctx: ::buffa::DecodeContext<'_>,
4763    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4764        #[allow(unused_imports)]
4765        use ::buffa::bytes::Buf as _;
4766        #[allow(unused_imports)]
4767        use ::buffa::Enumeration as _;
4768        match tag.field_number() {
4769            1u32 => {
4770                ::buffa::encoding::check_wire_type(
4771                    tag,
4772                    ::buffa::encoding::WireType::LengthDelimited,
4773                )?;
4774                ::buffa::types::merge_string(&mut self.flow_id, buf)?;
4775            }
4776            3u32 => {
4777                ::buffa::encoding::check_wire_type(
4778                    tag,
4779                    ::buffa::encoding::WireType::Varint,
4780                )?;
4781                self.flow_kind = ::buffa::EnumValue::from(
4782                    ::buffa::types::decode_int32(buf)?,
4783                );
4784            }
4785            4u32 => {
4786                ::buffa::encoding::check_wire_type(
4787                    tag,
4788                    ::buffa::encoding::WireType::LengthDelimited,
4789                )?;
4790                ::buffa::types::merge_string(&mut self.source_tx_hash, buf)?;
4791            }
4792            5u32 => {
4793                ::buffa::encoding::check_wire_type(
4794                    tag,
4795                    ::buffa::encoding::WireType::LengthDelimited,
4796                )?;
4797                ::buffa::types::merge_string(&mut self.latest_tx_ref, buf)?;
4798            }
4799            6u32 => {
4800                ::buffa::encoding::check_wire_type(
4801                    tag,
4802                    ::buffa::encoding::WireType::Varint,
4803                )?;
4804                self.tx_occurrence_index = ::buffa::types::decode_uint64(buf)?;
4805            }
4806            7u32 => {
4807                ::buffa::encoding::check_wire_type(
4808                    tag,
4809                    ::buffa::encoding::WireType::Varint,
4810                )?;
4811                self.source_domain = ::buffa::EnumValue::from(
4812                    ::buffa::types::decode_int32(buf)?,
4813                );
4814            }
4815            8u32 => {
4816                ::buffa::encoding::check_wire_type(
4817                    tag,
4818                    ::buffa::encoding::WireType::Varint,
4819                )?;
4820                self.destination_domain = ::buffa::EnumValue::from(
4821                    ::buffa::types::decode_int32(buf)?,
4822                );
4823            }
4824            9u32 => {
4825                ::buffa::encoding::check_wire_type(
4826                    tag,
4827                    ::buffa::encoding::WireType::Varint,
4828                )?;
4829                self.current_step = ::buffa::EnumValue::from(
4830                    ::buffa::types::decode_int32(buf)?,
4831                );
4832            }
4833            10u32 => {
4834                ::buffa::encoding::check_wire_type(
4835                    tag,
4836                    ::buffa::encoding::WireType::Varint,
4837                )?;
4838                self.is_open = ::buffa::types::decode_bool(buf)?;
4839            }
4840            11u32 => {
4841                ::buffa::encoding::check_wire_type(
4842                    tag,
4843                    ::buffa::encoding::WireType::Varint,
4844                )?;
4845                self.is_terminal = ::buffa::types::decode_bool(buf)?;
4846            }
4847            12u32 => {
4848                ::buffa::encoding::check_wire_type(
4849                    tag,
4850                    ::buffa::encoding::WireType::LengthDelimited,
4851                )?;
4852                ::buffa::Message::merge_length_delimited(
4853                    self.asset_ids.get_or_insert_default(),
4854                    buf,
4855                    ctx,
4856                )?;
4857            }
4858            13u32 => {
4859                ::buffa::encoding::check_wire_type(
4860                    tag,
4861                    ::buffa::encoding::WireType::Varint,
4862                )?;
4863                self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
4864            }
4865            14u32 => {
4866                ::buffa::encoding::check_wire_type(
4867                    tag,
4868                    ::buffa::encoding::WireType::LengthDelimited,
4869                )?;
4870                ::buffa::Message::merge_length_delimited(
4871                    self.amount_e18.get_or_insert_default(),
4872                    buf,
4873                    ctx,
4874                )?;
4875            }
4876            15u32 => {
4877                ::buffa::encoding::check_wire_type(
4878                    tag,
4879                    ::buffa::encoding::WireType::LengthDelimited,
4880                )?;
4881                ::buffa::types::merge_string(&mut self.source_address, buf)?;
4882            }
4883            16u32 => {
4884                ::buffa::encoding::check_wire_type(
4885                    tag,
4886                    ::buffa::encoding::WireType::LengthDelimited,
4887                )?;
4888                ::buffa::types::merge_string(&mut self.destination_address, buf)?;
4889            }
4890            17u32 => {
4891                ::buffa::encoding::check_wire_type(
4892                    tag,
4893                    ::buffa::encoding::WireType::Varint,
4894                )?;
4895                self.reason_code = ::buffa::EnumValue::from(
4896                    ::buffa::types::decode_int32(buf)?,
4897                );
4898            }
4899            18u32 => {
4900                ::buffa::encoding::check_wire_type(
4901                    tag,
4902                    ::buffa::encoding::WireType::Varint,
4903                )?;
4904                self.last_activity_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
4905            }
4906            19u32 => {
4907                ::buffa::encoding::check_wire_type(
4908                    tag,
4909                    ::buffa::encoding::WireType::Fixed64,
4910                )?;
4911                self.owner_account_id = ::buffa::types::decode_fixed64(buf)?;
4912            }
4913            20u32 => {
4914                ::buffa::encoding::check_wire_type(
4915                    tag,
4916                    ::buffa::encoding::WireType::LengthDelimited,
4917                )?;
4918                ::buffa::types::merge_string(&mut self.smart_account_address, buf)?;
4919            }
4920            _ => {
4921                self.__buffa_unknown_fields
4922                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
4923            }
4924        }
4925        ::core::result::Result::Ok(())
4926    }
4927    fn clear(&mut self) {
4928        self.flow_id.clear();
4929        self.flow_kind = ::buffa::EnumValue::from(0);
4930        self.source_tx_hash.clear();
4931        self.latest_tx_ref.clear();
4932        self.tx_occurrence_index = 0u64;
4933        self.source_domain = ::buffa::EnumValue::from(0);
4934        self.destination_domain = ::buffa::EnumValue::from(0);
4935        self.current_step = ::buffa::EnumValue::from(0);
4936        self.is_open = false;
4937        self.is_terminal = false;
4938        self.asset_ids = ::buffa::MessageField::none();
4939        self.polyester_chain_id = 0u32;
4940        self.amount_e18 = ::buffa::MessageField::none();
4941        self.source_address.clear();
4942        self.destination_address.clear();
4943        self.reason_code = ::buffa::EnumValue::from(0);
4944        self.last_activity_at_unix_ms = 0u64;
4945        self.owner_account_id = 0u64;
4946        self.smart_account_address.clear();
4947        self.__buffa_unknown_fields.clear();
4948    }
4949}
4950impl ::buffa::ExtensionSet for FlowTxMatchView {
4951    const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowTxMatchView";
4952    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4953        &self.__buffa_unknown_fields
4954    }
4955    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4956        &mut self.__buffa_unknown_fields
4957    }
4958}
4959impl ::buffa::json_helpers::ProtoElemJson for FlowTxMatchView {
4960    fn serialize_proto_json<S: ::serde::Serializer>(
4961        v: &Self,
4962        s: S,
4963    ) -> ::core::result::Result<S::Ok, S::Error> {
4964        ::serde::Serialize::serialize(v, s)
4965    }
4966    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4967        d: D,
4968    ) -> ::core::result::Result<Self, D::Error> {
4969        <Self as ::serde::Deserialize>::deserialize(d)
4970    }
4971}
4972#[doc(hidden)]
4973pub const __FLOW_TX_MATCH_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4974    type_url: "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView",
4975    to_json: ::buffa::type_registry::any_to_json::<FlowTxMatchView>,
4976    from_json: ::buffa::type_registry::any_from_json::<FlowTxMatchView>,
4977    is_wkt: false,
4978};
4979/// ListFlowsByTxResponse returns a page of lifecycle flows that reference one
4980/// transaction hash.
4981#[derive(Clone, PartialEq, Default)]
4982#[derive(::serde::Serialize, ::serde::Deserialize)]
4983#[serde(default)]
4984pub struct ListFlowsByTxResponse {
4985    /// Transaction hash searched by the request.
4986    ///
4987    /// Field 1: `tx_hash`
4988    #[serde(
4989        rename = "txHash",
4990        alias = "tx_hash",
4991        with = "::buffa::json_helpers::proto_string",
4992        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4993    )]
4994    pub tx_hash: ::buffa::alloc::string::String,
4995    /// Matching flows ordered by tx occurrence, flow kind, domains, activity time,
4996    /// and stable identifiers.
4997    ///
4998    /// Field 2: `matches`
4999    #[serde(
5000        rename = "matches",
5001        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5002        deserialize_with = "::buffa::json_helpers::null_as_default"
5003    )]
5004    pub matches: ::buffa::alloc::vec::Vec<FlowTxMatchView>,
5005    /// Opaque cursor for the next page. Empty when no more results exist.
5006    ///
5007    /// Field 3: `next_page_token`
5008    #[serde(
5009        rename = "nextPageToken",
5010        alias = "next_page_token",
5011        with = "::buffa::json_helpers::proto_string",
5012        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5013    )]
5014    pub next_page_token: ::buffa::alloc::string::String,
5015    #[serde(skip)]
5016    #[doc(hidden)]
5017    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5018}
5019impl ::core::fmt::Debug for ListFlowsByTxResponse {
5020    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5021        f.debug_struct("ListFlowsByTxResponse")
5022            .field("tx_hash", &self.tx_hash)
5023            .field("matches", &self.matches)
5024            .field("next_page_token", &self.next_page_token)
5025            .finish()
5026    }
5027}
5028impl ListFlowsByTxResponse {
5029    /// Protobuf type URL for this message, for use with `Any::pack` and
5030    /// `Any::unpack_if`.
5031    ///
5032    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5033    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse";
5034}
5035::buffa::impl_default_instance!(ListFlowsByTxResponse);
5036impl ::buffa::MessageName for ListFlowsByTxResponse {
5037    const PACKAGE: &'static str = "chain.lifecycle.v1";
5038    const NAME: &'static str = "ListFlowsByTxResponse";
5039    const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxResponse";
5040    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse";
5041}
5042impl ::buffa::Message for ListFlowsByTxResponse {
5043    /// Returns the total encoded size in bytes.
5044    ///
5045    /// The result is a `u32`; the protobuf specification requires all
5046    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5047    /// compliant message will never overflow this type.
5048    #[allow(clippy::let_and_return)]
5049    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5050        #[allow(unused_imports)]
5051        use ::buffa::Enumeration as _;
5052        let mut size = 0u32;
5053        if !self.tx_hash.is_empty() {
5054            size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
5055        }
5056        for v in &self.matches {
5057            let __slot = __cache.reserve();
5058            let inner_size = v.compute_size(__cache);
5059            __cache.set(__slot, inner_size);
5060            size
5061                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5062                    + inner_size;
5063        }
5064        if !self.next_page_token.is_empty() {
5065            size
5066                += 1u32
5067                    + ::buffa::types::string_encoded_len(&self.next_page_token) as u32;
5068        }
5069        size += self.__buffa_unknown_fields.encoded_len() as u32;
5070        size
5071    }
5072    fn write_to(
5073        &self,
5074        __cache: &mut ::buffa::SizeCache,
5075        buf: &mut impl ::buffa::bytes::BufMut,
5076    ) {
5077        #[allow(unused_imports)]
5078        use ::buffa::Enumeration as _;
5079        if !self.tx_hash.is_empty() {
5080            ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
5081        }
5082        for v in &self.matches {
5083            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
5084            v.write_to(__cache, buf);
5085        }
5086        if !self.next_page_token.is_empty() {
5087            ::buffa::types::put_string_field(3u32, &self.next_page_token, buf);
5088        }
5089        self.__buffa_unknown_fields.write_to(buf);
5090    }
5091    fn merge_field(
5092        &mut self,
5093        tag: ::buffa::encoding::Tag,
5094        buf: &mut impl ::buffa::bytes::Buf,
5095        ctx: ::buffa::DecodeContext<'_>,
5096    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5097        #[allow(unused_imports)]
5098        use ::buffa::bytes::Buf as _;
5099        #[allow(unused_imports)]
5100        use ::buffa::Enumeration as _;
5101        match tag.field_number() {
5102            1u32 => {
5103                ::buffa::encoding::check_wire_type(
5104                    tag,
5105                    ::buffa::encoding::WireType::LengthDelimited,
5106                )?;
5107                ::buffa::types::merge_string(&mut self.tx_hash, buf)?;
5108            }
5109            2u32 => {
5110                ::buffa::encoding::check_wire_type(
5111                    tag,
5112                    ::buffa::encoding::WireType::LengthDelimited,
5113                )?;
5114                let mut elem = ::core::default::Default::default();
5115                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
5116                self.matches.push(elem);
5117            }
5118            3u32 => {
5119                ::buffa::encoding::check_wire_type(
5120                    tag,
5121                    ::buffa::encoding::WireType::LengthDelimited,
5122                )?;
5123                ::buffa::types::merge_string(&mut self.next_page_token, buf)?;
5124            }
5125            _ => {
5126                self.__buffa_unknown_fields
5127                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
5128            }
5129        }
5130        ::core::result::Result::Ok(())
5131    }
5132    fn clear(&mut self) {
5133        self.tx_hash.clear();
5134        self.matches.clear();
5135        self.next_page_token.clear();
5136        self.__buffa_unknown_fields.clear();
5137    }
5138}
5139impl ::buffa::ExtensionSet for ListFlowsByTxResponse {
5140    const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsByTxResponse";
5141    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5142        &self.__buffa_unknown_fields
5143    }
5144    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5145        &mut self.__buffa_unknown_fields
5146    }
5147}
5148impl ::buffa::json_helpers::ProtoElemJson for ListFlowsByTxResponse {
5149    fn serialize_proto_json<S: ::serde::Serializer>(
5150        v: &Self,
5151        s: S,
5152    ) -> ::core::result::Result<S::Ok, S::Error> {
5153        ::serde::Serialize::serialize(v, s)
5154    }
5155    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5156        d: D,
5157    ) -> ::core::result::Result<Self, D::Error> {
5158        <Self as ::serde::Deserialize>::deserialize(d)
5159    }
5160}
5161#[doc(hidden)]
5162pub const __LIST_FLOWS_BY_TX_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5163    type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse",
5164    to_json: ::buffa::type_registry::any_to_json::<ListFlowsByTxResponse>,
5165    from_json: ::buffa::type_registry::any_from_json::<ListFlowsByTxResponse>,
5166    is_wkt: false,
5167};
5168/// FlowSummaryView is the compact lifecycle representation used by lists,
5169/// realtime updates, and the header of a detail view.
5170#[derive(Clone, PartialEq, Default)]
5171#[derive(::serde::Serialize, ::serde::Deserialize)]
5172#[serde(default)]
5173pub struct FlowSummaryView {
5174    /// Public account identifier for the root account or subaccount the flow belongs to.
5175    ///
5176    /// Field 1: `owner_account_id`
5177    #[serde(
5178        rename = "ownerAccountId",
5179        alias = "owner_account_id",
5180        with = "::buffa::json_helpers::uint64",
5181        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5182    )]
5183    pub owner_account_id: u64,
5184    /// Smart-account address for the account the flow belongs to. This is the
5185    /// stable address selector equivalent of `owner_account_id`; do not derive it
5186    /// from source or destination display addresses.
5187    ///
5188    /// Field 34: `smart_account_address`
5189    #[serde(
5190        rename = "smartAccountAddress",
5191        alias = "smart_account_address",
5192        with = "::buffa::json_helpers::proto_string",
5193        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5194    )]
5195    pub smart_account_address: ::buffa::alloc::string::String,
5196    /// Public, URL-safe lifecycle identifier for display, URLs, and user search.
5197    ///
5198    /// Field 33: `flow_id`
5199    #[serde(
5200        rename = "flowId",
5201        alias = "flow_id",
5202        with = "::buffa::json_helpers::proto_string",
5203        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5204    )]
5205    pub flow_id: ::buffa::alloc::string::String,
5206    /// Product flow family.
5207    ///
5208    /// Field 4: `flow_kind`
5209    #[serde(
5210        rename = "flowKind",
5211        alias = "flow_kind",
5212        with = "::buffa::json_helpers::proto_enum",
5213        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5214    )]
5215    pub flow_kind: ::buffa::EnumValue<FlowKind>,
5216    /// Current user-facing progress step for this flow. This may be derived from
5217    /// the flow state before a matching factual observed step exists.
5218    ///
5219    /// Field 6: `current_step`
5220    #[serde(
5221        rename = "currentStep",
5222        alias = "current_step",
5223        with = "::buffa::json_helpers::proto_enum",
5224        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5225    )]
5226    pub current_step: ::buffa::EnumValue<FlowStep>,
5227    /// Asset identifiers involved in the flow.
5228    ///
5229    /// Field 7: `asset_ids`
5230    #[serde(
5231        rename = "assetIds",
5232        alias = "asset_ids",
5233        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5234    )]
5235    pub asset_ids: ::buffa::MessageField<AssetIds>,
5236    /// Polyester Chain id associated with this flow when known.
5237    ///
5238    /// Field 8: `polyester_chain_id`
5239    #[serde(
5240        rename = "polyesterChainId",
5241        alias = "polyester_chain_id",
5242        with = "::buffa::json_helpers::uint32",
5243        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
5244    )]
5245    pub polyester_chain_id: u32,
5246    /// Gross principal amount for the flow in 18-decimal unified asset units.
5247    /// Request fees are exposed separately in request_fee. Specific fulfillment
5248    /// steps may carry a net movement amount when the step represents external
5249    /// delivery.
5250    ///
5251    /// Field 9: `amount_e18`
5252    #[serde(
5253        rename = "amountE18",
5254        alias = "amount_e18",
5255        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5256    )]
5257    pub amount_e18: ::buffa::MessageField<
5258        super::super::super::polyester::r#type::v1::U128,
5259    >,
5260    /// Request-scoped fee details when a fee applies and should be visible for the
5261    /// current step.
5262    ///
5263    /// Field 28: `request_fee`
5264    #[serde(
5265        rename = "requestFee",
5266        alias = "request_fee",
5267        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5268    )]
5269    pub request_fee: ::buffa::MessageField<RequestFee>,
5270    /// First observed source transaction hash for the flow when known.
5271    ///
5272    /// Field 11: `source_tx_hash`
5273    #[serde(
5274        rename = "sourceTxHash",
5275        alias = "source_tx_hash",
5276        with = "::buffa::json_helpers::proto_string",
5277        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5278    )]
5279    pub source_tx_hash: ::buffa::alloc::string::String,
5280    /// Stable occurrence discriminator within a transaction. For source-chain
5281    /// deposits this is the batched leg index; for on-chain facts it is the log or
5282    /// equivalent per-tx occurrence index when available.
5283    ///
5284    /// Field 32: `tx_occurrence_index`
5285    #[serde(
5286        rename = "txOccurrenceIndex",
5287        alias = "tx_occurrence_index",
5288        with = "::buffa::json_helpers::uint64",
5289        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5290    )]
5291    pub tx_occurrence_index: u64,
5292    /// Source address to show for the overall flow. For internal transfers this is
5293    /// the source smart account address.
5294    ///
5295    /// Field 13: `source_address`
5296    #[serde(
5297        rename = "sourceAddress",
5298        alias = "source_address",
5299        with = "::buffa::json_helpers::proto_string",
5300        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5301    )]
5302    pub source_address: ::buffa::alloc::string::String,
5303    /// Destination address to show for the overall flow. For internal transfers
5304    /// this is the destination smart account address.
5305    ///
5306    /// Field 14: `destination_address`
5307    #[serde(
5308        rename = "destinationAddress",
5309        alias = "destination_address",
5310        with = "::buffa::json_helpers::proto_string",
5311        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5312    )]
5313    pub destination_address: ::buffa::alloc::string::String,
5314    /// Latest transaction reference associated with the current visible state.
5315    ///
5316    /// Field 15: `latest_tx_ref`
5317    #[serde(
5318        rename = "latestTxRef",
5319        alias = "latest_tx_ref",
5320        with = "::buffa::json_helpers::proto_string",
5321        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5322    )]
5323    pub latest_tx_ref: ::buffa::alloc::string::String,
5324    /// Product domain where the overall flow starts. Use with
5325    /// `destination_domain` for route labels such as Funding to Trading.
5326    ///
5327    /// Field 29: `source_domain`
5328    #[serde(
5329        rename = "sourceDomain",
5330        alias = "source_domain",
5331        with = "::buffa::json_helpers::proto_enum",
5332        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5333    )]
5334    pub source_domain: ::buffa::EnumValue<FlowDomain>,
5335    /// Product domain where the overall flow ends or currently settles. Do not
5336    /// derive route labels from per-step settlement activity.
5337    ///
5338    /// Field 30: `destination_domain`
5339    #[serde(
5340        rename = "destinationDomain",
5341        alias = "destination_domain",
5342        with = "::buffa::json_helpers::proto_enum",
5343        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5344    )]
5345    pub destination_domain: ::buffa::EnumValue<FlowDomain>,
5346    /// Provenance of the latest meaningful lifecycle activity reflected in this
5347    /// summary. This is not necessarily the source of the entire flow.
5348    ///
5349    /// Field 16: `latest_lifecycle_source`
5350    #[serde(
5351        rename = "latestLifecycleSource",
5352        alias = "latest_lifecycle_source",
5353        with = "::buffa::json_helpers::proto_enum",
5354        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5355    )]
5356    pub latest_lifecycle_source: ::buffa::EnumValue<LifecycleSource>,
5357    /// Product-facing reason for failed, dropped, or otherwise notable flows.
5358    ///
5359    /// Field 17: `reason_code`
5360    #[serde(
5361        rename = "reasonCode",
5362        alias = "reason_code",
5363        with = "::buffa::json_helpers::proto_enum",
5364        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5365    )]
5366    pub reason_code: ::buffa::EnumValue<FlowReason>,
5367    /// First observed business timestamp in milliseconds since epoch (UTC).
5368    ///
5369    /// Field 18: `started_at_unix_ms`
5370    #[serde(
5371        rename = "startedAtUnixMs",
5372        alias = "started_at_unix_ms",
5373        with = "::buffa::json_helpers::uint64",
5374        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5375    )]
5376    pub started_at_unix_ms: u64,
5377    /// Last summary update timestamp in milliseconds since epoch (UTC).
5378    ///
5379    /// Field 19: `updated_at_unix_ms`
5380    #[serde(
5381        rename = "updatedAtUnixMs",
5382        alias = "updated_at_unix_ms",
5383        with = "::buffa::json_helpers::uint64",
5384        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5385    )]
5386    pub updated_at_unix_ms: u64,
5387    /// Terminal timestamp in milliseconds since epoch (UTC), or zero while open.
5388    ///
5389    /// Field 20: `terminal_at_unix_ms`
5390    #[serde(
5391        rename = "terminalAtUnixMs",
5392        alias = "terminal_at_unix_ms",
5393        with = "::buffa::json_helpers::uint64",
5394        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5395    )]
5396    pub terminal_at_unix_ms: u64,
5397    /// Timestamp used for list ordering in milliseconds since epoch (UTC).
5398    ///
5399    /// Field 21: `last_activity_at_unix_ms`
5400    #[serde(
5401        rename = "lastActivityAtUnixMs",
5402        alias = "last_activity_at_unix_ms",
5403        with = "::buffa::json_helpers::uint64",
5404        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5405    )]
5406    pub last_activity_at_unix_ms: u64,
5407    /// True when the flow is still progressing.
5408    ///
5409    /// Field 22: `is_open`
5410    #[serde(
5411        rename = "isOpen",
5412        alias = "is_open",
5413        with = "::buffa::json_helpers::proto_bool",
5414        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
5415    )]
5416    pub is_open: bool,
5417    /// True when the flow reached a final state.
5418    ///
5419    /// Field 23: `is_terminal`
5420    #[serde(
5421        rename = "isTerminal",
5422        alias = "is_terminal",
5423        with = "::buffa::json_helpers::proto_bool",
5424        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
5425    )]
5426    pub is_terminal: bool,
5427    /// One-based sequence of `current_step` in `progress_timeline`.
5428    ///
5429    /// Field 24: `current_step_sequence`
5430    #[serde(
5431        rename = "currentStepSequence",
5432        alias = "current_step_sequence",
5433        with = "::buffa::json_helpers::uint32",
5434        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
5435    )]
5436    pub current_step_sequence: u32,
5437    /// Progress data for the current visible step when the flow is open.
5438    ///
5439    /// Field 25: `current_progress`
5440    #[serde(
5441        rename = "currentProgress",
5442        alias = "current_progress",
5443        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5444    )]
5445    pub current_progress: ::buffa::MessageField<FlowSummaryProgressView>,
5446    /// Progress-bar timeline for list/header UI. This timeline may include a
5447    /// current derived step that is ahead of the latest factual observed step.
5448    ///
5449    /// Field 26: `progress_timeline`
5450    #[serde(
5451        rename = "progressTimeline",
5452        alias = "progress_timeline",
5453        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5454        deserialize_with = "::buffa::json_helpers::null_as_default"
5455    )]
5456    pub progress_timeline: ::buffa::alloc::vec::Vec<FlowTimelineItemView>,
5457    /// Estimated Unix completion timestamp in milliseconds.
5458    ///
5459    /// Field 27: `estimated_completion_unix_ms`
5460    #[serde(
5461        rename = "estimatedCompletionUnixMs",
5462        alias = "estimated_completion_unix_ms",
5463        with = "::buffa::json_helpers::uint64",
5464        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5465    )]
5466    pub estimated_completion_unix_ms: u64,
5467    #[serde(skip)]
5468    #[doc(hidden)]
5469    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5470}
5471impl ::core::fmt::Debug for FlowSummaryView {
5472    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5473        f.debug_struct("FlowSummaryView")
5474            .field("owner_account_id", &self.owner_account_id)
5475            .field("smart_account_address", &self.smart_account_address)
5476            .field("flow_id", &self.flow_id)
5477            .field("flow_kind", &self.flow_kind)
5478            .field("current_step", &self.current_step)
5479            .field("asset_ids", &self.asset_ids)
5480            .field("polyester_chain_id", &self.polyester_chain_id)
5481            .field("amount_e18", &self.amount_e18)
5482            .field("request_fee", &self.request_fee)
5483            .field("source_tx_hash", &self.source_tx_hash)
5484            .field("tx_occurrence_index", &self.tx_occurrence_index)
5485            .field("source_address", &self.source_address)
5486            .field("destination_address", &self.destination_address)
5487            .field("latest_tx_ref", &self.latest_tx_ref)
5488            .field("source_domain", &self.source_domain)
5489            .field("destination_domain", &self.destination_domain)
5490            .field("latest_lifecycle_source", &self.latest_lifecycle_source)
5491            .field("reason_code", &self.reason_code)
5492            .field("started_at_unix_ms", &self.started_at_unix_ms)
5493            .field("updated_at_unix_ms", &self.updated_at_unix_ms)
5494            .field("terminal_at_unix_ms", &self.terminal_at_unix_ms)
5495            .field("last_activity_at_unix_ms", &self.last_activity_at_unix_ms)
5496            .field("is_open", &self.is_open)
5497            .field("is_terminal", &self.is_terminal)
5498            .field("current_step_sequence", &self.current_step_sequence)
5499            .field("current_progress", &self.current_progress)
5500            .field("progress_timeline", &self.progress_timeline)
5501            .field("estimated_completion_unix_ms", &self.estimated_completion_unix_ms)
5502            .finish()
5503    }
5504}
5505impl FlowSummaryView {
5506    /// Protobuf type URL for this message, for use with `Any::pack` and
5507    /// `Any::unpack_if`.
5508    ///
5509    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5510    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
5511}
5512::buffa::impl_default_instance!(FlowSummaryView);
5513impl ::buffa::MessageName for FlowSummaryView {
5514    const PACKAGE: &'static str = "chain.lifecycle.v1";
5515    const NAME: &'static str = "FlowSummaryView";
5516    const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryView";
5517    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
5518}
5519impl ::buffa::Message for FlowSummaryView {
5520    /// Returns the total encoded size in bytes.
5521    ///
5522    /// The result is a `u32`; the protobuf specification requires all
5523    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5524    /// compliant message will never overflow this type.
5525    #[allow(clippy::let_and_return)]
5526    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5527        #[allow(unused_imports)]
5528        use ::buffa::Enumeration as _;
5529        let mut size = 0u32;
5530        if self.owner_account_id != 0u64 {
5531            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
5532        }
5533        {
5534            let val = self.flow_kind.to_i32();
5535            if val != 0 {
5536                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5537            }
5538        }
5539        {
5540            let val = self.current_step.to_i32();
5541            if val != 0 {
5542                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5543            }
5544        }
5545        if self.asset_ids.is_set() {
5546            let __slot = __cache.reserve();
5547            let inner_size = self.asset_ids.compute_size(__cache);
5548            __cache.set(__slot, inner_size);
5549            size
5550                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5551                    + inner_size;
5552        }
5553        if self.polyester_chain_id != 0u32 {
5554            size
5555                += 1u32
5556                    + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
5557        }
5558        if self.amount_e18.is_set() {
5559            let __slot = __cache.reserve();
5560            let inner_size = self.amount_e18.compute_size(__cache);
5561            __cache.set(__slot, inner_size);
5562            size
5563                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5564                    + inner_size;
5565        }
5566        if !self.source_tx_hash.is_empty() {
5567            size
5568                += 1u32
5569                    + ::buffa::types::string_encoded_len(&self.source_tx_hash) as u32;
5570        }
5571        if !self.source_address.is_empty() {
5572            size
5573                += 1u32
5574                    + ::buffa::types::string_encoded_len(&self.source_address) as u32;
5575        }
5576        if !self.destination_address.is_empty() {
5577            size
5578                += 1u32
5579                    + ::buffa::types::string_encoded_len(&self.destination_address)
5580                        as u32;
5581        }
5582        if !self.latest_tx_ref.is_empty() {
5583            size
5584                += 1u32 + ::buffa::types::string_encoded_len(&self.latest_tx_ref) as u32;
5585        }
5586        {
5587            let val = self.latest_lifecycle_source.to_i32();
5588            if val != 0 {
5589                size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5590            }
5591        }
5592        {
5593            let val = self.reason_code.to_i32();
5594            if val != 0 {
5595                size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5596            }
5597        }
5598        if self.started_at_unix_ms != 0u64 {
5599            size
5600                += 2u32
5601                    + ::buffa::types::uint64_encoded_len(self.started_at_unix_ms) as u32;
5602        }
5603        if self.updated_at_unix_ms != 0u64 {
5604            size
5605                += 2u32
5606                    + ::buffa::types::uint64_encoded_len(self.updated_at_unix_ms) as u32;
5607        }
5608        if self.terminal_at_unix_ms != 0u64 {
5609            size
5610                += 2u32
5611                    + ::buffa::types::uint64_encoded_len(self.terminal_at_unix_ms)
5612                        as u32;
5613        }
5614        if self.last_activity_at_unix_ms != 0u64 {
5615            size
5616                += 2u32
5617                    + ::buffa::types::uint64_encoded_len(self.last_activity_at_unix_ms)
5618                        as u32;
5619        }
5620        if self.is_open {
5621            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5622        }
5623        if self.is_terminal {
5624            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5625        }
5626        if self.current_step_sequence != 0u32 {
5627            size
5628                += 2u32
5629                    + ::buffa::types::uint32_encoded_len(self.current_step_sequence)
5630                        as u32;
5631        }
5632        if self.current_progress.is_set() {
5633            let __slot = __cache.reserve();
5634            let inner_size = self.current_progress.compute_size(__cache);
5635            __cache.set(__slot, inner_size);
5636            size
5637                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5638                    + inner_size;
5639        }
5640        for v in &self.progress_timeline {
5641            let __slot = __cache.reserve();
5642            let inner_size = v.compute_size(__cache);
5643            __cache.set(__slot, inner_size);
5644            size
5645                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5646                    + inner_size;
5647        }
5648        if self.estimated_completion_unix_ms != 0u64 {
5649            size
5650                += 2u32
5651                    + ::buffa::types::uint64_encoded_len(
5652                        self.estimated_completion_unix_ms,
5653                    ) as u32;
5654        }
5655        if self.request_fee.is_set() {
5656            let __slot = __cache.reserve();
5657            let inner_size = self.request_fee.compute_size(__cache);
5658            __cache.set(__slot, inner_size);
5659            size
5660                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5661                    + inner_size;
5662        }
5663        {
5664            let val = self.source_domain.to_i32();
5665            if val != 0 {
5666                size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5667            }
5668        }
5669        {
5670            let val = self.destination_domain.to_i32();
5671            if val != 0 {
5672                size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5673            }
5674        }
5675        if self.tx_occurrence_index != 0u64 {
5676            size
5677                += 2u32
5678                    + ::buffa::types::uint64_encoded_len(self.tx_occurrence_index)
5679                        as u32;
5680        }
5681        if !self.flow_id.is_empty() {
5682            size += 2u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
5683        }
5684        if !self.smart_account_address.is_empty() {
5685            size
5686                += 2u32
5687                    + ::buffa::types::string_encoded_len(&self.smart_account_address)
5688                        as u32;
5689        }
5690        size += self.__buffa_unknown_fields.encoded_len() as u32;
5691        size
5692    }
5693    fn write_to(
5694        &self,
5695        __cache: &mut ::buffa::SizeCache,
5696        buf: &mut impl ::buffa::bytes::BufMut,
5697    ) {
5698        #[allow(unused_imports)]
5699        use ::buffa::Enumeration as _;
5700        if self.owner_account_id != 0u64 {
5701            ::buffa::types::put_fixed64_field(1u32, self.owner_account_id, buf);
5702        }
5703        {
5704            let val = self.flow_kind.to_i32();
5705            if val != 0 {
5706                ::buffa::types::put_int32_field(4u32, val, buf);
5707            }
5708        }
5709        {
5710            let val = self.current_step.to_i32();
5711            if val != 0 {
5712                ::buffa::types::put_int32_field(6u32, val, buf);
5713            }
5714        }
5715        if self.asset_ids.is_set() {
5716            ::buffa::types::put_len_delimited_header(7u32, __cache.consume_next(), buf);
5717            self.asset_ids.write_to(__cache, buf);
5718        }
5719        if self.polyester_chain_id != 0u32 {
5720            ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
5721        }
5722        if self.amount_e18.is_set() {
5723            ::buffa::types::put_len_delimited_header(9u32, __cache.consume_next(), buf);
5724            self.amount_e18.write_to(__cache, buf);
5725        }
5726        if !self.source_tx_hash.is_empty() {
5727            ::buffa::types::put_string_field(11u32, &self.source_tx_hash, buf);
5728        }
5729        if !self.source_address.is_empty() {
5730            ::buffa::types::put_string_field(13u32, &self.source_address, buf);
5731        }
5732        if !self.destination_address.is_empty() {
5733            ::buffa::types::put_string_field(14u32, &self.destination_address, buf);
5734        }
5735        if !self.latest_tx_ref.is_empty() {
5736            ::buffa::types::put_string_field(15u32, &self.latest_tx_ref, buf);
5737        }
5738        {
5739            let val = self.latest_lifecycle_source.to_i32();
5740            if val != 0 {
5741                ::buffa::types::put_int32_field(16u32, val, buf);
5742            }
5743        }
5744        {
5745            let val = self.reason_code.to_i32();
5746            if val != 0 {
5747                ::buffa::types::put_int32_field(17u32, val, buf);
5748            }
5749        }
5750        if self.started_at_unix_ms != 0u64 {
5751            ::buffa::types::put_uint64_field(18u32, self.started_at_unix_ms, buf);
5752        }
5753        if self.updated_at_unix_ms != 0u64 {
5754            ::buffa::types::put_uint64_field(19u32, self.updated_at_unix_ms, buf);
5755        }
5756        if self.terminal_at_unix_ms != 0u64 {
5757            ::buffa::types::put_uint64_field(20u32, self.terminal_at_unix_ms, buf);
5758        }
5759        if self.last_activity_at_unix_ms != 0u64 {
5760            ::buffa::types::put_uint64_field(21u32, self.last_activity_at_unix_ms, buf);
5761        }
5762        if self.is_open {
5763            ::buffa::types::put_bool_field(22u32, self.is_open, buf);
5764        }
5765        if self.is_terminal {
5766            ::buffa::types::put_bool_field(23u32, self.is_terminal, buf);
5767        }
5768        if self.current_step_sequence != 0u32 {
5769            ::buffa::types::put_uint32_field(24u32, self.current_step_sequence, buf);
5770        }
5771        if self.current_progress.is_set() {
5772            ::buffa::types::put_len_delimited_header(25u32, __cache.consume_next(), buf);
5773            self.current_progress.write_to(__cache, buf);
5774        }
5775        for v in &self.progress_timeline {
5776            ::buffa::types::put_len_delimited_header(26u32, __cache.consume_next(), buf);
5777            v.write_to(__cache, buf);
5778        }
5779        if self.estimated_completion_unix_ms != 0u64 {
5780            ::buffa::types::put_uint64_field(
5781                27u32,
5782                self.estimated_completion_unix_ms,
5783                buf,
5784            );
5785        }
5786        if self.request_fee.is_set() {
5787            ::buffa::types::put_len_delimited_header(28u32, __cache.consume_next(), buf);
5788            self.request_fee.write_to(__cache, buf);
5789        }
5790        {
5791            let val = self.source_domain.to_i32();
5792            if val != 0 {
5793                ::buffa::types::put_int32_field(29u32, val, buf);
5794            }
5795        }
5796        {
5797            let val = self.destination_domain.to_i32();
5798            if val != 0 {
5799                ::buffa::types::put_int32_field(30u32, val, buf);
5800            }
5801        }
5802        if self.tx_occurrence_index != 0u64 {
5803            ::buffa::types::put_uint64_field(32u32, self.tx_occurrence_index, buf);
5804        }
5805        if !self.flow_id.is_empty() {
5806            ::buffa::types::put_string_field(33u32, &self.flow_id, buf);
5807        }
5808        if !self.smart_account_address.is_empty() {
5809            ::buffa::types::put_string_field(34u32, &self.smart_account_address, buf);
5810        }
5811        self.__buffa_unknown_fields.write_to(buf);
5812    }
5813    fn merge_field(
5814        &mut self,
5815        tag: ::buffa::encoding::Tag,
5816        buf: &mut impl ::buffa::bytes::Buf,
5817        ctx: ::buffa::DecodeContext<'_>,
5818    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5819        #[allow(unused_imports)]
5820        use ::buffa::bytes::Buf as _;
5821        #[allow(unused_imports)]
5822        use ::buffa::Enumeration as _;
5823        match tag.field_number() {
5824            1u32 => {
5825                ::buffa::encoding::check_wire_type(
5826                    tag,
5827                    ::buffa::encoding::WireType::Fixed64,
5828                )?;
5829                self.owner_account_id = ::buffa::types::decode_fixed64(buf)?;
5830            }
5831            4u32 => {
5832                ::buffa::encoding::check_wire_type(
5833                    tag,
5834                    ::buffa::encoding::WireType::Varint,
5835                )?;
5836                self.flow_kind = ::buffa::EnumValue::from(
5837                    ::buffa::types::decode_int32(buf)?,
5838                );
5839            }
5840            6u32 => {
5841                ::buffa::encoding::check_wire_type(
5842                    tag,
5843                    ::buffa::encoding::WireType::Varint,
5844                )?;
5845                self.current_step = ::buffa::EnumValue::from(
5846                    ::buffa::types::decode_int32(buf)?,
5847                );
5848            }
5849            7u32 => {
5850                ::buffa::encoding::check_wire_type(
5851                    tag,
5852                    ::buffa::encoding::WireType::LengthDelimited,
5853                )?;
5854                ::buffa::Message::merge_length_delimited(
5855                    self.asset_ids.get_or_insert_default(),
5856                    buf,
5857                    ctx,
5858                )?;
5859            }
5860            8u32 => {
5861                ::buffa::encoding::check_wire_type(
5862                    tag,
5863                    ::buffa::encoding::WireType::Varint,
5864                )?;
5865                self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
5866            }
5867            9u32 => {
5868                ::buffa::encoding::check_wire_type(
5869                    tag,
5870                    ::buffa::encoding::WireType::LengthDelimited,
5871                )?;
5872                ::buffa::Message::merge_length_delimited(
5873                    self.amount_e18.get_or_insert_default(),
5874                    buf,
5875                    ctx,
5876                )?;
5877            }
5878            11u32 => {
5879                ::buffa::encoding::check_wire_type(
5880                    tag,
5881                    ::buffa::encoding::WireType::LengthDelimited,
5882                )?;
5883                ::buffa::types::merge_string(&mut self.source_tx_hash, buf)?;
5884            }
5885            13u32 => {
5886                ::buffa::encoding::check_wire_type(
5887                    tag,
5888                    ::buffa::encoding::WireType::LengthDelimited,
5889                )?;
5890                ::buffa::types::merge_string(&mut self.source_address, buf)?;
5891            }
5892            14u32 => {
5893                ::buffa::encoding::check_wire_type(
5894                    tag,
5895                    ::buffa::encoding::WireType::LengthDelimited,
5896                )?;
5897                ::buffa::types::merge_string(&mut self.destination_address, buf)?;
5898            }
5899            15u32 => {
5900                ::buffa::encoding::check_wire_type(
5901                    tag,
5902                    ::buffa::encoding::WireType::LengthDelimited,
5903                )?;
5904                ::buffa::types::merge_string(&mut self.latest_tx_ref, buf)?;
5905            }
5906            16u32 => {
5907                ::buffa::encoding::check_wire_type(
5908                    tag,
5909                    ::buffa::encoding::WireType::Varint,
5910                )?;
5911                self.latest_lifecycle_source = ::buffa::EnumValue::from(
5912                    ::buffa::types::decode_int32(buf)?,
5913                );
5914            }
5915            17u32 => {
5916                ::buffa::encoding::check_wire_type(
5917                    tag,
5918                    ::buffa::encoding::WireType::Varint,
5919                )?;
5920                self.reason_code = ::buffa::EnumValue::from(
5921                    ::buffa::types::decode_int32(buf)?,
5922                );
5923            }
5924            18u32 => {
5925                ::buffa::encoding::check_wire_type(
5926                    tag,
5927                    ::buffa::encoding::WireType::Varint,
5928                )?;
5929                self.started_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5930            }
5931            19u32 => {
5932                ::buffa::encoding::check_wire_type(
5933                    tag,
5934                    ::buffa::encoding::WireType::Varint,
5935                )?;
5936                self.updated_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5937            }
5938            20u32 => {
5939                ::buffa::encoding::check_wire_type(
5940                    tag,
5941                    ::buffa::encoding::WireType::Varint,
5942                )?;
5943                self.terminal_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5944            }
5945            21u32 => {
5946                ::buffa::encoding::check_wire_type(
5947                    tag,
5948                    ::buffa::encoding::WireType::Varint,
5949                )?;
5950                self.last_activity_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5951            }
5952            22u32 => {
5953                ::buffa::encoding::check_wire_type(
5954                    tag,
5955                    ::buffa::encoding::WireType::Varint,
5956                )?;
5957                self.is_open = ::buffa::types::decode_bool(buf)?;
5958            }
5959            23u32 => {
5960                ::buffa::encoding::check_wire_type(
5961                    tag,
5962                    ::buffa::encoding::WireType::Varint,
5963                )?;
5964                self.is_terminal = ::buffa::types::decode_bool(buf)?;
5965            }
5966            24u32 => {
5967                ::buffa::encoding::check_wire_type(
5968                    tag,
5969                    ::buffa::encoding::WireType::Varint,
5970                )?;
5971                self.current_step_sequence = ::buffa::types::decode_uint32(buf)?;
5972            }
5973            25u32 => {
5974                ::buffa::encoding::check_wire_type(
5975                    tag,
5976                    ::buffa::encoding::WireType::LengthDelimited,
5977                )?;
5978                ::buffa::Message::merge_length_delimited(
5979                    self.current_progress.get_or_insert_default(),
5980                    buf,
5981                    ctx,
5982                )?;
5983            }
5984            26u32 => {
5985                ::buffa::encoding::check_wire_type(
5986                    tag,
5987                    ::buffa::encoding::WireType::LengthDelimited,
5988                )?;
5989                let mut elem = ::core::default::Default::default();
5990                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
5991                self.progress_timeline.push(elem);
5992            }
5993            27u32 => {
5994                ::buffa::encoding::check_wire_type(
5995                    tag,
5996                    ::buffa::encoding::WireType::Varint,
5997                )?;
5998                self.estimated_completion_unix_ms = ::buffa::types::decode_uint64(buf)?;
5999            }
6000            28u32 => {
6001                ::buffa::encoding::check_wire_type(
6002                    tag,
6003                    ::buffa::encoding::WireType::LengthDelimited,
6004                )?;
6005                ::buffa::Message::merge_length_delimited(
6006                    self.request_fee.get_or_insert_default(),
6007                    buf,
6008                    ctx,
6009                )?;
6010            }
6011            29u32 => {
6012                ::buffa::encoding::check_wire_type(
6013                    tag,
6014                    ::buffa::encoding::WireType::Varint,
6015                )?;
6016                self.source_domain = ::buffa::EnumValue::from(
6017                    ::buffa::types::decode_int32(buf)?,
6018                );
6019            }
6020            30u32 => {
6021                ::buffa::encoding::check_wire_type(
6022                    tag,
6023                    ::buffa::encoding::WireType::Varint,
6024                )?;
6025                self.destination_domain = ::buffa::EnumValue::from(
6026                    ::buffa::types::decode_int32(buf)?,
6027                );
6028            }
6029            32u32 => {
6030                ::buffa::encoding::check_wire_type(
6031                    tag,
6032                    ::buffa::encoding::WireType::Varint,
6033                )?;
6034                self.tx_occurrence_index = ::buffa::types::decode_uint64(buf)?;
6035            }
6036            33u32 => {
6037                ::buffa::encoding::check_wire_type(
6038                    tag,
6039                    ::buffa::encoding::WireType::LengthDelimited,
6040                )?;
6041                ::buffa::types::merge_string(&mut self.flow_id, buf)?;
6042            }
6043            34u32 => {
6044                ::buffa::encoding::check_wire_type(
6045                    tag,
6046                    ::buffa::encoding::WireType::LengthDelimited,
6047                )?;
6048                ::buffa::types::merge_string(&mut self.smart_account_address, buf)?;
6049            }
6050            _ => {
6051                self.__buffa_unknown_fields
6052                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
6053            }
6054        }
6055        ::core::result::Result::Ok(())
6056    }
6057    fn clear(&mut self) {
6058        self.owner_account_id = 0u64;
6059        self.flow_kind = ::buffa::EnumValue::from(0);
6060        self.current_step = ::buffa::EnumValue::from(0);
6061        self.asset_ids = ::buffa::MessageField::none();
6062        self.polyester_chain_id = 0u32;
6063        self.amount_e18 = ::buffa::MessageField::none();
6064        self.source_tx_hash.clear();
6065        self.source_address.clear();
6066        self.destination_address.clear();
6067        self.latest_tx_ref.clear();
6068        self.latest_lifecycle_source = ::buffa::EnumValue::from(0);
6069        self.reason_code = ::buffa::EnumValue::from(0);
6070        self.started_at_unix_ms = 0u64;
6071        self.updated_at_unix_ms = 0u64;
6072        self.terminal_at_unix_ms = 0u64;
6073        self.last_activity_at_unix_ms = 0u64;
6074        self.is_open = false;
6075        self.is_terminal = false;
6076        self.current_step_sequence = 0u32;
6077        self.current_progress = ::buffa::MessageField::none();
6078        self.progress_timeline.clear();
6079        self.estimated_completion_unix_ms = 0u64;
6080        self.request_fee = ::buffa::MessageField::none();
6081        self.source_domain = ::buffa::EnumValue::from(0);
6082        self.destination_domain = ::buffa::EnumValue::from(0);
6083        self.tx_occurrence_index = 0u64;
6084        self.flow_id.clear();
6085        self.smart_account_address.clear();
6086        self.__buffa_unknown_fields.clear();
6087    }
6088}
6089impl ::buffa::ExtensionSet for FlowSummaryView {
6090    const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowSummaryView";
6091    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6092        &self.__buffa_unknown_fields
6093    }
6094    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6095        &mut self.__buffa_unknown_fields
6096    }
6097}
6098impl ::buffa::json_helpers::ProtoElemJson for FlowSummaryView {
6099    fn serialize_proto_json<S: ::serde::Serializer>(
6100        v: &Self,
6101        s: S,
6102    ) -> ::core::result::Result<S::Ok, S::Error> {
6103        ::serde::Serialize::serialize(v, s)
6104    }
6105    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6106        d: D,
6107    ) -> ::core::result::Result<Self, D::Error> {
6108        <Self as ::serde::Deserialize>::deserialize(d)
6109    }
6110}
6111#[doc(hidden)]
6112pub const __FLOW_SUMMARY_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6113    type_url: "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView",
6114    to_json: ::buffa::type_registry::any_to_json::<FlowSummaryView>,
6115    from_json: ::buffa::type_registry::any_from_json::<FlowSummaryView>,
6116    is_wkt: false,
6117};
6118/// FlowSummaryProgressView describes progress within the current visible step.
6119#[derive(Clone, PartialEq, Default)]
6120#[derive(::serde::Serialize, ::serde::Deserialize)]
6121#[serde(default)]
6122pub struct FlowSummaryProgressView {
6123    /// Timestamp when the current visible step started, in milliseconds since epoch
6124    /// (UTC).
6125    ///
6126    /// Field 1: `current_step_started_at_unix_ms`
6127    #[serde(
6128        rename = "currentStepStartedAtUnixMs",
6129        alias = "current_step_started_at_unix_ms",
6130        with = "::buffa::json_helpers::uint64",
6131        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6132    )]
6133    pub current_step_started_at_unix_ms: u64,
6134    /// Expected duration for the current visible step in milliseconds.
6135    ///
6136    /// Field 2: `current_step_expected_duration_ms`
6137    #[serde(
6138        rename = "currentStepExpectedDurationMs",
6139        alias = "current_step_expected_duration_ms",
6140        with = "::buffa::json_helpers::uint64",
6141        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6142    )]
6143    pub current_step_expected_duration_ms: u64,
6144    /// Current source confirmation count when confirmations apply.
6145    ///
6146    /// Field 5: `current_confirmations`
6147    #[serde(
6148        rename = "currentConfirmations",
6149        alias = "current_confirmations",
6150        with = "::buffa::json_helpers::uint32",
6151        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6152    )]
6153    pub current_confirmations: u32,
6154    /// Required source confirmation count when confirmations apply.
6155    ///
6156    /// Field 6: `required_confirmations`
6157    #[serde(
6158        rename = "requiredConfirmations",
6159        alias = "required_confirmations",
6160        with = "::buffa::json_helpers::uint32",
6161        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6162    )]
6163    pub required_confirmations: u32,
6164    /// Current approval count when validation applies.
6165    ///
6166    /// Field 7: `approve_count`
6167    #[serde(
6168        rename = "approveCount",
6169        alias = "approve_count",
6170        with = "::buffa::json_helpers::uint32",
6171        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6172    )]
6173    pub approve_count: u32,
6174    /// Current rejection count when validation applies.
6175    ///
6176    /// Field 8: `reject_count`
6177    #[serde(
6178        rename = "rejectCount",
6179        alias = "reject_count",
6180        with = "::buffa::json_helpers::uint32",
6181        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6182    )]
6183    pub reject_count: u32,
6184    /// Validator set size when validation applies.
6185    ///
6186    /// Field 9: `validator_count`
6187    #[serde(
6188        rename = "validatorCount",
6189        alias = "validator_count",
6190        with = "::buffa::json_helpers::uint32",
6191        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6192    )]
6193    pub validator_count: u32,
6194    /// Approval count required for the current validation step.
6195    ///
6196    /// Field 10: `required_approvals`
6197    #[serde(
6198        rename = "requiredApprovals",
6199        alias = "required_approvals",
6200        with = "::buffa::json_helpers::uint32",
6201        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6202    )]
6203    pub required_approvals: u32,
6204    /// Rejection count that would fail the current validation step.
6205    ///
6206    /// Field 11: `required_rejections`
6207    #[serde(
6208        rename = "requiredRejections",
6209        alias = "required_rejections",
6210        with = "::buffa::json_helpers::uint32",
6211        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6212    )]
6213    pub required_rejections: u32,
6214    #[serde(skip)]
6215    #[doc(hidden)]
6216    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6217}
6218impl ::core::fmt::Debug for FlowSummaryProgressView {
6219    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6220        f.debug_struct("FlowSummaryProgressView")
6221            .field(
6222                "current_step_started_at_unix_ms",
6223                &self.current_step_started_at_unix_ms,
6224            )
6225            .field(
6226                "current_step_expected_duration_ms",
6227                &self.current_step_expected_duration_ms,
6228            )
6229            .field("current_confirmations", &self.current_confirmations)
6230            .field("required_confirmations", &self.required_confirmations)
6231            .field("approve_count", &self.approve_count)
6232            .field("reject_count", &self.reject_count)
6233            .field("validator_count", &self.validator_count)
6234            .field("required_approvals", &self.required_approvals)
6235            .field("required_rejections", &self.required_rejections)
6236            .finish()
6237    }
6238}
6239impl FlowSummaryProgressView {
6240    /// Protobuf type URL for this message, for use with `Any::pack` and
6241    /// `Any::unpack_if`.
6242    ///
6243    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6244    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
6245}
6246::buffa::impl_default_instance!(FlowSummaryProgressView);
6247impl ::buffa::MessageName for FlowSummaryProgressView {
6248    const PACKAGE: &'static str = "chain.lifecycle.v1";
6249    const NAME: &'static str = "FlowSummaryProgressView";
6250    const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
6251    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
6252}
6253impl ::buffa::Message for FlowSummaryProgressView {
6254    /// Returns the total encoded size in bytes.
6255    ///
6256    /// The result is a `u32`; the protobuf specification requires all
6257    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6258    /// compliant message will never overflow this type.
6259    #[allow(clippy::let_and_return)]
6260    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6261        #[allow(unused_imports)]
6262        use ::buffa::Enumeration as _;
6263        let mut size = 0u32;
6264        if self.current_step_started_at_unix_ms != 0u64 {
6265            size
6266                += 1u32
6267                    + ::buffa::types::uint64_encoded_len(
6268                        self.current_step_started_at_unix_ms,
6269                    ) as u32;
6270        }
6271        if self.current_step_expected_duration_ms != 0u64 {
6272            size
6273                += 1u32
6274                    + ::buffa::types::uint64_encoded_len(
6275                        self.current_step_expected_duration_ms,
6276                    ) as u32;
6277        }
6278        if self.current_confirmations != 0u32 {
6279            size
6280                += 1u32
6281                    + ::buffa::types::uint32_encoded_len(self.current_confirmations)
6282                        as u32;
6283        }
6284        if self.required_confirmations != 0u32 {
6285            size
6286                += 1u32
6287                    + ::buffa::types::uint32_encoded_len(self.required_confirmations)
6288                        as u32;
6289        }
6290        if self.approve_count != 0u32 {
6291            size += 1u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
6292        }
6293        if self.reject_count != 0u32 {
6294            size += 1u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
6295        }
6296        if self.validator_count != 0u32 {
6297            size
6298                += 1u32
6299                    + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
6300        }
6301        if self.required_approvals != 0u32 {
6302            size
6303                += 1u32
6304                    + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
6305        }
6306        if self.required_rejections != 0u32 {
6307            size
6308                += 1u32
6309                    + ::buffa::types::uint32_encoded_len(self.required_rejections)
6310                        as u32;
6311        }
6312        size += self.__buffa_unknown_fields.encoded_len() as u32;
6313        size
6314    }
6315    fn write_to(
6316        &self,
6317        _cache: &mut ::buffa::SizeCache,
6318        buf: &mut impl ::buffa::bytes::BufMut,
6319    ) {
6320        #[allow(unused_imports)]
6321        use ::buffa::Enumeration as _;
6322        if self.current_step_started_at_unix_ms != 0u64 {
6323            ::buffa::types::put_uint64_field(
6324                1u32,
6325                self.current_step_started_at_unix_ms,
6326                buf,
6327            );
6328        }
6329        if self.current_step_expected_duration_ms != 0u64 {
6330            ::buffa::types::put_uint64_field(
6331                2u32,
6332                self.current_step_expected_duration_ms,
6333                buf,
6334            );
6335        }
6336        if self.current_confirmations != 0u32 {
6337            ::buffa::types::put_uint32_field(5u32, self.current_confirmations, buf);
6338        }
6339        if self.required_confirmations != 0u32 {
6340            ::buffa::types::put_uint32_field(6u32, self.required_confirmations, buf);
6341        }
6342        if self.approve_count != 0u32 {
6343            ::buffa::types::put_uint32_field(7u32, self.approve_count, buf);
6344        }
6345        if self.reject_count != 0u32 {
6346            ::buffa::types::put_uint32_field(8u32, self.reject_count, buf);
6347        }
6348        if self.validator_count != 0u32 {
6349            ::buffa::types::put_uint32_field(9u32, self.validator_count, buf);
6350        }
6351        if self.required_approvals != 0u32 {
6352            ::buffa::types::put_uint32_field(10u32, self.required_approvals, buf);
6353        }
6354        if self.required_rejections != 0u32 {
6355            ::buffa::types::put_uint32_field(11u32, self.required_rejections, buf);
6356        }
6357        self.__buffa_unknown_fields.write_to(buf);
6358    }
6359    fn merge_field(
6360        &mut self,
6361        tag: ::buffa::encoding::Tag,
6362        buf: &mut impl ::buffa::bytes::Buf,
6363        ctx: ::buffa::DecodeContext<'_>,
6364    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6365        #[allow(unused_imports)]
6366        use ::buffa::bytes::Buf as _;
6367        #[allow(unused_imports)]
6368        use ::buffa::Enumeration as _;
6369        match tag.field_number() {
6370            1u32 => {
6371                ::buffa::encoding::check_wire_type(
6372                    tag,
6373                    ::buffa::encoding::WireType::Varint,
6374                )?;
6375                self.current_step_started_at_unix_ms = ::buffa::types::decode_uint64(
6376                    buf,
6377                )?;
6378            }
6379            2u32 => {
6380                ::buffa::encoding::check_wire_type(
6381                    tag,
6382                    ::buffa::encoding::WireType::Varint,
6383                )?;
6384                self.current_step_expected_duration_ms = ::buffa::types::decode_uint64(
6385                    buf,
6386                )?;
6387            }
6388            5u32 => {
6389                ::buffa::encoding::check_wire_type(
6390                    tag,
6391                    ::buffa::encoding::WireType::Varint,
6392                )?;
6393                self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
6394            }
6395            6u32 => {
6396                ::buffa::encoding::check_wire_type(
6397                    tag,
6398                    ::buffa::encoding::WireType::Varint,
6399                )?;
6400                self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
6401            }
6402            7u32 => {
6403                ::buffa::encoding::check_wire_type(
6404                    tag,
6405                    ::buffa::encoding::WireType::Varint,
6406                )?;
6407                self.approve_count = ::buffa::types::decode_uint32(buf)?;
6408            }
6409            8u32 => {
6410                ::buffa::encoding::check_wire_type(
6411                    tag,
6412                    ::buffa::encoding::WireType::Varint,
6413                )?;
6414                self.reject_count = ::buffa::types::decode_uint32(buf)?;
6415            }
6416            9u32 => {
6417                ::buffa::encoding::check_wire_type(
6418                    tag,
6419                    ::buffa::encoding::WireType::Varint,
6420                )?;
6421                self.validator_count = ::buffa::types::decode_uint32(buf)?;
6422            }
6423            10u32 => {
6424                ::buffa::encoding::check_wire_type(
6425                    tag,
6426                    ::buffa::encoding::WireType::Varint,
6427                )?;
6428                self.required_approvals = ::buffa::types::decode_uint32(buf)?;
6429            }
6430            11u32 => {
6431                ::buffa::encoding::check_wire_type(
6432                    tag,
6433                    ::buffa::encoding::WireType::Varint,
6434                )?;
6435                self.required_rejections = ::buffa::types::decode_uint32(buf)?;
6436            }
6437            _ => {
6438                self.__buffa_unknown_fields
6439                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
6440            }
6441        }
6442        ::core::result::Result::Ok(())
6443    }
6444    fn clear(&mut self) {
6445        self.current_step_started_at_unix_ms = 0u64;
6446        self.current_step_expected_duration_ms = 0u64;
6447        self.current_confirmations = 0u32;
6448        self.required_confirmations = 0u32;
6449        self.approve_count = 0u32;
6450        self.reject_count = 0u32;
6451        self.validator_count = 0u32;
6452        self.required_approvals = 0u32;
6453        self.required_rejections = 0u32;
6454        self.__buffa_unknown_fields.clear();
6455    }
6456}
6457impl ::buffa::ExtensionSet for FlowSummaryProgressView {
6458    const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
6459    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6460        &self.__buffa_unknown_fields
6461    }
6462    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6463        &mut self.__buffa_unknown_fields
6464    }
6465}
6466impl ::buffa::json_helpers::ProtoElemJson for FlowSummaryProgressView {
6467    fn serialize_proto_json<S: ::serde::Serializer>(
6468        v: &Self,
6469        s: S,
6470    ) -> ::core::result::Result<S::Ok, S::Error> {
6471        ::serde::Serialize::serialize(v, s)
6472    }
6473    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6474        d: D,
6475    ) -> ::core::result::Result<Self, D::Error> {
6476        <Self as ::serde::Deserialize>::deserialize(d)
6477    }
6478}
6479#[doc(hidden)]
6480pub const __FLOW_SUMMARY_PROGRESS_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6481    type_url: "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView",
6482    to_json: ::buffa::type_registry::any_to_json::<FlowSummaryProgressView>,
6483    from_json: ::buffa::type_registry::any_from_json::<FlowSummaryProgressView>,
6484    is_wkt: false,
6485};
6486/// FlowStepView is one factual observed visible step in the lifecycle detail
6487/// view. Use `FlowSummaryView.progress_timeline` for the current projected
6488/// progress state.
6489#[derive(Clone, PartialEq, Default)]
6490#[derive(::serde::Serialize, ::serde::Deserialize)]
6491#[serde(default)]
6492pub struct FlowStepView {
6493    /// One-based observed step sequence for display and audit.
6494    ///
6495    /// Field 1: `sequence`
6496    #[serde(
6497        rename = "sequence",
6498        with = "::buffa::json_helpers::uint32",
6499        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6500    )]
6501    pub sequence: u32,
6502    /// Business-facing observed step.
6503    ///
6504    /// Field 3: `step`
6505    #[serde(
6506        rename = "step",
6507        with = "::buffa::json_helpers::proto_enum",
6508        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6509    )]
6510    pub step: ::buffa::EnumValue<FlowStep>,
6511    /// Asset identifiers involved in this step.
6512    ///
6513    /// Field 7: `asset_ids`
6514    #[serde(
6515        rename = "assetIds",
6516        alias = "asset_ids",
6517        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6518    )]
6519    pub asset_ids: ::buffa::MessageField<AssetIds>,
6520    /// Polyester Chain id associated with this step when known.
6521    ///
6522    /// Field 8: `polyester_chain_id`
6523    #[serde(
6524        rename = "polyesterChainId",
6525        alias = "polyester_chain_id",
6526        with = "::buffa::json_helpers::uint32",
6527        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6528    )]
6529    pub polyester_chain_id: u32,
6530    /// Amount represented by this step in 18-decimal unified asset units. Steps
6531    /// may carry the actual net movement amount when fees have already been taken.
6532    ///
6533    /// Field 9: `amount_e18`
6534    #[serde(
6535        rename = "amountE18",
6536        alias = "amount_e18",
6537        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6538    )]
6539    pub amount_e18: ::buffa::MessageField<
6540        super::super::super::polyester::r#type::v1::U128,
6541    >,
6542    /// Request-scoped fee details when a fee applies to this step.
6543    ///
6544    /// Field 24: `request_fee`
6545    #[serde(
6546        rename = "requestFee",
6547        alias = "request_fee",
6548        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6549    )]
6550    pub request_fee: ::buffa::MessageField<RequestFee>,
6551    /// Transaction reference most relevant to this step.
6552    ///
6553    /// Field 11: `milestone_tx_ref`
6554    #[serde(
6555        rename = "milestoneTxRef",
6556        alias = "milestone_tx_ref",
6557        with = "::buffa::json_helpers::proto_string",
6558        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6559    )]
6560    pub milestone_tx_ref: ::buffa::alloc::string::String,
6561    /// Source that produced this visible step.
6562    ///
6563    /// Field 12: `lifecycle_source`
6564    #[serde(
6565        rename = "lifecycleSource",
6566        alias = "lifecycle_source",
6567        with = "::buffa::json_helpers::proto_enum",
6568        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6569    )]
6570    pub lifecycle_source: ::buffa::EnumValue<LifecycleSource>,
6571    /// Product-facing reason for failed, dropped, or otherwise notable steps.
6572    ///
6573    /// Field 13: `reason_code`
6574    #[serde(
6575        rename = "reasonCode",
6576        alias = "reason_code",
6577        with = "::buffa::json_helpers::proto_enum",
6578        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6579    )]
6580    pub reason_code: ::buffa::EnumValue<FlowReason>,
6581    /// Current source confirmation count when confirmations apply.
6582    ///
6583    /// Field 14: `current_confirmations`
6584    #[serde(
6585        rename = "currentConfirmations",
6586        alias = "current_confirmations",
6587        with = "::buffa::json_helpers::uint32",
6588        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6589    )]
6590    pub current_confirmations: u32,
6591    /// Required source confirmation count when confirmations apply.
6592    ///
6593    /// Field 15: `required_confirmations`
6594    #[serde(
6595        rename = "requiredConfirmations",
6596        alias = "required_confirmations",
6597        with = "::buffa::json_helpers::uint32",
6598        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6599    )]
6600    pub required_confirmations: u32,
6601    /// Current approval count when validation applies.
6602    ///
6603    /// Field 16: `approve_count`
6604    #[serde(
6605        rename = "approveCount",
6606        alias = "approve_count",
6607        with = "::buffa::json_helpers::uint32",
6608        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6609    )]
6610    pub approve_count: u32,
6611    /// Current rejection count when validation applies.
6612    ///
6613    /// Field 17: `reject_count`
6614    #[serde(
6615        rename = "rejectCount",
6616        alias = "reject_count",
6617        with = "::buffa::json_helpers::uint32",
6618        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6619    )]
6620    pub reject_count: u32,
6621    /// Validator set size when validation applies.
6622    ///
6623    /// Field 18: `validator_count`
6624    #[serde(
6625        rename = "validatorCount",
6626        alias = "validator_count",
6627        with = "::buffa::json_helpers::uint32",
6628        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6629    )]
6630    pub validator_count: u32,
6631    /// Approval count required for this validation step.
6632    ///
6633    /// Field 22: `required_approvals`
6634    #[serde(
6635        rename = "requiredApprovals",
6636        alias = "required_approvals",
6637        with = "::buffa::json_helpers::uint32",
6638        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6639    )]
6640    pub required_approvals: u32,
6641    /// Rejection count that would fail this validation step.
6642    ///
6643    /// Field 23: `required_rejections`
6644    #[serde(
6645        rename = "requiredRejections",
6646        alias = "required_rejections",
6647        with = "::buffa::json_helpers::uint32",
6648        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6649    )]
6650    pub required_rejections: u32,
6651    /// Step occurrence timestamp in milliseconds since epoch (UTC).
6652    ///
6653    /// Field 19: `occurred_at_unix_ms`
6654    #[serde(
6655        rename = "occurredAtUnixMs",
6656        alias = "occurred_at_unix_ms",
6657        with = "::buffa::json_helpers::uint64",
6658        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6659    )]
6660    pub occurred_at_unix_ms: u64,
6661    /// Source-chain block time moving average in milliseconds when known.
6662    ///
6663    /// Field 20: `block_time_moving_average_ms`
6664    #[serde(
6665        rename = "blockTimeMovingAverageMs",
6666        alias = "block_time_moving_average_ms",
6667        with = "::buffa::json_helpers::uint64",
6668        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6669    )]
6670    pub block_time_moving_average_ms: u64,
6671    /// Nested activity rows for expandable UI detail. The top-level step remains
6672    /// one visible lifecycle stage while activities expose the underlying on-chain
6673    /// evidence that advanced it.
6674    ///
6675    /// Field 21: `activities`
6676    #[serde(
6677        rename = "activities",
6678        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
6679        deserialize_with = "::buffa::json_helpers::null_as_default"
6680    )]
6681    pub activities: ::buffa::alloc::vec::Vec<FlowStepActivityView>,
6682    #[serde(skip)]
6683    #[doc(hidden)]
6684    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6685}
6686impl ::core::fmt::Debug for FlowStepView {
6687    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6688        f.debug_struct("FlowStepView")
6689            .field("sequence", &self.sequence)
6690            .field("step", &self.step)
6691            .field("asset_ids", &self.asset_ids)
6692            .field("polyester_chain_id", &self.polyester_chain_id)
6693            .field("amount_e18", &self.amount_e18)
6694            .field("request_fee", &self.request_fee)
6695            .field("milestone_tx_ref", &self.milestone_tx_ref)
6696            .field("lifecycle_source", &self.lifecycle_source)
6697            .field("reason_code", &self.reason_code)
6698            .field("current_confirmations", &self.current_confirmations)
6699            .field("required_confirmations", &self.required_confirmations)
6700            .field("approve_count", &self.approve_count)
6701            .field("reject_count", &self.reject_count)
6702            .field("validator_count", &self.validator_count)
6703            .field("required_approvals", &self.required_approvals)
6704            .field("required_rejections", &self.required_rejections)
6705            .field("occurred_at_unix_ms", &self.occurred_at_unix_ms)
6706            .field("block_time_moving_average_ms", &self.block_time_moving_average_ms)
6707            .field("activities", &self.activities)
6708            .finish()
6709    }
6710}
6711impl FlowStepView {
6712    /// Protobuf type URL for this message, for use with `Any::pack` and
6713    /// `Any::unpack_if`.
6714    ///
6715    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6716    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
6717}
6718::buffa::impl_default_instance!(FlowStepView);
6719impl ::buffa::MessageName for FlowStepView {
6720    const PACKAGE: &'static str = "chain.lifecycle.v1";
6721    const NAME: &'static str = "FlowStepView";
6722    const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepView";
6723    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
6724}
6725impl ::buffa::Message for FlowStepView {
6726    /// Returns the total encoded size in bytes.
6727    ///
6728    /// The result is a `u32`; the protobuf specification requires all
6729    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6730    /// compliant message will never overflow this type.
6731    #[allow(clippy::let_and_return)]
6732    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6733        #[allow(unused_imports)]
6734        use ::buffa::Enumeration as _;
6735        let mut size = 0u32;
6736        if self.sequence != 0u32 {
6737            size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
6738        }
6739        {
6740            let val = self.step.to_i32();
6741            if val != 0 {
6742                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6743            }
6744        }
6745        if self.asset_ids.is_set() {
6746            let __slot = __cache.reserve();
6747            let inner_size = self.asset_ids.compute_size(__cache);
6748            __cache.set(__slot, inner_size);
6749            size
6750                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6751                    + inner_size;
6752        }
6753        if self.polyester_chain_id != 0u32 {
6754            size
6755                += 1u32
6756                    + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
6757        }
6758        if self.amount_e18.is_set() {
6759            let __slot = __cache.reserve();
6760            let inner_size = self.amount_e18.compute_size(__cache);
6761            __cache.set(__slot, inner_size);
6762            size
6763                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6764                    + inner_size;
6765        }
6766        if !self.milestone_tx_ref.is_empty() {
6767            size
6768                += 1u32
6769                    + ::buffa::types::string_encoded_len(&self.milestone_tx_ref) as u32;
6770        }
6771        {
6772            let val = self.lifecycle_source.to_i32();
6773            if val != 0 {
6774                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6775            }
6776        }
6777        {
6778            let val = self.reason_code.to_i32();
6779            if val != 0 {
6780                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6781            }
6782        }
6783        if self.current_confirmations != 0u32 {
6784            size
6785                += 1u32
6786                    + ::buffa::types::uint32_encoded_len(self.current_confirmations)
6787                        as u32;
6788        }
6789        if self.required_confirmations != 0u32 {
6790            size
6791                += 1u32
6792                    + ::buffa::types::uint32_encoded_len(self.required_confirmations)
6793                        as u32;
6794        }
6795        if self.approve_count != 0u32 {
6796            size += 2u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
6797        }
6798        if self.reject_count != 0u32 {
6799            size += 2u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
6800        }
6801        if self.validator_count != 0u32 {
6802            size
6803                += 2u32
6804                    + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
6805        }
6806        if self.occurred_at_unix_ms != 0u64 {
6807            size
6808                += 2u32
6809                    + ::buffa::types::uint64_encoded_len(self.occurred_at_unix_ms)
6810                        as u32;
6811        }
6812        if self.block_time_moving_average_ms != 0u64 {
6813            size
6814                += 2u32
6815                    + ::buffa::types::uint64_encoded_len(
6816                        self.block_time_moving_average_ms,
6817                    ) as u32;
6818        }
6819        for v in &self.activities {
6820            let __slot = __cache.reserve();
6821            let inner_size = v.compute_size(__cache);
6822            __cache.set(__slot, inner_size);
6823            size
6824                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6825                    + inner_size;
6826        }
6827        if self.required_approvals != 0u32 {
6828            size
6829                += 2u32
6830                    + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
6831        }
6832        if self.required_rejections != 0u32 {
6833            size
6834                += 2u32
6835                    + ::buffa::types::uint32_encoded_len(self.required_rejections)
6836                        as u32;
6837        }
6838        if self.request_fee.is_set() {
6839            let __slot = __cache.reserve();
6840            let inner_size = self.request_fee.compute_size(__cache);
6841            __cache.set(__slot, inner_size);
6842            size
6843                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6844                    + inner_size;
6845        }
6846        size += self.__buffa_unknown_fields.encoded_len() as u32;
6847        size
6848    }
6849    fn write_to(
6850        &self,
6851        __cache: &mut ::buffa::SizeCache,
6852        buf: &mut impl ::buffa::bytes::BufMut,
6853    ) {
6854        #[allow(unused_imports)]
6855        use ::buffa::Enumeration as _;
6856        if self.sequence != 0u32 {
6857            ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
6858        }
6859        {
6860            let val = self.step.to_i32();
6861            if val != 0 {
6862                ::buffa::types::put_int32_field(3u32, val, buf);
6863            }
6864        }
6865        if self.asset_ids.is_set() {
6866            ::buffa::types::put_len_delimited_header(7u32, __cache.consume_next(), buf);
6867            self.asset_ids.write_to(__cache, buf);
6868        }
6869        if self.polyester_chain_id != 0u32 {
6870            ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
6871        }
6872        if self.amount_e18.is_set() {
6873            ::buffa::types::put_len_delimited_header(9u32, __cache.consume_next(), buf);
6874            self.amount_e18.write_to(__cache, buf);
6875        }
6876        if !self.milestone_tx_ref.is_empty() {
6877            ::buffa::types::put_string_field(11u32, &self.milestone_tx_ref, buf);
6878        }
6879        {
6880            let val = self.lifecycle_source.to_i32();
6881            if val != 0 {
6882                ::buffa::types::put_int32_field(12u32, val, buf);
6883            }
6884        }
6885        {
6886            let val = self.reason_code.to_i32();
6887            if val != 0 {
6888                ::buffa::types::put_int32_field(13u32, val, buf);
6889            }
6890        }
6891        if self.current_confirmations != 0u32 {
6892            ::buffa::types::put_uint32_field(14u32, self.current_confirmations, buf);
6893        }
6894        if self.required_confirmations != 0u32 {
6895            ::buffa::types::put_uint32_field(15u32, self.required_confirmations, buf);
6896        }
6897        if self.approve_count != 0u32 {
6898            ::buffa::types::put_uint32_field(16u32, self.approve_count, buf);
6899        }
6900        if self.reject_count != 0u32 {
6901            ::buffa::types::put_uint32_field(17u32, self.reject_count, buf);
6902        }
6903        if self.validator_count != 0u32 {
6904            ::buffa::types::put_uint32_field(18u32, self.validator_count, buf);
6905        }
6906        if self.occurred_at_unix_ms != 0u64 {
6907            ::buffa::types::put_uint64_field(19u32, self.occurred_at_unix_ms, buf);
6908        }
6909        if self.block_time_moving_average_ms != 0u64 {
6910            ::buffa::types::put_uint64_field(
6911                20u32,
6912                self.block_time_moving_average_ms,
6913                buf,
6914            );
6915        }
6916        for v in &self.activities {
6917            ::buffa::types::put_len_delimited_header(21u32, __cache.consume_next(), buf);
6918            v.write_to(__cache, buf);
6919        }
6920        if self.required_approvals != 0u32 {
6921            ::buffa::types::put_uint32_field(22u32, self.required_approvals, buf);
6922        }
6923        if self.required_rejections != 0u32 {
6924            ::buffa::types::put_uint32_field(23u32, self.required_rejections, buf);
6925        }
6926        if self.request_fee.is_set() {
6927            ::buffa::types::put_len_delimited_header(24u32, __cache.consume_next(), buf);
6928            self.request_fee.write_to(__cache, buf);
6929        }
6930        self.__buffa_unknown_fields.write_to(buf);
6931    }
6932    fn merge_field(
6933        &mut self,
6934        tag: ::buffa::encoding::Tag,
6935        buf: &mut impl ::buffa::bytes::Buf,
6936        ctx: ::buffa::DecodeContext<'_>,
6937    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6938        #[allow(unused_imports)]
6939        use ::buffa::bytes::Buf as _;
6940        #[allow(unused_imports)]
6941        use ::buffa::Enumeration as _;
6942        match tag.field_number() {
6943            1u32 => {
6944                ::buffa::encoding::check_wire_type(
6945                    tag,
6946                    ::buffa::encoding::WireType::Varint,
6947                )?;
6948                self.sequence = ::buffa::types::decode_uint32(buf)?;
6949            }
6950            3u32 => {
6951                ::buffa::encoding::check_wire_type(
6952                    tag,
6953                    ::buffa::encoding::WireType::Varint,
6954                )?;
6955                self.step = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
6956            }
6957            7u32 => {
6958                ::buffa::encoding::check_wire_type(
6959                    tag,
6960                    ::buffa::encoding::WireType::LengthDelimited,
6961                )?;
6962                ::buffa::Message::merge_length_delimited(
6963                    self.asset_ids.get_or_insert_default(),
6964                    buf,
6965                    ctx,
6966                )?;
6967            }
6968            8u32 => {
6969                ::buffa::encoding::check_wire_type(
6970                    tag,
6971                    ::buffa::encoding::WireType::Varint,
6972                )?;
6973                self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
6974            }
6975            9u32 => {
6976                ::buffa::encoding::check_wire_type(
6977                    tag,
6978                    ::buffa::encoding::WireType::LengthDelimited,
6979                )?;
6980                ::buffa::Message::merge_length_delimited(
6981                    self.amount_e18.get_or_insert_default(),
6982                    buf,
6983                    ctx,
6984                )?;
6985            }
6986            11u32 => {
6987                ::buffa::encoding::check_wire_type(
6988                    tag,
6989                    ::buffa::encoding::WireType::LengthDelimited,
6990                )?;
6991                ::buffa::types::merge_string(&mut self.milestone_tx_ref, buf)?;
6992            }
6993            12u32 => {
6994                ::buffa::encoding::check_wire_type(
6995                    tag,
6996                    ::buffa::encoding::WireType::Varint,
6997                )?;
6998                self.lifecycle_source = ::buffa::EnumValue::from(
6999                    ::buffa::types::decode_int32(buf)?,
7000                );
7001            }
7002            13u32 => {
7003                ::buffa::encoding::check_wire_type(
7004                    tag,
7005                    ::buffa::encoding::WireType::Varint,
7006                )?;
7007                self.reason_code = ::buffa::EnumValue::from(
7008                    ::buffa::types::decode_int32(buf)?,
7009                );
7010            }
7011            14u32 => {
7012                ::buffa::encoding::check_wire_type(
7013                    tag,
7014                    ::buffa::encoding::WireType::Varint,
7015                )?;
7016                self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
7017            }
7018            15u32 => {
7019                ::buffa::encoding::check_wire_type(
7020                    tag,
7021                    ::buffa::encoding::WireType::Varint,
7022                )?;
7023                self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
7024            }
7025            16u32 => {
7026                ::buffa::encoding::check_wire_type(
7027                    tag,
7028                    ::buffa::encoding::WireType::Varint,
7029                )?;
7030                self.approve_count = ::buffa::types::decode_uint32(buf)?;
7031            }
7032            17u32 => {
7033                ::buffa::encoding::check_wire_type(
7034                    tag,
7035                    ::buffa::encoding::WireType::Varint,
7036                )?;
7037                self.reject_count = ::buffa::types::decode_uint32(buf)?;
7038            }
7039            18u32 => {
7040                ::buffa::encoding::check_wire_type(
7041                    tag,
7042                    ::buffa::encoding::WireType::Varint,
7043                )?;
7044                self.validator_count = ::buffa::types::decode_uint32(buf)?;
7045            }
7046            19u32 => {
7047                ::buffa::encoding::check_wire_type(
7048                    tag,
7049                    ::buffa::encoding::WireType::Varint,
7050                )?;
7051                self.occurred_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
7052            }
7053            20u32 => {
7054                ::buffa::encoding::check_wire_type(
7055                    tag,
7056                    ::buffa::encoding::WireType::Varint,
7057                )?;
7058                self.block_time_moving_average_ms = ::buffa::types::decode_uint64(buf)?;
7059            }
7060            21u32 => {
7061                ::buffa::encoding::check_wire_type(
7062                    tag,
7063                    ::buffa::encoding::WireType::LengthDelimited,
7064                )?;
7065                let mut elem = ::core::default::Default::default();
7066                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
7067                self.activities.push(elem);
7068            }
7069            22u32 => {
7070                ::buffa::encoding::check_wire_type(
7071                    tag,
7072                    ::buffa::encoding::WireType::Varint,
7073                )?;
7074                self.required_approvals = ::buffa::types::decode_uint32(buf)?;
7075            }
7076            23u32 => {
7077                ::buffa::encoding::check_wire_type(
7078                    tag,
7079                    ::buffa::encoding::WireType::Varint,
7080                )?;
7081                self.required_rejections = ::buffa::types::decode_uint32(buf)?;
7082            }
7083            24u32 => {
7084                ::buffa::encoding::check_wire_type(
7085                    tag,
7086                    ::buffa::encoding::WireType::LengthDelimited,
7087                )?;
7088                ::buffa::Message::merge_length_delimited(
7089                    self.request_fee.get_or_insert_default(),
7090                    buf,
7091                    ctx,
7092                )?;
7093            }
7094            _ => {
7095                self.__buffa_unknown_fields
7096                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
7097            }
7098        }
7099        ::core::result::Result::Ok(())
7100    }
7101    fn clear(&mut self) {
7102        self.sequence = 0u32;
7103        self.step = ::buffa::EnumValue::from(0);
7104        self.asset_ids = ::buffa::MessageField::none();
7105        self.polyester_chain_id = 0u32;
7106        self.amount_e18 = ::buffa::MessageField::none();
7107        self.milestone_tx_ref.clear();
7108        self.lifecycle_source = ::buffa::EnumValue::from(0);
7109        self.reason_code = ::buffa::EnumValue::from(0);
7110        self.current_confirmations = 0u32;
7111        self.required_confirmations = 0u32;
7112        self.approve_count = 0u32;
7113        self.reject_count = 0u32;
7114        self.validator_count = 0u32;
7115        self.occurred_at_unix_ms = 0u64;
7116        self.block_time_moving_average_ms = 0u64;
7117        self.activities.clear();
7118        self.required_approvals = 0u32;
7119        self.required_rejections = 0u32;
7120        self.request_fee = ::buffa::MessageField::none();
7121        self.__buffa_unknown_fields.clear();
7122    }
7123}
7124impl ::buffa::ExtensionSet for FlowStepView {
7125    const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowStepView";
7126    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7127        &self.__buffa_unknown_fields
7128    }
7129    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7130        &mut self.__buffa_unknown_fields
7131    }
7132}
7133impl ::buffa::json_helpers::ProtoElemJson for FlowStepView {
7134    fn serialize_proto_json<S: ::serde::Serializer>(
7135        v: &Self,
7136        s: S,
7137    ) -> ::core::result::Result<S::Ok, S::Error> {
7138        ::serde::Serialize::serialize(v, s)
7139    }
7140    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7141        d: D,
7142    ) -> ::core::result::Result<Self, D::Error> {
7143        <Self as ::serde::Deserialize>::deserialize(d)
7144    }
7145}
7146#[doc(hidden)]
7147pub const __FLOW_STEP_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7148    type_url: "type.googleapis.com/chain.lifecycle.v1.FlowStepView",
7149    to_json: ::buffa::type_registry::any_to_json::<FlowStepView>,
7150    from_json: ::buffa::type_registry::any_from_json::<FlowStepView>,
7151    is_wkt: false,
7152};
7153/// FlowStepActivityView is an expandable detail row underneath a visible step.
7154#[derive(Clone, PartialEq, Default)]
7155#[derive(::serde::Serialize, ::serde::Deserialize)]
7156#[serde(default)]
7157pub struct FlowStepActivityView {
7158    /// Sequence of the underlying activity within the flow.
7159    ///
7160    /// Field 1: `sequence`
7161    #[serde(
7162        rename = "sequence",
7163        with = "::buffa::json_helpers::uint32",
7164        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7165    )]
7166    pub sequence: u32,
7167    /// Transaction reference associated with this activity.
7168    ///
7169    /// Field 2: `tx_ref`
7170    #[serde(
7171        rename = "txRef",
7172        alias = "tx_ref",
7173        with = "::buffa::json_helpers::proto_string",
7174        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7175    )]
7176    pub tx_ref: ::buffa::alloc::string::String,
7177    /// Activity occurrence timestamp in milliseconds since epoch (UTC).
7178    ///
7179    /// Field 3: `occurred_at_unix_ms`
7180    #[serde(
7181        rename = "occurredAtUnixMs",
7182        alias = "occurred_at_unix_ms",
7183        with = "::buffa::json_helpers::uint64",
7184        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
7185    )]
7186    pub occurred_at_unix_ms: u64,
7187    /// Source that produced this activity.
7188    ///
7189    /// Field 4: `lifecycle_source`
7190    #[serde(
7191        rename = "lifecycleSource",
7192        alias = "lifecycle_source",
7193        with = "::buffa::json_helpers::proto_enum",
7194        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7195    )]
7196    pub lifecycle_source: ::buffa::EnumValue<LifecycleSource>,
7197    /// Product-facing reason for notable activity states.
7198    ///
7199    /// Field 5: `reason_code`
7200    #[serde(
7201        rename = "reasonCode",
7202        alias = "reason_code",
7203        with = "::buffa::json_helpers::proto_enum",
7204        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7205    )]
7206    pub reason_code: ::buffa::EnumValue<FlowReason>,
7207    /// Current source confirmation count when confirmations apply.
7208    ///
7209    /// Field 6: `current_confirmations`
7210    #[serde(
7211        rename = "currentConfirmations",
7212        alias = "current_confirmations",
7213        with = "::buffa::json_helpers::uint32",
7214        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7215    )]
7216    pub current_confirmations: u32,
7217    /// Required source confirmation count when confirmations apply.
7218    ///
7219    /// Field 7: `required_confirmations`
7220    #[serde(
7221        rename = "requiredConfirmations",
7222        alias = "required_confirmations",
7223        with = "::buffa::json_helpers::uint32",
7224        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7225    )]
7226    pub required_confirmations: u32,
7227    /// Current approval count when validation applies.
7228    ///
7229    /// Field 8: `approve_count`
7230    #[serde(
7231        rename = "approveCount",
7232        alias = "approve_count",
7233        with = "::buffa::json_helpers::uint32",
7234        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7235    )]
7236    pub approve_count: u32,
7237    /// Current rejection count when validation applies.
7238    ///
7239    /// Field 9: `reject_count`
7240    #[serde(
7241        rename = "rejectCount",
7242        alias = "reject_count",
7243        with = "::buffa::json_helpers::uint32",
7244        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7245    )]
7246    pub reject_count: u32,
7247    /// Validator set size when validation applies.
7248    ///
7249    /// Field 10: `validator_count`
7250    #[serde(
7251        rename = "validatorCount",
7252        alias = "validator_count",
7253        with = "::buffa::json_helpers::uint32",
7254        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7255    )]
7256    pub validator_count: u32,
7257    /// Activity kind for display grouping.
7258    ///
7259    /// Field 11: `kind`
7260    #[serde(
7261        rename = "kind",
7262        with = "::buffa::json_helpers::proto_enum",
7263        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7264    )]
7265    pub kind: ::buffa::EnumValue<FlowStepActivityKind>,
7266    /// Approval count required for this activity.
7267    ///
7268    /// Field 12: `required_approvals`
7269    #[serde(
7270        rename = "requiredApprovals",
7271        alias = "required_approvals",
7272        with = "::buffa::json_helpers::uint32",
7273        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7274    )]
7275    pub required_approvals: u32,
7276    /// Rejection count that would fail this activity.
7277    ///
7278    /// Field 13: `required_rejections`
7279    #[serde(
7280        rename = "requiredRejections",
7281        alias = "required_rejections",
7282        with = "::buffa::json_helpers::uint32",
7283        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7284    )]
7285    pub required_rejections: u32,
7286    /// Amount posted by the underlying movement represented by this activity, in
7287    /// 18-decimal unified asset units. This may be a net movement amount for
7288    /// fee-bearing fulfillment activity.
7289    ///
7290    /// Field 14: `amount_e18`
7291    #[serde(
7292        rename = "amountE18",
7293        alias = "amount_e18",
7294        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
7295    )]
7296    pub amount_e18: ::buffa::MessageField<
7297        super::super::super::polyester::r#type::v1::U128,
7298    >,
7299    /// Ledger transfer identifier for ledger-sourced settlement activities.
7300    ///
7301    /// Field 15: `ledger_transfer_id`
7302    #[serde(
7303        rename = "ledgerTransferId",
7304        alias = "ledger_transfer_id",
7305        with = "::buffa::json_helpers::proto_string",
7306        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7307    )]
7308    pub ledger_transfer_id: ::buffa::alloc::string::String,
7309    #[serde(skip)]
7310    #[doc(hidden)]
7311    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7312}
7313impl ::core::fmt::Debug for FlowStepActivityView {
7314    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7315        f.debug_struct("FlowStepActivityView")
7316            .field("sequence", &self.sequence)
7317            .field("tx_ref", &self.tx_ref)
7318            .field("occurred_at_unix_ms", &self.occurred_at_unix_ms)
7319            .field("lifecycle_source", &self.lifecycle_source)
7320            .field("reason_code", &self.reason_code)
7321            .field("current_confirmations", &self.current_confirmations)
7322            .field("required_confirmations", &self.required_confirmations)
7323            .field("approve_count", &self.approve_count)
7324            .field("reject_count", &self.reject_count)
7325            .field("validator_count", &self.validator_count)
7326            .field("kind", &self.kind)
7327            .field("required_approvals", &self.required_approvals)
7328            .field("required_rejections", &self.required_rejections)
7329            .field("amount_e18", &self.amount_e18)
7330            .field("ledger_transfer_id", &self.ledger_transfer_id)
7331            .finish()
7332    }
7333}
7334impl FlowStepActivityView {
7335    /// Protobuf type URL for this message, for use with `Any::pack` and
7336    /// `Any::unpack_if`.
7337    ///
7338    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7339    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
7340}
7341::buffa::impl_default_instance!(FlowStepActivityView);
7342impl ::buffa::MessageName for FlowStepActivityView {
7343    const PACKAGE: &'static str = "chain.lifecycle.v1";
7344    const NAME: &'static str = "FlowStepActivityView";
7345    const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
7346    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
7347}
7348impl ::buffa::Message for FlowStepActivityView {
7349    /// Returns the total encoded size in bytes.
7350    ///
7351    /// The result is a `u32`; the protobuf specification requires all
7352    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7353    /// compliant message will never overflow this type.
7354    #[allow(clippy::let_and_return)]
7355    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7356        #[allow(unused_imports)]
7357        use ::buffa::Enumeration as _;
7358        let mut size = 0u32;
7359        if self.sequence != 0u32 {
7360            size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
7361        }
7362        if !self.tx_ref.is_empty() {
7363            size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
7364        }
7365        if self.occurred_at_unix_ms != 0u64 {
7366            size
7367                += 1u32
7368                    + ::buffa::types::uint64_encoded_len(self.occurred_at_unix_ms)
7369                        as u32;
7370        }
7371        {
7372            let val = self.lifecycle_source.to_i32();
7373            if val != 0 {
7374                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7375            }
7376        }
7377        {
7378            let val = self.reason_code.to_i32();
7379            if val != 0 {
7380                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7381            }
7382        }
7383        if self.current_confirmations != 0u32 {
7384            size
7385                += 1u32
7386                    + ::buffa::types::uint32_encoded_len(self.current_confirmations)
7387                        as u32;
7388        }
7389        if self.required_confirmations != 0u32 {
7390            size
7391                += 1u32
7392                    + ::buffa::types::uint32_encoded_len(self.required_confirmations)
7393                        as u32;
7394        }
7395        if self.approve_count != 0u32 {
7396            size += 1u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
7397        }
7398        if self.reject_count != 0u32 {
7399            size += 1u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
7400        }
7401        if self.validator_count != 0u32 {
7402            size
7403                += 1u32
7404                    + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
7405        }
7406        {
7407            let val = self.kind.to_i32();
7408            if val != 0 {
7409                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7410            }
7411        }
7412        if self.required_approvals != 0u32 {
7413            size
7414                += 1u32
7415                    + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
7416        }
7417        if self.required_rejections != 0u32 {
7418            size
7419                += 1u32
7420                    + ::buffa::types::uint32_encoded_len(self.required_rejections)
7421                        as u32;
7422        }
7423        if self.amount_e18.is_set() {
7424            let __slot = __cache.reserve();
7425            let inner_size = self.amount_e18.compute_size(__cache);
7426            __cache.set(__slot, inner_size);
7427            size
7428                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7429                    + inner_size;
7430        }
7431        if !self.ledger_transfer_id.is_empty() {
7432            size
7433                += 1u32
7434                    + ::buffa::types::string_encoded_len(&self.ledger_transfer_id)
7435                        as u32;
7436        }
7437        size += self.__buffa_unknown_fields.encoded_len() as u32;
7438        size
7439    }
7440    fn write_to(
7441        &self,
7442        __cache: &mut ::buffa::SizeCache,
7443        buf: &mut impl ::buffa::bytes::BufMut,
7444    ) {
7445        #[allow(unused_imports)]
7446        use ::buffa::Enumeration as _;
7447        if self.sequence != 0u32 {
7448            ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
7449        }
7450        if !self.tx_ref.is_empty() {
7451            ::buffa::types::put_string_field(2u32, &self.tx_ref, buf);
7452        }
7453        if self.occurred_at_unix_ms != 0u64 {
7454            ::buffa::types::put_uint64_field(3u32, self.occurred_at_unix_ms, buf);
7455        }
7456        {
7457            let val = self.lifecycle_source.to_i32();
7458            if val != 0 {
7459                ::buffa::types::put_int32_field(4u32, val, buf);
7460            }
7461        }
7462        {
7463            let val = self.reason_code.to_i32();
7464            if val != 0 {
7465                ::buffa::types::put_int32_field(5u32, val, buf);
7466            }
7467        }
7468        if self.current_confirmations != 0u32 {
7469            ::buffa::types::put_uint32_field(6u32, self.current_confirmations, buf);
7470        }
7471        if self.required_confirmations != 0u32 {
7472            ::buffa::types::put_uint32_field(7u32, self.required_confirmations, buf);
7473        }
7474        if self.approve_count != 0u32 {
7475            ::buffa::types::put_uint32_field(8u32, self.approve_count, buf);
7476        }
7477        if self.reject_count != 0u32 {
7478            ::buffa::types::put_uint32_field(9u32, self.reject_count, buf);
7479        }
7480        if self.validator_count != 0u32 {
7481            ::buffa::types::put_uint32_field(10u32, self.validator_count, buf);
7482        }
7483        {
7484            let val = self.kind.to_i32();
7485            if val != 0 {
7486                ::buffa::types::put_int32_field(11u32, val, buf);
7487            }
7488        }
7489        if self.required_approvals != 0u32 {
7490            ::buffa::types::put_uint32_field(12u32, self.required_approvals, buf);
7491        }
7492        if self.required_rejections != 0u32 {
7493            ::buffa::types::put_uint32_field(13u32, self.required_rejections, buf);
7494        }
7495        if self.amount_e18.is_set() {
7496            ::buffa::types::put_len_delimited_header(14u32, __cache.consume_next(), buf);
7497            self.amount_e18.write_to(__cache, buf);
7498        }
7499        if !self.ledger_transfer_id.is_empty() {
7500            ::buffa::types::put_string_field(15u32, &self.ledger_transfer_id, buf);
7501        }
7502        self.__buffa_unknown_fields.write_to(buf);
7503    }
7504    fn merge_field(
7505        &mut self,
7506        tag: ::buffa::encoding::Tag,
7507        buf: &mut impl ::buffa::bytes::Buf,
7508        ctx: ::buffa::DecodeContext<'_>,
7509    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7510        #[allow(unused_imports)]
7511        use ::buffa::bytes::Buf as _;
7512        #[allow(unused_imports)]
7513        use ::buffa::Enumeration as _;
7514        match tag.field_number() {
7515            1u32 => {
7516                ::buffa::encoding::check_wire_type(
7517                    tag,
7518                    ::buffa::encoding::WireType::Varint,
7519                )?;
7520                self.sequence = ::buffa::types::decode_uint32(buf)?;
7521            }
7522            2u32 => {
7523                ::buffa::encoding::check_wire_type(
7524                    tag,
7525                    ::buffa::encoding::WireType::LengthDelimited,
7526                )?;
7527                ::buffa::types::merge_string(&mut self.tx_ref, buf)?;
7528            }
7529            3u32 => {
7530                ::buffa::encoding::check_wire_type(
7531                    tag,
7532                    ::buffa::encoding::WireType::Varint,
7533                )?;
7534                self.occurred_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
7535            }
7536            4u32 => {
7537                ::buffa::encoding::check_wire_type(
7538                    tag,
7539                    ::buffa::encoding::WireType::Varint,
7540                )?;
7541                self.lifecycle_source = ::buffa::EnumValue::from(
7542                    ::buffa::types::decode_int32(buf)?,
7543                );
7544            }
7545            5u32 => {
7546                ::buffa::encoding::check_wire_type(
7547                    tag,
7548                    ::buffa::encoding::WireType::Varint,
7549                )?;
7550                self.reason_code = ::buffa::EnumValue::from(
7551                    ::buffa::types::decode_int32(buf)?,
7552                );
7553            }
7554            6u32 => {
7555                ::buffa::encoding::check_wire_type(
7556                    tag,
7557                    ::buffa::encoding::WireType::Varint,
7558                )?;
7559                self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
7560            }
7561            7u32 => {
7562                ::buffa::encoding::check_wire_type(
7563                    tag,
7564                    ::buffa::encoding::WireType::Varint,
7565                )?;
7566                self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
7567            }
7568            8u32 => {
7569                ::buffa::encoding::check_wire_type(
7570                    tag,
7571                    ::buffa::encoding::WireType::Varint,
7572                )?;
7573                self.approve_count = ::buffa::types::decode_uint32(buf)?;
7574            }
7575            9u32 => {
7576                ::buffa::encoding::check_wire_type(
7577                    tag,
7578                    ::buffa::encoding::WireType::Varint,
7579                )?;
7580                self.reject_count = ::buffa::types::decode_uint32(buf)?;
7581            }
7582            10u32 => {
7583                ::buffa::encoding::check_wire_type(
7584                    tag,
7585                    ::buffa::encoding::WireType::Varint,
7586                )?;
7587                self.validator_count = ::buffa::types::decode_uint32(buf)?;
7588            }
7589            11u32 => {
7590                ::buffa::encoding::check_wire_type(
7591                    tag,
7592                    ::buffa::encoding::WireType::Varint,
7593                )?;
7594                self.kind = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
7595            }
7596            12u32 => {
7597                ::buffa::encoding::check_wire_type(
7598                    tag,
7599                    ::buffa::encoding::WireType::Varint,
7600                )?;
7601                self.required_approvals = ::buffa::types::decode_uint32(buf)?;
7602            }
7603            13u32 => {
7604                ::buffa::encoding::check_wire_type(
7605                    tag,
7606                    ::buffa::encoding::WireType::Varint,
7607                )?;
7608                self.required_rejections = ::buffa::types::decode_uint32(buf)?;
7609            }
7610            14u32 => {
7611                ::buffa::encoding::check_wire_type(
7612                    tag,
7613                    ::buffa::encoding::WireType::LengthDelimited,
7614                )?;
7615                ::buffa::Message::merge_length_delimited(
7616                    self.amount_e18.get_or_insert_default(),
7617                    buf,
7618                    ctx,
7619                )?;
7620            }
7621            15u32 => {
7622                ::buffa::encoding::check_wire_type(
7623                    tag,
7624                    ::buffa::encoding::WireType::LengthDelimited,
7625                )?;
7626                ::buffa::types::merge_string(&mut self.ledger_transfer_id, buf)?;
7627            }
7628            _ => {
7629                self.__buffa_unknown_fields
7630                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
7631            }
7632        }
7633        ::core::result::Result::Ok(())
7634    }
7635    fn clear(&mut self) {
7636        self.sequence = 0u32;
7637        self.tx_ref.clear();
7638        self.occurred_at_unix_ms = 0u64;
7639        self.lifecycle_source = ::buffa::EnumValue::from(0);
7640        self.reason_code = ::buffa::EnumValue::from(0);
7641        self.current_confirmations = 0u32;
7642        self.required_confirmations = 0u32;
7643        self.approve_count = 0u32;
7644        self.reject_count = 0u32;
7645        self.validator_count = 0u32;
7646        self.kind = ::buffa::EnumValue::from(0);
7647        self.required_approvals = 0u32;
7648        self.required_rejections = 0u32;
7649        self.amount_e18 = ::buffa::MessageField::none();
7650        self.ledger_transfer_id.clear();
7651        self.__buffa_unknown_fields.clear();
7652    }
7653}
7654impl ::buffa::ExtensionSet for FlowStepActivityView {
7655    const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
7656    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7657        &self.__buffa_unknown_fields
7658    }
7659    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7660        &mut self.__buffa_unknown_fields
7661    }
7662}
7663impl ::buffa::json_helpers::ProtoElemJson for FlowStepActivityView {
7664    fn serialize_proto_json<S: ::serde::Serializer>(
7665        v: &Self,
7666        s: S,
7667    ) -> ::core::result::Result<S::Ok, S::Error> {
7668        ::serde::Serialize::serialize(v, s)
7669    }
7670    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7671        d: D,
7672    ) -> ::core::result::Result<Self, D::Error> {
7673        <Self as ::serde::Deserialize>::deserialize(d)
7674    }
7675}
7676#[doc(hidden)]
7677pub const __FLOW_STEP_ACTIVITY_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7678    type_url: "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView",
7679    to_json: ::buffa::type_registry::any_to_json::<FlowStepActivityView>,
7680    from_json: ::buffa::type_registry::any_from_json::<FlowStepActivityView>,
7681    is_wkt: false,
7682};
7683/// FlowTimelineItemView is one item in the expected visible lifecycle progress
7684/// path.
7685#[derive(Clone, PartialEq, Default)]
7686#[derive(::serde::Serialize, ::serde::Deserialize)]
7687#[serde(default)]
7688pub struct FlowTimelineItemView {
7689    /// One-based sequence within the expected timeline.
7690    ///
7691    /// Field 1: `sequence`
7692    #[serde(
7693        rename = "sequence",
7694        with = "::buffa::json_helpers::uint32",
7695        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7696    )]
7697    pub sequence: u32,
7698    /// Visible lifecycle step.
7699    ///
7700    /// Field 2: `step`
7701    #[serde(
7702        rename = "step",
7703        with = "::buffa::json_helpers::proto_enum",
7704        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7705    )]
7706    pub step: ::buffa::EnumValue<FlowStep>,
7707    /// Progress status for this timeline item.
7708    ///
7709    /// Field 3: `status`
7710    #[serde(
7711        rename = "status",
7712        with = "::buffa::json_helpers::proto_enum",
7713        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7714    )]
7715    pub status: ::buffa::EnumValue<FlowTimelineStatus>,
7716    /// Expected duration of this visible step in milliseconds, derived from recent
7717    /// observed timing data for the same flow type.
7718    ///
7719    /// Field 4: `expected_duration_ms`
7720    #[serde(
7721        rename = "expectedDurationMs",
7722        alias = "expected_duration_ms",
7723        with = "::buffa::json_helpers::uint64",
7724        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
7725    )]
7726    pub expected_duration_ms: u64,
7727    #[serde(skip)]
7728    #[doc(hidden)]
7729    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7730}
7731impl ::core::fmt::Debug for FlowTimelineItemView {
7732    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7733        f.debug_struct("FlowTimelineItemView")
7734            .field("sequence", &self.sequence)
7735            .field("step", &self.step)
7736            .field("status", &self.status)
7737            .field("expected_duration_ms", &self.expected_duration_ms)
7738            .finish()
7739    }
7740}
7741impl FlowTimelineItemView {
7742    /// Protobuf type URL for this message, for use with `Any::pack` and
7743    /// `Any::unpack_if`.
7744    ///
7745    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7746    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
7747}
7748::buffa::impl_default_instance!(FlowTimelineItemView);
7749impl ::buffa::MessageName for FlowTimelineItemView {
7750    const PACKAGE: &'static str = "chain.lifecycle.v1";
7751    const NAME: &'static str = "FlowTimelineItemView";
7752    const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
7753    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
7754}
7755impl ::buffa::Message for FlowTimelineItemView {
7756    /// Returns the total encoded size in bytes.
7757    ///
7758    /// The result is a `u32`; the protobuf specification requires all
7759    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7760    /// compliant message will never overflow this type.
7761    #[allow(clippy::let_and_return)]
7762    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7763        #[allow(unused_imports)]
7764        use ::buffa::Enumeration as _;
7765        let mut size = 0u32;
7766        if self.sequence != 0u32 {
7767            size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
7768        }
7769        {
7770            let val = self.step.to_i32();
7771            if val != 0 {
7772                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7773            }
7774        }
7775        {
7776            let val = self.status.to_i32();
7777            if val != 0 {
7778                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7779            }
7780        }
7781        if self.expected_duration_ms != 0u64 {
7782            size
7783                += 1u32
7784                    + ::buffa::types::uint64_encoded_len(self.expected_duration_ms)
7785                        as u32;
7786        }
7787        size += self.__buffa_unknown_fields.encoded_len() as u32;
7788        size
7789    }
7790    fn write_to(
7791        &self,
7792        _cache: &mut ::buffa::SizeCache,
7793        buf: &mut impl ::buffa::bytes::BufMut,
7794    ) {
7795        #[allow(unused_imports)]
7796        use ::buffa::Enumeration as _;
7797        if self.sequence != 0u32 {
7798            ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
7799        }
7800        {
7801            let val = self.step.to_i32();
7802            if val != 0 {
7803                ::buffa::types::put_int32_field(2u32, val, buf);
7804            }
7805        }
7806        {
7807            let val = self.status.to_i32();
7808            if val != 0 {
7809                ::buffa::types::put_int32_field(3u32, val, buf);
7810            }
7811        }
7812        if self.expected_duration_ms != 0u64 {
7813            ::buffa::types::put_uint64_field(4u32, self.expected_duration_ms, buf);
7814        }
7815        self.__buffa_unknown_fields.write_to(buf);
7816    }
7817    fn merge_field(
7818        &mut self,
7819        tag: ::buffa::encoding::Tag,
7820        buf: &mut impl ::buffa::bytes::Buf,
7821        ctx: ::buffa::DecodeContext<'_>,
7822    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7823        #[allow(unused_imports)]
7824        use ::buffa::bytes::Buf as _;
7825        #[allow(unused_imports)]
7826        use ::buffa::Enumeration as _;
7827        match tag.field_number() {
7828            1u32 => {
7829                ::buffa::encoding::check_wire_type(
7830                    tag,
7831                    ::buffa::encoding::WireType::Varint,
7832                )?;
7833                self.sequence = ::buffa::types::decode_uint32(buf)?;
7834            }
7835            2u32 => {
7836                ::buffa::encoding::check_wire_type(
7837                    tag,
7838                    ::buffa::encoding::WireType::Varint,
7839                )?;
7840                self.step = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
7841            }
7842            3u32 => {
7843                ::buffa::encoding::check_wire_type(
7844                    tag,
7845                    ::buffa::encoding::WireType::Varint,
7846                )?;
7847                self.status = ::buffa::EnumValue::from(
7848                    ::buffa::types::decode_int32(buf)?,
7849                );
7850            }
7851            4u32 => {
7852                ::buffa::encoding::check_wire_type(
7853                    tag,
7854                    ::buffa::encoding::WireType::Varint,
7855                )?;
7856                self.expected_duration_ms = ::buffa::types::decode_uint64(buf)?;
7857            }
7858            _ => {
7859                self.__buffa_unknown_fields
7860                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
7861            }
7862        }
7863        ::core::result::Result::Ok(())
7864    }
7865    fn clear(&mut self) {
7866        self.sequence = 0u32;
7867        self.step = ::buffa::EnumValue::from(0);
7868        self.status = ::buffa::EnumValue::from(0);
7869        self.expected_duration_ms = 0u64;
7870        self.__buffa_unknown_fields.clear();
7871    }
7872}
7873impl ::buffa::ExtensionSet for FlowTimelineItemView {
7874    const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
7875    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7876        &self.__buffa_unknown_fields
7877    }
7878    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7879        &mut self.__buffa_unknown_fields
7880    }
7881}
7882impl ::buffa::json_helpers::ProtoElemJson for FlowTimelineItemView {
7883    fn serialize_proto_json<S: ::serde::Serializer>(
7884        v: &Self,
7885        s: S,
7886    ) -> ::core::result::Result<S::Ok, S::Error> {
7887        ::serde::Serialize::serialize(v, s)
7888    }
7889    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7890        d: D,
7891    ) -> ::core::result::Result<Self, D::Error> {
7892        <Self as ::serde::Deserialize>::deserialize(d)
7893    }
7894}
7895#[doc(hidden)]
7896pub const __FLOW_TIMELINE_ITEM_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7897    type_url: "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView",
7898    to_json: ::buffa::type_registry::any_to_json::<FlowTimelineItemView>,
7899    from_json: ::buffa::type_registry::any_from_json::<FlowTimelineItemView>,
7900    is_wkt: false,
7901};
7902/// FlowDetailView is the full lifecycle detail response model.
7903#[derive(Clone, PartialEq, Default)]
7904#[derive(::serde::Serialize, ::serde::Deserialize)]
7905#[serde(default)]
7906pub struct FlowDetailView {
7907    /// Compact flow summary for headers and list-style display.
7908    ///
7909    /// Field 1: `summary`
7910    #[serde(
7911        rename = "summary",
7912        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
7913    )]
7914    pub summary: ::buffa::MessageField<FlowSummaryView>,
7915    /// Factual visible steps observed for this flow, ordered by sequence. Open
7916    /// flows may have `summary.current_step` ahead of the last observed step.
7917    ///
7918    /// Field 2: `observed_steps`
7919    #[serde(
7920        rename = "observedSteps",
7921        alias = "observed_steps",
7922        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
7923        deserialize_with = "::buffa::json_helpers::null_as_default"
7924    )]
7925    pub observed_steps: ::buffa::alloc::vec::Vec<FlowStepView>,
7926    /// True when this detail was served from live in-memory state rather than
7927    /// historical terminal state.
7928    ///
7929    /// Field 3: `from_live_state`
7930    #[serde(
7931        rename = "fromLiveState",
7932        alias = "from_live_state",
7933        with = "::buffa::json_helpers::proto_bool",
7934        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
7935    )]
7936    pub from_live_state: bool,
7937    #[serde(skip)]
7938    #[doc(hidden)]
7939    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7940}
7941impl ::core::fmt::Debug for FlowDetailView {
7942    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7943        f.debug_struct("FlowDetailView")
7944            .field("summary", &self.summary)
7945            .field("observed_steps", &self.observed_steps)
7946            .field("from_live_state", &self.from_live_state)
7947            .finish()
7948    }
7949}
7950impl FlowDetailView {
7951    /// Protobuf type URL for this message, for use with `Any::pack` and
7952    /// `Any::unpack_if`.
7953    ///
7954    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7955    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
7956}
7957::buffa::impl_default_instance!(FlowDetailView);
7958impl ::buffa::MessageName for FlowDetailView {
7959    const PACKAGE: &'static str = "chain.lifecycle.v1";
7960    const NAME: &'static str = "FlowDetailView";
7961    const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowDetailView";
7962    const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
7963}
7964impl ::buffa::Message for FlowDetailView {
7965    /// Returns the total encoded size in bytes.
7966    ///
7967    /// The result is a `u32`; the protobuf specification requires all
7968    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7969    /// compliant message will never overflow this type.
7970    #[allow(clippy::let_and_return)]
7971    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7972        #[allow(unused_imports)]
7973        use ::buffa::Enumeration as _;
7974        let mut size = 0u32;
7975        if self.summary.is_set() {
7976            let __slot = __cache.reserve();
7977            let inner_size = self.summary.compute_size(__cache);
7978            __cache.set(__slot, inner_size);
7979            size
7980                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7981                    + inner_size;
7982        }
7983        for v in &self.observed_steps {
7984            let __slot = __cache.reserve();
7985            let inner_size = v.compute_size(__cache);
7986            __cache.set(__slot, inner_size);
7987            size
7988                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7989                    + inner_size;
7990        }
7991        if self.from_live_state {
7992            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7993        }
7994        size += self.__buffa_unknown_fields.encoded_len() as u32;
7995        size
7996    }
7997    fn write_to(
7998        &self,
7999        __cache: &mut ::buffa::SizeCache,
8000        buf: &mut impl ::buffa::bytes::BufMut,
8001    ) {
8002        #[allow(unused_imports)]
8003        use ::buffa::Enumeration as _;
8004        if self.summary.is_set() {
8005            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
8006            self.summary.write_to(__cache, buf);
8007        }
8008        for v in &self.observed_steps {
8009            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
8010            v.write_to(__cache, buf);
8011        }
8012        if self.from_live_state {
8013            ::buffa::types::put_bool_field(3u32, self.from_live_state, buf);
8014        }
8015        self.__buffa_unknown_fields.write_to(buf);
8016    }
8017    fn merge_field(
8018        &mut self,
8019        tag: ::buffa::encoding::Tag,
8020        buf: &mut impl ::buffa::bytes::Buf,
8021        ctx: ::buffa::DecodeContext<'_>,
8022    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8023        #[allow(unused_imports)]
8024        use ::buffa::bytes::Buf as _;
8025        #[allow(unused_imports)]
8026        use ::buffa::Enumeration as _;
8027        match tag.field_number() {
8028            1u32 => {
8029                ::buffa::encoding::check_wire_type(
8030                    tag,
8031                    ::buffa::encoding::WireType::LengthDelimited,
8032                )?;
8033                ::buffa::Message::merge_length_delimited(
8034                    self.summary.get_or_insert_default(),
8035                    buf,
8036                    ctx,
8037                )?;
8038            }
8039            2u32 => {
8040                ::buffa::encoding::check_wire_type(
8041                    tag,
8042                    ::buffa::encoding::WireType::LengthDelimited,
8043                )?;
8044                let mut elem = ::core::default::Default::default();
8045                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
8046                self.observed_steps.push(elem);
8047            }
8048            3u32 => {
8049                ::buffa::encoding::check_wire_type(
8050                    tag,
8051                    ::buffa::encoding::WireType::Varint,
8052                )?;
8053                self.from_live_state = ::buffa::types::decode_bool(buf)?;
8054            }
8055            _ => {
8056                self.__buffa_unknown_fields
8057                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
8058            }
8059        }
8060        ::core::result::Result::Ok(())
8061    }
8062    fn clear(&mut self) {
8063        self.summary = ::buffa::MessageField::none();
8064        self.observed_steps.clear();
8065        self.from_live_state = false;
8066        self.__buffa_unknown_fields.clear();
8067    }
8068}
8069impl ::buffa::ExtensionSet for FlowDetailView {
8070    const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowDetailView";
8071    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8072        &self.__buffa_unknown_fields
8073    }
8074    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8075        &mut self.__buffa_unknown_fields
8076    }
8077}
8078impl ::buffa::json_helpers::ProtoElemJson for FlowDetailView {
8079    fn serialize_proto_json<S: ::serde::Serializer>(
8080        v: &Self,
8081        s: S,
8082    ) -> ::core::result::Result<S::Ok, S::Error> {
8083        ::serde::Serialize::serialize(v, s)
8084    }
8085    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8086        d: D,
8087    ) -> ::core::result::Result<Self, D::Error> {
8088        <Self as ::serde::Deserialize>::deserialize(d)
8089    }
8090}
8091#[doc(hidden)]
8092pub const __FLOW_DETAIL_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8093    type_url: "type.googleapis.com/chain.lifecycle.v1.FlowDetailView",
8094    to_json: ::buffa::type_registry::any_to_json::<FlowDetailView>,
8095    from_json: ::buffa::type_registry::any_from_json::<FlowDetailView>,
8096    is_wkt: false,
8097};
8098#[allow(
8099    non_camel_case_types,
8100    dead_code,
8101    unused_imports,
8102    unused_qualifications,
8103    clippy::derivable_impls,
8104    clippy::match_single_binding,
8105    clippy::uninlined_format_args,
8106    clippy::doc_lazy_continuation,
8107    clippy::module_inception
8108)]
8109pub mod __buffa {
8110    #[allow(unused_imports)]
8111    use super::*;
8112    pub mod view {
8113        #[allow(unused_imports)]
8114        use super::*;
8115        /// AssetIds identifies the asset roles involved in one lifecycle.
8116        #[derive(Clone, Debug, Default)]
8117        pub struct AssetIdsView<'a> {
8118            /// Zipped asset identifier for the chain-specific asset mapping row. This is
8119            /// the canonical id from `chain_zipped_assets`, which already represents the
8120            /// source-chain asset metadata plus its mapped zToken relationship when
8121            /// relevant.
8122            ///
8123            /// Field 1: `zipped_asset_id`
8124            pub zipped_asset_id: u32,
8125            /// Unified asset identifier for the uAsset used by funding or trading flows
8126            /// when relevant. This is the canonical Polyester asset identity used by
8127            /// FundingAccount, TradingGateway, Lending, and other downstream product
8128            /// domains.
8129            ///
8130            /// Field 3: `unified_asset_id`
8131            pub unified_asset_id: u32,
8132            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8133        }
8134        impl<'a> ::buffa::MessageView<'a> for AssetIdsView<'a> {
8135            type Owned = super::super::AssetIds;
8136            fn decode_view(
8137                buf: &'a [u8],
8138            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8139                let __limit = ::core::cell::Cell::new(
8140                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8141                );
8142                <Self as ::buffa::MessageView>::decode_view_ctx(
8143                    buf,
8144                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8145                )
8146            }
8147            fn decode_view_with_ctx(
8148                buf: &'a [u8],
8149                ctx: ::buffa::DecodeContext<'_>,
8150            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8151                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8152            }
8153            fn merge_view_field(
8154                &mut self,
8155                tag: ::buffa::encoding::Tag,
8156                cur: &'a [u8],
8157                before_tag: &'a [u8],
8158                ctx: ::buffa::DecodeContext<'_>,
8159            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8160                let _ = ctx;
8161                #[allow(unused_variables)]
8162                let view = self;
8163                let mut cur = cur;
8164                match tag.field_number() {
8165                    1u32 => {
8166                        ::buffa::encoding::check_wire_type(
8167                            tag,
8168                            ::buffa::encoding::WireType::Varint,
8169                        )?;
8170                        view.zipped_asset_id = ::buffa::types::decode_uint32(&mut cur)?;
8171                    }
8172                    3u32 => {
8173                        ::buffa::encoding::check_wire_type(
8174                            tag,
8175                            ::buffa::encoding::WireType::Varint,
8176                        )?;
8177                        view.unified_asset_id = ::buffa::types::decode_uint32(&mut cur)?;
8178                    }
8179                    _ => {
8180                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8181                        let span_len = before_tag.len() - cur.len();
8182                        view.__buffa_unknown_fields
8183                            .push_record(before_tag, span_len, ctx)?;
8184                    }
8185                }
8186                ::core::result::Result::Ok(cur)
8187            }
8188            fn to_owned_message(
8189                &self,
8190            ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8191                self.to_owned_from_source(None)
8192            }
8193            #[allow(clippy::useless_conversion, clippy::needless_update)]
8194            fn to_owned_from_source(
8195                &self,
8196                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8197            ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8198                #[allow(unused_imports)]
8199                use ::buffa::alloc::string::ToString as _;
8200                let _ = __buffa_src;
8201                ::core::result::Result::Ok(super::super::AssetIds {
8202                    zipped_asset_id: self.zipped_asset_id,
8203                    unified_asset_id: self.unified_asset_id,
8204                    __buffa_unknown_fields: self
8205                        .__buffa_unknown_fields
8206                        .to_owned()?
8207                        .into(),
8208                    ..::core::default::Default::default()
8209                })
8210            }
8211        }
8212        impl<'a> ::buffa::ViewEncode<'a> for AssetIdsView<'a> {
8213            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8214            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8215                #[allow(unused_imports)]
8216                use ::buffa::Enumeration as _;
8217                let mut size = 0u32;
8218                if self.zipped_asset_id != 0u32 {
8219                    size
8220                        += 1u32
8221                            + ::buffa::types::uint32_encoded_len(self.zipped_asset_id)
8222                                as u32;
8223                }
8224                if self.unified_asset_id != 0u32 {
8225                    size
8226                        += 1u32
8227                            + ::buffa::types::uint32_encoded_len(self.unified_asset_id)
8228                                as u32;
8229                }
8230                size += self.__buffa_unknown_fields.encoded_len() as u32;
8231                size
8232            }
8233            #[allow(clippy::needless_borrow)]
8234            fn write_to(
8235                &self,
8236                _cache: &mut ::buffa::SizeCache,
8237                buf: &mut impl ::buffa::bytes::BufMut,
8238            ) {
8239                #[allow(unused_imports)]
8240                use ::buffa::Enumeration as _;
8241                if self.zipped_asset_id != 0u32 {
8242                    ::buffa::types::put_uint32_field(1u32, self.zipped_asset_id, buf);
8243                }
8244                if self.unified_asset_id != 0u32 {
8245                    ::buffa::types::put_uint32_field(3u32, self.unified_asset_id, buf);
8246                }
8247                self.__buffa_unknown_fields.write_to(buf);
8248            }
8249        }
8250        /// Serializes this view as protobuf JSON.
8251        ///
8252        /// Implicit-presence fields with default values are omitted, `required`
8253        /// fields are always emitted, explicit-presence (`optional`) fields are
8254        /// emitted only when set, bytes fields are base64-encoded, and enum
8255        /// values are their proto name strings.
8256        ///
8257        /// This impl uses `serialize_map(None)` because the number of emitted
8258        /// fields depends on default-omission rules; serializers that require
8259        /// known map lengths (e.g. `bincode`) will return a runtime error.
8260        /// Use the owned message type for those formats.
8261        impl<'__a> ::serde::Serialize for AssetIdsView<'__a> {
8262            fn serialize<__S: ::serde::Serializer>(
8263                &self,
8264                __s: __S,
8265            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8266                use ::serde::ser::SerializeMap as _;
8267                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8268                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.zipped_asset_id) {
8269                    __map
8270                        .serialize_entry(
8271                            "zippedAssetId",
8272                            &::buffa::json_helpers::ProtoJson(&self.zipped_asset_id),
8273                        )?;
8274                }
8275                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.unified_asset_id) {
8276                    __map
8277                        .serialize_entry(
8278                            "unifiedAssetId",
8279                            &::buffa::json_helpers::ProtoJson(&self.unified_asset_id),
8280                        )?;
8281                }
8282                __map.end()
8283            }
8284        }
8285        impl<'a> ::buffa::MessageName for AssetIdsView<'a> {
8286            const PACKAGE: &'static str = "chain.lifecycle.v1";
8287            const NAME: &'static str = "AssetIds";
8288            const FULL_NAME: &'static str = "chain.lifecycle.v1.AssetIds";
8289            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
8290        }
8291        ::buffa::impl_default_view_instance!(AssetIdsView);
8292        ::buffa::impl_view_reborrow!(AssetIdsView);
8293        /** Self-contained, `'static` owned view of a `AssetIds` message.
8294
8295 Wraps [`::buffa::OwnedView`]`<`[`AssetIdsView`]`<'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.
8296
8297 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AssetIdsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8298        #[derive(Clone, Debug)]
8299        pub struct AssetIdsOwnedView(::buffa::OwnedView<AssetIdsView<'static>>);
8300        impl AssetIdsOwnedView {
8301            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8302            ///
8303            /// The view borrows directly from the buffer's data; the buffer is
8304            /// retained inside the returned handle.
8305            ///
8306            /// # Errors
8307            ///
8308            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8309            /// protobuf data.
8310            pub fn decode(
8311                bytes: ::buffa::bytes::Bytes,
8312            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8313                ::core::result::Result::Ok(
8314                    AssetIdsOwnedView(::buffa::OwnedView::decode(bytes)?),
8315                )
8316            }
8317            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8318            /// max message size).
8319            ///
8320            /// # Errors
8321            ///
8322            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8323            /// exceeds the configured limits.
8324            pub fn decode_with_options(
8325                bytes: ::buffa::bytes::Bytes,
8326                opts: &::buffa::DecodeOptions,
8327            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8328                ::core::result::Result::Ok(
8329                    AssetIdsOwnedView(
8330                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8331                    ),
8332                )
8333            }
8334            /// Build from an owned message via an encode → decode round-trip.
8335            ///
8336            /// # Errors
8337            ///
8338            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8339            /// somehow invalid (should not happen for well-formed messages).
8340            pub fn from_owned(
8341                msg: &super::super::AssetIds,
8342            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8343                ::core::result::Result::Ok(
8344                    AssetIdsOwnedView(::buffa::OwnedView::from_owned(msg)?),
8345                )
8346            }
8347            /// Borrow the full [`AssetIdsView`] with its lifetime tied to `&self`.
8348            #[must_use]
8349            pub fn view(&self) -> &AssetIdsView<'_> {
8350                self.0.reborrow()
8351            }
8352            /// Convert to the owned message type.
8353            ///
8354            /// # Errors
8355            ///
8356            /// Returns an error if re-materializing preserved unknown fields
8357            /// fails (e.g. the unknown-field limit is exceeded).
8358            pub fn to_owned_message(
8359                &self,
8360            ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8361                self.0.to_owned_message()
8362            }
8363            /// The underlying bytes buffer.
8364            #[must_use]
8365            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8366                self.0.bytes()
8367            }
8368            /// Consume the handle, returning the underlying bytes buffer.
8369            #[must_use]
8370            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8371                self.0.into_bytes()
8372            }
8373            /// Zipped asset identifier for the chain-specific asset mapping row. This is
8374            /// the canonical id from `chain_zipped_assets`, which already represents the
8375            /// source-chain asset metadata plus its mapped zToken relationship when
8376            /// relevant.
8377            ///
8378            /// Field 1: `zipped_asset_id`
8379            #[must_use]
8380            pub fn zipped_asset_id(&self) -> u32 {
8381                self.0.reborrow().zipped_asset_id
8382            }
8383            /// Unified asset identifier for the uAsset used by funding or trading flows
8384            /// when relevant. This is the canonical Polyester asset identity used by
8385            /// FundingAccount, TradingGateway, Lending, and other downstream product
8386            /// domains.
8387            ///
8388            /// Field 3: `unified_asset_id`
8389            #[must_use]
8390            pub fn unified_asset_id(&self) -> u32 {
8391                self.0.reborrow().unified_asset_id
8392            }
8393        }
8394        impl ::core::convert::From<::buffa::OwnedView<AssetIdsView<'static>>>
8395        for AssetIdsOwnedView {
8396            fn from(inner: ::buffa::OwnedView<AssetIdsView<'static>>) -> Self {
8397                AssetIdsOwnedView(inner)
8398            }
8399        }
8400        impl ::core::convert::From<AssetIdsOwnedView>
8401        for ::buffa::OwnedView<AssetIdsView<'static>> {
8402            fn from(wrapper: AssetIdsOwnedView) -> Self {
8403                wrapper.0
8404            }
8405        }
8406        impl ::core::convert::AsRef<::buffa::OwnedView<AssetIdsView<'static>>>
8407        for AssetIdsOwnedView {
8408            fn as_ref(&self) -> &::buffa::OwnedView<AssetIdsView<'static>> {
8409                &self.0
8410            }
8411        }
8412        impl ::buffa::HasMessageView for super::super::AssetIds {
8413            type View<'a> = AssetIdsView<'a>;
8414            type ViewHandle = AssetIdsOwnedView;
8415        }
8416        impl ::serde::Serialize for AssetIdsOwnedView {
8417            fn serialize<__S: ::serde::Serializer>(
8418                &self,
8419                __s: __S,
8420            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8421                ::serde::Serialize::serialize(&self.0, __s)
8422            }
8423        }
8424        /// RequestFee captures the on-chain fee associated with a deposit or withdrawal
8425        /// request. This is separate from summary `amount_e18`, which carries the gross
8426        /// request principal for API display.
8427        #[derive(Clone, Debug, Default)]
8428        pub struct RequestFeeView<'a> {
8429            /// Asset identities for the fee asset.
8430            ///
8431            /// Field 1: `asset_ids`
8432            pub asset_ids: ::buffa::MessageFieldView<
8433                super::super::__buffa::view::AssetIdsView<'a>,
8434            >,
8435            /// On-chain request fee in 18-decimal units of the fee asset identified by
8436            /// asset_ids. Separate from gross flow amount_e18 on summaries.
8437            ///
8438            /// Field 2: `amount_e18`
8439            pub amount_e18: ::buffa::MessageFieldView<
8440                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
8441                    'a,
8442                >,
8443            >,
8444            /// Fee recipient address when settled on chain.
8445            ///
8446            /// Field 3: `recipient_address`
8447            pub recipient_address: &'a str,
8448            /// Current state of the fee snapshot.
8449            ///
8450            /// Field 4: `status`
8451            pub status: ::buffa::EnumValue<super::super::RequestFeeStatus>,
8452            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8453        }
8454        impl<'a> ::buffa::MessageView<'a> for RequestFeeView<'a> {
8455            type Owned = super::super::RequestFee;
8456            fn decode_view(
8457                buf: &'a [u8],
8458            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8459                let __limit = ::core::cell::Cell::new(
8460                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8461                );
8462                <Self as ::buffa::MessageView>::decode_view_ctx(
8463                    buf,
8464                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8465                )
8466            }
8467            fn decode_view_with_ctx(
8468                buf: &'a [u8],
8469                ctx: ::buffa::DecodeContext<'_>,
8470            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8471                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8472            }
8473            fn merge_view_field(
8474                &mut self,
8475                tag: ::buffa::encoding::Tag,
8476                cur: &'a [u8],
8477                before_tag: &'a [u8],
8478                ctx: ::buffa::DecodeContext<'_>,
8479            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8480                let _ = ctx;
8481                #[allow(unused_variables)]
8482                let view = self;
8483                let mut cur = cur;
8484                match tag.field_number() {
8485                    1u32 => {
8486                        ::buffa::encoding::check_wire_type(
8487                            tag,
8488                            ::buffa::encoding::WireType::LengthDelimited,
8489                        )?;
8490                        let __sub_ctx = ctx.descend()?;
8491                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8492                        match view.asset_ids.as_mut() {
8493                            Some(existing) => {
8494                                ::buffa::MessageView::merge_into_view(
8495                                    existing,
8496                                    sub,
8497                                    __sub_ctx,
8498                                )?
8499                            }
8500                            None => {
8501                                view.asset_ids = ::buffa::MessageFieldView::set(
8502                                    <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
8503                                        sub,
8504                                        __sub_ctx,
8505                                    )?,
8506                                );
8507                            }
8508                        }
8509                    }
8510                    2u32 => {
8511                        ::buffa::encoding::check_wire_type(
8512                            tag,
8513                            ::buffa::encoding::WireType::LengthDelimited,
8514                        )?;
8515                        let __sub_ctx = ctx.descend()?;
8516                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8517                        match view.amount_e18.as_mut() {
8518                            Some(existing) => {
8519                                ::buffa::MessageView::merge_into_view(
8520                                    existing,
8521                                    sub,
8522                                    __sub_ctx,
8523                                )?
8524                            }
8525                            None => {
8526                                view.amount_e18 = ::buffa::MessageFieldView::set(
8527                                    <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
8528                                        sub,
8529                                        __sub_ctx,
8530                                    )?,
8531                                );
8532                            }
8533                        }
8534                    }
8535                    3u32 => {
8536                        ::buffa::encoding::check_wire_type(
8537                            tag,
8538                            ::buffa::encoding::WireType::LengthDelimited,
8539                        )?;
8540                        view.recipient_address = ::buffa::types::borrow_str(&mut cur)?;
8541                    }
8542                    4u32 => {
8543                        ::buffa::encoding::check_wire_type(
8544                            tag,
8545                            ::buffa::encoding::WireType::Varint,
8546                        )?;
8547                        view.status = ::buffa::EnumValue::from(
8548                            ::buffa::types::decode_int32(&mut cur)?,
8549                        );
8550                    }
8551                    _ => {
8552                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8553                        let span_len = before_tag.len() - cur.len();
8554                        view.__buffa_unknown_fields
8555                            .push_record(before_tag, span_len, ctx)?;
8556                    }
8557                }
8558                ::core::result::Result::Ok(cur)
8559            }
8560            fn to_owned_message(
8561                &self,
8562            ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8563                self.to_owned_from_source(None)
8564            }
8565            #[allow(clippy::useless_conversion, clippy::needless_update)]
8566            fn to_owned_from_source(
8567                &self,
8568                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8569            ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8570                #[allow(unused_imports)]
8571                use ::buffa::alloc::string::ToString as _;
8572                let _ = __buffa_src;
8573                ::core::result::Result::Ok(super::super::RequestFee {
8574                    asset_ids: match self.asset_ids.as_option() {
8575                        Some(v) => {
8576                            ::buffa::MessageField::<
8577                                super::super::AssetIds,
8578                            >::some(v.to_owned_from_source(__buffa_src)?)
8579                        }
8580                        None => ::buffa::MessageField::none(),
8581                    },
8582                    amount_e18: match self.amount_e18.as_option() {
8583                        Some(v) => {
8584                            ::buffa::MessageField::<
8585                                super::super::super::super::super::polyester::r#type::v1::U128,
8586                            >::some(v.to_owned_from_source(__buffa_src)?)
8587                        }
8588                        None => ::buffa::MessageField::none(),
8589                    },
8590                    recipient_address: self.recipient_address.to_string(),
8591                    status: self.status,
8592                    __buffa_unknown_fields: self
8593                        .__buffa_unknown_fields
8594                        .to_owned()?
8595                        .into(),
8596                    ..::core::default::Default::default()
8597                })
8598            }
8599        }
8600        impl<'a> ::buffa::ViewEncode<'a> for RequestFeeView<'a> {
8601            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8602            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8603                #[allow(unused_imports)]
8604                use ::buffa::Enumeration as _;
8605                let mut size = 0u32;
8606                if self.asset_ids.is_set() {
8607                    let __slot = __cache.reserve();
8608                    let inner_size = self.asset_ids.compute_size(__cache);
8609                    __cache.set(__slot, inner_size);
8610                    size
8611                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8612                            + inner_size;
8613                }
8614                if self.amount_e18.is_set() {
8615                    let __slot = __cache.reserve();
8616                    let inner_size = self.amount_e18.compute_size(__cache);
8617                    __cache.set(__slot, inner_size);
8618                    size
8619                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8620                            + inner_size;
8621                }
8622                if !self.recipient_address.is_empty() {
8623                    size
8624                        += 1u32
8625                            + ::buffa::types::string_encoded_len(&self.recipient_address)
8626                                as u32;
8627                }
8628                {
8629                    let val = self.status.to_i32();
8630                    if val != 0 {
8631                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
8632                    }
8633                }
8634                size += self.__buffa_unknown_fields.encoded_len() as u32;
8635                size
8636            }
8637            #[allow(clippy::needless_borrow)]
8638            fn write_to(
8639                &self,
8640                __cache: &mut ::buffa::SizeCache,
8641                buf: &mut impl ::buffa::bytes::BufMut,
8642            ) {
8643                #[allow(unused_imports)]
8644                use ::buffa::Enumeration as _;
8645                if self.asset_ids.is_set() {
8646                    ::buffa::types::put_len_delimited_header(
8647                        1u32,
8648                        __cache.consume_next(),
8649                        buf,
8650                    );
8651                    self.asset_ids.write_to(__cache, buf);
8652                }
8653                if self.amount_e18.is_set() {
8654                    ::buffa::types::put_len_delimited_header(
8655                        2u32,
8656                        __cache.consume_next(),
8657                        buf,
8658                    );
8659                    self.amount_e18.write_to(__cache, buf);
8660                }
8661                if !self.recipient_address.is_empty() {
8662                    ::buffa::types::put_string_field(3u32, &self.recipient_address, buf);
8663                }
8664                {
8665                    let val = self.status.to_i32();
8666                    if val != 0 {
8667                        ::buffa::types::put_int32_field(4u32, val, buf);
8668                    }
8669                }
8670                self.__buffa_unknown_fields.write_to(buf);
8671            }
8672        }
8673        /// Serializes this view as protobuf JSON.
8674        ///
8675        /// Implicit-presence fields with default values are omitted, `required`
8676        /// fields are always emitted, explicit-presence (`optional`) fields are
8677        /// emitted only when set, bytes fields are base64-encoded, and enum
8678        /// values are their proto name strings.
8679        ///
8680        /// This impl uses `serialize_map(None)` because the number of emitted
8681        /// fields depends on default-omission rules; serializers that require
8682        /// known map lengths (e.g. `bincode`) will return a runtime error.
8683        /// Use the owned message type for those formats.
8684        impl<'__a> ::serde::Serialize for RequestFeeView<'__a> {
8685            fn serialize<__S: ::serde::Serializer>(
8686                &self,
8687                __s: __S,
8688            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8689                use ::serde::ser::SerializeMap as _;
8690                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8691                {
8692                    if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
8693                    {
8694                        __map.serialize_entry("assetIds", __v)?;
8695                    }
8696                }
8697                {
8698                    if let ::core::option::Option::Some(__v) = self
8699                        .amount_e18
8700                        .as_option()
8701                    {
8702                        __map.serialize_entry("amountE18", __v)?;
8703                    }
8704                }
8705                if !::buffa::json_helpers::skip_if::is_empty_str(
8706                    self.recipient_address,
8707                ) {
8708                    __map.serialize_entry("recipientAddress", self.recipient_address)?;
8709                }
8710                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.status) {
8711                    __map.serialize_entry("status", &self.status)?;
8712                }
8713                __map.end()
8714            }
8715        }
8716        impl<'a> ::buffa::MessageName for RequestFeeView<'a> {
8717            const PACKAGE: &'static str = "chain.lifecycle.v1";
8718            const NAME: &'static str = "RequestFee";
8719            const FULL_NAME: &'static str = "chain.lifecycle.v1.RequestFee";
8720            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
8721        }
8722        ::buffa::impl_default_view_instance!(RequestFeeView);
8723        ::buffa::impl_view_reborrow!(RequestFeeView);
8724        /** Self-contained, `'static` owned view of a `RequestFee` message.
8725
8726 Wraps [`::buffa::OwnedView`]`<`[`RequestFeeView`]`<'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.
8727
8728 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`RequestFeeView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8729        #[derive(Clone, Debug)]
8730        pub struct RequestFeeOwnedView(::buffa::OwnedView<RequestFeeView<'static>>);
8731        impl RequestFeeOwnedView {
8732            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8733            ///
8734            /// The view borrows directly from the buffer's data; the buffer is
8735            /// retained inside the returned handle.
8736            ///
8737            /// # Errors
8738            ///
8739            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8740            /// protobuf data.
8741            pub fn decode(
8742                bytes: ::buffa::bytes::Bytes,
8743            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8744                ::core::result::Result::Ok(
8745                    RequestFeeOwnedView(::buffa::OwnedView::decode(bytes)?),
8746                )
8747            }
8748            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8749            /// max message size).
8750            ///
8751            /// # Errors
8752            ///
8753            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8754            /// exceeds the configured limits.
8755            pub fn decode_with_options(
8756                bytes: ::buffa::bytes::Bytes,
8757                opts: &::buffa::DecodeOptions,
8758            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8759                ::core::result::Result::Ok(
8760                    RequestFeeOwnedView(
8761                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8762                    ),
8763                )
8764            }
8765            /// Build from an owned message via an encode → decode round-trip.
8766            ///
8767            /// # Errors
8768            ///
8769            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8770            /// somehow invalid (should not happen for well-formed messages).
8771            pub fn from_owned(
8772                msg: &super::super::RequestFee,
8773            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8774                ::core::result::Result::Ok(
8775                    RequestFeeOwnedView(::buffa::OwnedView::from_owned(msg)?),
8776                )
8777            }
8778            /// Borrow the full [`RequestFeeView`] with its lifetime tied to `&self`.
8779            #[must_use]
8780            pub fn view(&self) -> &RequestFeeView<'_> {
8781                self.0.reborrow()
8782            }
8783            /// Convert to the owned message type.
8784            ///
8785            /// # Errors
8786            ///
8787            /// Returns an error if re-materializing preserved unknown fields
8788            /// fails (e.g. the unknown-field limit is exceeded).
8789            pub fn to_owned_message(
8790                &self,
8791            ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8792                self.0.to_owned_message()
8793            }
8794            /// The underlying bytes buffer.
8795            #[must_use]
8796            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8797                self.0.bytes()
8798            }
8799            /// Consume the handle, returning the underlying bytes buffer.
8800            #[must_use]
8801            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8802                self.0.into_bytes()
8803            }
8804            /// Asset identities for the fee asset.
8805            ///
8806            /// Field 1: `asset_ids`
8807            #[must_use]
8808            pub fn asset_ids(
8809                &self,
8810            ) -> &::buffa::MessageFieldView<
8811                super::super::__buffa::view::AssetIdsView<'_>,
8812            > {
8813                &self.0.reborrow().asset_ids
8814            }
8815            /// On-chain request fee in 18-decimal units of the fee asset identified by
8816            /// asset_ids. Separate from gross flow amount_e18 on summaries.
8817            ///
8818            /// Field 2: `amount_e18`
8819            #[must_use]
8820            pub fn amount_e18(
8821                &self,
8822            ) -> &::buffa::MessageFieldView<
8823                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
8824                    '_,
8825                >,
8826            > {
8827                &self.0.reborrow().amount_e18
8828            }
8829            /// Fee recipient address when settled on chain.
8830            ///
8831            /// Field 3: `recipient_address`
8832            #[must_use]
8833            pub fn recipient_address(&self) -> &'_ str {
8834                self.0.reborrow().recipient_address
8835            }
8836            /// Current state of the fee snapshot.
8837            ///
8838            /// Field 4: `status`
8839            #[must_use]
8840            pub fn status(&self) -> ::buffa::EnumValue<super::super::RequestFeeStatus> {
8841                self.0.reborrow().status
8842            }
8843        }
8844        impl ::core::convert::From<::buffa::OwnedView<RequestFeeView<'static>>>
8845        for RequestFeeOwnedView {
8846            fn from(inner: ::buffa::OwnedView<RequestFeeView<'static>>) -> Self {
8847                RequestFeeOwnedView(inner)
8848            }
8849        }
8850        impl ::core::convert::From<RequestFeeOwnedView>
8851        for ::buffa::OwnedView<RequestFeeView<'static>> {
8852            fn from(wrapper: RequestFeeOwnedView) -> Self {
8853                wrapper.0
8854            }
8855        }
8856        impl ::core::convert::AsRef<::buffa::OwnedView<RequestFeeView<'static>>>
8857        for RequestFeeOwnedView {
8858            fn as_ref(&self) -> &::buffa::OwnedView<RequestFeeView<'static>> {
8859                &self.0
8860            }
8861        }
8862        impl ::buffa::HasMessageView for super::super::RequestFee {
8863            type View<'a> = RequestFeeView<'a>;
8864            type ViewHandle = RequestFeeOwnedView;
8865        }
8866        impl ::serde::Serialize for RequestFeeOwnedView {
8867            fn serialize<__S: ::serde::Serializer>(
8868                &self,
8869                __s: __S,
8870            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8871                ::serde::Serialize::serialize(&self.0, __s)
8872            }
8873        }
8874        /// GetFlowResponse returns one lifecycle flow with summary, factual steps, and
8875        /// estimated timeline data when available.
8876        #[derive(Clone, Debug, Default)]
8877        pub struct GetFlowResponseView<'a> {
8878            /// Lifecycle flow detail for the requested intent id.
8879            ///
8880            /// Field 1: `flow`
8881            pub flow: ::buffa::MessageFieldView<
8882                super::super::__buffa::view::FlowDetailViewView<'a>,
8883            >,
8884            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8885        }
8886        impl<'a> ::buffa::MessageView<'a> for GetFlowResponseView<'a> {
8887            type Owned = super::super::GetFlowResponse;
8888            fn decode_view(
8889                buf: &'a [u8],
8890            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8891                let __limit = ::core::cell::Cell::new(
8892                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8893                );
8894                <Self as ::buffa::MessageView>::decode_view_ctx(
8895                    buf,
8896                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8897                )
8898            }
8899            fn decode_view_with_ctx(
8900                buf: &'a [u8],
8901                ctx: ::buffa::DecodeContext<'_>,
8902            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8903                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8904            }
8905            fn merge_view_field(
8906                &mut self,
8907                tag: ::buffa::encoding::Tag,
8908                cur: &'a [u8],
8909                before_tag: &'a [u8],
8910                ctx: ::buffa::DecodeContext<'_>,
8911            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8912                let _ = ctx;
8913                #[allow(unused_variables)]
8914                let view = self;
8915                let mut cur = cur;
8916                match tag.field_number() {
8917                    1u32 => {
8918                        ::buffa::encoding::check_wire_type(
8919                            tag,
8920                            ::buffa::encoding::WireType::LengthDelimited,
8921                        )?;
8922                        let __sub_ctx = ctx.descend()?;
8923                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8924                        match view.flow.as_mut() {
8925                            Some(existing) => {
8926                                ::buffa::MessageView::merge_into_view(
8927                                    existing,
8928                                    sub,
8929                                    __sub_ctx,
8930                                )?
8931                            }
8932                            None => {
8933                                view.flow = ::buffa::MessageFieldView::set(
8934                                    <super::super::__buffa::view::FlowDetailViewView as ::buffa::MessageView>::decode_view_ctx(
8935                                        sub,
8936                                        __sub_ctx,
8937                                    )?,
8938                                );
8939                            }
8940                        }
8941                    }
8942                    _ => {
8943                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8944                        let span_len = before_tag.len() - cur.len();
8945                        view.__buffa_unknown_fields
8946                            .push_record(before_tag, span_len, ctx)?;
8947                    }
8948                }
8949                ::core::result::Result::Ok(cur)
8950            }
8951            fn to_owned_message(
8952                &self,
8953            ) -> ::core::result::Result<
8954                super::super::GetFlowResponse,
8955                ::buffa::DecodeError,
8956            > {
8957                self.to_owned_from_source(None)
8958            }
8959            #[allow(clippy::useless_conversion, clippy::needless_update)]
8960            fn to_owned_from_source(
8961                &self,
8962                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8963            ) -> ::core::result::Result<
8964                super::super::GetFlowResponse,
8965                ::buffa::DecodeError,
8966            > {
8967                #[allow(unused_imports)]
8968                use ::buffa::alloc::string::ToString as _;
8969                let _ = __buffa_src;
8970                ::core::result::Result::Ok(super::super::GetFlowResponse {
8971                    flow: match self.flow.as_option() {
8972                        Some(v) => {
8973                            ::buffa::MessageField::<
8974                                super::super::FlowDetailView,
8975                            >::some(v.to_owned_from_source(__buffa_src)?)
8976                        }
8977                        None => ::buffa::MessageField::none(),
8978                    },
8979                    __buffa_unknown_fields: self
8980                        .__buffa_unknown_fields
8981                        .to_owned()?
8982                        .into(),
8983                    ..::core::default::Default::default()
8984                })
8985            }
8986        }
8987        impl<'a> ::buffa::ViewEncode<'a> for GetFlowResponseView<'a> {
8988            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8989            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8990                #[allow(unused_imports)]
8991                use ::buffa::Enumeration as _;
8992                let mut size = 0u32;
8993                if self.flow.is_set() {
8994                    let __slot = __cache.reserve();
8995                    let inner_size = self.flow.compute_size(__cache);
8996                    __cache.set(__slot, inner_size);
8997                    size
8998                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8999                            + inner_size;
9000                }
9001                size += self.__buffa_unknown_fields.encoded_len() as u32;
9002                size
9003            }
9004            #[allow(clippy::needless_borrow)]
9005            fn write_to(
9006                &self,
9007                __cache: &mut ::buffa::SizeCache,
9008                buf: &mut impl ::buffa::bytes::BufMut,
9009            ) {
9010                #[allow(unused_imports)]
9011                use ::buffa::Enumeration as _;
9012                if self.flow.is_set() {
9013                    ::buffa::types::put_len_delimited_header(
9014                        1u32,
9015                        __cache.consume_next(),
9016                        buf,
9017                    );
9018                    self.flow.write_to(__cache, buf);
9019                }
9020                self.__buffa_unknown_fields.write_to(buf);
9021            }
9022        }
9023        /// Serializes this view as protobuf JSON.
9024        ///
9025        /// Implicit-presence fields with default values are omitted, `required`
9026        /// fields are always emitted, explicit-presence (`optional`) fields are
9027        /// emitted only when set, bytes fields are base64-encoded, and enum
9028        /// values are their proto name strings.
9029        ///
9030        /// This impl uses `serialize_map(None)` because the number of emitted
9031        /// fields depends on default-omission rules; serializers that require
9032        /// known map lengths (e.g. `bincode`) will return a runtime error.
9033        /// Use the owned message type for those formats.
9034        impl<'__a> ::serde::Serialize for GetFlowResponseView<'__a> {
9035            fn serialize<__S: ::serde::Serializer>(
9036                &self,
9037                __s: __S,
9038            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9039                use ::serde::ser::SerializeMap as _;
9040                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9041                {
9042                    if let ::core::option::Option::Some(__v) = self.flow.as_option() {
9043                        __map.serialize_entry("flow", __v)?;
9044                    }
9045                }
9046                __map.end()
9047            }
9048        }
9049        impl<'a> ::buffa::MessageName for GetFlowResponseView<'a> {
9050            const PACKAGE: &'static str = "chain.lifecycle.v1";
9051            const NAME: &'static str = "GetFlowResponse";
9052            const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowResponse";
9053            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
9054        }
9055        ::buffa::impl_default_view_instance!(GetFlowResponseView);
9056        ::buffa::impl_view_reborrow!(GetFlowResponseView);
9057        /** Self-contained, `'static` owned view of a `GetFlowResponse` message.
9058
9059 Wraps [`::buffa::OwnedView`]`<`[`GetFlowResponseView`]`<'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.
9060
9061 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetFlowResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9062        #[derive(Clone, Debug)]
9063        pub struct GetFlowResponseOwnedView(
9064            ::buffa::OwnedView<GetFlowResponseView<'static>>,
9065        );
9066        impl GetFlowResponseOwnedView {
9067            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9068            ///
9069            /// The view borrows directly from the buffer's data; the buffer is
9070            /// retained inside the returned handle.
9071            ///
9072            /// # Errors
9073            ///
9074            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9075            /// protobuf data.
9076            pub fn decode(
9077                bytes: ::buffa::bytes::Bytes,
9078            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9079                ::core::result::Result::Ok(
9080                    GetFlowResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
9081                )
9082            }
9083            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9084            /// max message size).
9085            ///
9086            /// # Errors
9087            ///
9088            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9089            /// exceeds the configured limits.
9090            pub fn decode_with_options(
9091                bytes: ::buffa::bytes::Bytes,
9092                opts: &::buffa::DecodeOptions,
9093            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9094                ::core::result::Result::Ok(
9095                    GetFlowResponseOwnedView(
9096                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9097                    ),
9098                )
9099            }
9100            /// Build from an owned message via an encode → decode round-trip.
9101            ///
9102            /// # Errors
9103            ///
9104            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9105            /// somehow invalid (should not happen for well-formed messages).
9106            pub fn from_owned(
9107                msg: &super::super::GetFlowResponse,
9108            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9109                ::core::result::Result::Ok(
9110                    GetFlowResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
9111                )
9112            }
9113            /// Borrow the full [`GetFlowResponseView`] with its lifetime tied to `&self`.
9114            #[must_use]
9115            pub fn view(&self) -> &GetFlowResponseView<'_> {
9116                self.0.reborrow()
9117            }
9118            /// Convert to the owned message type.
9119            ///
9120            /// # Errors
9121            ///
9122            /// Returns an error if re-materializing preserved unknown fields
9123            /// fails (e.g. the unknown-field limit is exceeded).
9124            pub fn to_owned_message(
9125                &self,
9126            ) -> ::core::result::Result<
9127                super::super::GetFlowResponse,
9128                ::buffa::DecodeError,
9129            > {
9130                self.0.to_owned_message()
9131            }
9132            /// The underlying bytes buffer.
9133            #[must_use]
9134            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9135                self.0.bytes()
9136            }
9137            /// Consume the handle, returning the underlying bytes buffer.
9138            #[must_use]
9139            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9140                self.0.into_bytes()
9141            }
9142            /// Lifecycle flow detail for the requested intent id.
9143            ///
9144            /// Field 1: `flow`
9145            #[must_use]
9146            pub fn flow(
9147                &self,
9148            ) -> &::buffa::MessageFieldView<
9149                super::super::__buffa::view::FlowDetailViewView<'_>,
9150            > {
9151                &self.0.reborrow().flow
9152            }
9153        }
9154        impl ::core::convert::From<::buffa::OwnedView<GetFlowResponseView<'static>>>
9155        for GetFlowResponseOwnedView {
9156            fn from(inner: ::buffa::OwnedView<GetFlowResponseView<'static>>) -> Self {
9157                GetFlowResponseOwnedView(inner)
9158            }
9159        }
9160        impl ::core::convert::From<GetFlowResponseOwnedView>
9161        for ::buffa::OwnedView<GetFlowResponseView<'static>> {
9162            fn from(wrapper: GetFlowResponseOwnedView) -> Self {
9163                wrapper.0
9164            }
9165        }
9166        impl ::core::convert::AsRef<::buffa::OwnedView<GetFlowResponseView<'static>>>
9167        for GetFlowResponseOwnedView {
9168            fn as_ref(&self) -> &::buffa::OwnedView<GetFlowResponseView<'static>> {
9169                &self.0
9170            }
9171        }
9172        impl ::buffa::HasMessageView for super::super::GetFlowResponse {
9173            type View<'a> = GetFlowResponseView<'a>;
9174            type ViewHandle = GetFlowResponseOwnedView;
9175        }
9176        impl ::serde::Serialize for GetFlowResponseOwnedView {
9177            fn serialize<__S: ::serde::Serializer>(
9178                &self,
9179                __s: __S,
9180            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9181                ::serde::Serialize::serialize(&self.0, __s)
9182            }
9183        }
9184        /// GetFlowByIdRequest selects one lifecycle flow by its public flow id.
9185        #[derive(Clone, Debug, Default)]
9186        pub struct GetFlowByIdRequestView<'a> {
9187            /// Public, URL-safe lifecycle identifier returned by list/search responses.
9188            ///
9189            /// Field 1: `flow_id`
9190            pub flow_id: &'a str,
9191            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9192        }
9193        impl<'a> ::buffa::MessageView<'a> for GetFlowByIdRequestView<'a> {
9194            type Owned = super::super::GetFlowByIdRequest;
9195            fn decode_view(
9196                buf: &'a [u8],
9197            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9198                let __limit = ::core::cell::Cell::new(
9199                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9200                );
9201                <Self as ::buffa::MessageView>::decode_view_ctx(
9202                    buf,
9203                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9204                )
9205            }
9206            fn decode_view_with_ctx(
9207                buf: &'a [u8],
9208                ctx: ::buffa::DecodeContext<'_>,
9209            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9210                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9211            }
9212            fn merge_view_field(
9213                &mut self,
9214                tag: ::buffa::encoding::Tag,
9215                cur: &'a [u8],
9216                before_tag: &'a [u8],
9217                ctx: ::buffa::DecodeContext<'_>,
9218            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9219                let _ = ctx;
9220                #[allow(unused_variables)]
9221                let view = self;
9222                let mut cur = cur;
9223                match tag.field_number() {
9224                    1u32 => {
9225                        ::buffa::encoding::check_wire_type(
9226                            tag,
9227                            ::buffa::encoding::WireType::LengthDelimited,
9228                        )?;
9229                        view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
9230                    }
9231                    _ => {
9232                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9233                        let span_len = before_tag.len() - cur.len();
9234                        view.__buffa_unknown_fields
9235                            .push_record(before_tag, span_len, ctx)?;
9236                    }
9237                }
9238                ::core::result::Result::Ok(cur)
9239            }
9240            fn to_owned_message(
9241                &self,
9242            ) -> ::core::result::Result<
9243                super::super::GetFlowByIdRequest,
9244                ::buffa::DecodeError,
9245            > {
9246                self.to_owned_from_source(None)
9247            }
9248            #[allow(clippy::useless_conversion, clippy::needless_update)]
9249            fn to_owned_from_source(
9250                &self,
9251                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9252            ) -> ::core::result::Result<
9253                super::super::GetFlowByIdRequest,
9254                ::buffa::DecodeError,
9255            > {
9256                #[allow(unused_imports)]
9257                use ::buffa::alloc::string::ToString as _;
9258                let _ = __buffa_src;
9259                ::core::result::Result::Ok(super::super::GetFlowByIdRequest {
9260                    flow_id: self.flow_id.to_string(),
9261                    __buffa_unknown_fields: self
9262                        .__buffa_unknown_fields
9263                        .to_owned()?
9264                        .into(),
9265                    ..::core::default::Default::default()
9266                })
9267            }
9268        }
9269        impl<'a> ::buffa::ViewEncode<'a> for GetFlowByIdRequestView<'a> {
9270            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9271            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9272                #[allow(unused_imports)]
9273                use ::buffa::Enumeration as _;
9274                let mut size = 0u32;
9275                if !self.flow_id.is_empty() {
9276                    size
9277                        += 1u32
9278                            + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
9279                }
9280                size += self.__buffa_unknown_fields.encoded_len() as u32;
9281                size
9282            }
9283            #[allow(clippy::needless_borrow)]
9284            fn write_to(
9285                &self,
9286                _cache: &mut ::buffa::SizeCache,
9287                buf: &mut impl ::buffa::bytes::BufMut,
9288            ) {
9289                #[allow(unused_imports)]
9290                use ::buffa::Enumeration as _;
9291                if !self.flow_id.is_empty() {
9292                    ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
9293                }
9294                self.__buffa_unknown_fields.write_to(buf);
9295            }
9296        }
9297        /// Serializes this view as protobuf JSON.
9298        ///
9299        /// Implicit-presence fields with default values are omitted, `required`
9300        /// fields are always emitted, explicit-presence (`optional`) fields are
9301        /// emitted only when set, bytes fields are base64-encoded, and enum
9302        /// values are their proto name strings.
9303        ///
9304        /// This impl uses `serialize_map(None)` because the number of emitted
9305        /// fields depends on default-omission rules; serializers that require
9306        /// known map lengths (e.g. `bincode`) will return a runtime error.
9307        /// Use the owned message type for those formats.
9308        impl<'__a> ::serde::Serialize for GetFlowByIdRequestView<'__a> {
9309            fn serialize<__S: ::serde::Serializer>(
9310                &self,
9311                __s: __S,
9312            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9313                use ::serde::ser::SerializeMap as _;
9314                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9315                if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
9316                    __map.serialize_entry("flowId", self.flow_id)?;
9317                }
9318                __map.end()
9319            }
9320        }
9321        impl<'a> ::buffa::MessageName for GetFlowByIdRequestView<'a> {
9322            const PACKAGE: &'static str = "chain.lifecycle.v1";
9323            const NAME: &'static str = "GetFlowByIdRequest";
9324            const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
9325            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
9326        }
9327        ::buffa::impl_default_view_instance!(GetFlowByIdRequestView);
9328        ::buffa::impl_view_reborrow!(GetFlowByIdRequestView);
9329        /** Self-contained, `'static` owned view of a `GetFlowByIdRequest` message.
9330
9331 Wraps [`::buffa::OwnedView`]`<`[`GetFlowByIdRequestView`]`<'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.
9332
9333 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetFlowByIdRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9334        #[derive(Clone, Debug)]
9335        pub struct GetFlowByIdRequestOwnedView(
9336            ::buffa::OwnedView<GetFlowByIdRequestView<'static>>,
9337        );
9338        impl GetFlowByIdRequestOwnedView {
9339            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9340            ///
9341            /// The view borrows directly from the buffer's data; the buffer is
9342            /// retained inside the returned handle.
9343            ///
9344            /// # Errors
9345            ///
9346            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9347            /// protobuf data.
9348            pub fn decode(
9349                bytes: ::buffa::bytes::Bytes,
9350            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9351                ::core::result::Result::Ok(
9352                    GetFlowByIdRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9353                )
9354            }
9355            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9356            /// max message size).
9357            ///
9358            /// # Errors
9359            ///
9360            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9361            /// exceeds the configured limits.
9362            pub fn decode_with_options(
9363                bytes: ::buffa::bytes::Bytes,
9364                opts: &::buffa::DecodeOptions,
9365            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9366                ::core::result::Result::Ok(
9367                    GetFlowByIdRequestOwnedView(
9368                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9369                    ),
9370                )
9371            }
9372            /// Build from an owned message via an encode → decode round-trip.
9373            ///
9374            /// # Errors
9375            ///
9376            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9377            /// somehow invalid (should not happen for well-formed messages).
9378            pub fn from_owned(
9379                msg: &super::super::GetFlowByIdRequest,
9380            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9381                ::core::result::Result::Ok(
9382                    GetFlowByIdRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9383                )
9384            }
9385            /// Borrow the full [`GetFlowByIdRequestView`] with its lifetime tied to `&self`.
9386            #[must_use]
9387            pub fn view(&self) -> &GetFlowByIdRequestView<'_> {
9388                self.0.reborrow()
9389            }
9390            /// Convert to the owned message type.
9391            ///
9392            /// # Errors
9393            ///
9394            /// Returns an error if re-materializing preserved unknown fields
9395            /// fails (e.g. the unknown-field limit is exceeded).
9396            pub fn to_owned_message(
9397                &self,
9398            ) -> ::core::result::Result<
9399                super::super::GetFlowByIdRequest,
9400                ::buffa::DecodeError,
9401            > {
9402                self.0.to_owned_message()
9403            }
9404            /// The underlying bytes buffer.
9405            #[must_use]
9406            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9407                self.0.bytes()
9408            }
9409            /// Consume the handle, returning the underlying bytes buffer.
9410            #[must_use]
9411            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9412                self.0.into_bytes()
9413            }
9414            /// Public, URL-safe lifecycle identifier returned by list/search responses.
9415            ///
9416            /// Field 1: `flow_id`
9417            #[must_use]
9418            pub fn flow_id(&self) -> &'_ str {
9419                self.0.reborrow().flow_id
9420            }
9421        }
9422        impl ::core::convert::From<::buffa::OwnedView<GetFlowByIdRequestView<'static>>>
9423        for GetFlowByIdRequestOwnedView {
9424            fn from(inner: ::buffa::OwnedView<GetFlowByIdRequestView<'static>>) -> Self {
9425                GetFlowByIdRequestOwnedView(inner)
9426            }
9427        }
9428        impl ::core::convert::From<GetFlowByIdRequestOwnedView>
9429        for ::buffa::OwnedView<GetFlowByIdRequestView<'static>> {
9430            fn from(wrapper: GetFlowByIdRequestOwnedView) -> Self {
9431                wrapper.0
9432            }
9433        }
9434        impl ::core::convert::AsRef<::buffa::OwnedView<GetFlowByIdRequestView<'static>>>
9435        for GetFlowByIdRequestOwnedView {
9436            fn as_ref(&self) -> &::buffa::OwnedView<GetFlowByIdRequestView<'static>> {
9437                &self.0
9438            }
9439        }
9440        impl ::buffa::HasMessageView for super::super::GetFlowByIdRequest {
9441            type View<'a> = GetFlowByIdRequestView<'a>;
9442            type ViewHandle = GetFlowByIdRequestOwnedView;
9443        }
9444        impl ::serde::Serialize for GetFlowByIdRequestOwnedView {
9445            fn serialize<__S: ::serde::Serializer>(
9446                &self,
9447                __s: __S,
9448            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9449                ::serde::Serialize::serialize(&self.0, __s)
9450            }
9451        }
9452        /// ListFlowsByTxRequest searches lifecycle flows by transaction identifier. A
9453        /// single chain transaction can map to zero, one, or many lifecycle flows.
9454        #[derive(Clone, Debug, Default)]
9455        pub struct ListFlowsByTxRequestView<'a> {
9456            /// Chain transaction identifier to search for. Accepts a 0x-prefixed 32-byte
9457            /// EVM hash or a printable chain-native transaction id such as a Solana
9458            /// signature, Bitcoin txid, Litecoin txid, Dogecoin txid, or XRP transaction
9459            /// hash.
9460            ///
9461            /// Field 1: `tx_hash`
9462            pub tx_hash: &'a str,
9463            /// Lookup mode that determines which transaction references are searched.
9464            ///
9465            /// Field 2: `lookup_kind`
9466            pub lookup_kind: ::buffa::EnumValue<super::super::TxLookupKind>,
9467            /// Maximum number of matches to return. Defaults to 100 when omitted; maximum
9468            /// is 500.
9469            ///
9470            /// Field 3: `limit`
9471            pub limit: u32,
9472            /// Opaque keyset cursor returned by a previous response. The cursor is
9473            /// exclusive and bound to the transaction hash and lookup mode.
9474            ///
9475            /// Field 4: `page_token`
9476            pub page_token: &'a str,
9477            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9478        }
9479        impl<'a> ::buffa::MessageView<'a> for ListFlowsByTxRequestView<'a> {
9480            type Owned = super::super::ListFlowsByTxRequest;
9481            fn decode_view(
9482                buf: &'a [u8],
9483            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9484                let __limit = ::core::cell::Cell::new(
9485                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9486                );
9487                <Self as ::buffa::MessageView>::decode_view_ctx(
9488                    buf,
9489                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9490                )
9491            }
9492            fn decode_view_with_ctx(
9493                buf: &'a [u8],
9494                ctx: ::buffa::DecodeContext<'_>,
9495            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9496                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9497            }
9498            fn merge_view_field(
9499                &mut self,
9500                tag: ::buffa::encoding::Tag,
9501                cur: &'a [u8],
9502                before_tag: &'a [u8],
9503                ctx: ::buffa::DecodeContext<'_>,
9504            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9505                let _ = ctx;
9506                #[allow(unused_variables)]
9507                let view = self;
9508                let mut cur = cur;
9509                match tag.field_number() {
9510                    1u32 => {
9511                        ::buffa::encoding::check_wire_type(
9512                            tag,
9513                            ::buffa::encoding::WireType::LengthDelimited,
9514                        )?;
9515                        view.tx_hash = ::buffa::types::borrow_str(&mut cur)?;
9516                    }
9517                    2u32 => {
9518                        ::buffa::encoding::check_wire_type(
9519                            tag,
9520                            ::buffa::encoding::WireType::Varint,
9521                        )?;
9522                        view.lookup_kind = ::buffa::EnumValue::from(
9523                            ::buffa::types::decode_int32(&mut cur)?,
9524                        );
9525                    }
9526                    3u32 => {
9527                        ::buffa::encoding::check_wire_type(
9528                            tag,
9529                            ::buffa::encoding::WireType::Varint,
9530                        )?;
9531                        view.limit = ::buffa::types::decode_uint32(&mut cur)?;
9532                    }
9533                    4u32 => {
9534                        ::buffa::encoding::check_wire_type(
9535                            tag,
9536                            ::buffa::encoding::WireType::LengthDelimited,
9537                        )?;
9538                        view.page_token = ::buffa::types::borrow_str(&mut cur)?;
9539                    }
9540                    _ => {
9541                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9542                        let span_len = before_tag.len() - cur.len();
9543                        view.__buffa_unknown_fields
9544                            .push_record(before_tag, span_len, ctx)?;
9545                    }
9546                }
9547                ::core::result::Result::Ok(cur)
9548            }
9549            fn to_owned_message(
9550                &self,
9551            ) -> ::core::result::Result<
9552                super::super::ListFlowsByTxRequest,
9553                ::buffa::DecodeError,
9554            > {
9555                self.to_owned_from_source(None)
9556            }
9557            #[allow(clippy::useless_conversion, clippy::needless_update)]
9558            fn to_owned_from_source(
9559                &self,
9560                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9561            ) -> ::core::result::Result<
9562                super::super::ListFlowsByTxRequest,
9563                ::buffa::DecodeError,
9564            > {
9565                #[allow(unused_imports)]
9566                use ::buffa::alloc::string::ToString as _;
9567                let _ = __buffa_src;
9568                ::core::result::Result::Ok(super::super::ListFlowsByTxRequest {
9569                    tx_hash: self.tx_hash.to_string(),
9570                    lookup_kind: self.lookup_kind,
9571                    limit: self.limit,
9572                    page_token: self.page_token.to_string(),
9573                    __buffa_unknown_fields: self
9574                        .__buffa_unknown_fields
9575                        .to_owned()?
9576                        .into(),
9577                    ..::core::default::Default::default()
9578                })
9579            }
9580        }
9581        impl<'a> ::buffa::ViewEncode<'a> for ListFlowsByTxRequestView<'a> {
9582            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9583            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9584                #[allow(unused_imports)]
9585                use ::buffa::Enumeration as _;
9586                let mut size = 0u32;
9587                if !self.tx_hash.is_empty() {
9588                    size
9589                        += 1u32
9590                            + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
9591                }
9592                {
9593                    let val = self.lookup_kind.to_i32();
9594                    if val != 0 {
9595                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
9596                    }
9597                }
9598                if self.limit != 0u32 {
9599                    size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
9600                }
9601                if !self.page_token.is_empty() {
9602                    size
9603                        += 1u32
9604                            + ::buffa::types::string_encoded_len(&self.page_token)
9605                                as u32;
9606                }
9607                size += self.__buffa_unknown_fields.encoded_len() as u32;
9608                size
9609            }
9610            #[allow(clippy::needless_borrow)]
9611            fn write_to(
9612                &self,
9613                _cache: &mut ::buffa::SizeCache,
9614                buf: &mut impl ::buffa::bytes::BufMut,
9615            ) {
9616                #[allow(unused_imports)]
9617                use ::buffa::Enumeration as _;
9618                if !self.tx_hash.is_empty() {
9619                    ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
9620                }
9621                {
9622                    let val = self.lookup_kind.to_i32();
9623                    if val != 0 {
9624                        ::buffa::types::put_int32_field(2u32, val, buf);
9625                    }
9626                }
9627                if self.limit != 0u32 {
9628                    ::buffa::types::put_uint32_field(3u32, self.limit, buf);
9629                }
9630                if !self.page_token.is_empty() {
9631                    ::buffa::types::put_string_field(4u32, &self.page_token, buf);
9632                }
9633                self.__buffa_unknown_fields.write_to(buf);
9634            }
9635        }
9636        /// Serializes this view as protobuf JSON.
9637        ///
9638        /// Implicit-presence fields with default values are omitted, `required`
9639        /// fields are always emitted, explicit-presence (`optional`) fields are
9640        /// emitted only when set, bytes fields are base64-encoded, and enum
9641        /// values are their proto name strings.
9642        ///
9643        /// This impl uses `serialize_map(None)` because the number of emitted
9644        /// fields depends on default-omission rules; serializers that require
9645        /// known map lengths (e.g. `bincode`) will return a runtime error.
9646        /// Use the owned message type for those formats.
9647        impl<'__a> ::serde::Serialize for ListFlowsByTxRequestView<'__a> {
9648            fn serialize<__S: ::serde::Serializer>(
9649                &self,
9650                __s: __S,
9651            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9652                use ::serde::ser::SerializeMap as _;
9653                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9654                if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_hash) {
9655                    __map.serialize_entry("txHash", self.tx_hash)?;
9656                }
9657                if !::buffa::json_helpers::skip_if::is_default_enum_value(
9658                    &self.lookup_kind,
9659                ) {
9660                    __map.serialize_entry("lookupKind", &self.lookup_kind)?;
9661                }
9662                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.limit) {
9663                    __map
9664                        .serialize_entry(
9665                            "limit",
9666                            &::buffa::json_helpers::ProtoJson(&self.limit),
9667                        )?;
9668                }
9669                if !::buffa::json_helpers::skip_if::is_empty_str(self.page_token) {
9670                    __map.serialize_entry("pageToken", self.page_token)?;
9671                }
9672                __map.end()
9673            }
9674        }
9675        impl<'a> ::buffa::MessageName for ListFlowsByTxRequestView<'a> {
9676            const PACKAGE: &'static str = "chain.lifecycle.v1";
9677            const NAME: &'static str = "ListFlowsByTxRequest";
9678            const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
9679            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
9680        }
9681        ::buffa::impl_default_view_instance!(ListFlowsByTxRequestView);
9682        ::buffa::impl_view_reborrow!(ListFlowsByTxRequestView);
9683        /** Self-contained, `'static` owned view of a `ListFlowsByTxRequest` message.
9684
9685 Wraps [`::buffa::OwnedView`]`<`[`ListFlowsByTxRequestView`]`<'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.
9686
9687 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListFlowsByTxRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9688        #[derive(Clone, Debug)]
9689        pub struct ListFlowsByTxRequestOwnedView(
9690            ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9691        );
9692        impl ListFlowsByTxRequestOwnedView {
9693            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9694            ///
9695            /// The view borrows directly from the buffer's data; the buffer is
9696            /// retained inside the returned handle.
9697            ///
9698            /// # Errors
9699            ///
9700            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9701            /// protobuf data.
9702            pub fn decode(
9703                bytes: ::buffa::bytes::Bytes,
9704            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9705                ::core::result::Result::Ok(
9706                    ListFlowsByTxRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9707                )
9708            }
9709            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9710            /// max message size).
9711            ///
9712            /// # Errors
9713            ///
9714            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9715            /// exceeds the configured limits.
9716            pub fn decode_with_options(
9717                bytes: ::buffa::bytes::Bytes,
9718                opts: &::buffa::DecodeOptions,
9719            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9720                ::core::result::Result::Ok(
9721                    ListFlowsByTxRequestOwnedView(
9722                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9723                    ),
9724                )
9725            }
9726            /// Build from an owned message via an encode → decode round-trip.
9727            ///
9728            /// # Errors
9729            ///
9730            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9731            /// somehow invalid (should not happen for well-formed messages).
9732            pub fn from_owned(
9733                msg: &super::super::ListFlowsByTxRequest,
9734            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9735                ::core::result::Result::Ok(
9736                    ListFlowsByTxRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9737                )
9738            }
9739            /// Borrow the full [`ListFlowsByTxRequestView`] with its lifetime tied to `&self`.
9740            #[must_use]
9741            pub fn view(&self) -> &ListFlowsByTxRequestView<'_> {
9742                self.0.reborrow()
9743            }
9744            /// Convert to the owned message type.
9745            ///
9746            /// # Errors
9747            ///
9748            /// Returns an error if re-materializing preserved unknown fields
9749            /// fails (e.g. the unknown-field limit is exceeded).
9750            pub fn to_owned_message(
9751                &self,
9752            ) -> ::core::result::Result<
9753                super::super::ListFlowsByTxRequest,
9754                ::buffa::DecodeError,
9755            > {
9756                self.0.to_owned_message()
9757            }
9758            /// The underlying bytes buffer.
9759            #[must_use]
9760            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9761                self.0.bytes()
9762            }
9763            /// Consume the handle, returning the underlying bytes buffer.
9764            #[must_use]
9765            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9766                self.0.into_bytes()
9767            }
9768            /// Chain transaction identifier to search for. Accepts a 0x-prefixed 32-byte
9769            /// EVM hash or a printable chain-native transaction id such as a Solana
9770            /// signature, Bitcoin txid, Litecoin txid, Dogecoin txid, or XRP transaction
9771            /// hash.
9772            ///
9773            /// Field 1: `tx_hash`
9774            #[must_use]
9775            pub fn tx_hash(&self) -> &'_ str {
9776                self.0.reborrow().tx_hash
9777            }
9778            /// Lookup mode that determines which transaction references are searched.
9779            ///
9780            /// Field 2: `lookup_kind`
9781            #[must_use]
9782            pub fn lookup_kind(&self) -> ::buffa::EnumValue<super::super::TxLookupKind> {
9783                self.0.reborrow().lookup_kind
9784            }
9785            /// Maximum number of matches to return. Defaults to 100 when omitted; maximum
9786            /// is 500.
9787            ///
9788            /// Field 3: `limit`
9789            #[must_use]
9790            pub fn limit(&self) -> u32 {
9791                self.0.reborrow().limit
9792            }
9793            /// Opaque keyset cursor returned by a previous response. The cursor is
9794            /// exclusive and bound to the transaction hash and lookup mode.
9795            ///
9796            /// Field 4: `page_token`
9797            #[must_use]
9798            pub fn page_token(&self) -> &'_ str {
9799                self.0.reborrow().page_token
9800            }
9801        }
9802        impl ::core::convert::From<::buffa::OwnedView<ListFlowsByTxRequestView<'static>>>
9803        for ListFlowsByTxRequestOwnedView {
9804            fn from(
9805                inner: ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9806            ) -> Self {
9807                ListFlowsByTxRequestOwnedView(inner)
9808            }
9809        }
9810        impl ::core::convert::From<ListFlowsByTxRequestOwnedView>
9811        for ::buffa::OwnedView<ListFlowsByTxRequestView<'static>> {
9812            fn from(wrapper: ListFlowsByTxRequestOwnedView) -> Self {
9813                wrapper.0
9814            }
9815        }
9816        impl ::core::convert::AsRef<
9817            ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9818        > for ListFlowsByTxRequestOwnedView {
9819            fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsByTxRequestView<'static>> {
9820                &self.0
9821            }
9822        }
9823        impl ::buffa::HasMessageView for super::super::ListFlowsByTxRequest {
9824            type View<'a> = ListFlowsByTxRequestView<'a>;
9825            type ViewHandle = ListFlowsByTxRequestOwnedView;
9826        }
9827        impl ::serde::Serialize for ListFlowsByTxRequestOwnedView {
9828            fn serialize<__S: ::serde::Serializer>(
9829                &self,
9830                __s: __S,
9831            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9832                ::serde::Serialize::serialize(&self.0, __s)
9833            }
9834        }
9835        /// ListFlowsRequest filters and paginates lifecycle flow summaries.
9836        #[derive(Clone, Debug, Default)]
9837        pub struct ListFlowsRequestView<'a> {
9838            /// Maximum number of flows to return. Defaults to 100 when omitted; maximum is
9839            /// 500.
9840            ///
9841            /// Field 1: `limit`
9842            pub limit: u32,
9843            /// Sort direction for the selected ordering timestamp.
9844            ///
9845            /// Field 2: `sort`
9846            pub sort: ::buffa::EnumValue<super::super::Sort>,
9847            /// Optional product flow kind filter. Unspecified includes all kinds.
9848            ///
9849            /// Field 3: `flow_kind`
9850            pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
9851            /// Optional lifecycle state filter. Unspecified includes all states permitted
9852            /// by the selected scope.
9853            ///
9854            /// Field 4: `flow_state`
9855            pub flow_state: ::buffa::EnumValue<super::super::FlowState>,
9856            /// Optional transaction reference filter. Matches source or latest activity
9857            /// transaction identifiers across supported chains.
9858            ///
9859            /// Field 5: `tx_ref`
9860            pub tx_ref: &'a str,
9861            /// Selects open, terminal, or all lifecycle flows.
9862            ///
9863            /// Field 6: `scope`
9864            pub scope: ::buffa::EnumValue<super::super::ListScope>,
9865            /// Optional Polyester Chain ids to include. Maximum 100 unique ids.
9866            ///
9867            /// Field 9: `polyester_chain_ids`
9868            pub polyester_chain_ids: ::buffa::RepeatedView<'a, u32>,
9869            /// Optional chain asset mapping ids to include. Maximum 100 unique ids.
9870            ///
9871            /// Field 10: `zipped_asset_ids`
9872            pub zipped_asset_ids: ::buffa::RepeatedView<'a, u32>,
9873            /// Optional unified asset ids to include. Maximum 100 unique ids.
9874            ///
9875            /// Field 11: `unified_asset_ids`
9876            pub unified_asset_ids: ::buffa::RepeatedView<'a, u32>,
9877            /// Opaque keyset cursor returned by a previous response. The cursor is
9878            /// exclusive and bound to the caller, filters, account selector, sort
9879            /// direction, and ordering timestamp.
9880            ///
9881            /// Field 12: `page_token`
9882            pub page_token: &'a str,
9883            /// Timestamp used for ordering and pagination. Defaults to last activity.
9884            ///
9885            /// Field 13: `order_by`
9886            pub order_by: ::buffa::EnumValue<super::super::ListOrderBy>,
9887            pub account_selector: ::core::option::Option<
9888                super::super::__buffa::view::oneof::list_flows_request::AccountSelector<
9889                    'a,
9890                >,
9891            >,
9892            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9893        }
9894        impl<'a> ::buffa::MessageView<'a> for ListFlowsRequestView<'a> {
9895            type Owned = super::super::ListFlowsRequest;
9896            fn decode_view(
9897                buf: &'a [u8],
9898            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9899                let __limit = ::core::cell::Cell::new(
9900                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9901                );
9902                <Self as ::buffa::MessageView>::decode_view_ctx(
9903                    buf,
9904                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9905                )
9906            }
9907            fn decode_view_with_ctx(
9908                buf: &'a [u8],
9909                ctx: ::buffa::DecodeContext<'_>,
9910            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9911                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9912            }
9913            fn merge_view_field(
9914                &mut self,
9915                tag: ::buffa::encoding::Tag,
9916                cur: &'a [u8],
9917                before_tag: &'a [u8],
9918                ctx: ::buffa::DecodeContext<'_>,
9919            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9920                let _ = ctx;
9921                #[allow(unused_variables)]
9922                let view = self;
9923                let mut cur = cur;
9924                match tag.field_number() {
9925                    1u32 => {
9926                        ::buffa::encoding::check_wire_type(
9927                            tag,
9928                            ::buffa::encoding::WireType::Varint,
9929                        )?;
9930                        view.limit = ::buffa::types::decode_uint32(&mut cur)?;
9931                    }
9932                    2u32 => {
9933                        ::buffa::encoding::check_wire_type(
9934                            tag,
9935                            ::buffa::encoding::WireType::Varint,
9936                        )?;
9937                        view.sort = ::buffa::EnumValue::from(
9938                            ::buffa::types::decode_int32(&mut cur)?,
9939                        );
9940                    }
9941                    3u32 => {
9942                        ::buffa::encoding::check_wire_type(
9943                            tag,
9944                            ::buffa::encoding::WireType::Varint,
9945                        )?;
9946                        view.flow_kind = ::buffa::EnumValue::from(
9947                            ::buffa::types::decode_int32(&mut cur)?,
9948                        );
9949                    }
9950                    4u32 => {
9951                        ::buffa::encoding::check_wire_type(
9952                            tag,
9953                            ::buffa::encoding::WireType::Varint,
9954                        )?;
9955                        view.flow_state = ::buffa::EnumValue::from(
9956                            ::buffa::types::decode_int32(&mut cur)?,
9957                        );
9958                    }
9959                    5u32 => {
9960                        ::buffa::encoding::check_wire_type(
9961                            tag,
9962                            ::buffa::encoding::WireType::LengthDelimited,
9963                        )?;
9964                        view.tx_ref = ::buffa::types::borrow_str(&mut cur)?;
9965                    }
9966                    6u32 => {
9967                        ::buffa::encoding::check_wire_type(
9968                            tag,
9969                            ::buffa::encoding::WireType::Varint,
9970                        )?;
9971                        view.scope = ::buffa::EnumValue::from(
9972                            ::buffa::types::decode_int32(&mut cur)?,
9973                        );
9974                    }
9975                    12u32 => {
9976                        ::buffa::encoding::check_wire_type(
9977                            tag,
9978                            ::buffa::encoding::WireType::LengthDelimited,
9979                        )?;
9980                        view.page_token = ::buffa::types::borrow_str(&mut cur)?;
9981                    }
9982                    13u32 => {
9983                        ::buffa::encoding::check_wire_type(
9984                            tag,
9985                            ::buffa::encoding::WireType::Varint,
9986                        )?;
9987                        view.order_by = ::buffa::EnumValue::from(
9988                            ::buffa::types::decode_int32(&mut cur)?,
9989                        );
9990                    }
9991                    9u32 => {
9992                        if tag.wire_type()
9993                            == ::buffa::encoding::WireType::LengthDelimited
9994                        {
9995                            let payload = ::buffa::types::borrow_bytes(&mut cur)?;
9996                            view.polyester_chain_ids
9997                                .reserve(::buffa::encoding::count_varints(payload));
9998                            let mut pcur: &[u8] = payload;
9999                            while !pcur.is_empty() {
10000                                view.polyester_chain_ids
10001                                    .push(::buffa::types::decode_uint32(&mut pcur)?);
10002                            }
10003                        } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10004                        {
10005                            view.polyester_chain_ids
10006                                .push(::buffa::types::decode_uint32(&mut cur)?);
10007                        } else {
10008                            return Err(
10009                                ::buffa::encoding::wire_type_mismatch(
10010                                    tag,
10011                                    ::buffa::encoding::WireType::LengthDelimited,
10012                                ),
10013                            );
10014                        }
10015                    }
10016                    10u32 => {
10017                        if tag.wire_type()
10018                            == ::buffa::encoding::WireType::LengthDelimited
10019                        {
10020                            let payload = ::buffa::types::borrow_bytes(&mut cur)?;
10021                            view.zipped_asset_ids
10022                                .reserve(::buffa::encoding::count_varints(payload));
10023                            let mut pcur: &[u8] = payload;
10024                            while !pcur.is_empty() {
10025                                view.zipped_asset_ids
10026                                    .push(::buffa::types::decode_uint32(&mut pcur)?);
10027                            }
10028                        } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10029                        {
10030                            view.zipped_asset_ids
10031                                .push(::buffa::types::decode_uint32(&mut cur)?);
10032                        } else {
10033                            return Err(
10034                                ::buffa::encoding::wire_type_mismatch(
10035                                    tag,
10036                                    ::buffa::encoding::WireType::LengthDelimited,
10037                                ),
10038                            );
10039                        }
10040                    }
10041                    11u32 => {
10042                        if tag.wire_type()
10043                            == ::buffa::encoding::WireType::LengthDelimited
10044                        {
10045                            let payload = ::buffa::types::borrow_bytes(&mut cur)?;
10046                            view.unified_asset_ids
10047                                .reserve(::buffa::encoding::count_varints(payload));
10048                            let mut pcur: &[u8] = payload;
10049                            while !pcur.is_empty() {
10050                                view.unified_asset_ids
10051                                    .push(::buffa::types::decode_uint32(&mut pcur)?);
10052                            }
10053                        } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10054                        {
10055                            view.unified_asset_ids
10056                                .push(::buffa::types::decode_uint32(&mut cur)?);
10057                        } else {
10058                            return Err(
10059                                ::buffa::encoding::wire_type_mismatch(
10060                                    tag,
10061                                    ::buffa::encoding::WireType::LengthDelimited,
10062                                ),
10063                            );
10064                        }
10065                    }
10066                    7u32 => {
10067                        ::buffa::encoding::check_wire_type(
10068                            tag,
10069                            ::buffa::encoding::WireType::Fixed64,
10070                        )?;
10071                        view.account_selector = Some(
10072                            super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10073                                ::buffa::types::decode_fixed64(&mut cur)?,
10074                            ),
10075                        );
10076                    }
10077                    8u32 => {
10078                        ::buffa::encoding::check_wire_type(
10079                            tag,
10080                            ::buffa::encoding::WireType::LengthDelimited,
10081                        )?;
10082                        view.account_selector = Some(
10083                            super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10084                                ::buffa::types::borrow_str(&mut cur)?,
10085                            ),
10086                        );
10087                    }
10088                    _ => {
10089                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10090                        let span_len = before_tag.len() - cur.len();
10091                        view.__buffa_unknown_fields
10092                            .push_record(before_tag, span_len, ctx)?;
10093                    }
10094                }
10095                ::core::result::Result::Ok(cur)
10096            }
10097            fn to_owned_message(
10098                &self,
10099            ) -> ::core::result::Result<
10100                super::super::ListFlowsRequest,
10101                ::buffa::DecodeError,
10102            > {
10103                self.to_owned_from_source(None)
10104            }
10105            #[allow(clippy::useless_conversion, clippy::needless_update)]
10106            fn to_owned_from_source(
10107                &self,
10108                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10109            ) -> ::core::result::Result<
10110                super::super::ListFlowsRequest,
10111                ::buffa::DecodeError,
10112            > {
10113                #[allow(unused_imports)]
10114                use ::buffa::alloc::string::ToString as _;
10115                let _ = __buffa_src;
10116                ::core::result::Result::Ok(super::super::ListFlowsRequest {
10117                    limit: self.limit,
10118                    sort: self.sort,
10119                    flow_kind: self.flow_kind,
10120                    flow_state: self.flow_state,
10121                    tx_ref: self.tx_ref.to_string(),
10122                    scope: self.scope,
10123                    polyester_chain_ids: self.polyester_chain_ids.to_vec(),
10124                    zipped_asset_ids: self.zipped_asset_ids.to_vec(),
10125                    unified_asset_ids: self.unified_asset_ids.to_vec(),
10126                    page_token: self.page_token.to_string(),
10127                    order_by: self.order_by,
10128                    account_selector: self
10129                        .account_selector
10130                        .as_ref()
10131                        .map(|v| match v {
10132                            super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10133                                v,
10134                            ) => {
10135                                super::super::__buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10136                                    *v,
10137                                )
10138                            }
10139                            super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10140                                v,
10141                            ) => {
10142                                super::super::__buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10143                                    v.to_string(),
10144                                )
10145                            }
10146                        }),
10147                    __buffa_unknown_fields: self
10148                        .__buffa_unknown_fields
10149                        .to_owned()?
10150                        .into(),
10151                    ..::core::default::Default::default()
10152                })
10153            }
10154        }
10155        impl<'a> ::buffa::ViewEncode<'a> for ListFlowsRequestView<'a> {
10156            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10157            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
10158                #[allow(unused_imports)]
10159                use ::buffa::Enumeration as _;
10160                let mut size = 0u32;
10161                if self.limit != 0u32 {
10162                    size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
10163                }
10164                {
10165                    let val = self.sort.to_i32();
10166                    if val != 0 {
10167                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10168                    }
10169                }
10170                {
10171                    let val = self.flow_kind.to_i32();
10172                    if val != 0 {
10173                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10174                    }
10175                }
10176                {
10177                    let val = self.flow_state.to_i32();
10178                    if val != 0 {
10179                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10180                    }
10181                }
10182                if !self.tx_ref.is_empty() {
10183                    size
10184                        += 1u32
10185                            + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
10186                }
10187                {
10188                    let val = self.scope.to_i32();
10189                    if val != 0 {
10190                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10191                    }
10192                }
10193                if let ::core::option::Option::Some(ref v) = self.account_selector {
10194                    match v {
10195                        super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10196                            _x,
10197                        ) => {
10198                            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
10199                        }
10200                        super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10201                            x,
10202                        ) => {
10203                            size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
10204                        }
10205                    }
10206                }
10207                if !self.polyester_chain_ids.is_empty() {
10208                    let payload: u32 = self
10209                        .polyester_chain_ids
10210                        .iter()
10211                        .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10212                        .sum::<u32>();
10213                    size
10214                        += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10215                            + payload;
10216                }
10217                if !self.zipped_asset_ids.is_empty() {
10218                    let payload: u32 = self
10219                        .zipped_asset_ids
10220                        .iter()
10221                        .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10222                        .sum::<u32>();
10223                    size
10224                        += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10225                            + payload;
10226                }
10227                if !self.unified_asset_ids.is_empty() {
10228                    let payload: u32 = self
10229                        .unified_asset_ids
10230                        .iter()
10231                        .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10232                        .sum::<u32>();
10233                    size
10234                        += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10235                            + payload;
10236                }
10237                if !self.page_token.is_empty() {
10238                    size
10239                        += 1u32
10240                            + ::buffa::types::string_encoded_len(&self.page_token)
10241                                as u32;
10242                }
10243                {
10244                    let val = self.order_by.to_i32();
10245                    if val != 0 {
10246                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10247                    }
10248                }
10249                size += self.__buffa_unknown_fields.encoded_len() as u32;
10250                size
10251            }
10252            #[allow(clippy::needless_borrow)]
10253            fn write_to(
10254                &self,
10255                _cache: &mut ::buffa::SizeCache,
10256                buf: &mut impl ::buffa::bytes::BufMut,
10257            ) {
10258                #[allow(unused_imports)]
10259                use ::buffa::Enumeration as _;
10260                if self.limit != 0u32 {
10261                    ::buffa::types::put_uint32_field(1u32, self.limit, buf);
10262                }
10263                {
10264                    let val = self.sort.to_i32();
10265                    if val != 0 {
10266                        ::buffa::types::put_int32_field(2u32, val, buf);
10267                    }
10268                }
10269                {
10270                    let val = self.flow_kind.to_i32();
10271                    if val != 0 {
10272                        ::buffa::types::put_int32_field(3u32, val, buf);
10273                    }
10274                }
10275                {
10276                    let val = self.flow_state.to_i32();
10277                    if val != 0 {
10278                        ::buffa::types::put_int32_field(4u32, val, buf);
10279                    }
10280                }
10281                if !self.tx_ref.is_empty() {
10282                    ::buffa::types::put_string_field(5u32, &self.tx_ref, buf);
10283                }
10284                {
10285                    let val = self.scope.to_i32();
10286                    if val != 0 {
10287                        ::buffa::types::put_int32_field(6u32, val, buf);
10288                    }
10289                }
10290                if let ::core::option::Option::Some(ref v) = self.account_selector {
10291                    match v {
10292                        super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10293                            x,
10294                        ) => {
10295                            ::buffa::types::put_fixed64_field(7u32, *x, buf);
10296                        }
10297                        super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10298                            x,
10299                        ) => {
10300                            ::buffa::types::put_string_field(8u32, x, buf);
10301                        }
10302                    }
10303                }
10304                if !self.polyester_chain_ids.is_empty() {
10305                    let payload: u32 = self
10306                        .polyester_chain_ids
10307                        .iter()
10308                        .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10309                        .sum::<u32>();
10310                    ::buffa::types::put_len_delimited_header(9u32, payload, buf);
10311                    for &v in &self.polyester_chain_ids {
10312                        ::buffa::types::encode_uint32(v, buf);
10313                    }
10314                }
10315                if !self.zipped_asset_ids.is_empty() {
10316                    let payload: u32 = self
10317                        .zipped_asset_ids
10318                        .iter()
10319                        .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10320                        .sum::<u32>();
10321                    ::buffa::types::put_len_delimited_header(10u32, payload, buf);
10322                    for &v in &self.zipped_asset_ids {
10323                        ::buffa::types::encode_uint32(v, buf);
10324                    }
10325                }
10326                if !self.unified_asset_ids.is_empty() {
10327                    let payload: u32 = self
10328                        .unified_asset_ids
10329                        .iter()
10330                        .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10331                        .sum::<u32>();
10332                    ::buffa::types::put_len_delimited_header(11u32, payload, buf);
10333                    for &v in &self.unified_asset_ids {
10334                        ::buffa::types::encode_uint32(v, buf);
10335                    }
10336                }
10337                if !self.page_token.is_empty() {
10338                    ::buffa::types::put_string_field(12u32, &self.page_token, buf);
10339                }
10340                {
10341                    let val = self.order_by.to_i32();
10342                    if val != 0 {
10343                        ::buffa::types::put_int32_field(13u32, val, buf);
10344                    }
10345                }
10346                self.__buffa_unknown_fields.write_to(buf);
10347            }
10348        }
10349        /// Serializes this view as protobuf JSON.
10350        ///
10351        /// Implicit-presence fields with default values are omitted, `required`
10352        /// fields are always emitted, explicit-presence (`optional`) fields are
10353        /// emitted only when set, bytes fields are base64-encoded, and enum
10354        /// values are their proto name strings.
10355        ///
10356        /// This impl uses `serialize_map(None)` because the number of emitted
10357        /// fields depends on default-omission rules; serializers that require
10358        /// known map lengths (e.g. `bincode`) will return a runtime error.
10359        /// Use the owned message type for those formats.
10360        impl<'__a> ::serde::Serialize for ListFlowsRequestView<'__a> {
10361            fn serialize<__S: ::serde::Serializer>(
10362                &self,
10363                __s: __S,
10364            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10365                use ::serde::ser::SerializeMap as _;
10366                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10367                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.limit) {
10368                    __map
10369                        .serialize_entry(
10370                            "limit",
10371                            &::buffa::json_helpers::ProtoJson(&self.limit),
10372                        )?;
10373                }
10374                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.sort) {
10375                    __map.serialize_entry("sort", &self.sort)?;
10376                }
10377                if !::buffa::json_helpers::skip_if::is_default_enum_value(
10378                    &self.flow_kind,
10379                ) {
10380                    __map.serialize_entry("flowKind", &self.flow_kind)?;
10381                }
10382                if !::buffa::json_helpers::skip_if::is_default_enum_value(
10383                    &self.flow_state,
10384                ) {
10385                    __map.serialize_entry("flowState", &self.flow_state)?;
10386                }
10387                if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_ref) {
10388                    __map.serialize_entry("txRef", self.tx_ref)?;
10389                }
10390                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.scope) {
10391                    __map.serialize_entry("scope", &self.scope)?;
10392                }
10393                if !self.polyester_chain_ids.is_empty() {
10394                    __map
10395                        .serialize_entry(
10396                            "polyesterChainIds",
10397                            &::buffa::json_helpers::RepeatedJson(
10398                                &self.polyester_chain_ids,
10399                            ),
10400                        )?;
10401                }
10402                if !self.zipped_asset_ids.is_empty() {
10403                    __map
10404                        .serialize_entry(
10405                            "zippedAssetIds",
10406                            &::buffa::json_helpers::RepeatedJson(&self.zipped_asset_ids),
10407                        )?;
10408                }
10409                if !self.unified_asset_ids.is_empty() {
10410                    __map
10411                        .serialize_entry(
10412                            "unifiedAssetIds",
10413                            &::buffa::json_helpers::RepeatedJson(&self.unified_asset_ids),
10414                        )?;
10415                }
10416                if !::buffa::json_helpers::skip_if::is_empty_str(self.page_token) {
10417                    __map.serialize_entry("pageToken", self.page_token)?;
10418                }
10419                if !::buffa::json_helpers::skip_if::is_default_enum_value(
10420                    &self.order_by,
10421                ) {
10422                    __map.serialize_entry("orderBy", &self.order_by)?;
10423                }
10424                if let ::core::option::Option::Some(ref __ov) = self.account_selector {
10425                    match __ov {
10426                        super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10427                            v,
10428                        ) => {
10429                            __map
10430                                .serialize_entry(
10431                                    "ownerAccountId",
10432                                    &::buffa::json_helpers::ProtoJson(v),
10433                                )?;
10434                        }
10435                        super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10436                            v,
10437                        ) => {
10438                            __map.serialize_entry("smartAccountAddress", v)?;
10439                        }
10440                    }
10441                }
10442                __map.end()
10443            }
10444        }
10445        impl<'a> ::buffa::MessageName for ListFlowsRequestView<'a> {
10446            const PACKAGE: &'static str = "chain.lifecycle.v1";
10447            const NAME: &'static str = "ListFlowsRequest";
10448            const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
10449            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
10450        }
10451        ::buffa::impl_default_view_instance!(ListFlowsRequestView);
10452        ::buffa::impl_view_reborrow!(ListFlowsRequestView);
10453        /** Self-contained, `'static` owned view of a `ListFlowsRequest` message.
10454
10455 Wraps [`::buffa::OwnedView`]`<`[`ListFlowsRequestView`]`<'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.
10456
10457 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListFlowsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10458        #[derive(Clone, Debug)]
10459        pub struct ListFlowsRequestOwnedView(
10460            ::buffa::OwnedView<ListFlowsRequestView<'static>>,
10461        );
10462        impl ListFlowsRequestOwnedView {
10463            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10464            ///
10465            /// The view borrows directly from the buffer's data; the buffer is
10466            /// retained inside the returned handle.
10467            ///
10468            /// # Errors
10469            ///
10470            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10471            /// protobuf data.
10472            pub fn decode(
10473                bytes: ::buffa::bytes::Bytes,
10474            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10475                ::core::result::Result::Ok(
10476                    ListFlowsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
10477                )
10478            }
10479            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10480            /// max message size).
10481            ///
10482            /// # Errors
10483            ///
10484            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10485            /// exceeds the configured limits.
10486            pub fn decode_with_options(
10487                bytes: ::buffa::bytes::Bytes,
10488                opts: &::buffa::DecodeOptions,
10489            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10490                ::core::result::Result::Ok(
10491                    ListFlowsRequestOwnedView(
10492                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10493                    ),
10494                )
10495            }
10496            /// Build from an owned message via an encode → decode round-trip.
10497            ///
10498            /// # Errors
10499            ///
10500            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10501            /// somehow invalid (should not happen for well-formed messages).
10502            pub fn from_owned(
10503                msg: &super::super::ListFlowsRequest,
10504            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10505                ::core::result::Result::Ok(
10506                    ListFlowsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
10507                )
10508            }
10509            /// Borrow the full [`ListFlowsRequestView`] with its lifetime tied to `&self`.
10510            #[must_use]
10511            pub fn view(&self) -> &ListFlowsRequestView<'_> {
10512                self.0.reborrow()
10513            }
10514            /// Convert to the owned message type.
10515            ///
10516            /// # Errors
10517            ///
10518            /// Returns an error if re-materializing preserved unknown fields
10519            /// fails (e.g. the unknown-field limit is exceeded).
10520            pub fn to_owned_message(
10521                &self,
10522            ) -> ::core::result::Result<
10523                super::super::ListFlowsRequest,
10524                ::buffa::DecodeError,
10525            > {
10526                self.0.to_owned_message()
10527            }
10528            /// The underlying bytes buffer.
10529            #[must_use]
10530            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10531                self.0.bytes()
10532            }
10533            /// Consume the handle, returning the underlying bytes buffer.
10534            #[must_use]
10535            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10536                self.0.into_bytes()
10537            }
10538            /// Maximum number of flows to return. Defaults to 100 when omitted; maximum is
10539            /// 500.
10540            ///
10541            /// Field 1: `limit`
10542            #[must_use]
10543            pub fn limit(&self) -> u32 {
10544                self.0.reborrow().limit
10545            }
10546            /// Sort direction for the selected ordering timestamp.
10547            ///
10548            /// Field 2: `sort`
10549            #[must_use]
10550            pub fn sort(&self) -> ::buffa::EnumValue<super::super::Sort> {
10551                self.0.reborrow().sort
10552            }
10553            /// Optional product flow kind filter. Unspecified includes all kinds.
10554            ///
10555            /// Field 3: `flow_kind`
10556            #[must_use]
10557            pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
10558                self.0.reborrow().flow_kind
10559            }
10560            /// Optional lifecycle state filter. Unspecified includes all states permitted
10561            /// by the selected scope.
10562            ///
10563            /// Field 4: `flow_state`
10564            #[must_use]
10565            pub fn flow_state(&self) -> ::buffa::EnumValue<super::super::FlowState> {
10566                self.0.reborrow().flow_state
10567            }
10568            /// Optional transaction reference filter. Matches source or latest activity
10569            /// transaction identifiers across supported chains.
10570            ///
10571            /// Field 5: `tx_ref`
10572            #[must_use]
10573            pub fn tx_ref(&self) -> &'_ str {
10574                self.0.reborrow().tx_ref
10575            }
10576            /// Selects open, terminal, or all lifecycle flows.
10577            ///
10578            /// Field 6: `scope`
10579            #[must_use]
10580            pub fn scope(&self) -> ::buffa::EnumValue<super::super::ListScope> {
10581                self.0.reborrow().scope
10582            }
10583            /// Optional Polyester Chain ids to include. Maximum 100 unique ids.
10584            ///
10585            /// Field 9: `polyester_chain_ids`
10586            #[must_use]
10587            pub fn polyester_chain_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10588                &self.0.reborrow().polyester_chain_ids
10589            }
10590            /// Optional chain asset mapping ids to include. Maximum 100 unique ids.
10591            ///
10592            /// Field 10: `zipped_asset_ids`
10593            #[must_use]
10594            pub fn zipped_asset_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10595                &self.0.reborrow().zipped_asset_ids
10596            }
10597            /// Optional unified asset ids to include. Maximum 100 unique ids.
10598            ///
10599            /// Field 11: `unified_asset_ids`
10600            #[must_use]
10601            pub fn unified_asset_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10602                &self.0.reborrow().unified_asset_ids
10603            }
10604            /// Opaque keyset cursor returned by a previous response. The cursor is
10605            /// exclusive and bound to the caller, filters, account selector, sort
10606            /// direction, and ordering timestamp.
10607            ///
10608            /// Field 12: `page_token`
10609            #[must_use]
10610            pub fn page_token(&self) -> &'_ str {
10611                self.0.reborrow().page_token
10612            }
10613            /// Timestamp used for ordering and pagination. Defaults to last activity.
10614            ///
10615            /// Field 13: `order_by`
10616            #[must_use]
10617            pub fn order_by(&self) -> ::buffa::EnumValue<super::super::ListOrderBy> {
10618                self.0.reborrow().order_by
10619            }
10620            /// Oneof `account_selector`.
10621            #[must_use]
10622            pub fn account_selector(
10623                &self,
10624            ) -> ::core::option::Option<
10625                &super::super::__buffa::view::oneof::list_flows_request::AccountSelector<
10626                    '_,
10627                >,
10628            > {
10629                self.0.reborrow().account_selector.as_ref()
10630            }
10631        }
10632        impl ::core::convert::From<::buffa::OwnedView<ListFlowsRequestView<'static>>>
10633        for ListFlowsRequestOwnedView {
10634            fn from(inner: ::buffa::OwnedView<ListFlowsRequestView<'static>>) -> Self {
10635                ListFlowsRequestOwnedView(inner)
10636            }
10637        }
10638        impl ::core::convert::From<ListFlowsRequestOwnedView>
10639        for ::buffa::OwnedView<ListFlowsRequestView<'static>> {
10640            fn from(wrapper: ListFlowsRequestOwnedView) -> Self {
10641                wrapper.0
10642            }
10643        }
10644        impl ::core::convert::AsRef<::buffa::OwnedView<ListFlowsRequestView<'static>>>
10645        for ListFlowsRequestOwnedView {
10646            fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsRequestView<'static>> {
10647                &self.0
10648            }
10649        }
10650        impl ::buffa::HasMessageView for super::super::ListFlowsRequest {
10651            type View<'a> = ListFlowsRequestView<'a>;
10652            type ViewHandle = ListFlowsRequestOwnedView;
10653        }
10654        impl ::serde::Serialize for ListFlowsRequestOwnedView {
10655            fn serialize<__S: ::serde::Serializer>(
10656                &self,
10657                __s: __S,
10658            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10659                ::serde::Serialize::serialize(&self.0, __s)
10660            }
10661        }
10662        /// ListFlowsResponse returns one page of flow summaries.
10663        #[derive(Clone, Debug, Default)]
10664        pub struct ListFlowsResponseView<'a> {
10665            /// Flow summaries ordered by the selected timestamp, then public flow id. Sort
10666            /// direction is controlled by the request `sort` field.
10667            ///
10668            /// Field 1: `flows`
10669            pub flows: ::buffa::RepeatedView<
10670                'a,
10671                super::super::__buffa::view::FlowSummaryViewView<'a>,
10672            >,
10673            /// Opaque cursor for the next page. Empty when no more results exist.
10674            ///
10675            /// Field 2: `next_page_token`
10676            pub next_page_token: &'a str,
10677            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10678        }
10679        impl<'a> ::buffa::MessageView<'a> for ListFlowsResponseView<'a> {
10680            type Owned = super::super::ListFlowsResponse;
10681            fn decode_view(
10682                buf: &'a [u8],
10683            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10684                let __limit = ::core::cell::Cell::new(
10685                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
10686                );
10687                <Self as ::buffa::MessageView>::decode_view_ctx(
10688                    buf,
10689                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
10690                )
10691            }
10692            fn decode_view_with_ctx(
10693                buf: &'a [u8],
10694                ctx: ::buffa::DecodeContext<'_>,
10695            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10696                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
10697            }
10698            fn merge_view_field(
10699                &mut self,
10700                tag: ::buffa::encoding::Tag,
10701                cur: &'a [u8],
10702                before_tag: &'a [u8],
10703                ctx: ::buffa::DecodeContext<'_>,
10704            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
10705                let _ = ctx;
10706                #[allow(unused_variables)]
10707                let view = self;
10708                let mut cur = cur;
10709                match tag.field_number() {
10710                    2u32 => {
10711                        ::buffa::encoding::check_wire_type(
10712                            tag,
10713                            ::buffa::encoding::WireType::LengthDelimited,
10714                        )?;
10715                        view.next_page_token = ::buffa::types::borrow_str(&mut cur)?;
10716                    }
10717                    1u32 => {
10718                        ::buffa::encoding::check_wire_type(
10719                            tag,
10720                            ::buffa::encoding::WireType::LengthDelimited,
10721                        )?;
10722                        let __sub_ctx = ctx.descend()?;
10723                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10724                        view.flows
10725                            .push(
10726                                <super::super::__buffa::view::FlowSummaryViewView as ::buffa::MessageView>::decode_view_ctx(
10727                                    sub,
10728                                    __sub_ctx,
10729                                )?,
10730                            );
10731                    }
10732                    _ => {
10733                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10734                        let span_len = before_tag.len() - cur.len();
10735                        view.__buffa_unknown_fields
10736                            .push_record(before_tag, span_len, ctx)?;
10737                    }
10738                }
10739                ::core::result::Result::Ok(cur)
10740            }
10741            fn to_owned_message(
10742                &self,
10743            ) -> ::core::result::Result<
10744                super::super::ListFlowsResponse,
10745                ::buffa::DecodeError,
10746            > {
10747                self.to_owned_from_source(None)
10748            }
10749            #[allow(clippy::useless_conversion, clippy::needless_update)]
10750            fn to_owned_from_source(
10751                &self,
10752                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10753            ) -> ::core::result::Result<
10754                super::super::ListFlowsResponse,
10755                ::buffa::DecodeError,
10756            > {
10757                #[allow(unused_imports)]
10758                use ::buffa::alloc::string::ToString as _;
10759                let _ = __buffa_src;
10760                ::core::result::Result::Ok(super::super::ListFlowsResponse {
10761                    flows: self
10762                        .flows
10763                        .iter()
10764                        .map(|v| v.to_owned_from_source(__buffa_src))
10765                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
10766                    next_page_token: self.next_page_token.to_string(),
10767                    __buffa_unknown_fields: self
10768                        .__buffa_unknown_fields
10769                        .to_owned()?
10770                        .into(),
10771                    ..::core::default::Default::default()
10772                })
10773            }
10774        }
10775        impl<'a> ::buffa::ViewEncode<'a> for ListFlowsResponseView<'a> {
10776            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10777            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10778                #[allow(unused_imports)]
10779                use ::buffa::Enumeration as _;
10780                let mut size = 0u32;
10781                for v in &self.flows {
10782                    let __slot = __cache.reserve();
10783                    let inner_size = v.compute_size(__cache);
10784                    __cache.set(__slot, inner_size);
10785                    size
10786                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10787                            + inner_size;
10788                }
10789                if !self.next_page_token.is_empty() {
10790                    size
10791                        += 1u32
10792                            + ::buffa::types::string_encoded_len(&self.next_page_token)
10793                                as u32;
10794                }
10795                size += self.__buffa_unknown_fields.encoded_len() as u32;
10796                size
10797            }
10798            #[allow(clippy::needless_borrow)]
10799            fn write_to(
10800                &self,
10801                __cache: &mut ::buffa::SizeCache,
10802                buf: &mut impl ::buffa::bytes::BufMut,
10803            ) {
10804                #[allow(unused_imports)]
10805                use ::buffa::Enumeration as _;
10806                for v in &self.flows {
10807                    ::buffa::types::put_len_delimited_header(
10808                        1u32,
10809                        __cache.consume_next(),
10810                        buf,
10811                    );
10812                    v.write_to(__cache, buf);
10813                }
10814                if !self.next_page_token.is_empty() {
10815                    ::buffa::types::put_string_field(2u32, &self.next_page_token, buf);
10816                }
10817                self.__buffa_unknown_fields.write_to(buf);
10818            }
10819        }
10820        /// Serializes this view as protobuf JSON.
10821        ///
10822        /// Implicit-presence fields with default values are omitted, `required`
10823        /// fields are always emitted, explicit-presence (`optional`) fields are
10824        /// emitted only when set, bytes fields are base64-encoded, and enum
10825        /// values are their proto name strings.
10826        ///
10827        /// This impl uses `serialize_map(None)` because the number of emitted
10828        /// fields depends on default-omission rules; serializers that require
10829        /// known map lengths (e.g. `bincode`) will return a runtime error.
10830        /// Use the owned message type for those formats.
10831        impl<'__a> ::serde::Serialize for ListFlowsResponseView<'__a> {
10832            fn serialize<__S: ::serde::Serializer>(
10833                &self,
10834                __s: __S,
10835            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10836                use ::serde::ser::SerializeMap as _;
10837                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10838                if !self.flows.is_empty() {
10839                    __map.serialize_entry("flows", &*self.flows)?;
10840                }
10841                if !::buffa::json_helpers::skip_if::is_empty_str(self.next_page_token) {
10842                    __map.serialize_entry("nextPageToken", self.next_page_token)?;
10843                }
10844                __map.end()
10845            }
10846        }
10847        impl<'a> ::buffa::MessageName for ListFlowsResponseView<'a> {
10848            const PACKAGE: &'static str = "chain.lifecycle.v1";
10849            const NAME: &'static str = "ListFlowsResponse";
10850            const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
10851            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
10852        }
10853        ::buffa::impl_default_view_instance!(ListFlowsResponseView);
10854        ::buffa::impl_view_reborrow!(ListFlowsResponseView);
10855        /** Self-contained, `'static` owned view of a `ListFlowsResponse` message.
10856
10857 Wraps [`::buffa::OwnedView`]`<`[`ListFlowsResponseView`]`<'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.
10858
10859 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListFlowsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10860        #[derive(Clone, Debug)]
10861        pub struct ListFlowsResponseOwnedView(
10862            ::buffa::OwnedView<ListFlowsResponseView<'static>>,
10863        );
10864        impl ListFlowsResponseOwnedView {
10865            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10866            ///
10867            /// The view borrows directly from the buffer's data; the buffer is
10868            /// retained inside the returned handle.
10869            ///
10870            /// # Errors
10871            ///
10872            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10873            /// protobuf data.
10874            pub fn decode(
10875                bytes: ::buffa::bytes::Bytes,
10876            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10877                ::core::result::Result::Ok(
10878                    ListFlowsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
10879                )
10880            }
10881            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10882            /// max message size).
10883            ///
10884            /// # Errors
10885            ///
10886            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10887            /// exceeds the configured limits.
10888            pub fn decode_with_options(
10889                bytes: ::buffa::bytes::Bytes,
10890                opts: &::buffa::DecodeOptions,
10891            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10892                ::core::result::Result::Ok(
10893                    ListFlowsResponseOwnedView(
10894                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10895                    ),
10896                )
10897            }
10898            /// Build from an owned message via an encode → decode round-trip.
10899            ///
10900            /// # Errors
10901            ///
10902            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10903            /// somehow invalid (should not happen for well-formed messages).
10904            pub fn from_owned(
10905                msg: &super::super::ListFlowsResponse,
10906            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10907                ::core::result::Result::Ok(
10908                    ListFlowsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
10909                )
10910            }
10911            /// Borrow the full [`ListFlowsResponseView`] with its lifetime tied to `&self`.
10912            #[must_use]
10913            pub fn view(&self) -> &ListFlowsResponseView<'_> {
10914                self.0.reborrow()
10915            }
10916            /// Convert to the owned message type.
10917            ///
10918            /// # Errors
10919            ///
10920            /// Returns an error if re-materializing preserved unknown fields
10921            /// fails (e.g. the unknown-field limit is exceeded).
10922            pub fn to_owned_message(
10923                &self,
10924            ) -> ::core::result::Result<
10925                super::super::ListFlowsResponse,
10926                ::buffa::DecodeError,
10927            > {
10928                self.0.to_owned_message()
10929            }
10930            /// The underlying bytes buffer.
10931            #[must_use]
10932            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10933                self.0.bytes()
10934            }
10935            /// Consume the handle, returning the underlying bytes buffer.
10936            #[must_use]
10937            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10938                self.0.into_bytes()
10939            }
10940            /// Flow summaries ordered by the selected timestamp, then public flow id. Sort
10941            /// direction is controlled by the request `sort` field.
10942            ///
10943            /// Field 1: `flows`
10944            #[must_use]
10945            pub fn flows(
10946                &self,
10947            ) -> &::buffa::RepeatedView<
10948                '_,
10949                super::super::__buffa::view::FlowSummaryViewView<'_>,
10950            > {
10951                &self.0.reborrow().flows
10952            }
10953            /// Opaque cursor for the next page. Empty when no more results exist.
10954            ///
10955            /// Field 2: `next_page_token`
10956            #[must_use]
10957            pub fn next_page_token(&self) -> &'_ str {
10958                self.0.reborrow().next_page_token
10959            }
10960        }
10961        impl ::core::convert::From<::buffa::OwnedView<ListFlowsResponseView<'static>>>
10962        for ListFlowsResponseOwnedView {
10963            fn from(inner: ::buffa::OwnedView<ListFlowsResponseView<'static>>) -> Self {
10964                ListFlowsResponseOwnedView(inner)
10965            }
10966        }
10967        impl ::core::convert::From<ListFlowsResponseOwnedView>
10968        for ::buffa::OwnedView<ListFlowsResponseView<'static>> {
10969            fn from(wrapper: ListFlowsResponseOwnedView) -> Self {
10970                wrapper.0
10971            }
10972        }
10973        impl ::core::convert::AsRef<::buffa::OwnedView<ListFlowsResponseView<'static>>>
10974        for ListFlowsResponseOwnedView {
10975            fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsResponseView<'static>> {
10976                &self.0
10977            }
10978        }
10979        impl ::buffa::HasMessageView for super::super::ListFlowsResponse {
10980            type View<'a> = ListFlowsResponseView<'a>;
10981            type ViewHandle = ListFlowsResponseOwnedView;
10982        }
10983        impl ::serde::Serialize for ListFlowsResponseOwnedView {
10984            fn serialize<__S: ::serde::Serializer>(
10985                &self,
10986                __s: __S,
10987            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10988                ::serde::Serialize::serialize(&self.0, __s)
10989            }
10990        }
10991        /// FlowTxMatchView is one lifecycle flow matched by a transaction-hash search.
10992        #[derive(Clone, Debug, Default)]
10993        pub struct FlowTxMatchViewView<'a> {
10994            /// Public, URL-safe lifecycle identifier for display, URLs, and user search.
10995            ///
10996            /// Field 1: `flow_id`
10997            pub flow_id: &'a str,
10998            /// Product flow family.
10999            ///
11000            /// Field 3: `flow_kind`
11001            pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
11002            /// First observed source transaction hash for the flow when known.
11003            ///
11004            /// Field 4: `source_tx_hash`
11005            pub source_tx_hash: &'a str,
11006            /// Latest transaction reference associated with the current visible state.
11007            ///
11008            /// Field 5: `latest_tx_ref`
11009            pub latest_tx_ref: &'a str,
11010            /// Stable occurrence discriminator within a transaction. For source-chain
11011            /// deposits this is the batched leg index; for on-chain facts it is the log or
11012            /// equivalent per-tx occurrence index when available.
11013            ///
11014            /// Field 6: `tx_occurrence_index`
11015            pub tx_occurrence_index: u64,
11016            /// Product domain where the overall flow starts.
11017            ///
11018            /// Field 7: `source_domain`
11019            pub source_domain: ::buffa::EnumValue<super::super::FlowDomain>,
11020            /// Product domain where the overall flow ends or currently settles.
11021            ///
11022            /// Field 8: `destination_domain`
11023            pub destination_domain: ::buffa::EnumValue<super::super::FlowDomain>,
11024            /// Current user-facing progress step for this flow.
11025            ///
11026            /// Field 9: `current_step`
11027            pub current_step: ::buffa::EnumValue<super::super::FlowStep>,
11028            /// True when this flow is still progressing.
11029            ///
11030            /// Field 10: `is_open`
11031            pub is_open: bool,
11032            /// True when this flow reached a final state.
11033            ///
11034            /// Field 11: `is_terminal`
11035            pub is_terminal: bool,
11036            /// Asset identifiers involved in this flow.
11037            ///
11038            /// Field 12: `asset_ids`
11039            pub asset_ids: ::buffa::MessageFieldView<
11040                super::super::__buffa::view::AssetIdsView<'a>,
11041            >,
11042            /// Polyester Chain id associated with this flow.
11043            ///
11044            /// Field 13: `polyester_chain_id`
11045            pub polyester_chain_id: u32,
11046            /// Gross principal amount for this flow in 18-decimal unified asset units.
11047            ///
11048            /// Field 14: `amount_e18`
11049            pub amount_e18: ::buffa::MessageFieldView<
11050                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
11051                    'a,
11052                >,
11053            >,
11054            /// Source address to show for this flow.
11055            ///
11056            /// Field 15: `source_address`
11057            pub source_address: &'a str,
11058            /// Destination address to show for this flow.
11059            ///
11060            /// Field 16: `destination_address`
11061            pub destination_address: &'a str,
11062            /// Product-facing reason for failed, dropped, or otherwise notable flows.
11063            ///
11064            /// Field 17: `reason_code`
11065            pub reason_code: ::buffa::EnumValue<super::super::FlowReason>,
11066            /// Timestamp used for list ordering in milliseconds since epoch (UTC).
11067            ///
11068            /// Field 18: `last_activity_at_unix_ms`
11069            pub last_activity_at_unix_ms: u64,
11070            /// Public account or subaccount identifier that owns this flow.
11071            ///
11072            /// Field 19: `owner_account_id`
11073            pub owner_account_id: u64,
11074            /// Smart account address on Polyester Chain when known.
11075            ///
11076            /// Field 20: `smart_account_address`
11077            pub smart_account_address: &'a str,
11078            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11079        }
11080        impl<'a> ::buffa::MessageView<'a> for FlowTxMatchViewView<'a> {
11081            type Owned = super::super::FlowTxMatchView;
11082            fn decode_view(
11083                buf: &'a [u8],
11084            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11085                let __limit = ::core::cell::Cell::new(
11086                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
11087                );
11088                <Self as ::buffa::MessageView>::decode_view_ctx(
11089                    buf,
11090                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
11091                )
11092            }
11093            fn decode_view_with_ctx(
11094                buf: &'a [u8],
11095                ctx: ::buffa::DecodeContext<'_>,
11096            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11097                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
11098            }
11099            fn merge_view_field(
11100                &mut self,
11101                tag: ::buffa::encoding::Tag,
11102                cur: &'a [u8],
11103                before_tag: &'a [u8],
11104                ctx: ::buffa::DecodeContext<'_>,
11105            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
11106                let _ = ctx;
11107                #[allow(unused_variables)]
11108                let view = self;
11109                let mut cur = cur;
11110                match tag.field_number() {
11111                    1u32 => {
11112                        ::buffa::encoding::check_wire_type(
11113                            tag,
11114                            ::buffa::encoding::WireType::LengthDelimited,
11115                        )?;
11116                        view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
11117                    }
11118                    3u32 => {
11119                        ::buffa::encoding::check_wire_type(
11120                            tag,
11121                            ::buffa::encoding::WireType::Varint,
11122                        )?;
11123                        view.flow_kind = ::buffa::EnumValue::from(
11124                            ::buffa::types::decode_int32(&mut cur)?,
11125                        );
11126                    }
11127                    4u32 => {
11128                        ::buffa::encoding::check_wire_type(
11129                            tag,
11130                            ::buffa::encoding::WireType::LengthDelimited,
11131                        )?;
11132                        view.source_tx_hash = ::buffa::types::borrow_str(&mut cur)?;
11133                    }
11134                    5u32 => {
11135                        ::buffa::encoding::check_wire_type(
11136                            tag,
11137                            ::buffa::encoding::WireType::LengthDelimited,
11138                        )?;
11139                        view.latest_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
11140                    }
11141                    6u32 => {
11142                        ::buffa::encoding::check_wire_type(
11143                            tag,
11144                            ::buffa::encoding::WireType::Varint,
11145                        )?;
11146                        view.tx_occurrence_index = ::buffa::types::decode_uint64(
11147                            &mut cur,
11148                        )?;
11149                    }
11150                    7u32 => {
11151                        ::buffa::encoding::check_wire_type(
11152                            tag,
11153                            ::buffa::encoding::WireType::Varint,
11154                        )?;
11155                        view.source_domain = ::buffa::EnumValue::from(
11156                            ::buffa::types::decode_int32(&mut cur)?,
11157                        );
11158                    }
11159                    8u32 => {
11160                        ::buffa::encoding::check_wire_type(
11161                            tag,
11162                            ::buffa::encoding::WireType::Varint,
11163                        )?;
11164                        view.destination_domain = ::buffa::EnumValue::from(
11165                            ::buffa::types::decode_int32(&mut cur)?,
11166                        );
11167                    }
11168                    9u32 => {
11169                        ::buffa::encoding::check_wire_type(
11170                            tag,
11171                            ::buffa::encoding::WireType::Varint,
11172                        )?;
11173                        view.current_step = ::buffa::EnumValue::from(
11174                            ::buffa::types::decode_int32(&mut cur)?,
11175                        );
11176                    }
11177                    10u32 => {
11178                        ::buffa::encoding::check_wire_type(
11179                            tag,
11180                            ::buffa::encoding::WireType::Varint,
11181                        )?;
11182                        view.is_open = ::buffa::types::decode_bool(&mut cur)?;
11183                    }
11184                    11u32 => {
11185                        ::buffa::encoding::check_wire_type(
11186                            tag,
11187                            ::buffa::encoding::WireType::Varint,
11188                        )?;
11189                        view.is_terminal = ::buffa::types::decode_bool(&mut cur)?;
11190                    }
11191                    12u32 => {
11192                        ::buffa::encoding::check_wire_type(
11193                            tag,
11194                            ::buffa::encoding::WireType::LengthDelimited,
11195                        )?;
11196                        let __sub_ctx = ctx.descend()?;
11197                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11198                        match view.asset_ids.as_mut() {
11199                            Some(existing) => {
11200                                ::buffa::MessageView::merge_into_view(
11201                                    existing,
11202                                    sub,
11203                                    __sub_ctx,
11204                                )?
11205                            }
11206                            None => {
11207                                view.asset_ids = ::buffa::MessageFieldView::set(
11208                                    <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
11209                                        sub,
11210                                        __sub_ctx,
11211                                    )?,
11212                                );
11213                            }
11214                        }
11215                    }
11216                    13u32 => {
11217                        ::buffa::encoding::check_wire_type(
11218                            tag,
11219                            ::buffa::encoding::WireType::Varint,
11220                        )?;
11221                        view.polyester_chain_id = ::buffa::types::decode_uint32(
11222                            &mut cur,
11223                        )?;
11224                    }
11225                    14u32 => {
11226                        ::buffa::encoding::check_wire_type(
11227                            tag,
11228                            ::buffa::encoding::WireType::LengthDelimited,
11229                        )?;
11230                        let __sub_ctx = ctx.descend()?;
11231                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11232                        match view.amount_e18.as_mut() {
11233                            Some(existing) => {
11234                                ::buffa::MessageView::merge_into_view(
11235                                    existing,
11236                                    sub,
11237                                    __sub_ctx,
11238                                )?
11239                            }
11240                            None => {
11241                                view.amount_e18 = ::buffa::MessageFieldView::set(
11242                                    <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
11243                                        sub,
11244                                        __sub_ctx,
11245                                    )?,
11246                                );
11247                            }
11248                        }
11249                    }
11250                    15u32 => {
11251                        ::buffa::encoding::check_wire_type(
11252                            tag,
11253                            ::buffa::encoding::WireType::LengthDelimited,
11254                        )?;
11255                        view.source_address = ::buffa::types::borrow_str(&mut cur)?;
11256                    }
11257                    16u32 => {
11258                        ::buffa::encoding::check_wire_type(
11259                            tag,
11260                            ::buffa::encoding::WireType::LengthDelimited,
11261                        )?;
11262                        view.destination_address = ::buffa::types::borrow_str(&mut cur)?;
11263                    }
11264                    17u32 => {
11265                        ::buffa::encoding::check_wire_type(
11266                            tag,
11267                            ::buffa::encoding::WireType::Varint,
11268                        )?;
11269                        view.reason_code = ::buffa::EnumValue::from(
11270                            ::buffa::types::decode_int32(&mut cur)?,
11271                        );
11272                    }
11273                    18u32 => {
11274                        ::buffa::encoding::check_wire_type(
11275                            tag,
11276                            ::buffa::encoding::WireType::Varint,
11277                        )?;
11278                        view.last_activity_at_unix_ms = ::buffa::types::decode_uint64(
11279                            &mut cur,
11280                        )?;
11281                    }
11282                    19u32 => {
11283                        ::buffa::encoding::check_wire_type(
11284                            tag,
11285                            ::buffa::encoding::WireType::Fixed64,
11286                        )?;
11287                        view.owner_account_id = ::buffa::types::decode_fixed64(
11288                            &mut cur,
11289                        )?;
11290                    }
11291                    20u32 => {
11292                        ::buffa::encoding::check_wire_type(
11293                            tag,
11294                            ::buffa::encoding::WireType::LengthDelimited,
11295                        )?;
11296                        view.smart_account_address = ::buffa::types::borrow_str(
11297                            &mut cur,
11298                        )?;
11299                    }
11300                    _ => {
11301                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
11302                        let span_len = before_tag.len() - cur.len();
11303                        view.__buffa_unknown_fields
11304                            .push_record(before_tag, span_len, ctx)?;
11305                    }
11306                }
11307                ::core::result::Result::Ok(cur)
11308            }
11309            fn to_owned_message(
11310                &self,
11311            ) -> ::core::result::Result<
11312                super::super::FlowTxMatchView,
11313                ::buffa::DecodeError,
11314            > {
11315                self.to_owned_from_source(None)
11316            }
11317            #[allow(clippy::useless_conversion, clippy::needless_update)]
11318            fn to_owned_from_source(
11319                &self,
11320                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
11321            ) -> ::core::result::Result<
11322                super::super::FlowTxMatchView,
11323                ::buffa::DecodeError,
11324            > {
11325                #[allow(unused_imports)]
11326                use ::buffa::alloc::string::ToString as _;
11327                let _ = __buffa_src;
11328                ::core::result::Result::Ok(super::super::FlowTxMatchView {
11329                    flow_id: self.flow_id.to_string(),
11330                    flow_kind: self.flow_kind,
11331                    source_tx_hash: self.source_tx_hash.to_string(),
11332                    latest_tx_ref: self.latest_tx_ref.to_string(),
11333                    tx_occurrence_index: self.tx_occurrence_index,
11334                    source_domain: self.source_domain,
11335                    destination_domain: self.destination_domain,
11336                    current_step: self.current_step,
11337                    is_open: self.is_open,
11338                    is_terminal: self.is_terminal,
11339                    asset_ids: match self.asset_ids.as_option() {
11340                        Some(v) => {
11341                            ::buffa::MessageField::<
11342                                super::super::AssetIds,
11343                            >::some(v.to_owned_from_source(__buffa_src)?)
11344                        }
11345                        None => ::buffa::MessageField::none(),
11346                    },
11347                    polyester_chain_id: self.polyester_chain_id,
11348                    amount_e18: match self.amount_e18.as_option() {
11349                        Some(v) => {
11350                            ::buffa::MessageField::<
11351                                super::super::super::super::super::polyester::r#type::v1::U128,
11352                            >::some(v.to_owned_from_source(__buffa_src)?)
11353                        }
11354                        None => ::buffa::MessageField::none(),
11355                    },
11356                    source_address: self.source_address.to_string(),
11357                    destination_address: self.destination_address.to_string(),
11358                    reason_code: self.reason_code,
11359                    last_activity_at_unix_ms: self.last_activity_at_unix_ms,
11360                    owner_account_id: self.owner_account_id,
11361                    smart_account_address: self.smart_account_address.to_string(),
11362                    __buffa_unknown_fields: self
11363                        .__buffa_unknown_fields
11364                        .to_owned()?
11365                        .into(),
11366                    ..::core::default::Default::default()
11367                })
11368            }
11369        }
11370        impl<'a> ::buffa::ViewEncode<'a> for FlowTxMatchViewView<'a> {
11371            #[allow(clippy::needless_borrow, clippy::let_and_return)]
11372            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
11373                #[allow(unused_imports)]
11374                use ::buffa::Enumeration as _;
11375                let mut size = 0u32;
11376                if !self.flow_id.is_empty() {
11377                    size
11378                        += 1u32
11379                            + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
11380                }
11381                {
11382                    let val = self.flow_kind.to_i32();
11383                    if val != 0 {
11384                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11385                    }
11386                }
11387                if !self.source_tx_hash.is_empty() {
11388                    size
11389                        += 1u32
11390                            + ::buffa::types::string_encoded_len(&self.source_tx_hash)
11391                                as u32;
11392                }
11393                if !self.latest_tx_ref.is_empty() {
11394                    size
11395                        += 1u32
11396                            + ::buffa::types::string_encoded_len(&self.latest_tx_ref)
11397                                as u32;
11398                }
11399                if self.tx_occurrence_index != 0u64 {
11400                    size
11401                        += 1u32
11402                            + ::buffa::types::uint64_encoded_len(
11403                                self.tx_occurrence_index,
11404                            ) as u32;
11405                }
11406                {
11407                    let val = self.source_domain.to_i32();
11408                    if val != 0 {
11409                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11410                    }
11411                }
11412                {
11413                    let val = self.destination_domain.to_i32();
11414                    if val != 0 {
11415                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11416                    }
11417                }
11418                {
11419                    let val = self.current_step.to_i32();
11420                    if val != 0 {
11421                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11422                    }
11423                }
11424                if self.is_open {
11425                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
11426                }
11427                if self.is_terminal {
11428                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
11429                }
11430                if self.asset_ids.is_set() {
11431                    let __slot = __cache.reserve();
11432                    let inner_size = self.asset_ids.compute_size(__cache);
11433                    __cache.set(__slot, inner_size);
11434                    size
11435                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11436                            + inner_size;
11437                }
11438                if self.polyester_chain_id != 0u32 {
11439                    size
11440                        += 1u32
11441                            + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
11442                                as u32;
11443                }
11444                if self.amount_e18.is_set() {
11445                    let __slot = __cache.reserve();
11446                    let inner_size = self.amount_e18.compute_size(__cache);
11447                    __cache.set(__slot, inner_size);
11448                    size
11449                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11450                            + inner_size;
11451                }
11452                if !self.source_address.is_empty() {
11453                    size
11454                        += 1u32
11455                            + ::buffa::types::string_encoded_len(&self.source_address)
11456                                as u32;
11457                }
11458                if !self.destination_address.is_empty() {
11459                    size
11460                        += 2u32
11461                            + ::buffa::types::string_encoded_len(
11462                                &self.destination_address,
11463                            ) as u32;
11464                }
11465                {
11466                    let val = self.reason_code.to_i32();
11467                    if val != 0 {
11468                        size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
11469                    }
11470                }
11471                if self.last_activity_at_unix_ms != 0u64 {
11472                    size
11473                        += 2u32
11474                            + ::buffa::types::uint64_encoded_len(
11475                                self.last_activity_at_unix_ms,
11476                            ) as u32;
11477                }
11478                if self.owner_account_id != 0u64 {
11479                    size += 2u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
11480                }
11481                if !self.smart_account_address.is_empty() {
11482                    size
11483                        += 2u32
11484                            + ::buffa::types::string_encoded_len(
11485                                &self.smart_account_address,
11486                            ) as u32;
11487                }
11488                size += self.__buffa_unknown_fields.encoded_len() as u32;
11489                size
11490            }
11491            #[allow(clippy::needless_borrow)]
11492            fn write_to(
11493                &self,
11494                __cache: &mut ::buffa::SizeCache,
11495                buf: &mut impl ::buffa::bytes::BufMut,
11496            ) {
11497                #[allow(unused_imports)]
11498                use ::buffa::Enumeration as _;
11499                if !self.flow_id.is_empty() {
11500                    ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
11501                }
11502                {
11503                    let val = self.flow_kind.to_i32();
11504                    if val != 0 {
11505                        ::buffa::types::put_int32_field(3u32, val, buf);
11506                    }
11507                }
11508                if !self.source_tx_hash.is_empty() {
11509                    ::buffa::types::put_string_field(4u32, &self.source_tx_hash, buf);
11510                }
11511                if !self.latest_tx_ref.is_empty() {
11512                    ::buffa::types::put_string_field(5u32, &self.latest_tx_ref, buf);
11513                }
11514                if self.tx_occurrence_index != 0u64 {
11515                    ::buffa::types::put_uint64_field(
11516                        6u32,
11517                        self.tx_occurrence_index,
11518                        buf,
11519                    );
11520                }
11521                {
11522                    let val = self.source_domain.to_i32();
11523                    if val != 0 {
11524                        ::buffa::types::put_int32_field(7u32, val, buf);
11525                    }
11526                }
11527                {
11528                    let val = self.destination_domain.to_i32();
11529                    if val != 0 {
11530                        ::buffa::types::put_int32_field(8u32, val, buf);
11531                    }
11532                }
11533                {
11534                    let val = self.current_step.to_i32();
11535                    if val != 0 {
11536                        ::buffa::types::put_int32_field(9u32, val, buf);
11537                    }
11538                }
11539                if self.is_open {
11540                    ::buffa::types::put_bool_field(10u32, self.is_open, buf);
11541                }
11542                if self.is_terminal {
11543                    ::buffa::types::put_bool_field(11u32, self.is_terminal, buf);
11544                }
11545                if self.asset_ids.is_set() {
11546                    ::buffa::types::put_len_delimited_header(
11547                        12u32,
11548                        __cache.consume_next(),
11549                        buf,
11550                    );
11551                    self.asset_ids.write_to(__cache, buf);
11552                }
11553                if self.polyester_chain_id != 0u32 {
11554                    ::buffa::types::put_uint32_field(
11555                        13u32,
11556                        self.polyester_chain_id,
11557                        buf,
11558                    );
11559                }
11560                if self.amount_e18.is_set() {
11561                    ::buffa::types::put_len_delimited_header(
11562                        14u32,
11563                        __cache.consume_next(),
11564                        buf,
11565                    );
11566                    self.amount_e18.write_to(__cache, buf);
11567                }
11568                if !self.source_address.is_empty() {
11569                    ::buffa::types::put_string_field(15u32, &self.source_address, buf);
11570                }
11571                if !self.destination_address.is_empty() {
11572                    ::buffa::types::put_string_field(
11573                        16u32,
11574                        &self.destination_address,
11575                        buf,
11576                    );
11577                }
11578                {
11579                    let val = self.reason_code.to_i32();
11580                    if val != 0 {
11581                        ::buffa::types::put_int32_field(17u32, val, buf);
11582                    }
11583                }
11584                if self.last_activity_at_unix_ms != 0u64 {
11585                    ::buffa::types::put_uint64_field(
11586                        18u32,
11587                        self.last_activity_at_unix_ms,
11588                        buf,
11589                    );
11590                }
11591                if self.owner_account_id != 0u64 {
11592                    ::buffa::types::put_fixed64_field(19u32, self.owner_account_id, buf);
11593                }
11594                if !self.smart_account_address.is_empty() {
11595                    ::buffa::types::put_string_field(
11596                        20u32,
11597                        &self.smart_account_address,
11598                        buf,
11599                    );
11600                }
11601                self.__buffa_unknown_fields.write_to(buf);
11602            }
11603        }
11604        /// Serializes this view as protobuf JSON.
11605        ///
11606        /// Implicit-presence fields with default values are omitted, `required`
11607        /// fields are always emitted, explicit-presence (`optional`) fields are
11608        /// emitted only when set, bytes fields are base64-encoded, and enum
11609        /// values are their proto name strings.
11610        ///
11611        /// This impl uses `serialize_map(None)` because the number of emitted
11612        /// fields depends on default-omission rules; serializers that require
11613        /// known map lengths (e.g. `bincode`) will return a runtime error.
11614        /// Use the owned message type for those formats.
11615        impl<'__a> ::serde::Serialize for FlowTxMatchViewView<'__a> {
11616            fn serialize<__S: ::serde::Serializer>(
11617                &self,
11618                __s: __S,
11619            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11620                use ::serde::ser::SerializeMap as _;
11621                let mut __map = __s.serialize_map(::core::option::Option::None)?;
11622                if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
11623                    __map.serialize_entry("flowId", self.flow_id)?;
11624                }
11625                if !::buffa::json_helpers::skip_if::is_default_enum_value(
11626                    &self.flow_kind,
11627                ) {
11628                    __map.serialize_entry("flowKind", &self.flow_kind)?;
11629                }
11630                if !::buffa::json_helpers::skip_if::is_empty_str(self.source_tx_hash) {
11631                    __map.serialize_entry("sourceTxHash", self.source_tx_hash)?;
11632                }
11633                if !::buffa::json_helpers::skip_if::is_empty_str(self.latest_tx_ref) {
11634                    __map.serialize_entry("latestTxRef", self.latest_tx_ref)?;
11635                }
11636                if !::buffa::json_helpers::skip_if::is_zero_u64(
11637                    &self.tx_occurrence_index,
11638                ) {
11639                    __map
11640                        .serialize_entry(
11641                            "txOccurrenceIndex",
11642                            &::buffa::json_helpers::ProtoJson(&self.tx_occurrence_index),
11643                        )?;
11644                }
11645                if !::buffa::json_helpers::skip_if::is_default_enum_value(
11646                    &self.source_domain,
11647                ) {
11648                    __map.serialize_entry("sourceDomain", &self.source_domain)?;
11649                }
11650                if !::buffa::json_helpers::skip_if::is_default_enum_value(
11651                    &self.destination_domain,
11652                ) {
11653                    __map
11654                        .serialize_entry("destinationDomain", &self.destination_domain)?;
11655                }
11656                if !::buffa::json_helpers::skip_if::is_default_enum_value(
11657                    &self.current_step,
11658                ) {
11659                    __map.serialize_entry("currentStep", &self.current_step)?;
11660                }
11661                if self.is_open {
11662                    __map.serialize_entry("isOpen", &self.is_open)?;
11663                }
11664                if self.is_terminal {
11665                    __map.serialize_entry("isTerminal", &self.is_terminal)?;
11666                }
11667                {
11668                    if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
11669                    {
11670                        __map.serialize_entry("assetIds", __v)?;
11671                    }
11672                }
11673                if !::buffa::json_helpers::skip_if::is_zero_u32(
11674                    &self.polyester_chain_id,
11675                ) {
11676                    __map
11677                        .serialize_entry(
11678                            "polyesterChainId",
11679                            &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
11680                        )?;
11681                }
11682                {
11683                    if let ::core::option::Option::Some(__v) = self
11684                        .amount_e18
11685                        .as_option()
11686                    {
11687                        __map.serialize_entry("amountE18", __v)?;
11688                    }
11689                }
11690                if !::buffa::json_helpers::skip_if::is_empty_str(self.source_address) {
11691                    __map.serialize_entry("sourceAddress", self.source_address)?;
11692                }
11693                if !::buffa::json_helpers::skip_if::is_empty_str(
11694                    self.destination_address,
11695                ) {
11696                    __map
11697                        .serialize_entry(
11698                            "destinationAddress",
11699                            self.destination_address,
11700                        )?;
11701                }
11702                if !::buffa::json_helpers::skip_if::is_default_enum_value(
11703                    &self.reason_code,
11704                ) {
11705                    __map.serialize_entry("reasonCode", &self.reason_code)?;
11706                }
11707                if !::buffa::json_helpers::skip_if::is_zero_u64(
11708                    &self.last_activity_at_unix_ms,
11709                ) {
11710                    __map
11711                        .serialize_entry(
11712                            "lastActivityAtUnixMs",
11713                            &::buffa::json_helpers::ProtoJson(
11714                                &self.last_activity_at_unix_ms,
11715                            ),
11716                        )?;
11717                }
11718                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.owner_account_id) {
11719                    __map
11720                        .serialize_entry(
11721                            "ownerAccountId",
11722                            &::buffa::json_helpers::ProtoJson(&self.owner_account_id),
11723                        )?;
11724                }
11725                if !::buffa::json_helpers::skip_if::is_empty_str(
11726                    self.smart_account_address,
11727                ) {
11728                    __map
11729                        .serialize_entry(
11730                            "smartAccountAddress",
11731                            self.smart_account_address,
11732                        )?;
11733                }
11734                __map.end()
11735            }
11736        }
11737        impl<'a> ::buffa::MessageName for FlowTxMatchViewView<'a> {
11738            const PACKAGE: &'static str = "chain.lifecycle.v1";
11739            const NAME: &'static str = "FlowTxMatchView";
11740            const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTxMatchView";
11741            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
11742        }
11743        ::buffa::impl_default_view_instance!(FlowTxMatchViewView);
11744        ::buffa::impl_view_reborrow!(FlowTxMatchViewView);
11745        /** Self-contained, `'static` owned view of a `FlowTxMatchView` message.
11746
11747 Wraps [`::buffa::OwnedView`]`<`[`FlowTxMatchViewView`]`<'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.
11748
11749 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FlowTxMatchViewView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
11750        #[derive(Clone, Debug)]
11751        pub struct FlowTxMatchViewOwnedView(
11752            ::buffa::OwnedView<FlowTxMatchViewView<'static>>,
11753        );
11754        impl FlowTxMatchViewOwnedView {
11755            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
11756            ///
11757            /// The view borrows directly from the buffer's data; the buffer is
11758            /// retained inside the returned handle.
11759            ///
11760            /// # Errors
11761            ///
11762            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
11763            /// protobuf data.
11764            pub fn decode(
11765                bytes: ::buffa::bytes::Bytes,
11766            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11767                ::core::result::Result::Ok(
11768                    FlowTxMatchViewOwnedView(::buffa::OwnedView::decode(bytes)?),
11769                )
11770            }
11771            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
11772            /// max message size).
11773            ///
11774            /// # Errors
11775            ///
11776            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
11777            /// exceeds the configured limits.
11778            pub fn decode_with_options(
11779                bytes: ::buffa::bytes::Bytes,
11780                opts: &::buffa::DecodeOptions,
11781            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11782                ::core::result::Result::Ok(
11783                    FlowTxMatchViewOwnedView(
11784                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11785                    ),
11786                )
11787            }
11788            /// Build from an owned message via an encode → decode round-trip.
11789            ///
11790            /// # Errors
11791            ///
11792            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
11793            /// somehow invalid (should not happen for well-formed messages).
11794            pub fn from_owned(
11795                msg: &super::super::FlowTxMatchView,
11796            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11797                ::core::result::Result::Ok(
11798                    FlowTxMatchViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
11799                )
11800            }
11801            /// Borrow the full [`FlowTxMatchViewView`] with its lifetime tied to `&self`.
11802            #[must_use]
11803            pub fn view(&self) -> &FlowTxMatchViewView<'_> {
11804                self.0.reborrow()
11805            }
11806            /// Convert to the owned message type.
11807            ///
11808            /// # Errors
11809            ///
11810            /// Returns an error if re-materializing preserved unknown fields
11811            /// fails (e.g. the unknown-field limit is exceeded).
11812            pub fn to_owned_message(
11813                &self,
11814            ) -> ::core::result::Result<
11815                super::super::FlowTxMatchView,
11816                ::buffa::DecodeError,
11817            > {
11818                self.0.to_owned_message()
11819            }
11820            /// The underlying bytes buffer.
11821            #[must_use]
11822            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11823                self.0.bytes()
11824            }
11825            /// Consume the handle, returning the underlying bytes buffer.
11826            #[must_use]
11827            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11828                self.0.into_bytes()
11829            }
11830            /// Public, URL-safe lifecycle identifier for display, URLs, and user search.
11831            ///
11832            /// Field 1: `flow_id`
11833            #[must_use]
11834            pub fn flow_id(&self) -> &'_ str {
11835                self.0.reborrow().flow_id
11836            }
11837            /// Product flow family.
11838            ///
11839            /// Field 3: `flow_kind`
11840            #[must_use]
11841            pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
11842                self.0.reborrow().flow_kind
11843            }
11844            /// First observed source transaction hash for the flow when known.
11845            ///
11846            /// Field 4: `source_tx_hash`
11847            #[must_use]
11848            pub fn source_tx_hash(&self) -> &'_ str {
11849                self.0.reborrow().source_tx_hash
11850            }
11851            /// Latest transaction reference associated with the current visible state.
11852            ///
11853            /// Field 5: `latest_tx_ref`
11854            #[must_use]
11855            pub fn latest_tx_ref(&self) -> &'_ str {
11856                self.0.reborrow().latest_tx_ref
11857            }
11858            /// Stable occurrence discriminator within a transaction. For source-chain
11859            /// deposits this is the batched leg index; for on-chain facts it is the log or
11860            /// equivalent per-tx occurrence index when available.
11861            ///
11862            /// Field 6: `tx_occurrence_index`
11863            #[must_use]
11864            pub fn tx_occurrence_index(&self) -> u64 {
11865                self.0.reborrow().tx_occurrence_index
11866            }
11867            /// Product domain where the overall flow starts.
11868            ///
11869            /// Field 7: `source_domain`
11870            #[must_use]
11871            pub fn source_domain(&self) -> ::buffa::EnumValue<super::super::FlowDomain> {
11872                self.0.reborrow().source_domain
11873            }
11874            /// Product domain where the overall flow ends or currently settles.
11875            ///
11876            /// Field 8: `destination_domain`
11877            #[must_use]
11878            pub fn destination_domain(
11879                &self,
11880            ) -> ::buffa::EnumValue<super::super::FlowDomain> {
11881                self.0.reborrow().destination_domain
11882            }
11883            /// Current user-facing progress step for this flow.
11884            ///
11885            /// Field 9: `current_step`
11886            #[must_use]
11887            pub fn current_step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
11888                self.0.reborrow().current_step
11889            }
11890            /// True when this flow is still progressing.
11891            ///
11892            /// Field 10: `is_open`
11893            #[must_use]
11894            pub fn is_open(&self) -> bool {
11895                self.0.reborrow().is_open
11896            }
11897            /// True when this flow reached a final state.
11898            ///
11899            /// Field 11: `is_terminal`
11900            #[must_use]
11901            pub fn is_terminal(&self) -> bool {
11902                self.0.reborrow().is_terminal
11903            }
11904            /// Asset identifiers involved in this flow.
11905            ///
11906            /// Field 12: `asset_ids`
11907            #[must_use]
11908            pub fn asset_ids(
11909                &self,
11910            ) -> &::buffa::MessageFieldView<
11911                super::super::__buffa::view::AssetIdsView<'_>,
11912            > {
11913                &self.0.reborrow().asset_ids
11914            }
11915            /// Polyester Chain id associated with this flow.
11916            ///
11917            /// Field 13: `polyester_chain_id`
11918            #[must_use]
11919            pub fn polyester_chain_id(&self) -> u32 {
11920                self.0.reborrow().polyester_chain_id
11921            }
11922            /// Gross principal amount for this flow in 18-decimal unified asset units.
11923            ///
11924            /// Field 14: `amount_e18`
11925            #[must_use]
11926            pub fn amount_e18(
11927                &self,
11928            ) -> &::buffa::MessageFieldView<
11929                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
11930                    '_,
11931                >,
11932            > {
11933                &self.0.reborrow().amount_e18
11934            }
11935            /// Source address to show for this flow.
11936            ///
11937            /// Field 15: `source_address`
11938            #[must_use]
11939            pub fn source_address(&self) -> &'_ str {
11940                self.0.reborrow().source_address
11941            }
11942            /// Destination address to show for this flow.
11943            ///
11944            /// Field 16: `destination_address`
11945            #[must_use]
11946            pub fn destination_address(&self) -> &'_ str {
11947                self.0.reborrow().destination_address
11948            }
11949            /// Product-facing reason for failed, dropped, or otherwise notable flows.
11950            ///
11951            /// Field 17: `reason_code`
11952            #[must_use]
11953            pub fn reason_code(&self) -> ::buffa::EnumValue<super::super::FlowReason> {
11954                self.0.reborrow().reason_code
11955            }
11956            /// Timestamp used for list ordering in milliseconds since epoch (UTC).
11957            ///
11958            /// Field 18: `last_activity_at_unix_ms`
11959            #[must_use]
11960            pub fn last_activity_at_unix_ms(&self) -> u64 {
11961                self.0.reborrow().last_activity_at_unix_ms
11962            }
11963            /// Public account or subaccount identifier that owns this flow.
11964            ///
11965            /// Field 19: `owner_account_id`
11966            #[must_use]
11967            pub fn owner_account_id(&self) -> u64 {
11968                self.0.reborrow().owner_account_id
11969            }
11970            /// Smart account address on Polyester Chain when known.
11971            ///
11972            /// Field 20: `smart_account_address`
11973            #[must_use]
11974            pub fn smart_account_address(&self) -> &'_ str {
11975                self.0.reborrow().smart_account_address
11976            }
11977        }
11978        impl ::core::convert::From<::buffa::OwnedView<FlowTxMatchViewView<'static>>>
11979        for FlowTxMatchViewOwnedView {
11980            fn from(inner: ::buffa::OwnedView<FlowTxMatchViewView<'static>>) -> Self {
11981                FlowTxMatchViewOwnedView(inner)
11982            }
11983        }
11984        impl ::core::convert::From<FlowTxMatchViewOwnedView>
11985        for ::buffa::OwnedView<FlowTxMatchViewView<'static>> {
11986            fn from(wrapper: FlowTxMatchViewOwnedView) -> Self {
11987                wrapper.0
11988            }
11989        }
11990        impl ::core::convert::AsRef<::buffa::OwnedView<FlowTxMatchViewView<'static>>>
11991        for FlowTxMatchViewOwnedView {
11992            fn as_ref(&self) -> &::buffa::OwnedView<FlowTxMatchViewView<'static>> {
11993                &self.0
11994            }
11995        }
11996        impl ::buffa::HasMessageView for super::super::FlowTxMatchView {
11997            type View<'a> = FlowTxMatchViewView<'a>;
11998            type ViewHandle = FlowTxMatchViewOwnedView;
11999        }
12000        impl ::serde::Serialize for FlowTxMatchViewOwnedView {
12001            fn serialize<__S: ::serde::Serializer>(
12002                &self,
12003                __s: __S,
12004            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12005                ::serde::Serialize::serialize(&self.0, __s)
12006            }
12007        }
12008        /// ListFlowsByTxResponse returns a page of lifecycle flows that reference one
12009        /// transaction hash.
12010        #[derive(Clone, Debug, Default)]
12011        pub struct ListFlowsByTxResponseView<'a> {
12012            /// Transaction hash searched by the request.
12013            ///
12014            /// Field 1: `tx_hash`
12015            pub tx_hash: &'a str,
12016            /// Matching flows ordered by tx occurrence, flow kind, domains, activity time,
12017            /// and stable identifiers.
12018            ///
12019            /// Field 2: `matches`
12020            pub matches: ::buffa::RepeatedView<
12021                'a,
12022                super::super::__buffa::view::FlowTxMatchViewView<'a>,
12023            >,
12024            /// Opaque cursor for the next page. Empty when no more results exist.
12025            ///
12026            /// Field 3: `next_page_token`
12027            pub next_page_token: &'a str,
12028            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12029        }
12030        impl<'a> ::buffa::MessageView<'a> for ListFlowsByTxResponseView<'a> {
12031            type Owned = super::super::ListFlowsByTxResponse;
12032            fn decode_view(
12033                buf: &'a [u8],
12034            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12035                let __limit = ::core::cell::Cell::new(
12036                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
12037                );
12038                <Self as ::buffa::MessageView>::decode_view_ctx(
12039                    buf,
12040                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
12041                )
12042            }
12043            fn decode_view_with_ctx(
12044                buf: &'a [u8],
12045                ctx: ::buffa::DecodeContext<'_>,
12046            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12047                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
12048            }
12049            fn merge_view_field(
12050                &mut self,
12051                tag: ::buffa::encoding::Tag,
12052                cur: &'a [u8],
12053                before_tag: &'a [u8],
12054                ctx: ::buffa::DecodeContext<'_>,
12055            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
12056                let _ = ctx;
12057                #[allow(unused_variables)]
12058                let view = self;
12059                let mut cur = cur;
12060                match tag.field_number() {
12061                    1u32 => {
12062                        ::buffa::encoding::check_wire_type(
12063                            tag,
12064                            ::buffa::encoding::WireType::LengthDelimited,
12065                        )?;
12066                        view.tx_hash = ::buffa::types::borrow_str(&mut cur)?;
12067                    }
12068                    3u32 => {
12069                        ::buffa::encoding::check_wire_type(
12070                            tag,
12071                            ::buffa::encoding::WireType::LengthDelimited,
12072                        )?;
12073                        view.next_page_token = ::buffa::types::borrow_str(&mut cur)?;
12074                    }
12075                    2u32 => {
12076                        ::buffa::encoding::check_wire_type(
12077                            tag,
12078                            ::buffa::encoding::WireType::LengthDelimited,
12079                        )?;
12080                        let __sub_ctx = ctx.descend()?;
12081                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12082                        view.matches
12083                            .push(
12084                                <super::super::__buffa::view::FlowTxMatchViewView as ::buffa::MessageView>::decode_view_ctx(
12085                                    sub,
12086                                    __sub_ctx,
12087                                )?,
12088                            );
12089                    }
12090                    _ => {
12091                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
12092                        let span_len = before_tag.len() - cur.len();
12093                        view.__buffa_unknown_fields
12094                            .push_record(before_tag, span_len, ctx)?;
12095                    }
12096                }
12097                ::core::result::Result::Ok(cur)
12098            }
12099            fn to_owned_message(
12100                &self,
12101            ) -> ::core::result::Result<
12102                super::super::ListFlowsByTxResponse,
12103                ::buffa::DecodeError,
12104            > {
12105                self.to_owned_from_source(None)
12106            }
12107            #[allow(clippy::useless_conversion, clippy::needless_update)]
12108            fn to_owned_from_source(
12109                &self,
12110                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12111            ) -> ::core::result::Result<
12112                super::super::ListFlowsByTxResponse,
12113                ::buffa::DecodeError,
12114            > {
12115                #[allow(unused_imports)]
12116                use ::buffa::alloc::string::ToString as _;
12117                let _ = __buffa_src;
12118                ::core::result::Result::Ok(super::super::ListFlowsByTxResponse {
12119                    tx_hash: self.tx_hash.to_string(),
12120                    matches: self
12121                        .matches
12122                        .iter()
12123                        .map(|v| v.to_owned_from_source(__buffa_src))
12124                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
12125                    next_page_token: self.next_page_token.to_string(),
12126                    __buffa_unknown_fields: self
12127                        .__buffa_unknown_fields
12128                        .to_owned()?
12129                        .into(),
12130                    ..::core::default::Default::default()
12131                })
12132            }
12133        }
12134        impl<'a> ::buffa::ViewEncode<'a> for ListFlowsByTxResponseView<'a> {
12135            #[allow(clippy::needless_borrow, clippy::let_and_return)]
12136            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
12137                #[allow(unused_imports)]
12138                use ::buffa::Enumeration as _;
12139                let mut size = 0u32;
12140                if !self.tx_hash.is_empty() {
12141                    size
12142                        += 1u32
12143                            + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
12144                }
12145                for v in &self.matches {
12146                    let __slot = __cache.reserve();
12147                    let inner_size = v.compute_size(__cache);
12148                    __cache.set(__slot, inner_size);
12149                    size
12150                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12151                            + inner_size;
12152                }
12153                if !self.next_page_token.is_empty() {
12154                    size
12155                        += 1u32
12156                            + ::buffa::types::string_encoded_len(&self.next_page_token)
12157                                as u32;
12158                }
12159                size += self.__buffa_unknown_fields.encoded_len() as u32;
12160                size
12161            }
12162            #[allow(clippy::needless_borrow)]
12163            fn write_to(
12164                &self,
12165                __cache: &mut ::buffa::SizeCache,
12166                buf: &mut impl ::buffa::bytes::BufMut,
12167            ) {
12168                #[allow(unused_imports)]
12169                use ::buffa::Enumeration as _;
12170                if !self.tx_hash.is_empty() {
12171                    ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
12172                }
12173                for v in &self.matches {
12174                    ::buffa::types::put_len_delimited_header(
12175                        2u32,
12176                        __cache.consume_next(),
12177                        buf,
12178                    );
12179                    v.write_to(__cache, buf);
12180                }
12181                if !self.next_page_token.is_empty() {
12182                    ::buffa::types::put_string_field(3u32, &self.next_page_token, buf);
12183                }
12184                self.__buffa_unknown_fields.write_to(buf);
12185            }
12186        }
12187        /// Serializes this view as protobuf JSON.
12188        ///
12189        /// Implicit-presence fields with default values are omitted, `required`
12190        /// fields are always emitted, explicit-presence (`optional`) fields are
12191        /// emitted only when set, bytes fields are base64-encoded, and enum
12192        /// values are their proto name strings.
12193        ///
12194        /// This impl uses `serialize_map(None)` because the number of emitted
12195        /// fields depends on default-omission rules; serializers that require
12196        /// known map lengths (e.g. `bincode`) will return a runtime error.
12197        /// Use the owned message type for those formats.
12198        impl<'__a> ::serde::Serialize for ListFlowsByTxResponseView<'__a> {
12199            fn serialize<__S: ::serde::Serializer>(
12200                &self,
12201                __s: __S,
12202            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12203                use ::serde::ser::SerializeMap as _;
12204                let mut __map = __s.serialize_map(::core::option::Option::None)?;
12205                if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_hash) {
12206                    __map.serialize_entry("txHash", self.tx_hash)?;
12207                }
12208                if !self.matches.is_empty() {
12209                    __map.serialize_entry("matches", &*self.matches)?;
12210                }
12211                if !::buffa::json_helpers::skip_if::is_empty_str(self.next_page_token) {
12212                    __map.serialize_entry("nextPageToken", self.next_page_token)?;
12213                }
12214                __map.end()
12215            }
12216        }
12217        impl<'a> ::buffa::MessageName for ListFlowsByTxResponseView<'a> {
12218            const PACKAGE: &'static str = "chain.lifecycle.v1";
12219            const NAME: &'static str = "ListFlowsByTxResponse";
12220            const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxResponse";
12221            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse";
12222        }
12223        ::buffa::impl_default_view_instance!(ListFlowsByTxResponseView);
12224        ::buffa::impl_view_reborrow!(ListFlowsByTxResponseView);
12225        /** Self-contained, `'static` owned view of a `ListFlowsByTxResponse` message.
12226
12227 Wraps [`::buffa::OwnedView`]`<`[`ListFlowsByTxResponseView`]`<'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.
12228
12229 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListFlowsByTxResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
12230        #[derive(Clone, Debug)]
12231        pub struct ListFlowsByTxResponseOwnedView(
12232            ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12233        );
12234        impl ListFlowsByTxResponseOwnedView {
12235            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
12236            ///
12237            /// The view borrows directly from the buffer's data; the buffer is
12238            /// retained inside the returned handle.
12239            ///
12240            /// # Errors
12241            ///
12242            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
12243            /// protobuf data.
12244            pub fn decode(
12245                bytes: ::buffa::bytes::Bytes,
12246            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12247                ::core::result::Result::Ok(
12248                    ListFlowsByTxResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
12249                )
12250            }
12251            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
12252            /// max message size).
12253            ///
12254            /// # Errors
12255            ///
12256            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
12257            /// exceeds the configured limits.
12258            pub fn decode_with_options(
12259                bytes: ::buffa::bytes::Bytes,
12260                opts: &::buffa::DecodeOptions,
12261            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12262                ::core::result::Result::Ok(
12263                    ListFlowsByTxResponseOwnedView(
12264                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12265                    ),
12266                )
12267            }
12268            /// Build from an owned message via an encode → decode round-trip.
12269            ///
12270            /// # Errors
12271            ///
12272            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
12273            /// somehow invalid (should not happen for well-formed messages).
12274            pub fn from_owned(
12275                msg: &super::super::ListFlowsByTxResponse,
12276            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12277                ::core::result::Result::Ok(
12278                    ListFlowsByTxResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
12279                )
12280            }
12281            /// Borrow the full [`ListFlowsByTxResponseView`] with its lifetime tied to `&self`.
12282            #[must_use]
12283            pub fn view(&self) -> &ListFlowsByTxResponseView<'_> {
12284                self.0.reborrow()
12285            }
12286            /// Convert to the owned message type.
12287            ///
12288            /// # Errors
12289            ///
12290            /// Returns an error if re-materializing preserved unknown fields
12291            /// fails (e.g. the unknown-field limit is exceeded).
12292            pub fn to_owned_message(
12293                &self,
12294            ) -> ::core::result::Result<
12295                super::super::ListFlowsByTxResponse,
12296                ::buffa::DecodeError,
12297            > {
12298                self.0.to_owned_message()
12299            }
12300            /// The underlying bytes buffer.
12301            #[must_use]
12302            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12303                self.0.bytes()
12304            }
12305            /// Consume the handle, returning the underlying bytes buffer.
12306            #[must_use]
12307            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12308                self.0.into_bytes()
12309            }
12310            /// Transaction hash searched by the request.
12311            ///
12312            /// Field 1: `tx_hash`
12313            #[must_use]
12314            pub fn tx_hash(&self) -> &'_ str {
12315                self.0.reborrow().tx_hash
12316            }
12317            /// Matching flows ordered by tx occurrence, flow kind, domains, activity time,
12318            /// and stable identifiers.
12319            ///
12320            /// Field 2: `matches`
12321            #[must_use]
12322            pub fn matches(
12323                &self,
12324            ) -> &::buffa::RepeatedView<
12325                '_,
12326                super::super::__buffa::view::FlowTxMatchViewView<'_>,
12327            > {
12328                &self.0.reborrow().matches
12329            }
12330            /// Opaque cursor for the next page. Empty when no more results exist.
12331            ///
12332            /// Field 3: `next_page_token`
12333            #[must_use]
12334            pub fn next_page_token(&self) -> &'_ str {
12335                self.0.reborrow().next_page_token
12336            }
12337        }
12338        impl ::core::convert::From<
12339            ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12340        > for ListFlowsByTxResponseOwnedView {
12341            fn from(
12342                inner: ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12343            ) -> Self {
12344                ListFlowsByTxResponseOwnedView(inner)
12345            }
12346        }
12347        impl ::core::convert::From<ListFlowsByTxResponseOwnedView>
12348        for ::buffa::OwnedView<ListFlowsByTxResponseView<'static>> {
12349            fn from(wrapper: ListFlowsByTxResponseOwnedView) -> Self {
12350                wrapper.0
12351            }
12352        }
12353        impl ::core::convert::AsRef<
12354            ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12355        > for ListFlowsByTxResponseOwnedView {
12356            fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsByTxResponseView<'static>> {
12357                &self.0
12358            }
12359        }
12360        impl ::buffa::HasMessageView for super::super::ListFlowsByTxResponse {
12361            type View<'a> = ListFlowsByTxResponseView<'a>;
12362            type ViewHandle = ListFlowsByTxResponseOwnedView;
12363        }
12364        impl ::serde::Serialize for ListFlowsByTxResponseOwnedView {
12365            fn serialize<__S: ::serde::Serializer>(
12366                &self,
12367                __s: __S,
12368            ) -> ::core::result::Result<__S::Ok, __S::Error> {
12369                ::serde::Serialize::serialize(&self.0, __s)
12370            }
12371        }
12372        /// FlowSummaryView is the compact lifecycle representation used by lists,
12373        /// realtime updates, and the header of a detail view.
12374        #[derive(Clone, Debug, Default)]
12375        pub struct FlowSummaryViewView<'a> {
12376            /// Public account identifier for the root account or subaccount the flow belongs to.
12377            ///
12378            /// Field 1: `owner_account_id`
12379            pub owner_account_id: u64,
12380            /// Smart-account address for the account the flow belongs to. This is the
12381            /// stable address selector equivalent of `owner_account_id`; do not derive it
12382            /// from source or destination display addresses.
12383            ///
12384            /// Field 34: `smart_account_address`
12385            pub smart_account_address: &'a str,
12386            /// Public, URL-safe lifecycle identifier for display, URLs, and user search.
12387            ///
12388            /// Field 33: `flow_id`
12389            pub flow_id: &'a str,
12390            /// Product flow family.
12391            ///
12392            /// Field 4: `flow_kind`
12393            pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
12394            /// Current user-facing progress step for this flow. This may be derived from
12395            /// the flow state before a matching factual observed step exists.
12396            ///
12397            /// Field 6: `current_step`
12398            pub current_step: ::buffa::EnumValue<super::super::FlowStep>,
12399            /// Asset identifiers involved in the flow.
12400            ///
12401            /// Field 7: `asset_ids`
12402            pub asset_ids: ::buffa::MessageFieldView<
12403                super::super::__buffa::view::AssetIdsView<'a>,
12404            >,
12405            /// Polyester Chain id associated with this flow when known.
12406            ///
12407            /// Field 8: `polyester_chain_id`
12408            pub polyester_chain_id: u32,
12409            /// Gross principal amount for the flow in 18-decimal unified asset units.
12410            /// Request fees are exposed separately in request_fee. Specific fulfillment
12411            /// steps may carry a net movement amount when the step represents external
12412            /// delivery.
12413            ///
12414            /// Field 9: `amount_e18`
12415            pub amount_e18: ::buffa::MessageFieldView<
12416                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
12417                    'a,
12418                >,
12419            >,
12420            /// Request-scoped fee details when a fee applies and should be visible for the
12421            /// current step.
12422            ///
12423            /// Field 28: `request_fee`
12424            pub request_fee: ::buffa::MessageFieldView<
12425                super::super::__buffa::view::RequestFeeView<'a>,
12426            >,
12427            /// First observed source transaction hash for the flow when known.
12428            ///
12429            /// Field 11: `source_tx_hash`
12430            pub source_tx_hash: &'a str,
12431            /// Stable occurrence discriminator within a transaction. For source-chain
12432            /// deposits this is the batched leg index; for on-chain facts it is the log or
12433            /// equivalent per-tx occurrence index when available.
12434            ///
12435            /// Field 32: `tx_occurrence_index`
12436            pub tx_occurrence_index: u64,
12437            /// Source address to show for the overall flow. For internal transfers this is
12438            /// the source smart account address.
12439            ///
12440            /// Field 13: `source_address`
12441            pub source_address: &'a str,
12442            /// Destination address to show for the overall flow. For internal transfers
12443            /// this is the destination smart account address.
12444            ///
12445            /// Field 14: `destination_address`
12446            pub destination_address: &'a str,
12447            /// Latest transaction reference associated with the current visible state.
12448            ///
12449            /// Field 15: `latest_tx_ref`
12450            pub latest_tx_ref: &'a str,
12451            /// Product domain where the overall flow starts. Use with
12452            /// `destination_domain` for route labels such as Funding to Trading.
12453            ///
12454            /// Field 29: `source_domain`
12455            pub source_domain: ::buffa::EnumValue<super::super::FlowDomain>,
12456            /// Product domain where the overall flow ends or currently settles. Do not
12457            /// derive route labels from per-step settlement activity.
12458            ///
12459            /// Field 30: `destination_domain`
12460            pub destination_domain: ::buffa::EnumValue<super::super::FlowDomain>,
12461            /// Provenance of the latest meaningful lifecycle activity reflected in this
12462            /// summary. This is not necessarily the source of the entire flow.
12463            ///
12464            /// Field 16: `latest_lifecycle_source`
12465            pub latest_lifecycle_source: ::buffa::EnumValue<
12466                super::super::LifecycleSource,
12467            >,
12468            /// Product-facing reason for failed, dropped, or otherwise notable flows.
12469            ///
12470            /// Field 17: `reason_code`
12471            pub reason_code: ::buffa::EnumValue<super::super::FlowReason>,
12472            /// First observed business timestamp in milliseconds since epoch (UTC).
12473            ///
12474            /// Field 18: `started_at_unix_ms`
12475            pub started_at_unix_ms: u64,
12476            /// Last summary update timestamp in milliseconds since epoch (UTC).
12477            ///
12478            /// Field 19: `updated_at_unix_ms`
12479            pub updated_at_unix_ms: u64,
12480            /// Terminal timestamp in milliseconds since epoch (UTC), or zero while open.
12481            ///
12482            /// Field 20: `terminal_at_unix_ms`
12483            pub terminal_at_unix_ms: u64,
12484            /// Timestamp used for list ordering in milliseconds since epoch (UTC).
12485            ///
12486            /// Field 21: `last_activity_at_unix_ms`
12487            pub last_activity_at_unix_ms: u64,
12488            /// True when the flow is still progressing.
12489            ///
12490            /// Field 22: `is_open`
12491            pub is_open: bool,
12492            /// True when the flow reached a final state.
12493            ///
12494            /// Field 23: `is_terminal`
12495            pub is_terminal: bool,
12496            /// One-based sequence of `current_step` in `progress_timeline`.
12497            ///
12498            /// Field 24: `current_step_sequence`
12499            pub current_step_sequence: u32,
12500            /// Progress data for the current visible step when the flow is open.
12501            ///
12502            /// Field 25: `current_progress`
12503            pub current_progress: ::buffa::MessageFieldView<
12504                super::super::__buffa::view::FlowSummaryProgressViewView<'a>,
12505            >,
12506            /// Progress-bar timeline for list/header UI. This timeline may include a
12507            /// current derived step that is ahead of the latest factual observed step.
12508            ///
12509            /// Field 26: `progress_timeline`
12510            pub progress_timeline: ::buffa::RepeatedView<
12511                'a,
12512                super::super::__buffa::view::FlowTimelineItemViewView<'a>,
12513            >,
12514            /// Estimated Unix completion timestamp in milliseconds.
12515            ///
12516            /// Field 27: `estimated_completion_unix_ms`
12517            pub estimated_completion_unix_ms: u64,
12518            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12519        }
12520        impl<'a> ::buffa::MessageView<'a> for FlowSummaryViewView<'a> {
12521            type Owned = super::super::FlowSummaryView;
12522            fn decode_view(
12523                buf: &'a [u8],
12524            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12525                let __limit = ::core::cell::Cell::new(
12526                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
12527                );
12528                <Self as ::buffa::MessageView>::decode_view_ctx(
12529                    buf,
12530                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
12531                )
12532            }
12533            fn decode_view_with_ctx(
12534                buf: &'a [u8],
12535                ctx: ::buffa::DecodeContext<'_>,
12536            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12537                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
12538            }
12539            fn merge_view_field(
12540                &mut self,
12541                tag: ::buffa::encoding::Tag,
12542                cur: &'a [u8],
12543                before_tag: &'a [u8],
12544                ctx: ::buffa::DecodeContext<'_>,
12545            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
12546                let _ = ctx;
12547                #[allow(unused_variables)]
12548                let view = self;
12549                let mut cur = cur;
12550                match tag.field_number() {
12551                    1u32 => {
12552                        ::buffa::encoding::check_wire_type(
12553                            tag,
12554                            ::buffa::encoding::WireType::Fixed64,
12555                        )?;
12556                        view.owner_account_id = ::buffa::types::decode_fixed64(
12557                            &mut cur,
12558                        )?;
12559                    }
12560                    34u32 => {
12561                        ::buffa::encoding::check_wire_type(
12562                            tag,
12563                            ::buffa::encoding::WireType::LengthDelimited,
12564                        )?;
12565                        view.smart_account_address = ::buffa::types::borrow_str(
12566                            &mut cur,
12567                        )?;
12568                    }
12569                    33u32 => {
12570                        ::buffa::encoding::check_wire_type(
12571                            tag,
12572                            ::buffa::encoding::WireType::LengthDelimited,
12573                        )?;
12574                        view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
12575                    }
12576                    4u32 => {
12577                        ::buffa::encoding::check_wire_type(
12578                            tag,
12579                            ::buffa::encoding::WireType::Varint,
12580                        )?;
12581                        view.flow_kind = ::buffa::EnumValue::from(
12582                            ::buffa::types::decode_int32(&mut cur)?,
12583                        );
12584                    }
12585                    6u32 => {
12586                        ::buffa::encoding::check_wire_type(
12587                            tag,
12588                            ::buffa::encoding::WireType::Varint,
12589                        )?;
12590                        view.current_step = ::buffa::EnumValue::from(
12591                            ::buffa::types::decode_int32(&mut cur)?,
12592                        );
12593                    }
12594                    7u32 => {
12595                        ::buffa::encoding::check_wire_type(
12596                            tag,
12597                            ::buffa::encoding::WireType::LengthDelimited,
12598                        )?;
12599                        let __sub_ctx = ctx.descend()?;
12600                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12601                        match view.asset_ids.as_mut() {
12602                            Some(existing) => {
12603                                ::buffa::MessageView::merge_into_view(
12604                                    existing,
12605                                    sub,
12606                                    __sub_ctx,
12607                                )?
12608                            }
12609                            None => {
12610                                view.asset_ids = ::buffa::MessageFieldView::set(
12611                                    <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
12612                                        sub,
12613                                        __sub_ctx,
12614                                    )?,
12615                                );
12616                            }
12617                        }
12618                    }
12619                    8u32 => {
12620                        ::buffa::encoding::check_wire_type(
12621                            tag,
12622                            ::buffa::encoding::WireType::Varint,
12623                        )?;
12624                        view.polyester_chain_id = ::buffa::types::decode_uint32(
12625                            &mut cur,
12626                        )?;
12627                    }
12628                    9u32 => {
12629                        ::buffa::encoding::check_wire_type(
12630                            tag,
12631                            ::buffa::encoding::WireType::LengthDelimited,
12632                        )?;
12633                        let __sub_ctx = ctx.descend()?;
12634                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12635                        match view.amount_e18.as_mut() {
12636                            Some(existing) => {
12637                                ::buffa::MessageView::merge_into_view(
12638                                    existing,
12639                                    sub,
12640                                    __sub_ctx,
12641                                )?
12642                            }
12643                            None => {
12644                                view.amount_e18 = ::buffa::MessageFieldView::set(
12645                                    <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
12646                                        sub,
12647                                        __sub_ctx,
12648                                    )?,
12649                                );
12650                            }
12651                        }
12652                    }
12653                    28u32 => {
12654                        ::buffa::encoding::check_wire_type(
12655                            tag,
12656                            ::buffa::encoding::WireType::LengthDelimited,
12657                        )?;
12658                        let __sub_ctx = ctx.descend()?;
12659                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12660                        match view.request_fee.as_mut() {
12661                            Some(existing) => {
12662                                ::buffa::MessageView::merge_into_view(
12663                                    existing,
12664                                    sub,
12665                                    __sub_ctx,
12666                                )?
12667                            }
12668                            None => {
12669                                view.request_fee = ::buffa::MessageFieldView::set(
12670                                    <super::super::__buffa::view::RequestFeeView as ::buffa::MessageView>::decode_view_ctx(
12671                                        sub,
12672                                        __sub_ctx,
12673                                    )?,
12674                                );
12675                            }
12676                        }
12677                    }
12678                    11u32 => {
12679                        ::buffa::encoding::check_wire_type(
12680                            tag,
12681                            ::buffa::encoding::WireType::LengthDelimited,
12682                        )?;
12683                        view.source_tx_hash = ::buffa::types::borrow_str(&mut cur)?;
12684                    }
12685                    32u32 => {
12686                        ::buffa::encoding::check_wire_type(
12687                            tag,
12688                            ::buffa::encoding::WireType::Varint,
12689                        )?;
12690                        view.tx_occurrence_index = ::buffa::types::decode_uint64(
12691                            &mut cur,
12692                        )?;
12693                    }
12694                    13u32 => {
12695                        ::buffa::encoding::check_wire_type(
12696                            tag,
12697                            ::buffa::encoding::WireType::LengthDelimited,
12698                        )?;
12699                        view.source_address = ::buffa::types::borrow_str(&mut cur)?;
12700                    }
12701                    14u32 => {
12702                        ::buffa::encoding::check_wire_type(
12703                            tag,
12704                            ::buffa::encoding::WireType::LengthDelimited,
12705                        )?;
12706                        view.destination_address = ::buffa::types::borrow_str(&mut cur)?;
12707                    }
12708                    15u32 => {
12709                        ::buffa::encoding::check_wire_type(
12710                            tag,
12711                            ::buffa::encoding::WireType::LengthDelimited,
12712                        )?;
12713                        view.latest_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
12714                    }
12715                    29u32 => {
12716                        ::buffa::encoding::check_wire_type(
12717                            tag,
12718                            ::buffa::encoding::WireType::Varint,
12719                        )?;
12720                        view.source_domain = ::buffa::EnumValue::from(
12721                            ::buffa::types::decode_int32(&mut cur)?,
12722                        );
12723                    }
12724                    30u32 => {
12725                        ::buffa::encoding::check_wire_type(
12726                            tag,
12727                            ::buffa::encoding::WireType::Varint,
12728                        )?;
12729                        view.destination_domain = ::buffa::EnumValue::from(
12730                            ::buffa::types::decode_int32(&mut cur)?,
12731                        );
12732                    }
12733                    16u32 => {
12734                        ::buffa::encoding::check_wire_type(
12735                            tag,
12736                            ::buffa::encoding::WireType::Varint,
12737                        )?;
12738                        view.latest_lifecycle_source = ::buffa::EnumValue::from(
12739                            ::buffa::types::decode_int32(&mut cur)?,
12740                        );
12741                    }
12742                    17u32 => {
12743                        ::buffa::encoding::check_wire_type(
12744                            tag,
12745                            ::buffa::encoding::WireType::Varint,
12746                        )?;
12747                        view.reason_code = ::buffa::EnumValue::from(
12748                            ::buffa::types::decode_int32(&mut cur)?,
12749                        );
12750                    }
12751                    18u32 => {
12752                        ::buffa::encoding::check_wire_type(
12753                            tag,
12754                            ::buffa::encoding::WireType::Varint,
12755                        )?;
12756                        view.started_at_unix_ms = ::buffa::types::decode_uint64(
12757                            &mut cur,
12758                        )?;
12759                    }
12760                    19u32 => {
12761                        ::buffa::encoding::check_wire_type(
12762                            tag,
12763                            ::buffa::encoding::WireType::Varint,
12764                        )?;
12765                        view.updated_at_unix_ms = ::buffa::types::decode_uint64(
12766                            &mut cur,
12767                        )?;
12768                    }
12769                    20u32 => {
12770                        ::buffa::encoding::check_wire_type(
12771                            tag,
12772                            ::buffa::encoding::WireType::Varint,
12773                        )?;
12774                        view.terminal_at_unix_ms = ::buffa::types::decode_uint64(
12775                            &mut cur,
12776                        )?;
12777                    }
12778                    21u32 => {
12779                        ::buffa::encoding::check_wire_type(
12780                            tag,
12781                            ::buffa::encoding::WireType::Varint,
12782                        )?;
12783                        view.last_activity_at_unix_ms = ::buffa::types::decode_uint64(
12784                            &mut cur,
12785                        )?;
12786                    }
12787                    22u32 => {
12788                        ::buffa::encoding::check_wire_type(
12789                            tag,
12790                            ::buffa::encoding::WireType::Varint,
12791                        )?;
12792                        view.is_open = ::buffa::types::decode_bool(&mut cur)?;
12793                    }
12794                    23u32 => {
12795                        ::buffa::encoding::check_wire_type(
12796                            tag,
12797                            ::buffa::encoding::WireType::Varint,
12798                        )?;
12799                        view.is_terminal = ::buffa::types::decode_bool(&mut cur)?;
12800                    }
12801                    24u32 => {
12802                        ::buffa::encoding::check_wire_type(
12803                            tag,
12804                            ::buffa::encoding::WireType::Varint,
12805                        )?;
12806                        view.current_step_sequence = ::buffa::types::decode_uint32(
12807                            &mut cur,
12808                        )?;
12809                    }
12810                    25u32 => {
12811                        ::buffa::encoding::check_wire_type(
12812                            tag,
12813                            ::buffa::encoding::WireType::LengthDelimited,
12814                        )?;
12815                        let __sub_ctx = ctx.descend()?;
12816                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12817                        match view.current_progress.as_mut() {
12818                            Some(existing) => {
12819                                ::buffa::MessageView::merge_into_view(
12820                                    existing,
12821                                    sub,
12822                                    __sub_ctx,
12823                                )?
12824                            }
12825                            None => {
12826                                view.current_progress = ::buffa::MessageFieldView::set(
12827                                    <super::super::__buffa::view::FlowSummaryProgressViewView as ::buffa::MessageView>::decode_view_ctx(
12828                                        sub,
12829                                        __sub_ctx,
12830                                    )?,
12831                                );
12832                            }
12833                        }
12834                    }
12835                    27u32 => {
12836                        ::buffa::encoding::check_wire_type(
12837                            tag,
12838                            ::buffa::encoding::WireType::Varint,
12839                        )?;
12840                        view.estimated_completion_unix_ms = ::buffa::types::decode_uint64(
12841                            &mut cur,
12842                        )?;
12843                    }
12844                    26u32 => {
12845                        ::buffa::encoding::check_wire_type(
12846                            tag,
12847                            ::buffa::encoding::WireType::LengthDelimited,
12848                        )?;
12849                        let __sub_ctx = ctx.descend()?;
12850                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12851                        view.progress_timeline
12852                            .push(
12853                                <super::super::__buffa::view::FlowTimelineItemViewView as ::buffa::MessageView>::decode_view_ctx(
12854                                    sub,
12855                                    __sub_ctx,
12856                                )?,
12857                            );
12858                    }
12859                    _ => {
12860                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
12861                        let span_len = before_tag.len() - cur.len();
12862                        view.__buffa_unknown_fields
12863                            .push_record(before_tag, span_len, ctx)?;
12864                    }
12865                }
12866                ::core::result::Result::Ok(cur)
12867            }
12868            fn to_owned_message(
12869                &self,
12870            ) -> ::core::result::Result<
12871                super::super::FlowSummaryView,
12872                ::buffa::DecodeError,
12873            > {
12874                self.to_owned_from_source(None)
12875            }
12876            #[allow(clippy::useless_conversion, clippy::needless_update)]
12877            fn to_owned_from_source(
12878                &self,
12879                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12880            ) -> ::core::result::Result<
12881                super::super::FlowSummaryView,
12882                ::buffa::DecodeError,
12883            > {
12884                #[allow(unused_imports)]
12885                use ::buffa::alloc::string::ToString as _;
12886                let _ = __buffa_src;
12887                ::core::result::Result::Ok(super::super::FlowSummaryView {
12888                    owner_account_id: self.owner_account_id,
12889                    smart_account_address: self.smart_account_address.to_string(),
12890                    flow_id: self.flow_id.to_string(),
12891                    flow_kind: self.flow_kind,
12892                    current_step: self.current_step,
12893                    asset_ids: match self.asset_ids.as_option() {
12894                        Some(v) => {
12895                            ::buffa::MessageField::<
12896                                super::super::AssetIds,
12897                            >::some(v.to_owned_from_source(__buffa_src)?)
12898                        }
12899                        None => ::buffa::MessageField::none(),
12900                    },
12901                    polyester_chain_id: self.polyester_chain_id,
12902                    amount_e18: match self.amount_e18.as_option() {
12903                        Some(v) => {
12904                            ::buffa::MessageField::<
12905                                super::super::super::super::super::polyester::r#type::v1::U128,
12906                            >::some(v.to_owned_from_source(__buffa_src)?)
12907                        }
12908                        None => ::buffa::MessageField::none(),
12909                    },
12910                    request_fee: match self.request_fee.as_option() {
12911                        Some(v) => {
12912                            ::buffa::MessageField::<
12913                                super::super::RequestFee,
12914                            >::some(v.to_owned_from_source(__buffa_src)?)
12915                        }
12916                        None => ::buffa::MessageField::none(),
12917                    },
12918                    source_tx_hash: self.source_tx_hash.to_string(),
12919                    tx_occurrence_index: self.tx_occurrence_index,
12920                    source_address: self.source_address.to_string(),
12921                    destination_address: self.destination_address.to_string(),
12922                    latest_tx_ref: self.latest_tx_ref.to_string(),
12923                    source_domain: self.source_domain,
12924                    destination_domain: self.destination_domain,
12925                    latest_lifecycle_source: self.latest_lifecycle_source,
12926                    reason_code: self.reason_code,
12927                    started_at_unix_ms: self.started_at_unix_ms,
12928                    updated_at_unix_ms: self.updated_at_unix_ms,
12929                    terminal_at_unix_ms: self.terminal_at_unix_ms,
12930                    last_activity_at_unix_ms: self.last_activity_at_unix_ms,
12931                    is_open: self.is_open,
12932                    is_terminal: self.is_terminal,
12933                    current_step_sequence: self.current_step_sequence,
12934                    current_progress: match self.current_progress.as_option() {
12935                        Some(v) => {
12936                            ::buffa::MessageField::<
12937                                super::super::FlowSummaryProgressView,
12938                            >::some(v.to_owned_from_source(__buffa_src)?)
12939                        }
12940                        None => ::buffa::MessageField::none(),
12941                    },
12942                    progress_timeline: self
12943                        .progress_timeline
12944                        .iter()
12945                        .map(|v| v.to_owned_from_source(__buffa_src))
12946                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
12947                    estimated_completion_unix_ms: self.estimated_completion_unix_ms,
12948                    __buffa_unknown_fields: self
12949                        .__buffa_unknown_fields
12950                        .to_owned()?
12951                        .into(),
12952                    ..::core::default::Default::default()
12953                })
12954            }
12955        }
12956        impl<'a> ::buffa::ViewEncode<'a> for FlowSummaryViewView<'a> {
12957            #[allow(clippy::needless_borrow, clippy::let_and_return)]
12958            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
12959                #[allow(unused_imports)]
12960                use ::buffa::Enumeration as _;
12961                let mut size = 0u32;
12962                if self.owner_account_id != 0u64 {
12963                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
12964                }
12965                {
12966                    let val = self.flow_kind.to_i32();
12967                    if val != 0 {
12968                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
12969                    }
12970                }
12971                {
12972                    let val = self.current_step.to_i32();
12973                    if val != 0 {
12974                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
12975                    }
12976                }
12977                if self.asset_ids.is_set() {
12978                    let __slot = __cache.reserve();
12979                    let inner_size = self.asset_ids.compute_size(__cache);
12980                    __cache.set(__slot, inner_size);
12981                    size
12982                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12983                            + inner_size;
12984                }
12985                if self.polyester_chain_id != 0u32 {
12986                    size
12987                        += 1u32
12988                            + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
12989                                as u32;
12990                }
12991                if self.amount_e18.is_set() {
12992                    let __slot = __cache.reserve();
12993                    let inner_size = self.amount_e18.compute_size(__cache);
12994                    __cache.set(__slot, inner_size);
12995                    size
12996                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12997                            + inner_size;
12998                }
12999                if !self.source_tx_hash.is_empty() {
13000                    size
13001                        += 1u32
13002                            + ::buffa::types::string_encoded_len(&self.source_tx_hash)
13003                                as u32;
13004                }
13005                if !self.source_address.is_empty() {
13006                    size
13007                        += 1u32
13008                            + ::buffa::types::string_encoded_len(&self.source_address)
13009                                as u32;
13010                }
13011                if !self.destination_address.is_empty() {
13012                    size
13013                        += 1u32
13014                            + ::buffa::types::string_encoded_len(
13015                                &self.destination_address,
13016                            ) as u32;
13017                }
13018                if !self.latest_tx_ref.is_empty() {
13019                    size
13020                        += 1u32
13021                            + ::buffa::types::string_encoded_len(&self.latest_tx_ref)
13022                                as u32;
13023                }
13024                {
13025                    let val = self.latest_lifecycle_source.to_i32();
13026                    if val != 0 {
13027                        size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13028                    }
13029                }
13030                {
13031                    let val = self.reason_code.to_i32();
13032                    if val != 0 {
13033                        size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13034                    }
13035                }
13036                if self.started_at_unix_ms != 0u64 {
13037                    size
13038                        += 2u32
13039                            + ::buffa::types::uint64_encoded_len(self.started_at_unix_ms)
13040                                as u32;
13041                }
13042                if self.updated_at_unix_ms != 0u64 {
13043                    size
13044                        += 2u32
13045                            + ::buffa::types::uint64_encoded_len(self.updated_at_unix_ms)
13046                                as u32;
13047                }
13048                if self.terminal_at_unix_ms != 0u64 {
13049                    size
13050                        += 2u32
13051                            + ::buffa::types::uint64_encoded_len(
13052                                self.terminal_at_unix_ms,
13053                            ) as u32;
13054                }
13055                if self.last_activity_at_unix_ms != 0u64 {
13056                    size
13057                        += 2u32
13058                            + ::buffa::types::uint64_encoded_len(
13059                                self.last_activity_at_unix_ms,
13060                            ) as u32;
13061                }
13062                if self.is_open {
13063                    size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
13064                }
13065                if self.is_terminal {
13066                    size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
13067                }
13068                if self.current_step_sequence != 0u32 {
13069                    size
13070                        += 2u32
13071                            + ::buffa::types::uint32_encoded_len(
13072                                self.current_step_sequence,
13073                            ) as u32;
13074                }
13075                if self.current_progress.is_set() {
13076                    let __slot = __cache.reserve();
13077                    let inner_size = self.current_progress.compute_size(__cache);
13078                    __cache.set(__slot, inner_size);
13079                    size
13080                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13081                            + inner_size;
13082                }
13083                for v in &self.progress_timeline {
13084                    let __slot = __cache.reserve();
13085                    let inner_size = v.compute_size(__cache);
13086                    __cache.set(__slot, inner_size);
13087                    size
13088                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13089                            + inner_size;
13090                }
13091                if self.estimated_completion_unix_ms != 0u64 {
13092                    size
13093                        += 2u32
13094                            + ::buffa::types::uint64_encoded_len(
13095                                self.estimated_completion_unix_ms,
13096                            ) as u32;
13097                }
13098                if self.request_fee.is_set() {
13099                    let __slot = __cache.reserve();
13100                    let inner_size = self.request_fee.compute_size(__cache);
13101                    __cache.set(__slot, inner_size);
13102                    size
13103                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13104                            + inner_size;
13105                }
13106                {
13107                    let val = self.source_domain.to_i32();
13108                    if val != 0 {
13109                        size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13110                    }
13111                }
13112                {
13113                    let val = self.destination_domain.to_i32();
13114                    if val != 0 {
13115                        size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13116                    }
13117                }
13118                if self.tx_occurrence_index != 0u64 {
13119                    size
13120                        += 2u32
13121                            + ::buffa::types::uint64_encoded_len(
13122                                self.tx_occurrence_index,
13123                            ) as u32;
13124                }
13125                if !self.flow_id.is_empty() {
13126                    size
13127                        += 2u32
13128                            + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
13129                }
13130                if !self.smart_account_address.is_empty() {
13131                    size
13132                        += 2u32
13133                            + ::buffa::types::string_encoded_len(
13134                                &self.smart_account_address,
13135                            ) as u32;
13136                }
13137                size += self.__buffa_unknown_fields.encoded_len() as u32;
13138                size
13139            }
13140            #[allow(clippy::needless_borrow)]
13141            fn write_to(
13142                &self,
13143                __cache: &mut ::buffa::SizeCache,
13144                buf: &mut impl ::buffa::bytes::BufMut,
13145            ) {
13146                #[allow(unused_imports)]
13147                use ::buffa::Enumeration as _;
13148                if self.owner_account_id != 0u64 {
13149                    ::buffa::types::put_fixed64_field(1u32, self.owner_account_id, buf);
13150                }
13151                {
13152                    let val = self.flow_kind.to_i32();
13153                    if val != 0 {
13154                        ::buffa::types::put_int32_field(4u32, val, buf);
13155                    }
13156                }
13157                {
13158                    let val = self.current_step.to_i32();
13159                    if val != 0 {
13160                        ::buffa::types::put_int32_field(6u32, val, buf);
13161                    }
13162                }
13163                if self.asset_ids.is_set() {
13164                    ::buffa::types::put_len_delimited_header(
13165                        7u32,
13166                        __cache.consume_next(),
13167                        buf,
13168                    );
13169                    self.asset_ids.write_to(__cache, buf);
13170                }
13171                if self.polyester_chain_id != 0u32 {
13172                    ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
13173                }
13174                if self.amount_e18.is_set() {
13175                    ::buffa::types::put_len_delimited_header(
13176                        9u32,
13177                        __cache.consume_next(),
13178                        buf,
13179                    );
13180                    self.amount_e18.write_to(__cache, buf);
13181                }
13182                if !self.source_tx_hash.is_empty() {
13183                    ::buffa::types::put_string_field(11u32, &self.source_tx_hash, buf);
13184                }
13185                if !self.source_address.is_empty() {
13186                    ::buffa::types::put_string_field(13u32, &self.source_address, buf);
13187                }
13188                if !self.destination_address.is_empty() {
13189                    ::buffa::types::put_string_field(
13190                        14u32,
13191                        &self.destination_address,
13192                        buf,
13193                    );
13194                }
13195                if !self.latest_tx_ref.is_empty() {
13196                    ::buffa::types::put_string_field(15u32, &self.latest_tx_ref, buf);
13197                }
13198                {
13199                    let val = self.latest_lifecycle_source.to_i32();
13200                    if val != 0 {
13201                        ::buffa::types::put_int32_field(16u32, val, buf);
13202                    }
13203                }
13204                {
13205                    let val = self.reason_code.to_i32();
13206                    if val != 0 {
13207                        ::buffa::types::put_int32_field(17u32, val, buf);
13208                    }
13209                }
13210                if self.started_at_unix_ms != 0u64 {
13211                    ::buffa::types::put_uint64_field(
13212                        18u32,
13213                        self.started_at_unix_ms,
13214                        buf,
13215                    );
13216                }
13217                if self.updated_at_unix_ms != 0u64 {
13218                    ::buffa::types::put_uint64_field(
13219                        19u32,
13220                        self.updated_at_unix_ms,
13221                        buf,
13222                    );
13223                }
13224                if self.terminal_at_unix_ms != 0u64 {
13225                    ::buffa::types::put_uint64_field(
13226                        20u32,
13227                        self.terminal_at_unix_ms,
13228                        buf,
13229                    );
13230                }
13231                if self.last_activity_at_unix_ms != 0u64 {
13232                    ::buffa::types::put_uint64_field(
13233                        21u32,
13234                        self.last_activity_at_unix_ms,
13235                        buf,
13236                    );
13237                }
13238                if self.is_open {
13239                    ::buffa::types::put_bool_field(22u32, self.is_open, buf);
13240                }
13241                if self.is_terminal {
13242                    ::buffa::types::put_bool_field(23u32, self.is_terminal, buf);
13243                }
13244                if self.current_step_sequence != 0u32 {
13245                    ::buffa::types::put_uint32_field(
13246                        24u32,
13247                        self.current_step_sequence,
13248                        buf,
13249                    );
13250                }
13251                if self.current_progress.is_set() {
13252                    ::buffa::types::put_len_delimited_header(
13253                        25u32,
13254                        __cache.consume_next(),
13255                        buf,
13256                    );
13257                    self.current_progress.write_to(__cache, buf);
13258                }
13259                for v in &self.progress_timeline {
13260                    ::buffa::types::put_len_delimited_header(
13261                        26u32,
13262                        __cache.consume_next(),
13263                        buf,
13264                    );
13265                    v.write_to(__cache, buf);
13266                }
13267                if self.estimated_completion_unix_ms != 0u64 {
13268                    ::buffa::types::put_uint64_field(
13269                        27u32,
13270                        self.estimated_completion_unix_ms,
13271                        buf,
13272                    );
13273                }
13274                if self.request_fee.is_set() {
13275                    ::buffa::types::put_len_delimited_header(
13276                        28u32,
13277                        __cache.consume_next(),
13278                        buf,
13279                    );
13280                    self.request_fee.write_to(__cache, buf);
13281                }
13282                {
13283                    let val = self.source_domain.to_i32();
13284                    if val != 0 {
13285                        ::buffa::types::put_int32_field(29u32, val, buf);
13286                    }
13287                }
13288                {
13289                    let val = self.destination_domain.to_i32();
13290                    if val != 0 {
13291                        ::buffa::types::put_int32_field(30u32, val, buf);
13292                    }
13293                }
13294                if self.tx_occurrence_index != 0u64 {
13295                    ::buffa::types::put_uint64_field(
13296                        32u32,
13297                        self.tx_occurrence_index,
13298                        buf,
13299                    );
13300                }
13301                if !self.flow_id.is_empty() {
13302                    ::buffa::types::put_string_field(33u32, &self.flow_id, buf);
13303                }
13304                if !self.smart_account_address.is_empty() {
13305                    ::buffa::types::put_string_field(
13306                        34u32,
13307                        &self.smart_account_address,
13308                        buf,
13309                    );
13310                }
13311                self.__buffa_unknown_fields.write_to(buf);
13312            }
13313        }
13314        /// Serializes this view as protobuf JSON.
13315        ///
13316        /// Implicit-presence fields with default values are omitted, `required`
13317        /// fields are always emitted, explicit-presence (`optional`) fields are
13318        /// emitted only when set, bytes fields are base64-encoded, and enum
13319        /// values are their proto name strings.
13320        ///
13321        /// This impl uses `serialize_map(None)` because the number of emitted
13322        /// fields depends on default-omission rules; serializers that require
13323        /// known map lengths (e.g. `bincode`) will return a runtime error.
13324        /// Use the owned message type for those formats.
13325        impl<'__a> ::serde::Serialize for FlowSummaryViewView<'__a> {
13326            fn serialize<__S: ::serde::Serializer>(
13327                &self,
13328                __s: __S,
13329            ) -> ::core::result::Result<__S::Ok, __S::Error> {
13330                use ::serde::ser::SerializeMap as _;
13331                let mut __map = __s.serialize_map(::core::option::Option::None)?;
13332                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.owner_account_id) {
13333                    __map
13334                        .serialize_entry(
13335                            "ownerAccountId",
13336                            &::buffa::json_helpers::ProtoJson(&self.owner_account_id),
13337                        )?;
13338                }
13339                if !::buffa::json_helpers::skip_if::is_empty_str(
13340                    self.smart_account_address,
13341                ) {
13342                    __map
13343                        .serialize_entry(
13344                            "smartAccountAddress",
13345                            self.smart_account_address,
13346                        )?;
13347                }
13348                if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
13349                    __map.serialize_entry("flowId", self.flow_id)?;
13350                }
13351                if !::buffa::json_helpers::skip_if::is_default_enum_value(
13352                    &self.flow_kind,
13353                ) {
13354                    __map.serialize_entry("flowKind", &self.flow_kind)?;
13355                }
13356                if !::buffa::json_helpers::skip_if::is_default_enum_value(
13357                    &self.current_step,
13358                ) {
13359                    __map.serialize_entry("currentStep", &self.current_step)?;
13360                }
13361                {
13362                    if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
13363                    {
13364                        __map.serialize_entry("assetIds", __v)?;
13365                    }
13366                }
13367                if !::buffa::json_helpers::skip_if::is_zero_u32(
13368                    &self.polyester_chain_id,
13369                ) {
13370                    __map
13371                        .serialize_entry(
13372                            "polyesterChainId",
13373                            &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
13374                        )?;
13375                }
13376                {
13377                    if let ::core::option::Option::Some(__v) = self
13378                        .amount_e18
13379                        .as_option()
13380                    {
13381                        __map.serialize_entry("amountE18", __v)?;
13382                    }
13383                }
13384                {
13385                    if let ::core::option::Option::Some(__v) = self
13386                        .request_fee
13387                        .as_option()
13388                    {
13389                        __map.serialize_entry("requestFee", __v)?;
13390                    }
13391                }
13392                if !::buffa::json_helpers::skip_if::is_empty_str(self.source_tx_hash) {
13393                    __map.serialize_entry("sourceTxHash", self.source_tx_hash)?;
13394                }
13395                if !::buffa::json_helpers::skip_if::is_zero_u64(
13396                    &self.tx_occurrence_index,
13397                ) {
13398                    __map
13399                        .serialize_entry(
13400                            "txOccurrenceIndex",
13401                            &::buffa::json_helpers::ProtoJson(&self.tx_occurrence_index),
13402                        )?;
13403                }
13404                if !::buffa::json_helpers::skip_if::is_empty_str(self.source_address) {
13405                    __map.serialize_entry("sourceAddress", self.source_address)?;
13406                }
13407                if !::buffa::json_helpers::skip_if::is_empty_str(
13408                    self.destination_address,
13409                ) {
13410                    __map
13411                        .serialize_entry(
13412                            "destinationAddress",
13413                            self.destination_address,
13414                        )?;
13415                }
13416                if !::buffa::json_helpers::skip_if::is_empty_str(self.latest_tx_ref) {
13417                    __map.serialize_entry("latestTxRef", self.latest_tx_ref)?;
13418                }
13419                if !::buffa::json_helpers::skip_if::is_default_enum_value(
13420                    &self.source_domain,
13421                ) {
13422                    __map.serialize_entry("sourceDomain", &self.source_domain)?;
13423                }
13424                if !::buffa::json_helpers::skip_if::is_default_enum_value(
13425                    &self.destination_domain,
13426                ) {
13427                    __map
13428                        .serialize_entry("destinationDomain", &self.destination_domain)?;
13429                }
13430                if !::buffa::json_helpers::skip_if::is_default_enum_value(
13431                    &self.latest_lifecycle_source,
13432                ) {
13433                    __map
13434                        .serialize_entry(
13435                            "latestLifecycleSource",
13436                            &self.latest_lifecycle_source,
13437                        )?;
13438                }
13439                if !::buffa::json_helpers::skip_if::is_default_enum_value(
13440                    &self.reason_code,
13441                ) {
13442                    __map.serialize_entry("reasonCode", &self.reason_code)?;
13443                }
13444                if !::buffa::json_helpers::skip_if::is_zero_u64(
13445                    &self.started_at_unix_ms,
13446                ) {
13447                    __map
13448                        .serialize_entry(
13449                            "startedAtUnixMs",
13450                            &::buffa::json_helpers::ProtoJson(&self.started_at_unix_ms),
13451                        )?;
13452                }
13453                if !::buffa::json_helpers::skip_if::is_zero_u64(
13454                    &self.updated_at_unix_ms,
13455                ) {
13456                    __map
13457                        .serialize_entry(
13458                            "updatedAtUnixMs",
13459                            &::buffa::json_helpers::ProtoJson(&self.updated_at_unix_ms),
13460                        )?;
13461                }
13462                if !::buffa::json_helpers::skip_if::is_zero_u64(
13463                    &self.terminal_at_unix_ms,
13464                ) {
13465                    __map
13466                        .serialize_entry(
13467                            "terminalAtUnixMs",
13468                            &::buffa::json_helpers::ProtoJson(&self.terminal_at_unix_ms),
13469                        )?;
13470                }
13471                if !::buffa::json_helpers::skip_if::is_zero_u64(
13472                    &self.last_activity_at_unix_ms,
13473                ) {
13474                    __map
13475                        .serialize_entry(
13476                            "lastActivityAtUnixMs",
13477                            &::buffa::json_helpers::ProtoJson(
13478                                &self.last_activity_at_unix_ms,
13479                            ),
13480                        )?;
13481                }
13482                if self.is_open {
13483                    __map.serialize_entry("isOpen", &self.is_open)?;
13484                }
13485                if self.is_terminal {
13486                    __map.serialize_entry("isTerminal", &self.is_terminal)?;
13487                }
13488                if !::buffa::json_helpers::skip_if::is_zero_u32(
13489                    &self.current_step_sequence,
13490                ) {
13491                    __map
13492                        .serialize_entry(
13493                            "currentStepSequence",
13494                            &::buffa::json_helpers::ProtoJson(
13495                                &self.current_step_sequence,
13496                            ),
13497                        )?;
13498                }
13499                {
13500                    if let ::core::option::Option::Some(__v) = self
13501                        .current_progress
13502                        .as_option()
13503                    {
13504                        __map.serialize_entry("currentProgress", __v)?;
13505                    }
13506                }
13507                if !self.progress_timeline.is_empty() {
13508                    __map.serialize_entry("progressTimeline", &*self.progress_timeline)?;
13509                }
13510                if !::buffa::json_helpers::skip_if::is_zero_u64(
13511                    &self.estimated_completion_unix_ms,
13512                ) {
13513                    __map
13514                        .serialize_entry(
13515                            "estimatedCompletionUnixMs",
13516                            &::buffa::json_helpers::ProtoJson(
13517                                &self.estimated_completion_unix_ms,
13518                            ),
13519                        )?;
13520                }
13521                __map.end()
13522            }
13523        }
13524        impl<'a> ::buffa::MessageName for FlowSummaryViewView<'a> {
13525            const PACKAGE: &'static str = "chain.lifecycle.v1";
13526            const NAME: &'static str = "FlowSummaryView";
13527            const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryView";
13528            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
13529        }
13530        ::buffa::impl_default_view_instance!(FlowSummaryViewView);
13531        ::buffa::impl_view_reborrow!(FlowSummaryViewView);
13532        /** Self-contained, `'static` owned view of a `FlowSummaryView` message.
13533
13534 Wraps [`::buffa::OwnedView`]`<`[`FlowSummaryViewView`]`<'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.
13535
13536 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FlowSummaryViewView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
13537        #[derive(Clone, Debug)]
13538        pub struct FlowSummaryViewOwnedView(
13539            ::buffa::OwnedView<FlowSummaryViewView<'static>>,
13540        );
13541        impl FlowSummaryViewOwnedView {
13542            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
13543            ///
13544            /// The view borrows directly from the buffer's data; the buffer is
13545            /// retained inside the returned handle.
13546            ///
13547            /// # Errors
13548            ///
13549            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
13550            /// protobuf data.
13551            pub fn decode(
13552                bytes: ::buffa::bytes::Bytes,
13553            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13554                ::core::result::Result::Ok(
13555                    FlowSummaryViewOwnedView(::buffa::OwnedView::decode(bytes)?),
13556                )
13557            }
13558            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
13559            /// max message size).
13560            ///
13561            /// # Errors
13562            ///
13563            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
13564            /// exceeds the configured limits.
13565            pub fn decode_with_options(
13566                bytes: ::buffa::bytes::Bytes,
13567                opts: &::buffa::DecodeOptions,
13568            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13569                ::core::result::Result::Ok(
13570                    FlowSummaryViewOwnedView(
13571                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
13572                    ),
13573                )
13574            }
13575            /// Build from an owned message via an encode → decode round-trip.
13576            ///
13577            /// # Errors
13578            ///
13579            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
13580            /// somehow invalid (should not happen for well-formed messages).
13581            pub fn from_owned(
13582                msg: &super::super::FlowSummaryView,
13583            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13584                ::core::result::Result::Ok(
13585                    FlowSummaryViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
13586                )
13587            }
13588            /// Borrow the full [`FlowSummaryViewView`] with its lifetime tied to `&self`.
13589            #[must_use]
13590            pub fn view(&self) -> &FlowSummaryViewView<'_> {
13591                self.0.reborrow()
13592            }
13593            /// Convert to the owned message type.
13594            ///
13595            /// # Errors
13596            ///
13597            /// Returns an error if re-materializing preserved unknown fields
13598            /// fails (e.g. the unknown-field limit is exceeded).
13599            pub fn to_owned_message(
13600                &self,
13601            ) -> ::core::result::Result<
13602                super::super::FlowSummaryView,
13603                ::buffa::DecodeError,
13604            > {
13605                self.0.to_owned_message()
13606            }
13607            /// The underlying bytes buffer.
13608            #[must_use]
13609            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
13610                self.0.bytes()
13611            }
13612            /// Consume the handle, returning the underlying bytes buffer.
13613            #[must_use]
13614            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
13615                self.0.into_bytes()
13616            }
13617            /// Public account identifier for the root account or subaccount the flow belongs to.
13618            ///
13619            /// Field 1: `owner_account_id`
13620            #[must_use]
13621            pub fn owner_account_id(&self) -> u64 {
13622                self.0.reborrow().owner_account_id
13623            }
13624            /// Smart-account address for the account the flow belongs to. This is the
13625            /// stable address selector equivalent of `owner_account_id`; do not derive it
13626            /// from source or destination display addresses.
13627            ///
13628            /// Field 34: `smart_account_address`
13629            #[must_use]
13630            pub fn smart_account_address(&self) -> &'_ str {
13631                self.0.reborrow().smart_account_address
13632            }
13633            /// Public, URL-safe lifecycle identifier for display, URLs, and user search.
13634            ///
13635            /// Field 33: `flow_id`
13636            #[must_use]
13637            pub fn flow_id(&self) -> &'_ str {
13638                self.0.reborrow().flow_id
13639            }
13640            /// Product flow family.
13641            ///
13642            /// Field 4: `flow_kind`
13643            #[must_use]
13644            pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
13645                self.0.reborrow().flow_kind
13646            }
13647            /// Current user-facing progress step for this flow. This may be derived from
13648            /// the flow state before a matching factual observed step exists.
13649            ///
13650            /// Field 6: `current_step`
13651            #[must_use]
13652            pub fn current_step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
13653                self.0.reborrow().current_step
13654            }
13655            /// Asset identifiers involved in the flow.
13656            ///
13657            /// Field 7: `asset_ids`
13658            #[must_use]
13659            pub fn asset_ids(
13660                &self,
13661            ) -> &::buffa::MessageFieldView<
13662                super::super::__buffa::view::AssetIdsView<'_>,
13663            > {
13664                &self.0.reborrow().asset_ids
13665            }
13666            /// Polyester Chain id associated with this flow when known.
13667            ///
13668            /// Field 8: `polyester_chain_id`
13669            #[must_use]
13670            pub fn polyester_chain_id(&self) -> u32 {
13671                self.0.reborrow().polyester_chain_id
13672            }
13673            /// Gross principal amount for the flow in 18-decimal unified asset units.
13674            /// Request fees are exposed separately in request_fee. Specific fulfillment
13675            /// steps may carry a net movement amount when the step represents external
13676            /// delivery.
13677            ///
13678            /// Field 9: `amount_e18`
13679            #[must_use]
13680            pub fn amount_e18(
13681                &self,
13682            ) -> &::buffa::MessageFieldView<
13683                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
13684                    '_,
13685                >,
13686            > {
13687                &self.0.reborrow().amount_e18
13688            }
13689            /// Request-scoped fee details when a fee applies and should be visible for the
13690            /// current step.
13691            ///
13692            /// Field 28: `request_fee`
13693            #[must_use]
13694            pub fn request_fee(
13695                &self,
13696            ) -> &::buffa::MessageFieldView<
13697                super::super::__buffa::view::RequestFeeView<'_>,
13698            > {
13699                &self.0.reborrow().request_fee
13700            }
13701            /// First observed source transaction hash for the flow when known.
13702            ///
13703            /// Field 11: `source_tx_hash`
13704            #[must_use]
13705            pub fn source_tx_hash(&self) -> &'_ str {
13706                self.0.reborrow().source_tx_hash
13707            }
13708            /// Stable occurrence discriminator within a transaction. For source-chain
13709            /// deposits this is the batched leg index; for on-chain facts it is the log or
13710            /// equivalent per-tx occurrence index when available.
13711            ///
13712            /// Field 32: `tx_occurrence_index`
13713            #[must_use]
13714            pub fn tx_occurrence_index(&self) -> u64 {
13715                self.0.reborrow().tx_occurrence_index
13716            }
13717            /// Source address to show for the overall flow. For internal transfers this is
13718            /// the source smart account address.
13719            ///
13720            /// Field 13: `source_address`
13721            #[must_use]
13722            pub fn source_address(&self) -> &'_ str {
13723                self.0.reborrow().source_address
13724            }
13725            /// Destination address to show for the overall flow. For internal transfers
13726            /// this is the destination smart account address.
13727            ///
13728            /// Field 14: `destination_address`
13729            #[must_use]
13730            pub fn destination_address(&self) -> &'_ str {
13731                self.0.reborrow().destination_address
13732            }
13733            /// Latest transaction reference associated with the current visible state.
13734            ///
13735            /// Field 15: `latest_tx_ref`
13736            #[must_use]
13737            pub fn latest_tx_ref(&self) -> &'_ str {
13738                self.0.reborrow().latest_tx_ref
13739            }
13740            /// Product domain where the overall flow starts. Use with
13741            /// `destination_domain` for route labels such as Funding to Trading.
13742            ///
13743            /// Field 29: `source_domain`
13744            #[must_use]
13745            pub fn source_domain(&self) -> ::buffa::EnumValue<super::super::FlowDomain> {
13746                self.0.reborrow().source_domain
13747            }
13748            /// Product domain where the overall flow ends or currently settles. Do not
13749            /// derive route labels from per-step settlement activity.
13750            ///
13751            /// Field 30: `destination_domain`
13752            #[must_use]
13753            pub fn destination_domain(
13754                &self,
13755            ) -> ::buffa::EnumValue<super::super::FlowDomain> {
13756                self.0.reborrow().destination_domain
13757            }
13758            /// Provenance of the latest meaningful lifecycle activity reflected in this
13759            /// summary. This is not necessarily the source of the entire flow.
13760            ///
13761            /// Field 16: `latest_lifecycle_source`
13762            #[must_use]
13763            pub fn latest_lifecycle_source(
13764                &self,
13765            ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
13766                self.0.reborrow().latest_lifecycle_source
13767            }
13768            /// Product-facing reason for failed, dropped, or otherwise notable flows.
13769            ///
13770            /// Field 17: `reason_code`
13771            #[must_use]
13772            pub fn reason_code(&self) -> ::buffa::EnumValue<super::super::FlowReason> {
13773                self.0.reborrow().reason_code
13774            }
13775            /// First observed business timestamp in milliseconds since epoch (UTC).
13776            ///
13777            /// Field 18: `started_at_unix_ms`
13778            #[must_use]
13779            pub fn started_at_unix_ms(&self) -> u64 {
13780                self.0.reborrow().started_at_unix_ms
13781            }
13782            /// Last summary update timestamp in milliseconds since epoch (UTC).
13783            ///
13784            /// Field 19: `updated_at_unix_ms`
13785            #[must_use]
13786            pub fn updated_at_unix_ms(&self) -> u64 {
13787                self.0.reborrow().updated_at_unix_ms
13788            }
13789            /// Terminal timestamp in milliseconds since epoch (UTC), or zero while open.
13790            ///
13791            /// Field 20: `terminal_at_unix_ms`
13792            #[must_use]
13793            pub fn terminal_at_unix_ms(&self) -> u64 {
13794                self.0.reborrow().terminal_at_unix_ms
13795            }
13796            /// Timestamp used for list ordering in milliseconds since epoch (UTC).
13797            ///
13798            /// Field 21: `last_activity_at_unix_ms`
13799            #[must_use]
13800            pub fn last_activity_at_unix_ms(&self) -> u64 {
13801                self.0.reborrow().last_activity_at_unix_ms
13802            }
13803            /// True when the flow is still progressing.
13804            ///
13805            /// Field 22: `is_open`
13806            #[must_use]
13807            pub fn is_open(&self) -> bool {
13808                self.0.reborrow().is_open
13809            }
13810            /// True when the flow reached a final state.
13811            ///
13812            /// Field 23: `is_terminal`
13813            #[must_use]
13814            pub fn is_terminal(&self) -> bool {
13815                self.0.reborrow().is_terminal
13816            }
13817            /// One-based sequence of `current_step` in `progress_timeline`.
13818            ///
13819            /// Field 24: `current_step_sequence`
13820            #[must_use]
13821            pub fn current_step_sequence(&self) -> u32 {
13822                self.0.reborrow().current_step_sequence
13823            }
13824            /// Progress data for the current visible step when the flow is open.
13825            ///
13826            /// Field 25: `current_progress`
13827            #[must_use]
13828            pub fn current_progress(
13829                &self,
13830            ) -> &::buffa::MessageFieldView<
13831                super::super::__buffa::view::FlowSummaryProgressViewView<'_>,
13832            > {
13833                &self.0.reborrow().current_progress
13834            }
13835            /// Progress-bar timeline for list/header UI. This timeline may include a
13836            /// current derived step that is ahead of the latest factual observed step.
13837            ///
13838            /// Field 26: `progress_timeline`
13839            #[must_use]
13840            pub fn progress_timeline(
13841                &self,
13842            ) -> &::buffa::RepeatedView<
13843                '_,
13844                super::super::__buffa::view::FlowTimelineItemViewView<'_>,
13845            > {
13846                &self.0.reborrow().progress_timeline
13847            }
13848            /// Estimated Unix completion timestamp in milliseconds.
13849            ///
13850            /// Field 27: `estimated_completion_unix_ms`
13851            #[must_use]
13852            pub fn estimated_completion_unix_ms(&self) -> u64 {
13853                self.0.reborrow().estimated_completion_unix_ms
13854            }
13855        }
13856        impl ::core::convert::From<::buffa::OwnedView<FlowSummaryViewView<'static>>>
13857        for FlowSummaryViewOwnedView {
13858            fn from(inner: ::buffa::OwnedView<FlowSummaryViewView<'static>>) -> Self {
13859                FlowSummaryViewOwnedView(inner)
13860            }
13861        }
13862        impl ::core::convert::From<FlowSummaryViewOwnedView>
13863        for ::buffa::OwnedView<FlowSummaryViewView<'static>> {
13864            fn from(wrapper: FlowSummaryViewOwnedView) -> Self {
13865                wrapper.0
13866            }
13867        }
13868        impl ::core::convert::AsRef<::buffa::OwnedView<FlowSummaryViewView<'static>>>
13869        for FlowSummaryViewOwnedView {
13870            fn as_ref(&self) -> &::buffa::OwnedView<FlowSummaryViewView<'static>> {
13871                &self.0
13872            }
13873        }
13874        impl ::buffa::HasMessageView for super::super::FlowSummaryView {
13875            type View<'a> = FlowSummaryViewView<'a>;
13876            type ViewHandle = FlowSummaryViewOwnedView;
13877        }
13878        impl ::serde::Serialize for FlowSummaryViewOwnedView {
13879            fn serialize<__S: ::serde::Serializer>(
13880                &self,
13881                __s: __S,
13882            ) -> ::core::result::Result<__S::Ok, __S::Error> {
13883                ::serde::Serialize::serialize(&self.0, __s)
13884            }
13885        }
13886        /// FlowSummaryProgressView describes progress within the current visible step.
13887        #[derive(Clone, Debug, Default)]
13888        pub struct FlowSummaryProgressViewView<'a> {
13889            /// Timestamp when the current visible step started, in milliseconds since epoch
13890            /// (UTC).
13891            ///
13892            /// Field 1: `current_step_started_at_unix_ms`
13893            pub current_step_started_at_unix_ms: u64,
13894            /// Expected duration for the current visible step in milliseconds.
13895            ///
13896            /// Field 2: `current_step_expected_duration_ms`
13897            pub current_step_expected_duration_ms: u64,
13898            /// Current source confirmation count when confirmations apply.
13899            ///
13900            /// Field 5: `current_confirmations`
13901            pub current_confirmations: u32,
13902            /// Required source confirmation count when confirmations apply.
13903            ///
13904            /// Field 6: `required_confirmations`
13905            pub required_confirmations: u32,
13906            /// Current approval count when validation applies.
13907            ///
13908            /// Field 7: `approve_count`
13909            pub approve_count: u32,
13910            /// Current rejection count when validation applies.
13911            ///
13912            /// Field 8: `reject_count`
13913            pub reject_count: u32,
13914            /// Validator set size when validation applies.
13915            ///
13916            /// Field 9: `validator_count`
13917            pub validator_count: u32,
13918            /// Approval count required for the current validation step.
13919            ///
13920            /// Field 10: `required_approvals`
13921            pub required_approvals: u32,
13922            /// Rejection count that would fail the current validation step.
13923            ///
13924            /// Field 11: `required_rejections`
13925            pub required_rejections: u32,
13926            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
13927        }
13928        impl<'a> ::buffa::MessageView<'a> for FlowSummaryProgressViewView<'a> {
13929            type Owned = super::super::FlowSummaryProgressView;
13930            fn decode_view(
13931                buf: &'a [u8],
13932            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13933                let __limit = ::core::cell::Cell::new(
13934                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
13935                );
13936                <Self as ::buffa::MessageView>::decode_view_ctx(
13937                    buf,
13938                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
13939                )
13940            }
13941            fn decode_view_with_ctx(
13942                buf: &'a [u8],
13943                ctx: ::buffa::DecodeContext<'_>,
13944            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13945                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
13946            }
13947            fn merge_view_field(
13948                &mut self,
13949                tag: ::buffa::encoding::Tag,
13950                cur: &'a [u8],
13951                before_tag: &'a [u8],
13952                ctx: ::buffa::DecodeContext<'_>,
13953            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
13954                let _ = ctx;
13955                #[allow(unused_variables)]
13956                let view = self;
13957                let mut cur = cur;
13958                match tag.field_number() {
13959                    1u32 => {
13960                        ::buffa::encoding::check_wire_type(
13961                            tag,
13962                            ::buffa::encoding::WireType::Varint,
13963                        )?;
13964                        view.current_step_started_at_unix_ms = ::buffa::types::decode_uint64(
13965                            &mut cur,
13966                        )?;
13967                    }
13968                    2u32 => {
13969                        ::buffa::encoding::check_wire_type(
13970                            tag,
13971                            ::buffa::encoding::WireType::Varint,
13972                        )?;
13973                        view.current_step_expected_duration_ms = ::buffa::types::decode_uint64(
13974                            &mut cur,
13975                        )?;
13976                    }
13977                    5u32 => {
13978                        ::buffa::encoding::check_wire_type(
13979                            tag,
13980                            ::buffa::encoding::WireType::Varint,
13981                        )?;
13982                        view.current_confirmations = ::buffa::types::decode_uint32(
13983                            &mut cur,
13984                        )?;
13985                    }
13986                    6u32 => {
13987                        ::buffa::encoding::check_wire_type(
13988                            tag,
13989                            ::buffa::encoding::WireType::Varint,
13990                        )?;
13991                        view.required_confirmations = ::buffa::types::decode_uint32(
13992                            &mut cur,
13993                        )?;
13994                    }
13995                    7u32 => {
13996                        ::buffa::encoding::check_wire_type(
13997                            tag,
13998                            ::buffa::encoding::WireType::Varint,
13999                        )?;
14000                        view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
14001                    }
14002                    8u32 => {
14003                        ::buffa::encoding::check_wire_type(
14004                            tag,
14005                            ::buffa::encoding::WireType::Varint,
14006                        )?;
14007                        view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
14008                    }
14009                    9u32 => {
14010                        ::buffa::encoding::check_wire_type(
14011                            tag,
14012                            ::buffa::encoding::WireType::Varint,
14013                        )?;
14014                        view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
14015                    }
14016                    10u32 => {
14017                        ::buffa::encoding::check_wire_type(
14018                            tag,
14019                            ::buffa::encoding::WireType::Varint,
14020                        )?;
14021                        view.required_approvals = ::buffa::types::decode_uint32(
14022                            &mut cur,
14023                        )?;
14024                    }
14025                    11u32 => {
14026                        ::buffa::encoding::check_wire_type(
14027                            tag,
14028                            ::buffa::encoding::WireType::Varint,
14029                        )?;
14030                        view.required_rejections = ::buffa::types::decode_uint32(
14031                            &mut cur,
14032                        )?;
14033                    }
14034                    _ => {
14035                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
14036                        let span_len = before_tag.len() - cur.len();
14037                        view.__buffa_unknown_fields
14038                            .push_record(before_tag, span_len, ctx)?;
14039                    }
14040                }
14041                ::core::result::Result::Ok(cur)
14042            }
14043            fn to_owned_message(
14044                &self,
14045            ) -> ::core::result::Result<
14046                super::super::FlowSummaryProgressView,
14047                ::buffa::DecodeError,
14048            > {
14049                self.to_owned_from_source(None)
14050            }
14051            #[allow(clippy::useless_conversion, clippy::needless_update)]
14052            fn to_owned_from_source(
14053                &self,
14054                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
14055            ) -> ::core::result::Result<
14056                super::super::FlowSummaryProgressView,
14057                ::buffa::DecodeError,
14058            > {
14059                #[allow(unused_imports)]
14060                use ::buffa::alloc::string::ToString as _;
14061                let _ = __buffa_src;
14062                ::core::result::Result::Ok(super::super::FlowSummaryProgressView {
14063                    current_step_started_at_unix_ms: self
14064                        .current_step_started_at_unix_ms,
14065                    current_step_expected_duration_ms: self
14066                        .current_step_expected_duration_ms,
14067                    current_confirmations: self.current_confirmations,
14068                    required_confirmations: self.required_confirmations,
14069                    approve_count: self.approve_count,
14070                    reject_count: self.reject_count,
14071                    validator_count: self.validator_count,
14072                    required_approvals: self.required_approvals,
14073                    required_rejections: self.required_rejections,
14074                    __buffa_unknown_fields: self
14075                        .__buffa_unknown_fields
14076                        .to_owned()?
14077                        .into(),
14078                    ..::core::default::Default::default()
14079                })
14080            }
14081        }
14082        impl<'a> ::buffa::ViewEncode<'a> for FlowSummaryProgressViewView<'a> {
14083            #[allow(clippy::needless_borrow, clippy::let_and_return)]
14084            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
14085                #[allow(unused_imports)]
14086                use ::buffa::Enumeration as _;
14087                let mut size = 0u32;
14088                if self.current_step_started_at_unix_ms != 0u64 {
14089                    size
14090                        += 1u32
14091                            + ::buffa::types::uint64_encoded_len(
14092                                self.current_step_started_at_unix_ms,
14093                            ) as u32;
14094                }
14095                if self.current_step_expected_duration_ms != 0u64 {
14096                    size
14097                        += 1u32
14098                            + ::buffa::types::uint64_encoded_len(
14099                                self.current_step_expected_duration_ms,
14100                            ) as u32;
14101                }
14102                if self.current_confirmations != 0u32 {
14103                    size
14104                        += 1u32
14105                            + ::buffa::types::uint32_encoded_len(
14106                                self.current_confirmations,
14107                            ) as u32;
14108                }
14109                if self.required_confirmations != 0u32 {
14110                    size
14111                        += 1u32
14112                            + ::buffa::types::uint32_encoded_len(
14113                                self.required_confirmations,
14114                            ) as u32;
14115                }
14116                if self.approve_count != 0u32 {
14117                    size
14118                        += 1u32
14119                            + ::buffa::types::uint32_encoded_len(self.approve_count)
14120                                as u32;
14121                }
14122                if self.reject_count != 0u32 {
14123                    size
14124                        += 1u32
14125                            + ::buffa::types::uint32_encoded_len(self.reject_count)
14126                                as u32;
14127                }
14128                if self.validator_count != 0u32 {
14129                    size
14130                        += 1u32
14131                            + ::buffa::types::uint32_encoded_len(self.validator_count)
14132                                as u32;
14133                }
14134                if self.required_approvals != 0u32 {
14135                    size
14136                        += 1u32
14137                            + ::buffa::types::uint32_encoded_len(self.required_approvals)
14138                                as u32;
14139                }
14140                if self.required_rejections != 0u32 {
14141                    size
14142                        += 1u32
14143                            + ::buffa::types::uint32_encoded_len(
14144                                self.required_rejections,
14145                            ) as u32;
14146                }
14147                size += self.__buffa_unknown_fields.encoded_len() as u32;
14148                size
14149            }
14150            #[allow(clippy::needless_borrow)]
14151            fn write_to(
14152                &self,
14153                _cache: &mut ::buffa::SizeCache,
14154                buf: &mut impl ::buffa::bytes::BufMut,
14155            ) {
14156                #[allow(unused_imports)]
14157                use ::buffa::Enumeration as _;
14158                if self.current_step_started_at_unix_ms != 0u64 {
14159                    ::buffa::types::put_uint64_field(
14160                        1u32,
14161                        self.current_step_started_at_unix_ms,
14162                        buf,
14163                    );
14164                }
14165                if self.current_step_expected_duration_ms != 0u64 {
14166                    ::buffa::types::put_uint64_field(
14167                        2u32,
14168                        self.current_step_expected_duration_ms,
14169                        buf,
14170                    );
14171                }
14172                if self.current_confirmations != 0u32 {
14173                    ::buffa::types::put_uint32_field(
14174                        5u32,
14175                        self.current_confirmations,
14176                        buf,
14177                    );
14178                }
14179                if self.required_confirmations != 0u32 {
14180                    ::buffa::types::put_uint32_field(
14181                        6u32,
14182                        self.required_confirmations,
14183                        buf,
14184                    );
14185                }
14186                if self.approve_count != 0u32 {
14187                    ::buffa::types::put_uint32_field(7u32, self.approve_count, buf);
14188                }
14189                if self.reject_count != 0u32 {
14190                    ::buffa::types::put_uint32_field(8u32, self.reject_count, buf);
14191                }
14192                if self.validator_count != 0u32 {
14193                    ::buffa::types::put_uint32_field(9u32, self.validator_count, buf);
14194                }
14195                if self.required_approvals != 0u32 {
14196                    ::buffa::types::put_uint32_field(
14197                        10u32,
14198                        self.required_approvals,
14199                        buf,
14200                    );
14201                }
14202                if self.required_rejections != 0u32 {
14203                    ::buffa::types::put_uint32_field(
14204                        11u32,
14205                        self.required_rejections,
14206                        buf,
14207                    );
14208                }
14209                self.__buffa_unknown_fields.write_to(buf);
14210            }
14211        }
14212        /// Serializes this view as protobuf JSON.
14213        ///
14214        /// Implicit-presence fields with default values are omitted, `required`
14215        /// fields are always emitted, explicit-presence (`optional`) fields are
14216        /// emitted only when set, bytes fields are base64-encoded, and enum
14217        /// values are their proto name strings.
14218        ///
14219        /// This impl uses `serialize_map(None)` because the number of emitted
14220        /// fields depends on default-omission rules; serializers that require
14221        /// known map lengths (e.g. `bincode`) will return a runtime error.
14222        /// Use the owned message type for those formats.
14223        impl<'__a> ::serde::Serialize for FlowSummaryProgressViewView<'__a> {
14224            fn serialize<__S: ::serde::Serializer>(
14225                &self,
14226                __s: __S,
14227            ) -> ::core::result::Result<__S::Ok, __S::Error> {
14228                use ::serde::ser::SerializeMap as _;
14229                let mut __map = __s.serialize_map(::core::option::Option::None)?;
14230                if !::buffa::json_helpers::skip_if::is_zero_u64(
14231                    &self.current_step_started_at_unix_ms,
14232                ) {
14233                    __map
14234                        .serialize_entry(
14235                            "currentStepStartedAtUnixMs",
14236                            &::buffa::json_helpers::ProtoJson(
14237                                &self.current_step_started_at_unix_ms,
14238                            ),
14239                        )?;
14240                }
14241                if !::buffa::json_helpers::skip_if::is_zero_u64(
14242                    &self.current_step_expected_duration_ms,
14243                ) {
14244                    __map
14245                        .serialize_entry(
14246                            "currentStepExpectedDurationMs",
14247                            &::buffa::json_helpers::ProtoJson(
14248                                &self.current_step_expected_duration_ms,
14249                            ),
14250                        )?;
14251                }
14252                if !::buffa::json_helpers::skip_if::is_zero_u32(
14253                    &self.current_confirmations,
14254                ) {
14255                    __map
14256                        .serialize_entry(
14257                            "currentConfirmations",
14258                            &::buffa::json_helpers::ProtoJson(
14259                                &self.current_confirmations,
14260                            ),
14261                        )?;
14262                }
14263                if !::buffa::json_helpers::skip_if::is_zero_u32(
14264                    &self.required_confirmations,
14265                ) {
14266                    __map
14267                        .serialize_entry(
14268                            "requiredConfirmations",
14269                            &::buffa::json_helpers::ProtoJson(
14270                                &self.required_confirmations,
14271                            ),
14272                        )?;
14273                }
14274                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
14275                    __map
14276                        .serialize_entry(
14277                            "approveCount",
14278                            &::buffa::json_helpers::ProtoJson(&self.approve_count),
14279                        )?;
14280                }
14281                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
14282                    __map
14283                        .serialize_entry(
14284                            "rejectCount",
14285                            &::buffa::json_helpers::ProtoJson(&self.reject_count),
14286                        )?;
14287                }
14288                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
14289                    __map
14290                        .serialize_entry(
14291                            "validatorCount",
14292                            &::buffa::json_helpers::ProtoJson(&self.validator_count),
14293                        )?;
14294                }
14295                if !::buffa::json_helpers::skip_if::is_zero_u32(
14296                    &self.required_approvals,
14297                ) {
14298                    __map
14299                        .serialize_entry(
14300                            "requiredApprovals",
14301                            &::buffa::json_helpers::ProtoJson(&self.required_approvals),
14302                        )?;
14303                }
14304                if !::buffa::json_helpers::skip_if::is_zero_u32(
14305                    &self.required_rejections,
14306                ) {
14307                    __map
14308                        .serialize_entry(
14309                            "requiredRejections",
14310                            &::buffa::json_helpers::ProtoJson(&self.required_rejections),
14311                        )?;
14312                }
14313                __map.end()
14314            }
14315        }
14316        impl<'a> ::buffa::MessageName for FlowSummaryProgressViewView<'a> {
14317            const PACKAGE: &'static str = "chain.lifecycle.v1";
14318            const NAME: &'static str = "FlowSummaryProgressView";
14319            const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
14320            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
14321        }
14322        ::buffa::impl_default_view_instance!(FlowSummaryProgressViewView);
14323        ::buffa::impl_view_reborrow!(FlowSummaryProgressViewView);
14324        /** Self-contained, `'static` owned view of a `FlowSummaryProgressView` message.
14325
14326 Wraps [`::buffa::OwnedView`]`<`[`FlowSummaryProgressViewView`]`<'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.
14327
14328 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FlowSummaryProgressViewView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
14329        #[derive(Clone, Debug)]
14330        pub struct FlowSummaryProgressViewOwnedView(
14331            ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14332        );
14333        impl FlowSummaryProgressViewOwnedView {
14334            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
14335            ///
14336            /// The view borrows directly from the buffer's data; the buffer is
14337            /// retained inside the returned handle.
14338            ///
14339            /// # Errors
14340            ///
14341            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
14342            /// protobuf data.
14343            pub fn decode(
14344                bytes: ::buffa::bytes::Bytes,
14345            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14346                ::core::result::Result::Ok(
14347                    FlowSummaryProgressViewOwnedView(::buffa::OwnedView::decode(bytes)?),
14348                )
14349            }
14350            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
14351            /// max message size).
14352            ///
14353            /// # Errors
14354            ///
14355            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
14356            /// exceeds the configured limits.
14357            pub fn decode_with_options(
14358                bytes: ::buffa::bytes::Bytes,
14359                opts: &::buffa::DecodeOptions,
14360            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14361                ::core::result::Result::Ok(
14362                    FlowSummaryProgressViewOwnedView(
14363                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
14364                    ),
14365                )
14366            }
14367            /// Build from an owned message via an encode → decode round-trip.
14368            ///
14369            /// # Errors
14370            ///
14371            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
14372            /// somehow invalid (should not happen for well-formed messages).
14373            pub fn from_owned(
14374                msg: &super::super::FlowSummaryProgressView,
14375            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14376                ::core::result::Result::Ok(
14377                    FlowSummaryProgressViewOwnedView(
14378                        ::buffa::OwnedView::from_owned(msg)?,
14379                    ),
14380                )
14381            }
14382            /// Borrow the full [`FlowSummaryProgressViewView`] with its lifetime tied to `&self`.
14383            #[must_use]
14384            pub fn view(&self) -> &FlowSummaryProgressViewView<'_> {
14385                self.0.reborrow()
14386            }
14387            /// Convert to the owned message type.
14388            ///
14389            /// # Errors
14390            ///
14391            /// Returns an error if re-materializing preserved unknown fields
14392            /// fails (e.g. the unknown-field limit is exceeded).
14393            pub fn to_owned_message(
14394                &self,
14395            ) -> ::core::result::Result<
14396                super::super::FlowSummaryProgressView,
14397                ::buffa::DecodeError,
14398            > {
14399                self.0.to_owned_message()
14400            }
14401            /// The underlying bytes buffer.
14402            #[must_use]
14403            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
14404                self.0.bytes()
14405            }
14406            /// Consume the handle, returning the underlying bytes buffer.
14407            #[must_use]
14408            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
14409                self.0.into_bytes()
14410            }
14411            /// Timestamp when the current visible step started, in milliseconds since epoch
14412            /// (UTC).
14413            ///
14414            /// Field 1: `current_step_started_at_unix_ms`
14415            #[must_use]
14416            pub fn current_step_started_at_unix_ms(&self) -> u64 {
14417                self.0.reborrow().current_step_started_at_unix_ms
14418            }
14419            /// Expected duration for the current visible step in milliseconds.
14420            ///
14421            /// Field 2: `current_step_expected_duration_ms`
14422            #[must_use]
14423            pub fn current_step_expected_duration_ms(&self) -> u64 {
14424                self.0.reborrow().current_step_expected_duration_ms
14425            }
14426            /// Current source confirmation count when confirmations apply.
14427            ///
14428            /// Field 5: `current_confirmations`
14429            #[must_use]
14430            pub fn current_confirmations(&self) -> u32 {
14431                self.0.reborrow().current_confirmations
14432            }
14433            /// Required source confirmation count when confirmations apply.
14434            ///
14435            /// Field 6: `required_confirmations`
14436            #[must_use]
14437            pub fn required_confirmations(&self) -> u32 {
14438                self.0.reborrow().required_confirmations
14439            }
14440            /// Current approval count when validation applies.
14441            ///
14442            /// Field 7: `approve_count`
14443            #[must_use]
14444            pub fn approve_count(&self) -> u32 {
14445                self.0.reborrow().approve_count
14446            }
14447            /// Current rejection count when validation applies.
14448            ///
14449            /// Field 8: `reject_count`
14450            #[must_use]
14451            pub fn reject_count(&self) -> u32 {
14452                self.0.reborrow().reject_count
14453            }
14454            /// Validator set size when validation applies.
14455            ///
14456            /// Field 9: `validator_count`
14457            #[must_use]
14458            pub fn validator_count(&self) -> u32 {
14459                self.0.reborrow().validator_count
14460            }
14461            /// Approval count required for the current validation step.
14462            ///
14463            /// Field 10: `required_approvals`
14464            #[must_use]
14465            pub fn required_approvals(&self) -> u32 {
14466                self.0.reborrow().required_approvals
14467            }
14468            /// Rejection count that would fail the current validation step.
14469            ///
14470            /// Field 11: `required_rejections`
14471            #[must_use]
14472            pub fn required_rejections(&self) -> u32 {
14473                self.0.reborrow().required_rejections
14474            }
14475        }
14476        impl ::core::convert::From<
14477            ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14478        > for FlowSummaryProgressViewOwnedView {
14479            fn from(
14480                inner: ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14481            ) -> Self {
14482                FlowSummaryProgressViewOwnedView(inner)
14483            }
14484        }
14485        impl ::core::convert::From<FlowSummaryProgressViewOwnedView>
14486        for ::buffa::OwnedView<FlowSummaryProgressViewView<'static>> {
14487            fn from(wrapper: FlowSummaryProgressViewOwnedView) -> Self {
14488                wrapper.0
14489            }
14490        }
14491        impl ::core::convert::AsRef<
14492            ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14493        > for FlowSummaryProgressViewOwnedView {
14494            fn as_ref(
14495                &self,
14496            ) -> &::buffa::OwnedView<FlowSummaryProgressViewView<'static>> {
14497                &self.0
14498            }
14499        }
14500        impl ::buffa::HasMessageView for super::super::FlowSummaryProgressView {
14501            type View<'a> = FlowSummaryProgressViewView<'a>;
14502            type ViewHandle = FlowSummaryProgressViewOwnedView;
14503        }
14504        impl ::serde::Serialize for FlowSummaryProgressViewOwnedView {
14505            fn serialize<__S: ::serde::Serializer>(
14506                &self,
14507                __s: __S,
14508            ) -> ::core::result::Result<__S::Ok, __S::Error> {
14509                ::serde::Serialize::serialize(&self.0, __s)
14510            }
14511        }
14512        /// FlowStepView is one factual observed visible step in the lifecycle detail
14513        /// view. Use `FlowSummaryView.progress_timeline` for the current projected
14514        /// progress state.
14515        #[derive(Clone, Debug, Default)]
14516        pub struct FlowStepViewView<'a> {
14517            /// One-based observed step sequence for display and audit.
14518            ///
14519            /// Field 1: `sequence`
14520            pub sequence: u32,
14521            /// Business-facing observed step.
14522            ///
14523            /// Field 3: `step`
14524            pub step: ::buffa::EnumValue<super::super::FlowStep>,
14525            /// Asset identifiers involved in this step.
14526            ///
14527            /// Field 7: `asset_ids`
14528            pub asset_ids: ::buffa::MessageFieldView<
14529                super::super::__buffa::view::AssetIdsView<'a>,
14530            >,
14531            /// Polyester Chain id associated with this step when known.
14532            ///
14533            /// Field 8: `polyester_chain_id`
14534            pub polyester_chain_id: u32,
14535            /// Amount represented by this step in 18-decimal unified asset units. Steps
14536            /// may carry the actual net movement amount when fees have already been taken.
14537            ///
14538            /// Field 9: `amount_e18`
14539            pub amount_e18: ::buffa::MessageFieldView<
14540                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
14541                    'a,
14542                >,
14543            >,
14544            /// Request-scoped fee details when a fee applies to this step.
14545            ///
14546            /// Field 24: `request_fee`
14547            pub request_fee: ::buffa::MessageFieldView<
14548                super::super::__buffa::view::RequestFeeView<'a>,
14549            >,
14550            /// Transaction reference most relevant to this step.
14551            ///
14552            /// Field 11: `milestone_tx_ref`
14553            pub milestone_tx_ref: &'a str,
14554            /// Source that produced this visible step.
14555            ///
14556            /// Field 12: `lifecycle_source`
14557            pub lifecycle_source: ::buffa::EnumValue<super::super::LifecycleSource>,
14558            /// Product-facing reason for failed, dropped, or otherwise notable steps.
14559            ///
14560            /// Field 13: `reason_code`
14561            pub reason_code: ::buffa::EnumValue<super::super::FlowReason>,
14562            /// Current source confirmation count when confirmations apply.
14563            ///
14564            /// Field 14: `current_confirmations`
14565            pub current_confirmations: u32,
14566            /// Required source confirmation count when confirmations apply.
14567            ///
14568            /// Field 15: `required_confirmations`
14569            pub required_confirmations: u32,
14570            /// Current approval count when validation applies.
14571            ///
14572            /// Field 16: `approve_count`
14573            pub approve_count: u32,
14574            /// Current rejection count when validation applies.
14575            ///
14576            /// Field 17: `reject_count`
14577            pub reject_count: u32,
14578            /// Validator set size when validation applies.
14579            ///
14580            /// Field 18: `validator_count`
14581            pub validator_count: u32,
14582            /// Approval count required for this validation step.
14583            ///
14584            /// Field 22: `required_approvals`
14585            pub required_approvals: u32,
14586            /// Rejection count that would fail this validation step.
14587            ///
14588            /// Field 23: `required_rejections`
14589            pub required_rejections: u32,
14590            /// Step occurrence timestamp in milliseconds since epoch (UTC).
14591            ///
14592            /// Field 19: `occurred_at_unix_ms`
14593            pub occurred_at_unix_ms: u64,
14594            /// Source-chain block time moving average in milliseconds when known.
14595            ///
14596            /// Field 20: `block_time_moving_average_ms`
14597            pub block_time_moving_average_ms: u64,
14598            /// Nested activity rows for expandable UI detail. The top-level step remains
14599            /// one visible lifecycle stage while activities expose the underlying on-chain
14600            /// evidence that advanced it.
14601            ///
14602            /// Field 21: `activities`
14603            pub activities: ::buffa::RepeatedView<
14604                'a,
14605                super::super::__buffa::view::FlowStepActivityViewView<'a>,
14606            >,
14607            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
14608        }
14609        impl<'a> ::buffa::MessageView<'a> for FlowStepViewView<'a> {
14610            type Owned = super::super::FlowStepView;
14611            fn decode_view(
14612                buf: &'a [u8],
14613            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14614                let __limit = ::core::cell::Cell::new(
14615                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
14616                );
14617                <Self as ::buffa::MessageView>::decode_view_ctx(
14618                    buf,
14619                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
14620                )
14621            }
14622            fn decode_view_with_ctx(
14623                buf: &'a [u8],
14624                ctx: ::buffa::DecodeContext<'_>,
14625            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14626                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
14627            }
14628            fn merge_view_field(
14629                &mut self,
14630                tag: ::buffa::encoding::Tag,
14631                cur: &'a [u8],
14632                before_tag: &'a [u8],
14633                ctx: ::buffa::DecodeContext<'_>,
14634            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
14635                let _ = ctx;
14636                #[allow(unused_variables)]
14637                let view = self;
14638                let mut cur = cur;
14639                match tag.field_number() {
14640                    1u32 => {
14641                        ::buffa::encoding::check_wire_type(
14642                            tag,
14643                            ::buffa::encoding::WireType::Varint,
14644                        )?;
14645                        view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
14646                    }
14647                    3u32 => {
14648                        ::buffa::encoding::check_wire_type(
14649                            tag,
14650                            ::buffa::encoding::WireType::Varint,
14651                        )?;
14652                        view.step = ::buffa::EnumValue::from(
14653                            ::buffa::types::decode_int32(&mut cur)?,
14654                        );
14655                    }
14656                    7u32 => {
14657                        ::buffa::encoding::check_wire_type(
14658                            tag,
14659                            ::buffa::encoding::WireType::LengthDelimited,
14660                        )?;
14661                        let __sub_ctx = ctx.descend()?;
14662                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14663                        match view.asset_ids.as_mut() {
14664                            Some(existing) => {
14665                                ::buffa::MessageView::merge_into_view(
14666                                    existing,
14667                                    sub,
14668                                    __sub_ctx,
14669                                )?
14670                            }
14671                            None => {
14672                                view.asset_ids = ::buffa::MessageFieldView::set(
14673                                    <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
14674                                        sub,
14675                                        __sub_ctx,
14676                                    )?,
14677                                );
14678                            }
14679                        }
14680                    }
14681                    8u32 => {
14682                        ::buffa::encoding::check_wire_type(
14683                            tag,
14684                            ::buffa::encoding::WireType::Varint,
14685                        )?;
14686                        view.polyester_chain_id = ::buffa::types::decode_uint32(
14687                            &mut cur,
14688                        )?;
14689                    }
14690                    9u32 => {
14691                        ::buffa::encoding::check_wire_type(
14692                            tag,
14693                            ::buffa::encoding::WireType::LengthDelimited,
14694                        )?;
14695                        let __sub_ctx = ctx.descend()?;
14696                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14697                        match view.amount_e18.as_mut() {
14698                            Some(existing) => {
14699                                ::buffa::MessageView::merge_into_view(
14700                                    existing,
14701                                    sub,
14702                                    __sub_ctx,
14703                                )?
14704                            }
14705                            None => {
14706                                view.amount_e18 = ::buffa::MessageFieldView::set(
14707                                    <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
14708                                        sub,
14709                                        __sub_ctx,
14710                                    )?,
14711                                );
14712                            }
14713                        }
14714                    }
14715                    24u32 => {
14716                        ::buffa::encoding::check_wire_type(
14717                            tag,
14718                            ::buffa::encoding::WireType::LengthDelimited,
14719                        )?;
14720                        let __sub_ctx = ctx.descend()?;
14721                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14722                        match view.request_fee.as_mut() {
14723                            Some(existing) => {
14724                                ::buffa::MessageView::merge_into_view(
14725                                    existing,
14726                                    sub,
14727                                    __sub_ctx,
14728                                )?
14729                            }
14730                            None => {
14731                                view.request_fee = ::buffa::MessageFieldView::set(
14732                                    <super::super::__buffa::view::RequestFeeView as ::buffa::MessageView>::decode_view_ctx(
14733                                        sub,
14734                                        __sub_ctx,
14735                                    )?,
14736                                );
14737                            }
14738                        }
14739                    }
14740                    11u32 => {
14741                        ::buffa::encoding::check_wire_type(
14742                            tag,
14743                            ::buffa::encoding::WireType::LengthDelimited,
14744                        )?;
14745                        view.milestone_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
14746                    }
14747                    12u32 => {
14748                        ::buffa::encoding::check_wire_type(
14749                            tag,
14750                            ::buffa::encoding::WireType::Varint,
14751                        )?;
14752                        view.lifecycle_source = ::buffa::EnumValue::from(
14753                            ::buffa::types::decode_int32(&mut cur)?,
14754                        );
14755                    }
14756                    13u32 => {
14757                        ::buffa::encoding::check_wire_type(
14758                            tag,
14759                            ::buffa::encoding::WireType::Varint,
14760                        )?;
14761                        view.reason_code = ::buffa::EnumValue::from(
14762                            ::buffa::types::decode_int32(&mut cur)?,
14763                        );
14764                    }
14765                    14u32 => {
14766                        ::buffa::encoding::check_wire_type(
14767                            tag,
14768                            ::buffa::encoding::WireType::Varint,
14769                        )?;
14770                        view.current_confirmations = ::buffa::types::decode_uint32(
14771                            &mut cur,
14772                        )?;
14773                    }
14774                    15u32 => {
14775                        ::buffa::encoding::check_wire_type(
14776                            tag,
14777                            ::buffa::encoding::WireType::Varint,
14778                        )?;
14779                        view.required_confirmations = ::buffa::types::decode_uint32(
14780                            &mut cur,
14781                        )?;
14782                    }
14783                    16u32 => {
14784                        ::buffa::encoding::check_wire_type(
14785                            tag,
14786                            ::buffa::encoding::WireType::Varint,
14787                        )?;
14788                        view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
14789                    }
14790                    17u32 => {
14791                        ::buffa::encoding::check_wire_type(
14792                            tag,
14793                            ::buffa::encoding::WireType::Varint,
14794                        )?;
14795                        view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
14796                    }
14797                    18u32 => {
14798                        ::buffa::encoding::check_wire_type(
14799                            tag,
14800                            ::buffa::encoding::WireType::Varint,
14801                        )?;
14802                        view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
14803                    }
14804                    22u32 => {
14805                        ::buffa::encoding::check_wire_type(
14806                            tag,
14807                            ::buffa::encoding::WireType::Varint,
14808                        )?;
14809                        view.required_approvals = ::buffa::types::decode_uint32(
14810                            &mut cur,
14811                        )?;
14812                    }
14813                    23u32 => {
14814                        ::buffa::encoding::check_wire_type(
14815                            tag,
14816                            ::buffa::encoding::WireType::Varint,
14817                        )?;
14818                        view.required_rejections = ::buffa::types::decode_uint32(
14819                            &mut cur,
14820                        )?;
14821                    }
14822                    19u32 => {
14823                        ::buffa::encoding::check_wire_type(
14824                            tag,
14825                            ::buffa::encoding::WireType::Varint,
14826                        )?;
14827                        view.occurred_at_unix_ms = ::buffa::types::decode_uint64(
14828                            &mut cur,
14829                        )?;
14830                    }
14831                    20u32 => {
14832                        ::buffa::encoding::check_wire_type(
14833                            tag,
14834                            ::buffa::encoding::WireType::Varint,
14835                        )?;
14836                        view.block_time_moving_average_ms = ::buffa::types::decode_uint64(
14837                            &mut cur,
14838                        )?;
14839                    }
14840                    21u32 => {
14841                        ::buffa::encoding::check_wire_type(
14842                            tag,
14843                            ::buffa::encoding::WireType::LengthDelimited,
14844                        )?;
14845                        let __sub_ctx = ctx.descend()?;
14846                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14847                        view.activities
14848                            .push(
14849                                <super::super::__buffa::view::FlowStepActivityViewView as ::buffa::MessageView>::decode_view_ctx(
14850                                    sub,
14851                                    __sub_ctx,
14852                                )?,
14853                            );
14854                    }
14855                    _ => {
14856                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
14857                        let span_len = before_tag.len() - cur.len();
14858                        view.__buffa_unknown_fields
14859                            .push_record(before_tag, span_len, ctx)?;
14860                    }
14861                }
14862                ::core::result::Result::Ok(cur)
14863            }
14864            fn to_owned_message(
14865                &self,
14866            ) -> ::core::result::Result<
14867                super::super::FlowStepView,
14868                ::buffa::DecodeError,
14869            > {
14870                self.to_owned_from_source(None)
14871            }
14872            #[allow(clippy::useless_conversion, clippy::needless_update)]
14873            fn to_owned_from_source(
14874                &self,
14875                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
14876            ) -> ::core::result::Result<
14877                super::super::FlowStepView,
14878                ::buffa::DecodeError,
14879            > {
14880                #[allow(unused_imports)]
14881                use ::buffa::alloc::string::ToString as _;
14882                let _ = __buffa_src;
14883                ::core::result::Result::Ok(super::super::FlowStepView {
14884                    sequence: self.sequence,
14885                    step: self.step,
14886                    asset_ids: match self.asset_ids.as_option() {
14887                        Some(v) => {
14888                            ::buffa::MessageField::<
14889                                super::super::AssetIds,
14890                            >::some(v.to_owned_from_source(__buffa_src)?)
14891                        }
14892                        None => ::buffa::MessageField::none(),
14893                    },
14894                    polyester_chain_id: self.polyester_chain_id,
14895                    amount_e18: match self.amount_e18.as_option() {
14896                        Some(v) => {
14897                            ::buffa::MessageField::<
14898                                super::super::super::super::super::polyester::r#type::v1::U128,
14899                            >::some(v.to_owned_from_source(__buffa_src)?)
14900                        }
14901                        None => ::buffa::MessageField::none(),
14902                    },
14903                    request_fee: match self.request_fee.as_option() {
14904                        Some(v) => {
14905                            ::buffa::MessageField::<
14906                                super::super::RequestFee,
14907                            >::some(v.to_owned_from_source(__buffa_src)?)
14908                        }
14909                        None => ::buffa::MessageField::none(),
14910                    },
14911                    milestone_tx_ref: self.milestone_tx_ref.to_string(),
14912                    lifecycle_source: self.lifecycle_source,
14913                    reason_code: self.reason_code,
14914                    current_confirmations: self.current_confirmations,
14915                    required_confirmations: self.required_confirmations,
14916                    approve_count: self.approve_count,
14917                    reject_count: self.reject_count,
14918                    validator_count: self.validator_count,
14919                    required_approvals: self.required_approvals,
14920                    required_rejections: self.required_rejections,
14921                    occurred_at_unix_ms: self.occurred_at_unix_ms,
14922                    block_time_moving_average_ms: self.block_time_moving_average_ms,
14923                    activities: self
14924                        .activities
14925                        .iter()
14926                        .map(|v| v.to_owned_from_source(__buffa_src))
14927                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
14928                    __buffa_unknown_fields: self
14929                        .__buffa_unknown_fields
14930                        .to_owned()?
14931                        .into(),
14932                    ..::core::default::Default::default()
14933                })
14934            }
14935        }
14936        impl<'a> ::buffa::ViewEncode<'a> for FlowStepViewView<'a> {
14937            #[allow(clippy::needless_borrow, clippy::let_and_return)]
14938            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
14939                #[allow(unused_imports)]
14940                use ::buffa::Enumeration as _;
14941                let mut size = 0u32;
14942                if self.sequence != 0u32 {
14943                    size
14944                        += 1u32
14945                            + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
14946                }
14947                {
14948                    let val = self.step.to_i32();
14949                    if val != 0 {
14950                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
14951                    }
14952                }
14953                if self.asset_ids.is_set() {
14954                    let __slot = __cache.reserve();
14955                    let inner_size = self.asset_ids.compute_size(__cache);
14956                    __cache.set(__slot, inner_size);
14957                    size
14958                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
14959                            + inner_size;
14960                }
14961                if self.polyester_chain_id != 0u32 {
14962                    size
14963                        += 1u32
14964                            + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
14965                                as u32;
14966                }
14967                if self.amount_e18.is_set() {
14968                    let __slot = __cache.reserve();
14969                    let inner_size = self.amount_e18.compute_size(__cache);
14970                    __cache.set(__slot, inner_size);
14971                    size
14972                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
14973                            + inner_size;
14974                }
14975                if !self.milestone_tx_ref.is_empty() {
14976                    size
14977                        += 1u32
14978                            + ::buffa::types::string_encoded_len(&self.milestone_tx_ref)
14979                                as u32;
14980                }
14981                {
14982                    let val = self.lifecycle_source.to_i32();
14983                    if val != 0 {
14984                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
14985                    }
14986                }
14987                {
14988                    let val = self.reason_code.to_i32();
14989                    if val != 0 {
14990                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
14991                    }
14992                }
14993                if self.current_confirmations != 0u32 {
14994                    size
14995                        += 1u32
14996                            + ::buffa::types::uint32_encoded_len(
14997                                self.current_confirmations,
14998                            ) as u32;
14999                }
15000                if self.required_confirmations != 0u32 {
15001                    size
15002                        += 1u32
15003                            + ::buffa::types::uint32_encoded_len(
15004                                self.required_confirmations,
15005                            ) as u32;
15006                }
15007                if self.approve_count != 0u32 {
15008                    size
15009                        += 2u32
15010                            + ::buffa::types::uint32_encoded_len(self.approve_count)
15011                                as u32;
15012                }
15013                if self.reject_count != 0u32 {
15014                    size
15015                        += 2u32
15016                            + ::buffa::types::uint32_encoded_len(self.reject_count)
15017                                as u32;
15018                }
15019                if self.validator_count != 0u32 {
15020                    size
15021                        += 2u32
15022                            + ::buffa::types::uint32_encoded_len(self.validator_count)
15023                                as u32;
15024                }
15025                if self.occurred_at_unix_ms != 0u64 {
15026                    size
15027                        += 2u32
15028                            + ::buffa::types::uint64_encoded_len(
15029                                self.occurred_at_unix_ms,
15030                            ) as u32;
15031                }
15032                if self.block_time_moving_average_ms != 0u64 {
15033                    size
15034                        += 2u32
15035                            + ::buffa::types::uint64_encoded_len(
15036                                self.block_time_moving_average_ms,
15037                            ) as u32;
15038                }
15039                for v in &self.activities {
15040                    let __slot = __cache.reserve();
15041                    let inner_size = v.compute_size(__cache);
15042                    __cache.set(__slot, inner_size);
15043                    size
15044                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15045                            + inner_size;
15046                }
15047                if self.required_approvals != 0u32 {
15048                    size
15049                        += 2u32
15050                            + ::buffa::types::uint32_encoded_len(self.required_approvals)
15051                                as u32;
15052                }
15053                if self.required_rejections != 0u32 {
15054                    size
15055                        += 2u32
15056                            + ::buffa::types::uint32_encoded_len(
15057                                self.required_rejections,
15058                            ) as u32;
15059                }
15060                if self.request_fee.is_set() {
15061                    let __slot = __cache.reserve();
15062                    let inner_size = self.request_fee.compute_size(__cache);
15063                    __cache.set(__slot, inner_size);
15064                    size
15065                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15066                            + inner_size;
15067                }
15068                size += self.__buffa_unknown_fields.encoded_len() as u32;
15069                size
15070            }
15071            #[allow(clippy::needless_borrow)]
15072            fn write_to(
15073                &self,
15074                __cache: &mut ::buffa::SizeCache,
15075                buf: &mut impl ::buffa::bytes::BufMut,
15076            ) {
15077                #[allow(unused_imports)]
15078                use ::buffa::Enumeration as _;
15079                if self.sequence != 0u32 {
15080                    ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
15081                }
15082                {
15083                    let val = self.step.to_i32();
15084                    if val != 0 {
15085                        ::buffa::types::put_int32_field(3u32, val, buf);
15086                    }
15087                }
15088                if self.asset_ids.is_set() {
15089                    ::buffa::types::put_len_delimited_header(
15090                        7u32,
15091                        __cache.consume_next(),
15092                        buf,
15093                    );
15094                    self.asset_ids.write_to(__cache, buf);
15095                }
15096                if self.polyester_chain_id != 0u32 {
15097                    ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
15098                }
15099                if self.amount_e18.is_set() {
15100                    ::buffa::types::put_len_delimited_header(
15101                        9u32,
15102                        __cache.consume_next(),
15103                        buf,
15104                    );
15105                    self.amount_e18.write_to(__cache, buf);
15106                }
15107                if !self.milestone_tx_ref.is_empty() {
15108                    ::buffa::types::put_string_field(11u32, &self.milestone_tx_ref, buf);
15109                }
15110                {
15111                    let val = self.lifecycle_source.to_i32();
15112                    if val != 0 {
15113                        ::buffa::types::put_int32_field(12u32, val, buf);
15114                    }
15115                }
15116                {
15117                    let val = self.reason_code.to_i32();
15118                    if val != 0 {
15119                        ::buffa::types::put_int32_field(13u32, val, buf);
15120                    }
15121                }
15122                if self.current_confirmations != 0u32 {
15123                    ::buffa::types::put_uint32_field(
15124                        14u32,
15125                        self.current_confirmations,
15126                        buf,
15127                    );
15128                }
15129                if self.required_confirmations != 0u32 {
15130                    ::buffa::types::put_uint32_field(
15131                        15u32,
15132                        self.required_confirmations,
15133                        buf,
15134                    );
15135                }
15136                if self.approve_count != 0u32 {
15137                    ::buffa::types::put_uint32_field(16u32, self.approve_count, buf);
15138                }
15139                if self.reject_count != 0u32 {
15140                    ::buffa::types::put_uint32_field(17u32, self.reject_count, buf);
15141                }
15142                if self.validator_count != 0u32 {
15143                    ::buffa::types::put_uint32_field(18u32, self.validator_count, buf);
15144                }
15145                if self.occurred_at_unix_ms != 0u64 {
15146                    ::buffa::types::put_uint64_field(
15147                        19u32,
15148                        self.occurred_at_unix_ms,
15149                        buf,
15150                    );
15151                }
15152                if self.block_time_moving_average_ms != 0u64 {
15153                    ::buffa::types::put_uint64_field(
15154                        20u32,
15155                        self.block_time_moving_average_ms,
15156                        buf,
15157                    );
15158                }
15159                for v in &self.activities {
15160                    ::buffa::types::put_len_delimited_header(
15161                        21u32,
15162                        __cache.consume_next(),
15163                        buf,
15164                    );
15165                    v.write_to(__cache, buf);
15166                }
15167                if self.required_approvals != 0u32 {
15168                    ::buffa::types::put_uint32_field(
15169                        22u32,
15170                        self.required_approvals,
15171                        buf,
15172                    );
15173                }
15174                if self.required_rejections != 0u32 {
15175                    ::buffa::types::put_uint32_field(
15176                        23u32,
15177                        self.required_rejections,
15178                        buf,
15179                    );
15180                }
15181                if self.request_fee.is_set() {
15182                    ::buffa::types::put_len_delimited_header(
15183                        24u32,
15184                        __cache.consume_next(),
15185                        buf,
15186                    );
15187                    self.request_fee.write_to(__cache, buf);
15188                }
15189                self.__buffa_unknown_fields.write_to(buf);
15190            }
15191        }
15192        /// Serializes this view as protobuf JSON.
15193        ///
15194        /// Implicit-presence fields with default values are omitted, `required`
15195        /// fields are always emitted, explicit-presence (`optional`) fields are
15196        /// emitted only when set, bytes fields are base64-encoded, and enum
15197        /// values are their proto name strings.
15198        ///
15199        /// This impl uses `serialize_map(None)` because the number of emitted
15200        /// fields depends on default-omission rules; serializers that require
15201        /// known map lengths (e.g. `bincode`) will return a runtime error.
15202        /// Use the owned message type for those formats.
15203        impl<'__a> ::serde::Serialize for FlowStepViewView<'__a> {
15204            fn serialize<__S: ::serde::Serializer>(
15205                &self,
15206                __s: __S,
15207            ) -> ::core::result::Result<__S::Ok, __S::Error> {
15208                use ::serde::ser::SerializeMap as _;
15209                let mut __map = __s.serialize_map(::core::option::Option::None)?;
15210                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
15211                    __map
15212                        .serialize_entry(
15213                            "sequence",
15214                            &::buffa::json_helpers::ProtoJson(&self.sequence),
15215                        )?;
15216                }
15217                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.step) {
15218                    __map.serialize_entry("step", &self.step)?;
15219                }
15220                {
15221                    if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
15222                    {
15223                        __map.serialize_entry("assetIds", __v)?;
15224                    }
15225                }
15226                if !::buffa::json_helpers::skip_if::is_zero_u32(
15227                    &self.polyester_chain_id,
15228                ) {
15229                    __map
15230                        .serialize_entry(
15231                            "polyesterChainId",
15232                            &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
15233                        )?;
15234                }
15235                {
15236                    if let ::core::option::Option::Some(__v) = self
15237                        .amount_e18
15238                        .as_option()
15239                    {
15240                        __map.serialize_entry("amountE18", __v)?;
15241                    }
15242                }
15243                {
15244                    if let ::core::option::Option::Some(__v) = self
15245                        .request_fee
15246                        .as_option()
15247                    {
15248                        __map.serialize_entry("requestFee", __v)?;
15249                    }
15250                }
15251                if !::buffa::json_helpers::skip_if::is_empty_str(self.milestone_tx_ref) {
15252                    __map.serialize_entry("milestoneTxRef", self.milestone_tx_ref)?;
15253                }
15254                if !::buffa::json_helpers::skip_if::is_default_enum_value(
15255                    &self.lifecycle_source,
15256                ) {
15257                    __map.serialize_entry("lifecycleSource", &self.lifecycle_source)?;
15258                }
15259                if !::buffa::json_helpers::skip_if::is_default_enum_value(
15260                    &self.reason_code,
15261                ) {
15262                    __map.serialize_entry("reasonCode", &self.reason_code)?;
15263                }
15264                if !::buffa::json_helpers::skip_if::is_zero_u32(
15265                    &self.current_confirmations,
15266                ) {
15267                    __map
15268                        .serialize_entry(
15269                            "currentConfirmations",
15270                            &::buffa::json_helpers::ProtoJson(
15271                                &self.current_confirmations,
15272                            ),
15273                        )?;
15274                }
15275                if !::buffa::json_helpers::skip_if::is_zero_u32(
15276                    &self.required_confirmations,
15277                ) {
15278                    __map
15279                        .serialize_entry(
15280                            "requiredConfirmations",
15281                            &::buffa::json_helpers::ProtoJson(
15282                                &self.required_confirmations,
15283                            ),
15284                        )?;
15285                }
15286                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
15287                    __map
15288                        .serialize_entry(
15289                            "approveCount",
15290                            &::buffa::json_helpers::ProtoJson(&self.approve_count),
15291                        )?;
15292                }
15293                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
15294                    __map
15295                        .serialize_entry(
15296                            "rejectCount",
15297                            &::buffa::json_helpers::ProtoJson(&self.reject_count),
15298                        )?;
15299                }
15300                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
15301                    __map
15302                        .serialize_entry(
15303                            "validatorCount",
15304                            &::buffa::json_helpers::ProtoJson(&self.validator_count),
15305                        )?;
15306                }
15307                if !::buffa::json_helpers::skip_if::is_zero_u32(
15308                    &self.required_approvals,
15309                ) {
15310                    __map
15311                        .serialize_entry(
15312                            "requiredApprovals",
15313                            &::buffa::json_helpers::ProtoJson(&self.required_approvals),
15314                        )?;
15315                }
15316                if !::buffa::json_helpers::skip_if::is_zero_u32(
15317                    &self.required_rejections,
15318                ) {
15319                    __map
15320                        .serialize_entry(
15321                            "requiredRejections",
15322                            &::buffa::json_helpers::ProtoJson(&self.required_rejections),
15323                        )?;
15324                }
15325                if !::buffa::json_helpers::skip_if::is_zero_u64(
15326                    &self.occurred_at_unix_ms,
15327                ) {
15328                    __map
15329                        .serialize_entry(
15330                            "occurredAtUnixMs",
15331                            &::buffa::json_helpers::ProtoJson(&self.occurred_at_unix_ms),
15332                        )?;
15333                }
15334                if !::buffa::json_helpers::skip_if::is_zero_u64(
15335                    &self.block_time_moving_average_ms,
15336                ) {
15337                    __map
15338                        .serialize_entry(
15339                            "blockTimeMovingAverageMs",
15340                            &::buffa::json_helpers::ProtoJson(
15341                                &self.block_time_moving_average_ms,
15342                            ),
15343                        )?;
15344                }
15345                if !self.activities.is_empty() {
15346                    __map.serialize_entry("activities", &*self.activities)?;
15347                }
15348                __map.end()
15349            }
15350        }
15351        impl<'a> ::buffa::MessageName for FlowStepViewView<'a> {
15352            const PACKAGE: &'static str = "chain.lifecycle.v1";
15353            const NAME: &'static str = "FlowStepView";
15354            const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepView";
15355            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
15356        }
15357        ::buffa::impl_default_view_instance!(FlowStepViewView);
15358        ::buffa::impl_view_reborrow!(FlowStepViewView);
15359        /** Self-contained, `'static` owned view of a `FlowStepView` message.
15360
15361 Wraps [`::buffa::OwnedView`]`<`[`FlowStepViewView`]`<'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.
15362
15363 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FlowStepViewView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
15364        #[derive(Clone, Debug)]
15365        pub struct FlowStepViewOwnedView(::buffa::OwnedView<FlowStepViewView<'static>>);
15366        impl FlowStepViewOwnedView {
15367            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
15368            ///
15369            /// The view borrows directly from the buffer's data; the buffer is
15370            /// retained inside the returned handle.
15371            ///
15372            /// # Errors
15373            ///
15374            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
15375            /// protobuf data.
15376            pub fn decode(
15377                bytes: ::buffa::bytes::Bytes,
15378            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15379                ::core::result::Result::Ok(
15380                    FlowStepViewOwnedView(::buffa::OwnedView::decode(bytes)?),
15381                )
15382            }
15383            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
15384            /// max message size).
15385            ///
15386            /// # Errors
15387            ///
15388            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
15389            /// exceeds the configured limits.
15390            pub fn decode_with_options(
15391                bytes: ::buffa::bytes::Bytes,
15392                opts: &::buffa::DecodeOptions,
15393            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15394                ::core::result::Result::Ok(
15395                    FlowStepViewOwnedView(
15396                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
15397                    ),
15398                )
15399            }
15400            /// Build from an owned message via an encode → decode round-trip.
15401            ///
15402            /// # Errors
15403            ///
15404            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
15405            /// somehow invalid (should not happen for well-formed messages).
15406            pub fn from_owned(
15407                msg: &super::super::FlowStepView,
15408            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15409                ::core::result::Result::Ok(
15410                    FlowStepViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
15411                )
15412            }
15413            /// Borrow the full [`FlowStepViewView`] with its lifetime tied to `&self`.
15414            #[must_use]
15415            pub fn view(&self) -> &FlowStepViewView<'_> {
15416                self.0.reborrow()
15417            }
15418            /// Convert to the owned message type.
15419            ///
15420            /// # Errors
15421            ///
15422            /// Returns an error if re-materializing preserved unknown fields
15423            /// fails (e.g. the unknown-field limit is exceeded).
15424            pub fn to_owned_message(
15425                &self,
15426            ) -> ::core::result::Result<
15427                super::super::FlowStepView,
15428                ::buffa::DecodeError,
15429            > {
15430                self.0.to_owned_message()
15431            }
15432            /// The underlying bytes buffer.
15433            #[must_use]
15434            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
15435                self.0.bytes()
15436            }
15437            /// Consume the handle, returning the underlying bytes buffer.
15438            #[must_use]
15439            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
15440                self.0.into_bytes()
15441            }
15442            /// One-based observed step sequence for display and audit.
15443            ///
15444            /// Field 1: `sequence`
15445            #[must_use]
15446            pub fn sequence(&self) -> u32 {
15447                self.0.reborrow().sequence
15448            }
15449            /// Business-facing observed step.
15450            ///
15451            /// Field 3: `step`
15452            #[must_use]
15453            pub fn step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
15454                self.0.reborrow().step
15455            }
15456            /// Asset identifiers involved in this step.
15457            ///
15458            /// Field 7: `asset_ids`
15459            #[must_use]
15460            pub fn asset_ids(
15461                &self,
15462            ) -> &::buffa::MessageFieldView<
15463                super::super::__buffa::view::AssetIdsView<'_>,
15464            > {
15465                &self.0.reborrow().asset_ids
15466            }
15467            /// Polyester Chain id associated with this step when known.
15468            ///
15469            /// Field 8: `polyester_chain_id`
15470            #[must_use]
15471            pub fn polyester_chain_id(&self) -> u32 {
15472                self.0.reborrow().polyester_chain_id
15473            }
15474            /// Amount represented by this step in 18-decimal unified asset units. Steps
15475            /// may carry the actual net movement amount when fees have already been taken.
15476            ///
15477            /// Field 9: `amount_e18`
15478            #[must_use]
15479            pub fn amount_e18(
15480                &self,
15481            ) -> &::buffa::MessageFieldView<
15482                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
15483                    '_,
15484                >,
15485            > {
15486                &self.0.reborrow().amount_e18
15487            }
15488            /// Request-scoped fee details when a fee applies to this step.
15489            ///
15490            /// Field 24: `request_fee`
15491            #[must_use]
15492            pub fn request_fee(
15493                &self,
15494            ) -> &::buffa::MessageFieldView<
15495                super::super::__buffa::view::RequestFeeView<'_>,
15496            > {
15497                &self.0.reborrow().request_fee
15498            }
15499            /// Transaction reference most relevant to this step.
15500            ///
15501            /// Field 11: `milestone_tx_ref`
15502            #[must_use]
15503            pub fn milestone_tx_ref(&self) -> &'_ str {
15504                self.0.reborrow().milestone_tx_ref
15505            }
15506            /// Source that produced this visible step.
15507            ///
15508            /// Field 12: `lifecycle_source`
15509            #[must_use]
15510            pub fn lifecycle_source(
15511                &self,
15512            ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
15513                self.0.reborrow().lifecycle_source
15514            }
15515            /// Product-facing reason for failed, dropped, or otherwise notable steps.
15516            ///
15517            /// Field 13: `reason_code`
15518            #[must_use]
15519            pub fn reason_code(&self) -> ::buffa::EnumValue<super::super::FlowReason> {
15520                self.0.reborrow().reason_code
15521            }
15522            /// Current source confirmation count when confirmations apply.
15523            ///
15524            /// Field 14: `current_confirmations`
15525            #[must_use]
15526            pub fn current_confirmations(&self) -> u32 {
15527                self.0.reborrow().current_confirmations
15528            }
15529            /// Required source confirmation count when confirmations apply.
15530            ///
15531            /// Field 15: `required_confirmations`
15532            #[must_use]
15533            pub fn required_confirmations(&self) -> u32 {
15534                self.0.reborrow().required_confirmations
15535            }
15536            /// Current approval count when validation applies.
15537            ///
15538            /// Field 16: `approve_count`
15539            #[must_use]
15540            pub fn approve_count(&self) -> u32 {
15541                self.0.reborrow().approve_count
15542            }
15543            /// Current rejection count when validation applies.
15544            ///
15545            /// Field 17: `reject_count`
15546            #[must_use]
15547            pub fn reject_count(&self) -> u32 {
15548                self.0.reborrow().reject_count
15549            }
15550            /// Validator set size when validation applies.
15551            ///
15552            /// Field 18: `validator_count`
15553            #[must_use]
15554            pub fn validator_count(&self) -> u32 {
15555                self.0.reborrow().validator_count
15556            }
15557            /// Approval count required for this validation step.
15558            ///
15559            /// Field 22: `required_approvals`
15560            #[must_use]
15561            pub fn required_approvals(&self) -> u32 {
15562                self.0.reborrow().required_approvals
15563            }
15564            /// Rejection count that would fail this validation step.
15565            ///
15566            /// Field 23: `required_rejections`
15567            #[must_use]
15568            pub fn required_rejections(&self) -> u32 {
15569                self.0.reborrow().required_rejections
15570            }
15571            /// Step occurrence timestamp in milliseconds since epoch (UTC).
15572            ///
15573            /// Field 19: `occurred_at_unix_ms`
15574            #[must_use]
15575            pub fn occurred_at_unix_ms(&self) -> u64 {
15576                self.0.reborrow().occurred_at_unix_ms
15577            }
15578            /// Source-chain block time moving average in milliseconds when known.
15579            ///
15580            /// Field 20: `block_time_moving_average_ms`
15581            #[must_use]
15582            pub fn block_time_moving_average_ms(&self) -> u64 {
15583                self.0.reborrow().block_time_moving_average_ms
15584            }
15585            /// Nested activity rows for expandable UI detail. The top-level step remains
15586            /// one visible lifecycle stage while activities expose the underlying on-chain
15587            /// evidence that advanced it.
15588            ///
15589            /// Field 21: `activities`
15590            #[must_use]
15591            pub fn activities(
15592                &self,
15593            ) -> &::buffa::RepeatedView<
15594                '_,
15595                super::super::__buffa::view::FlowStepActivityViewView<'_>,
15596            > {
15597                &self.0.reborrow().activities
15598            }
15599        }
15600        impl ::core::convert::From<::buffa::OwnedView<FlowStepViewView<'static>>>
15601        for FlowStepViewOwnedView {
15602            fn from(inner: ::buffa::OwnedView<FlowStepViewView<'static>>) -> Self {
15603                FlowStepViewOwnedView(inner)
15604            }
15605        }
15606        impl ::core::convert::From<FlowStepViewOwnedView>
15607        for ::buffa::OwnedView<FlowStepViewView<'static>> {
15608            fn from(wrapper: FlowStepViewOwnedView) -> Self {
15609                wrapper.0
15610            }
15611        }
15612        impl ::core::convert::AsRef<::buffa::OwnedView<FlowStepViewView<'static>>>
15613        for FlowStepViewOwnedView {
15614            fn as_ref(&self) -> &::buffa::OwnedView<FlowStepViewView<'static>> {
15615                &self.0
15616            }
15617        }
15618        impl ::buffa::HasMessageView for super::super::FlowStepView {
15619            type View<'a> = FlowStepViewView<'a>;
15620            type ViewHandle = FlowStepViewOwnedView;
15621        }
15622        impl ::serde::Serialize for FlowStepViewOwnedView {
15623            fn serialize<__S: ::serde::Serializer>(
15624                &self,
15625                __s: __S,
15626            ) -> ::core::result::Result<__S::Ok, __S::Error> {
15627                ::serde::Serialize::serialize(&self.0, __s)
15628            }
15629        }
15630        /// FlowStepActivityView is an expandable detail row underneath a visible step.
15631        #[derive(Clone, Debug, Default)]
15632        pub struct FlowStepActivityViewView<'a> {
15633            /// Sequence of the underlying activity within the flow.
15634            ///
15635            /// Field 1: `sequence`
15636            pub sequence: u32,
15637            /// Transaction reference associated with this activity.
15638            ///
15639            /// Field 2: `tx_ref`
15640            pub tx_ref: &'a str,
15641            /// Activity occurrence timestamp in milliseconds since epoch (UTC).
15642            ///
15643            /// Field 3: `occurred_at_unix_ms`
15644            pub occurred_at_unix_ms: u64,
15645            /// Source that produced this activity.
15646            ///
15647            /// Field 4: `lifecycle_source`
15648            pub lifecycle_source: ::buffa::EnumValue<super::super::LifecycleSource>,
15649            /// Product-facing reason for notable activity states.
15650            ///
15651            /// Field 5: `reason_code`
15652            pub reason_code: ::buffa::EnumValue<super::super::FlowReason>,
15653            /// Current source confirmation count when confirmations apply.
15654            ///
15655            /// Field 6: `current_confirmations`
15656            pub current_confirmations: u32,
15657            /// Required source confirmation count when confirmations apply.
15658            ///
15659            /// Field 7: `required_confirmations`
15660            pub required_confirmations: u32,
15661            /// Current approval count when validation applies.
15662            ///
15663            /// Field 8: `approve_count`
15664            pub approve_count: u32,
15665            /// Current rejection count when validation applies.
15666            ///
15667            /// Field 9: `reject_count`
15668            pub reject_count: u32,
15669            /// Validator set size when validation applies.
15670            ///
15671            /// Field 10: `validator_count`
15672            pub validator_count: u32,
15673            /// Activity kind for display grouping.
15674            ///
15675            /// Field 11: `kind`
15676            pub kind: ::buffa::EnumValue<super::super::FlowStepActivityKind>,
15677            /// Approval count required for this activity.
15678            ///
15679            /// Field 12: `required_approvals`
15680            pub required_approvals: u32,
15681            /// Rejection count that would fail this activity.
15682            ///
15683            /// Field 13: `required_rejections`
15684            pub required_rejections: u32,
15685            /// Amount posted by the underlying movement represented by this activity, in
15686            /// 18-decimal unified asset units. This may be a net movement amount for
15687            /// fee-bearing fulfillment activity.
15688            ///
15689            /// Field 14: `amount_e18`
15690            pub amount_e18: ::buffa::MessageFieldView<
15691                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
15692                    'a,
15693                >,
15694            >,
15695            /// Ledger transfer identifier for ledger-sourced settlement activities.
15696            ///
15697            /// Field 15: `ledger_transfer_id`
15698            pub ledger_transfer_id: &'a str,
15699            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
15700        }
15701        impl<'a> ::buffa::MessageView<'a> for FlowStepActivityViewView<'a> {
15702            type Owned = super::super::FlowStepActivityView;
15703            fn decode_view(
15704                buf: &'a [u8],
15705            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15706                let __limit = ::core::cell::Cell::new(
15707                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
15708                );
15709                <Self as ::buffa::MessageView>::decode_view_ctx(
15710                    buf,
15711                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
15712                )
15713            }
15714            fn decode_view_with_ctx(
15715                buf: &'a [u8],
15716                ctx: ::buffa::DecodeContext<'_>,
15717            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15718                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
15719            }
15720            fn merge_view_field(
15721                &mut self,
15722                tag: ::buffa::encoding::Tag,
15723                cur: &'a [u8],
15724                before_tag: &'a [u8],
15725                ctx: ::buffa::DecodeContext<'_>,
15726            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
15727                let _ = ctx;
15728                #[allow(unused_variables)]
15729                let view = self;
15730                let mut cur = cur;
15731                match tag.field_number() {
15732                    1u32 => {
15733                        ::buffa::encoding::check_wire_type(
15734                            tag,
15735                            ::buffa::encoding::WireType::Varint,
15736                        )?;
15737                        view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
15738                    }
15739                    2u32 => {
15740                        ::buffa::encoding::check_wire_type(
15741                            tag,
15742                            ::buffa::encoding::WireType::LengthDelimited,
15743                        )?;
15744                        view.tx_ref = ::buffa::types::borrow_str(&mut cur)?;
15745                    }
15746                    3u32 => {
15747                        ::buffa::encoding::check_wire_type(
15748                            tag,
15749                            ::buffa::encoding::WireType::Varint,
15750                        )?;
15751                        view.occurred_at_unix_ms = ::buffa::types::decode_uint64(
15752                            &mut cur,
15753                        )?;
15754                    }
15755                    4u32 => {
15756                        ::buffa::encoding::check_wire_type(
15757                            tag,
15758                            ::buffa::encoding::WireType::Varint,
15759                        )?;
15760                        view.lifecycle_source = ::buffa::EnumValue::from(
15761                            ::buffa::types::decode_int32(&mut cur)?,
15762                        );
15763                    }
15764                    5u32 => {
15765                        ::buffa::encoding::check_wire_type(
15766                            tag,
15767                            ::buffa::encoding::WireType::Varint,
15768                        )?;
15769                        view.reason_code = ::buffa::EnumValue::from(
15770                            ::buffa::types::decode_int32(&mut cur)?,
15771                        );
15772                    }
15773                    6u32 => {
15774                        ::buffa::encoding::check_wire_type(
15775                            tag,
15776                            ::buffa::encoding::WireType::Varint,
15777                        )?;
15778                        view.current_confirmations = ::buffa::types::decode_uint32(
15779                            &mut cur,
15780                        )?;
15781                    }
15782                    7u32 => {
15783                        ::buffa::encoding::check_wire_type(
15784                            tag,
15785                            ::buffa::encoding::WireType::Varint,
15786                        )?;
15787                        view.required_confirmations = ::buffa::types::decode_uint32(
15788                            &mut cur,
15789                        )?;
15790                    }
15791                    8u32 => {
15792                        ::buffa::encoding::check_wire_type(
15793                            tag,
15794                            ::buffa::encoding::WireType::Varint,
15795                        )?;
15796                        view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
15797                    }
15798                    9u32 => {
15799                        ::buffa::encoding::check_wire_type(
15800                            tag,
15801                            ::buffa::encoding::WireType::Varint,
15802                        )?;
15803                        view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
15804                    }
15805                    10u32 => {
15806                        ::buffa::encoding::check_wire_type(
15807                            tag,
15808                            ::buffa::encoding::WireType::Varint,
15809                        )?;
15810                        view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
15811                    }
15812                    11u32 => {
15813                        ::buffa::encoding::check_wire_type(
15814                            tag,
15815                            ::buffa::encoding::WireType::Varint,
15816                        )?;
15817                        view.kind = ::buffa::EnumValue::from(
15818                            ::buffa::types::decode_int32(&mut cur)?,
15819                        );
15820                    }
15821                    12u32 => {
15822                        ::buffa::encoding::check_wire_type(
15823                            tag,
15824                            ::buffa::encoding::WireType::Varint,
15825                        )?;
15826                        view.required_approvals = ::buffa::types::decode_uint32(
15827                            &mut cur,
15828                        )?;
15829                    }
15830                    13u32 => {
15831                        ::buffa::encoding::check_wire_type(
15832                            tag,
15833                            ::buffa::encoding::WireType::Varint,
15834                        )?;
15835                        view.required_rejections = ::buffa::types::decode_uint32(
15836                            &mut cur,
15837                        )?;
15838                    }
15839                    14u32 => {
15840                        ::buffa::encoding::check_wire_type(
15841                            tag,
15842                            ::buffa::encoding::WireType::LengthDelimited,
15843                        )?;
15844                        let __sub_ctx = ctx.descend()?;
15845                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
15846                        match view.amount_e18.as_mut() {
15847                            Some(existing) => {
15848                                ::buffa::MessageView::merge_into_view(
15849                                    existing,
15850                                    sub,
15851                                    __sub_ctx,
15852                                )?
15853                            }
15854                            None => {
15855                                view.amount_e18 = ::buffa::MessageFieldView::set(
15856                                    <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
15857                                        sub,
15858                                        __sub_ctx,
15859                                    )?,
15860                                );
15861                            }
15862                        }
15863                    }
15864                    15u32 => {
15865                        ::buffa::encoding::check_wire_type(
15866                            tag,
15867                            ::buffa::encoding::WireType::LengthDelimited,
15868                        )?;
15869                        view.ledger_transfer_id = ::buffa::types::borrow_str(&mut cur)?;
15870                    }
15871                    _ => {
15872                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
15873                        let span_len = before_tag.len() - cur.len();
15874                        view.__buffa_unknown_fields
15875                            .push_record(before_tag, span_len, ctx)?;
15876                    }
15877                }
15878                ::core::result::Result::Ok(cur)
15879            }
15880            fn to_owned_message(
15881                &self,
15882            ) -> ::core::result::Result<
15883                super::super::FlowStepActivityView,
15884                ::buffa::DecodeError,
15885            > {
15886                self.to_owned_from_source(None)
15887            }
15888            #[allow(clippy::useless_conversion, clippy::needless_update)]
15889            fn to_owned_from_source(
15890                &self,
15891                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
15892            ) -> ::core::result::Result<
15893                super::super::FlowStepActivityView,
15894                ::buffa::DecodeError,
15895            > {
15896                #[allow(unused_imports)]
15897                use ::buffa::alloc::string::ToString as _;
15898                let _ = __buffa_src;
15899                ::core::result::Result::Ok(super::super::FlowStepActivityView {
15900                    sequence: self.sequence,
15901                    tx_ref: self.tx_ref.to_string(),
15902                    occurred_at_unix_ms: self.occurred_at_unix_ms,
15903                    lifecycle_source: self.lifecycle_source,
15904                    reason_code: self.reason_code,
15905                    current_confirmations: self.current_confirmations,
15906                    required_confirmations: self.required_confirmations,
15907                    approve_count: self.approve_count,
15908                    reject_count: self.reject_count,
15909                    validator_count: self.validator_count,
15910                    kind: self.kind,
15911                    required_approvals: self.required_approvals,
15912                    required_rejections: self.required_rejections,
15913                    amount_e18: match self.amount_e18.as_option() {
15914                        Some(v) => {
15915                            ::buffa::MessageField::<
15916                                super::super::super::super::super::polyester::r#type::v1::U128,
15917                            >::some(v.to_owned_from_source(__buffa_src)?)
15918                        }
15919                        None => ::buffa::MessageField::none(),
15920                    },
15921                    ledger_transfer_id: self.ledger_transfer_id.to_string(),
15922                    __buffa_unknown_fields: self
15923                        .__buffa_unknown_fields
15924                        .to_owned()?
15925                        .into(),
15926                    ..::core::default::Default::default()
15927                })
15928            }
15929        }
15930        impl<'a> ::buffa::ViewEncode<'a> for FlowStepActivityViewView<'a> {
15931            #[allow(clippy::needless_borrow, clippy::let_and_return)]
15932            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
15933                #[allow(unused_imports)]
15934                use ::buffa::Enumeration as _;
15935                let mut size = 0u32;
15936                if self.sequence != 0u32 {
15937                    size
15938                        += 1u32
15939                            + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
15940                }
15941                if !self.tx_ref.is_empty() {
15942                    size
15943                        += 1u32
15944                            + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
15945                }
15946                if self.occurred_at_unix_ms != 0u64 {
15947                    size
15948                        += 1u32
15949                            + ::buffa::types::uint64_encoded_len(
15950                                self.occurred_at_unix_ms,
15951                            ) as u32;
15952                }
15953                {
15954                    let val = self.lifecycle_source.to_i32();
15955                    if val != 0 {
15956                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
15957                    }
15958                }
15959                {
15960                    let val = self.reason_code.to_i32();
15961                    if val != 0 {
15962                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
15963                    }
15964                }
15965                if self.current_confirmations != 0u32 {
15966                    size
15967                        += 1u32
15968                            + ::buffa::types::uint32_encoded_len(
15969                                self.current_confirmations,
15970                            ) as u32;
15971                }
15972                if self.required_confirmations != 0u32 {
15973                    size
15974                        += 1u32
15975                            + ::buffa::types::uint32_encoded_len(
15976                                self.required_confirmations,
15977                            ) as u32;
15978                }
15979                if self.approve_count != 0u32 {
15980                    size
15981                        += 1u32
15982                            + ::buffa::types::uint32_encoded_len(self.approve_count)
15983                                as u32;
15984                }
15985                if self.reject_count != 0u32 {
15986                    size
15987                        += 1u32
15988                            + ::buffa::types::uint32_encoded_len(self.reject_count)
15989                                as u32;
15990                }
15991                if self.validator_count != 0u32 {
15992                    size
15993                        += 1u32
15994                            + ::buffa::types::uint32_encoded_len(self.validator_count)
15995                                as u32;
15996                }
15997                {
15998                    let val = self.kind.to_i32();
15999                    if val != 0 {
16000                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16001                    }
16002                }
16003                if self.required_approvals != 0u32 {
16004                    size
16005                        += 1u32
16006                            + ::buffa::types::uint32_encoded_len(self.required_approvals)
16007                                as u32;
16008                }
16009                if self.required_rejections != 0u32 {
16010                    size
16011                        += 1u32
16012                            + ::buffa::types::uint32_encoded_len(
16013                                self.required_rejections,
16014                            ) as u32;
16015                }
16016                if self.amount_e18.is_set() {
16017                    let __slot = __cache.reserve();
16018                    let inner_size = self.amount_e18.compute_size(__cache);
16019                    __cache.set(__slot, inner_size);
16020                    size
16021                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
16022                            + inner_size;
16023                }
16024                if !self.ledger_transfer_id.is_empty() {
16025                    size
16026                        += 1u32
16027                            + ::buffa::types::string_encoded_len(
16028                                &self.ledger_transfer_id,
16029                            ) as u32;
16030                }
16031                size += self.__buffa_unknown_fields.encoded_len() as u32;
16032                size
16033            }
16034            #[allow(clippy::needless_borrow)]
16035            fn write_to(
16036                &self,
16037                __cache: &mut ::buffa::SizeCache,
16038                buf: &mut impl ::buffa::bytes::BufMut,
16039            ) {
16040                #[allow(unused_imports)]
16041                use ::buffa::Enumeration as _;
16042                if self.sequence != 0u32 {
16043                    ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
16044                }
16045                if !self.tx_ref.is_empty() {
16046                    ::buffa::types::put_string_field(2u32, &self.tx_ref, buf);
16047                }
16048                if self.occurred_at_unix_ms != 0u64 {
16049                    ::buffa::types::put_uint64_field(
16050                        3u32,
16051                        self.occurred_at_unix_ms,
16052                        buf,
16053                    );
16054                }
16055                {
16056                    let val = self.lifecycle_source.to_i32();
16057                    if val != 0 {
16058                        ::buffa::types::put_int32_field(4u32, val, buf);
16059                    }
16060                }
16061                {
16062                    let val = self.reason_code.to_i32();
16063                    if val != 0 {
16064                        ::buffa::types::put_int32_field(5u32, val, buf);
16065                    }
16066                }
16067                if self.current_confirmations != 0u32 {
16068                    ::buffa::types::put_uint32_field(
16069                        6u32,
16070                        self.current_confirmations,
16071                        buf,
16072                    );
16073                }
16074                if self.required_confirmations != 0u32 {
16075                    ::buffa::types::put_uint32_field(
16076                        7u32,
16077                        self.required_confirmations,
16078                        buf,
16079                    );
16080                }
16081                if self.approve_count != 0u32 {
16082                    ::buffa::types::put_uint32_field(8u32, self.approve_count, buf);
16083                }
16084                if self.reject_count != 0u32 {
16085                    ::buffa::types::put_uint32_field(9u32, self.reject_count, buf);
16086                }
16087                if self.validator_count != 0u32 {
16088                    ::buffa::types::put_uint32_field(10u32, self.validator_count, buf);
16089                }
16090                {
16091                    let val = self.kind.to_i32();
16092                    if val != 0 {
16093                        ::buffa::types::put_int32_field(11u32, val, buf);
16094                    }
16095                }
16096                if self.required_approvals != 0u32 {
16097                    ::buffa::types::put_uint32_field(
16098                        12u32,
16099                        self.required_approvals,
16100                        buf,
16101                    );
16102                }
16103                if self.required_rejections != 0u32 {
16104                    ::buffa::types::put_uint32_field(
16105                        13u32,
16106                        self.required_rejections,
16107                        buf,
16108                    );
16109                }
16110                if self.amount_e18.is_set() {
16111                    ::buffa::types::put_len_delimited_header(
16112                        14u32,
16113                        __cache.consume_next(),
16114                        buf,
16115                    );
16116                    self.amount_e18.write_to(__cache, buf);
16117                }
16118                if !self.ledger_transfer_id.is_empty() {
16119                    ::buffa::types::put_string_field(
16120                        15u32,
16121                        &self.ledger_transfer_id,
16122                        buf,
16123                    );
16124                }
16125                self.__buffa_unknown_fields.write_to(buf);
16126            }
16127        }
16128        /// Serializes this view as protobuf JSON.
16129        ///
16130        /// Implicit-presence fields with default values are omitted, `required`
16131        /// fields are always emitted, explicit-presence (`optional`) fields are
16132        /// emitted only when set, bytes fields are base64-encoded, and enum
16133        /// values are their proto name strings.
16134        ///
16135        /// This impl uses `serialize_map(None)` because the number of emitted
16136        /// fields depends on default-omission rules; serializers that require
16137        /// known map lengths (e.g. `bincode`) will return a runtime error.
16138        /// Use the owned message type for those formats.
16139        impl<'__a> ::serde::Serialize for FlowStepActivityViewView<'__a> {
16140            fn serialize<__S: ::serde::Serializer>(
16141                &self,
16142                __s: __S,
16143            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16144                use ::serde::ser::SerializeMap as _;
16145                let mut __map = __s.serialize_map(::core::option::Option::None)?;
16146                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
16147                    __map
16148                        .serialize_entry(
16149                            "sequence",
16150                            &::buffa::json_helpers::ProtoJson(&self.sequence),
16151                        )?;
16152                }
16153                if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_ref) {
16154                    __map.serialize_entry("txRef", self.tx_ref)?;
16155                }
16156                if !::buffa::json_helpers::skip_if::is_zero_u64(
16157                    &self.occurred_at_unix_ms,
16158                ) {
16159                    __map
16160                        .serialize_entry(
16161                            "occurredAtUnixMs",
16162                            &::buffa::json_helpers::ProtoJson(&self.occurred_at_unix_ms),
16163                        )?;
16164                }
16165                if !::buffa::json_helpers::skip_if::is_default_enum_value(
16166                    &self.lifecycle_source,
16167                ) {
16168                    __map.serialize_entry("lifecycleSource", &self.lifecycle_source)?;
16169                }
16170                if !::buffa::json_helpers::skip_if::is_default_enum_value(
16171                    &self.reason_code,
16172                ) {
16173                    __map.serialize_entry("reasonCode", &self.reason_code)?;
16174                }
16175                if !::buffa::json_helpers::skip_if::is_zero_u32(
16176                    &self.current_confirmations,
16177                ) {
16178                    __map
16179                        .serialize_entry(
16180                            "currentConfirmations",
16181                            &::buffa::json_helpers::ProtoJson(
16182                                &self.current_confirmations,
16183                            ),
16184                        )?;
16185                }
16186                if !::buffa::json_helpers::skip_if::is_zero_u32(
16187                    &self.required_confirmations,
16188                ) {
16189                    __map
16190                        .serialize_entry(
16191                            "requiredConfirmations",
16192                            &::buffa::json_helpers::ProtoJson(
16193                                &self.required_confirmations,
16194                            ),
16195                        )?;
16196                }
16197                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
16198                    __map
16199                        .serialize_entry(
16200                            "approveCount",
16201                            &::buffa::json_helpers::ProtoJson(&self.approve_count),
16202                        )?;
16203                }
16204                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
16205                    __map
16206                        .serialize_entry(
16207                            "rejectCount",
16208                            &::buffa::json_helpers::ProtoJson(&self.reject_count),
16209                        )?;
16210                }
16211                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
16212                    __map
16213                        .serialize_entry(
16214                            "validatorCount",
16215                            &::buffa::json_helpers::ProtoJson(&self.validator_count),
16216                        )?;
16217                }
16218                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.kind) {
16219                    __map.serialize_entry("kind", &self.kind)?;
16220                }
16221                if !::buffa::json_helpers::skip_if::is_zero_u32(
16222                    &self.required_approvals,
16223                ) {
16224                    __map
16225                        .serialize_entry(
16226                            "requiredApprovals",
16227                            &::buffa::json_helpers::ProtoJson(&self.required_approvals),
16228                        )?;
16229                }
16230                if !::buffa::json_helpers::skip_if::is_zero_u32(
16231                    &self.required_rejections,
16232                ) {
16233                    __map
16234                        .serialize_entry(
16235                            "requiredRejections",
16236                            &::buffa::json_helpers::ProtoJson(&self.required_rejections),
16237                        )?;
16238                }
16239                {
16240                    if let ::core::option::Option::Some(__v) = self
16241                        .amount_e18
16242                        .as_option()
16243                    {
16244                        __map.serialize_entry("amountE18", __v)?;
16245                    }
16246                }
16247                if !::buffa::json_helpers::skip_if::is_empty_str(
16248                    self.ledger_transfer_id,
16249                ) {
16250                    __map.serialize_entry("ledgerTransferId", self.ledger_transfer_id)?;
16251                }
16252                __map.end()
16253            }
16254        }
16255        impl<'a> ::buffa::MessageName for FlowStepActivityViewView<'a> {
16256            const PACKAGE: &'static str = "chain.lifecycle.v1";
16257            const NAME: &'static str = "FlowStepActivityView";
16258            const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
16259            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
16260        }
16261        ::buffa::impl_default_view_instance!(FlowStepActivityViewView);
16262        ::buffa::impl_view_reborrow!(FlowStepActivityViewView);
16263        /** Self-contained, `'static` owned view of a `FlowStepActivityView` message.
16264
16265 Wraps [`::buffa::OwnedView`]`<`[`FlowStepActivityViewView`]`<'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.
16266
16267 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FlowStepActivityViewView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
16268        #[derive(Clone, Debug)]
16269        pub struct FlowStepActivityViewOwnedView(
16270            ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16271        );
16272        impl FlowStepActivityViewOwnedView {
16273            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
16274            ///
16275            /// The view borrows directly from the buffer's data; the buffer is
16276            /// retained inside the returned handle.
16277            ///
16278            /// # Errors
16279            ///
16280            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
16281            /// protobuf data.
16282            pub fn decode(
16283                bytes: ::buffa::bytes::Bytes,
16284            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16285                ::core::result::Result::Ok(
16286                    FlowStepActivityViewOwnedView(::buffa::OwnedView::decode(bytes)?),
16287                )
16288            }
16289            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
16290            /// max message size).
16291            ///
16292            /// # Errors
16293            ///
16294            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
16295            /// exceeds the configured limits.
16296            pub fn decode_with_options(
16297                bytes: ::buffa::bytes::Bytes,
16298                opts: &::buffa::DecodeOptions,
16299            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16300                ::core::result::Result::Ok(
16301                    FlowStepActivityViewOwnedView(
16302                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
16303                    ),
16304                )
16305            }
16306            /// Build from an owned message via an encode → decode round-trip.
16307            ///
16308            /// # Errors
16309            ///
16310            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
16311            /// somehow invalid (should not happen for well-formed messages).
16312            pub fn from_owned(
16313                msg: &super::super::FlowStepActivityView,
16314            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16315                ::core::result::Result::Ok(
16316                    FlowStepActivityViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
16317                )
16318            }
16319            /// Borrow the full [`FlowStepActivityViewView`] with its lifetime tied to `&self`.
16320            #[must_use]
16321            pub fn view(&self) -> &FlowStepActivityViewView<'_> {
16322                self.0.reborrow()
16323            }
16324            /// Convert to the owned message type.
16325            ///
16326            /// # Errors
16327            ///
16328            /// Returns an error if re-materializing preserved unknown fields
16329            /// fails (e.g. the unknown-field limit is exceeded).
16330            pub fn to_owned_message(
16331                &self,
16332            ) -> ::core::result::Result<
16333                super::super::FlowStepActivityView,
16334                ::buffa::DecodeError,
16335            > {
16336                self.0.to_owned_message()
16337            }
16338            /// The underlying bytes buffer.
16339            #[must_use]
16340            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
16341                self.0.bytes()
16342            }
16343            /// Consume the handle, returning the underlying bytes buffer.
16344            #[must_use]
16345            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
16346                self.0.into_bytes()
16347            }
16348            /// Sequence of the underlying activity within the flow.
16349            ///
16350            /// Field 1: `sequence`
16351            #[must_use]
16352            pub fn sequence(&self) -> u32 {
16353                self.0.reborrow().sequence
16354            }
16355            /// Transaction reference associated with this activity.
16356            ///
16357            /// Field 2: `tx_ref`
16358            #[must_use]
16359            pub fn tx_ref(&self) -> &'_ str {
16360                self.0.reborrow().tx_ref
16361            }
16362            /// Activity occurrence timestamp in milliseconds since epoch (UTC).
16363            ///
16364            /// Field 3: `occurred_at_unix_ms`
16365            #[must_use]
16366            pub fn occurred_at_unix_ms(&self) -> u64 {
16367                self.0.reborrow().occurred_at_unix_ms
16368            }
16369            /// Source that produced this activity.
16370            ///
16371            /// Field 4: `lifecycle_source`
16372            #[must_use]
16373            pub fn lifecycle_source(
16374                &self,
16375            ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
16376                self.0.reborrow().lifecycle_source
16377            }
16378            /// Product-facing reason for notable activity states.
16379            ///
16380            /// Field 5: `reason_code`
16381            #[must_use]
16382            pub fn reason_code(&self) -> ::buffa::EnumValue<super::super::FlowReason> {
16383                self.0.reborrow().reason_code
16384            }
16385            /// Current source confirmation count when confirmations apply.
16386            ///
16387            /// Field 6: `current_confirmations`
16388            #[must_use]
16389            pub fn current_confirmations(&self) -> u32 {
16390                self.0.reborrow().current_confirmations
16391            }
16392            /// Required source confirmation count when confirmations apply.
16393            ///
16394            /// Field 7: `required_confirmations`
16395            #[must_use]
16396            pub fn required_confirmations(&self) -> u32 {
16397                self.0.reborrow().required_confirmations
16398            }
16399            /// Current approval count when validation applies.
16400            ///
16401            /// Field 8: `approve_count`
16402            #[must_use]
16403            pub fn approve_count(&self) -> u32 {
16404                self.0.reborrow().approve_count
16405            }
16406            /// Current rejection count when validation applies.
16407            ///
16408            /// Field 9: `reject_count`
16409            #[must_use]
16410            pub fn reject_count(&self) -> u32 {
16411                self.0.reborrow().reject_count
16412            }
16413            /// Validator set size when validation applies.
16414            ///
16415            /// Field 10: `validator_count`
16416            #[must_use]
16417            pub fn validator_count(&self) -> u32 {
16418                self.0.reborrow().validator_count
16419            }
16420            /// Activity kind for display grouping.
16421            ///
16422            /// Field 11: `kind`
16423            #[must_use]
16424            pub fn kind(
16425                &self,
16426            ) -> ::buffa::EnumValue<super::super::FlowStepActivityKind> {
16427                self.0.reborrow().kind
16428            }
16429            /// Approval count required for this activity.
16430            ///
16431            /// Field 12: `required_approvals`
16432            #[must_use]
16433            pub fn required_approvals(&self) -> u32 {
16434                self.0.reborrow().required_approvals
16435            }
16436            /// Rejection count that would fail this activity.
16437            ///
16438            /// Field 13: `required_rejections`
16439            #[must_use]
16440            pub fn required_rejections(&self) -> u32 {
16441                self.0.reborrow().required_rejections
16442            }
16443            /// Amount posted by the underlying movement represented by this activity, in
16444            /// 18-decimal unified asset units. This may be a net movement amount for
16445            /// fee-bearing fulfillment activity.
16446            ///
16447            /// Field 14: `amount_e18`
16448            #[must_use]
16449            pub fn amount_e18(
16450                &self,
16451            ) -> &::buffa::MessageFieldView<
16452                super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
16453                    '_,
16454                >,
16455            > {
16456                &self.0.reborrow().amount_e18
16457            }
16458            /// Ledger transfer identifier for ledger-sourced settlement activities.
16459            ///
16460            /// Field 15: `ledger_transfer_id`
16461            #[must_use]
16462            pub fn ledger_transfer_id(&self) -> &'_ str {
16463                self.0.reborrow().ledger_transfer_id
16464            }
16465        }
16466        impl ::core::convert::From<::buffa::OwnedView<FlowStepActivityViewView<'static>>>
16467        for FlowStepActivityViewOwnedView {
16468            fn from(
16469                inner: ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16470            ) -> Self {
16471                FlowStepActivityViewOwnedView(inner)
16472            }
16473        }
16474        impl ::core::convert::From<FlowStepActivityViewOwnedView>
16475        for ::buffa::OwnedView<FlowStepActivityViewView<'static>> {
16476            fn from(wrapper: FlowStepActivityViewOwnedView) -> Self {
16477                wrapper.0
16478            }
16479        }
16480        impl ::core::convert::AsRef<
16481            ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16482        > for FlowStepActivityViewOwnedView {
16483            fn as_ref(&self) -> &::buffa::OwnedView<FlowStepActivityViewView<'static>> {
16484                &self.0
16485            }
16486        }
16487        impl ::buffa::HasMessageView for super::super::FlowStepActivityView {
16488            type View<'a> = FlowStepActivityViewView<'a>;
16489            type ViewHandle = FlowStepActivityViewOwnedView;
16490        }
16491        impl ::serde::Serialize for FlowStepActivityViewOwnedView {
16492            fn serialize<__S: ::serde::Serializer>(
16493                &self,
16494                __s: __S,
16495            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16496                ::serde::Serialize::serialize(&self.0, __s)
16497            }
16498        }
16499        /// FlowTimelineItemView is one item in the expected visible lifecycle progress
16500        /// path.
16501        #[derive(Clone, Debug, Default)]
16502        pub struct FlowTimelineItemViewView<'a> {
16503            /// One-based sequence within the expected timeline.
16504            ///
16505            /// Field 1: `sequence`
16506            pub sequence: u32,
16507            /// Visible lifecycle step.
16508            ///
16509            /// Field 2: `step`
16510            pub step: ::buffa::EnumValue<super::super::FlowStep>,
16511            /// Progress status for this timeline item.
16512            ///
16513            /// Field 3: `status`
16514            pub status: ::buffa::EnumValue<super::super::FlowTimelineStatus>,
16515            /// Expected duration of this visible step in milliseconds, derived from recent
16516            /// observed timing data for the same flow type.
16517            ///
16518            /// Field 4: `expected_duration_ms`
16519            pub expected_duration_ms: u64,
16520            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
16521        }
16522        impl<'a> ::buffa::MessageView<'a> for FlowTimelineItemViewView<'a> {
16523            type Owned = super::super::FlowTimelineItemView;
16524            fn decode_view(
16525                buf: &'a [u8],
16526            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16527                let __limit = ::core::cell::Cell::new(
16528                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
16529                );
16530                <Self as ::buffa::MessageView>::decode_view_ctx(
16531                    buf,
16532                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
16533                )
16534            }
16535            fn decode_view_with_ctx(
16536                buf: &'a [u8],
16537                ctx: ::buffa::DecodeContext<'_>,
16538            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16539                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
16540            }
16541            fn merge_view_field(
16542                &mut self,
16543                tag: ::buffa::encoding::Tag,
16544                cur: &'a [u8],
16545                before_tag: &'a [u8],
16546                ctx: ::buffa::DecodeContext<'_>,
16547            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
16548                let _ = ctx;
16549                #[allow(unused_variables)]
16550                let view = self;
16551                let mut cur = cur;
16552                match tag.field_number() {
16553                    1u32 => {
16554                        ::buffa::encoding::check_wire_type(
16555                            tag,
16556                            ::buffa::encoding::WireType::Varint,
16557                        )?;
16558                        view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
16559                    }
16560                    2u32 => {
16561                        ::buffa::encoding::check_wire_type(
16562                            tag,
16563                            ::buffa::encoding::WireType::Varint,
16564                        )?;
16565                        view.step = ::buffa::EnumValue::from(
16566                            ::buffa::types::decode_int32(&mut cur)?,
16567                        );
16568                    }
16569                    3u32 => {
16570                        ::buffa::encoding::check_wire_type(
16571                            tag,
16572                            ::buffa::encoding::WireType::Varint,
16573                        )?;
16574                        view.status = ::buffa::EnumValue::from(
16575                            ::buffa::types::decode_int32(&mut cur)?,
16576                        );
16577                    }
16578                    4u32 => {
16579                        ::buffa::encoding::check_wire_type(
16580                            tag,
16581                            ::buffa::encoding::WireType::Varint,
16582                        )?;
16583                        view.expected_duration_ms = ::buffa::types::decode_uint64(
16584                            &mut cur,
16585                        )?;
16586                    }
16587                    _ => {
16588                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
16589                        let span_len = before_tag.len() - cur.len();
16590                        view.__buffa_unknown_fields
16591                            .push_record(before_tag, span_len, ctx)?;
16592                    }
16593                }
16594                ::core::result::Result::Ok(cur)
16595            }
16596            fn to_owned_message(
16597                &self,
16598            ) -> ::core::result::Result<
16599                super::super::FlowTimelineItemView,
16600                ::buffa::DecodeError,
16601            > {
16602                self.to_owned_from_source(None)
16603            }
16604            #[allow(clippy::useless_conversion, clippy::needless_update)]
16605            fn to_owned_from_source(
16606                &self,
16607                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
16608            ) -> ::core::result::Result<
16609                super::super::FlowTimelineItemView,
16610                ::buffa::DecodeError,
16611            > {
16612                #[allow(unused_imports)]
16613                use ::buffa::alloc::string::ToString as _;
16614                let _ = __buffa_src;
16615                ::core::result::Result::Ok(super::super::FlowTimelineItemView {
16616                    sequence: self.sequence,
16617                    step: self.step,
16618                    status: self.status,
16619                    expected_duration_ms: self.expected_duration_ms,
16620                    __buffa_unknown_fields: self
16621                        .__buffa_unknown_fields
16622                        .to_owned()?
16623                        .into(),
16624                    ..::core::default::Default::default()
16625                })
16626            }
16627        }
16628        impl<'a> ::buffa::ViewEncode<'a> for FlowTimelineItemViewView<'a> {
16629            #[allow(clippy::needless_borrow, clippy::let_and_return)]
16630            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
16631                #[allow(unused_imports)]
16632                use ::buffa::Enumeration as _;
16633                let mut size = 0u32;
16634                if self.sequence != 0u32 {
16635                    size
16636                        += 1u32
16637                            + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
16638                }
16639                {
16640                    let val = self.step.to_i32();
16641                    if val != 0 {
16642                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16643                    }
16644                }
16645                {
16646                    let val = self.status.to_i32();
16647                    if val != 0 {
16648                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16649                    }
16650                }
16651                if self.expected_duration_ms != 0u64 {
16652                    size
16653                        += 1u32
16654                            + ::buffa::types::uint64_encoded_len(
16655                                self.expected_duration_ms,
16656                            ) as u32;
16657                }
16658                size += self.__buffa_unknown_fields.encoded_len() as u32;
16659                size
16660            }
16661            #[allow(clippy::needless_borrow)]
16662            fn write_to(
16663                &self,
16664                _cache: &mut ::buffa::SizeCache,
16665                buf: &mut impl ::buffa::bytes::BufMut,
16666            ) {
16667                #[allow(unused_imports)]
16668                use ::buffa::Enumeration as _;
16669                if self.sequence != 0u32 {
16670                    ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
16671                }
16672                {
16673                    let val = self.step.to_i32();
16674                    if val != 0 {
16675                        ::buffa::types::put_int32_field(2u32, val, buf);
16676                    }
16677                }
16678                {
16679                    let val = self.status.to_i32();
16680                    if val != 0 {
16681                        ::buffa::types::put_int32_field(3u32, val, buf);
16682                    }
16683                }
16684                if self.expected_duration_ms != 0u64 {
16685                    ::buffa::types::put_uint64_field(
16686                        4u32,
16687                        self.expected_duration_ms,
16688                        buf,
16689                    );
16690                }
16691                self.__buffa_unknown_fields.write_to(buf);
16692            }
16693        }
16694        /// Serializes this view as protobuf JSON.
16695        ///
16696        /// Implicit-presence fields with default values are omitted, `required`
16697        /// fields are always emitted, explicit-presence (`optional`) fields are
16698        /// emitted only when set, bytes fields are base64-encoded, and enum
16699        /// values are their proto name strings.
16700        ///
16701        /// This impl uses `serialize_map(None)` because the number of emitted
16702        /// fields depends on default-omission rules; serializers that require
16703        /// known map lengths (e.g. `bincode`) will return a runtime error.
16704        /// Use the owned message type for those formats.
16705        impl<'__a> ::serde::Serialize for FlowTimelineItemViewView<'__a> {
16706            fn serialize<__S: ::serde::Serializer>(
16707                &self,
16708                __s: __S,
16709            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16710                use ::serde::ser::SerializeMap as _;
16711                let mut __map = __s.serialize_map(::core::option::Option::None)?;
16712                if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
16713                    __map
16714                        .serialize_entry(
16715                            "sequence",
16716                            &::buffa::json_helpers::ProtoJson(&self.sequence),
16717                        )?;
16718                }
16719                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.step) {
16720                    __map.serialize_entry("step", &self.step)?;
16721                }
16722                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.status) {
16723                    __map.serialize_entry("status", &self.status)?;
16724                }
16725                if !::buffa::json_helpers::skip_if::is_zero_u64(
16726                    &self.expected_duration_ms,
16727                ) {
16728                    __map
16729                        .serialize_entry(
16730                            "expectedDurationMs",
16731                            &::buffa::json_helpers::ProtoJson(&self.expected_duration_ms),
16732                        )?;
16733                }
16734                __map.end()
16735            }
16736        }
16737        impl<'a> ::buffa::MessageName for FlowTimelineItemViewView<'a> {
16738            const PACKAGE: &'static str = "chain.lifecycle.v1";
16739            const NAME: &'static str = "FlowTimelineItemView";
16740            const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
16741            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
16742        }
16743        ::buffa::impl_default_view_instance!(FlowTimelineItemViewView);
16744        ::buffa::impl_view_reborrow!(FlowTimelineItemViewView);
16745        /** Self-contained, `'static` owned view of a `FlowTimelineItemView` message.
16746
16747 Wraps [`::buffa::OwnedView`]`<`[`FlowTimelineItemViewView`]`<'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.
16748
16749 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FlowTimelineItemViewView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
16750        #[derive(Clone, Debug)]
16751        pub struct FlowTimelineItemViewOwnedView(
16752            ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
16753        );
16754        impl FlowTimelineItemViewOwnedView {
16755            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
16756            ///
16757            /// The view borrows directly from the buffer's data; the buffer is
16758            /// retained inside the returned handle.
16759            ///
16760            /// # Errors
16761            ///
16762            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
16763            /// protobuf data.
16764            pub fn decode(
16765                bytes: ::buffa::bytes::Bytes,
16766            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16767                ::core::result::Result::Ok(
16768                    FlowTimelineItemViewOwnedView(::buffa::OwnedView::decode(bytes)?),
16769                )
16770            }
16771            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
16772            /// max message size).
16773            ///
16774            /// # Errors
16775            ///
16776            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
16777            /// exceeds the configured limits.
16778            pub fn decode_with_options(
16779                bytes: ::buffa::bytes::Bytes,
16780                opts: &::buffa::DecodeOptions,
16781            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16782                ::core::result::Result::Ok(
16783                    FlowTimelineItemViewOwnedView(
16784                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
16785                    ),
16786                )
16787            }
16788            /// Build from an owned message via an encode → decode round-trip.
16789            ///
16790            /// # Errors
16791            ///
16792            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
16793            /// somehow invalid (should not happen for well-formed messages).
16794            pub fn from_owned(
16795                msg: &super::super::FlowTimelineItemView,
16796            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16797                ::core::result::Result::Ok(
16798                    FlowTimelineItemViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
16799                )
16800            }
16801            /// Borrow the full [`FlowTimelineItemViewView`] with its lifetime tied to `&self`.
16802            #[must_use]
16803            pub fn view(&self) -> &FlowTimelineItemViewView<'_> {
16804                self.0.reborrow()
16805            }
16806            /// Convert to the owned message type.
16807            ///
16808            /// # Errors
16809            ///
16810            /// Returns an error if re-materializing preserved unknown fields
16811            /// fails (e.g. the unknown-field limit is exceeded).
16812            pub fn to_owned_message(
16813                &self,
16814            ) -> ::core::result::Result<
16815                super::super::FlowTimelineItemView,
16816                ::buffa::DecodeError,
16817            > {
16818                self.0.to_owned_message()
16819            }
16820            /// The underlying bytes buffer.
16821            #[must_use]
16822            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
16823                self.0.bytes()
16824            }
16825            /// Consume the handle, returning the underlying bytes buffer.
16826            #[must_use]
16827            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
16828                self.0.into_bytes()
16829            }
16830            /// One-based sequence within the expected timeline.
16831            ///
16832            /// Field 1: `sequence`
16833            #[must_use]
16834            pub fn sequence(&self) -> u32 {
16835                self.0.reborrow().sequence
16836            }
16837            /// Visible lifecycle step.
16838            ///
16839            /// Field 2: `step`
16840            #[must_use]
16841            pub fn step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
16842                self.0.reborrow().step
16843            }
16844            /// Progress status for this timeline item.
16845            ///
16846            /// Field 3: `status`
16847            #[must_use]
16848            pub fn status(
16849                &self,
16850            ) -> ::buffa::EnumValue<super::super::FlowTimelineStatus> {
16851                self.0.reborrow().status
16852            }
16853            /// Expected duration of this visible step in milliseconds, derived from recent
16854            /// observed timing data for the same flow type.
16855            ///
16856            /// Field 4: `expected_duration_ms`
16857            #[must_use]
16858            pub fn expected_duration_ms(&self) -> u64 {
16859                self.0.reborrow().expected_duration_ms
16860            }
16861        }
16862        impl ::core::convert::From<::buffa::OwnedView<FlowTimelineItemViewView<'static>>>
16863        for FlowTimelineItemViewOwnedView {
16864            fn from(
16865                inner: ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
16866            ) -> Self {
16867                FlowTimelineItemViewOwnedView(inner)
16868            }
16869        }
16870        impl ::core::convert::From<FlowTimelineItemViewOwnedView>
16871        for ::buffa::OwnedView<FlowTimelineItemViewView<'static>> {
16872            fn from(wrapper: FlowTimelineItemViewOwnedView) -> Self {
16873                wrapper.0
16874            }
16875        }
16876        impl ::core::convert::AsRef<
16877            ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
16878        > for FlowTimelineItemViewOwnedView {
16879            fn as_ref(&self) -> &::buffa::OwnedView<FlowTimelineItemViewView<'static>> {
16880                &self.0
16881            }
16882        }
16883        impl ::buffa::HasMessageView for super::super::FlowTimelineItemView {
16884            type View<'a> = FlowTimelineItemViewView<'a>;
16885            type ViewHandle = FlowTimelineItemViewOwnedView;
16886        }
16887        impl ::serde::Serialize for FlowTimelineItemViewOwnedView {
16888            fn serialize<__S: ::serde::Serializer>(
16889                &self,
16890                __s: __S,
16891            ) -> ::core::result::Result<__S::Ok, __S::Error> {
16892                ::serde::Serialize::serialize(&self.0, __s)
16893            }
16894        }
16895        /// FlowDetailView is the full lifecycle detail response model.
16896        #[derive(Clone, Debug, Default)]
16897        pub struct FlowDetailViewView<'a> {
16898            /// Compact flow summary for headers and list-style display.
16899            ///
16900            /// Field 1: `summary`
16901            pub summary: ::buffa::MessageFieldView<
16902                super::super::__buffa::view::FlowSummaryViewView<'a>,
16903            >,
16904            /// Factual visible steps observed for this flow, ordered by sequence. Open
16905            /// flows may have `summary.current_step` ahead of the last observed step.
16906            ///
16907            /// Field 2: `observed_steps`
16908            pub observed_steps: ::buffa::RepeatedView<
16909                'a,
16910                super::super::__buffa::view::FlowStepViewView<'a>,
16911            >,
16912            /// True when this detail was served from live in-memory state rather than
16913            /// historical terminal state.
16914            ///
16915            /// Field 3: `from_live_state`
16916            pub from_live_state: bool,
16917            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
16918        }
16919        impl<'a> ::buffa::MessageView<'a> for FlowDetailViewView<'a> {
16920            type Owned = super::super::FlowDetailView;
16921            fn decode_view(
16922                buf: &'a [u8],
16923            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16924                let __limit = ::core::cell::Cell::new(
16925                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
16926                );
16927                <Self as ::buffa::MessageView>::decode_view_ctx(
16928                    buf,
16929                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
16930                )
16931            }
16932            fn decode_view_with_ctx(
16933                buf: &'a [u8],
16934                ctx: ::buffa::DecodeContext<'_>,
16935            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16936                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
16937            }
16938            fn merge_view_field(
16939                &mut self,
16940                tag: ::buffa::encoding::Tag,
16941                cur: &'a [u8],
16942                before_tag: &'a [u8],
16943                ctx: ::buffa::DecodeContext<'_>,
16944            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
16945                let _ = ctx;
16946                #[allow(unused_variables)]
16947                let view = self;
16948                let mut cur = cur;
16949                match tag.field_number() {
16950                    1u32 => {
16951                        ::buffa::encoding::check_wire_type(
16952                            tag,
16953                            ::buffa::encoding::WireType::LengthDelimited,
16954                        )?;
16955                        let __sub_ctx = ctx.descend()?;
16956                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
16957                        match view.summary.as_mut() {
16958                            Some(existing) => {
16959                                ::buffa::MessageView::merge_into_view(
16960                                    existing,
16961                                    sub,
16962                                    __sub_ctx,
16963                                )?
16964                            }
16965                            None => {
16966                                view.summary = ::buffa::MessageFieldView::set(
16967                                    <super::super::__buffa::view::FlowSummaryViewView as ::buffa::MessageView>::decode_view_ctx(
16968                                        sub,
16969                                        __sub_ctx,
16970                                    )?,
16971                                );
16972                            }
16973                        }
16974                    }
16975                    3u32 => {
16976                        ::buffa::encoding::check_wire_type(
16977                            tag,
16978                            ::buffa::encoding::WireType::Varint,
16979                        )?;
16980                        view.from_live_state = ::buffa::types::decode_bool(&mut cur)?;
16981                    }
16982                    2u32 => {
16983                        ::buffa::encoding::check_wire_type(
16984                            tag,
16985                            ::buffa::encoding::WireType::LengthDelimited,
16986                        )?;
16987                        let __sub_ctx = ctx.descend()?;
16988                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
16989                        view.observed_steps
16990                            .push(
16991                                <super::super::__buffa::view::FlowStepViewView as ::buffa::MessageView>::decode_view_ctx(
16992                                    sub,
16993                                    __sub_ctx,
16994                                )?,
16995                            );
16996                    }
16997                    _ => {
16998                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
16999                        let span_len = before_tag.len() - cur.len();
17000                        view.__buffa_unknown_fields
17001                            .push_record(before_tag, span_len, ctx)?;
17002                    }
17003                }
17004                ::core::result::Result::Ok(cur)
17005            }
17006            fn to_owned_message(
17007                &self,
17008            ) -> ::core::result::Result<
17009                super::super::FlowDetailView,
17010                ::buffa::DecodeError,
17011            > {
17012                self.to_owned_from_source(None)
17013            }
17014            #[allow(clippy::useless_conversion, clippy::needless_update)]
17015            fn to_owned_from_source(
17016                &self,
17017                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
17018            ) -> ::core::result::Result<
17019                super::super::FlowDetailView,
17020                ::buffa::DecodeError,
17021            > {
17022                #[allow(unused_imports)]
17023                use ::buffa::alloc::string::ToString as _;
17024                let _ = __buffa_src;
17025                ::core::result::Result::Ok(super::super::FlowDetailView {
17026                    summary: match self.summary.as_option() {
17027                        Some(v) => {
17028                            ::buffa::MessageField::<
17029                                super::super::FlowSummaryView,
17030                            >::some(v.to_owned_from_source(__buffa_src)?)
17031                        }
17032                        None => ::buffa::MessageField::none(),
17033                    },
17034                    observed_steps: self
17035                        .observed_steps
17036                        .iter()
17037                        .map(|v| v.to_owned_from_source(__buffa_src))
17038                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
17039                    from_live_state: self.from_live_state,
17040                    __buffa_unknown_fields: self
17041                        .__buffa_unknown_fields
17042                        .to_owned()?
17043                        .into(),
17044                    ..::core::default::Default::default()
17045                })
17046            }
17047        }
17048        impl<'a> ::buffa::ViewEncode<'a> for FlowDetailViewView<'a> {
17049            #[allow(clippy::needless_borrow, clippy::let_and_return)]
17050            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
17051                #[allow(unused_imports)]
17052                use ::buffa::Enumeration as _;
17053                let mut size = 0u32;
17054                if self.summary.is_set() {
17055                    let __slot = __cache.reserve();
17056                    let inner_size = self.summary.compute_size(__cache);
17057                    __cache.set(__slot, inner_size);
17058                    size
17059                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
17060                            + inner_size;
17061                }
17062                for v in &self.observed_steps {
17063                    let __slot = __cache.reserve();
17064                    let inner_size = v.compute_size(__cache);
17065                    __cache.set(__slot, inner_size);
17066                    size
17067                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
17068                            + inner_size;
17069                }
17070                if self.from_live_state {
17071                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
17072                }
17073                size += self.__buffa_unknown_fields.encoded_len() as u32;
17074                size
17075            }
17076            #[allow(clippy::needless_borrow)]
17077            fn write_to(
17078                &self,
17079                __cache: &mut ::buffa::SizeCache,
17080                buf: &mut impl ::buffa::bytes::BufMut,
17081            ) {
17082                #[allow(unused_imports)]
17083                use ::buffa::Enumeration as _;
17084                if self.summary.is_set() {
17085                    ::buffa::types::put_len_delimited_header(
17086                        1u32,
17087                        __cache.consume_next(),
17088                        buf,
17089                    );
17090                    self.summary.write_to(__cache, buf);
17091                }
17092                for v in &self.observed_steps {
17093                    ::buffa::types::put_len_delimited_header(
17094                        2u32,
17095                        __cache.consume_next(),
17096                        buf,
17097                    );
17098                    v.write_to(__cache, buf);
17099                }
17100                if self.from_live_state {
17101                    ::buffa::types::put_bool_field(3u32, self.from_live_state, buf);
17102                }
17103                self.__buffa_unknown_fields.write_to(buf);
17104            }
17105        }
17106        /// Serializes this view as protobuf JSON.
17107        ///
17108        /// Implicit-presence fields with default values are omitted, `required`
17109        /// fields are always emitted, explicit-presence (`optional`) fields are
17110        /// emitted only when set, bytes fields are base64-encoded, and enum
17111        /// values are their proto name strings.
17112        ///
17113        /// This impl uses `serialize_map(None)` because the number of emitted
17114        /// fields depends on default-omission rules; serializers that require
17115        /// known map lengths (e.g. `bincode`) will return a runtime error.
17116        /// Use the owned message type for those formats.
17117        impl<'__a> ::serde::Serialize for FlowDetailViewView<'__a> {
17118            fn serialize<__S: ::serde::Serializer>(
17119                &self,
17120                __s: __S,
17121            ) -> ::core::result::Result<__S::Ok, __S::Error> {
17122                use ::serde::ser::SerializeMap as _;
17123                let mut __map = __s.serialize_map(::core::option::Option::None)?;
17124                {
17125                    if let ::core::option::Option::Some(__v) = self.summary.as_option() {
17126                        __map.serialize_entry("summary", __v)?;
17127                    }
17128                }
17129                if !self.observed_steps.is_empty() {
17130                    __map.serialize_entry("observedSteps", &*self.observed_steps)?;
17131                }
17132                if self.from_live_state {
17133                    __map.serialize_entry("fromLiveState", &self.from_live_state)?;
17134                }
17135                __map.end()
17136            }
17137        }
17138        impl<'a> ::buffa::MessageName for FlowDetailViewView<'a> {
17139            const PACKAGE: &'static str = "chain.lifecycle.v1";
17140            const NAME: &'static str = "FlowDetailView";
17141            const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowDetailView";
17142            const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
17143        }
17144        ::buffa::impl_default_view_instance!(FlowDetailViewView);
17145        ::buffa::impl_view_reborrow!(FlowDetailViewView);
17146        /** Self-contained, `'static` owned view of a `FlowDetailView` message.
17147
17148 Wraps [`::buffa::OwnedView`]`<`[`FlowDetailViewView`]`<'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.
17149
17150 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FlowDetailViewView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
17151        #[derive(Clone, Debug)]
17152        pub struct FlowDetailViewOwnedView(
17153            ::buffa::OwnedView<FlowDetailViewView<'static>>,
17154        );
17155        impl FlowDetailViewOwnedView {
17156            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
17157            ///
17158            /// The view borrows directly from the buffer's data; the buffer is
17159            /// retained inside the returned handle.
17160            ///
17161            /// # Errors
17162            ///
17163            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
17164            /// protobuf data.
17165            pub fn decode(
17166                bytes: ::buffa::bytes::Bytes,
17167            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17168                ::core::result::Result::Ok(
17169                    FlowDetailViewOwnedView(::buffa::OwnedView::decode(bytes)?),
17170                )
17171            }
17172            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
17173            /// max message size).
17174            ///
17175            /// # Errors
17176            ///
17177            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
17178            /// exceeds the configured limits.
17179            pub fn decode_with_options(
17180                bytes: ::buffa::bytes::Bytes,
17181                opts: &::buffa::DecodeOptions,
17182            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17183                ::core::result::Result::Ok(
17184                    FlowDetailViewOwnedView(
17185                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
17186                    ),
17187                )
17188            }
17189            /// Build from an owned message via an encode → decode round-trip.
17190            ///
17191            /// # Errors
17192            ///
17193            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
17194            /// somehow invalid (should not happen for well-formed messages).
17195            pub fn from_owned(
17196                msg: &super::super::FlowDetailView,
17197            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17198                ::core::result::Result::Ok(
17199                    FlowDetailViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
17200                )
17201            }
17202            /// Borrow the full [`FlowDetailViewView`] with its lifetime tied to `&self`.
17203            #[must_use]
17204            pub fn view(&self) -> &FlowDetailViewView<'_> {
17205                self.0.reborrow()
17206            }
17207            /// Convert to the owned message type.
17208            ///
17209            /// # Errors
17210            ///
17211            /// Returns an error if re-materializing preserved unknown fields
17212            /// fails (e.g. the unknown-field limit is exceeded).
17213            pub fn to_owned_message(
17214                &self,
17215            ) -> ::core::result::Result<
17216                super::super::FlowDetailView,
17217                ::buffa::DecodeError,
17218            > {
17219                self.0.to_owned_message()
17220            }
17221            /// The underlying bytes buffer.
17222            #[must_use]
17223            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
17224                self.0.bytes()
17225            }
17226            /// Consume the handle, returning the underlying bytes buffer.
17227            #[must_use]
17228            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
17229                self.0.into_bytes()
17230            }
17231            /// Compact flow summary for headers and list-style display.
17232            ///
17233            /// Field 1: `summary`
17234            #[must_use]
17235            pub fn summary(
17236                &self,
17237            ) -> &::buffa::MessageFieldView<
17238                super::super::__buffa::view::FlowSummaryViewView<'_>,
17239            > {
17240                &self.0.reborrow().summary
17241            }
17242            /// Factual visible steps observed for this flow, ordered by sequence. Open
17243            /// flows may have `summary.current_step` ahead of the last observed step.
17244            ///
17245            /// Field 2: `observed_steps`
17246            #[must_use]
17247            pub fn observed_steps(
17248                &self,
17249            ) -> &::buffa::RepeatedView<
17250                '_,
17251                super::super::__buffa::view::FlowStepViewView<'_>,
17252            > {
17253                &self.0.reborrow().observed_steps
17254            }
17255            /// True when this detail was served from live in-memory state rather than
17256            /// historical terminal state.
17257            ///
17258            /// Field 3: `from_live_state`
17259            #[must_use]
17260            pub fn from_live_state(&self) -> bool {
17261                self.0.reborrow().from_live_state
17262            }
17263        }
17264        impl ::core::convert::From<::buffa::OwnedView<FlowDetailViewView<'static>>>
17265        for FlowDetailViewOwnedView {
17266            fn from(inner: ::buffa::OwnedView<FlowDetailViewView<'static>>) -> Self {
17267                FlowDetailViewOwnedView(inner)
17268            }
17269        }
17270        impl ::core::convert::From<FlowDetailViewOwnedView>
17271        for ::buffa::OwnedView<FlowDetailViewView<'static>> {
17272            fn from(wrapper: FlowDetailViewOwnedView) -> Self {
17273                wrapper.0
17274            }
17275        }
17276        impl ::core::convert::AsRef<::buffa::OwnedView<FlowDetailViewView<'static>>>
17277        for FlowDetailViewOwnedView {
17278            fn as_ref(&self) -> &::buffa::OwnedView<FlowDetailViewView<'static>> {
17279                &self.0
17280            }
17281        }
17282        impl ::buffa::HasMessageView for super::super::FlowDetailView {
17283            type View<'a> = FlowDetailViewView<'a>;
17284            type ViewHandle = FlowDetailViewOwnedView;
17285        }
17286        impl ::serde::Serialize for FlowDetailViewOwnedView {
17287            fn serialize<__S: ::serde::Serializer>(
17288                &self,
17289                __s: __S,
17290            ) -> ::core::result::Result<__S::Ok, __S::Error> {
17291                ::serde::Serialize::serialize(&self.0, __s)
17292            }
17293        }
17294        pub mod oneof {
17295            #[allow(unused_imports)]
17296            use super::*;
17297            pub mod list_flows_request {
17298                #[allow(unused_imports)]
17299                use super::*;
17300                #[derive(Clone, Debug)]
17301                pub enum AccountSelector<'a> {
17302                    OwnerAccountId(u64),
17303                    SmartAccountAddress(&'a str),
17304                }
17305            }
17306        }
17307    }
17308    pub mod oneof {
17309        #[allow(unused_imports)]
17310        use super::*;
17311        pub mod list_flows_request {
17312            #[allow(unused_imports)]
17313            use super::*;
17314            /// Optional account selector. Omit to list across accounts the caller is
17315            /// allowed to inspect.
17316            #[derive(Clone, PartialEq, Debug)]
17317            pub enum AccountSelector {
17318                OwnerAccountId(u64),
17319                SmartAccountAddress(::buffa::alloc::string::String),
17320            }
17321            impl ::buffa::Oneof for AccountSelector {}
17322            impl serde::Serialize for AccountSelector {
17323                fn serialize<S: serde::Serializer>(
17324                    &self,
17325                    s: S,
17326                ) -> ::core::result::Result<S::Ok, S::Error> {
17327                    use serde::ser::SerializeMap;
17328                    let mut map = s.serialize_map(Some(1))?;
17329                    match self {
17330                        Self::OwnerAccountId(v) => {
17331                            map.serialize_entry(
17332                                "ownerAccountId",
17333                                &::buffa::json_helpers::ProtoJson(v),
17334                            )?;
17335                        }
17336                        Self::SmartAccountAddress(v) => {
17337                            map.serialize_entry("smartAccountAddress", v)?;
17338                        }
17339                    }
17340                    map.end()
17341                }
17342            }
17343        }
17344    }
17345    /// Register this package's `Any` type entries and extension entries.
17346    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
17347        reg.register_json_any(super::__ASSET_IDS_JSON_ANY);
17348        reg.register_json_any(super::__REQUEST_FEE_JSON_ANY);
17349        reg.register_json_any(super::__GET_FLOW_RESPONSE_JSON_ANY);
17350        reg.register_json_any(super::__GET_FLOW_BY_ID_REQUEST_JSON_ANY);
17351        reg.register_json_any(super::__LIST_FLOWS_BY_TX_REQUEST_JSON_ANY);
17352        reg.register_json_any(super::__LIST_FLOWS_REQUEST_JSON_ANY);
17353        reg.register_json_any(super::__LIST_FLOWS_RESPONSE_JSON_ANY);
17354        reg.register_json_any(super::__FLOW_TX_MATCH_VIEW_JSON_ANY);
17355        reg.register_json_any(super::__LIST_FLOWS_BY_TX_RESPONSE_JSON_ANY);
17356        reg.register_json_any(super::__FLOW_SUMMARY_VIEW_JSON_ANY);
17357        reg.register_json_any(super::__FLOW_SUMMARY_PROGRESS_VIEW_JSON_ANY);
17358        reg.register_json_any(super::__FLOW_STEP_VIEW_JSON_ANY);
17359        reg.register_json_any(super::__FLOW_STEP_ACTIVITY_VIEW_JSON_ANY);
17360        reg.register_json_any(super::__FLOW_TIMELINE_ITEM_VIEW_JSON_ANY);
17361        reg.register_json_any(super::__FLOW_DETAIL_VIEW_JSON_ANY);
17362    }
17363}
17364#[doc(inline)]
17365pub use self::__buffa::view::AssetIdsView;
17366#[doc(inline)]
17367pub use self::__buffa::view::AssetIdsOwnedView;
17368#[doc(inline)]
17369pub use self::__buffa::view::RequestFeeView;
17370#[doc(inline)]
17371pub use self::__buffa::view::RequestFeeOwnedView;
17372#[doc(inline)]
17373pub use self::__buffa::view::GetFlowResponseView;
17374#[doc(inline)]
17375pub use self::__buffa::view::GetFlowResponseOwnedView;
17376#[doc(inline)]
17377pub use self::__buffa::view::GetFlowByIdRequestView;
17378#[doc(inline)]
17379pub use self::__buffa::view::GetFlowByIdRequestOwnedView;
17380#[doc(inline)]
17381pub use self::__buffa::view::ListFlowsByTxRequestView;
17382#[doc(inline)]
17383pub use self::__buffa::view::ListFlowsByTxRequestOwnedView;
17384#[doc(inline)]
17385pub use self::__buffa::view::ListFlowsRequestView;
17386#[doc(inline)]
17387pub use self::__buffa::view::ListFlowsRequestOwnedView;
17388#[doc(inline)]
17389pub use self::__buffa::view::ListFlowsResponseView;
17390#[doc(inline)]
17391pub use self::__buffa::view::ListFlowsResponseOwnedView;
17392#[doc(inline)]
17393pub use self::__buffa::view::FlowTxMatchViewView;
17394#[doc(inline)]
17395pub use self::__buffa::view::FlowTxMatchViewOwnedView;
17396#[doc(inline)]
17397pub use self::__buffa::view::ListFlowsByTxResponseView;
17398#[doc(inline)]
17399pub use self::__buffa::view::ListFlowsByTxResponseOwnedView;
17400#[doc(inline)]
17401pub use self::__buffa::view::FlowSummaryViewView;
17402#[doc(inline)]
17403pub use self::__buffa::view::FlowSummaryViewOwnedView;
17404#[doc(inline)]
17405pub use self::__buffa::view::FlowSummaryProgressViewView;
17406#[doc(inline)]
17407pub use self::__buffa::view::FlowSummaryProgressViewOwnedView;
17408#[doc(inline)]
17409pub use self::__buffa::view::FlowStepViewView;
17410#[doc(inline)]
17411pub use self::__buffa::view::FlowStepViewOwnedView;
17412#[doc(inline)]
17413pub use self::__buffa::view::FlowStepActivityViewView;
17414#[doc(inline)]
17415pub use self::__buffa::view::FlowStepActivityViewOwnedView;
17416#[doc(inline)]
17417pub use self::__buffa::view::FlowTimelineItemViewView;
17418#[doc(inline)]
17419pub use self::__buffa::view::FlowTimelineItemViewOwnedView;
17420#[doc(inline)]
17421pub use self::__buffa::view::FlowDetailViewView;
17422#[doc(inline)]
17423pub use self::__buffa::view::FlowDetailViewOwnedView;
17424#[doc(inline)]
17425pub use self::__buffa::register_types;